@api-client/ui 0.5.25 → 0.5.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/elements/navigation/internals/AppNavigationElement.d.ts.map +1 -1
- package/build/src/elements/navigation/internals/AppNavigationElement.js +1 -6
- package/build/src/elements/navigation/internals/AppNavigationElement.js.map +1 -1
- package/build/src/elements/navigation/internals/NavigationItem.d.ts +6 -0
- package/build/src/elements/navigation/internals/NavigationItem.d.ts.map +1 -1
- package/build/src/elements/navigation/internals/NavigationItem.js +26 -7
- package/build/src/elements/navigation/internals/NavigationItem.js.map +1 -1
- package/build/src/elements/navigation/internals/NavigationItem.styles.d.ts.map +1 -1
- package/build/src/elements/navigation/internals/NavigationItem.styles.js +18 -1
- package/build/src/elements/navigation/internals/NavigationItem.styles.js.map +1 -1
- package/demo/elements/index.html +7 -4
- package/demo/elements/navigation/navigation-item.html +45 -0
- package/demo/elements/navigation/navigation-item.ts +112 -0
- package/package.json +1 -1
- package/src/elements/navigation/internals/AppNavigationElement.ts +1 -6
- package/src/elements/navigation/internals/NavigationItem.styles.ts +18 -1
- package/src/elements/navigation/internals/NavigationItem.ts +11 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppNavigationElement.d.ts","sourceRoot":"","sources":["../../../../../src/elements/navigation/internals/AppNavigationElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAKnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAE5C,OAAO,8BAA8B,CAAA;AACrC,OAAO,2CAA2C,CAAA;AAElD,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,MAAM,CAAC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E,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,cAAc,GAAG,cAAc,EAAE,GAAG,MAAM,EACpD,IAAI,GAAE,sBAA2B,GAChC,cAAc;IAoCjB,SAAS,CAAC,2BAA2B,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,GAAE,sBAA2B,GAAG,cAAc;IAUvG,SAAS,CAAC,cAAc,CACtB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,cAAc,GAAG,cAAc,EAAE,GAAG,MAAM,EACnD,IAAI,GAAE,sBAA2B,GAChC,cAAc;IAuCjB,SAAS,CAAC,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,cAAc;
|
|
1
|
+
{"version":3,"file":"AppNavigationElement.d.ts","sourceRoot":"","sources":["../../../../../src/elements/navigation/internals/AppNavigationElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAKnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAE5C,OAAO,8BAA8B,CAAA;AACrC,OAAO,2CAA2C,CAAA;AAElD,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE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,CACtB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,cAAc,GAAG,cAAc,EAAE,GAAG,MAAM,EACnD,IAAI,GAAE,sBAA2B,GAChC,cAAc;IAuCjB,SAAS,CAAC,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,cAAc;IAiBtF,SAAS,CAAC,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc;CAM3E"}
|
|
@@ -997,12 +997,7 @@ let AppNavigation = (() => {
|
|
|
997
997
|
data-key="${key}"
|
|
998
998
|
data-kind="${kind}"
|
|
999
999
|
/>
|
|
1000
|
-
<ui-icon-button
|
|
1001
|
-
@click="${this.handleNameCommit}"
|
|
1002
|
-
aria-label="Confirm name change"
|
|
1003
|
-
class="name-commit-button"
|
|
1004
|
-
type="standard"
|
|
1005
|
-
>
|
|
1000
|
+
<ui-icon-button @click="${this.handleNameCommit}" aria-label="Confirm name change" class="name-commit-button">
|
|
1006
1001
|
<ui-icon icon="check"></ui-icon>
|
|
1007
1002
|
</ui-icon-button>
|
|
1008
1003
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppNavigationElement.js","sourceRoot":"","sources":["../../../../../src/elements/navigation/internals/AppNavigationElement.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAkC,MAAM,KAAK,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAA;AAElE,OAAO,UAAU,MAAM,qBAAqB,C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SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;yBAC7B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;;yCAEhB,OAAO;;KAE3C,CAAA;QACH,CAAC;QAES,eAAe,CAAC,GAAW,EAAE,IAAY,EAAE,OAAgB;YACnE,OAAO,IAAI,CAAA;yCAC0B,WAAW,eAAe,WAAW,gBAAgB,WAAW;;;mBAGtF,OAAO,IAAI,EAAE;sBACV,IAAI,CAAC,sBAAsB;sBAC3B,GAAG;uBACF,IAAI;;;oBAGP,IAAI,CAAC,gBAAgB;;;;;;;;KAQpC,CAAA;QACH,CAAC;QAES,iBAAiB,CAAC,IAAc,EAAE,KAAa;YACvD,OAAO,IAAI,CAAA;uBACQ,IAAI;mCACQ,KAAK,KAAK,KAAK;KAC7C,CAAA;QACH,CAAC;;;AAzjCH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,6BA+gCC","sourcesContent":["import { html, nothing, PropertyValues, TemplateResult } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { cancelEvent } from '@api-client/core/lib/events/Utils.js'\nimport type { IconType } from '../../../md/icons/Icons.js'\nimport ApiElement from '../../ApiElement.js'\n\nimport '../../../md/icons/ui-icon.js'\nimport '../../../md/icon-button/ui-icon-button.js'\n\nexport interface ISelectDetail {\n /**\n * The key of the selected item\n */\n key: string\n /**\n * THe kind of the selected item\n */\n kind: string\n /**\n * Optionally, the parent odf the selected item, if any.\n */\n parent?: string\n /**\n * When applicable, the top object in the structure.\n */\n root?: string\n}\n\nexport interface IListItemRenderOptions {\n draggable?: boolean\n parent?: string\n disabled?: boolean\n /**\n * Only relevant for parent list item.\n * When set it forces this icon to be rendered next to the toggle button.\n */\n parentIcon?: IconType\n /**\n * When set is add the `data-root` attribute.\n * In principle, it represents a root object in the tree, if any.\n */\n root?: string\n}\n\n/**\n * A base class for navigation elements helping creating specific implementation of the view.\n * The implementations sets their own properties with the data that are used to generate the view.\n *\n * The generated menu must have the following structure created by the implementations:\n *\n * ```html\n * <ul aria-label=\"...\" aria-multiselectable=\"false\">\n * <li role=\"treeitem\" data-key=\"...\" data-kind=\"...\" data-draggable=\"true|false\">\n * <div class=\"list-item-content\"><span class=\"label\" title=\"...\">...</span></div>\n * </li>\n * <li role=\"treeitem\" data-key=\"...\" data-kind=\"...\" data-draggable=\"true\" aria-expanded=\"true\" class=\"parent-item\">\n * <div class=\"list-item-content\">\n * <ui-icon icon=\"chevronRight\" class=\"group-toggle-icon\"></ui-icon>\n * <span class=\"label\" title=\"...\">...</span>\n * </div>\n * <ul role=\"group\" data-parent=\"...\" ?hidden aria-hidden=\"true|false\">\n * <li role=\"treeitem\" data-key=\"...\" data-parent=\"...\" data-kind=\"...\" data-draggable=\"true|false\">\n * <div class=\"list-item-content\">\n * <ui-icon icon=\"...\" class=\"item-icon\"></ui-icon>\n * <span class=\"label\" title=\"...\">...</span>\n * </div>\n * </li>\n * </ul>\n * </li>\n * </ul>\n * ```\n *\n * Additionally, the child element must include styles from './AppNavigation.styles.js`.\n *\n * Assumptions when running the menu:\n *\n * - all `li` items that do not have `aria-disabled` attribute are considered active tree items (learn more why not to use \"disabled\" attribute https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled)\n * - all `li` elements have `data-key` and `data-kind` attributes set. Elements without these properties are ignored.\n * - all `ul` and `li` elements that have a parent also have `data-parent` with the value of the parent's key.\n * When this is not set the element is considered a top level element.\n * - the implementations does not manage the `tabindex` of any item. Instead set the `_focusedItem` to\n * the currently focused element and the base will manage the focus for you (after the update is complete).\n *\n * @fires {CustomEvent} select - Custom, non bubbling event when a selection is made.\n * It has the `key` and `kind` properties on the detail panel with optional `parent` id.\n * @fires {Event} deselect - Custom, non bubbling event when the selection is cleared.\n */\nexport default class AppNavigation extends ApiElement {\n /**\n * The list of keys of opened items with children. This should be clear each time\n * when the main data property change.\n */\n protected opened = new Set<string>()\n\n /**\n * The key of the currently focused item.\n */\n protected focused?: string\n\n /**\n * The currently focused node.\n * In case there are headers in the list, this may not be a list item.\n */\n @state() accessor focusedItem: HTMLElement | undefined\n\n /**\n * To be set in the child class constructor to configure whether a name change is possible.\n */\n protected allowRename?: boolean\n\n /**\n * The currently selected navigation item.\n * @attr\n */\n @property({ type: String }) accessor selected: string | undefined\n\n /**\n * When set it renders a name change input for the item.\n * This is the `key` of the object.\n *\n * Note, when the user finish editing the name it calls the `_commitName(key, kind, name)` method.\n * This requires the `_allowRename` property to be set to `true` in the constructor.\n * @attr\n */\n @property({ type: String }) accessor edited: string | undefined\n\n /**\n * When set it prohibits the element to make visual selection (via the css) when an item is selected.\n * This is helpful when one navigation can be visually references in multiple places (like split layout).\n * @attr\n */\n @property({ type: Boolean, reflect: true }) accessor noVisualSelection: boolean | undefined\n\n /**\n * A reference to the currently rendered name input, if any.\n */\n @query('.name-change input')\n protected accessor _nameInput!: HTMLInputElement | null\n\n /**\n * When set it adds a menu entry with the navigation label.\n * @attribute\n */\n @property({ type: String }) accessor label: string | undefined\n\n /**\n * A reference to the currently dragged item.\n * This logic assumes that the drag and drop is local to this element.\n */\n protected draggingItem?: HTMLLIElement\n\n constructor() {\n super()\n this.addEventListener('click', this.handleClick.bind(this))\n }\n\n override connectedCallback(): void {\n super.connectedCallback()\n this.setAttribute('role', 'navigation')\n this.setAttribute('tabindex', '0')\n }\n\n protected override willUpdate(cp: PropertyValues<this>): void {\n super.willUpdate(cp)\n if (cp.has('selected') && this.selected) {\n this.ensureTreeVisibility(this.selected)\n }\n }\n\n protected override updated(cp: PropertyValues<this>): void {\n super.updated(cp)\n if (cp.has('edited') && this.edited) {\n const node = this._nameInput\n if (node) {\n node.focus()\n }\n this.ensureTreeVisibility(this.edited)\n }\n if (cp.has('focusedItem') && this.focusedItem) {\n const old = cp.get('focusedItem') as HTMLElement | undefined\n this.manageFocus(this.focusedItem, old)\n }\n }\n\n protected reset(): void {\n this.opened.clear()\n this.focused = undefined\n this.focusedItem = undefined\n this.edited = undefined\n }\n\n /**\n * This method is called when the `_focusedItem` property is updated.\n * It removes tabindex from the old element (if any) and sets tabindex and focuses on the new item (if any).\n * When there's no new item, it sets the `tabindex` on self.\n *\n * @param current The new focused element, if any\n * @param old The old focused element, if any.\n */\n protected manageFocus(current?: HTMLElement, old?: HTMLElement): void {\n if (old) {\n // don't set `-1` here as the item can have children which event with tabindex '0' won't be focusable.\n old.removeAttribute('tabindex')\n }\n if (current) {\n current.setAttribute('tabindex', '0')\n current.focus()\n // current.scrollIntoView();\n // remove tabindex from self so when the user returns to this navigation it will focus directly on\n // this item.\n if (this.hasAttribute('tabindex')) {\n this.removeAttribute('tabindex')\n }\n } else if (!this.hasAttribute('tabindex')) {\n // restore tabindex on self.\n this.setAttribute('tabindex', '0')\n }\n }\n\n /**\n * Makes sure the node represented by the passed key is visible in the UI.\n * This opens all parents on the way up to the root and scrolls to the node, when needed.\n * @param key The key of the object to ensure visibility for.\n */\n ensureTreeVisibility(key: string): void {\n const node = this.shadowRoot?.querySelector(`li[data-key=\"${key}\"]`) as HTMLLIElement\n if (!node) {\n return\n }\n if (node.offsetParent !== null) {\n // node is visible\n return\n }\n const { opened: _opened } = this\n let parent = this.findParentListItem(node)\n const toOpen = new Set<string>()\n while (parent) {\n const id = parent.dataset.key as string\n if (!_opened.has(id)) {\n toOpen.add(id)\n }\n parent = this.findParentListItem(parent)\n }\n if (toOpen.size) {\n this.opened = this.opened.union(toOpen)\n this.requestUpdate()\n }\n }\n\n /**\n * Toggles a group of tree items.\n *\n * @param key The key of the group parent.\n */\n toggleGroup(key: string): void {\n if (this.opened.has(key)) {\n this.opened.delete(key)\n } else {\n this.opened.add(key)\n }\n this.requestUpdate()\n }\n\n /**\n * Allows to programmatically open a folder.\n * It opens all parents if they are not opened.\n * @param key The key of the folder to open.\n */\n openGroup(key: string): void {\n const node = this.shadowRoot?.querySelector(`li[data-key=\"${key}\"]`) as HTMLLIElement\n if (!node) {\n return\n }\n if (this.opened.has(key)) {\n return\n }\n this.opened.add(key)\n\n // open all parents\n let parent = this.findParentListItem(node)\n while (parent) {\n const parentKey = parent.dataset.key as string\n this.opened.add(parentKey)\n parent = this.findParentListItem(parent)\n }\n this.requestUpdate()\n }\n\n /**\n * Allows to programmatically close a folder.\n * @param key The key of the folder to open.\n */\n closeGroup(key: string): void {\n if (this.opened.has(key)) {\n this.opened.delete(key)\n this.requestUpdate()\n }\n }\n\n /**\n * A function to determine whether the passed Element is an active list item.\n *\n * @param node The Element to test\n * @returns true when the passed element is a `li` element and is not disabled.\n */\n protected isValidListItem(node: Element): boolean {\n return (\n node &&\n node.localName === 'li' &&\n node.getAttribute('aria-disabled') !== 'true' &&\n node.hasAttribute('data-key') &&\n node.hasAttribute('data-kind')\n )\n }\n\n /**\n * Marks the item as currently focused.\n *\n * Note, focused item is not the same as selected item. Focus is reflected in the UI without changing the selection.\n *\n * Also note, this only sets the `_focused` and `_focusedItem` properties. After the element renders\n * the implementation should change the `tabindex` of the focused item to `0`.\n */\n protected focusListItem(node: HTMLElement): void {\n this.focused = node.dataset.key\n this.focusedItem = node\n }\n\n /**\n * Finds a valid list item that is a parent to the current item.\n *\n * @param node The current node located somewhere in the tree.\n * @returns The nearest parent list item or undefined when not found.\n */\n protected findParentListItem(node: HTMLElement): HTMLLIElement | undefined {\n let parent = node.parentElement as HTMLElement\n while (parent) {\n if (this.isValidListItem(parent)) {\n return parent as HTMLLIElement\n }\n // when the `parentElement` is ShadowRoot then it's parent is `null` so the loop breaks.\n parent = parent.parentElement as HTMLElement\n }\n return undefined\n }\n\n /**\n * From a `<li>` it finds the last `<li>` descendant in the tree.\n *\n * ```html\n * <ul>\n * <li> <-- this is the current node\n * <div>...</div>\n * <ul>\n * <li>...</li>\n * <li> <-- this is the last list item.\n * <div>...</div>\n * <ul hidden> <- this is ignored.\n * <li></li>\n * <li></li> <-- this is not the last list item because the parent list is hidden.\n * </ul>\n * </li>\n * </ul>\n * </li>\n * </ul>\n * ```\n *\n * @param node The current list item to find the last descendant for.\n * @returns The last list item or undefined.\n */\n protected findLastDescendant(node: HTMLElement): HTMLElement | undefined {\n const list = node.querySelector('ul:not([hidden])')\n if (!list) {\n return undefined\n }\n const li = list.querySelector('li[data-key][data-kind]:last-of-type:not([aria-disabled=\"true\"])')\n if (!li) {\n return undefined\n }\n const result = this.findLastDescendant(li as HTMLElement)\n return result || (li as HTMLElement)\n }\n\n /**\n * Focuses on a list descendant of a folder item.\n * It does nothing when the `node` is not a folder item or the folder has no selectable children.\n *\n * @param node The node to use as a reference. The current focused node by default.\n * @returns true when focused on any of the descendants\n */\n protected focusFirstDescendant(node = this.focusedItem): boolean {\n if (!node) {\n return false\n }\n const list = node.querySelector('ul:not([aria-hidden=\"true\"])')\n if (!list) {\n return false\n }\n const child = list.querySelector('li[data-key][data-kind]:not([aria-disabled=\"true\"])')\n if (!child) {\n return false\n }\n this.focusListItem(child as HTMLLIElement)\n return true\n }\n\n /**\n * Focuses on the next node relative to the passed node.\n *\n * @param node The node to use as a starting point. When not set it uses the currently focused node.\n * @returns true when focused on any of the next siblings\n */\n focusNextSibling(node = this.focusedItem): boolean {\n if (!node) {\n return false\n }\n let current = node.nextElementSibling as HTMLElement\n while (current) {\n if (this.isValidListItem(current)) {\n this.focusListItem(current)\n return true\n }\n current = current.nextElementSibling as HTMLElement\n }\n return false\n }\n\n /**\n * Focuses on the previous node relative to the passed node.\n *\n * @param node The node to use as a starting point. When not set it uses the currently focused node.\n * @returns true when focused on any of the previous siblings\n */\n focusPreviousSibling(node = this.focusedItem): boolean {\n if (!node) {\n return false\n }\n let current = node.previousElementSibling as HTMLElement\n while (current) {\n if (this.isValidListItem(current)) {\n const last = this.findLastDescendant(current)\n if (last) {\n this.focusListItem(last)\n return true\n }\n this.focusListItem(current)\n return true\n }\n current = current.previousElementSibling as HTMLElement\n }\n return false\n }\n\n /**\n * Focuses on a first list item that accepts focus relative to the given node.\n *\n * @param node The node to use as a reference. The current focused node by default.\n * @returns true when focused on any of the parents\n */\n protected focusFirstParent(node: HTMLElement): boolean {\n if (!node) {\n return false\n }\n const parent = this.findParentListItem(node)\n if (parent) {\n this.focusListItem(parent)\n return true\n }\n return false\n }\n\n protected findClosestListItem(e: Event): HTMLLIElement | undefined {\n const target = e.composedPath()[0] as HTMLElement\n return (target.closest('li[data-key][data-kind]:not([aria-disabled=\"true\"])') as HTMLLIElement) || undefined\n // const path = e.composedPath()\n // while (path.length) {\n // const target = path.shift() as Node\n // if (!target) {\n // break\n // }\n // if (target.nodeType !== Node.ELEMENT_NODE) {\n // continue\n // }\n // if (!this._isValidListItem(target as Element)) {\n // continue\n // }\n // return target as HTMLLIElement\n // }\n // return undefined\n }\n\n /**\n * Dispatched the `select` custom event with the `key` and `kind` on the detail.\n *\n * @param key The key of the selected item.\n * @param kind The kind of the selected item\n * @param parent Optional parent item.\n */\n protected notifySelection(key: string, kind: string, parent?: string, root?: string): void {\n this.dispatchEvent(\n new CustomEvent<ISelectDetail>('select', {\n detail: { key, kind, parent, root },\n })\n )\n }\n\n /**\n * A handler for the `dragstart` event dispatched when the item is draggable.\n * Calls the `setupDataTransfer()` if has valid target.\n */\n protected handleItemDragStart(e: DragEvent): void {\n if (e.defaultPrevented) {\n return\n }\n const node = this.findClosestListItem(e)\n const dt = e.dataTransfer\n if (!dt || !node) {\n return\n }\n this.draggingItem = node\n // do not cancel this event\n this.setupDataTransfer(node, dt)\n }\n\n /**\n * A handler for the `dragend` event dispatched when the item is draggable.\n * @param e The dragend event.\n */\n protected handleItemDragEnd(e: DragEvent): void {\n if (e.defaultPrevented) {\n return\n }\n const dt = e.dataTransfer\n if (!dt || !this.draggingItem) {\n return\n }\n this.unloadDataTransfer(this.draggingItem, dt)\n this.draggingItem = undefined\n // const node = this.findClosestListItem(e)\n // const dt = e.dataTransfer\n // if (!dt || !node) {\n // return\n // }\n // e.preventDefault()\n // this.unloadDataTransfer(node, dt)\n }\n\n protected handleItemDragOver(e: DragEvent): void {\n if (e.defaultPrevented) {\n return\n }\n const node = this.findClosestListItem(e)\n if (!node) {\n return\n }\n const dt = e.dataTransfer\n if (!dt) {\n return\n }\n // This is required to enable drop event.\n e.preventDefault()\n const validTarget = this.isValidDropTarget(node, dt)\n if (validTarget) {\n node.classList.add('drop-target')\n }\n if (node.classList.contains('parent-item')) {\n this.scheduleGroupOpen(node.dataset.key as string, node)\n }\n this.processDragOver(node, dt, validTarget)\n }\n\n protected handleItemDragLeave(e: DragEvent): void {\n if (e.defaultPrevented) {\n return\n }\n // const node = e.composedPath()[0] as HTMLElement\n // if (node.localName !== 'li') {\n // // We get a lot of false positive here when the user drags over the list item.\n // // which interfeers with the dragleave event.\n // // Because of that, we onlt react when the leave hapens on a list item only.\n // return\n // }\n const node = this.findClosestListItem(e)\n if (!node) {\n return\n }\n const dt = e.dataTransfer\n if (!dt) {\n return\n }\n node.classList.remove('drop-target')\n if (node.classList.contains('parent-item')) {\n this.cancelGroupOpen(node.dataset.key as string)\n }\n this.processDragLeave(node as HTMLLIElement, dt)\n }\n\n protected handleItemDrop(e: DragEvent): void {\n if (e.defaultPrevented) {\n return\n }\n const node = this.findClosestListItem(e)\n if (!node) {\n return\n }\n const dt = e.dataTransfer\n if (!dt) {\n return\n }\n // This is required to prohibit the default action.\n e.preventDefault()\n node.classList.remove('drop-target')\n this.unloadDataTransfer(node, dt)\n this.processDrop(node, dt)\n }\n\n /**\n * Sets the common properties on the `DataTransfer`. Implementations can override this method to add\n * own properties.\n */\n protected setupDataTransfer(item: HTMLLIElement, dt: DataTransfer): void {\n const kind = item.dataset.kind\n const key = item.dataset.key\n if (!key || !kind) {\n return\n }\n dt.setData('text/kind', kind)\n dt.setData(kind, '')\n dt.setData('text/key', key)\n dt.setData('text/plain', key)\n dt.setData('text/source', this.localName)\n dt.effectAllowed = 'copyMove'\n\n // Setup the image\n const clone = item.cloneNode(true) as HTMLLIElement\n // removes children + toggle buttons\n clone.querySelectorAll('ul,.group-toggle-icon').forEach((i) => {\n i.remove()\n })\n // Setup the dragged width.\n const content = item.querySelector('.list-item-content') || item\n clone.style.width = `${content.clientWidth}px`\n // Marks the clone as a drag image and selected\n clone.classList.add('drag-image', 'selected')\n const root = this.shadowRoot as ShadowRoot\n root.appendChild(clone)\n dt.setDragImage(clone, 0, 0)\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected unloadDataTransfer(item: HTMLLIElement, dt: DataTransfer): void {\n const root = this.shadowRoot as ShadowRoot\n root.querySelectorAll('.drag-image').forEach((i) => {\n i.remove()\n })\n }\n\n protected handleNameInputKeydown(e: KeyboardEvent): void {\n e.stopPropagation()\n if (e.key === 'Escape') {\n this.edited = undefined\n } else if (e.key === 'Enter') {\n const input = e.target as HTMLInputElement\n const { key, kind } = input.dataset\n if (!key || !kind) {\n return\n }\n this.commitName(key, kind, input.value.trim())\n }\n }\n\n /**\n * Handles an event when something is dragged over another item.\n * Mind that it can be anything (files, text, etc.) so the implementation should\n * check the type of the data transfer.\n *\n * @param item The item that an object is dragged overt that item.\n * @param dt Data transfer instance.\n * @param validTarget True when the target is a valid drop target.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected processDragOver(item: HTMLLIElement, dt: DataTransfer, validTarget: boolean): void | Promise<void> {\n // ...\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected processDragLeave(item: HTMLLIElement, dt: DataTransfer): void | Promise<void> {\n // ...\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected processDrop(item: HTMLLIElement, dt: DataTransfer): void | Promise<void> {\n // ...\n }\n\n /**\n * To be implemented by the child class.\n * Checks whether the target is a valid drop target.\n * When used, it simplifies the sub-class logic by using this classes drag and drop handling.\n * @param target The target item that the object is dragged over.\n * @param dt The data transfer instance.\n * @returns true when the target is a valid drop target.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected isValidDropTarget(target: HTMLElement, dt: DataTransfer): boolean {\n return false\n }\n\n /**\n * A map of timeouts for opening groups.\n */\n private groupOpenTimeouts = new Map<string, number>()\n\n /**\n * Schedules opening a group after a delay.\n * @param key The key of the group to open.\n * @param item The list item element.\n */\n private scheduleGroupOpen(key: string, item: HTMLLIElement): void {\n // console.log(Date.now(), 'SchemaDesignNavigation.scheduleGroupOpen', key)\n if (item.ariaExpanded === 'true' || this.groupOpenTimeouts.has(key)) {\n // console.log(Date.now(), 'NOT NEEDED', key, item.ariaExpanded === 'true', this.groupOpenTimeouts.has(key))\n return\n }\n const timeoutId = window.setTimeout(() => {\n this.openGroup(key)\n this.groupOpenTimeouts.delete(key)\n }, 700)\n this.groupOpenTimeouts.set(key, timeoutId)\n }\n\n /**\n * Cancels a scheduled group open.\n * @param key The key of the group to cancel.\n */\n private cancelGroupOpen(key: string): void {\n // console.log(Date.now(), 'SchemaDesignNavigation.cancelGroupOpen', key)\n const timeoutId = this.groupOpenTimeouts.get(key)\n if (timeoutId !== undefined) {\n window.clearTimeout(timeoutId)\n this.groupOpenTimeouts.delete(key)\n }\n }\n\n protected handleNameCommit(e: Event): void {\n e.preventDefault()\n const input = (e.currentTarget as HTMLElement).previousElementSibling as HTMLInputElement\n if (!input || input.localName !== 'input') {\n return\n }\n const { key, kind } = input.dataset\n if (!key || !kind) {\n return\n }\n this.commitName(key, kind, input.value.trim())\n }\n\n /**\n * This should be overwritten by the implementation that support name change.\n * Method called when the user request to change a name of an item.\n *\n * @param key The key of the item.\n * @param kind The kind of the item.\n * @param name THe new name.\n */\n protected commitName(key: string, kind: string, name: string): void | Promise<void> {\n // eslint-disable-next-line no-console\n console.warn(`The commit name method is not set in the child class for ${key}, ${kind}, and ${name}.`)\n }\n\n protected handleDoubleClick(e: Event): void {\n if (e.defaultPrevented) {\n return\n }\n const node = this.findClosestListItem(e)\n if (!node) {\n return\n }\n this.handleEnterAction(node)\n }\n\n protected handleClick(e: Event): void {\n if (e.defaultPrevented) {\n return\n }\n const node = this.findClosestListItem(e)\n if (!node) {\n if (e.target === this) {\n this.deselect()\n }\n return\n }\n this.handleEnterAction(node)\n this.focusListItem(node)\n this.requestUpdate()\n }\n\n protected handleKeydown(e: KeyboardEvent): void {\n const node = this.findClosestListItem(e)\n if (!node) {\n return\n }\n switch (e.key) {\n case 'ArrowRight':\n this.handleRightAction(node)\n e.preventDefault()\n break\n case 'ArrowLeft':\n this.handleLeftAction(node)\n e.preventDefault()\n break\n case 'ArrowDown':\n this.handleDownAction(node)\n e.preventDefault()\n break\n case 'ArrowUp':\n this.handleUpAction(node)\n e.preventDefault()\n break\n case 'Home':\n this.handleHomeAction()\n e.preventDefault()\n break\n case 'End':\n this.handleEndAction()\n e.preventDefault()\n break\n case 'Enter':\n this.handleEnterAction(node)\n e.preventDefault()\n break\n default:\n }\n }\n\n protected renderLabel(): TemplateResult | typeof nothing {\n const { label } = this\n if (!label) {\n return nothing\n }\n return html` <div class=\"navigation-title\">${label}</div> `\n }\n\n protected deselect(): void {\n this.dispatchEvent(new Event('deselect'))\n this.selected = undefined\n this.focused = undefined\n this.focusedItem = undefined\n }\n\n /**\n * Performs the default action of the currently focused node.\n * For parent nodes, it opens or closes the node.\n * In single-select trees, if the node has no children, selects the current node\n * if not already selected (which is the default action).\n */\n protected handleEnterAction(node: HTMLElement): void {\n const key = node.dataset.key as string\n const isFolder = node.classList.contains('parent-item')\n if (isFolder) {\n this.toggleGroup(key)\n }\n // don't guard this with checking whether the selection changed.\n // In a tabbed / split layout the item can be closed while the navigation item still can\n // be selected.\n this.selected = key\n this.notifySelection(key, node.dataset.kind as string, node.dataset.parent, node.dataset.root)\n }\n\n /**\n * 1. When focus is on a closed node, opens the node; focus does not move.\n * 2. When focus is on a open node, moves focus to the first child node.\n * 3. When focus is on an end node (a tree item with no children), does nothing.\n */\n protected handleRightAction(node: HTMLElement): void {\n const isFolder = node.classList.contains('parent-item')\n if (!isFolder) {\n return\n }\n const key = node.dataset.key as string\n if (!this.opened.has(key)) {\n // #1\n this.opened.add(key)\n this.requestUpdate()\n return\n }\n const size = Number(node.dataset.size)\n if (Number.isNaN(size) || !size) {\n // #3\n return\n }\n // #2\n this.focusFirstDescendant(node)\n }\n\n /**\n * 1. When focus is on an open node, closes the node.\n * 2. When focus is on a child node that is also either an end node or a closed node, moves focus to its parent node.\n * 3. When focus is on a closed `tree`, does nothing.\n */\n protected handleLeftAction(node: HTMLElement): void {\n const key = node.dataset.key as string\n const isFolder = node.classList.contains('parent-item')\n if (isFolder) {\n if (this.opened.has(key)) {\n // #1\n this.opened.delete(key)\n this.requestUpdate()\n return\n }\n }\n // #2\n this.focusFirstParent(node)\n // note, #3 won't happen here as the outer tree is always opened.\n }\n\n /**\n * Moves focus to the next node that is focusable without opening or closing a node.\n */\n protected handleDownAction(node: HTMLElement): void {\n const isFolder = node.classList.contains('parent-item')\n // try focusing on any child\n if (isFolder && this.focusFirstDescendant(node)) {\n return\n }\n // try focus on any next item.\n if (this.focusNextSibling(node)) {\n return\n }\n let parent = this.findParentListItem(node)\n while (parent) {\n if (this.focusNextSibling(parent)) {\n return\n }\n parent = this.findParentListItem(parent)\n }\n }\n\n /**\n * Moves focus to the previous node that is focusable without opening or closing a node.\n */\n protected handleUpAction(node: HTMLElement): void {\n if (this.focusPreviousSibling(node)) {\n return\n }\n this.focusFirstParent(node)\n }\n\n protected handleHomeAction(): void {\n const first = (this.shadowRoot as ShadowRoot).querySelector('ul')\n if (!first) {\n return\n }\n const children = Array.from(first.children) as HTMLElement[]\n for (const node of children) {\n if (this.isValidListItem(node)) {\n this.focusListItem(node)\n break\n }\n }\n }\n\n protected handleEndAction(): void {\n const first = (this.shadowRoot as ShadowRoot).querySelector('ul')\n if (!first) {\n return\n }\n const children = Array.from(first.children).reverse() as HTMLElement[]\n for (const node of children) {\n if (this.isValidListItem(node)) {\n this.focusListItem(node)\n break\n }\n }\n }\n\n /**\n *\n * @param contents The children contents.\n * @returns A predefined template for the outer list element.\n */\n protected renderOuterList(contents: TemplateResult | TemplateResult[] | string): TemplateResult {\n return html`\n <ul\n role=\"tree\"\n aria-multiselectable=\"false\"\n aria-labelledby=\"${this.label ? 'navigation-title' : nothing}\"\n @dblclick=\"${this.handleDoubleClick}\"\n @keydown=\"${this.handleKeydown}\"\n @dragstart=\"${this.handleItemDragStart}\"\n @dragend=\"${this.handleItemDragEnd}\"\n @dragover=\"${this.handleItemDragOver}\"\n @dragleave=\"${this.handleItemDragLeave}\"\n @drop=\"${this.handleItemDrop}\"\n class=\"root\"\n >\n ${contents}\n </ul>\n `\n }\n\n protected renderParentListItem(\n key: string,\n kind: string,\n label: string,\n children: TemplateResult | TemplateResult[] | string,\n opts: IListItemRenderOptions = {}\n ): TemplateResult {\n const { selected, focused: _focused, edited } = this\n const opened = this.opened.has(key)\n const classes = {\n 'parent-item': true,\n 'selected': selected === key,\n 'focused': _focused === key,\n opened,\n }\n return html`\n <li\n class=\"${classMap(classes)}\"\n role=\"treeitem\"\n aria-selected=\"false\"\n aria-expanded=\"${opened ? 'true' : 'false'}\"\n data-parent=\"${ifDefined(opts.parent)}\"\n data-root=\"${ifDefined(opts.root)}\"\n data-key=\"${key}\"\n data-kind=\"${kind}\"\n draggable=\"${opts.draggable ? 'true' : 'false'}\"\n aria-disabled=\"${opts.disabled ? 'true' : 'false'}\"\n >\n ${edited === key ? this.renderNameInput(key, kind, label) : this.renderParentListItemContent(label, opts)}\n <ul\n role=\"group\"\n id=\"group${key}\"\n data-parent=\"${ifDefined(opts.parent)}\"\n ?hidden=\"${!opened}\"\n aria-hidden=\"${opened ? 'false' : 'true'}\"\n >\n ${children}\n </ul>\n </li>\n `\n }\n\n protected renderParentListItemContent(label: string, opts: IListItemRenderOptions = {}): TemplateResult {\n return html`\n <div class=\"list-item-content parent-content\">\n <ui-icon icon=\"chevronRight\" class=\"group-toggle-icon\"></ui-icon>\n ${opts.parentIcon ? html`<ui-icon icon=\"${opts.parentIcon}\" class=\"object-icon\"></ui-icon>` : ''}\n <span class=\"label\" title=\"${label}\">${label}</span>\n </div>\n `\n }\n\n protected renderListItem(\n key: string,\n kind: string,\n label: string,\n content: TemplateResult | TemplateResult[] | string,\n opts: IListItemRenderOptions = {}\n ): TemplateResult {\n const { selected, focused, edited } = this\n if (edited === key) {\n const input = this.renderNameInput(key, kind, label)\n return html`\n <li\n role=\"treeitem\"\n aria-selected=\"false\"\n class=\"name-change-item\"\n data-parent=\"${ifDefined(opts.parent)}\"\n data-root=\"${ifDefined(opts.root)}\"\n data-key=\"${key}\"\n data-kind=\"${kind}\"\n >\n ${input}\n </li>\n `\n }\n const classes = {\n selected: selected === key,\n focused: focused === key,\n }\n return html`\n <li\n class=\"${classMap(classes)}\"\n role=\"treeitem\"\n aria-selected=\"false\"\n data-parent=\"${ifDefined(opts.parent)}\"\n data-root=\"${ifDefined(opts.root)}\"\n data-key=\"${key}\"\n data-kind=\"${kind}\"\n draggable=\"${opts.draggable ? 'true' : 'false'}\"\n aria-disabled=\"${opts.disabled ? 'true' : 'false'}\"\n >\n <div class=\"list-item-content\">${content}</div>\n </li>\n `\n }\n\n protected renderNameInput(key: string, kind: string, oldName?: string): TemplateResult {\n return html`\n <div class=\"name-change\" @click=\"${cancelEvent}\" @keydown=\"${cancelEvent}\" @dblclick=\"${cancelEvent}\">\n <input\n type=\"text\"\n .value=${oldName || ''}\n @keydown=\"${this.handleNameInputKeydown}\"\n data-key=\"${key}\"\n data-kind=\"${kind}\"\n />\n <ui-icon-button\n @click=\"${this.handleNameCommit}\"\n aria-label=\"Confirm name change\"\n class=\"name-commit-button\"\n type=\"standard\"\n >\n <ui-icon icon=\"check\"></ui-icon>\n </ui-icon-button>\n </div>\n `\n }\n\n protected renderItemContent(icon: IconType, label: string): TemplateResult {\n return html`\n <ui-icon icon=\"${icon}\" class=\"object-icon\"></ui-icon>\n <span class=\"label\" title=\"${label}\">${label}</span>\n `\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AppNavigationElement.js","sourceRoot":"","sources":["../../../../../src/elements/navigation/internals/AppNavigationElement.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AI;;YAEf,KAAK;;OAEV,CAAA;YACH,CAAC;YACD,MAAM,OAAO,GAAG;gBACd,QAAQ,EAAE,QAAQ,KAAK,GAAG;gBAC1B,OAAO,EAAE,OAAO,KAAK,GAAG;aACzB,CAAA;YACD,OAAO,IAAI,CAAA;;iBAEE,QAAQ,CAAC,OAAO,CAAC;;;uBAGX,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;qBACxB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;oBACrB,GAAG;qBACF,IAAI;qBACJ,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;yBAC7B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;;yCAEhB,OAAO;;KAE3C,CAAA;QACH,CAAC;QAES,eAAe,CAAC,GAAW,EAAE,IAAY,EAAE,OAAgB;YACnE,OAAO,IAAI,CAAA;yCAC0B,WAAW,eAAe,WAAW,gBAAgB,WAAW;;;mBAGtF,OAAO,IAAI,EAAE;sBACV,IAAI,CAAC,sBAAsB;sBAC3B,GAAG;uBACF,IAAI;;kCAEO,IAAI,CAAC,gBAAgB;;;;KAIlD,CAAA;QACH,CAAC;QAES,iBAAiB,CAAC,IAAc,EAAE,KAAa;YACvD,OAAO,IAAI,CAAA;uBACQ,IAAI;mCACQ,KAAK,KAAK,KAAK;KAC7C,CAAA;QACH,CAAC;;;AApjCH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,6BA0gCC","sourcesContent":["import { html, nothing, PropertyValues, TemplateResult } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { cancelEvent } from '@api-client/core/lib/events/Utils.js'\nimport type { IconType } from '../../../md/icons/Icons.js'\nimport ApiElement from '../../ApiElement.js'\n\nimport '../../../md/icons/ui-icon.js'\nimport '../../../md/icon-button/ui-icon-button.js'\n\nexport interface ISelectDetail {\n /**\n * The key of the selected item\n */\n key: string\n /**\n * THe kind of the selected item\n */\n kind: string\n /**\n * Optionally, the parent odf the selected item, if any.\n */\n parent?: string\n /**\n * When applicable, the top object in the structure.\n */\n root?: string\n}\n\nexport interface IListItemRenderOptions {\n draggable?: boolean\n parent?: string\n disabled?: boolean\n /**\n * Only relevant for parent list item.\n * When set it forces this icon to be rendered next to the toggle button.\n */\n parentIcon?: IconType\n /**\n * When set is add the `data-root` attribute.\n * In principle, it represents a root object in the tree, if any.\n */\n root?: string\n}\n\n/**\n * A base class for navigation elements helping creating specific implementation of the view.\n * The implementations sets their own properties with the data that are used to generate the view.\n *\n * The generated menu must have the following structure created by the implementations:\n *\n * ```html\n * <ul aria-label=\"...\" aria-multiselectable=\"false\">\n * <li role=\"treeitem\" data-key=\"...\" data-kind=\"...\" data-draggable=\"true|false\">\n * <div class=\"list-item-content\"><span class=\"label\" title=\"...\">...</span></div>\n * </li>\n * <li role=\"treeitem\" data-key=\"...\" data-kind=\"...\" data-draggable=\"true\" aria-expanded=\"true\" class=\"parent-item\">\n * <div class=\"list-item-content\">\n * <ui-icon icon=\"chevronRight\" class=\"group-toggle-icon\"></ui-icon>\n * <span class=\"label\" title=\"...\">...</span>\n * </div>\n * <ul role=\"group\" data-parent=\"...\" ?hidden aria-hidden=\"true|false\">\n * <li role=\"treeitem\" data-key=\"...\" data-parent=\"...\" data-kind=\"...\" data-draggable=\"true|false\">\n * <div class=\"list-item-content\">\n * <ui-icon icon=\"...\" class=\"item-icon\"></ui-icon>\n * <span class=\"label\" title=\"...\">...</span>\n * </div>\n * </li>\n * </ul>\n * </li>\n * </ul>\n * ```\n *\n * Additionally, the child element must include styles from './AppNavigation.styles.js`.\n *\n * Assumptions when running the menu:\n *\n * - all `li` items that do not have `aria-disabled` attribute are considered active tree items (learn more why not to use \"disabled\" attribute https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled)\n * - all `li` elements have `data-key` and `data-kind` attributes set. Elements without these properties are ignored.\n * - all `ul` and `li` elements that have a parent also have `data-parent` with the value of the parent's key.\n * When this is not set the element is considered a top level element.\n * - the implementations does not manage the `tabindex` of any item. Instead set the `_focusedItem` to\n * the currently focused element and the base will manage the focus for you (after the update is complete).\n *\n * @fires {CustomEvent} select - Custom, non bubbling event when a selection is made.\n * It has the `key` and `kind` properties on the detail panel with optional `parent` id.\n * @fires {Event} deselect - Custom, non bubbling event when the selection is cleared.\n */\nexport default class AppNavigation extends ApiElement {\n /**\n * The list of keys of opened items with children. This should be clear each time\n * when the main data property change.\n */\n protected opened = new Set<string>()\n\n /**\n * The key of the currently focused item.\n */\n protected focused?: string\n\n /**\n * The currently focused node.\n * In case there are headers in the list, this may not be a list item.\n */\n @state() accessor focusedItem: HTMLElement | undefined\n\n /**\n * To be set in the child class constructor to configure whether a name change is possible.\n */\n protected allowRename?: boolean\n\n /**\n * The currently selected navigation item.\n * @attr\n */\n @property({ type: String }) accessor selected: string | undefined\n\n /**\n * When set it renders a name change input for the item.\n * This is the `key` of the object.\n *\n * Note, when the user finish editing the name it calls the `_commitName(key, kind, name)` method.\n * This requires the `_allowRename` property to be set to `true` in the constructor.\n * @attr\n */\n @property({ type: String }) accessor edited: string | undefined\n\n /**\n * When set it prohibits the element to make visual selection (via the css) when an item is selected.\n * This is helpful when one navigation can be visually references in multiple places (like split layout).\n * @attr\n */\n @property({ type: Boolean, reflect: true }) accessor noVisualSelection: boolean | undefined\n\n /**\n * A reference to the currently rendered name input, if any.\n */\n @query('.name-change input')\n protected accessor _nameInput!: HTMLInputElement | null\n\n /**\n * When set it adds a menu entry with the navigation label.\n * @attribute\n */\n @property({ type: String }) accessor label: string | undefined\n\n /**\n * A reference to the currently dragged item.\n * This logic assumes that the drag and drop is local to this element.\n */\n protected draggingItem?: HTMLLIElement\n\n constructor() {\n super()\n this.addEventListener('click', this.handleClick.bind(this))\n }\n\n override connectedCallback(): void {\n super.connectedCallback()\n this.setAttribute('role', 'navigation')\n this.setAttribute('tabindex', '0')\n }\n\n protected override willUpdate(cp: PropertyValues<this>): void {\n super.willUpdate(cp)\n if (cp.has('selected') && this.selected) {\n this.ensureTreeVisibility(this.selected)\n }\n }\n\n protected override updated(cp: PropertyValues<this>): void {\n super.updated(cp)\n if (cp.has('edited') && this.edited) {\n const node = this._nameInput\n if (node) {\n node.focus()\n }\n this.ensureTreeVisibility(this.edited)\n }\n if (cp.has('focusedItem') && this.focusedItem) {\n const old = cp.get('focusedItem') as HTMLElement | undefined\n this.manageFocus(this.focusedItem, old)\n }\n }\n\n protected reset(): void {\n this.opened.clear()\n this.focused = undefined\n this.focusedItem = undefined\n this.edited = undefined\n }\n\n /**\n * This method is called when the `_focusedItem` property is updated.\n * It removes tabindex from the old element (if any) and sets tabindex and focuses on the new item (if any).\n * When there's no new item, it sets the `tabindex` on self.\n *\n * @param current The new focused element, if any\n * @param old The old focused element, if any.\n */\n protected manageFocus(current?: HTMLElement, old?: HTMLElement): void {\n if (old) {\n // don't set `-1` here as the item can have children which event with tabindex '0' won't be focusable.\n old.removeAttribute('tabindex')\n }\n if (current) {\n current.setAttribute('tabindex', '0')\n current.focus()\n // current.scrollIntoView();\n // remove tabindex from self so when the user returns to this navigation it will focus directly on\n // this item.\n if (this.hasAttribute('tabindex')) {\n this.removeAttribute('tabindex')\n }\n } else if (!this.hasAttribute('tabindex')) {\n // restore tabindex on self.\n this.setAttribute('tabindex', '0')\n }\n }\n\n /**\n * Makes sure the node represented by the passed key is visible in the UI.\n * This opens all parents on the way up to the root and scrolls to the node, when needed.\n * @param key The key of the object to ensure visibility for.\n */\n ensureTreeVisibility(key: string): void {\n const node = this.shadowRoot?.querySelector(`li[data-key=\"${key}\"]`) as HTMLLIElement\n if (!node) {\n return\n }\n if (node.offsetParent !== null) {\n // node is visible\n return\n }\n const { opened: _opened } = this\n let parent = this.findParentListItem(node)\n const toOpen = new Set<string>()\n while (parent) {\n const id = parent.dataset.key as string\n if (!_opened.has(id)) {\n toOpen.add(id)\n }\n parent = this.findParentListItem(parent)\n }\n if (toOpen.size) {\n this.opened = this.opened.union(toOpen)\n this.requestUpdate()\n }\n }\n\n /**\n * Toggles a group of tree items.\n *\n * @param key The key of the group parent.\n */\n toggleGroup(key: string): void {\n if (this.opened.has(key)) {\n this.opened.delete(key)\n } else {\n this.opened.add(key)\n }\n this.requestUpdate()\n }\n\n /**\n * Allows to programmatically open a folder.\n * It opens all parents if they are not opened.\n * @param key The key of the folder to open.\n */\n openGroup(key: string): void {\n const node = this.shadowRoot?.querySelector(`li[data-key=\"${key}\"]`) as HTMLLIElement\n if (!node) {\n return\n }\n if (this.opened.has(key)) {\n return\n }\n this.opened.add(key)\n\n // open all parents\n let parent = this.findParentListItem(node)\n while (parent) {\n const parentKey = parent.dataset.key as string\n this.opened.add(parentKey)\n parent = this.findParentListItem(parent)\n }\n this.requestUpdate()\n }\n\n /**\n * Allows to programmatically close a folder.\n * @param key The key of the folder to open.\n */\n closeGroup(key: string): void {\n if (this.opened.has(key)) {\n this.opened.delete(key)\n this.requestUpdate()\n }\n }\n\n /**\n * A function to determine whether the passed Element is an active list item.\n *\n * @param node The Element to test\n * @returns true when the passed element is a `li` element and is not disabled.\n */\n protected isValidListItem(node: Element): boolean {\n return (\n node &&\n node.localName === 'li' &&\n node.getAttribute('aria-disabled') !== 'true' &&\n node.hasAttribute('data-key') &&\n node.hasAttribute('data-kind')\n )\n }\n\n /**\n * Marks the item as currently focused.\n *\n * Note, focused item is not the same as selected item. Focus is reflected in the UI without changing the selection.\n *\n * Also note, this only sets the `_focused` and `_focusedItem` properties. After the element renders\n * the implementation should change the `tabindex` of the focused item to `0`.\n */\n protected focusListItem(node: HTMLElement): void {\n this.focused = node.dataset.key\n this.focusedItem = node\n }\n\n /**\n * Finds a valid list item that is a parent to the current item.\n *\n * @param node The current node located somewhere in the tree.\n * @returns The nearest parent list item or undefined when not found.\n */\n protected findParentListItem(node: HTMLElement): HTMLLIElement | undefined {\n let parent = node.parentElement as HTMLElement\n while (parent) {\n if (this.isValidListItem(parent)) {\n return parent as HTMLLIElement\n }\n // when the `parentElement` is ShadowRoot then it's parent is `null` so the loop breaks.\n parent = parent.parentElement as HTMLElement\n }\n return undefined\n }\n\n /**\n * From a `<li>` it finds the last `<li>` descendant in the tree.\n *\n * ```html\n * <ul>\n * <li> <-- this is the current node\n * <div>...</div>\n * <ul>\n * <li>...</li>\n * <li> <-- this is the last list item.\n * <div>...</div>\n * <ul hidden> <- this is ignored.\n * <li></li>\n * <li></li> <-- this is not the last list item because the parent list is hidden.\n * </ul>\n * </li>\n * </ul>\n * </li>\n * </ul>\n * ```\n *\n * @param node The current list item to find the last descendant for.\n * @returns The last list item or undefined.\n */\n protected findLastDescendant(node: HTMLElement): HTMLElement | undefined {\n const list = node.querySelector('ul:not([hidden])')\n if (!list) {\n return undefined\n }\n const li = list.querySelector('li[data-key][data-kind]:last-of-type:not([aria-disabled=\"true\"])')\n if (!li) {\n return undefined\n }\n const result = this.findLastDescendant(li as HTMLElement)\n return result || (li as HTMLElement)\n }\n\n /**\n * Focuses on a list descendant of a folder item.\n * It does nothing when the `node` is not a folder item or the folder has no selectable children.\n *\n * @param node The node to use as a reference. The current focused node by default.\n * @returns true when focused on any of the descendants\n */\n protected focusFirstDescendant(node = this.focusedItem): boolean {\n if (!node) {\n return false\n }\n const list = node.querySelector('ul:not([aria-hidden=\"true\"])')\n if (!list) {\n return false\n }\n const child = list.querySelector('li[data-key][data-kind]:not([aria-disabled=\"true\"])')\n if (!child) {\n return false\n }\n this.focusListItem(child as HTMLLIElement)\n return true\n }\n\n /**\n * Focuses on the next node relative to the passed node.\n *\n * @param node The node to use as a starting point. When not set it uses the currently focused node.\n * @returns true when focused on any of the next siblings\n */\n focusNextSibling(node = this.focusedItem): boolean {\n if (!node) {\n return false\n }\n let current = node.nextElementSibling as HTMLElement\n while (current) {\n if (this.isValidListItem(current)) {\n this.focusListItem(current)\n return true\n }\n current = current.nextElementSibling as HTMLElement\n }\n return false\n }\n\n /**\n * Focuses on the previous node relative to the passed node.\n *\n * @param node The node to use as a starting point. When not set it uses the currently focused node.\n * @returns true when focused on any of the previous siblings\n */\n focusPreviousSibling(node = this.focusedItem): boolean {\n if (!node) {\n return false\n }\n let current = node.previousElementSibling as HTMLElement\n while (current) {\n if (this.isValidListItem(current)) {\n const last = this.findLastDescendant(current)\n if (last) {\n this.focusListItem(last)\n return true\n }\n this.focusListItem(current)\n return true\n }\n current = current.previousElementSibling as HTMLElement\n }\n return false\n }\n\n /**\n * Focuses on a first list item that accepts focus relative to the given node.\n *\n * @param node The node to use as a reference. The current focused node by default.\n * @returns true when focused on any of the parents\n */\n protected focusFirstParent(node: HTMLElement): boolean {\n if (!node) {\n return false\n }\n const parent = this.findParentListItem(node)\n if (parent) {\n this.focusListItem(parent)\n return true\n }\n return false\n }\n\n protected findClosestListItem(e: Event): HTMLLIElement | undefined {\n const target = e.composedPath()[0] as HTMLElement\n return (target.closest('li[data-key][data-kind]:not([aria-disabled=\"true\"])') as HTMLLIElement) || undefined\n // const path = e.composedPath()\n // while (path.length) {\n // const target = path.shift() as Node\n // if (!target) {\n // break\n // }\n // if (target.nodeType !== Node.ELEMENT_NODE) {\n // continue\n // }\n // if (!this._isValidListItem(target as Element)) {\n // continue\n // }\n // return target as HTMLLIElement\n // }\n // return undefined\n }\n\n /**\n * Dispatched the `select` custom event with the `key` and `kind` on the detail.\n *\n * @param key The key of the selected item.\n * @param kind The kind of the selected item\n * @param parent Optional parent item.\n */\n protected notifySelection(key: string, kind: string, parent?: string, root?: string): void {\n this.dispatchEvent(\n new CustomEvent<ISelectDetail>('select', {\n detail: { key, kind, parent, root },\n })\n )\n }\n\n /**\n * A handler for the `dragstart` event dispatched when the item is draggable.\n * Calls the `setupDataTransfer()` if has valid target.\n */\n protected handleItemDragStart(e: DragEvent): void {\n if (e.defaultPrevented) {\n return\n }\n const node = this.findClosestListItem(e)\n const dt = e.dataTransfer\n if (!dt || !node) {\n return\n }\n this.draggingItem = node\n // do not cancel this event\n this.setupDataTransfer(node, dt)\n }\n\n /**\n * A handler for the `dragend` event dispatched when the item is draggable.\n * @param e The dragend event.\n */\n protected handleItemDragEnd(e: DragEvent): void {\n if (e.defaultPrevented) {\n return\n }\n const dt = e.dataTransfer\n if (!dt || !this.draggingItem) {\n return\n }\n this.unloadDataTransfer(this.draggingItem, dt)\n this.draggingItem = undefined\n // const node = this.findClosestListItem(e)\n // const dt = e.dataTransfer\n // if (!dt || !node) {\n // return\n // }\n // e.preventDefault()\n // this.unloadDataTransfer(node, dt)\n }\n\n protected handleItemDragOver(e: DragEvent): void {\n if (e.defaultPrevented) {\n return\n }\n const node = this.findClosestListItem(e)\n if (!node) {\n return\n }\n const dt = e.dataTransfer\n if (!dt) {\n return\n }\n // This is required to enable drop event.\n e.preventDefault()\n const validTarget = this.isValidDropTarget(node, dt)\n if (validTarget) {\n node.classList.add('drop-target')\n }\n if (node.classList.contains('parent-item')) {\n this.scheduleGroupOpen(node.dataset.key as string, node)\n }\n this.processDragOver(node, dt, validTarget)\n }\n\n protected handleItemDragLeave(e: DragEvent): void {\n if (e.defaultPrevented) {\n return\n }\n // const node = e.composedPath()[0] as HTMLElement\n // if (node.localName !== 'li') {\n // // We get a lot of false positive here when the user drags over the list item.\n // // which interfeers with the dragleave event.\n // // Because of that, we onlt react when the leave hapens on a list item only.\n // return\n // }\n const node = this.findClosestListItem(e)\n if (!node) {\n return\n }\n const dt = e.dataTransfer\n if (!dt) {\n return\n }\n node.classList.remove('drop-target')\n if (node.classList.contains('parent-item')) {\n this.cancelGroupOpen(node.dataset.key as string)\n }\n this.processDragLeave(node as HTMLLIElement, dt)\n }\n\n protected handleItemDrop(e: DragEvent): void {\n if (e.defaultPrevented) {\n return\n }\n const node = this.findClosestListItem(e)\n if (!node) {\n return\n }\n const dt = e.dataTransfer\n if (!dt) {\n return\n }\n // This is required to prohibit the default action.\n e.preventDefault()\n node.classList.remove('drop-target')\n this.unloadDataTransfer(node, dt)\n this.processDrop(node, dt)\n }\n\n /**\n * Sets the common properties on the `DataTransfer`. Implementations can override this method to add\n * own properties.\n */\n protected setupDataTransfer(item: HTMLLIElement, dt: DataTransfer): void {\n const kind = item.dataset.kind\n const key = item.dataset.key\n if (!key || !kind) {\n return\n }\n dt.setData('text/kind', kind)\n dt.setData(kind, '')\n dt.setData('text/key', key)\n dt.setData('text/plain', key)\n dt.setData('text/source', this.localName)\n dt.effectAllowed = 'copyMove'\n\n // Setup the image\n const clone = item.cloneNode(true) as HTMLLIElement\n // removes children + toggle buttons\n clone.querySelectorAll('ul,.group-toggle-icon').forEach((i) => {\n i.remove()\n })\n // Setup the dragged width.\n const content = item.querySelector('.list-item-content') || item\n clone.style.width = `${content.clientWidth}px`\n // Marks the clone as a drag image and selected\n clone.classList.add('drag-image', 'selected')\n const root = this.shadowRoot as ShadowRoot\n root.appendChild(clone)\n dt.setDragImage(clone, 0, 0)\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected unloadDataTransfer(item: HTMLLIElement, dt: DataTransfer): void {\n const root = this.shadowRoot as ShadowRoot\n root.querySelectorAll('.drag-image').forEach((i) => {\n i.remove()\n })\n }\n\n protected handleNameInputKeydown(e: KeyboardEvent): void {\n e.stopPropagation()\n if (e.key === 'Escape') {\n this.edited = undefined\n } else if (e.key === 'Enter') {\n const input = e.target as HTMLInputElement\n const { key, kind } = input.dataset\n if (!key || !kind) {\n return\n }\n this.commitName(key, kind, input.value.trim())\n }\n }\n\n /**\n * Handles an event when something is dragged over another item.\n * Mind that it can be anything (files, text, etc.) so the implementation should\n * check the type of the data transfer.\n *\n * @param item The item that an object is dragged overt that item.\n * @param dt Data transfer instance.\n * @param validTarget True when the target is a valid drop target.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected processDragOver(item: HTMLLIElement, dt: DataTransfer, validTarget: boolean): void | Promise<void> {\n // ...\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected processDragLeave(item: HTMLLIElement, dt: DataTransfer): void | Promise<void> {\n // ...\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected processDrop(item: HTMLLIElement, dt: DataTransfer): void | Promise<void> {\n // ...\n }\n\n /**\n * To be implemented by the child class.\n * Checks whether the target is a valid drop target.\n * When used, it simplifies the sub-class logic by using this classes drag and drop handling.\n * @param target The target item that the object is dragged over.\n * @param dt The data transfer instance.\n * @returns true when the target is a valid drop target.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected isValidDropTarget(target: HTMLElement, dt: DataTransfer): boolean {\n return false\n }\n\n /**\n * A map of timeouts for opening groups.\n */\n private groupOpenTimeouts = new Map<string, number>()\n\n /**\n * Schedules opening a group after a delay.\n * @param key The key of the group to open.\n * @param item The list item element.\n */\n private scheduleGroupOpen(key: string, item: HTMLLIElement): void {\n // console.log(Date.now(), 'SchemaDesignNavigation.scheduleGroupOpen', key)\n if (item.ariaExpanded === 'true' || this.groupOpenTimeouts.has(key)) {\n // console.log(Date.now(), 'NOT NEEDED', key, item.ariaExpanded === 'true', this.groupOpenTimeouts.has(key))\n return\n }\n const timeoutId = window.setTimeout(() => {\n this.openGroup(key)\n this.groupOpenTimeouts.delete(key)\n }, 700)\n this.groupOpenTimeouts.set(key, timeoutId)\n }\n\n /**\n * Cancels a scheduled group open.\n * @param key The key of the group to cancel.\n */\n private cancelGroupOpen(key: string): void {\n // console.log(Date.now(), 'SchemaDesignNavigation.cancelGroupOpen', key)\n const timeoutId = this.groupOpenTimeouts.get(key)\n if (timeoutId !== undefined) {\n window.clearTimeout(timeoutId)\n this.groupOpenTimeouts.delete(key)\n }\n }\n\n protected handleNameCommit(e: Event): void {\n e.preventDefault()\n const input = (e.currentTarget as HTMLElement).previousElementSibling as HTMLInputElement\n if (!input || input.localName !== 'input') {\n return\n }\n const { key, kind } = input.dataset\n if (!key || !kind) {\n return\n }\n this.commitName(key, kind, input.value.trim())\n }\n\n /**\n * This should be overwritten by the implementation that support name change.\n * Method called when the user request to change a name of an item.\n *\n * @param key The key of the item.\n * @param kind The kind of the item.\n * @param name THe new name.\n */\n protected commitName(key: string, kind: string, name: string): void | Promise<void> {\n // eslint-disable-next-line no-console\n console.warn(`The commit name method is not set in the child class for ${key}, ${kind}, and ${name}.`)\n }\n\n protected handleDoubleClick(e: Event): void {\n if (e.defaultPrevented) {\n return\n }\n const node = this.findClosestListItem(e)\n if (!node) {\n return\n }\n this.handleEnterAction(node)\n }\n\n protected handleClick(e: Event): void {\n if (e.defaultPrevented) {\n return\n }\n const node = this.findClosestListItem(e)\n if (!node) {\n if (e.target === this) {\n this.deselect()\n }\n return\n }\n this.handleEnterAction(node)\n this.focusListItem(node)\n this.requestUpdate()\n }\n\n protected handleKeydown(e: KeyboardEvent): void {\n const node = this.findClosestListItem(e)\n if (!node) {\n return\n }\n switch (e.key) {\n case 'ArrowRight':\n this.handleRightAction(node)\n e.preventDefault()\n break\n case 'ArrowLeft':\n this.handleLeftAction(node)\n e.preventDefault()\n break\n case 'ArrowDown':\n this.handleDownAction(node)\n e.preventDefault()\n break\n case 'ArrowUp':\n this.handleUpAction(node)\n e.preventDefault()\n break\n case 'Home':\n this.handleHomeAction()\n e.preventDefault()\n break\n case 'End':\n this.handleEndAction()\n e.preventDefault()\n break\n case 'Enter':\n this.handleEnterAction(node)\n e.preventDefault()\n break\n default:\n }\n }\n\n protected renderLabel(): TemplateResult | typeof nothing {\n const { label } = this\n if (!label) {\n return nothing\n }\n return html` <div class=\"navigation-title\">${label}</div> `\n }\n\n protected deselect(): void {\n this.dispatchEvent(new Event('deselect'))\n this.selected = undefined\n this.focused = undefined\n this.focusedItem = undefined\n }\n\n /**\n * Performs the default action of the currently focused node.\n * For parent nodes, it opens or closes the node.\n * In single-select trees, if the node has no children, selects the current node\n * if not already selected (which is the default action).\n */\n protected handleEnterAction(node: HTMLElement): void {\n const key = node.dataset.key as string\n const isFolder = node.classList.contains('parent-item')\n if (isFolder) {\n this.toggleGroup(key)\n }\n // don't guard this with checking whether the selection changed.\n // In a tabbed / split layout the item can be closed while the navigation item still can\n // be selected.\n this.selected = key\n this.notifySelection(key, node.dataset.kind as string, node.dataset.parent, node.dataset.root)\n }\n\n /**\n * 1. When focus is on a closed node, opens the node; focus does not move.\n * 2. When focus is on a open node, moves focus to the first child node.\n * 3. When focus is on an end node (a tree item with no children), does nothing.\n */\n protected handleRightAction(node: HTMLElement): void {\n const isFolder = node.classList.contains('parent-item')\n if (!isFolder) {\n return\n }\n const key = node.dataset.key as string\n if (!this.opened.has(key)) {\n // #1\n this.opened.add(key)\n this.requestUpdate()\n return\n }\n const size = Number(node.dataset.size)\n if (Number.isNaN(size) || !size) {\n // #3\n return\n }\n // #2\n this.focusFirstDescendant(node)\n }\n\n /**\n * 1. When focus is on an open node, closes the node.\n * 2. When focus is on a child node that is also either an end node or a closed node, moves focus to its parent node.\n * 3. When focus is on a closed `tree`, does nothing.\n */\n protected handleLeftAction(node: HTMLElement): void {\n const key = node.dataset.key as string\n const isFolder = node.classList.contains('parent-item')\n if (isFolder) {\n if (this.opened.has(key)) {\n // #1\n this.opened.delete(key)\n this.requestUpdate()\n return\n }\n }\n // #2\n this.focusFirstParent(node)\n // note, #3 won't happen here as the outer tree is always opened.\n }\n\n /**\n * Moves focus to the next node that is focusable without opening or closing a node.\n */\n protected handleDownAction(node: HTMLElement): void {\n const isFolder = node.classList.contains('parent-item')\n // try focusing on any child\n if (isFolder && this.focusFirstDescendant(node)) {\n return\n }\n // try focus on any next item.\n if (this.focusNextSibling(node)) {\n return\n }\n let parent = this.findParentListItem(node)\n while (parent) {\n if (this.focusNextSibling(parent)) {\n return\n }\n parent = this.findParentListItem(parent)\n }\n }\n\n /**\n * Moves focus to the previous node that is focusable without opening or closing a node.\n */\n protected handleUpAction(node: HTMLElement): void {\n if (this.focusPreviousSibling(node)) {\n return\n }\n this.focusFirstParent(node)\n }\n\n protected handleHomeAction(): void {\n const first = (this.shadowRoot as ShadowRoot).querySelector('ul')\n if (!first) {\n return\n }\n const children = Array.from(first.children) as HTMLElement[]\n for (const node of children) {\n if (this.isValidListItem(node)) {\n this.focusListItem(node)\n break\n }\n }\n }\n\n protected handleEndAction(): void {\n const first = (this.shadowRoot as ShadowRoot).querySelector('ul')\n if (!first) {\n return\n }\n const children = Array.from(first.children).reverse() as HTMLElement[]\n for (const node of children) {\n if (this.isValidListItem(node)) {\n this.focusListItem(node)\n break\n }\n }\n }\n\n /**\n *\n * @param contents The children contents.\n * @returns A predefined template for the outer list element.\n */\n protected renderOuterList(contents: TemplateResult | TemplateResult[] | string): TemplateResult {\n return html`\n <ul\n role=\"tree\"\n aria-multiselectable=\"false\"\n aria-labelledby=\"${this.label ? 'navigation-title' : nothing}\"\n @dblclick=\"${this.handleDoubleClick}\"\n @keydown=\"${this.handleKeydown}\"\n @dragstart=\"${this.handleItemDragStart}\"\n @dragend=\"${this.handleItemDragEnd}\"\n @dragover=\"${this.handleItemDragOver}\"\n @dragleave=\"${this.handleItemDragLeave}\"\n @drop=\"${this.handleItemDrop}\"\n class=\"root\"\n >\n ${contents}\n </ul>\n `\n }\n\n protected renderParentListItem(\n key: string,\n kind: string,\n label: string,\n children: TemplateResult | TemplateResult[] | string,\n opts: IListItemRenderOptions = {}\n ): TemplateResult {\n const { selected, focused: _focused, edited } = this\n const opened = this.opened.has(key)\n const classes = {\n 'parent-item': true,\n 'selected': selected === key,\n 'focused': _focused === key,\n opened,\n }\n return html`\n <li\n class=\"${classMap(classes)}\"\n role=\"treeitem\"\n aria-selected=\"false\"\n aria-expanded=\"${opened ? 'true' : 'false'}\"\n data-parent=\"${ifDefined(opts.parent)}\"\n data-root=\"${ifDefined(opts.root)}\"\n data-key=\"${key}\"\n data-kind=\"${kind}\"\n draggable=\"${opts.draggable ? 'true' : 'false'}\"\n aria-disabled=\"${opts.disabled ? 'true' : 'false'}\"\n >\n ${edited === key ? this.renderNameInput(key, kind, label) : this.renderParentListItemContent(label, opts)}\n <ul\n role=\"group\"\n id=\"group${key}\"\n data-parent=\"${ifDefined(opts.parent)}\"\n ?hidden=\"${!opened}\"\n aria-hidden=\"${opened ? 'false' : 'true'}\"\n >\n ${children}\n </ul>\n </li>\n `\n }\n\n protected renderParentListItemContent(label: string, opts: IListItemRenderOptions = {}): TemplateResult {\n return html`\n <div class=\"list-item-content parent-content\">\n <ui-icon icon=\"chevronRight\" class=\"group-toggle-icon\"></ui-icon>\n ${opts.parentIcon ? html`<ui-icon icon=\"${opts.parentIcon}\" class=\"object-icon\"></ui-icon>` : ''}\n <span class=\"label\" title=\"${label}\">${label}</span>\n </div>\n `\n }\n\n protected renderListItem(\n key: string,\n kind: string,\n label: string,\n content: TemplateResult | TemplateResult[] | string,\n opts: IListItemRenderOptions = {}\n ): TemplateResult {\n const { selected, focused, edited } = this\n if (edited === key) {\n const input = this.renderNameInput(key, kind, label)\n return html`\n <li\n role=\"treeitem\"\n aria-selected=\"false\"\n class=\"name-change-item\"\n data-parent=\"${ifDefined(opts.parent)}\"\n data-root=\"${ifDefined(opts.root)}\"\n data-key=\"${key}\"\n data-kind=\"${kind}\"\n >\n ${input}\n </li>\n `\n }\n const classes = {\n selected: selected === key,\n focused: focused === key,\n }\n return html`\n <li\n class=\"${classMap(classes)}\"\n role=\"treeitem\"\n aria-selected=\"false\"\n data-parent=\"${ifDefined(opts.parent)}\"\n data-root=\"${ifDefined(opts.root)}\"\n data-key=\"${key}\"\n data-kind=\"${kind}\"\n draggable=\"${opts.draggable ? 'true' : 'false'}\"\n aria-disabled=\"${opts.disabled ? 'true' : 'false'}\"\n >\n <div class=\"list-item-content\">${content}</div>\n </li>\n `\n }\n\n protected renderNameInput(key: string, kind: string, oldName?: string): TemplateResult {\n return html`\n <div class=\"name-change\" @click=\"${cancelEvent}\" @keydown=\"${cancelEvent}\" @dblclick=\"${cancelEvent}\">\n <input\n type=\"text\"\n .value=${oldName || ''}\n @keydown=\"${this.handleNameInputKeydown}\"\n data-key=\"${key}\"\n data-kind=\"${kind}\"\n />\n <ui-icon-button @click=\"${this.handleNameCommit}\" aria-label=\"Confirm name change\" class=\"name-commit-button\">\n <ui-icon icon=\"check\"></ui-icon>\n </ui-icon-button>\n </div>\n `\n }\n\n protected renderItemContent(icon: IconType, label: string): TemplateResult {\n return html`\n <ui-icon icon=\"${icon}\" class=\"object-icon\"></ui-icon>\n <span class=\"label\" title=\"${label}\">${label}</span>\n `\n }\n}\n"]}
|
|
@@ -12,6 +12,12 @@ export default class NavigationItem extends UiElement {
|
|
|
12
12
|
* @attribute
|
|
13
13
|
*/
|
|
14
14
|
accessor selected: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* When set, the navigation item is rendered as an icon-only button.
|
|
17
|
+
* The width of the button is set to 40px.
|
|
18
|
+
* @attribute
|
|
19
|
+
*/
|
|
20
|
+
accessor iconOnly: boolean;
|
|
15
21
|
/**
|
|
16
22
|
* Determines when the element has an icon in the "icon" slot.
|
|
17
23
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationItem.d.ts","sourceRoot":"","sources":["../../../../../src/elements/navigation/internals/NavigationItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAA;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEpD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAAS;IACnD,OAAgB,iBAAiB,EAAE,cAAc,CAGhD;IAED;;;OAGG;IACyC,QAAQ,CAAC,QAAQ,UAAQ;IAErE;;;OAGG;IACyC,QAAQ,CAAC,QAAQ,UAAQ;IAErE;;OAEG;IACM,SAAS,CAAC,QAAQ,CAAC,OAAO,UAAQ;IAE3C;;OAEG;IACH,SAAS,CAAC,oBAAoB,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI;cAK3B,MAAM,IAAI,cAAc;IAiB3C,SAAS,CAAC,UAAU,IAAI,cAAc;CAKvC"}
|
|
1
|
+
{"version":3,"file":"NavigationItem.d.ts","sourceRoot":"","sources":["../../../../../src/elements/navigation/internals/NavigationItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAA;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEpD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAAS;IACnD,OAAgB,iBAAiB,EAAE,cAAc,CAGhD;IAED;;;OAGG;IACyC,QAAQ,CAAC,QAAQ,UAAQ;IAErE;;;OAGG;IACyC,QAAQ,CAAC,QAAQ,UAAQ;IACrE;;;;OAIG;IACyC,QAAQ,CAAC,QAAQ,UAAQ;IAErE;;OAEG;IACM,SAAS,CAAC,QAAQ,CAAC,OAAO,UAAQ;IAE3C;;OAEG;IACH,SAAS,CAAC,oBAAoB,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI;cAK3B,MAAM,IAAI,cAAc;IAiB3C,SAAS,CAAC,UAAU,IAAI,cAAc;CAKvC"}
|
|
@@ -11,6 +11,9 @@ let NavigationItem = (() => {
|
|
|
11
11
|
let _selected_decorators;
|
|
12
12
|
let _selected_initializers = [];
|
|
13
13
|
let _selected_extraInitializers = [];
|
|
14
|
+
let _iconOnly_decorators;
|
|
15
|
+
let _iconOnly_initializers = [];
|
|
16
|
+
let _iconOnly_extraInitializers = [];
|
|
14
17
|
let _hasIcon_decorators;
|
|
15
18
|
let _hasIcon_initializers = [];
|
|
16
19
|
let _hasIcon_extraInitializers = [];
|
|
@@ -19,9 +22,11 @@ let NavigationItem = (() => {
|
|
|
19
22
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
20
23
|
_disabled_decorators = [property({ reflect: true, type: Boolean })];
|
|
21
24
|
_selected_decorators = [property({ reflect: true, type: Boolean })];
|
|
25
|
+
_iconOnly_decorators = [property({ reflect: true, type: Boolean })];
|
|
22
26
|
_hasIcon_decorators = [state()];
|
|
23
27
|
__esDecorate(this, null, _disabled_decorators, { kind: "accessor", name: "disabled", static: false, private: false, access: { has: obj => "disabled" in obj, get: obj => obj.disabled, set: (obj, value) => { obj.disabled = value; } }, metadata: _metadata }, _disabled_initializers, _disabled_extraInitializers);
|
|
24
28
|
__esDecorate(this, null, _selected_decorators, { kind: "accessor", name: "selected", static: false, private: false, access: { has: obj => "selected" in obj, get: obj => obj.selected, set: (obj, value) => { obj.selected = value; } }, metadata: _metadata }, _selected_initializers, _selected_extraInitializers);
|
|
29
|
+
__esDecorate(this, null, _iconOnly_decorators, { kind: "accessor", name: "iconOnly", static: false, private: false, access: { has: obj => "iconOnly" in obj, get: obj => obj.iconOnly, set: (obj, value) => { obj.iconOnly = value; } }, metadata: _metadata }, _iconOnly_initializers, _iconOnly_extraInitializers);
|
|
25
30
|
__esDecorate(this, null, _hasIcon_decorators, { kind: "accessor", name: "hasIcon", static: false, private: false, access: { has: obj => "hasIcon" in obj, get: obj => obj.hasIcon, set: (obj, value) => { obj.hasIcon = value; } }, metadata: _metadata }, _hasIcon_initializers, _hasIcon_extraInitializers);
|
|
26
31
|
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
27
32
|
}
|
|
@@ -43,7 +48,9 @@ let NavigationItem = (() => {
|
|
|
43
48
|
set disabled(value) { this.#disabled_accessor_storage = value; }
|
|
44
49
|
#selected_accessor_storage = (__runInitializers(this, _disabled_extraInitializers), __runInitializers(this, _selected_initializers, false
|
|
45
50
|
/**
|
|
46
|
-
*
|
|
51
|
+
* When set, the navigation item is rendered as an icon-only button.
|
|
52
|
+
* The width of the button is set to 40px.
|
|
53
|
+
* @attribute
|
|
47
54
|
*/
|
|
48
55
|
));
|
|
49
56
|
/**
|
|
@@ -52,7 +59,19 @@ let NavigationItem = (() => {
|
|
|
52
59
|
*/
|
|
53
60
|
get selected() { return this.#selected_accessor_storage; }
|
|
54
61
|
set selected(value) { this.#selected_accessor_storage = value; }
|
|
55
|
-
#
|
|
62
|
+
#iconOnly_accessor_storage = (__runInitializers(this, _selected_extraInitializers), __runInitializers(this, _iconOnly_initializers, false
|
|
63
|
+
/**
|
|
64
|
+
* Determines when the element has an icon in the "icon" slot.
|
|
65
|
+
*/
|
|
66
|
+
));
|
|
67
|
+
/**
|
|
68
|
+
* When set, the navigation item is rendered as an icon-only button.
|
|
69
|
+
* The width of the button is set to 40px.
|
|
70
|
+
* @attribute
|
|
71
|
+
*/
|
|
72
|
+
get iconOnly() { return this.#iconOnly_accessor_storage; }
|
|
73
|
+
set iconOnly(value) { this.#iconOnly_accessor_storage = value; }
|
|
74
|
+
#hasIcon_accessor_storage = (__runInitializers(this, _iconOnly_extraInitializers), __runInitializers(this, _hasIcon_initializers, false
|
|
56
75
|
/**
|
|
57
76
|
* Sets the `_hasIcon` state property when the "icon" slot change event is dispatched.
|
|
58
77
|
*/
|
|
@@ -72,16 +91,16 @@ let NavigationItem = (() => {
|
|
|
72
91
|
render() {
|
|
73
92
|
const { pressed = false } = this;
|
|
74
93
|
const containerClasses = classMap({
|
|
75
|
-
button: true,
|
|
76
|
-
icon: this.hasIcon,
|
|
77
|
-
pressed,
|
|
94
|
+
'button': true,
|
|
95
|
+
'icon': this.hasIcon,
|
|
96
|
+
'pressed': pressed,
|
|
97
|
+
'icon-only': this.iconOnly,
|
|
78
98
|
});
|
|
79
99
|
return html `
|
|
80
100
|
<button class="${containerClasses}" id="button">
|
|
81
101
|
<md-focus-ring part="focus-ring" for="button"></md-focus-ring>
|
|
82
102
|
<md-ripple></md-ripple>
|
|
83
|
-
${this.renderIcon()}
|
|
84
|
-
<slot></slot>
|
|
103
|
+
${this.renderIcon()}${this.iconOnly ? '' : html `<slot></slot>`}
|
|
85
104
|
</button>
|
|
86
105
|
`;
|
|
87
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationItem.js","sourceRoot":"","sources":["../../../../../src/elements/navigation/internals/NavigationItem.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,C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AK;QACrE;;;;WAIG;WALkE;QAJrE;;;WAGG;QACyC,IAAS,QAAQ,8CAAQ;QAAzB,IAAS,QAAQ,oDAAQ;QAMzB,oIAAoB,KAAK;QAErE;;WAEG;WAJkE;QALrE;;;;WAIG;QACyC,IAAS,QAAQ,8CAAQ;QAAzB,IAAS,QAAQ,oDAAQ;QAK5D,kIAA6B,KAAK;QAE3C;;WAEG;WAJwC;QAH3C;;WAEG;QACM,IAAmB,OAAO,6CAAQ;QAAlC,IAAmB,OAAO,mDAAQ;QAE3C;;WAEG;QACO,oBAAoB,CAAC,CAAQ;YACrC,MAAM,IAAI,GAAG,CAAC,CAAC,MAAyB,CAAA;YACxC,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,MAAM,CAAA;QAC9C,CAAC;QAEkB,MAAM;YACvB,MAAM,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,IAAI,CAAA;YAChC,MAAM,gBAAgB,GAAG,QAAQ,CAAC;gBAChC,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE,IAAI,CAAC,OAAO;gBACpB,SAAS,EAAE,OAAO;gBAClB,WAAW,EAAE,IAAI,CAAC,QAAQ;aAC3B,CAAC,CAAA;YACF,OAAO,IAAI,CAAA;uBACQ,gBAAgB;;;UAG7B,IAAI,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA,eAAe;;KAEjE,CAAA;QACH,CAAC;QAES,UAAU;YAClB,OAAO,IAAI,CAAA;wCACyB,IAAI,CAAC,oBAAoB;aACpD,CAAA;QACX,CAAC;;;;;;;AA1DH","sourcesContent":["import { html, TemplateResult } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { UiElement } from '../../../md/UiElement.js'\n\nexport default class NavigationItem extends UiElement {\n static override shadowRootOptions: ShadowRootInit = {\n mode: 'open',\n delegatesFocus: true,\n }\n\n /**\n * When set, the button is a disabled state.\n * @attribute\n */\n @property({ reflect: true, type: Boolean }) accessor disabled = false\n\n /**\n * Whether the navigation item is selected.\n * @attribute\n */\n @property({ reflect: true, type: Boolean }) accessor selected = false\n /**\n * When set, the navigation item is rendered as an icon-only button.\n * The width of the button is set to 40px.\n * @attribute\n */\n @property({ reflect: true, type: Boolean }) accessor iconOnly = false\n\n /**\n * Determines when the element has an icon in the \"icon\" slot.\n */\n @state() protected accessor hasIcon = false\n\n /**\n * Sets the `_hasIcon` state property when the \"icon\" slot change event is dispatched.\n */\n protected handleIconSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement\n this.hasIcon = !!slot.assignedNodes().length\n }\n\n protected override render(): TemplateResult {\n const { pressed = false } = this\n const containerClasses = classMap({\n 'button': true,\n 'icon': this.hasIcon,\n 'pressed': pressed,\n 'icon-only': this.iconOnly,\n })\n return html`\n <button class=\"${containerClasses}\" id=\"button\">\n <md-focus-ring part=\"focus-ring\" for=\"button\"></md-focus-ring>\n <md-ripple></md-ripple>\n ${this.renderIcon()}${this.iconOnly ? '' : html`<slot></slot>`}\n </button>\n `\n }\n\n protected renderIcon(): TemplateResult {\n return html`<span role=\"presentation\" class=\"icon\"\n ><slot name=\"icon\" @slotchange=\"${this.handleIconSlotChange}\"></slot\n ></span>`\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationItem.styles.d.ts","sourceRoot":"","sources":["../../../../../src/elements/navigation/internals/NavigationItem.styles.ts"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"NavigationItem.styles.d.ts","sourceRoot":"","sources":["../../../../../src/elements/navigation/internals/NavigationItem.styles.ts"],"names":[],"mappings":";AAEA,wBAwGC"}
|
|
@@ -27,6 +27,12 @@ export default css `
|
|
|
27
27
|
--_state-layer-padding-end: 24px;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
:host([iconOnly]) {
|
|
31
|
+
width: 40px;
|
|
32
|
+
--_state-layer-padding-start: 8px;
|
|
33
|
+
--_state-layer-padding-end: 8px;
|
|
34
|
+
}
|
|
35
|
+
|
|
30
36
|
:host([selected]) {
|
|
31
37
|
--_state-layer-color: var(--md-sys-color-secondary-container);
|
|
32
38
|
--_icon-color: var(--md-sys-color-on-secondary-container);
|
|
@@ -60,10 +66,15 @@ export default css `
|
|
|
60
66
|
--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity);
|
|
61
67
|
}
|
|
62
68
|
|
|
63
|
-
.button.icon {
|
|
69
|
+
.button.icon:not(.button.icon) {
|
|
64
70
|
--_state-layer-padding-start: 16px;
|
|
65
71
|
}
|
|
66
72
|
|
|
73
|
+
.button.icon-only {
|
|
74
|
+
gap: 0;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
}
|
|
77
|
+
|
|
67
78
|
.button:hover {
|
|
68
79
|
color: var(--_hover-icon-color);
|
|
69
80
|
}
|
|
@@ -76,6 +87,12 @@ export default css `
|
|
|
76
87
|
color: var(--_pressed-icon-color);
|
|
77
88
|
}
|
|
78
89
|
|
|
90
|
+
.icon {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
}
|
|
95
|
+
|
|
79
96
|
md-focus-ring {
|
|
80
97
|
--md-focus-ring-shape-start-start: var(--_state-layer-shape);
|
|
81
98
|
--md-focus-ring-shape-start-end: var(--_state-layer-shape);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationItem.styles.js","sourceRoot":"","sources":["../../../../../src/elements/navigation/internals/NavigationItem.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,eAAe,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"NavigationItem.styles.js","sourceRoot":"","sources":["../../../../../src/elements/navigation/internals/NavigationItem.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwGjB,CAAA","sourcesContent":["import { css } from 'lit'\n\nexport default css`\n :host {\n display: flex;\n outline: none;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n justify-content: center;\n height: var(--_state-layer-height);\n width: auto;\n user-select: none;\n\n --_focus-icon-color: var(--md-icon-button-focus-icon-color, var(--md-sys-color-on-surface-variant));\n --_hover-icon-color: var(--md-icon-button-hover-icon-color, var(--md-sys-color-on-surface-variant));\n --_hover-state-layer-color: var(--md-icon-button-hover-state-layer-color, var(--md-sys-color-on-surface-variant));\n --_hover-state-layer-opacity: var(--md-icon-button-hover-state-layer-opacity, 0.08);\n --_icon-color: var(--md-icon-button-icon-color, var(--md-sys-color-on-surface-variant));\n --_pressed-icon-color: var(--md-icon-button-pressed-icon-color, var(--md-sys-color-on-surface-variant));\n --_pressed-state-layer-color: var(\n --md-icon-button-pressed-state-layer-color,\n var(--md-sys-color-on-surface-variant)\n );\n --_pressed-state-layer-opacity: var(--md-icon-button-pressed-state-layer-opacity, 0.12);\n --_state-layer-shape: var(--md-icon-button-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));\n --_state-layer-height: 56px;\n --_state-layer-color: transparent;\n --_state-layer-padding-start: 24px;\n --_state-layer-padding-end: 24px;\n }\n\n :host([iconOnly]) {\n width: 40px;\n --_state-layer-padding-start: 8px;\n --_state-layer-padding-end: 8px;\n }\n\n :host([selected]) {\n --_state-layer-color: var(--md-sys-color-secondary-container);\n --_icon-color: var(--md-sys-color-on-secondary-container);\n }\n\n .button {\n color: var(--_icon-color);\n background: var(--_state-layer-color);\n place-items: center;\n border: none;\n box-sizing: border-box;\n cursor: pointer;\n display: flex;\n outline: none;\n padding: 0 var(--_state-layer-padding-end) 0 var(--_state-layer-padding-start);\n position: relative;\n text-decoration: none;\n user-select: none;\n z-index: 0;\n flex: 1;\n gap: 12px;\n border-radius: var(--_state-layer-shape);\n font-family: var(--md-sys-typescale-label-large-font);\n font-size: var(--md-sys-typescale-label-large-size);\n letter-spacing: var(--md-sys-typescale-label-large-tracking);\n line-height: var(--md-sys-typescale-label-large-height);\n font-weight: var(--md-sys-typescale-label-large-weight);\n --md-ripple-hover-color: var(--_hover-state-layer-color);\n --md-ripple-hover-opacity: var(--_hover-state-layer-opacity);\n --md-ripple-pressed-color: var(--_pressed-state-layer-color);\n --md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity);\n }\n\n .button.icon:not(.button.icon) {\n --_state-layer-padding-start: 16px;\n }\n\n .button.icon-only {\n gap: 0;\n justify-content: center;\n }\n\n .button:hover {\n color: var(--_hover-icon-color);\n }\n\n .button:focus {\n color: var(--_focus-icon-color);\n }\n\n .button:active {\n color: var(--_pressed-icon-color);\n }\n\n .icon {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n md-focus-ring {\n --md-focus-ring-shape-start-start: var(--_state-layer-shape);\n --md-focus-ring-shape-start-end: var(--_state-layer-shape);\n --md-focus-ring-shape-end-end: var(--_state-layer-shape);\n --md-focus-ring-shape-end-start: var(--_state-layer-shape);\n }\n\n md-ripple {\n border-radius: var(--_state-layer-shape);\n }\n`\n"]}
|
package/demo/elements/index.html
CHANGED
|
@@ -33,25 +33,28 @@
|
|
|
33
33
|
|
|
34
34
|
<dt><a href="currency/index.html">Currency picker</a></dt>
|
|
35
35
|
<dd>A component for selecting currencies with chips display.</dd>
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
<dt><a href="environment/index.html">Environment</a></dt>
|
|
38
38
|
<dd>The environment elements library.</dd>
|
|
39
39
|
|
|
40
40
|
<dt><a href="har/index.html">HAR utilities</a></dt>
|
|
41
41
|
<dd>Elements related to processing and visualizing HAR data.</dd>
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
<dt><a href="highlight/index.html">Highlight</a></dt>
|
|
44
44
|
<dd>The syntax highlighting library.</dd>
|
|
45
|
-
|
|
45
|
+
|
|
46
46
|
<dt><a href="http/index.html">HTTP</a></dt>
|
|
47
47
|
<dd>The HTTP UI library.</dd>
|
|
48
|
-
|
|
48
|
+
|
|
49
49
|
<dt><a href="http-client/index.html">HTTP Client</a></dt>
|
|
50
50
|
<dd>The HTTP Client UI library.</dd>
|
|
51
51
|
|
|
52
52
|
<dt><a href="mention-textarea/index.html">Mention Textarea</a></dt>
|
|
53
53
|
<dd>The mention-textarea component.</dd>
|
|
54
54
|
|
|
55
|
+
<dt><a href="navigation/navigation-item.html">Navigation Item</a></dt>
|
|
56
|
+
<dd>The navigation-item component.</dd>
|
|
57
|
+
|
|
55
58
|
<dt><a href="icons/index.html">Icons</a></dt>
|
|
56
59
|
<dd>The icons library.</dd>
|
|
57
60
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Navigation item Demo</title>
|
|
7
|
+
<link
|
|
8
|
+
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
|
|
9
|
+
rel="stylesheet"
|
|
10
|
+
/>
|
|
11
|
+
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" rel="stylesheet" />
|
|
12
|
+
<link href="../../../src/styles/m3/tokens.css" rel="stylesheet" type="text/css" />
|
|
13
|
+
<link href="../../../src/styles/m3/theme.css" rel="stylesheet" type="text/css" />
|
|
14
|
+
<link href="../../page.css" rel="stylesheet" type="text/css" />
|
|
15
|
+
<style>
|
|
16
|
+
.nav-rail,
|
|
17
|
+
.nav-bar {
|
|
18
|
+
padding: 12px;
|
|
19
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
20
|
+
border-radius: 12px;
|
|
21
|
+
width: fit-content;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.nav-rail {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
gap: 12px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.nav-bar {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: row;
|
|
33
|
+
gap: 8px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.demo-row {
|
|
37
|
+
gap: 16px;
|
|
38
|
+
}
|
|
39
|
+
</style>
|
|
40
|
+
</head>
|
|
41
|
+
<body data-gr-ext-disabled="next">
|
|
42
|
+
<div id="app"></div>
|
|
43
|
+
<script type="module" src="/.tmp/demo/elements/navigation/navigation-item.js"></script>
|
|
44
|
+
</body>
|
|
45
|
+
</html>
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { html, TemplateResult } from 'lit'
|
|
2
|
+
import { DemoPage } from '../../../src/demo/DemoPage.js'
|
|
3
|
+
import { reactive } from '../../../src/decorators/index.js'
|
|
4
|
+
|
|
5
|
+
import '../../../src/elements/navigation/ui-navigation-item.js'
|
|
6
|
+
import '../../../src/md/icons/ui-icon.js'
|
|
7
|
+
import '../../../src/md/checkbox/ui-checkbox.js'
|
|
8
|
+
|
|
9
|
+
class ComponentDemoPage extends DemoPage {
|
|
10
|
+
@reactive()
|
|
11
|
+
protected accessor selected = false
|
|
12
|
+
|
|
13
|
+
@reactive()
|
|
14
|
+
protected accessor disabled = false
|
|
15
|
+
|
|
16
|
+
@reactive()
|
|
17
|
+
protected accessor iconOnly = false
|
|
18
|
+
|
|
19
|
+
@reactive()
|
|
20
|
+
protected accessor withIcon = true
|
|
21
|
+
|
|
22
|
+
constructor() {
|
|
23
|
+
super()
|
|
24
|
+
this.componentName = '<ui-navigation-item>'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
override contentTemplate(): TemplateResult {
|
|
28
|
+
return html`
|
|
29
|
+
<section class="demo-section">
|
|
30
|
+
<h3>Interactive demo</h3>
|
|
31
|
+
<div class="demo-row">
|
|
32
|
+
<div class="nav-rail">
|
|
33
|
+
<ui-navigation-item ?selected="${this.selected}" ?disabled="${this.disabled}" ?iconOnly="${this.iconOnly}">
|
|
34
|
+
${this.withIcon ? html`<ui-icon slot="icon">inbox</ui-icon>` : ''} ${this.iconOnly ? '' : 'Inbox'}
|
|
35
|
+
</ui-navigation-item>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="demo-row">
|
|
39
|
+
<ui-checkbox
|
|
40
|
+
id="selected"
|
|
41
|
+
name="selected"
|
|
42
|
+
@change="${this._toggleBooleanOption}"
|
|
43
|
+
.checked=${this.selected}
|
|
44
|
+
></ui-checkbox>
|
|
45
|
+
<label for="selected">Selected</label>
|
|
46
|
+
<ui-checkbox
|
|
47
|
+
id="disabled"
|
|
48
|
+
name="disabled"
|
|
49
|
+
@change="${this._toggleBooleanOption}"
|
|
50
|
+
.checked=${this.disabled}
|
|
51
|
+
></ui-checkbox>
|
|
52
|
+
<label for="disabled">Disabled</label>
|
|
53
|
+
<ui-checkbox
|
|
54
|
+
id="iconOnly"
|
|
55
|
+
name="iconOnly"
|
|
56
|
+
@change="${this._toggleBooleanOption}"
|
|
57
|
+
.checked=${this.iconOnly}
|
|
58
|
+
></ui-checkbox>
|
|
59
|
+
<label for="iconOnly">Icon only</label>
|
|
60
|
+
<ui-checkbox
|
|
61
|
+
id="withIcon"
|
|
62
|
+
name="withIcon"
|
|
63
|
+
@change="${this._toggleBooleanOption}"
|
|
64
|
+
.checked=${this.withIcon}
|
|
65
|
+
></ui-checkbox>
|
|
66
|
+
<label for="withIcon">With icon</label>
|
|
67
|
+
</div>
|
|
68
|
+
</section>
|
|
69
|
+
|
|
70
|
+
<section class="demo-section">
|
|
71
|
+
<h3>Navigation Rail</h3>
|
|
72
|
+
<div class="demo-row">
|
|
73
|
+
<div class="nav-rail">
|
|
74
|
+
<ui-navigation-item selected>
|
|
75
|
+
<ui-icon slot="icon">inbox</ui-icon>
|
|
76
|
+
Inbox
|
|
77
|
+
</ui-navigation-item>
|
|
78
|
+
<ui-navigation-item>
|
|
79
|
+
<ui-icon slot="icon">star</ui-icon>
|
|
80
|
+
Starred
|
|
81
|
+
</ui-navigation-item>
|
|
82
|
+
<ui-navigation-item>
|
|
83
|
+
<ui-icon slot="icon">send</ui-icon>
|
|
84
|
+
Sent
|
|
85
|
+
</ui-navigation-item>
|
|
86
|
+
<ui-navigation-item disabled>
|
|
87
|
+
<ui-icon slot="icon">drafts</ui-icon>
|
|
88
|
+
Drafts
|
|
89
|
+
</ui-navigation-item>
|
|
90
|
+
</div>
|
|
91
|
+
<div class="nav-rail">
|
|
92
|
+
<ui-navigation-item iconOnly selected>
|
|
93
|
+
<ui-icon slot="icon">inbox</ui-icon>
|
|
94
|
+
</ui-navigation-item>
|
|
95
|
+
<ui-navigation-item iconOnly>
|
|
96
|
+
<ui-icon slot="icon">star</ui-icon>
|
|
97
|
+
</ui-navigation-item>
|
|
98
|
+
<ui-navigation-item iconOnly>
|
|
99
|
+
<ui-icon slot="icon">send</ui-icon>
|
|
100
|
+
</ui-navigation-item>
|
|
101
|
+
<ui-navigation-item iconOnly disabled>
|
|
102
|
+
<ui-icon slot="icon">drafts</ui-icon>
|
|
103
|
+
</ui-navigation-item>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</section>
|
|
107
|
+
`
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const instance = new ComponentDemoPage()
|
|
112
|
+
instance.render()
|
package/package.json
CHANGED
|
@@ -1108,12 +1108,7 @@ export default class AppNavigation extends ApiElement {
|
|
|
1108
1108
|
data-key="${key}"
|
|
1109
1109
|
data-kind="${kind}"
|
|
1110
1110
|
/>
|
|
1111
|
-
<ui-icon-button
|
|
1112
|
-
@click="${this.handleNameCommit}"
|
|
1113
|
-
aria-label="Confirm name change"
|
|
1114
|
-
class="name-commit-button"
|
|
1115
|
-
type="standard"
|
|
1116
|
-
>
|
|
1111
|
+
<ui-icon-button @click="${this.handleNameCommit}" aria-label="Confirm name change" class="name-commit-button">
|
|
1117
1112
|
<ui-icon icon="check"></ui-icon>
|
|
1118
1113
|
</ui-icon-button>
|
|
1119
1114
|
</div>
|
|
@@ -28,6 +28,12 @@ export default css`
|
|
|
28
28
|
--_state-layer-padding-end: 24px;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
:host([iconOnly]) {
|
|
32
|
+
width: 40px;
|
|
33
|
+
--_state-layer-padding-start: 8px;
|
|
34
|
+
--_state-layer-padding-end: 8px;
|
|
35
|
+
}
|
|
36
|
+
|
|
31
37
|
:host([selected]) {
|
|
32
38
|
--_state-layer-color: var(--md-sys-color-secondary-container);
|
|
33
39
|
--_icon-color: var(--md-sys-color-on-secondary-container);
|
|
@@ -61,10 +67,15 @@ export default css`
|
|
|
61
67
|
--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity);
|
|
62
68
|
}
|
|
63
69
|
|
|
64
|
-
.button.icon {
|
|
70
|
+
.button.icon:not(.button.icon) {
|
|
65
71
|
--_state-layer-padding-start: 16px;
|
|
66
72
|
}
|
|
67
73
|
|
|
74
|
+
.button.icon-only {
|
|
75
|
+
gap: 0;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
}
|
|
78
|
+
|
|
68
79
|
.button:hover {
|
|
69
80
|
color: var(--_hover-icon-color);
|
|
70
81
|
}
|
|
@@ -77,6 +88,12 @@ export default css`
|
|
|
77
88
|
color: var(--_pressed-icon-color);
|
|
78
89
|
}
|
|
79
90
|
|
|
91
|
+
.icon {
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
}
|
|
96
|
+
|
|
80
97
|
md-focus-ring {
|
|
81
98
|
--md-focus-ring-shape-start-start: var(--_state-layer-shape);
|
|
82
99
|
--md-focus-ring-shape-start-end: var(--_state-layer-shape);
|
|
@@ -20,6 +20,12 @@ export default class NavigationItem extends UiElement {
|
|
|
20
20
|
* @attribute
|
|
21
21
|
*/
|
|
22
22
|
@property({ reflect: true, type: Boolean }) accessor selected = false
|
|
23
|
+
/**
|
|
24
|
+
* When set, the navigation item is rendered as an icon-only button.
|
|
25
|
+
* The width of the button is set to 40px.
|
|
26
|
+
* @attribute
|
|
27
|
+
*/
|
|
28
|
+
@property({ reflect: true, type: Boolean }) accessor iconOnly = false
|
|
23
29
|
|
|
24
30
|
/**
|
|
25
31
|
* Determines when the element has an icon in the "icon" slot.
|
|
@@ -37,16 +43,16 @@ export default class NavigationItem extends UiElement {
|
|
|
37
43
|
protected override render(): TemplateResult {
|
|
38
44
|
const { pressed = false } = this
|
|
39
45
|
const containerClasses = classMap({
|
|
40
|
-
button: true,
|
|
41
|
-
icon: this.hasIcon,
|
|
42
|
-
pressed,
|
|
46
|
+
'button': true,
|
|
47
|
+
'icon': this.hasIcon,
|
|
48
|
+
'pressed': pressed,
|
|
49
|
+
'icon-only': this.iconOnly,
|
|
43
50
|
})
|
|
44
51
|
return html`
|
|
45
52
|
<button class="${containerClasses}" id="button">
|
|
46
53
|
<md-focus-ring part="focus-ring" for="button"></md-focus-ring>
|
|
47
54
|
<md-ripple></md-ripple>
|
|
48
|
-
${this.renderIcon()}
|
|
49
|
-
<slot></slot>
|
|
55
|
+
${this.renderIcon()}${this.iconOnly ? '' : html`<slot></slot>`}
|
|
50
56
|
</button>
|
|
51
57
|
`
|
|
52
58
|
}
|