Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Umbraco.Web.UI.Client/src/external/uui/UUIPopoverEvent.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { UUIEvent } from '@umbraco-ui/uui';
import type { UUIPopoverElement } from './uui-popover.element.js';

export class UUIPopoverEvent extends UUIEvent<{}, UUIPopoverElement> {
public static readonly CLOSE = 'close';
}
13 changes: 13 additions & 0 deletions src/Umbraco.Web.UI.Client/src/external/uui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,28 @@ export const demandCustomElement = (
};

/** @deprecated Use UUITimer instead */
// TODO: Remove in v.18
export const Timer = UUITimer;

/** @deprecated Use UUIActiveMixinInterface instead */
// TODO: Remove in v.18
export type ActiveMixinInterface = UUIActiveMixinInterface;
/** @deprecated Use UUILabelMixinInterface instead */
// TODO: Remove in v.18
export type LabelMixinInterface = UUILabelMixinInterface;
/** @deprecated Use UUIPopoverTargetMixinInterface instead */
// TODO: Remove in v.18
export type PopoverTargetMixinInterface = UUIPopoverTargetMixinInterface;
/** @deprecated Use UUISelectOnlyMixinInterface instead */
// TODO: Remove in v.18
export type SelectOnlyMixinInterface = UUISelectOnlyMixinInterface;
/** @deprecated Use UUISelectableMixinInterface instead */
// TODO: Remove in v.18
export type SelectableMixinInterface = UUISelectableMixinInterface;

// TODO: Remove in v.18
export * from './uui-popover.element.js';
// TODO: Remove in v.18
export * from './UUIPopoverEvent.js';
// TODO: Remove in v.18
export * from './uui-caret.element.js';
61 changes: 61 additions & 0 deletions src/Umbraco.Web.UI.Client/src/external/uui/uui-caret.element.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import { defineElement } from '@umbraco-ui/uui';
import { css, html, LitElement, property } from '../lit';

/**
* DEPRECATED: Please use uui-symbol-expand or uui-symbol-sort. A caret that rotates on click. Color will be `currentColor`
* @deprecated since version 0.0.8
* @element uui-caret
*/
@defineElement('uui-caret')
export class UUICaretElement extends LitElement {
/**
* Turns the arrow around.
* @type {boolean}
* @default false
*/
@property({ type: Boolean, reflect: true })
public open = false;

constructor() {
super();
console.error('´uui-caret´ is deprecated, please use ´uui-symbol-expand´ or ´uui-symbol-sort´');
Comment thread
nielslyngsoe marked this conversation as resolved.
}

override render() {
return html`<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="3"
stroke-linecap="round"
stroke-linejoin="round">
<path d="m4 9 8 8 8-8"></path>
</svg>`;
}

static override styles = [
css`
:host {
display: inline-block;
width: 12px;
vertical-align: middle;
}

svg {
transform-origin: 50% 50%;
transition: transform 100ms cubic-bezier(0.1, 0, 0.9, 1);
}

:host([open]) svg {
transform: rotate(180deg);
}
`,
];
}

declare global {
interface HTMLElementTagNameMap {
'uui-caret': UUICaretElement;
}
}
Loading
Loading