@api-client/ui 0.0.11 → 0.0.13
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/.eslintrc +8 -0
- package/demo/elements/authorization/cc.ts +56 -27
- package/demo/elements/index.html +3 -0
- package/demo/elements/store/file-picker.html +15 -0
- package/demo/elements/store/file-picker.ts +134 -0
- package/demo/elements/store/index.html +19 -0
- package/demo/store/StorePlugin.js +1 -0
- package/dist/bindings/base/FileBindings.d.ts +4 -0
- package/dist/bindings/base/FileBindings.d.ts.map +1 -1
- package/dist/bindings/base/FileBindings.js +21 -1
- package/dist/bindings/base/FileBindings.js.map +1 -1
- package/dist/bindings/base/StoreBindings.d.ts +6 -17
- package/dist/bindings/base/StoreBindings.d.ts.map +1 -1
- package/dist/bindings/base/StoreBindings.js +15 -60
- package/dist/bindings/base/StoreBindings.js.map +1 -1
- package/dist/bindings/web/WebFileBindings.js +1 -1
- package/dist/bindings/web/WebFileBindings.js.map +1 -1
- package/dist/define/http/certificate-add.d.ts +9 -0
- package/dist/define/http/certificate-add.d.ts.map +1 -0
- package/dist/define/http/certificate-add.js +10 -0
- package/dist/define/http/certificate-add.js.map +1 -0
- package/dist/define/store/file-picker.d.ts +9 -0
- package/dist/define/store/file-picker.d.ts.map +1 -0
- package/dist/define/store/file-picker.js +10 -0
- package/dist/define/store/file-picker.js.map +1 -0
- package/dist/define/{files → store}/share-file.d.ts +1 -1
- package/dist/define/store/share-file.d.ts.map +1 -0
- package/dist/define/{files → store}/share-file.js +2 -2
- package/dist/define/store/share-file.js.map +1 -0
- package/dist/define/ui/ui-segmented-button-set.d.ts +1 -1
- package/dist/define/ui/ui-segmented-button-set.d.ts.map +1 -1
- package/dist/define/ui/ui-segmented-button-set.js.map +1 -1
- package/dist/elements/authorization/ui/CC.styles.d.ts.map +1 -1
- package/dist/elements/authorization/ui/CC.styles.js +4 -9
- package/dist/elements/authorization/ui/CC.styles.js.map +1 -1
- package/dist/elements/authorization/ui/CcAuthorization.d.ts +14 -29
- package/dist/elements/authorization/ui/CcAuthorization.d.ts.map +1 -1
- package/dist/elements/authorization/ui/CcAuthorization.js +67 -158
- package/dist/elements/authorization/ui/CcAuthorization.js.map +1 -1
- package/dist/elements/http/CertificateAdd.element.d.ts +91 -0
- package/dist/elements/http/CertificateAdd.element.d.ts.map +1 -0
- package/dist/elements/http/CertificateAdd.element.js +389 -0
- package/dist/elements/http/CertificateAdd.element.js.map +1 -0
- package/dist/elements/http/CertificateAdd.styles.d.ts +3 -0
- package/dist/elements/http/CertificateAdd.styles.d.ts.map +1 -0
- package/dist/elements/http/CertificateAdd.styles.js +61 -0
- package/dist/elements/http/CertificateAdd.styles.js.map +1 -0
- package/dist/elements/project/ProjectRunReport.d.ts +2 -1
- package/dist/elements/project/ProjectRunReport.d.ts.map +1 -1
- package/dist/elements/project/ProjectRunReport.js.map +1 -1
- package/dist/elements/store/FilePicker.element.d.ts +87 -0
- package/dist/elements/store/FilePicker.element.d.ts.map +1 -0
- package/dist/elements/store/FilePicker.element.js +263 -0
- package/dist/elements/store/FilePicker.element.js.map +1 -0
- package/dist/elements/store/FilePicker.styles.d.ts +3 -0
- package/dist/elements/store/FilePicker.styles.d.ts.map +1 -0
- package/dist/elements/store/FilePicker.styles.js +73 -0
- package/dist/elements/store/FilePicker.styles.js.map +1 -0
- package/dist/elements/store/FilesLib.d.ts +10 -0
- package/dist/elements/store/FilesLib.d.ts.map +1 -0
- package/dist/elements/store/FilesLib.js +38 -0
- package/dist/elements/store/FilesLib.js.map +1 -0
- package/dist/elements/{files/ShareFile.d.ts → store/ShareFile.element.d.ts} +1 -1
- package/dist/elements/store/ShareFile.element.d.ts.map +1 -0
- package/dist/elements/{files/ShareFile.js → store/ShareFile.element.js} +1 -1
- package/dist/elements/store/ShareFile.element.js.map +1 -0
- package/dist/elements/store/ShareFile.styles.d.ts.map +1 -0
- package/dist/elements/{files → store}/ShareFile.styles.js.map +1 -1
- package/dist/events/EventTypes.d.ts +7 -7
- package/dist/events/EventTypes.d.ts.map +1 -1
- package/dist/events/EventTypes.js +8 -7
- package/dist/events/EventTypes.js.map +1 -1
- package/dist/events/Events.d.ts +7 -1
- package/dist/events/Events.d.ts.map +1 -1
- package/dist/events/Events.js +2 -0
- package/dist/events/Events.js.map +1 -1
- package/dist/events/FilesystemEvents.d.ts +8 -0
- package/dist/events/FilesystemEvents.d.ts.map +1 -0
- package/dist/events/FilesystemEvents.js +59 -0
- package/dist/events/FilesystemEvents.js.map +1 -0
- package/dist/events/HttpClientEvents.d.ts +0 -2
- package/dist/events/HttpClientEvents.d.ts.map +1 -1
- package/dist/events/HttpClientEvents.js +0 -2
- package/dist/events/HttpClientEvents.js.map +1 -1
- package/dist/events/StoreEvents.d.ts +8 -1
- package/dist/events/StoreEvents.d.ts.map +1 -1
- package/dist/events/StoreEvents.js +19 -0
- package/dist/events/StoreEvents.js.map +1 -1
- package/dist/http-client/idb/Arc18DataUpgrade.d.ts +0 -8
- package/dist/http-client/idb/Arc18DataUpgrade.d.ts.map +1 -1
- package/dist/http-client/idb/Arc18DataUpgrade.js +11 -206
- package/dist/http-client/idb/Arc18DataUpgrade.js.map +1 -1
- package/dist/http-client/store/StoreBroadcast.d.ts +0 -5
- package/dist/http-client/store/StoreBroadcast.d.ts.map +1 -1
- package/dist/http-client/store/StoreBroadcast.js +0 -7
- package/dist/http-client/store/StoreBroadcast.js.map +1 -1
- package/dist/lib/files/FileUtils.d.ts +9 -0
- package/dist/lib/files/FileUtils.d.ts.map +1 -0
- package/dist/lib/files/FileUtils.js +13 -0
- package/dist/lib/files/FileUtils.js.map +1 -0
- package/dist/mixins/RouteMixin.d.ts +4 -0
- package/dist/mixins/RouteMixin.d.ts.map +1 -1
- package/dist/mixins/RouteMixin.js +1 -0
- package/dist/mixins/RouteMixin.js.map +1 -1
- package/dist/pages/ApplicationScreen.d.ts +1 -1
- package/dist/pages/ApplicationScreen.d.ts.map +1 -1
- package/dist/pages/ApplicationScreen.js +4 -2
- package/dist/pages/ApplicationScreen.js.map +1 -1
- package/dist/pages/api-client/ApiClient.screen.d.ts +4 -6
- package/dist/pages/api-client/ApiClient.screen.d.ts.map +1 -1
- package/dist/pages/api-client/ApiClient.screen.js +39 -31
- package/dist/pages/api-client/ApiClient.screen.js.map +1 -1
- package/dist/pages/api-client/ApiClient.styles.d.ts.map +1 -1
- package/dist/pages/api-client/ApiClient.styles.js +0 -12
- package/dist/pages/api-client/ApiClient.styles.js.map +1 -1
- package/dist/pages/api-client/Authenticate.screen.d.ts +1 -1
- package/dist/pages/api-client/Authenticate.screen.d.ts.map +1 -1
- package/dist/pages/api-client/Authenticate.screen.js +2 -2
- package/dist/pages/api-client/Authenticate.screen.js.map +1 -1
- package/dist/pages/api-client/pages/Files.page.d.ts +6 -35
- package/dist/pages/api-client/pages/Files.page.d.ts.map +1 -1
- package/dist/pages/api-client/pages/Files.page.js +45 -141
- package/dist/pages/api-client/pages/Files.page.js.map +1 -1
- package/dist/pages/api-client/pages/Shared.page.d.ts +1 -5
- package/dist/pages/api-client/pages/Shared.page.d.ts.map +1 -1
- package/dist/pages/api-client/pages/Shared.page.js +1 -40
- package/dist/pages/api-client/pages/Shared.page.js.map +1 -1
- package/dist/pages/demo/DemoPage.d.ts +7 -0
- package/dist/pages/demo/DemoPage.d.ts.map +1 -1
- package/dist/pages/demo/DemoPage.js +14 -0
- package/dist/pages/demo/DemoPage.js.map +1 -1
- package/dist/store/FileSystem.d.ts +90 -0
- package/dist/store/FileSystem.d.ts.map +1 -0
- package/dist/store/FileSystem.js +260 -0
- package/dist/store/FileSystem.js.map +1 -0
- package/dist/styles/global-styles.d.ts.map +1 -1
- package/dist/styles/global-styles.js +7 -0
- package/dist/styles/global-styles.js.map +1 -1
- package/dist/ui/button/SegmentedButtonsSet.d.ts +14 -0
- package/dist/ui/button/SegmentedButtonsSet.d.ts.map +1 -1
- package/dist/ui/button/SegmentedButtonsSet.js.map +1 -1
- package/dist/ui/icons/Icons.d.ts +2 -1
- package/dist/ui/icons/Icons.d.ts.map +1 -1
- package/dist/ui/icons/Icons.js +1 -0
- package/dist/ui/icons/Icons.js.map +1 -1
- package/dist/ui/list/UiDropdownList.d.ts +9 -1
- package/dist/ui/list/UiDropdownList.d.ts.map +1 -1
- package/dist/ui/list/UiDropdownList.js +39 -17
- package/dist/ui/list/UiDropdownList.js.map +1 -1
- package/dist/ui/list/UiList.d.ts +6 -1
- package/dist/ui/list/UiList.d.ts.map +1 -1
- package/dist/ui/list/UiList.js +24 -9
- package/dist/ui/list/UiList.js.map +1 -1
- package/dist/ui/notification/SnackNotifications.d.ts +1 -0
- package/dist/ui/notification/SnackNotifications.d.ts.map +1 -1
- package/dist/ui/notification/SnackNotifications.js +7 -0
- package/dist/ui/notification/SnackNotifications.js.map +1 -1
- package/dist/ui/table/DataTable.d.ts +4 -0
- package/dist/ui/table/DataTable.d.ts.map +1 -1
- package/dist/ui/table/DataTable.js +23 -1
- package/dist/ui/table/DataTable.js.map +1 -1
- package/package.json +1 -1
- package/src/bindings/base/FileBindings.ts +25 -1
- package/src/bindings/base/StoreBindings.ts +16 -73
- package/src/bindings/web/WebFileBindings.ts +1 -1
- package/src/define/http/certificate-add.ts +12 -0
- package/src/define/store/file-picker.ts +12 -0
- package/src/define/{files → store}/share-file.ts +2 -2
- package/src/define/ui/ui-segmented-button-set.ts +1 -1
- package/src/elements/authorization/ui/CC.styles.ts +4 -9
- package/src/elements/authorization/ui/CcAuthorization.ts +67 -167
- package/src/elements/http/CertificateAdd.element.ts +443 -0
- package/src/elements/http/CertificateAdd.styles.ts +61 -0
- package/src/elements/project/ProjectRunReport.ts +2 -1
- package/src/elements/store/FilePicker.element.ts +297 -0
- package/src/elements/store/FilePicker.styles.ts +73 -0
- package/src/elements/store/FilesLib.ts +32 -0
- package/src/events/EventTypes.ts +8 -7
- package/src/events/Events.ts +2 -0
- package/src/events/FilesystemEvents.ts +63 -0
- package/src/events/HttpClientEvents.ts +0 -2
- package/src/events/StoreEvents.ts +21 -1
- package/src/http-client/idb/Arc18DataUpgrade.ts +84 -84
- package/src/http-client/store/StoreBroadcast.ts +0 -8
- package/src/lib/files/FileUtils.ts +12 -0
- package/src/mixins/RouteMixin.ts +8 -1
- package/src/pages/ApplicationScreen.ts +5 -3
- package/src/pages/api-client/ApiClient.screen.ts +42 -33
- package/src/pages/api-client/ApiClient.styles.ts +0 -12
- package/src/pages/api-client/Authenticate.screen.ts +2 -2
- package/src/pages/api-client/pages/Files.page.ts +48 -164
- package/src/pages/api-client/pages/Shared.page.ts +2 -40
- package/src/pages/demo/DemoPage.ts +17 -0
- package/src/store/FileSystem.ts +325 -0
- package/src/styles/global-styles.ts +7 -0
- package/src/ui/button/SegmentedButtonsSet.ts +16 -1
- package/src/ui/icons/Icons.ts +2 -1
- package/src/ui/list/UiDropdownList.ts +44 -17
- package/src/ui/list/UiList.ts +26 -10
- package/src/ui/notification/SnackNotifications.ts +8 -0
- package/src/ui/table/DataTable.ts +29 -3
- package/test/elements/http/BodyFormdataEditorElement.test.ts +458 -454
- package/test/elements/http/BodyMultipartEditorElement.test.ts +609 -605
- package/test/elements/http/BodyRawEditorElement.test.ts +60 -56
- package/test/elements/http/CertificateAdd.test.ts +430 -0
- package/test/elements/store/FilePicker.test.ts +241 -0
- package/test/env.js +3 -0
- package/test/events/EventTypes.test.ts +0 -22
- package/test/helpers/StoreHelper.ts +390 -0
- package/test/helpers/UiMock.ts +19 -2
- package/tsconfig.eslint.json +3 -1
- package/web-test-runner.config.mjs +50 -3
- package/dist/define/files/share-file.d.ts.map +0 -1
- package/dist/define/files/share-file.js.map +0 -1
- package/dist/elements/files/ShareFile.d.ts.map +0 -1
- package/dist/elements/files/ShareFile.js.map +0 -1
- package/dist/elements/files/ShareFile.styles.d.ts.map +0 -1
- package/dist/events/http-client/models/CertificatesEvents.d.ts +0 -12
- package/dist/events/http-client/models/CertificatesEvents.d.ts.map +0 -1
- package/dist/events/http-client/models/CertificatesEvents.js +0 -18
- package/dist/events/http-client/models/CertificatesEvents.js.map +0 -1
- package/dist/http-client/idb/AuthDataModel.d.ts +0 -60
- package/dist/http-client/idb/AuthDataModel.d.ts.map +0 -1
- package/dist/http-client/idb/AuthDataModel.js +0 -150
- package/dist/http-client/idb/AuthDataModel.js.map +0 -1
- package/dist/http-client/idb/HostsModel.d.ts +0 -25
- package/dist/http-client/idb/HostsModel.d.ts.map +0 -1
- package/dist/http-client/idb/HostsModel.js +0 -82
- package/dist/http-client/idb/HostsModel.js.map +0 -1
- package/dist/http-client/idb/LegacyMockedStore.d.ts +0 -214
- package/dist/http-client/idb/LegacyMockedStore.d.ts.map +0 -1
- package/dist/http-client/idb/LegacyMockedStore.js +0 -486
- package/dist/http-client/idb/LegacyMockedStore.js.map +0 -1
- package/src/events/http-client/models/CertificatesEvents.ts +0 -23
- package/src/http-client/idb/AuthDataModel.ts +0 -175
- package/src/http-client/idb/HostsModel.ts +0 -125
- package/src/http-client/idb/LegacyMockedStore.ts +0 -544
- package/test/apic-ui.test.ts +0 -31
- /package/dist/elements/{files → store}/ShareFile.styles.d.ts +0 -0
- /package/dist/elements/{files → store}/ShareFile.styles.js +0 -0
- /package/src/elements/{files/ShareFile.ts → store/ShareFile.element.ts} +0 -0
- /package/src/elements/{files → store}/ShareFile.styles.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedButtonsSet.js","sourceRoot":"","sources":["../../../src/ui/button/SegmentedButtonsSet.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"SegmentedButtonsSet.js","sourceRoot":"","sources":["../../../src/ui/button/SegmentedButtonsSet.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAC3C,OAAO,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CAAC,OAAO,CAAC,KAAK,CAAC;gBAC3B,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ;gBACtC,KAAK;aACN;YACD,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC,CAAC;IACN,CAAC;IAEQ,MAAM;QACb,OAAO,IAAI,CAAA,eAAe,CAAC;IAC7B,CAAC;CACF;AAjF8B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wDAAqB;AAEP;IAAzC,qBAAqB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDAA6B","sourcesContent":["import { html, TemplateResult } from \"lit\";\nimport { property, queryAssignedElements } from \"lit/decorators.js\";\nimport { UiElement } from \"../UiElement.js\";\nimport SegmentedButton from \"./SegmentedButton.js\";\n\nexport interface ISegmentedButtonSelectionDetail {\n /**\n * A reference to the selected button.\n */\n button: SegmentedButton;\n /**\n * Whether the button is selected.\n */\n selected: boolean;\n /**\n * The index of the selected button.\n */\n index: number;\n}\n\n/**\n * @fires select - When button's selection change.\n */\nexport default class SegmentedButtonsSet extends UiElement {\n disabled = false;\n\n /**\n * Whether multiple buttons can be selected at once.\n * @attribute\n */\n @property({ type: Boolean }) multiselect = false;\n\n @queryAssignedElements({ flatten: true }) buttons!: SegmentedButton[];\n\n constructor() {\n super();\n this.addEventListener('trigger', this.handleButtonTrigger.bind(this));\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.setAttribute('role', 'group');\n }\n\n isButtonDisabled(index: number): boolean {\n if (this.isOutOfBounds(index)) return false;\n return this.buttons[index].disabled;\n }\n\n setButtonDisabled(index: number, disabled: boolean): void {\n if (this.isOutOfBounds(index)) return;\n this.buttons[index].disabled = disabled;\n }\n\n isButtonSelected(index: number): boolean {\n if (this.isOutOfBounds(index)) return false;\n return this.buttons[index].selected;\n }\n\n setButtonSelected(index: number, selected: boolean): void {\n // Ignore out-of-index values.\n if (this.isOutOfBounds(index)) return;\n // Ignore disabled buttons.\n if (this.isButtonDisabled(index)) return;\n\n if (this.multiselect) {\n this.buttons[index].selected = selected;\n this.dispatchSelected(index);\n return;\n }\n\n // Single-select segmented buttons are not unselectable.\n if (!selected) return;\n\n this.buttons[index].selected = true;\n this.dispatchSelected(index);\n // Deselect all other buttons for single-select.\n for (let i = 0; i < this.buttons.length; i++) {\n if (i === index) continue;\n this.buttons[i].selected = false;\n }\n }\n\n private handleButtonTrigger(e: Event): void {\n const index = this.buttons.indexOf(e.target as SegmentedButton);\n this.toggleSelection(index);\n }\n\n private toggleSelection(index: number): void {\n this.setButtonSelected(index, !this.buttons[index].selected);\n }\n\n private isOutOfBounds(index: number): boolean {\n return index < 0 || index >= this.buttons.length;\n }\n\n private dispatchSelected(index: number): void {\n this.dispatchEvent(new CustomEvent<ISegmentedButtonSelectionDetail>('select', {\n detail: {\n button: this.buttons[index],\n selected: this.buttons[index].selected,\n index,\n },\n bubbles: true,\n composed: true\n }));\n }\n\n override render(): TemplateResult {\n return html`<slot></slot>`;\n }\n}\n"]}
|
package/dist/ui/icons/Icons.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { SVGTemplateResult } from 'lit';
|
|
|
5
5
|
* @returns Complete SVG icon definition
|
|
6
6
|
*/
|
|
7
7
|
export declare const iconWrapper: (tpl: SVGTemplateResult, width?: number, height?: number, top?: number, left?: number) => SVGTemplateResult;
|
|
8
|
-
export type IconType = 'add' | 'api' | 'apps' | 'arrowBack' | 'arrowDropDown' | 'cancel' | 'cancelFilled' | 'check' | 'checkBox' | 'checkBoxBlank' | 'checkIndeterminate' | 'chevronLeft' | 'chevronRight' | 'close' | 'cloud' | 'cloudFilled' | 'collectionsBookmark' | 'deleteFile' | 'deleteOutline' | 'edit' | 'environment' | 'expandMore' | 'fileDownload' | 'folder' | 'folderFilled' | 'folderShared' | 'help' | 'history' | 'info' | 'key' | 'menu' | 'leaderBoard' | 'moreVert' | 'openInNew' | 'personAdd' | 'playArrow' | 'project' | 'remove' | 'rename' | 'request' | 'restoreFromTrash' | 'save' | 'schema' | 'schemaEntity' | 'schemaModel' | 'schemaNamespace' | 'search' | 'send' | 'settings' | 'space' | 'taskAlt' | 'timeline' | 'tune' | 'viewGrid' | 'viewList' | 'visibility' | 'visibilityOff' | 'warning';
|
|
8
|
+
export type IconType = 'add' | 'api' | 'apps' | 'arrowBack' | 'arrowDropDown' | 'cancel' | 'cancelFilled' | 'certificate' | 'check' | 'checkBox' | 'checkBoxBlank' | 'checkIndeterminate' | 'chevronLeft' | 'chevronRight' | 'close' | 'cloud' | 'cloudFilled' | 'collectionsBookmark' | 'deleteFile' | 'deleteOutline' | 'edit' | 'environment' | 'expandMore' | 'fileDownload' | 'folder' | 'folderFilled' | 'folderShared' | 'help' | 'history' | 'info' | 'key' | 'menu' | 'leaderBoard' | 'moreVert' | 'openInNew' | 'personAdd' | 'playArrow' | 'project' | 'remove' | 'rename' | 'request' | 'restoreFromTrash' | 'save' | 'schema' | 'schemaEntity' | 'schemaModel' | 'schemaNamespace' | 'search' | 'send' | 'settings' | 'space' | 'taskAlt' | 'timeline' | 'tune' | 'viewGrid' | 'viewList' | 'visibility' | 'visibilityOff' | 'warning';
|
|
9
9
|
export declare const add: SVGTemplateResult;
|
|
10
10
|
export declare const api: SVGTemplateResult;
|
|
11
11
|
export declare const apps: SVGTemplateResult;
|
|
@@ -13,6 +13,7 @@ export declare const arrowBack: SVGTemplateResult;
|
|
|
13
13
|
export declare const arrowDropDown: SVGTemplateResult;
|
|
14
14
|
export declare const cancel: SVGTemplateResult;
|
|
15
15
|
export declare const cancelFilled: SVGTemplateResult;
|
|
16
|
+
export declare const certificate: SVGTemplateResult;
|
|
16
17
|
export declare const check: SVGTemplateResult;
|
|
17
18
|
export declare const checkBox: SVGTemplateResult;
|
|
18
19
|
export declare const checkBoxBlank: SVGTemplateResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icons.d.ts","sourceRoot":"","sources":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,CAAC;AAChR,eAAO,MAAM,aAAa,mBAAgiB,CAAC;AAC3jB,eAAO,MAAM,OAAO,mBAAyF,CAAC"}
|
package/dist/ui/icons/Icons.js
CHANGED
|
@@ -12,6 +12,7 @@ export const arrowBack = iconWrapper(svg `<path d="M20 11H7.83l5.59-5.59L12 4l-8
|
|
|
12
12
|
export const arrowDropDown = iconWrapper(svg `<path d="M7 10l5 5 5-5z"/>`);
|
|
13
13
|
export const cancel = iconWrapper(svg `<path d="M0 0h24v24H0V0z" fill="none" opacity=".87"/><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"/>`);
|
|
14
14
|
export const cancelFilled = iconWrapper(svg `<path d="M0 0h24v24H0z" fill="none"/><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/>`);
|
|
15
|
+
export const certificate = iconWrapper(svg `<path d="M4 3c-1.11 0-2 .89-2 2v10a2 2 0 0 0 2 2h8v5l3-3l3 3v-5h2a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2H4m8 2l3 2l3-2v3.5l3 1.5l-3 1.5V15l-3-2l-3 2v-3.5L9 10l3-1.5V5M4 5h5v2H4V5m0 4h3v2H4V9m0 4h5v2H4v-2Z"/>`);
|
|
15
16
|
export const check = iconWrapper(svg `<path d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4Z"/>`);
|
|
16
17
|
export const checkBox = iconWrapper(svg `<path d="m10.6 16.2 7.05-7.05-1.4-1.4-5.65 5.65-2.85-2.85-1.4 1.4ZM5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14ZM5 5v14V5Z"/>`);
|
|
17
18
|
export const checkBoxBlank = iconWrapper(svg `<path d="M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14Z"/>`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icons.js","sourceRoot":"","sources":["../../../src/ui/icons/Icons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,KAAK,CAAC;AAE7C;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAsB,EAAE,KAAK,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,EAAE,GAAG,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,EAAqB,EAAE,CAAC,GAAG,CAAA,iBAAiB,GAAG,IAAI,IAAI,IAAI,KAAK,IAAI,MAAM,oIAAoI,GAAG,QAAQ,CAAC;AAQxT,MAAM,CAAC,MAAM,GAAG,GAAG,WAAW,CAAC,GAAG,CAAA,uDAAuD,CAAC,CAAC;AAC3F,MAAM,CAAC,MAAM,GAAG,GAAG,WAAW,CAAC,GAAG,CAAA,mOAAmO,CAAC,CAAC;AACvQ,MAAM,CAAC,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAA,u4CAAu4C,CAAC,CAAC;AAC56C,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,CAAA,gFAAgF,CAAC,CAAC;AAC1H,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,CAAA,4BAA4B,CAAC,CAAC;AAC1E,MAAM,CAAC,MAAM,MAAM,GA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AAK,GAAG,WAAW,CAAC,GAAG,CAAA,+dAA+d,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAC/gB,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAA,4WAA4W,CAAC,CAAC;AACpZ,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAA,k0BAAk0B,CAAC,CAAC;AAC32B,MAAM,CAAC,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAA,uMAAuM,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAC7P,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAA,2KAA2K,CAAC,CAAC;AACpN,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAA,gMAAgM,CAAC,CAAC;AACzO,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,CAAA,qOAAqO,CAAC,CAAC;AAChR,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,CAAA,6gBAA6gB,CAAC,CAAC;AAC3jB,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAA,sEAAsE,CAAC,CAAC","sourcesContent":["import { svg, SVGTemplateResult } from 'lit';\n\n/**\n * Wraps icon into an SVG container.\n * @param tpl Icon definition\n * @returns Complete SVG icon definition\n */\nexport const iconWrapper = (tpl: SVGTemplateResult, width = 24, height = 24, top = 0, left = 0): SVGTemplateResult => svg`<svg viewBox=\"${top} ${left} ${width} ${height}\" preserveAspectRatio=\"xMidYMid meet\" focusable=\"false\" style=\"pointer-events: none; display: block; width: 100%; height: 100%;\">${tpl}</svg>`;\n\nexport type IconType = \n 'add' | 'api' | 'apps' | 'arrowBack' | 'arrowDropDown' | 'cancel' | 'cancelFilled' | 'check' | 'checkBox' | 'checkBoxBlank' | 'checkIndeterminate' | 'chevronLeft' | 'chevronRight' | 'close' | 'cloud' | 'cloudFilled' | 'collectionsBookmark' | 'deleteFile' | 'deleteOutline' | 'edit' | 'environment' | 'expandMore' | \n 'fileDownload' | 'folder' | 'folderFilled' | 'folderShared' | 'help' | 'history' | 'info' | 'key' | 'menu' | 'leaderBoard' |\n 'moreVert' | 'openInNew' | 'personAdd' | 'playArrow' | 'project' | 'remove' | 'rename' | 'request' | 'restoreFromTrash' | 'save' |\n 'schema' | 'schemaEntity' | 'schemaModel' | 'schemaNamespace' | 'search' | 'send' | 'settings' | 'space' | 'taskAlt' | 'timeline' | 'tune' | 'viewGrid' | 'viewList' | 'visibility' | 'visibilityOff' | 'warning';\n\nexport const add = iconWrapper(svg`<path d=\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"></path>`);\nexport const api = iconWrapper(svg`<path d=\"M0,0H24V24H0Z\" style=\"fill:none\"/><path d=\"M22.45,15.1a4.87,4.87,0,0,0-3.74-4.73,5.29,5.29,0,0,0,.05-.56A4.88,4.88,0,0,0,9.3,8.12,2.85,2.85,0,0,0,5,10.54,4.86,4.86,0,0,0,6.48,20H17.87v0A4.87,4.87,0,0,0,22.45,15.1Z\"/>`);\nexport const apps = iconWrapper(svg`<path d=\"M6 8Q5.175 8 4.588 7.412Q4 6.825 4 6Q4 5.175 4.588 4.588Q5.175 4 6 4Q6.825 4 7.412 4.588Q8 5.175 8 6Q8 6.825 7.412 7.412Q6.825 8 6 8ZM12 20Q11.175 20 10.588 19.413Q10 18.825 10 18Q10 17.175 10.588 16.587Q11.175 16 12 16Q12.825 16 13.413 16.587Q14 17.175 14 18Q14 18.825 13.413 19.413Q12.825 20 12 20ZM6 20Q5.175 20 4.588 19.413Q4 18.825 4 18Q4 17.175 4.588 16.587Q5.175 16 6 16Q6.825 16 7.412 16.587Q8 17.175 8 18Q8 18.825 7.412 19.413Q6.825 20 6 20ZM6 14Q5.175 14 4.588 13.412Q4 12.825 4 12Q4 11.175 4.588 10.587Q5.175 10 6 10Q6.825 10 7.412 10.587Q8 11.175 8 12Q8 12.825 7.412 13.412Q6.825 14 6 14ZM12 14Q11.175 14 10.588 13.412Q10 12.825 10 12Q10 11.175 10.588 10.587Q11.175 10 12 10Q12.825 10 13.413 10.587Q14 11.175 14 12Q14 12.825 13.413 13.412Q12.825 14 12 14ZM18 8Q17.175 8 16.587 7.412Q16 6.825 16 6Q16 5.175 16.587 4.588Q17.175 4 18 4Q18.825 4 19.413 4.588Q20 5.175 20 6Q20 6.825 19.413 7.412Q18.825 8 18 8ZM12 8Q11.175 8 10.588 7.412Q10 6.825 10 6Q10 5.175 10.588 4.588Q11.175 4 12 4Q12.825 4 13.413 4.588Q14 5.175 14 6Q14 6.825 13.413 7.412Q12.825 8 12 8ZM18 14Q17.175 14 16.587 13.412Q16 12.825 16 12Q16 11.175 16.587 10.587Q17.175 10 18 10Q18.825 10 19.413 10.587Q20 11.175 20 12Q20 12.825 19.413 13.412Q18.825 14 18 14ZM18 20Q17.175 20 16.587 19.413Q16 18.825 16 18Q16 17.175 16.587 16.587Q17.175 16 18 16Q18.825 16 19.413 16.587Q20 17.175 20 18Q20 18.825 19.413 19.413Q18.825 20 18 20Z\"/>`);\nexport const arrowBack = iconWrapper(svg`<path d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\"></path>`);\nexport const arrowDropDown = iconWrapper(svg`<path d=\"M7 10l5 5 5-5z\"/>`);\nexport const cancel = iconWrapper(svg`<path d=\"M0 0h24v24H0V0z\" fill=\"none\" opacity=\".87\"/><path d=\"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z\"/>`);\nexport const cancelFilled = iconWrapper(svg`<path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"/>`);\nexport const check = iconWrapper(svg`<path d=\"m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4Z\"/>`);\nexport const checkBox = iconWrapper(svg`<path d=\"m10.6 16.2 7.05-7.05-1.4-1.4-5.65 5.65-2.85-2.85-1.4 1.4ZM5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14ZM5 5v14V5Z\"/>`);\nexport const checkBoxBlank = iconWrapper(svg`<path d=\"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14Z\"/>`);\nexport const checkIndeterminate = iconWrapper(svg`<path d=\"M7 13v-2h10v2Z\"/>`);\nexport const chevronLeft = iconWrapper(svg`<path d=\"m14 18-6-6 6-6 1.4 1.4-4.6 4.6 4.6 4.6Z\"/>`);\nexport const chevronRight = iconWrapper(svg`<path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"/>`);\nexport const close = iconWrapper(svg`<path d=\"M6.4 19 5 17.6l5.6-5.6L5 6.4 6.4 5l5.6 5.6L17.6 5 19 6.4 13.4 12l5.6 5.6-1.4 1.4-5.6-5.6Z\"></path>`);\nexport const cloud = iconWrapper(svg`<path d=\"M12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6m0-2C9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96C18.67 6.59 15.64 4 12 4z\"/>`);\nexport const cloudFilled = iconWrapper(svg`<path d=\"M6.5 20Q4.225 20 2.613 18.425Q1 16.85 1 14.575Q1 12.625 2.175 11.1Q3.35 9.575 5.25 9.15Q5.875 6.85 7.75 5.425Q9.625 4 12 4Q14.925 4 16.962 6.037Q19 8.075 19 11Q20.725 11.2 21.863 12.487Q23 13.775 23 15.5Q23 17.375 21.688 18.688Q20.375 20 18.5 20Z\"/>`);\nexport const collectionsBookmark = iconWrapper(svg`<path d=\"M8 16h12V4h-2v7l-2.5-1.5L13 11V4H8v12Zm0 2q-.825 0-1.412-.587Q6 16.825 6 16V4q0-.825.588-1.413Q7.175 2 8 2h12q.825 0 1.413.587Q22 3.175 22 4v12q0 .825-.587 1.413Q20.825 18 20 18Zm-4 4q-.825 0-1.412-.587Q2 20.825 2 20V6h2v14h14v2Zm9-18h5ZM8 4h12Z\"/>`);\nexport const deleteFile = iconWrapper(svg`<path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z\"/>`);\nexport const deleteOutline = iconWrapper(svg`<path d=\"M7 21q-.825 0-1.412-.587Q5 19.825 5 19V6H4V4h5V3h6v1h5v2h-1v13q0 .825-.587 1.413Q17.825 21 17 21ZM17 6H7v13h10ZM9 17h2V8H9Zm4 0h2V8h-2ZM7 6v13Z\"/>`);\nexport const edit = iconWrapper(svg`<path d=\"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z\"></path>`);\nexport const environment = iconWrapper(svg`<path d=\"M160,32h0V160s0,0,0,0H32l0,0h0V32s0,0,0,0H160m0-12H32A12,12,0,0,0,20,32V160a12,12,0,0,0,12,12H160a12,12,0,0,0,12-12V32a12,12,0,0,0-12-12Z\"/><path d=\"M96,68A28,28,0,1,1,68,96,28,28,0,0,1,96,68m0-12a40,40,0,1,0,40,40A40,40,0,0,0,96,56Z\"/><rect width=\"192\" height=\"192\" style=\"fill:none\"/>`, 192, 192);\nexport const expandMore = iconWrapper(svg`<path d=\"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z\"></path>`);\nexport const fileDownload = iconWrapper(svg`<path d=\"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z\"></path>`);\nexport const folder = iconWrapper(svg`<path d=\"M9.17 6l2 2H20v10H4V6h5.17M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z\"/>`);\nexport const folderFilled = iconWrapper(svg`<path d=\"M4 20Q3.175 20 2.588 19.413Q2 18.825 2 18V6Q2 5.175 2.588 4.588Q3.175 4 4 4H10L12 6H20Q20.825 6 21.413 6.588Q22 7.175 22 8V18Q22 18.825 21.413 19.413Q20.825 20 20 20Z\"/>`);\nexport const folderShared = iconWrapper(svg`<path d=\"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V6h5.17l2 2H20v10zm-5-5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-4 4h8v-1c0-1.33-2.67-2-4-2s-4 .67-4 2v1z\"/>`);\nexport const help = iconWrapper(svg`<path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z\"></path>`);\nexport const history = iconWrapper(svg`<path d=\"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z\"></path>`);\nexport const info = iconWrapper(svg`<path d=\"M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 9h2V7h-2v2z\"></path>`);\nexport const key = iconWrapper(svg`<g><rect fill=\"none\" height=\"24\" width=\"24\"/></g><g><path d=\"M21,10h-8.35C11.83,7.67,9.61,6,7,6c-3.31,0-6,2.69-6,6s2.69,6,6,6c2.61,0,4.83-1.67,5.65-4H13l2,2l2-2l2,2l4-4.04L21,10z M7,15c-1.65,0-3-1.35-3-3c0-1.65,1.35-3,3-3s3,1.35,3,3C10,13.65,8.65,15,7,15z\"/></g>`);\nexport const leaderBoard = iconWrapper(svg`<rect fill=\"none\" height=\"24\" width=\"24\"/><g><path d=\"M16,11V3H8v6H2v12h20V11H16z M10,5h4v14h-4V5z M4,11h4v8H4V11z M20,19h-4v-6h4V19z\"/></g>`);\nexport const menu = iconWrapper(svg`<path d=\"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z\"></path>`);\nexport const moreVert = iconWrapper(svg`<path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z\"/>`);\nexport const openInNew = iconWrapper(svg`<path d=\"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z\"></path>`);\nexport const personAdd = iconWrapper(svg`<g><rect fill=\"none\" height=\"24\" width=\"24\"/></g><g><path d=\"M20,9V6h-2v3h-3v2h3v3h2v-3h3V9H20z M9,12c2.21,0,4-1.79,4-4c0-2.21-1.79-4-4-4S5,5.79,5,8C5,10.21,6.79,12,9,12z M9,6 c1.1,0,2,0.9,2,2c0,1.1-0.9,2-2,2S7,9.1,7,8C7,6.9,7.9,6,9,6z M15.39,14.56C13.71,13.7,11.53,13,9,13c-2.53,0-4.71,0.7-6.39,1.56 C1.61,15.07,1,16.1,1,17.22V20h16v-2.78C17,16.1,16.39,15.07,15.39,14.56z M15,18H3v-0.78c0-0.38,0.2-0.72,0.52-0.88 C4.71,15.73,6.63,15,9,15c2.37,0,4.29,0.73,5.48,1.34C14.8,16.5,15,16.84,15,17.22V18z\"/></g>`);\nexport const playArrow = iconWrapper(svg`<path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M10 8.64L15.27 12 10 15.36V8.64M8 5v14l11-7L8 5z\"/>`);\nexport const project = iconWrapper(svg`<path d=\"M160,32h0V160s0,0,0,0H32l0,0h0V32s0,0,0,0H160m0-12H32A12,12,0,0,0,20,32V160a12,12,0,0,0,12,12H160a12,12,0,0,0,12-12V32a12,12,0,0,0-12-12Z\"/><circle cx=\"63\" cy=\"63\" r=\"9\" style=\"fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:8px\"/><circle cx=\"63\" cy=\"96\" r=\"9\" style=\"fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:8px\"/><circle cx=\"63\" cy=\"129\" r=\"9\" style=\"fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:8px\"/><rect width=\"192\" height=\"192\" style=\"fill:none\"/>`, 192, 192);\nexport const remove = iconWrapper(svg`<path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M19 13H5v-2h14v2z\"/>`);\nexport const rename = iconWrapper(svg`<g><rect fill=\"none\" height=\"24\" width=\"24\"/></g><g><g><polygon points=\"15,16 11,20 21,20 21,16\"/><path d=\"M12.06,7.19L3,16.25V20h3.75l9.06-9.06L12.06,7.19z M5.92,18H5v-0.92l7.06-7.06l0.92,0.92L5.92,18z\"/><path d=\"M18.71,8.04c0.39-0.39,0.39-1.02,0-1.41l-2.34-2.34C16.17,4.09,15.92,4,15.66,4c-0.25,0-0.51,0.1-0.7,0.29l-1.83,1.83 l3.75,3.75L18.71,8.04z\"/></g></g>`);\nexport const request = iconWrapper(svg`<polygon points=\"136 136 56 136 32 96 56 56 136 56 160 96 136 136\" style=\"fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:12px\"/><rect width=\"192\" height=\"192\" style=\"fill:none\"/>`, 192, 192);\nexport const restoreFromTrash = iconWrapper(svg`<path d=\"M11 16h2v-4.15l1.6 1.55L16 12l-4-4-4 4 1.4 1.4 1.6-1.55Zm-4 5q-.825 0-1.412-.587Q5 19.825 5 19V6H4V4h5V3h6v1h5v2h-1v13q0 .825-.587 1.413Q17.825 21 17 21ZM17 6H7v13h10ZM7 6v13Z\"/>`);\nexport const save = iconWrapper(svg`<path d=\"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z\"></path>`);\nexport const schema = iconWrapper(svg`<path d=\"M83.31,32.21a8,8,0,0,0-5.66,2.34L22.34,89.86a8.63,8.63,0,0,0,0,11.8L77.65,157A8,8,0,0,0,89,145.65L39.07,95.76,89,45.86a8,8,0,0,0-5.66-13.65Z\"/><path d=\"M108.9,32.53a8,8,0,0,0-5.66,13.65l49.9,49.9L103.24,146a8,8,0,0,0,11.32,11.32L169.87,102a8.63,8.63,0,0,0,0-11.8L114.56,34.87a8,8,0,0,0-5.66-2.34Z\"/><rect width=\"192\" height=\"192\" style=\"fill:none\"/>`, 192, 192);\nexport const schemaEntity = iconWrapper(svg`<path d=\"M19.78,1.4H4.7A3.22,3.22,0,0,0,1.45,4.65V19.74A3.22,3.22,0,0,0,4.7,23H19.78A3.22,3.22,0,0,0,23,19.74V4.65A3.22,3.22,0,0,0,19.78,1.4Zm1.95,18.34a2,2,0,0,1-1.95,2H4.7a2,2,0,0,1-1.95-2V4.65a2,2,0,0,1,2-1.95H19.78a2,2,0,0,1,1.95,2Z\"/><rect x=\"5.4\" y=\"5.35\" width=\"13.69\" height=\"13.69\" rx=\"2.06\"/><rect x=\"6.44\" y=\"6.39\" width=\"11.61\" height=\"11.61\" rx=\"1.02\"/><path d=\"M0,0H24V24H0Z\" style=\"fill:none\"/>`);\nexport const schemaModel = iconWrapper(svg`<path d=\"M3.4,16.79H9.09a1.71,1.71,0,0,0,1.85-1.55V8.85A1.8,1.8,0,0,0,9.09,7.21H3.4A1.71,1.71,0,0,0,1.55,8.76s0,.06,0,.09v6.3A1.7,1.7,0,0,0,3.3,16.79ZM14.91,23H20.6a1.7,1.7,0,0,0,1.85-1.54s0-.07,0-.1V15.06a1.8,1.8,0,0,0-1.86-1.64H14.91A1.71,1.71,0,0,0,13.06,15v6.38C12.93,22.31,13.85,23,14.91,23Zm0-12.55H20.6A1.7,1.7,0,0,0,22.45,8.9s0-.07,0-.1V2.65A1.79,1.79,0,0,0,20.6,1H14.91a1.7,1.7,0,0,0-1.85,1.54V8.94C12.93,9.76,13.85,10.44,14.91,10.44Z\" style=\"isolation:isolate\"/><path d=\"M0,0H24V24H0Z\" style=\"fill:none\"/>`);\nexport const schemaNamespace = iconWrapper(svg`<path d=\"M3.41,10.12H9.09a1.68,1.68,0,0,0,1.85-1.59V2.59A1.76,1.76,0,0,0,9.09,1H3.41A1.68,1.68,0,0,0,1.56,2.59V8.67A1.67,1.67,0,0,0,3.41,10.12Zm0,12.94H9.09a1.68,1.68,0,0,0,1.85-1.58V15.4a1.76,1.76,0,0,0-1.85-1.59H3.41A1.68,1.68,0,0,0,1.56,15.4v6.08A1.68,1.68,0,0,0,3.41,23.06Zm11.5,0h5.68a1.68,1.68,0,0,0,1.85-1.58V15.4a1.76,1.76,0,0,0-1.85-1.59H14.91a1.68,1.68,0,0,0-1.85,1.59v6.08C12.93,22.4,13.85,23.06,14.91,23.06Zm0-12.94h5.68a1.68,1.68,0,0,0,1.85-1.59V2.59A1.76,1.76,0,0,0,20.59,1H14.91a1.68,1.68,0,0,0-1.85,1.59V8.67C12.93,9.46,13.85,10.12,14.91,10.12Z\"/><path d=\"M0,0H24V24H0Z\" style=\"fill:none\"/>`);\nexport const search = iconWrapper(svg`<path d=\"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\"></path>`);\nexport const send = iconWrapper(svg`<path d=\"M2.01 21L23 12 2.01 3 2 10l15 2-15 2z\"></path>`);\nexport const settings = iconWrapper(svg`<path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z\"/>`);\nexport const space = iconWrapper(svg`<path d=\"M62.14,110.18a11.26,11.26,0,1,1-11.27,11.26,11.29,11.29,0,0,1,11.27-11.26m0-11.27a22.53,22.53,0,1,0,22.52,22.53A22.6,22.6,0,0,0,62.14,98.91Zm33.78-45A11.26,11.26,0,1,1,84.66,65.13,11.3,11.3,0,0,1,95.92,53.87m0-11.26a22.52,22.52,0,1,0,22.52,22.52A22.58,22.58,0,0,0,95.92,42.61Zm33.78,67.57a11.26,11.26,0,1,1-11.26,11.26,11.28,11.28,0,0,1,11.26-11.26m0-11.27a22.53,22.53,0,1,0,22.53,22.53A22.6,22.6,0,0,0,129.7,98.91Z\"/><rect width=\"192\" height=\"192\" style=\"fill:none\"/>`, 192, 192);\nexport const taskAlt = iconWrapper(svg`<rect fill=\"none\" height=\"24\" width=\"24\"/><path d=\"M22,5.18L10.59,16.6l-4.24-4.24l1.41-1.41l2.83,2.83l10-10L22,5.18z M19.79,10.22C19.92,10.79,20,11.39,20,12 c0,4.42-3.58,8-8,8s-8-3.58-8-8c0-4.42,3.58-8,8-8c1.58,0,3.04,0.46,4.28,1.25l1.44-1.44C16.1,2.67,14.13,2,12,2C6.48,2,2,6.48,2,12 c0,5.52,4.48,10,10,10s10-4.48,10-10c0-1.19-0.22-2.33-0.6-3.39L19.79,10.22z\"/>`);\nexport const timeline = iconWrapper(svg`<path d=\"M3 18Q2.175 18 1.588 17.413Q1 16.825 1 16Q1 15.175 1.588 14.587Q2.175 14 3 14Q3.15 14 3.263 14Q3.375 14 3.5 14.05L8.05 9.5Q8 9.375 8 9.262Q8 9.15 8 9Q8 8.175 8.588 7.587Q9.175 7 10 7Q10.825 7 11.413 7.587Q12 8.175 12 9Q12 9.05 11.95 9.5L14.5 12.05Q14.625 12 14.738 12Q14.85 12 15 12Q15.15 12 15.262 12Q15.375 12 15.5 12.05L19.05 8.5Q19 8.375 19 8.262Q19 8.15 19 8Q19 7.175 19.587 6.588Q20.175 6 21 6Q21.825 6 22.413 6.588Q23 7.175 23 8Q23 8.825 22.413 9.412Q21.825 10 21 10Q20.85 10 20.738 10Q20.625 10 20.5 9.95L16.95 13.5Q17 13.625 17 13.738Q17 13.85 17 14Q17 14.825 16.413 15.412Q15.825 16 15 16Q14.175 16 13.588 15.412Q13 14.825 13 14Q13 13.85 13 13.738Q13 13.625 13.05 13.5L10.5 10.95Q10.375 11 10.262 11Q10.15 11 10 11Q9.95 11 9.5 10.95L4.95 15.5Q5 15.625 5 15.738Q5 15.85 5 16Q5 16.825 4.412 17.413Q3.825 18 3 18Z\"/>`);\nexport const tune = iconWrapper(svg`<path d=\"M440 936V696h80v80h320v80H520v80h-80Zm-320-80v-80h240v80H120Zm160-160v-80H120v-80h160v-80h80v240h-80Zm160-80v-80h400v80H440Zm160-160V216h80v80h160v80H680v80h-80Zm-480-80v-80h400v80H120Z\"/>`, 960, 960, 0, 96);\nexport const viewGrid = iconWrapper(svg`<rect fill=\"none\" height=\"24\" width=\"24\"/><path d=\"M3,5v14h18V5H3z M7,7v2H5V7H7z M5,13v-2h2v2H5z M5,15h2v2H5V15z M19,17H9v-2h10V17z M19,13H9v-2h10V13z M19,9H9V7h10V9z\"/>`);\nexport const viewList = iconWrapper(svg`<g><rect fill=\"none\" height=\"24\" width=\"24\"/></g><path d=\"M3,3v8h8V3H3z M9,9H5V5h4V9z M3,13v8h8v-8H3z M9,19H5v-4h4V19z M13,3v8h8V3H13z M19,9h-4V5h4V9z M13,13v8h8v-8H13z M19,19h-4v-4h4V19z\"/>`);\nexport const visibility = iconWrapper(svg`<path d=\"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z\"></path>`);\nexport const visibilityOff = iconWrapper(svg`<path d=\"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z\"></path>`);\nexport const warning = iconWrapper(svg`<path d=\"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z\"></path>`);\n"]}
|
|
1
|
+
{"version":3,"file":"Icons.js","sourceRoot":"","sources":["../../../src/ui/icons/Icons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,KAAK,CAAC;AAE7C;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAsB,EAAE,KAAK,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,EAAE,GAAG,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,EAAqB,EAAE,CAAC,GAAG,CAAA,iBAAiB,GAAG,IAAI,IAAI,IAAI,KAAK,IAAI,MAAM,oIAAoI,GAAG,QAAQ,CAAC;AAQxT,MAAM,CAAC,MAAM,GAAG,GAAG,WAAW,CAAC,GAAG,CAAA,uDAAuD,CAAC,CAAC;AAC3F,MAAM,CAAC,MAAM,GAAG,GAAG,WAAW,CAAC,GAAG,CAAA,mOAAmO,CAAC,CAAC;AACvQ,MAAM,CAAC,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAA,u4CAAu4C,CAAC,CAAC;AAC56C,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,CAAA,gFAAgF,CAAC,CAAC;AAC1H,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW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WAAW,CAAC,GAAG,CAAA,yDAAyD,CAAC,CAAC;AAC9F,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAA,40CAA40C,CAAC,CAAC;AACr3C,MAAM,CAAC,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAA,+dAA+d,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAC/gB,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAA,4WAA4W,CAAC,CAAC;AACpZ,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAA,k0BAAk0B,CAAC,CAAC;AAC32B,MAAM,CAAC,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAA,uMAAuM,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAC7P,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAA,2KAA2K,CAAC,CAAC;AACpN,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAA,gMAAgM,CAAC,CAAC;AACzO,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,CAAA,qOAAqO,CAAC,CAAC;AAChR,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,CAAA,6gBAA6gB,CAAC,CAAC;AAC3jB,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAA,sEAAsE,CAAC,CAAC","sourcesContent":["import { svg, SVGTemplateResult } from 'lit';\n\n/**\n * Wraps icon into an SVG container.\n * @param tpl Icon definition\n * @returns Complete SVG icon definition\n */\nexport const iconWrapper = (tpl: SVGTemplateResult, width = 24, height = 24, top = 0, left = 0): SVGTemplateResult => svg`<svg viewBox=\"${top} ${left} ${width} ${height}\" preserveAspectRatio=\"xMidYMid meet\" focusable=\"false\" style=\"pointer-events: none; display: block; width: 100%; height: 100%;\">${tpl}</svg>`;\n\nexport type IconType = \n 'add' | 'api' | 'apps' | 'arrowBack' | 'arrowDropDown' | 'cancel' | 'cancelFilled' | 'certificate' | 'check' | 'checkBox' | 'checkBoxBlank' | 'checkIndeterminate' | 'chevronLeft' | 'chevronRight' | 'close' | 'cloud' | 'cloudFilled' | 'collectionsBookmark' | 'deleteFile' | 'deleteOutline' | 'edit' | 'environment' | 'expandMore' | \n 'fileDownload' | 'folder' | 'folderFilled' | 'folderShared' | 'help' | 'history' | 'info' | 'key' | 'menu' | 'leaderBoard' |\n 'moreVert' | 'openInNew' | 'personAdd' | 'playArrow' | 'project' | 'remove' | 'rename' | 'request' | 'restoreFromTrash' | 'save' |\n 'schema' | 'schemaEntity' | 'schemaModel' | 'schemaNamespace' | 'search' | 'send' | 'settings' | 'space' | 'taskAlt' | 'timeline' | 'tune' | 'viewGrid' | 'viewList' | 'visibility' | 'visibilityOff' | 'warning';\n\nexport const add = iconWrapper(svg`<path d=\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"></path>`);\nexport const api = iconWrapper(svg`<path d=\"M0,0H24V24H0Z\" style=\"fill:none\"/><path d=\"M22.45,15.1a4.87,4.87,0,0,0-3.74-4.73,5.29,5.29,0,0,0,.05-.56A4.88,4.88,0,0,0,9.3,8.12,2.85,2.85,0,0,0,5,10.54,4.86,4.86,0,0,0,6.48,20H17.87v0A4.87,4.87,0,0,0,22.45,15.1Z\"/>`);\nexport const apps = iconWrapper(svg`<path d=\"M6 8Q5.175 8 4.588 7.412Q4 6.825 4 6Q4 5.175 4.588 4.588Q5.175 4 6 4Q6.825 4 7.412 4.588Q8 5.175 8 6Q8 6.825 7.412 7.412Q6.825 8 6 8ZM12 20Q11.175 20 10.588 19.413Q10 18.825 10 18Q10 17.175 10.588 16.587Q11.175 16 12 16Q12.825 16 13.413 16.587Q14 17.175 14 18Q14 18.825 13.413 19.413Q12.825 20 12 20ZM6 20Q5.175 20 4.588 19.413Q4 18.825 4 18Q4 17.175 4.588 16.587Q5.175 16 6 16Q6.825 16 7.412 16.587Q8 17.175 8 18Q8 18.825 7.412 19.413Q6.825 20 6 20ZM6 14Q5.175 14 4.588 13.412Q4 12.825 4 12Q4 11.175 4.588 10.587Q5.175 10 6 10Q6.825 10 7.412 10.587Q8 11.175 8 12Q8 12.825 7.412 13.412Q6.825 14 6 14ZM12 14Q11.175 14 10.588 13.412Q10 12.825 10 12Q10 11.175 10.588 10.587Q11.175 10 12 10Q12.825 10 13.413 10.587Q14 11.175 14 12Q14 12.825 13.413 13.412Q12.825 14 12 14ZM18 8Q17.175 8 16.587 7.412Q16 6.825 16 6Q16 5.175 16.587 4.588Q17.175 4 18 4Q18.825 4 19.413 4.588Q20 5.175 20 6Q20 6.825 19.413 7.412Q18.825 8 18 8ZM12 8Q11.175 8 10.588 7.412Q10 6.825 10 6Q10 5.175 10.588 4.588Q11.175 4 12 4Q12.825 4 13.413 4.588Q14 5.175 14 6Q14 6.825 13.413 7.412Q12.825 8 12 8ZM18 14Q17.175 14 16.587 13.412Q16 12.825 16 12Q16 11.175 16.587 10.587Q17.175 10 18 10Q18.825 10 19.413 10.587Q20 11.175 20 12Q20 12.825 19.413 13.412Q18.825 14 18 14ZM18 20Q17.175 20 16.587 19.413Q16 18.825 16 18Q16 17.175 16.587 16.587Q17.175 16 18 16Q18.825 16 19.413 16.587Q20 17.175 20 18Q20 18.825 19.413 19.413Q18.825 20 18 20Z\"/>`);\nexport const arrowBack = iconWrapper(svg`<path d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\"></path>`);\nexport const arrowDropDown = iconWrapper(svg`<path d=\"M7 10l5 5 5-5z\"/>`);\nexport const cancel = iconWrapper(svg`<path d=\"M0 0h24v24H0V0z\" fill=\"none\" opacity=\".87\"/><path d=\"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z\"/>`);\nexport const cancelFilled = iconWrapper(svg`<path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"/>`);\nexport const certificate = iconWrapper(svg`<path d=\"M4 3c-1.11 0-2 .89-2 2v10a2 2 0 0 0 2 2h8v5l3-3l3 3v-5h2a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2H4m8 2l3 2l3-2v3.5l3 1.5l-3 1.5V15l-3-2l-3 2v-3.5L9 10l3-1.5V5M4 5h5v2H4V5m0 4h3v2H4V9m0 4h5v2H4v-2Z\"/>`);\nexport const check = iconWrapper(svg`<path d=\"m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4Z\"/>`);\nexport const checkBox = iconWrapper(svg`<path d=\"m10.6 16.2 7.05-7.05-1.4-1.4-5.65 5.65-2.85-2.85-1.4 1.4ZM5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14ZM5 5v14V5Z\"/>`);\nexport const checkBoxBlank = iconWrapper(svg`<path d=\"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14Z\"/>`);\nexport const checkIndeterminate = iconWrapper(svg`<path d=\"M7 13v-2h10v2Z\"/>`);\nexport const chevronLeft = iconWrapper(svg`<path d=\"m14 18-6-6 6-6 1.4 1.4-4.6 4.6 4.6 4.6Z\"/>`);\nexport const chevronRight = iconWrapper(svg`<path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"/>`);\nexport const close = iconWrapper(svg`<path d=\"M6.4 19 5 17.6l5.6-5.6L5 6.4 6.4 5l5.6 5.6L17.6 5 19 6.4 13.4 12l5.6 5.6-1.4 1.4-5.6-5.6Z\"></path>`);\nexport const cloud = iconWrapper(svg`<path d=\"M12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6m0-2C9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96C18.67 6.59 15.64 4 12 4z\"/>`);\nexport const cloudFilled = iconWrapper(svg`<path d=\"M6.5 20Q4.225 20 2.613 18.425Q1 16.85 1 14.575Q1 12.625 2.175 11.1Q3.35 9.575 5.25 9.15Q5.875 6.85 7.75 5.425Q9.625 4 12 4Q14.925 4 16.962 6.037Q19 8.075 19 11Q20.725 11.2 21.863 12.487Q23 13.775 23 15.5Q23 17.375 21.688 18.688Q20.375 20 18.5 20Z\"/>`);\nexport const collectionsBookmark = iconWrapper(svg`<path d=\"M8 16h12V4h-2v7l-2.5-1.5L13 11V4H8v12Zm0 2q-.825 0-1.412-.587Q6 16.825 6 16V4q0-.825.588-1.413Q7.175 2 8 2h12q.825 0 1.413.587Q22 3.175 22 4v12q0 .825-.587 1.413Q20.825 18 20 18Zm-4 4q-.825 0-1.412-.587Q2 20.825 2 20V6h2v14h14v2Zm9-18h5ZM8 4h12Z\"/>`);\nexport const deleteFile = iconWrapper(svg`<path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z\"/>`);\nexport const deleteOutline = iconWrapper(svg`<path d=\"M7 21q-.825 0-1.412-.587Q5 19.825 5 19V6H4V4h5V3h6v1h5v2h-1v13q0 .825-.587 1.413Q17.825 21 17 21ZM17 6H7v13h10ZM9 17h2V8H9Zm4 0h2V8h-2ZM7 6v13Z\"/>`);\nexport const edit = iconWrapper(svg`<path d=\"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z\"></path>`);\nexport const environment = iconWrapper(svg`<path d=\"M160,32h0V160s0,0,0,0H32l0,0h0V32s0,0,0,0H160m0-12H32A12,12,0,0,0,20,32V160a12,12,0,0,0,12,12H160a12,12,0,0,0,12-12V32a12,12,0,0,0-12-12Z\"/><path d=\"M96,68A28,28,0,1,1,68,96,28,28,0,0,1,96,68m0-12a40,40,0,1,0,40,40A40,40,0,0,0,96,56Z\"/><rect width=\"192\" height=\"192\" style=\"fill:none\"/>`, 192, 192);\nexport const expandMore = iconWrapper(svg`<path d=\"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z\"></path>`);\nexport const fileDownload = iconWrapper(svg`<path d=\"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z\"></path>`);\nexport const folder = iconWrapper(svg`<path d=\"M9.17 6l2 2H20v10H4V6h5.17M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z\"/>`);\nexport const folderFilled = iconWrapper(svg`<path d=\"M4 20Q3.175 20 2.588 19.413Q2 18.825 2 18V6Q2 5.175 2.588 4.588Q3.175 4 4 4H10L12 6H20Q20.825 6 21.413 6.588Q22 7.175 22 8V18Q22 18.825 21.413 19.413Q20.825 20 20 20Z\"/>`);\nexport const folderShared = iconWrapper(svg`<path d=\"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V6h5.17l2 2H20v10zm-5-5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-4 4h8v-1c0-1.33-2.67-2-4-2s-4 .67-4 2v1z\"/>`);\nexport const help = iconWrapper(svg`<path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z\"></path>`);\nexport const history = iconWrapper(svg`<path d=\"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z\"></path>`);\nexport const info = iconWrapper(svg`<path d=\"M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 9h2V7h-2v2z\"></path>`);\nexport const key = iconWrapper(svg`<g><rect fill=\"none\" height=\"24\" width=\"24\"/></g><g><path d=\"M21,10h-8.35C11.83,7.67,9.61,6,7,6c-3.31,0-6,2.69-6,6s2.69,6,6,6c2.61,0,4.83-1.67,5.65-4H13l2,2l2-2l2,2l4-4.04L21,10z M7,15c-1.65,0-3-1.35-3-3c0-1.65,1.35-3,3-3s3,1.35,3,3C10,13.65,8.65,15,7,15z\"/></g>`);\nexport const leaderBoard = iconWrapper(svg`<rect fill=\"none\" height=\"24\" width=\"24\"/><g><path d=\"M16,11V3H8v6H2v12h20V11H16z M10,5h4v14h-4V5z M4,11h4v8H4V11z M20,19h-4v-6h4V19z\"/></g>`);\nexport const menu = iconWrapper(svg`<path d=\"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z\"></path>`);\nexport const moreVert = iconWrapper(svg`<path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z\"/>`);\nexport const openInNew = iconWrapper(svg`<path d=\"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z\"></path>`);\nexport const personAdd = iconWrapper(svg`<g><rect fill=\"none\" height=\"24\" width=\"24\"/></g><g><path d=\"M20,9V6h-2v3h-3v2h3v3h2v-3h3V9H20z M9,12c2.21,0,4-1.79,4-4c0-2.21-1.79-4-4-4S5,5.79,5,8C5,10.21,6.79,12,9,12z M9,6 c1.1,0,2,0.9,2,2c0,1.1-0.9,2-2,2S7,9.1,7,8C7,6.9,7.9,6,9,6z M15.39,14.56C13.71,13.7,11.53,13,9,13c-2.53,0-4.71,0.7-6.39,1.56 C1.61,15.07,1,16.1,1,17.22V20h16v-2.78C17,16.1,16.39,15.07,15.39,14.56z M15,18H3v-0.78c0-0.38,0.2-0.72,0.52-0.88 C4.71,15.73,6.63,15,9,15c2.37,0,4.29,0.73,5.48,1.34C14.8,16.5,15,16.84,15,17.22V18z\"/></g>`);\nexport const playArrow = iconWrapper(svg`<path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M10 8.64L15.27 12 10 15.36V8.64M8 5v14l11-7L8 5z\"/>`);\nexport const project = iconWrapper(svg`<path d=\"M160,32h0V160s0,0,0,0H32l0,0h0V32s0,0,0,0H160m0-12H32A12,12,0,0,0,20,32V160a12,12,0,0,0,12,12H160a12,12,0,0,0,12-12V32a12,12,0,0,0-12-12Z\"/><circle cx=\"63\" cy=\"63\" r=\"9\" style=\"fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:8px\"/><circle cx=\"63\" cy=\"96\" r=\"9\" style=\"fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:8px\"/><circle cx=\"63\" cy=\"129\" r=\"9\" style=\"fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:8px\"/><rect width=\"192\" height=\"192\" style=\"fill:none\"/>`, 192, 192);\nexport const remove = iconWrapper(svg`<path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M19 13H5v-2h14v2z\"/>`);\nexport const rename = iconWrapper(svg`<g><rect fill=\"none\" height=\"24\" width=\"24\"/></g><g><g><polygon points=\"15,16 11,20 21,20 21,16\"/><path d=\"M12.06,7.19L3,16.25V20h3.75l9.06-9.06L12.06,7.19z M5.92,18H5v-0.92l7.06-7.06l0.92,0.92L5.92,18z\"/><path d=\"M18.71,8.04c0.39-0.39,0.39-1.02,0-1.41l-2.34-2.34C16.17,4.09,15.92,4,15.66,4c-0.25,0-0.51,0.1-0.7,0.29l-1.83,1.83 l3.75,3.75L18.71,8.04z\"/></g></g>`);\nexport const request = iconWrapper(svg`<polygon points=\"136 136 56 136 32 96 56 56 136 56 160 96 136 136\" style=\"fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:12px\"/><rect width=\"192\" height=\"192\" style=\"fill:none\"/>`, 192, 192);\nexport const restoreFromTrash = iconWrapper(svg`<path d=\"M11 16h2v-4.15l1.6 1.55L16 12l-4-4-4 4 1.4 1.4 1.6-1.55Zm-4 5q-.825 0-1.412-.587Q5 19.825 5 19V6H4V4h5V3h6v1h5v2h-1v13q0 .825-.587 1.413Q17.825 21 17 21ZM17 6H7v13h10ZM7 6v13Z\"/>`);\nexport const save = iconWrapper(svg`<path d=\"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z\"></path>`);\nexport const schema = iconWrapper(svg`<path d=\"M83.31,32.21a8,8,0,0,0-5.66,2.34L22.34,89.86a8.63,8.63,0,0,0,0,11.8L77.65,157A8,8,0,0,0,89,145.65L39.07,95.76,89,45.86a8,8,0,0,0-5.66-13.65Z\"/><path d=\"M108.9,32.53a8,8,0,0,0-5.66,13.65l49.9,49.9L103.24,146a8,8,0,0,0,11.32,11.32L169.87,102a8.63,8.63,0,0,0,0-11.8L114.56,34.87a8,8,0,0,0-5.66-2.34Z\"/><rect width=\"192\" height=\"192\" style=\"fill:none\"/>`, 192, 192);\nexport const schemaEntity = iconWrapper(svg`<path d=\"M19.78,1.4H4.7A3.22,3.22,0,0,0,1.45,4.65V19.74A3.22,3.22,0,0,0,4.7,23H19.78A3.22,3.22,0,0,0,23,19.74V4.65A3.22,3.22,0,0,0,19.78,1.4Zm1.95,18.34a2,2,0,0,1-1.95,2H4.7a2,2,0,0,1-1.95-2V4.65a2,2,0,0,1,2-1.95H19.78a2,2,0,0,1,1.95,2Z\"/><rect x=\"5.4\" y=\"5.35\" width=\"13.69\" height=\"13.69\" rx=\"2.06\"/><rect x=\"6.44\" y=\"6.39\" width=\"11.61\" height=\"11.61\" rx=\"1.02\"/><path d=\"M0,0H24V24H0Z\" style=\"fill:none\"/>`);\nexport const schemaModel = iconWrapper(svg`<path d=\"M3.4,16.79H9.09a1.71,1.71,0,0,0,1.85-1.55V8.85A1.8,1.8,0,0,0,9.09,7.21H3.4A1.71,1.71,0,0,0,1.55,8.76s0,.06,0,.09v6.3A1.7,1.7,0,0,0,3.3,16.79ZM14.91,23H20.6a1.7,1.7,0,0,0,1.85-1.54s0-.07,0-.1V15.06a1.8,1.8,0,0,0-1.86-1.64H14.91A1.71,1.71,0,0,0,13.06,15v6.38C12.93,22.31,13.85,23,14.91,23Zm0-12.55H20.6A1.7,1.7,0,0,0,22.45,8.9s0-.07,0-.1V2.65A1.79,1.79,0,0,0,20.6,1H14.91a1.7,1.7,0,0,0-1.85,1.54V8.94C12.93,9.76,13.85,10.44,14.91,10.44Z\" style=\"isolation:isolate\"/><path d=\"M0,0H24V24H0Z\" style=\"fill:none\"/>`);\nexport const schemaNamespace = iconWrapper(svg`<path d=\"M3.41,10.12H9.09a1.68,1.68,0,0,0,1.85-1.59V2.59A1.76,1.76,0,0,0,9.09,1H3.41A1.68,1.68,0,0,0,1.56,2.59V8.67A1.67,1.67,0,0,0,3.41,10.12Zm0,12.94H9.09a1.68,1.68,0,0,0,1.85-1.58V15.4a1.76,1.76,0,0,0-1.85-1.59H3.41A1.68,1.68,0,0,0,1.56,15.4v6.08A1.68,1.68,0,0,0,3.41,23.06Zm11.5,0h5.68a1.68,1.68,0,0,0,1.85-1.58V15.4a1.76,1.76,0,0,0-1.85-1.59H14.91a1.68,1.68,0,0,0-1.85,1.59v6.08C12.93,22.4,13.85,23.06,14.91,23.06Zm0-12.94h5.68a1.68,1.68,0,0,0,1.85-1.59V2.59A1.76,1.76,0,0,0,20.59,1H14.91a1.68,1.68,0,0,0-1.85,1.59V8.67C12.93,9.46,13.85,10.12,14.91,10.12Z\"/><path d=\"M0,0H24V24H0Z\" style=\"fill:none\"/>`);\nexport const search = iconWrapper(svg`<path d=\"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\"></path>`);\nexport const send = iconWrapper(svg`<path d=\"M2.01 21L23 12 2.01 3 2 10l15 2-15 2z\"></path>`);\nexport const settings = iconWrapper(svg`<path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z\"/>`);\nexport const space = iconWrapper(svg`<path d=\"M62.14,110.18a11.26,11.26,0,1,1-11.27,11.26,11.29,11.29,0,0,1,11.27-11.26m0-11.27a22.53,22.53,0,1,0,22.52,22.53A22.6,22.6,0,0,0,62.14,98.91Zm33.78-45A11.26,11.26,0,1,1,84.66,65.13,11.3,11.3,0,0,1,95.92,53.87m0-11.26a22.52,22.52,0,1,0,22.52,22.52A22.58,22.58,0,0,0,95.92,42.61Zm33.78,67.57a11.26,11.26,0,1,1-11.26,11.26,11.28,11.28,0,0,1,11.26-11.26m0-11.27a22.53,22.53,0,1,0,22.53,22.53A22.6,22.6,0,0,0,129.7,98.91Z\"/><rect width=\"192\" height=\"192\" style=\"fill:none\"/>`, 192, 192);\nexport const taskAlt = iconWrapper(svg`<rect fill=\"none\" height=\"24\" width=\"24\"/><path d=\"M22,5.18L10.59,16.6l-4.24-4.24l1.41-1.41l2.83,2.83l10-10L22,5.18z M19.79,10.22C19.92,10.79,20,11.39,20,12 c0,4.42-3.58,8-8,8s-8-3.58-8-8c0-4.42,3.58-8,8-8c1.58,0,3.04,0.46,4.28,1.25l1.44-1.44C16.1,2.67,14.13,2,12,2C6.48,2,2,6.48,2,12 c0,5.52,4.48,10,10,10s10-4.48,10-10c0-1.19-0.22-2.33-0.6-3.39L19.79,10.22z\"/>`);\nexport const timeline = iconWrapper(svg`<path d=\"M3 18Q2.175 18 1.588 17.413Q1 16.825 1 16Q1 15.175 1.588 14.587Q2.175 14 3 14Q3.15 14 3.263 14Q3.375 14 3.5 14.05L8.05 9.5Q8 9.375 8 9.262Q8 9.15 8 9Q8 8.175 8.588 7.587Q9.175 7 10 7Q10.825 7 11.413 7.587Q12 8.175 12 9Q12 9.05 11.95 9.5L14.5 12.05Q14.625 12 14.738 12Q14.85 12 15 12Q15.15 12 15.262 12Q15.375 12 15.5 12.05L19.05 8.5Q19 8.375 19 8.262Q19 8.15 19 8Q19 7.175 19.587 6.588Q20.175 6 21 6Q21.825 6 22.413 6.588Q23 7.175 23 8Q23 8.825 22.413 9.412Q21.825 10 21 10Q20.85 10 20.738 10Q20.625 10 20.5 9.95L16.95 13.5Q17 13.625 17 13.738Q17 13.85 17 14Q17 14.825 16.413 15.412Q15.825 16 15 16Q14.175 16 13.588 15.412Q13 14.825 13 14Q13 13.85 13 13.738Q13 13.625 13.05 13.5L10.5 10.95Q10.375 11 10.262 11Q10.15 11 10 11Q9.95 11 9.5 10.95L4.95 15.5Q5 15.625 5 15.738Q5 15.85 5 16Q5 16.825 4.412 17.413Q3.825 18 3 18Z\"/>`);\nexport const tune = iconWrapper(svg`<path d=\"M440 936V696h80v80h320v80H520v80h-80Zm-320-80v-80h240v80H120Zm160-160v-80H120v-80h160v-80h80v240h-80Zm160-80v-80h400v80H440Zm160-160V216h80v80h160v80H680v80h-80Zm-480-80v-80h400v80H120Z\"/>`, 960, 960, 0, 96);\nexport const viewGrid = iconWrapper(svg`<rect fill=\"none\" height=\"24\" width=\"24\"/><path d=\"M3,5v14h18V5H3z M7,7v2H5V7H7z M5,13v-2h2v2H5z M5,15h2v2H5V15z M19,17H9v-2h10V17z M19,13H9v-2h10V13z M19,9H9V7h10V9z\"/>`);\nexport const viewList = iconWrapper(svg`<g><rect fill=\"none\" height=\"24\" width=\"24\"/></g><path d=\"M3,3v8h8V3H3z M9,9H5V5h4V9z M3,13v8h8v-8H3z M9,19H5v-4h4V19z M13,3v8h8V3H13z M19,9h-4V5h4V9z M13,13v8h8v-8H13z M19,19h-4v-4h4V19z\"/>`);\nexport const visibility = iconWrapper(svg`<path d=\"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z\"></path>`);\nexport const visibilityOff = iconWrapper(svg`<path d=\"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z\"></path>`);\nexport const warning = iconWrapper(svg`<path d=\"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z\"></path>`);\n"]}
|
|
@@ -19,7 +19,7 @@ export interface UiDropdownListSelection {
|
|
|
19
19
|
*
|
|
20
20
|
* @slot - The default slot for the dropdown trigger (button)
|
|
21
21
|
* @slot dropdown - The slot for the list.
|
|
22
|
-
* @fires select - Custom event with the selected item on the `detail.item` when the user selected an item.
|
|
22
|
+
* @fires select - Custom event with the selected item on the `detail.item` when the user selected an item. When the event is cancelled then there's no side effects (closing the dropdown)
|
|
23
23
|
* @fires dropdownopen - An event informing other dropdowns that this one was opened and other should close.
|
|
24
24
|
* @fires open - An event dispatched when the open state change through a user interaction
|
|
25
25
|
*/
|
|
@@ -71,6 +71,12 @@ export default class UiDropdownList extends LitElement {
|
|
|
71
71
|
* @attribute
|
|
72
72
|
*/
|
|
73
73
|
matchTriggerWidth?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* When set it closes the drop-down when `tab` button is pressed.
|
|
76
|
+
* This is not a default behavior since the drop-down content can have its own logic
|
|
77
|
+
* related to tab index.
|
|
78
|
+
*/
|
|
79
|
+
closeOnTab?: boolean;
|
|
74
80
|
/**
|
|
75
81
|
* The first element located in the default slot.
|
|
76
82
|
*/
|
|
@@ -96,6 +102,8 @@ export default class UiDropdownList extends LitElement {
|
|
|
96
102
|
protected triggerKeyDownHandler(e: KeyboardEvent): void;
|
|
97
103
|
protected contentKeyDownHandler(e: KeyboardEvent): void;
|
|
98
104
|
protected contentClickHandler(e: PointerEvent): void;
|
|
105
|
+
close(): void;
|
|
106
|
+
protected contentCloseHandler(e: Event): void;
|
|
99
107
|
protected willUpdate(cp: PropertyValues<this>): void;
|
|
100
108
|
protected updated(cp: PropertyValues<this>): void;
|
|
101
109
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiDropdownList.d.ts","sourceRoot":"","sources":["../../../src/ui/list/UiDropdownList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAGvE,OAAO,EAAE,SAAS,EAAY,MAAM,6BAA6B,CAAC;AAElE,OAAO,EAAsB,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAK1G,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,WAAW,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU;IAEpD,SAAS,CAAC,QAAQ,EAAG,WAAW,EAAE,GAAG,IAAI,CAAC;IAG1C,SAAS,CAAC,SAAS,EAAG,WAAW,EAAE,GA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AE,YAAY,GAAG,IAAI;IAIpD,KAAK,IAAI,IAAI;IAMb,SAAS,CAAC,mBAAmB,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI;cAK1B,UAAU,CAAC,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;cAO1C,OAAO,CAAC,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAO1D;;;OAGG;IACH,SAAS,CAAC,kBAAkB,IAAI,IAAI;IAepC,SAAS,CAAC,aAAa,IAAI,IAAI;IAM/B,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI;IAWtC,SAAS,CAAC,YAAY,IAAI,IAAI;IAS9B,SAAS,CAAC,YAAY,IAAI,IAAI;IAW9B,SAAS,CAAC,YAAY,IAAI,IAAI;IAa9B,SAAS,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI;IAmClC,SAAS,CAAC,UAAU,IAAI,IAAI;cAWT,MAAM,IAAI,cAAc;IAc3C,SAAS,CAAC,aAAa,IAAI,cAAc;IAUzC,SAAS,CAAC,aAAa,IAAI,cAAc;CAiB1C"}
|
|
@@ -22,7 +22,7 @@ const itemRole = ['menuitem', 'menuitemcheckbox', 'menuitemradio'];
|
|
|
22
22
|
*
|
|
23
23
|
* @slot - The default slot for the dropdown trigger (button)
|
|
24
24
|
* @slot dropdown - The slot for the list.
|
|
25
|
-
* @fires select - Custom event with the selected item on the `detail.item` when the user selected an item.
|
|
25
|
+
* @fires select - Custom event with the selected item on the `detail.item` when the user selected an item. When the event is cancelled then there's no side effects (closing the dropdown)
|
|
26
26
|
* @fires dropdownopen - An event informing other dropdowns that this one was opened and other should close.
|
|
27
27
|
* @fires open - An event dispatched when the open state change through a user interaction
|
|
28
28
|
*/
|
|
@@ -80,9 +80,7 @@ export default class UiDropdownList extends LitElement {
|
|
|
80
80
|
if (e.composedPath()[0] === this) {
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
this.
|
|
84
|
-
this.updateExpanded();
|
|
85
|
-
this.notifyOpen();
|
|
83
|
+
this.close();
|
|
86
84
|
}
|
|
87
85
|
updateExpanded() {
|
|
88
86
|
this.setAttribute('aria-expanded', String(this.open));
|
|
@@ -140,10 +138,16 @@ export default class UiDropdownList extends LitElement {
|
|
|
140
138
|
}
|
|
141
139
|
}
|
|
142
140
|
contentKeyDownHandler(e) {
|
|
143
|
-
if (e.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
141
|
+
if (e.defaultPrevented) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
if (e.code === 'Escape') {
|
|
145
|
+
this.close();
|
|
146
|
+
}
|
|
147
|
+
else if (e.code === 'Tab') {
|
|
148
|
+
if (this.closeOnTab) {
|
|
149
|
+
this.close();
|
|
150
|
+
}
|
|
147
151
|
}
|
|
148
152
|
else if (['Enter', 'Space'].includes(e.code)) {
|
|
149
153
|
this.activate(e);
|
|
@@ -152,6 +156,15 @@ export default class UiDropdownList extends LitElement {
|
|
|
152
156
|
contentClickHandler(e) {
|
|
153
157
|
this.activate(e);
|
|
154
158
|
}
|
|
159
|
+
close() {
|
|
160
|
+
this.open = false;
|
|
161
|
+
this.updateExpanded();
|
|
162
|
+
this.notifyOpen();
|
|
163
|
+
}
|
|
164
|
+
contentCloseHandler(e) {
|
|
165
|
+
e.stopPropagation();
|
|
166
|
+
this.close();
|
|
167
|
+
}
|
|
155
168
|
willUpdate(cp) {
|
|
156
169
|
super.willUpdate(cp);
|
|
157
170
|
if ((cp.has('noOverlap') || cp.has('verticalAlign') || cp.has('horizontalAlign') || cp.has('open')) && this.open) {
|
|
@@ -195,9 +208,7 @@ export default class UiDropdownList extends LitElement {
|
|
|
195
208
|
if (inside) {
|
|
196
209
|
return;
|
|
197
210
|
}
|
|
198
|
-
this.
|
|
199
|
-
this.updateExpanded();
|
|
200
|
-
this.notifyOpen();
|
|
211
|
+
this.close();
|
|
201
212
|
}
|
|
202
213
|
toggleOpened() {
|
|
203
214
|
const { open } = this;
|
|
@@ -231,6 +242,9 @@ export default class UiDropdownList extends LitElement {
|
|
|
231
242
|
}
|
|
232
243
|
}
|
|
233
244
|
activate(e) {
|
|
245
|
+
if (e.defaultPrevented) {
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
234
248
|
const path = e.composedPath();
|
|
235
249
|
let item;
|
|
236
250
|
while (!item) {
|
|
@@ -248,14 +262,18 @@ export default class UiDropdownList extends LitElement {
|
|
|
248
262
|
if (!item) {
|
|
249
263
|
return;
|
|
250
264
|
}
|
|
251
|
-
|
|
265
|
+
const event = new CustomEvent('select', {
|
|
266
|
+
cancelable: true,
|
|
267
|
+
composed: true,
|
|
252
268
|
detail: {
|
|
253
269
|
item,
|
|
254
|
-
}
|
|
255
|
-
})
|
|
256
|
-
this.
|
|
257
|
-
|
|
258
|
-
|
|
270
|
+
},
|
|
271
|
+
});
|
|
272
|
+
this.dispatchEvent(event);
|
|
273
|
+
if (event.defaultPrevented) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
this.close();
|
|
259
277
|
}
|
|
260
278
|
notifyOpen() {
|
|
261
279
|
this.dispatchEvent(new Event('open'));
|
|
@@ -300,6 +318,7 @@ export default class UiDropdownList extends LitElement {
|
|
|
300
318
|
@slotchange="${this.dropdownChanged}"
|
|
301
319
|
@keydown="${this.contentKeyDownHandler}"
|
|
302
320
|
@click="${this.contentClickHandler}"
|
|
321
|
+
@close="${this.contentCloseHandler}"
|
|
303
322
|
></slot>
|
|
304
323
|
</div>
|
|
305
324
|
`;
|
|
@@ -335,6 +354,9 @@ __decorate([
|
|
|
335
354
|
__decorate([
|
|
336
355
|
property({ type: Boolean })
|
|
337
356
|
], UiDropdownList.prototype, "matchTriggerWidth", void 0);
|
|
357
|
+
__decorate([
|
|
358
|
+
property({ type: Boolean })
|
|
359
|
+
], UiDropdownList.prototype, "closeOnTab", void 0);
|
|
338
360
|
__decorate([
|
|
339
361
|
state()
|
|
340
362
|
], UiDropdownList.prototype, "overlayPositioning", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiDropdownList.js","sourceRoot":"","sources":["../../../src/ui/list/UiDropdownList.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkC,MAAM,KAAK,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAa,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAa,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAA0C,MAAM,8BAA8B,CAAC;AAC1G,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,MAAM,QAAQ,GAAG,CAAC,UAAU,EAAE,kBAAkB,EAAE,eAAe,CAAC,CAAC;AAMnE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU;IA4DpD;;OAEG;IACH,IAAc,OAAO;QACnB,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;QAC1B,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;YACjC,OAAO,IAAI,CAAC;SACb;QACD,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC;QAC1B,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,IAAc,QAAQ;QACpB,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;YACnC,OAAO,IAAI,CAAC;SACb;QACD,MAAM,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;QAC5B,OAAO,OAAO,CAAC;IACjB,CAAC;IAID;QACE,KAAK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xC,CAAC;IACJ,CAAC;IAES,aAAa;QACrB,MAAM,aAAa,GAAG,IAAI,CAAC,kBAAkB,IAAI,EAAE,CAAC;QACpD,OAAO,IAAI,CAAA;;;eAGA,QAAQ,CAAC,aAAa,CAAC;;;;uBAIf,IAAI,CAAC,eAAe;oBACvB,IAAI,CAAC,qBAAqB;kBAC5B,IAAI,CAAC,mBAAmB;;;KAGrC,CAAC;IACJ,CAAC;CACF;AApWC;IADC,qBAAqB,EAAE;gDACkB;AAG1C;IADC,qBAAqB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;iDACD;AAElC;IAAR,KAAK,EAAE;iDAAuD;AAEtD;IAAR,KAAK,EAAE;8CAAiD;AAMb;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAAc;AAWd;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qDAAmC;AAWlC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uDAAuC;AAQrC;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAAqB;AAMnC;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2DAA+B;AAO9B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yDAA6B;AA0BhD;IAAR,KAAK,EAAE;0DAA0C","sourcesContent":["import { html, LitElement, PropertyValues, TemplateResult } from \"lit\";\nimport { property, queryAssignedElements, state } from \"lit/decorators.js\";\nimport { ClassInfo, classMap } from \"lit/directives/class-map.js\";\nimport { StyleInfo, styleMap } from \"lit/directives/style-map.js\";\nimport { randomString } from \"../../lib/Random.js\";\nimport { ElementPositioning, HorizontalAlignment, VerticalAlignment } from \"../lib/ElementPositioning.js\";\nimport { ScrollHelper } from \"../lib/ScrollHelper.js\";\n\nconst itemRole = ['menuitem', 'menuitemcheckbox', 'menuitemradio'];\n\nexport interface UiDropdownListSelection {\n item: HTMLElement;\n}\n\n/**\n * An overlay list rendered over a button.\n * \n * Examples:\n * \n * <ui-dropdown-list>\n * <ui-button>Click me</ui-button>\n * <ui-list slot=\"dropdown\" role=\"menu\">\n * <ui-list-item role=\"menuitem\">Item 1</ui-list-item>\n * <ui-list-item role=\"menuitem\">Item 2</ui-list-item>\n * </ui-list>\n * </ui-dropdown-list>\n * \n * @slot - The default slot for the dropdown trigger (button) \n * @slot dropdown - The slot for the list.\n * @fires select - Custom event with the selected item on the `detail.item` when the user selected an item.\n * @fires dropdownopen - An event informing other dropdowns that this one was opened and other should close.\n * @fires open - An event dispatched when the open state change through a user interaction\n */\nexport default class UiDropdownList extends LitElement {\n @queryAssignedElements()\n protected triggers!: HTMLElement[] | null;\n\n @queryAssignedElements({ slot: 'dropdown' })\n protected dropdowns!: HTMLElement[] | null;\n\n @state() protected triggerId = `ui-trigger-${randomString(4)}`;\n\n @state() protected menuId = `ui-menu-${randomString(4)}`;\n\n /**\n * Whether the menu is opened.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The vertical (y-axis) alignment of the dropdown content.\n * - top\n * - bottom\n * - middle\n * \n * No value means the natural position according to the box model.\n * @attribute\n */\n @property({ type: String, reflect: true }) verticalAlign?: VerticalAlignment;\n\n /**\n * The horizontal (x-axis) alignment of the dropdown content.\n * - top\n * - bottom\n * - middle\n * \n * No value means the natural position according to the box model.\n * @attribute\n */\n @property({ type: String, reflect: true }) horizontalAlign?: HorizontalAlignment;\n\n /**\n * Affects the `horizontal` and `vertical` positioning so that the target element does not overlap with the anchor.\n * For example, when the `vertical` align is `top`, the top edge of the target will be rendered at the bottom \n * of the anchor down to the edge of the viewport.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) noOverlap?: boolean;\n\n /**\n * When set it closes the opened list when registering a click outside the list.\n * @attribute\n */\n @property({ type: Boolean }) closeOnOutsideClick?: boolean;\n\n /**\n * When set it makes the drop-down to match the width of the trigger.\n * Be careful as this may crop the content when the trigger is not wide enough.\n * @attribute\n */\n @property({ type: Boolean }) matchTriggerWidth?: boolean;\n\n /**\n * The first element located in the default slot.\n */\n protected get trigger(): HTMLElement | null {\n const { triggers } = this;\n if (!triggers || !triggers.length) {\n return null;\n }\n const [button] = triggers;\n return button;\n }\n\n /**\n * The first element located in the \"dropdown\" slot.\n */\n protected get dropdown(): HTMLElement | null {\n const { dropdowns } = this;\n if (!dropdowns || !dropdowns.length) {\n return null;\n }\n const [content] = dropdowns;\n return content;\n }\n\n @state() protected overlayPositioning?: StyleInfo;\n\n constructor() {\n super();\n this.dropdownOpenHandler = this.dropdownOpenHandler.bind(this);\n this.scrollHandler = this.scrollHandler.bind(this);\n this.clickHandler = this.clickHandler.bind(this);\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n window.addEventListener('dropdownopen', this.dropdownOpenHandler);\n window.addEventListener('click', this.clickHandler, { capture: true });\n ScrollHelper.addListeners(this, this.scrollHandler);\n\n this.setAttribute('aria-haspopup', 'menu');\n this.setAttribute('aria-expanded', 'false');\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener('dropdownopen', this.dropdownOpenHandler);\n window.removeEventListener('click', this.clickHandler, { capture: true });\n ScrollHelper.removeListeners(this);\n }\n\n protected dropdownOpenHandler(e: Event): void {\n if (e.composedPath()[0] === this) {\n return;\n }\n this.open = false;\n this.updateExpanded();\n this.notifyOpen();\n }\n\n protected updateExpanded(): void {\n this.setAttribute('aria-expanded', String(this.open));\n }\n\n protected triggerChanged(): void {\n const { trigger } = this;\n if (!trigger) {\n return;\n }\n this.decorateTrigger(trigger);\n }\n\n protected dropdownChanged(): void {\n const { dropdown } = this;\n if (!dropdown) {\n return;\n }\n this.decorateDropdown(dropdown);\n }\n\n /**\n * Decorates the trigger with aria attributes.\n */\n protected decorateTrigger(button: HTMLElement): void {\n button.setAttribute('aria-controls', this.menuId);\n button.setAttribute('tabindex', '0');\n if (button.id) {\n this.triggerId = button.id;\n } else {\n // eslint-disable-next-line no-param-reassign\n button.id = this.triggerId;\n }\n }\n\n protected decorateDropdown(list: HTMLElement): void {\n if (!list.hasAttribute('role')) {\n list.setAttribute('role', 'menu');\n }\n if (!list.hasAttribute('aria-labelledby')) {\n list.setAttribute('aria-labelledby', this.triggerId);\n }\n list.setAttribute('tabindex', '-1');\n // eslint-disable-next-line no-param-reassign\n list.id = this.menuId;\n }\n\n protected triggerClickHandler(): void {\n this.open = !this.open;\n this.updateExpanded();\n this.notifyOpen();\n }\n\n protected triggerKeyDownHandler(e: KeyboardEvent): void {\n if (['Enter', 'Space', 'ArrowDown', 'ArrowUp'].includes(e.code)) {\n e.preventDefault();\n this.open = true;\n this.updateExpanded();\n this.notifyOpen();\n }\n }\n\n protected contentKeyDownHandler(e: KeyboardEvent): void {\n if (e.code === 'Escape' || e.code === 'Tab') {\n this.open = false;\n this.updateExpanded();\n this.notifyOpen();\n } else if (['Enter', 'Space'].includes(e.code)) {\n this.activate(e);\n }\n }\n\n protected contentClickHandler(e: PointerEvent): void {\n this.activate(e);\n }\n\n protected override willUpdate(cp: PropertyValues<this>): void {\n super.willUpdate(cp);\n if ((cp.has('noOverlap') || cp.has('verticalAlign') || cp.has('horizontalAlign') || cp.has('open')) && this.open) {\n this.computePositioning();\n }\n }\n\n protected override updated(cp: PropertyValues<this>): void {\n super.updated(cp);\n if (cp.has('open')) {\n this.toggleOpened();\n }\n }\n\n /**\n * Since the container for the dropdown content is positioned as fixed\n * we need to position the dropdown according to the configured rules.\n */\n protected computePositioning(): void {\n const { trigger, dropdown } = this;\n if (!trigger || !dropdown) {\n return;\n }\n this.overlayPositioning = ElementPositioning.positionOverlay(dropdown, trigger, {\n horizontal: this.horizontalAlign,\n vertical: this.verticalAlign,\n noOverlap: this.noOverlap,\n constrain: true,\n constrainPaddingY: 20,\n matchAnchorWidth: this.matchTriggerWidth,\n });\n }\n\n protected scrollHandler(): void {\n if (this.open) {\n this.computePositioning();\n }\n }\n\n protected clickHandler(e: Event): void {\n if (!this.open || !this.closeOnOutsideClick) {\n return;\n }\n const inside = e.composedPath().some(i => i === this);\n if (inside) {\n return;\n }\n this.open = false;\n this.updateExpanded();\n this.notifyOpen();\n }\n\n protected toggleOpened(): void {\n const { open } = this;\n if (open) {\n this.handleOpened();\n } else {\n this.handleClosed();\n }\n }\n\n protected handleOpened(): void {\n const { trigger, dropdown } = this;\n if (trigger) {\n trigger.removeAttribute('tabindex');\n }\n if (dropdown) {\n dropdown.setAttribute('tabindex', '0');\n dropdown.focus();\n }\n }\n\n protected handleClosed(): void {\n const { trigger, dropdown } = this;\n if (trigger) {\n trigger.setAttribute('tabindex', '0');\n if (this.matches(':focus-within')) {\n trigger.focus();\n }\n }\n if (dropdown) {\n dropdown.removeAttribute('tabindex');\n }\n }\n\n protected activate(e: Event): void {\n const path = e.composedPath();\n let item: HTMLElement | undefined;\n while (!item) {\n const next = path.shift() as Element;\n if (next === this) {\n break;\n }\n if (next.nodeType !== Node.ELEMENT_NODE) {\n continue;\n }\n if (itemRole.includes(next.getAttribute('role') || '')) {\n item = next as HTMLElement;\n }\n }\n if (!item) {\n return;\n }\n this.dispatchEvent(new CustomEvent<UiDropdownListSelection>('select', {\n detail: {\n item,\n }\n }));\n this.open = false;\n this.updateExpanded();\n this.notifyOpen();\n }\n\n protected notifyOpen(): void {\n this.dispatchEvent(new Event('open'));\n if (this.open) {\n this.dispatchEvent(new Event('dropdownopen', {\n bubbles: true,\n composed: true,\n cancelable: true,\n }));\n }\n }\n\n protected override render(): TemplateResult {\n const classes: ClassInfo = {\n container: true,\n open: this.open,\n };\n \n return html`\n <div class=\"${classMap(classes)}\">\n ${this.renderTrigger()}\n ${this.renderContent()}\n </div>\n `;\n }\n\n protected renderTrigger(): TemplateResult {\n return html`\n <div \n class=\"trigger\" \n @click=\"${this.triggerClickHandler}\" \n @keydown=\"${this.triggerKeyDownHandler}\"\n ><slot @slotchange=\"${this.triggerChanged}\"></slot></div>\n `;\n }\n\n protected renderContent(): TemplateResult {\n const contentStyles = this.overlayPositioning || {};\n return html`\n <div \n class=\"content\" \n style=\"${styleMap(contentStyles)}\"\n >\n <slot \n name=\"dropdown\" \n @slotchange=\"${this.dropdownChanged}\" \n @keydown=\"${this.contentKeyDownHandler}\" \n @click=\"${this.contentClickHandler}\"\n ></slot>\n </div>\n `;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"UiDropdownList.js","sourceRoot":"","sources":["../../../src/ui/list/UiDropdownList.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkC,MAAM,KAAK,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAa,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAa,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAA0C,MAAM,8BAA8B,CAAC;AAC1G,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,MAAM,QAAQ,GAAG,CAAC,UAAU,EAAE,kBAAkB,EAAE,eAAe,CAAC,CAAC;AAMnE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU;IAmEpD;;OAEG;IACH,IAAc,OAAO;QACnB,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;QAC1B,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;YACjC,OAAO,IAAI,CAAC;SACb;QACD,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC;QAC1B,OAAO,MAAM,CAAC;IAChB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AE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uDAAuC;AAQrC;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAAqB;AAMnC;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2DAA+B;AAO9B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yDAA6B;AAO5B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;kDAAsB;AA0BzC;IAAR,KAAK,EAAE;0DAA0C","sourcesContent":["import { html, LitElement, PropertyValues, TemplateResult } from \"lit\";\nimport { property, queryAssignedElements, state } from \"lit/decorators.js\";\nimport { ClassInfo, classMap } from \"lit/directives/class-map.js\";\nimport { StyleInfo, styleMap } from \"lit/directives/style-map.js\";\nimport { randomString } from \"../../lib/Random.js\";\nimport { ElementPositioning, HorizontalAlignment, VerticalAlignment } from \"../lib/ElementPositioning.js\";\nimport { ScrollHelper } from \"../lib/ScrollHelper.js\";\n\nconst itemRole = ['menuitem', 'menuitemcheckbox', 'menuitemradio'];\n\nexport interface UiDropdownListSelection {\n item: HTMLElement;\n}\n\n/**\n * An overlay list rendered over a button.\n * \n * Examples:\n * \n * <ui-dropdown-list>\n * <ui-button>Click me</ui-button>\n * <ui-list slot=\"dropdown\" role=\"menu\">\n * <ui-list-item role=\"menuitem\">Item 1</ui-list-item>\n * <ui-list-item role=\"menuitem\">Item 2</ui-list-item>\n * </ui-list>\n * </ui-dropdown-list>\n * \n * @slot - The default slot for the dropdown trigger (button) \n * @slot dropdown - The slot for the list.\n * @fires select - Custom event with the selected item on the `detail.item` when the user selected an item. When the event is cancelled then there's no side effects (closing the dropdown)\n * @fires dropdownopen - An event informing other dropdowns that this one was opened and other should close.\n * @fires open - An event dispatched when the open state change through a user interaction\n */\nexport default class UiDropdownList extends LitElement {\n @queryAssignedElements()\n protected triggers!: HTMLElement[] | null;\n\n @queryAssignedElements({ slot: 'dropdown' })\n protected dropdowns!: HTMLElement[] | null;\n\n @state() protected triggerId = `ui-trigger-${randomString(4)}`;\n\n @state() protected menuId = `ui-menu-${randomString(4)}`;\n\n /**\n * Whether the menu is opened.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The vertical (y-axis) alignment of the dropdown content.\n * - top\n * - bottom\n * - middle\n * \n * No value means the natural position according to the box model.\n * @attribute\n */\n @property({ type: String, reflect: true }) verticalAlign?: VerticalAlignment;\n\n /**\n * The horizontal (x-axis) alignment of the dropdown content.\n * - top\n * - bottom\n * - middle\n * \n * No value means the natural position according to the box model.\n * @attribute\n */\n @property({ type: String, reflect: true }) horizontalAlign?: HorizontalAlignment;\n\n /**\n * Affects the `horizontal` and `vertical` positioning so that the target element does not overlap with the anchor.\n * For example, when the `vertical` align is `top`, the top edge of the target will be rendered at the bottom \n * of the anchor down to the edge of the viewport.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) noOverlap?: boolean;\n\n /**\n * When set it closes the opened list when registering a click outside the list.\n * @attribute\n */\n @property({ type: Boolean }) closeOnOutsideClick?: boolean;\n\n /**\n * When set it makes the drop-down to match the width of the trigger.\n * Be careful as this may crop the content when the trigger is not wide enough.\n * @attribute\n */\n @property({ type: Boolean }) matchTriggerWidth?: boolean;\n\n /**\n * When set it closes the drop-down when `tab` button is pressed.\n * This is not a default behavior since the drop-down content can have its own logic\n * related to tab index.\n */\n @property({ type: Boolean }) closeOnTab?: boolean;\n\n /**\n * The first element located in the default slot.\n */\n protected get trigger(): HTMLElement | null {\n const { triggers } = this;\n if (!triggers || !triggers.length) {\n return null;\n }\n const [button] = triggers;\n return button;\n }\n\n /**\n * The first element located in the \"dropdown\" slot.\n */\n protected get dropdown(): HTMLElement | null {\n const { dropdowns } = this;\n if (!dropdowns || !dropdowns.length) {\n return null;\n }\n const [content] = dropdowns;\n return content;\n }\n\n @state() protected overlayPositioning?: StyleInfo;\n\n constructor() {\n super();\n this.dropdownOpenHandler = this.dropdownOpenHandler.bind(this);\n this.scrollHandler = this.scrollHandler.bind(this);\n this.clickHandler = this.clickHandler.bind(this);\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n window.addEventListener('dropdownopen', this.dropdownOpenHandler);\n window.addEventListener('click', this.clickHandler, { capture: true });\n ScrollHelper.addListeners(this, this.scrollHandler);\n\n this.setAttribute('aria-haspopup', 'menu');\n this.setAttribute('aria-expanded', 'false');\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener('dropdownopen', this.dropdownOpenHandler);\n window.removeEventListener('click', this.clickHandler, { capture: true });\n ScrollHelper.removeListeners(this);\n }\n\n protected dropdownOpenHandler(e: Event): void {\n if (e.composedPath()[0] === this) {\n return;\n }\n this.close();\n }\n\n protected updateExpanded(): void {\n this.setAttribute('aria-expanded', String(this.open));\n }\n\n protected triggerChanged(): void {\n const { trigger } = this;\n if (!trigger) {\n return;\n }\n this.decorateTrigger(trigger);\n }\n\n protected dropdownChanged(): void {\n const { dropdown } = this;\n if (!dropdown) {\n return;\n }\n this.decorateDropdown(dropdown);\n }\n\n /**\n * Decorates the trigger with aria attributes.\n */\n protected decorateTrigger(button: HTMLElement): void {\n button.setAttribute('aria-controls', this.menuId);\n button.setAttribute('tabindex', '0');\n if (button.id) {\n this.triggerId = button.id;\n } else {\n // eslint-disable-next-line no-param-reassign\n button.id = this.triggerId;\n }\n }\n\n protected decorateDropdown(list: HTMLElement): void {\n if (!list.hasAttribute('role')) {\n list.setAttribute('role', 'menu');\n }\n if (!list.hasAttribute('aria-labelledby')) {\n list.setAttribute('aria-labelledby', this.triggerId);\n }\n list.setAttribute('tabindex', '-1');\n // eslint-disable-next-line no-param-reassign\n list.id = this.menuId;\n }\n\n protected triggerClickHandler(): void {\n this.open = !this.open;\n this.updateExpanded();\n this.notifyOpen();\n }\n\n protected triggerKeyDownHandler(e: KeyboardEvent): void {\n if (['Enter', 'Space', 'ArrowDown', 'ArrowUp'].includes(e.code)) {\n e.preventDefault();\n this.open = true;\n this.updateExpanded();\n this.notifyOpen();\n }\n }\n\n protected contentKeyDownHandler(e: KeyboardEvent): void {\n if (e.defaultPrevented) {\n return;\n }\n if (e.code === 'Escape') {\n this.close();\n } else if (e.code === 'Tab') {\n if (this.closeOnTab) {\n this.close();\n }\n } else if (['Enter', 'Space'].includes(e.code)) {\n this.activate(e);\n }\n }\n\n protected contentClickHandler(e: PointerEvent): void {\n this.activate(e);\n }\n\n close(): void {\n this.open = false;\n this.updateExpanded();\n this.notifyOpen();\n }\n\n protected contentCloseHandler(e: Event): void {\n e.stopPropagation();\n this.close();\n }\n\n protected override willUpdate(cp: PropertyValues<this>): void {\n super.willUpdate(cp);\n if ((cp.has('noOverlap') || cp.has('verticalAlign') || cp.has('horizontalAlign') || cp.has('open')) && this.open) {\n this.computePositioning();\n }\n }\n\n protected override updated(cp: PropertyValues<this>): void {\n super.updated(cp);\n if (cp.has('open')) {\n this.toggleOpened();\n }\n }\n\n /**\n * Since the container for the dropdown content is positioned as fixed\n * we need to position the dropdown according to the configured rules.\n */\n protected computePositioning(): void {\n const { trigger, dropdown } = this;\n if (!trigger || !dropdown) {\n return;\n }\n this.overlayPositioning = ElementPositioning.positionOverlay(dropdown, trigger, {\n horizontal: this.horizontalAlign,\n vertical: this.verticalAlign,\n noOverlap: this.noOverlap,\n constrain: true,\n constrainPaddingY: 20,\n matchAnchorWidth: this.matchTriggerWidth,\n });\n }\n\n protected scrollHandler(): void {\n if (this.open) {\n this.computePositioning();\n }\n }\n\n protected clickHandler(e: Event): void {\n if (!this.open || !this.closeOnOutsideClick) {\n return;\n }\n const inside = e.composedPath().some(i => i === this);\n if (inside) {\n return;\n }\n this.close();\n }\n\n protected toggleOpened(): void {\n const { open } = this;\n if (open) {\n this.handleOpened();\n } else {\n this.handleClosed();\n }\n }\n\n protected handleOpened(): void {\n const { trigger, dropdown } = this;\n if (trigger) {\n trigger.removeAttribute('tabindex');\n }\n if (dropdown) {\n dropdown.setAttribute('tabindex', '0');\n dropdown.focus();\n }\n }\n\n protected handleClosed(): void {\n const { trigger, dropdown } = this;\n if (trigger) {\n trigger.setAttribute('tabindex', '0');\n if (this.matches(':focus-within')) {\n trigger.focus();\n }\n }\n if (dropdown) {\n dropdown.removeAttribute('tabindex');\n }\n }\n\n protected activate(e: Event): void {\n if (e.defaultPrevented) {\n return;\n }\n const path = e.composedPath();\n let item: HTMLElement | undefined;\n while (!item) {\n const next = path.shift() as Element;\n if (next === this) {\n break;\n }\n if (next.nodeType !== Node.ELEMENT_NODE) {\n continue;\n }\n if (itemRole.includes(next.getAttribute('role') || '')) {\n item = next as HTMLElement;\n }\n }\n if (!item) {\n return;\n }\n const event = new CustomEvent<UiDropdownListSelection>('select', {\n cancelable: true,\n composed: true,\n detail: {\n item,\n },\n })\n this.dispatchEvent(event);\n if (event.defaultPrevented) {\n return;\n }\n this.close();\n }\n\n protected notifyOpen(): void {\n this.dispatchEvent(new Event('open'));\n if (this.open) {\n this.dispatchEvent(new Event('dropdownopen', {\n bubbles: true,\n composed: true,\n cancelable: true,\n }));\n }\n }\n\n protected override render(): TemplateResult {\n const classes: ClassInfo = {\n container: true,\n open: this.open,\n };\n \n return html`\n <div class=\"${classMap(classes)}\">\n ${this.renderTrigger()}\n ${this.renderContent()}\n </div>\n `;\n }\n\n protected renderTrigger(): TemplateResult {\n return html`\n <div \n class=\"trigger\" \n @click=\"${this.triggerClickHandler}\" \n @keydown=\"${this.triggerKeyDownHandler}\"\n ><slot @slotchange=\"${this.triggerChanged}\"></slot></div>\n `;\n }\n\n protected renderContent(): TemplateResult {\n const contentStyles = this.overlayPositioning || {};\n return html`\n <div \n class=\"content\" \n style=\"${styleMap(contentStyles)}\"\n >\n <slot \n name=\"dropdown\" \n @slotchange=\"${this.dropdownChanged}\" \n @keydown=\"${this.contentKeyDownHandler}\" \n @click=\"${this.contentClickHandler}\"\n @close=\"${this.contentCloseHandler}\"\n ></slot>\n </div>\n `;\n }\n}\n"]}
|
package/dist/ui/list/UiList.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export default class UiList extends LitElement {
|
|
|
25
25
|
protected assignedElements: HTMLElement[] | null;
|
|
26
26
|
constructor();
|
|
27
27
|
connectedCallback(): void;
|
|
28
|
+
focus(options?: FocusOptions): void;
|
|
28
29
|
firstUpdated(changedProperties: PropertyValues): void;
|
|
29
30
|
activateFirstItem(): void;
|
|
30
31
|
activateLastItem(): void;
|
|
@@ -66,7 +67,11 @@ export default class UiList extends LitElement {
|
|
|
66
67
|
* Activate means dispatches a non-bubbling CustomEvent with the item in the detail.
|
|
67
68
|
*/
|
|
68
69
|
protected activateFromEvent(e: Event): void;
|
|
69
|
-
|
|
70
|
+
/**
|
|
71
|
+
* @param item The UiListItem that is selected.
|
|
72
|
+
* @returns True when the event was canceled.
|
|
73
|
+
*/
|
|
74
|
+
notifySelect(item: UiListItem): boolean;
|
|
70
75
|
protected manageSelection(item: UiListItem): void;
|
|
71
76
|
render(): TemplateResult;
|
|
72
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiList.d.ts","sourceRoot":"","sources":["../../../src/ui/list/UiList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAEvE,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAczC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,UAAU;IAC5C,KAAK,EAAE,UAAU,EAAE,CAAM;IAEzB,cAAc,EAAE,UAAU,GAAG,IAAI,CAAQ;IAEzC,iBAAiB,EAAE,UAAU,GAAG,IAAI,CAAQ;IAE5C;;;;OAIG;IACyB,QAAQ,EAAE,MAAM,CAAC;IAE7C;;;OAGG;IAC0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AAG,UAAU;IA0BzC,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO;IAarD,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;IAIrD,SAAS,CAAC,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAIpD,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAMlD,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAoCzC,aAAa,IAAI,IAAI;IAOrB,YAAY,IAAI,IAAI;IAOpB,YAAY,CAAC,IAAI,oBAAsB,GAAG,IAAI;IAO9C,gBAAgB,CAAC,IAAI,oBAAsB,GAAG,IAAI;IAOlD;;;OAGG;IACH,aAAa,CAAC,IAAI,oBAAyB,GAAG,IAAI;IAKlD;;;OAGG;IACH,iBAAiB,CAAC,IAAI,oBAAyB,GAAG,IAAI;IAKtD,cAAc,IAAI,IAAI;IAKtB,aAAa,IAAI,IAAI;IAKrB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAIpC,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI;IAWhD;;;OAGG;IACH,SAAS,CAAC,iBAAiB,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI;IAwB3C;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;IAgBvC,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IASxC,MAAM,IAAI,cAAc;CAGlC"}
|
package/dist/ui/list/UiList.js
CHANGED
|
@@ -30,13 +30,21 @@ export default class UiList extends LitElement {
|
|
|
30
30
|
this.setAttribute('tabindex', '0');
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
+
focus(options) {
|
|
34
|
+
const { activeListItem } = this;
|
|
35
|
+
if (activeListItem) {
|
|
36
|
+
activeListItem.focus(options);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
this.activateFirstItem();
|
|
40
|
+
}
|
|
33
41
|
firstUpdated(changedProperties) {
|
|
34
42
|
super.firstUpdated(changedProperties);
|
|
35
43
|
this.updateItems();
|
|
36
44
|
}
|
|
37
45
|
activateFirstItem() {
|
|
38
46
|
this.activeListItem = this.getFirstItem();
|
|
39
|
-
this.activeListItem
|
|
47
|
+
this.activeListItem?.activate();
|
|
40
48
|
}
|
|
41
49
|
activateLastItem() {
|
|
42
50
|
this.activeListItem = this.getLastItem();
|
|
@@ -259,28 +267,35 @@ export default class UiList extends LitElement {
|
|
|
259
267
|
this.manageSelection(item);
|
|
260
268
|
item.activate();
|
|
261
269
|
this.activeListItem = item;
|
|
262
|
-
this.notifySelect(item)
|
|
270
|
+
if (this.notifySelect(item)) {
|
|
271
|
+
e.preventDefault();
|
|
272
|
+
}
|
|
263
273
|
}
|
|
274
|
+
/**
|
|
275
|
+
* @param item The UiListItem that is selected.
|
|
276
|
+
* @returns True when the event was canceled.
|
|
277
|
+
*/
|
|
264
278
|
notifySelect(item) {
|
|
265
279
|
const index = this.items.indexOf(item);
|
|
266
280
|
if (index === -1) {
|
|
267
|
-
return;
|
|
281
|
+
return false;
|
|
268
282
|
}
|
|
269
|
-
|
|
283
|
+
const event = new CustomEvent('select', {
|
|
284
|
+
cancelable: true,
|
|
270
285
|
detail: {
|
|
271
286
|
item,
|
|
272
287
|
index,
|
|
273
288
|
}
|
|
274
|
-
})
|
|
289
|
+
});
|
|
290
|
+
this.dispatchEvent(event);
|
|
291
|
+
return event.defaultPrevented;
|
|
275
292
|
}
|
|
276
293
|
manageSelection(item) {
|
|
277
294
|
if (!this.selectActive) {
|
|
278
295
|
return;
|
|
279
296
|
}
|
|
280
|
-
const {
|
|
281
|
-
|
|
282
|
-
activeListItem.classList.remove('select');
|
|
283
|
-
}
|
|
297
|
+
const { items } = this;
|
|
298
|
+
items.forEach((current) => current.classList.remove('select'));
|
|
284
299
|
item.classList.add('select');
|
|
285
300
|
}
|
|
286
301
|
render() {
|