@quartzds/core 1.0.0-beta.122 → 1.0.0-beta.124
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/CHANGELOG.md +50 -0
- package/components/index.js +1 -1
- package/components/{p-CVuTVnQo.js → p-B6ToH-uM.js} +4 -4
- package/components/p-B6ToH-uM.js.map +1 -0
- package/components/{p-oqmnh-8P.js → p-BGAgQ6J5.js} +5 -5
- package/components/p-BGAgQ6J5.js.map +1 -0
- package/components/{p-DCAlWquR.js → p-BPNu4xuI.js} +8 -8
- package/components/{p-DCAlWquR.js.map → p-BPNu4xuI.js.map} +1 -1
- package/components/{p-io1iVgY1.js → p-BceRDckL.js} +5 -5
- package/components/p-BceRDckL.js.map +1 -0
- package/components/{p-BalM52S_.js → p-Bm_hrsjc.js} +6 -3
- package/components/p-Bm_hrsjc.js.map +1 -0
- package/components/{p-DgYrfIr_.js → p-BxrR19WD.js} +7 -9
- package/components/p-BxrR19WD.js.map +1 -0
- package/components/{p-DRcxeXWE.js → p-CsIsG3ra.js} +75 -39
- package/components/p-CsIsG3ra.js.map +1 -0
- package/components/p-D5u-bDNf.js +102 -0
- package/components/p-D5u-bDNf.js.map +1 -0
- package/components/{p-C0VgKX4J.js → p-DVXvtEPn.js} +5 -5
- package/components/{p-C0VgKX4J.js.map → p-DVXvtEPn.js.map} +1 -1
- package/components/{p-yb0Kv4Y6.js → p-De7cAKF1.js} +24 -9
- package/components/p-De7cAKF1.js.map +1 -0
- package/components/{p-C9R8N06B.js → p-EjoVBa5a.js} +3 -3
- package/components/{p-C9R8N06B.js.map → p-EjoVBa5a.js.map} +1 -1
- package/components/{p-CKp062X8.js → p-Vtb6GsBy.js} +6 -6
- package/components/{p-CKp062X8.js.map → p-Vtb6GsBy.js.map} +1 -1
- package/components/qds-action-item.js +3 -3
- package/components/qds-avatar-media.js +1 -1
- package/components/qds-breadcrumb-item.js +11 -6
- package/components/qds-breadcrumb-item.js.map +1 -1
- package/components/qds-button.js +8 -8
- package/components/qds-button.js.map +1 -1
- package/components/qds-checkbox.js +1 -1
- package/components/qds-chip.js +5 -5
- package/components/qds-chip.js.map +1 -1
- package/components/qds-dialog.js +5 -5
- package/components/qds-dialog.js.map +1 -1
- package/components/qds-divider.js +1 -1
- package/components/qds-dropdown.js +1 -1
- package/components/qds-form-message.js +23 -17
- package/components/qds-form-message.js.map +1 -1
- package/components/qds-icon-button.js +1 -1
- package/components/qds-icon-tab.js +4 -4
- package/components/qds-icon.js +1 -1
- package/components/qds-inline-link.js +5 -5
- package/components/qds-inline-link.js.map +1 -1
- package/components/qds-input.js +3 -3
- package/components/qds-label.js +2 -2
- package/components/qds-list-item.js +16 -13
- package/components/qds-list-item.js.map +1 -1
- package/components/qds-loader.js +2 -2
- package/components/qds-menu-item.js +38 -12
- package/components/qds-menu-item.js.map +1 -1
- package/components/qds-mini-button.js +1 -1
- package/components/qds-progress-bar.js +2 -2
- package/components/qds-radio.js +1 -1
- package/components/qds-select.js +3 -3
- package/components/qds-select.js.map +1 -1
- package/components/qds-standalone-link.js +4 -4
- package/components/qds-switch.js +6 -6
- package/components/qds-switch.js.map +1 -1
- package/components/qds-tab.js +7 -7
- package/components/qds-tab.js.map +1 -1
- package/components/qds-tabbar.js +59 -38
- package/components/qds-tabbar.js.map +1 -1
- package/components/qds-table-cell.js +2 -2
- package/components/qds-table-head-cell.js +2 -2
- package/components/qds-table-row.js +1 -1
- package/components/qds-table.js +1 -1
- package/components/qds-tag.js +1 -1
- package/components/qds-textarea.js +4 -4
- package/components/qds-textarea.js.map +1 -1
- package/components/qds-title.js +1 -1
- package/components/qds-tooltip.js +1 -1
- package/dist/cjs/{helpers-Qs3cpKiI.js → helpers-CPSgo4Ef.js} +8 -2
- package/dist/cjs/{helpers-Qs3cpKiI.js.map → helpers-CPSgo4Ef.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qds-action-item.cjs.entry.js +1 -1
- package/dist/cjs/qds-avatar-media.qds-checkbox.qds-radio.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-avatar-media_3.cjs.entry.js +72 -36
- package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +9 -4
- package/dist/cjs/qds-breadcrumb-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-button.cjs.entry.js +6 -6
- package/dist/cjs/qds-button.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-chip.cjs.entry.js +2 -2
- package/dist/cjs/qds-chip.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-dialog.cjs.entry.js +2 -2
- package/dist/cjs/qds-dialog.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-divider.qds-icon-button.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-divider_2.cjs.entry.js +3 -3
- package/dist/cjs/qds-dropdown.cjs.entry.js +20 -6
- package/dist/cjs/qds-dropdown.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-form-message.cjs.entry.js +26 -16
- package/dist/cjs/qds-form-message.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-icon-tab.cjs.entry.js +1 -1
- package/dist/cjs/qds-icon.cjs.entry.js +1 -1
- package/dist/cjs/qds-inline-link.cjs.entry.js +4 -4
- package/dist/cjs/qds-inline-link.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-input.cjs.entry.js +1 -1
- package/dist/cjs/qds-label.cjs.entry.js +1 -1
- package/dist/cjs/qds-list-item.cjs.entry.js +8 -5
- package/dist/cjs/qds-list-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-loader.cjs.entry.js +1 -1
- package/dist/cjs/qds-menu-item.cjs.entry.js +34 -8
- package/dist/cjs/qds-menu-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-mini-button.cjs.entry.js +4 -6
- package/dist/cjs/qds-mini-button.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/qds-select.cjs.entry.js +2 -2
- package/dist/cjs/qds-select.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-standalone-link.cjs.entry.js +3 -3
- package/dist/cjs/qds-switch.cjs.entry.js +5 -5
- package/dist/cjs/qds-switch.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-tab.cjs.entry.js +4 -4
- package/dist/cjs/qds-tab.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-tabbar.cjs.entry.js +57 -33
- package/dist/cjs/qds-tabbar.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-head-cell.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-row.cjs.entry.js +1 -1
- package/dist/cjs/qds-table.cjs.entry.js +1 -1
- package/dist/cjs/qds-tag.cjs.entry.js +3 -3
- package/dist/cjs/qds-textarea.cjs.entry.js +4 -4
- package/dist/cjs/qds-textarea.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-title.cjs.entry.js +3 -3
- package/dist/cjs/qds-title.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/qds-tooltip.entry.cjs.js.map +1 -1
- package/dist/cjs/qds.cjs.js +1 -1
- package/dist/custom-elements.json +224 -70
- package/dist/docs.json +49 -7
- package/dist/esm/{helpers-Fe2AA6uo.js → helpers-JWnSavo8.js} +6 -3
- package/dist/esm/{helpers-Fe2AA6uo.js.map → helpers-JWnSavo8.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/qds-action-item.entry.js +1 -1
- package/dist/esm/qds-avatar-media.qds-checkbox.qds-radio.entry.js.map +1 -1
- package/dist/esm/qds-avatar-media_3.entry.js +72 -36
- package/dist/esm/qds-breadcrumb-item.entry.js +9 -4
- package/dist/esm/qds-breadcrumb-item.entry.js.map +1 -1
- package/dist/esm/qds-button.entry.js +6 -6
- package/dist/esm/qds-button.entry.js.map +1 -1
- package/dist/esm/qds-chip.entry.js +2 -2
- package/dist/esm/qds-chip.entry.js.map +1 -1
- package/dist/esm/qds-dialog.entry.js +2 -2
- package/dist/esm/qds-dialog.entry.js.map +1 -1
- package/dist/esm/qds-divider.qds-icon-button.entry.js.map +1 -1
- package/dist/esm/qds-divider_2.entry.js +3 -3
- package/dist/esm/qds-dropdown.entry.js +20 -6
- package/dist/esm/qds-dropdown.entry.js.map +1 -1
- package/dist/esm/qds-form-message.entry.js +26 -16
- package/dist/esm/qds-form-message.entry.js.map +1 -1
- package/dist/esm/qds-icon-tab.entry.js +1 -1
- package/dist/esm/qds-icon.entry.js +1 -1
- package/dist/esm/qds-inline-link.entry.js +4 -4
- package/dist/esm/qds-inline-link.entry.js.map +1 -1
- package/dist/esm/qds-input.entry.js +1 -1
- package/dist/esm/qds-label.entry.js +1 -1
- package/dist/esm/qds-list-item.entry.js +8 -5
- package/dist/esm/qds-list-item.entry.js.map +1 -1
- package/dist/esm/qds-loader.entry.js +1 -1
- package/dist/esm/qds-menu-item.entry.js +34 -8
- package/dist/esm/qds-menu-item.entry.js.map +1 -1
- package/dist/esm/qds-mini-button.entry.js +4 -6
- package/dist/esm/qds-mini-button.entry.js.map +1 -1
- package/dist/esm/qds-progress-bar.entry.js +2 -2
- package/dist/esm/qds-select.entry.js +2 -2
- package/dist/esm/qds-select.entry.js.map +1 -1
- package/dist/esm/qds-standalone-link.entry.js +3 -3
- package/dist/esm/qds-switch.entry.js +5 -5
- package/dist/esm/qds-switch.entry.js.map +1 -1
- package/dist/esm/qds-tab.entry.js +4 -4
- package/dist/esm/qds-tab.entry.js.map +1 -1
- package/dist/esm/qds-tabbar.entry.js +57 -33
- package/dist/esm/qds-tabbar.entry.js.map +1 -1
- package/dist/esm/qds-table-cell.entry.js +2 -2
- package/dist/esm/qds-table-head-cell.entry.js +2 -2
- package/dist/esm/qds-table-row.entry.js +1 -1
- package/dist/esm/qds-table.entry.js +1 -1
- package/dist/esm/qds-tag.entry.js +3 -3
- package/dist/esm/qds-textarea.entry.js +4 -4
- package/dist/esm/qds-textarea.entry.js.map +1 -1
- package/dist/esm/qds-title.entry.js +3 -3
- package/dist/esm/qds-title.entry.js.map +1 -1
- package/dist/esm/qds-tooltip.entry.js +3 -3
- package/dist/esm/qds-tooltip.entry.js.map +1 -1
- package/dist/esm/qds.js +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +9 -9
- package/dist/types/components/dropdown/dropdown.d.ts +1 -0
- package/dist/types/components/form-message/form-message.d.ts +2 -0
- package/dist/types/components/menu-item/menu-item.d.ts +1 -0
- package/dist/types/components/tabbar/tabbar.d.ts +2 -0
- package/dist/types/components.d.ts +3 -2
- package/dist/types/helpers.d.ts +6 -1
- package/dist/vscode.html-custom-data.json +1 -1
- package/hydrate/index.js +311 -191
- package/hydrate/index.mjs +311 -191
- package/package.json +1 -2
- package/components/p-BalM52S_.js.map +0 -1
- package/components/p-CVuTVnQo.js.map +0 -1
- package/components/p-Ck9w5WIb.js +0 -102
- package/components/p-Ck9w5WIb.js.map +0 -1
- package/components/p-DRcxeXWE.js.map +0 -1
- package/components/p-DgYrfIr_.js.map +0 -1
- package/components/p-io1iVgY1.js.map +0 -1
- package/components/p-oqmnh-8P.js.map +0 -1
- package/components/p-yb0Kv4Y6.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"qds-tabbar.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,SAAS,GAAG,6xCAA6xC;;ACA/yC;AACA;AACA;;;;;;;;;;;;;;;;;;AAmCA,MAAM,YAAY,GAGd;AACF,IAAA,WAAW,EAAE;AACX,QAAA,UAAU,EAAE,UAAU;AACtB,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,iBAAiB,EAAE,WAAW;AAC/B,KAAA;AACD,IAAA,cAAc,EAAE;AACd,QAAA,UAAU,EAAE,UAAU;AACtB,QAAA,IAAI,EAAE,UAAU;AAChB,QAAA,iBAAiB,EAAE,WAAW;AAC/B,KAAA;AACD,IAAA,YAAY,EAAE;AACZ,QAAA,UAAU,EAAE,UAAU;AACtB,QAAA,IAAI,EAA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AAA;AAGC,IAAA,MAAM,QAAQ,GAAG,YAAY,CAAC,GAAG,IAAI,CAAC,KAAK,CAAA,CAAA,EAAI,IAAI,CAAC,KAAK,CAAA,CAAE,CAAC;AAC5D,IAAA,IAAI,CAAC,QAAQ;QAAE;AAEf,IAAA,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE;;AAEvD,QAAA,GAAG,CAAC,UAAU,GAAG,sBAAA,CAAA,IAAI,yDAAoB,IAAI,QAAQ,CAAC,UAAU;AAChE,QAAA,GAAG,CAAC,IAAI,GAAG,sBAAA,CAAA,IAAI,mDAAc,IAAI,QAAQ,CAAC,IAAI;AAE9C,QAAA,GAAG,CAAC,iBAAiB;YACnB,IAAI,CAAC,WAAW,KAAK;AACnB,kBAAE;AACF,mBAAG,sBAAA,CAAA,IAAI,EAAA,iBAAA,EAAA,GAAA,EAAA,6BAAA,CAAmB,IAAI,QAAQ,CAAC,iBAAiB,CAAC;;;AAGjE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["HTMLElement","__stencil_proxyCustomElement"],"sources":["src/components/tabbar/tabbar.css?tag=qds-tabbar&encapsulation=shadow","src/components/tabbar/tabbar.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: block;\n}\n\n.qds-vertical,\n.qds-vertical-divider,\n.qds-tabbar,\n.qds-tabs {\n display: flex;\n}\n\n.qds-vertical-divider,\n.qds-tabbar {\n width: inherit;\n}\n\n.qds-arrow-start {\n transform: scaleX(var(--qds-direction-factor, 1)) rotate(180deg);\n}\n\n.qds-align-center {\n align-content: center;\n}\n\n.qds-hidden {\n display: none;\n}\n\n.qds-centered {\n justify-content: center;\n}\n\n.qds-tabs {\n flex: 1;\n margin-block: 0;\n overflow: auto;\n padding-inline-start: 0;\n scroll-behavior: smooth;\n}\n\n.qds-vertical {\n flex-direction: column;\n}\n\n.qds-vertical-divider {\n flex-direction: row;\n}\n\n[data-size='small'] {\n gap: var(--qds-control-small-gap-siblings-related);\n}\n\n[data-size='standard'] {\n gap: var(--qds-control-standard-gap-siblings-related);\n}\n\n[data-size='large'] {\n gap: var(--qds-control-large-gap-siblings-related);\n}\n\n[data-layer='main'] {\n &[data-level='root'] .qds-tabs {\n gap: var(--qds-control-large-gap-siblings-related);\n }\n\n &[data-level='section'] .qds-tabs {\n gap: var(--qds-control-standard-gap-siblings-related);\n }\n\n &[data-level='subsection'] .qds-tabs {\n gap: var(--qds-control-small-gap-siblings-related);\n }\n}\n\n[data-layer='popup'] {\n &[data-level='root'] .qds-tabs {\n gap: var(--qds-control-standard-gap-siblings-related);\n }\n\n &[data-level='section'] .qds-tabs {\n gap: var(--qds-control-small-gap-siblings-related);\n }\n}\n\n:is([data-layer='panel'], [data-layer='accessory'])[data-level='root']\n .qds-tabs {\n gap: var(--qds-control-small-gap-siblings-related);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\n\nimport type { Attributes } from '../../helpers'\nimport {\n componentOnReady,\n HORIZONTAL_MOVE_KEYS,\n inheritAriaAttributes,\n invariant,\n resolvePanelElement,\n VERTICAL_MOVE_KEYS,\n} from '../../helpers'\nimport type { IndicatorPosition } from '../icon-tab/icon-tab'\nimport type { Importance, Size } from '../shared'\nimport type { Tab } from '../tab/tab'\n\nexport type Layer = 'accessory' | 'main' | 'panel' | 'popup'\nexport type Level = 'root' | 'section' | 'subsection'\nexport type TabbarSize = Size | undefined\nexport type TabbarImportance = Exclude<Importance, 'emphasized'> | undefined\nexport type Orientation = 'horizontal' | 'vertical'\nexport type Placement = 'bottom' | 'end' | 'start' | 'top'\nexport type Alignment = 'center' | 'start'\n\nconst TAB_SETTINGS: Record<\n string,\n Pick<Tab, 'importance' | 'indicatorPosition' | 'size'> | undefined\n> = {\n 'main-root': {\n importance: 'standard',\n size: 'large',\n indicatorPosition: 'block-end',\n },\n 'main-section': {\n importance: 'standard',\n size: 'standard',\n indicatorPosition: 'block-end',\n },\n 'popup-root': {\n importance: 'standard',\n size: 'standard',\n indicatorPosition: 'block-end',\n },\n 'main-subsection': {\n importance: 'subdued',\n size: 'small',\n indicatorPosition: 'block-start',\n },\n 'popup-section': {\n importance: 'subdued',\n size: 'small',\n indicatorPosition: 'inline-start',\n },\n 'panel-root': {\n importance: 'standard',\n size: 'small',\n indicatorPosition: 'block-start',\n },\n 'accessory-root': {\n importance: 'subdued',\n size: 'small',\n indicatorPosition: 'block-end',\n },\n}\n\nconst isEnabledTabItem = (item: unknown): item is HTMLQdsTabElement => {\n if (!(item instanceof HTMLElement)) return false\n const tagName = item.tagName.toLowerCase()\n\n return (\n (!item.inert && tagName === 'qds-tab') ||\n (item as HTMLQdsTabElement).disabled !== true\n )\n}\n\n/**\n * `<qds-tabbar>` is the component that facilitates navigation between the groups\n * of related content within the page.\n * It allows users to switch between groups by clicking on Tabs without going to another page.\n */\n@Component({\n tag: 'qds-tabbar',\n shadow: { delegatesFocus: true },\n styleUrl: 'tabbar.css',\n})\nexport class Tabbar implements ComponentInterface {\n /**\n * The tabbar's layer.\n *\n * @deprecated The property layer is deprecated. Please use `size` property instead.\n * Please do not use `layer` and `size` at the same time.\n */\n @Prop() public layer?: Layer = 'main'\n\n /**\n * The tabbar's level.\n *\n * @deprecated The property level is deprecated. Please use `size` property instead.\n * Please do not use `level` and `size` at the same time.\n */\n @Prop() public level?: Level = 'root'\n\n /**\n * The tabbar's size. This controls the size of the tabs within the tabbar.\n */\n @Prop() public size?: Size = 'standard'\n\n /**\n * The tabbar's orientation.\n *\n * @deprecated Please use the `placement` property instead. Do not use\n * `orientation` and `placement` at the same time.\n */\n @Prop() public orientation?: Orientation = 'horizontal'\n\n /**\n * The tabbar's placement.\n */\n @Prop() public placement?: Placement = 'top'\n\n /**\n * the tablist Description\n */\n @Prop() public readonly tablistDescription?: string\n\n /**\n * Displays a divider line.\n */\n @Prop() public showDivider?: boolean = false\n\n /**\n * The alignment of tabs. Only applicable for horizontal orientation.\n */\n @Prop() public readonly alignment?: Alignment = 'start'\n\n /**\n * The importance of the tabbar. This controls the visual emphasis of the tabs within the tabbar.\n */\n @Prop() public importance?: TabbarImportance\n\n /**\n * Emitted when the user selects the tab.\n */\n @Event({ eventName: 'qdsTabShow', cancelable: false })\n private readonly showEmitter!: EventEmitter<HTMLElement>\n\n /**\n * Emitted when the user selects the tab.\n */\n @Event({ eventName: 'qdsTabHide', cancelable: false })\n private readonly hideEmitter!: EventEmitter<HTMLElement>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private disableEndArrow = false\n\n @State() private disableStartArrow = false\n\n @State() private activeTab?: HTMLQdsTabElement\n\n #tabs: HTMLQdsTabElement[] = []\n\n #ro: ResizeObserver | undefined\n\n #tabbar?: HTMLElement\n\n #inheritedAttributes: Attributes = {}\n\n get #computedImportance(): TabbarImportance {\n return this.importance\n }\n\n get #computedSize(): Size | undefined {\n return this.size ?? undefined\n }\n\n get #computedPlacement(): IndicatorPosition | undefined {\n switch (this.placement) {\n case 'top': {\n return 'block-end'\n }\n case 'end': {\n return 'inline-start'\n }\n case 'bottom': {\n return 'block-start'\n }\n case 'start': {\n return 'inline-end'\n }\n default: {\n return undefined\n }\n }\n }\n\n get #computeDividerVisible(): boolean {\n if (this.layer === 'panel') return false\n if (\n this.layer === 'main' &&\n this.level === 'subsection' &&\n (this.orientation === 'horizontal' || this.#isVerticalPlacement())\n )\n return false\n return this.showDivider === true\n }\n\n @Watch('importance')\n protected settingChanged(): void {\n this.#setTabSettings()\n }\n\n @Listen('resize', { target: 'window' })\n protected windowResize(): void {\n this.#onViewportCrop()\n }\n\n public componentWillLoad(): void {\n this.settingChanged()\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n const tabs = [\n ...this.host.querySelectorAll('qds-tab'),\n ] as HTMLQdsTabElement[]\n const preselectedTab = tabs.find((tab) => tab.selected)\n if (preselectedTab) this.#setActiveTab(preselectedTab)\n else if (tabs.length > 0) this.#setActiveTab(tabs[0])\n }\n\n public componentDidRender(): void {\n if (this.activeTab) this.#switchTabPanel(this.activeTab)\n this.settingChanged()\n }\n\n public componentDidLoad(): void {\n invariant(this.#tabbar)\n\n this.#ro = new ResizeObserver(this.#onScroll)\n this.#ro.observe(this.#tabbar)\n }\n\n public disconnectedCallback(): void {\n if (this.#ro) this.#ro.disconnect()\n }\n\n public render() {\n return (\n <div\n class={{\n 'qds-vertical-divider':\n this.orientation === 'vertical' || this.#isVerticalPlacement(),\n }}\n data-layer={this.layer}\n data-level={this.level}\n data-importance={this.#computedImportance}\n >\n <div class=\"qds-tabbar\">\n <div\n class={{\n 'qds-align-center': true,\n 'qds-hidden':\n (this.disableEndArrow && this.disableStartArrow) ||\n this.orientation === 'vertical' ||\n this.#isVerticalPlacement(),\n }}\n >\n <qds-icon-button\n text=\"show previous tab\"\n importance=\"subdued\"\n iconName=\"next\"\n iconLibrary=\"core\"\n class=\"qds-arrow-start\"\n onClick={this.#scrollToStart}\n disabled={this.disableStartArrow}\n />\n </div>\n <ul\n class={{\n 'qds-tabs': true,\n 'qds-vertical':\n this.orientation === 'vertical' || this.#isVerticalPlacement(),\n 'qds-centered':\n this.alignment === 'center' &&\n (this.orientation === 'horizontal' ||\n this.#isHorizontalPlacement()) &&\n this.disableEndArrow &&\n this.disableStartArrow,\n }}\n role=\"tablist\"\n aria-label={this.tablistDescription}\n ref={(element) => {\n this.#tabbar = element\n }}\n onClick={this.#onClick}\n onKeyDown={this.#onKeyDown}\n onMouseDown={this.#onMouseDown}\n onScroll={this.#onScroll}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n >\n <slot onSlotchange={this.#onSlotchange} />\n </ul>\n <div\n class={{\n 'qds-align-center': true,\n 'qds-hidden':\n (this.disableEndArrow && this.disableStartArrow) ||\n this.orientation === 'vertical' ||\n this.#isVerticalPlacement(),\n }}\n >\n <qds-icon-button\n text=\"show next tab\"\n iconName=\"next\"\n iconLibrary=\"core\"\n importance=\"subdued\"\n onClick={this.#scrollToEnd}\n disabled={this.disableEndArrow}\n />\n </div>\n </div>\n {this.#computeDividerVisible && (\n <qds-divider\n vertical={\n this.orientation === 'vertical' || this.#isVerticalPlacement()\n }\n />\n )}\n </div>\n )\n }\n\n readonly #scrollToStart = (): void => {\n invariant(this.#tabbar)\n\n const isRTL = globalThis.getComputedStyle(this.host).direction === 'rtl'\n this.#tabbar.scroll({\n left: isRTL\n ? this.#tabbar.scrollLeft + this.#tabbar.clientWidth\n : this.#tabbar.scrollLeft - this.#tabbar.clientWidth,\n })\n }\n\n readonly #scrollToEnd = (): void => {\n invariant(this.#tabbar)\n\n const isRTL = globalThis.getComputedStyle(this.host).direction === 'rtl'\n this.#tabbar.scroll({\n left: isRTL\n ? this.#tabbar.scrollLeft - this.#tabbar.clientWidth\n : this.#tabbar.scrollLeft + this.#tabbar.clientWidth,\n })\n }\n\n #setActiveTab(tab: HTMLQdsTabElement): void {\n this.activeTab = tab\n\n for (const t of this.host.querySelectorAll('qds-tab')) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const target = t.tab\n const isSelected = t === tab\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n t.selected = isSelected\n if (target instanceof globalThis.Element)\n target.ariaSelected = isSelected.toString()\n }\n }\n\n #switchTabPanel(activeTab: HTMLQdsTabElement): void {\n for (const tab of this.#tabs) {\n const panel = resolvePanelElement(tab)\n if (panel) {\n panel.hidden = tab !== activeTab\n }\n }\n }\n\n #handleTabActivation(tab: HTMLQdsTabElement): void {\n const previousTab = this.activeTab\n if (previousTab === tab) return\n\n this.activeTab = tab\n\n this.hideEmitter.emit(previousTab)\n\n this.showEmitter.emit(tab)\n this.#setCurrentTab(tab)\n this.#switchTabPanel(tab)\n }\n\n #getCurrentTab(): HTMLQdsTabElement | undefined {\n return this.#tabs.find((tab) => tab.tab.getAttribute('tabindex') === '0')\n }\n\n #setCurrentTab(tab: HTMLQdsTabElement): void {\n for (const t of this.#tabs) {\n const isCurrent = t === tab\n\n componentOnReady(t, (element: HTMLQdsTabElement | undefined) => {\n const target = element?.tab\n if (target === undefined) return\n const isDisabled = target.getAttribute('aria-disabled') === 'true'\n const shouldActivateTab = isCurrent && !isDisabled\n const tabindex = shouldActivateTab ? '0' : '-1'\n target.setAttribute('tabindex', tabindex)\n if (shouldActivateTab) this.#handleTabActivation(t)\n })\n }\n }\n\n readonly #isVerticalPlacement = (): boolean =>\n this.placement === 'start' || this.placement === 'end'\n\n readonly #isHorizontalPlacement = (): boolean =>\n this.placement === 'top' || this.placement === 'bottom'\n\n readonly #onClick = (event: MouseEvent): void => {\n const { target } = event\n if (!(target instanceof HTMLElement)) return\n const tab = target.closest('qds-tab')\n if (!tab || tab.disabled === true || tab.inert) return\n\n this.#handleTabActivation(tab)\n this.#setActiveTab(tab)\n }\n\n readonly #onKeyDown = (event: KeyboardEvent): void => {\n const isVertical =\n this.orientation === 'vertical' || this.#isVerticalPlacement()\n const MOVE_SELECTION_KEYS = isVertical\n ? VERTICAL_MOVE_KEYS\n : HORIZONTAL_MOVE_KEYS\n if (!MOVE_SELECTION_KEYS.has(event.key)) return\n\n const tabs = this.#tabs\n if (tabs.length === 0) return\n\n event.preventDefault()\n event.stopPropagation()\n\n const activeTab = this.#getCurrentTab()\n let index = activeTab ? tabs.indexOf(activeTab) : 0\n\n const isRTL = globalThis.getComputedStyle(this.host).direction === 'rtl'\n\n let nextTab: HTMLQdsTabElement | undefined\n do {\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowUp': {\n index = (isRTL ? index < tabs.length - 1 : index > 0)\n ? index - (isRTL ? -1 : 1)\n : isRTL\n ? 0\n : tabs.length - 1\n break\n }\n case 'ArrowRight':\n case 'ArrowDown': {\n index = (isRTL ? index > 0 : index < tabs.length - 1)\n ? index + (isRTL ? -1 : 1)\n : isRTL\n ? tabs.length - 1\n : 0\n break\n }\n case 'Home': {\n index = isRTL ? tabs.length - 1 : 0\n break\n }\n case 'End': {\n index = isRTL ? 0 : tabs.length - 1\n break\n }\n default:\n }\n nextTab = tabs[index]\n } while (nextTab.disabled === true)\n\n this.#setCurrentTab(nextTab)\n\n const target = nextTab.tab\n target.focus({ preventScroll: true })\n if (!isVertical) target.scrollIntoView()\n this.#handleTabActivation(nextTab)\n this.#setActiveTab(nextTab)\n }\n\n readonly #onMouseDown = (event: MouseEvent): void => {\n const { target } = event\n\n if (isEnabledTabItem(target)) this.#setCurrentTab(target)\n }\n\n readonly #onScroll = (): void => {\n if (!this.#tabbar) return\n\n const { clientWidth, scrollWidth, scrollLeft } = this.#tabbar\n\n const isRTL = globalThis.getComputedStyle(this.host).direction === 'rtl'\n this.disableStartArrow = scrollLeft === 0\n this.disableEndArrow = isRTL\n ? scrollWidth + scrollLeft <= clientWidth\n : scrollWidth - clientWidth - scrollLeft <= 1\n }\n\n readonly #onViewportCrop = (): void => {\n if (!this.#tabbar) return\n\n const { scrollWidth, clientWidth } = this.#tabbar\n\n if (scrollWidth > clientWidth) {\n this.#onScroll()\n }\n }\n\n #updateTabsCache(): void {\n const slot = this.host.shadowRoot?.querySelector('slot')\n this.#tabs = slot\n ? [...slot.assignedElements({ flatten: true })].filter<HTMLQdsTabElement>(\n (element) => isEnabledTabItem(element),\n )\n : []\n }\n\n #setTabSettings(): void {\n const settings = TAB_SETTINGS[`${this.layer}-${this.level}`]\n if (!settings) return\n\n for (const tab of this.host.querySelectorAll('qds-tab')) {\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n tab.importance = this.#computedImportance ?? settings.importance\n tab.size = this.#computedSize ?? settings.size\n\n tab.indicatorPosition =\n this.orientation === 'vertical'\n ? 'inline-end'\n : (this.#computedPlacement ?? settings.indicatorPosition)\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n }\n }\n\n readonly #onSlotchange = (): void => {\n this.#updateTabsCache()\n\n if (this.#tabs.length > 0) this.#setCurrentTab(this.#tabs[0])\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"qds-tabbar.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,SAAS,GAAG,kzCAAkzC;;ACAp0C;AACA;AACA;;;;;;;;;;;;;;;;;;AAoCA,MAAM,iBAAiB,GAAG,uBAAuB;AAEjD,MAAM,YAAY,GAGd;AACF,IAAA,WAAW,EAAE;AACX,QAAA,UAAU,EAAE,UAAU;AACtB,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,iBAAiB,EAAE,WAAW;AAC/B,KAAA;AACD,IAAA,cAAc,EAAE;AACd,QAAA,UAAU,EAAE,UAAU;AACtB,QAAA,IAAI,EAAE,UAAU;AAChB,QAAA,iBAAiB,EAAE,WAAW;AAC/B,KAAA;AACD,IAAA,YAAY,EAAE;AACZ,QAAA,UAAU,EAAE,UAAU;AACtB,QAAA,IAAI,EAAE,UAAU;AAChB,QAAA,iBAAiB,EAAE,WAAW;AAC/B,KAAA;AACD,IAAA,iBAAiB,EAAE;AACjB,QAAA,UAAU,EAAE,SAAS;AACrB,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,iBAAiB,EAAE,aAAa;AACjC,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,UAAU,EAAE,SAAS;AACrB,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,iBAAiB,EAAE,cAAc;AAClC,KAAA;AACD,IAAA,YAAY,EAAE;AACZ,QAAA,UAAU,EAAE,UAAU;AACtB,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,iBAAiB,EAAE,aAAa;AACjC,KAAA;AACD,IAAA,gBAAgB,EAAE;AAChB,QAAA,UAAU,EAAE,SAAS;AACrB,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,iBAAiB,E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AAI,CAAe,EAAE;AACrC,QAAA,GAAG,CAAC,UAAU,GAAG,sBAAA,CAAA,IAAI,yDAAoB,IAAI,QAAQ,CAAC,UAAU;AAChE,QAAA,GAAG,CAAC,IAAI,GAAG,sBAAA,CAAA,IAAI,mDAAc,IAAI,QAAQ,CAAC,IAAI;AAE9C,QAAA,GAAG,CAAC,iBAAiB;YACnB,IAAI,CAAC,WAAW,KAAK;AACnB,kBAAE;AACF,mBAAG,sBAAA,CAAA,IAAI,EAAA,iBAAA,EAAA,GAAA,EAAA,6BAAA,CAAmB,IAAI,QAAQ,CAAC,iBAAiB,CAAC;;AAEjE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["HTMLElement","__stencil_proxyCustomElement"],"sources":["src/components/tabbar/tabbar.css?tag=qds-tabbar&encapsulation=shadow","src/components/tabbar/tabbar.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: block;\n}\n\n.qds-vertical,\n.qds-vertical-divider,\n.qds-tabbar,\n.qds-tabs {\n display: flex;\n}\n\n.qds-vertical-divider,\n.qds-tabbar {\n width: inherit;\n}\n\n.qds-arrow-start {\n transform: scaleX(var(--qds-direction-factor, 1)) rotate(180deg);\n}\n\n.qds-align-center {\n align-content: center;\n}\n\n.qds-hidden {\n display: none;\n}\n\n.qds-centered {\n justify-content: center;\n}\n\n.qds-tabs {\n flex: 1;\n margin-block: 0;\n overflow: auto;\n padding-inline-start: 0;\n scroll-behavior: smooth;\n scrollbar-width: none;\n}\n\n.qds-vertical {\n flex-direction: column;\n}\n\n.qds-vertical-divider {\n flex-direction: row;\n}\n\n[data-size='small'] {\n gap: var(--qds-control-small-gap-siblings-related);\n}\n\n[data-size='standard'] {\n gap: var(--qds-control-standard-gap-siblings-related);\n}\n\n[data-size='large'] {\n gap: var(--qds-control-large-gap-siblings-related);\n}\n\n[data-layer='main'] {\n &[data-level='root'] .qds-tabs {\n gap: var(--qds-control-large-gap-siblings-related);\n }\n\n &[data-level='section'] .qds-tabs {\n gap: var(--qds-control-standard-gap-siblings-related);\n }\n\n &[data-level='subsection'] .qds-tabs {\n gap: var(--qds-control-small-gap-siblings-related);\n }\n}\n\n[data-layer='popup'] {\n &[data-level='root'] .qds-tabs {\n gap: var(--qds-control-standard-gap-siblings-related);\n }\n\n &[data-level='section'] .qds-tabs {\n gap: var(--qds-control-small-gap-siblings-related);\n }\n}\n\n:is([data-layer='panel'], [data-layer='accessory'])[data-level='root']\n .qds-tabs {\n gap: var(--qds-control-small-gap-siblings-related);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\n\nimport {\n componentOnReady,\n HORIZONTAL_MOVE_KEYS,\n invariant,\n resolvePanelElement,\n VERTICAL_MOVE_KEYS,\n} from '../../helpers'\nimport type { IndicatorPosition } from '../icon-tab/icon-tab'\nimport type { Importance, Size } from '../shared'\nimport type { Tab } from '../tab/tab'\n\nexport type Layer = 'accessory' | 'main' | 'panel' | 'popup'\nexport type Level = 'root' | 'section' | 'subsection'\nexport type TabbarSize = Size | undefined\nexport type TabbarImportance = Exclude<Importance, 'emphasized'> | undefined\nexport type Orientation = 'horizontal' | 'vertical'\nexport type Placement = 'bottom' | 'end' | 'start' | 'top'\nexport type Alignment = 'center' | 'start'\n\ntype TabItemElement = HTMLQdsIconTabElement | HTMLQdsTabElement\n\nconst TAB_ITEM_SELECTOR = 'qds-icon-tab, qds-tab'\n\nconst TAB_SETTINGS: Record<\n string,\n Pick<Tab, 'importance' | 'indicatorPosition' | 'size'> | undefined\n> = {\n 'main-root': {\n importance: 'standard',\n size: 'large',\n indicatorPosition: 'block-end',\n },\n 'main-section': {\n importance: 'standard',\n size: 'standard',\n indicatorPosition: 'block-end',\n },\n 'popup-root': {\n importance: 'standard',\n size: 'standard',\n indicatorPosition: 'block-end',\n },\n 'main-subsection': {\n importance: 'subdued',\n size: 'small',\n indicatorPosition: 'block-start',\n },\n 'popup-section': {\n importance: 'subdued',\n size: 'small',\n indicatorPosition: 'inline-start',\n },\n 'panel-root': {\n importance: 'standard',\n size: 'small',\n indicatorPosition: 'block-start',\n },\n 'accessory-root': {\n importance: 'subdued',\n size: 'small',\n indicatorPosition: 'block-end',\n },\n}\n\nconst isTabItem = (item: unknown): item is TabItemElement => {\n if (!(item instanceof HTMLElement)) return false\n\n const tagName = item.tagName.toLowerCase()\n return tagName === 'qds-tab' || tagName === 'qds-icon-tab'\n}\n\nconst isEnabledTabItem = (item: unknown): item is TabItemElement =>\n isTabItem(item) && !item.inert && item.disabled !== true\n\nconst getTabTrigger = (tab: TabItemElement): HTMLElement =>\n (tab as TabItemElement & { tab: HTMLElement }).tab\n\n/**\n * `<qds-tabbar>` is the component that facilitates navigation between the groups\n * of related content within the page.\n * It allows users to switch between groups by clicking on Tabs without going to another page.\n */\n@Component({\n tag: 'qds-tabbar',\n shadow: { delegatesFocus: true },\n styleUrl: 'tabbar.css',\n})\nexport class Tabbar implements ComponentInterface {\n /**\n * The tabbar's layer.\n *\n * @deprecated The property layer is deprecated. Please use `size` property instead.\n * Please do not use `layer` and `size` at the same time.\n */\n @Prop() public layer?: Layer = 'main'\n\n /**\n * The tabbar's level.\n *\n * @deprecated The property level is deprecated. Please use `size` property instead.\n * Please do not use `level` and `size` at the same time.\n */\n @Prop() public level?: Level = 'root'\n\n /**\n * The tabbar's size. This controls the size of the tabs within the tabbar.\n */\n @Prop() public size?: Size = 'standard'\n\n /**\n * The tabbar's orientation.\n *\n * @deprecated Please use the `placement` property instead. Do not use\n * `orientation` and `placement` at the same time.\n */\n @Prop() public orientation?: Orientation = 'horizontal'\n\n /**\n * The tabbar's placement.\n */\n @Prop() public placement?: Placement = 'top'\n\n /**\n * the tablist Description\n */\n @Prop() public readonly tablistDescription?: string\n\n /**\n * Displays a divider line.\n */\n @Prop() public showDivider?: boolean = false\n\n /**\n * The alignment of tabs. Only applicable for horizontal orientation.\n */\n @Prop() public readonly alignment?: Alignment = 'start'\n\n /**\n * The importance of the tabbar. This controls the visual emphasis of the tabs within the tabbar.\n */\n @Prop() public importance?: TabbarImportance\n\n /**\n * Emitted when the user selects the tab.\n */\n @Event({ eventName: 'qdsTabShow', cancelable: false })\n private readonly showEmitter!: EventEmitter<HTMLElement>\n\n /**\n * Emitted when the user selects the tab.\n */\n @Event({ eventName: 'qdsTabHide', cancelable: false })\n private readonly hideEmitter!: EventEmitter<HTMLElement>\n\n @Element() private readonly host!: HTMLElement\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n @State() private disableEndArrow = false\n\n @State() private disableStartArrow = false\n\n @State() private activeTab?: TabItemElement\n\n #tabs: TabItemElement[] = []\n\n #ro: ResizeObserver | undefined\n\n #tabbar?: HTMLElement\n\n get #computedImportance(): TabbarImportance {\n return this.importance\n }\n\n get #computedSize(): Size | undefined {\n return this.size ?? undefined\n }\n\n get #computedPlacement(): IndicatorPosition | undefined {\n switch (this.placement) {\n case 'top': {\n return 'block-end'\n }\n case 'end': {\n return 'inline-start'\n }\n case 'bottom': {\n return 'block-start'\n }\n case 'start': {\n return 'inline-end'\n }\n default: {\n return undefined\n }\n }\n }\n\n get #computeDividerVisible(): boolean {\n if (this.layer === 'panel') return false\n if (\n this.layer === 'main' &&\n this.level === 'subsection' &&\n (this.orientation === 'horizontal' || this.#isVerticalPlacement())\n )\n return false\n return this.showDivider === true\n }\n\n get #computedAriaOrientation(): Orientation {\n return this.orientation === 'vertical' || this.#isVerticalPlacement()\n ? 'vertical'\n : 'horizontal'\n }\n\n @Watch('importance')\n protected settingChanged(): void {\n this.#setTabSettings()\n }\n\n @Watch('orientation')\n @Watch('placement')\n @Watch('tablistDescription')\n protected accessibilityChanged(): void {\n this.#syncInternalsAccessibility()\n }\n\n @Listen('resize', { target: 'window' })\n protected windowResize(): void {\n this.#onViewportCrop()\n }\n\n public componentWillLoad(): void {\n this.settingChanged()\n this.internals.role = 'tablist'\n this.#syncInternalsAccessibility()\n const tabs = this.#getTabItems()\n const preselectedTab = tabs.find((tab) => tab.selected)\n if (preselectedTab) this.#setActiveTab(preselectedTab)\n else if (tabs.length > 0) this.#setActiveTab(tabs[0])\n }\n\n public componentDidRender(): void {\n if (this.activeTab) this.#switchTabPanel(this.activeTab)\n this.settingChanged()\n }\n\n public componentDidLoad(): void {\n invariant(this.#tabbar)\n\n this.#ro = new ResizeObserver(this.#onScroll)\n this.#ro.observe(this.#tabbar)\n }\n\n public disconnectedCallback(): void {\n if (this.#ro) this.#ro.disconnect()\n }\n\n public render() {\n return (\n <div\n class={{\n 'qds-vertical-divider':\n this.orientation === 'vertical' || this.#isVerticalPlacement(),\n }}\n data-layer={this.layer}\n data-level={this.level}\n data-importance={this.#computedImportance}\n >\n {this.#computeDividerVisible && this.#isEndOrBottomPlacement() && (\n <qds-divider\n vertical={\n this.orientation === 'vertical' || this.#isVerticalPlacement()\n }\n />\n )}\n <div class=\"qds-tabbar\">\n <div\n class={{\n 'qds-align-center': true,\n 'qds-hidden':\n (this.disableEndArrow && this.disableStartArrow) ||\n this.orientation === 'vertical' ||\n this.#isVerticalPlacement(),\n }}\n >\n <qds-icon-button\n text=\"show previous tab\"\n importance=\"subdued\"\n iconName=\"next\"\n iconLibrary=\"core\"\n class=\"qds-arrow-start\"\n onClick={this.#scrollToStart}\n disabled={this.disableStartArrow}\n />\n </div>\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <div\n class={{\n 'qds-tabs': true,\n 'qds-vertical':\n this.orientation === 'vertical' || this.#isVerticalPlacement(),\n 'qds-centered':\n this.alignment === 'center' &&\n (this.orientation === 'horizontal' ||\n this.#isHorizontalPlacement()) &&\n this.disableEndArrow &&\n this.disableStartArrow,\n }}\n ref={(element) => {\n this.#tabbar = element\n }}\n onClick={this.#onClick}\n onKeyDown={this.#onKeyDown}\n onMouseDown={this.#onMouseDown}\n onScroll={this.#onScroll}\n >\n <slot onSlotchange={this.#onSlotchange} />\n </div>\n <div\n class={{\n 'qds-align-center': true,\n 'qds-hidden':\n (this.disableEndArrow && this.disableStartArrow) ||\n this.orientation === 'vertical' ||\n this.#isVerticalPlacement(),\n }}\n >\n <qds-icon-button\n text=\"show next tab\"\n iconName=\"next\"\n iconLibrary=\"core\"\n importance=\"subdued\"\n onClick={this.#scrollToEnd}\n disabled={this.disableEndArrow}\n />\n </div>\n </div>\n {this.#computeDividerVisible && !this.#isEndOrBottomPlacement() && (\n <qds-divider\n vertical={\n this.orientation === 'vertical' || this.#isVerticalPlacement()\n }\n />\n )}\n </div>\n )\n }\n\n #getTabItems(): TabItemElement[] {\n return [\n ...this.host.querySelectorAll<HTMLElement>(TAB_ITEM_SELECTOR),\n ].filter((element): element is TabItemElement => isTabItem(element))\n }\n\n readonly #scrollToStart = (): void => {\n invariant(this.#tabbar)\n\n const isRTL = globalThis.getComputedStyle(this.host).direction === 'rtl'\n this.#tabbar.scroll({\n left: isRTL\n ? this.#tabbar.scrollLeft + this.#tabbar.clientWidth\n : this.#tabbar.scrollLeft - this.#tabbar.clientWidth,\n })\n }\n\n readonly #scrollToEnd = (): void => {\n invariant(this.#tabbar)\n\n const isRTL = globalThis.getComputedStyle(this.host).direction === 'rtl'\n this.#tabbar.scroll({\n left: isRTL\n ? this.#tabbar.scrollLeft - this.#tabbar.clientWidth\n : this.#tabbar.scrollLeft + this.#tabbar.clientWidth,\n })\n }\n\n #setActiveTab(tab: TabItemElement): void {\n this.activeTab = tab\n\n for (const t of this.#getTabItems()) {\n const target = getTabTrigger(t)\n const isSelected = t === tab\n t.selected = isSelected\n if (target instanceof globalThis.Element)\n target.ariaSelected = isSelected.toString()\n }\n }\n\n #switchTabPanel(activeTab: TabItemElement): void {\n for (const tab of this.#tabs) {\n const panel = resolvePanelElement(tab)\n if (panel) {\n panel.hidden = tab !== activeTab\n }\n }\n }\n\n #handleTabActivation(tab: TabItemElement): void {\n const previousTab = this.activeTab\n if (previousTab === tab) return\n\n this.activeTab = tab\n\n this.hideEmitter.emit(previousTab)\n\n this.showEmitter.emit(tab)\n this.#setCurrentTab(tab)\n this.#switchTabPanel(tab)\n }\n\n #getCurrentTab(): TabItemElement | undefined {\n return this.#tabs.find(\n (tab) => getTabTrigger(tab).getAttribute('tabindex') === '0',\n )\n }\n\n #setCurrentTab(tab: TabItemElement): void {\n for (const t of this.#tabs) {\n const isCurrent = t === tab\n\n componentOnReady(t, (element: TabItemElement | undefined) => {\n const target = element ? getTabTrigger(element) : undefined\n if (target === undefined) return\n const isDisabled = target.getAttribute('aria-disabled') === 'true'\n const shouldActivateTab = isCurrent && !isDisabled\n const tabindex = shouldActivateTab ? '0' : '-1'\n target.setAttribute('tabindex', tabindex)\n if (shouldActivateTab) this.#handleTabActivation(t)\n })\n }\n }\n\n readonly #isVerticalPlacement = (): boolean =>\n this.placement === 'start' || this.placement === 'end'\n\n readonly #isHorizontalPlacement = (): boolean =>\n this.placement === 'top' || this.placement === 'bottom'\n\n readonly #isEndOrBottomPlacement = (): boolean =>\n this.placement === 'end' || this.placement === 'bottom'\n\n readonly #onClick = (event: MouseEvent): void => {\n const { target } = event\n if (!(target instanceof HTMLElement)) return\n const tab = target.closest(TAB_ITEM_SELECTOR)\n if (!isEnabledTabItem(tab)) return\n\n this.#handleTabActivation(tab)\n this.#setActiveTab(tab)\n }\n\n readonly #onKeyDown = (event: KeyboardEvent): void => {\n const isVertical =\n this.orientation === 'vertical' || this.#isVerticalPlacement()\n const MOVE_SELECTION_KEYS = isVertical\n ? VERTICAL_MOVE_KEYS\n : HORIZONTAL_MOVE_KEYS\n if (!MOVE_SELECTION_KEYS.has(event.key)) return\n\n const tabs = this.#tabs\n if (tabs.length === 0) return\n\n event.preventDefault()\n event.stopPropagation()\n\n const activeTab = this.#getCurrentTab()\n let index = activeTab ? tabs.indexOf(activeTab) : 0\n\n const isRTL = globalThis.getComputedStyle(this.host).direction === 'rtl'\n\n let nextTab: TabItemElement | undefined\n do {\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowUp': {\n index = (isRTL ? index < tabs.length - 1 : index > 0)\n ? index - (isRTL ? -1 : 1)\n : isRTL\n ? 0\n : tabs.length - 1\n break\n }\n case 'ArrowRight':\n case 'ArrowDown': {\n index = (isRTL ? index > 0 : index < tabs.length - 1)\n ? index + (isRTL ? -1 : 1)\n : isRTL\n ? tabs.length - 1\n : 0\n break\n }\n case 'Home': {\n index = isRTL ? tabs.length - 1 : 0\n break\n }\n case 'End': {\n index = isRTL ? 0 : tabs.length - 1\n break\n }\n default:\n }\n nextTab = tabs[index]\n } while (nextTab.disabled === true)\n\n this.#setCurrentTab(nextTab)\n\n const target = getTabTrigger(nextTab)\n target.focus({ preventScroll: true })\n if (!isVertical) target.scrollIntoView()\n this.#handleTabActivation(nextTab)\n this.#setActiveTab(nextTab)\n }\n\n readonly #onMouseDown = (event: MouseEvent): void => {\n const { target } = event\n if (!(target instanceof HTMLElement)) return\n\n const tab = target.closest(TAB_ITEM_SELECTOR)\n if (isEnabledTabItem(tab)) this.#setCurrentTab(tab)\n }\n\n readonly #onScroll = (): void => {\n if (!this.#tabbar) return\n\n const { clientWidth, scrollWidth, scrollLeft } = this.#tabbar\n\n const isRTL = globalThis.getComputedStyle(this.host).direction === 'rtl'\n this.disableStartArrow = scrollLeft === 0\n this.disableEndArrow = isRTL\n ? scrollWidth + scrollLeft <= clientWidth\n : scrollWidth - clientWidth - scrollLeft <= 1\n }\n\n readonly #onViewportCrop = (): void => {\n if (!this.#tabbar) return\n\n const { scrollWidth, clientWidth } = this.#tabbar\n\n if (scrollWidth > clientWidth) {\n this.#onScroll()\n }\n }\n\n #syncInternalsAccessibility(): void {\n this.internals.ariaOrientation = this.#computedAriaOrientation\n this.internals.ariaLabel = this.tablistDescription ?? ''\n }\n\n #updateTabsCache(): void {\n const slot = this.host.shadowRoot?.querySelector('slot')\n this.#tabs = slot\n ? [...slot.assignedElements({ flatten: true })].filter(\n (element): element is TabItemElement => isEnabledTabItem(element),\n )\n : []\n }\n\n #setTabSettings(): void {\n const settings = TAB_SETTINGS[`${this.layer}-${this.level}`]\n if (!settings) return\n\n for (const tab of this.#getTabItems()) {\n tab.importance = this.#computedImportance ?? settings.importance\n tab.size = this.#computedSize ?? settings.size\n\n tab.indicatorPosition =\n this.orientation === 'vertical'\n ? 'inline-end'\n : (this.#computedPlacement ?? settings.indicatorPosition)\n }\n }\n\n readonly #onSlotchange = (): void => {\n this.#updateTabsCache()\n\n if (this.#tabs.length > 0) this.#setCurrentTab(this.#tabs[0])\n }\n}\n"],"version":3}
|
|
@@ -58,9 +58,9 @@ const TableCell = /*@__PURE__*/ proxyCustomElement(class TableCell extends H {
|
|
|
58
58
|
render() {
|
|
59
59
|
return (
|
|
60
60
|
// eslint-disable-next-line jsx-a11y/control-has-associated-label
|
|
61
|
-
h("td", { key: '
|
|
61
|
+
h("td", { key: 'b44e4c598db5ed018856503d2c74943fbbeb50bf', class: "qds-table-cell", "data-size": __classPrivateFieldGet(this, _TableCell_instances, "a", _TableCell_computedSize_get), colSpan: this.colSpan, rowSpan: this.rowSpan,
|
|
62
62
|
// eslint-disable-next-line jsx-a11y/no-interactive-element-to-noninteractive-role
|
|
63
|
-
role: "none" }, h("slot", { key: '
|
|
63
|
+
role: "none" }, h("slot", { key: '97f84c5f82f7091d5d5297d2ef265e5ea4e9629f' })));
|
|
64
64
|
}
|
|
65
65
|
static get watchers() { return {
|
|
66
66
|
"colSpan": ["colSpanChanged"],
|
|
@@ -61,9 +61,9 @@ const TableHeadCell = /*@__PURE__*/ proxyCustomElement(class TableHeadCell exten
|
|
|
61
61
|
render() {
|
|
62
62
|
return (
|
|
63
63
|
// eslint-disable-next-line jsx-a11y/control-has-associated-label
|
|
64
|
-
h("th", { key: '
|
|
64
|
+
h("th", { key: 'c2eb95970e235225d73a5c398268ce58fa5a9215', class: "qds-table-head-cell", "data-size": __classPrivateFieldGet(this, _TableHeadCell_instances, "a", _TableHeadCell_computedSize_get), colSpan: this.colSpan, rowSpan: this.rowSpan, scope: this.scope,
|
|
65
65
|
// eslint-disable-next-line jsx-a11y/no-interactive-element-to-noninteractive-role
|
|
66
|
-
role: "none" }, h("slot", { key: '
|
|
66
|
+
role: "none" }, h("slot", { key: '9ea7125c2c1cf938c39c0254f45e49f1d96ad194' })));
|
|
67
67
|
}
|
|
68
68
|
static get watchers() { return {
|
|
69
69
|
"colSpan": ["colSpanChanged"],
|
|
@@ -21,7 +21,7 @@ const TableRow = /*@__PURE__*/ proxyCustomElement(class TableRow extends H {
|
|
|
21
21
|
}
|
|
22
22
|
// eslint-disable-next-line @typescript-eslint/class-methods-use-this
|
|
23
23
|
render() {
|
|
24
|
-
return (h("tr", { key: '
|
|
24
|
+
return (h("tr", { key: '451a45eb6b5701569e83e03e969aab29c10bf54a', class: "qds-table-row", role: "none" }, h("slot", { key: '655ee54ea1b3553acf23a38bf4851c86cdb1f21a' })));
|
|
25
25
|
}
|
|
26
26
|
static get style() { return tableRowCss; }
|
|
27
27
|
}, [257, "qds-table-row"]);
|
package/components/qds-table.js
CHANGED
|
@@ -21,7 +21,7 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends H {
|
|
|
21
21
|
}
|
|
22
22
|
// eslint-disable-next-line @typescript-eslint/class-methods-use-this
|
|
23
23
|
render() {
|
|
24
|
-
return h("slot", { key: '
|
|
24
|
+
return h("slot", { key: 'd0da204301a7cd04ca194e53eadfce6896b202e0' });
|
|
25
25
|
}
|
|
26
26
|
static get style() { return tableCss; }
|
|
27
27
|
}, [257, "qds-table"]);
|
package/components/qds-tag.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { T as Tag, d as defineCustomElement$1 } from './p-
|
|
6
|
+
import { T as Tag, d as defineCustomElement$1 } from './p-Vtb6GsBy.js';
|
|
7
7
|
|
|
8
8
|
const QdsTag = Tag;
|
|
9
9
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { p as proxyCustomElement, H, c as createEvent, h, e as Host } from './p-D2489VzR.js';
|
|
7
|
-
import { i as invariant, p as pickFocusEventAttributes, e as pickInputEventAttributes, c as inheritAriaAttributes } from './p-
|
|
7
|
+
import { i as invariant, p as pickFocusEventAttributes, e as pickInputEventAttributes, c as inheritAriaAttributes } from './p-Bm_hrsjc.js';
|
|
8
8
|
import { V as VALID_STATE, C as CUSTOM_ERROR_FLAGS, N as NO_ERROR_FLAGS } from './p-CZRW1LV_.js';
|
|
9
9
|
|
|
10
|
-
const textareaCss = ":host([hidden]){display:none!important}:host{display:inline-block;resize:both}slot{display:none}.qds-textarea{background-color:var(--qds-theme-form-input-background-active);border:var(--qds-form-input-border-width-default) solid var(--qds-theme-form-input-border-default);border-radius:var(--qds-form-input-border-radius);box-sizing:border-box;color:var(--qds-theme-
|
|
10
|
+
const textareaCss = ":host([hidden]){display:none!important}:host{display:inline-block;resize:both}slot{display:none}.qds-textarea{background-color:var(--qds-theme-form-input-background-active);border:var(--qds-form-input-border-width-default) solid var(--qds-theme-form-input-border-default);border-radius:var(--qds-form-input-border-radius);box-sizing:border-box;color:var(--qds-theme-form-input-text-active);height:100%;padding-inline:var(--qds-control-input-padding-horizontal);resize:inherit;width:100%}.qds-textarea:hover{background-color:var(--qds-theme-form-input-background-hover);border-color:var(--qds-theme-form-input-border-hover)}.qds-textarea:disabled{background-color:var(--qds-theme-form-input-background-default);opacity:var(--qds-theme-disabled);pointer-events:none}.qds-textarea:read-only{background-color:var(--qds-theme-form-input-background-read-only);border-color:var(--qds-theme-form-input-border-disabled)}.qds-textarea:focus-visible{box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-textarea:placeholder-shown{color:var(--qds-theme-control-text-placeholder)}.qds-textarea:not(:focus):user-invalid{border-color:var(--qds-theme-form-input-border-error)}.qds-textarea[data-status]{border-width:var(--qds-form-input-border-width-status) var(\n --qds-form-input-border-width-inline-end,var(--qds-form-input-border-width-status)\n ) var(\n --qds-form-input-border-width-block-end,var(--qds-form-input-border-width-status)\n ) var(--qds-form-input-border-width-status)}.qds-textarea[data-status=success]{border-color:var(--qds-theme-form-input-border-success)}.qds-textarea[data-status=warning]{border-color:var(--qds-theme-form-input-border-warning)}.qds-textarea[data-status=error]{border-color:var(--qds-theme-form-input-border-error)}[data-size=small]{font:var(--qds-control-small-text);padding-block:var(--qds-control-small-padding-auto-height)}[data-size=standard]{font:var(--qds-control-standard-text);padding-block:var(--qds-control-standard-padding-auto-height)}[data-size=large]{font:var(--qds-control-large-text);padding-block:var(--qds-control-large-padding-auto-height)}";
|
|
11
11
|
|
|
12
12
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
13
13
|
//
|
|
@@ -264,9 +264,9 @@ const TextArea = /*@__PURE__*/ proxyCustomElement(class TextArea extends H {
|
|
|
264
264
|
this.valueChanged();
|
|
265
265
|
}
|
|
266
266
|
render() {
|
|
267
|
-
return (h(Host, { key: '
|
|
267
|
+
return (h(Host, { key: 'a1124b2f6ac9a85ae42a10e94fa2c82bc09f176a' }, h("textarea", { key: '0bc3d2ccf9d4bb645b5ec765a2a8836910231e88', autoCapitalize: this.host.autocapitalize, autoComplete: this.autoComplete,
|
|
268
268
|
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
269
|
-
autoFocus: this.host.autofocus, class: "qds-textarea", cols: this.cols, "data-size": this.size ?? 'standard', "data-status": __classPrivateFieldGet(this, _TextArea_instances, "a", _TextArea_computedStatus_get), disabled: this.disabled, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, maxLength: this.maxLength, minLength: this.minLength, onBlur: __classPrivateFieldGet(this, _TextArea_onBlur, "f"), onChange: __classPrivateFieldGet(this, _TextArea_onChange, "f"), onFocus: __classPrivateFieldGet(this, _TextArea_onFocus, "f"), onInput: __classPrivateFieldGet(this, _TextArea_onInput, "f"), placeholder: this.placeholder, ref: __classPrivateFieldGet(this, _TextArea_ref, "f"), readOnly: this.readonly, rows: this.rows, spellcheck: this.host.spellcheck, tabIndex: __classPrivateFieldGet(this, _TextArea_instances, "a", _TextArea_computedDisabled_get) ? undefined : this.tabIndex, wrap: this.wrap, ...__classPrivateFieldGet(this, _TextArea_inheritedAttributes, "f") }), h("slot", { key: '
|
|
269
|
+
autoFocus: this.host.autofocus, class: "qds-textarea", cols: this.cols, "data-size": this.size ?? 'standard', "data-status": __classPrivateFieldGet(this, _TextArea_instances, "a", _TextArea_computedStatus_get), disabled: this.disabled, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, maxLength: this.maxLength, minLength: this.minLength, onBlur: __classPrivateFieldGet(this, _TextArea_onBlur, "f"), onChange: __classPrivateFieldGet(this, _TextArea_onChange, "f"), onFocus: __classPrivateFieldGet(this, _TextArea_onFocus, "f"), onInput: __classPrivateFieldGet(this, _TextArea_onInput, "f"), placeholder: this.placeholder, ref: __classPrivateFieldGet(this, _TextArea_ref, "f"), readOnly: this.readonly, rows: this.rows, spellcheck: this.host.spellcheck, tabIndex: __classPrivateFieldGet(this, _TextArea_instances, "a", _TextArea_computedDisabled_get) ? undefined : this.tabIndex, wrap: this.wrap, ...__classPrivateFieldGet(this, _TextArea_inheritedAttributes, "f") }), h("slot", { key: 'd59563e4625dfc217a2863e3bfe0ab772ca4bdd1', onSlotchange: __classPrivateFieldGet(this, _TextArea_onSlotchange, "f") })));
|
|
270
270
|
}
|
|
271
271
|
static get delegatesFocus() { return true; }
|
|
272
272
|
static get formAssociated() { return true; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"qds-textarea.js","mappings":";;;;;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sBAAA,GAAA,SAAA,sBAAA,CAiPa,CAAc,EAAE,GAAkB,EAAA;AAC9C,IAAA,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AAChE,CAAC;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/textarea/textarea.css?tag=qds-textarea&encapsulation=shadow","src/components/textarea/textarea.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: inline-block;\n resize: both;\n}\n\nslot {\n display: none;\n}\n\n.qds-textarea {\n background-color: var(--qds-theme-form-input-background-active);\n border-radius: var(--qds-form-input-border-radius);\n border: var(--qds-form-input-border-width-default) solid\n var(--qds-theme-form-input-border-default);\n box-sizing: border-box;\n color: var(--qds-theme-control-text-standard);\n height: 100%;\n padding-inline: var(--qds-control-input-padding-horizontal);\n resize: inherit;\n width: 100%;\n\n &:hover {\n background-color: var(--qds-theme-form-input-background-hover);\n border-color: var(--qds-theme-form-input-border-hover);\n }\n\n &:disabled {\n background-color: var(--qds-theme-form-input-background-default);\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n }\n\n &:read-only {\n background-color: var(--qds-theme-form-input-background-default);\n border-color: var(--qds-theme-form-input-border-disabled);\n }\n\n &:focus-visible {\n /* inner ring */\n outline: var(--qds-theme-focus-border-contrast) solid\n var(--qds-focus-light-border-width);\n outline-offset: 0;\n\n /* outer ring */\n box-shadow: 0 0 0 var(--qds-focus-heavy-border-width)\n var(--qds-theme-focus-border);\n }\n\n &:placeholder-shown {\n color: var(--qds-theme-control-text-placeholder);\n }\n\n &:not(:focus):user-invalid {\n border-color: var(--qds-theme-form-input-border-error);\n }\n\n &[data-status] {\n border-width: var(--qds-form-input-border-width-status)\n var(\n --qds-form-input-border-width-inline-end,\n var(--qds-form-input-border-width-status)\n )\n var(\n --qds-form-input-border-width-block-end,\n var(--qds-form-input-border-width-status)\n )\n var(--qds-form-input-border-width-status);\n }\n\n &[data-status='success'] {\n border-color: var(--qds-theme-form-input-border-success);\n }\n\n &[data-status='warning'] {\n border-color: var(--qds-theme-form-input-border-warning);\n }\n\n &[data-status='error'] {\n border-color: var(--qds-theme-form-input-border-error);\n }\n}\n\n[data-size='small'] {\n font: var(--qds-control-small-text);\n padding-block: var(--qds-control-small-padding-auto-height);\n}\n\n[data-size='standard'] {\n font: var(--qds-control-standard-text);\n padding-block: var(--qds-control-standard-padding-auto-height);\n}\n\n[data-size='large'] {\n font: var(--qds-control-large-text);\n padding-block: var(--qds-control-large-padding-auto-height);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\n\nimport type {\n Attributes,\n QdsFocusEventDetail,\n QdsInputEventDetail,\n} from '../../helpers'\nimport {\n inheritAriaAttributes,\n invariant,\n pickFocusEventAttributes,\n pickInputEventAttributes,\n} from '../../helpers'\nimport type { EnterKeyHint, InputMode, Value } from '../controls'\nimport { CUSTOM_ERROR_FLAGS, NO_ERROR_FLAGS, VALID_STATE } from '../controls'\nimport type { Size, Status } from '../shared'\n\nexport type TextAreaAutoComplete = 'off' | 'on'\n// TODO: `hard` value isn't supported by Firefox or Safari\nexport type Wrap = 'off' | 'soft'\nexport type TextAreaStatus = Exclude<Status, 'info'>\n\n/**\n * The `<qds-textarea>` element represents a multi-line plain-text editing\n * control, useful when you want to allow users to enter a sizeable amount of\n * free-form text, for example a comment on a review or feedback form.\n *\n * @see https://quartz.se.com/build/components/textarea\n */\n@Component({\n tag: 'qds-textarea',\n formAssociated: true,\n shadow: { delegatesFocus: true },\n styleUrl: 'textarea.css',\n})\nexport class TextArea implements ComponentInterface {\n /**\n * The textarea's size.\n *\n * > **_NOTE:_** The native [`size` HTML attribute][] is not supported. CSS\n * `width` should be used instead if this functionality is needed.\n *\n * [`size` HTML attribute]: https://developer.mozilla.org/docs/Web/HTML/Attributes/size\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * The textarea's status.\n */\n @Prop() public readonly status?: TextAreaStatus\n\n /**\n * Indicates whether the value of the textarea can be automatically completed\n * by the browser. Possible values:\n *\n * `off`: The user must explicitly enter a value into this field for every\n * use, or the document provides its own auto-completion method; the browser\n * does not automatically complete the entry.\n * `on`: The browser can automatically complete the value based on values\n * that the user has entered during previous uses.\n *\n * If the `autocomplete` attribute is not specified on a `<qds-textarea>`\n * element, then the browser uses the `autocomplete` attribute value of the\n * `<qds-textarea>` element's form owner. The form owner is either the\n * [`<form>`][] element that this `<qds-textarea>` element is a descendant of\n * or the form element whose `id` is specified by the `form` attribute of the\n * `qds-textarea` element. For more information, see the [`autocomplete`]\n * attribute in [`<form>`][].\n *\n * [`<form>`]: https://developer.mozilla.org/docs/Web/HTML/Element/form\n * [`autocomplete`]: https://developer.mozilla.org/docs/Web/HTML/Element/form#autocomplete\n *\n * @webnative\n */\n @Prop({ attribute: 'autocomplete' })\n public readonly autoComplete?: TextAreaAutoComplete\n\n /**\n * The visible width of the text control, in average character widths. If it\n * is specified, it must be a positive integer. If it is not specified, the\n * default value is `20`.\n *\n * @webnative\n */\n @Prop() public readonly cols?: number\n\n /**\n * Prevents the textarea from being interacted with: it cannot be pressed or\n * focused.\n *\n * @webnative\n */\n @Prop() public disabled?: boolean\n\n /**\n * Prevents the user from changing the value of the textarea.\n */\n @Prop() public readonly readonly?: boolean\n\n /**\n * What action label (or icon) to present for the enter key on virtual\n * keyboards. Possible values:\n *\n * - `\"done\"`: Typically meaning there is nothing more to input and the input\n * method editor (IME) will be closed.\n * - `\"enter\"`:\tTypically inserting a new line.\n * - `\"go\"`: \tTypically meaning to take the user to the target of the text\n * they typed.\n * - `\"next\"`: \tTypically taking the user to the next field that will accept\n * text.\n * - `\"previous\"`: Typically taking the user to the previous field that will\n * accept text.\n * - `\"search\"`: Typically taking the user to the results of searching for\n * the text they have typed.\n * - `\"send\"`: Typically delivering the text to its target.\n *\n * @webnative\n */\n // FIXME: Can't use `attribute` option here to name this `enterKeyHint` instead.\n @Prop() public readonly enterkeyhint?: EnterKeyHint\n\n /**\n * The [`<form>`][] element to associate the input with (its form owner).\n *\n * The value of this attribute must be the id of a `<form>` in the same\n * document. If this attribute is not set, the `<qds-textarea>` is associated\n * with its ancestor `<form>` element, if any.\n *\n * This attribute lets you associate `<qds-textarea>` elements to `<form>`s\n * anywhere in the document, not just inside a `<form>`. It can also override\n * an ancestor `<form>` element.\n *\n * [`<form>`]: https://developer.mozilla.org/docs/Web/HTML/Element/form\n *\n * @readonly\n * @webnative\n */\n // eslint-disable-next-line unicorn/no-null\n @Prop() public readonly form: ElementInternals['form'] | string = null\n\n /**\n * Provide a hint to browsers as to the type of virtual keyboard\n * configuration to use when editing this element or its contents.\n *\n * @webnative\n */\n // FIXME: Can't use `attribute` option here to name this `inputMode` instead.\n @Prop() public readonly inputmode?: InputMode\n\n /**\n * Returns a list of the [`<label>`][] elements associated with the\n * `qds-textarea` element.\n *\n * [`<label>`]: https://developer.mozilla.org/docs/Web/HTML/Element/label\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly labels: ElementInternals['labels'] =\n {} as ElementInternals['labels']\n\n /**\n * The maximum number of characters (as UTF-16 code units) the user can enter\n * into the textarea. This must be an non-negative integer value. If no\n * `maxlength` is specified, or an invalid value is specified, the textarea\n * has no maximum length.\n *\n * The textarea will fail [constraint validation][] if the length of the text\n * entered into the field is greater than `maxlength` UTF-16 code units long.\n * By default, browsers prevent users from entering more characters than\n * allowed by the `maxlength` attribute. See [Client-side validation][] for\n * more information.\n *\n * [constraint validation]: https://developer.mozilla.org/docs/Web/Guide/HTML/Constraint_validation\n * [Client-side validation]: https://developer.mozilla.org/docs/Web/HTML/Element/input#client-side_validation\n *\n * @webnative\n */\n @Prop({ attribute: 'maxlength' }) public readonly maxLength?: number\n\n /**\n * The minimum number of characters (as UTF-16 code units) the user can enter\n * into the textarea. This must be an non-negative integer value smaller than\n * or equal to the value specified by `maxlength`. If no `minlength` is\n * specified, or an invalid value is specified, the textarea has no minimum\n * length.\n *\n * The textarea will fail [constraint validation][] if the length of the text\n * entered into the field is fewer than `minlength` UTF-16 code units long,\n * preventing form submission. See [Client-side validation][] for more\n * information.\n *\n * [constraint validation]: https://developer.mozilla.org/docs/Web/Guide/HTML/Constraint_validation\n * [Client-side validation]: https://developer.mozilla.org/docs/Web/HTML/Element/input#client-side_validation\n *\n * @webnative\n */\n @Prop({ attribute: 'minlength' }) public readonly minLength?: number\n\n /**\n * The name of the textarea, which is submitted with the form data.\n *\n * @webnative\n */\n @Prop() public readonly name?: string\n\n /**\n * Text that appears in the textarea when it has no value set.\n *\n * @webnative\n */\n @Prop() public readonly placeholder?: string\n\n /**\n * A value must be specified for the textarea before the owning form can be\n * submitted.\n *\n * See [Client-side validation][] and the [HTML attribute: `required`][] for\n * more information.\n *\n * [Client-side validation]: https://developer.mozilla.org/docs/Web/HTML/Element/input#client-side_validation\n * [HTML attribute: `required`]: https://developer.mozilla.org/docs/Web/HTML/Attributes/required\n *\n * @webnative\n */\n @Prop() public readonly required?: boolean\n\n /**\n * The number of visible text lines for the control. If it is specified, it\n * must be a positive integer. If it is not specified, the default value is\n * `2`.\n *\n * @webnative\n */\n @Prop() public readonly rows?: number\n\n /**\n * Get or set the selection direction of a text selection.\n *\n * > **_NOTE:_** This property has no effect when used as an attribute.\n *\n * @webnative\n */\n @Prop({ mutable: true })\n // FIXME: Use `HTMLTextAreaElement['selectionDirection']` instead.\n // eslint-disable-next-line unicorn/no-null\n public selectionDirection: HTMLInputElement['selectionDirection'] = null\n\n /**\n * Get or set the ending position or offset of a text selection.\n *\n * > **_NOTE:_** This property has no effect when used as an attribute.\n *\n * @webnative\n */\n @Prop({ mutable: true })\n // FIXME: Use `HTMLTextAreaElement['selectionEnd']` instead.\n // eslint-disable-next-line unicorn/no-null\n public selectionEnd: HTMLInputElement['selectionEnd'] = null\n\n /**\n * Get or set the starting position or offset of a text selection.\n *\n * > **_NOTE:_** This property has no effect when used as an attribute.\n *\n * @webnative\n */\n @Prop({ mutable: true })\n // FIXME: Use `HTMLTextAreaElement['selectionStart']` instead.\n // eslint-disable-next-line unicorn/no-null\n public selectionStart: HTMLInputElement['selectionStart'] = null\n\n /**\n * The error message that would be shown to the user if the `<qds-select>`\n * was to be checked for validity.\n *\n * @readonly\n * @webnative\n */\n @Prop()\n public readonly validationMessage: ElementInternals['validationMessage'] = ''\n\n /**\n * The [`ValidityState`][] object for this `<qds-select>`.\n *\n * [`ValidityState`]: https://developer.mozilla.org/docs/Web/API/ValidityState\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly validity: ElementInternals['validity'] = VALID_STATE\n\n /**\n * The value of the textarea.\n *\n * @webnative\n */\n @Prop({ mutable: true }) public value?: Value\n\n /**\n * True if `<qds-textarea>` will be validated when the form is submitted;\n * false otherwise.\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly willValidate: ElementInternals['willValidate'] = false\n\n /**\n * Indicates how the control should wrap the value for form submission.\n * Possible values are:\n *\n * - `hard`: The browser automatically inserts line breaks (`CR+LF`) so that\n * each line is no longer than the width of the control; the `cols` attribute\n * must be specified for this to take effect\n * - `soft`: The browser ensures that all line breaks in the entered value\n * are a `CR+LF` pair, but no additional line breaks are added to the value.\n * - `off`: Like `soft` but changes appearance to `white-space: pre` so line\n * segments exceeding `cols` are not wrapped and the `<qds-textarea>` becomes\n * horizontally scrollable.\n *\n * If this attribute is not specified, `soft` is its default value.\n *\n * @webnative\n */\n @Prop() public readonly wrap?: Wrap\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n /**\n * Emitted when the textarea loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when an alteration to the textarea's value is committed by the\n * user.\n */\n @Event({ eventName: 'qdsChange', cancelable: false })\n private readonly changeEmitter!: EventEmitter<void>\n\n /**\n * Emitted when the textarea gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the textarea's value changes.\n */\n @Event({ eventName: 'qdsInput', cancelable: false })\n private readonly inputEmitter!: EventEmitter<QdsInputEventDetail>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private tabIndex?: number\n\n #inheritedAttributes: Attributes = {}\n\n #textarea?: HTMLTextAreaElement\n\n get #computedDisabled(): boolean {\n return (\n (this.host.matches(':disabled') || (this.disabled ?? false)) &&\n this.host.getAttribute('disabled') !== 'false'\n )\n }\n\n get #computedValue(): Parameters<ElementInternals['setFormValue']>[0] {\n if (typeof this.value === 'number') return this.value.toString()\n // eslint-disable-next-line unicorn/no-null\n return this.value === undefined ? null : this.value\n }\n\n get #computedStatus(): TextAreaStatus | undefined {\n switch (this.status) {\n case 'error':\n case 'success':\n case 'warning': {\n return this.status\n }\n default: {\n return undefined\n }\n }\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) event.stopImmediatePropagation()\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n if (this.#computedDisabled)\n // eslint-disable-next-line unicorn/no-null\n this.internals.setFormValue(null)\n else this.internals.setFormValue(this.#computedValue)\n }\n\n @Watch('selectionDirection')\n protected selectionDirectionChanged(): void {\n invariant(this.#textarea)\n\n // @ts-expect-error: `null` is a valid value according to the HTML spec.\n this.#textarea.selectionDirection = this.selectionDirection\n }\n\n @Watch('selectionEnd')\n protected selectionEndChanged(): void {\n invariant(this.#textarea)\n\n // @ts-expect-error: `null` is a valid value according to the HTML spec.\n this.#textarea.selectionEnd = this.selectionEnd\n }\n\n @Watch('selectionStart')\n protected selectionStartChanged(): void {\n invariant(this.#textarea)\n\n // @ts-expect-error: `null` is a valid value according to the HTML spec.\n this.#textarea.selectionStart = this.selectionStart\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string): void {\n const parsedValue = Number.parseInt(newValue, 10)\n this.tabIndex =\n parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue\n }\n\n @Watch('maxLength')\n @Watch('minLength')\n @Watch('required')\n @Watch('value')\n protected validationChanged(): void {\n invariant(this.#textarea)\n\n if (this.maxLength !== undefined) this.#textarea.maxLength = this.maxLength\n if (this.minLength !== undefined) this.#textarea.minLength = this.minLength\n this.#textarea.required = this.required ?? false\n // eslint-disable-next-line unicorn/no-null\n if (this.value != null) this.#textarea.value = this.value.toString()\n\n const { valid } = this.#textarea.validity\n if (valid)\n this.internals.setValidity(NO_ERROR_FLAGS, undefined, this.#textarea)\n else\n this.internals.setValidity(\n this.#textarea.validity,\n this.#textarea.validationMessage,\n this.#textarea,\n )\n }\n\n @Watch('value')\n protected valueChanged(): void {\n if (!this.#computedDisabled)\n this.internals.setFormValue(this.#computedValue)\n }\n\n @Watch('status')\n protected statusChanged(): void {\n this.internals.ariaInvalid = (this.#computedStatus === 'error').toString()\n }\n\n public componentWillLoad(): void {\n this.#defineGetter('form', () => this.internals.form)\n this.#defineGetter('willValidate', () => this.internals.willValidate)\n this.#defineGetter('validity', () => this.internals.validity)\n this.#defineGetter(\n 'validationMessage',\n () => this.internals.validationMessage,\n )\n this.#defineGetter('labels', () => this.internals.labels)\n\n this.#defineGetter('selectionDirection', this.#getSelectionDirection)\n this.#defineGetter('selectionStart', this.#getSelectionStart)\n this.#defineGetter('selectionEnd', this.#getSelectionEnd)\n\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n this.statusChanged()\n }\n\n public componentDidLoad(): void {\n invariant(this.#textarea)\n\n this.validationChanged()\n this.valueChanged()\n }\n\n public render() {\n return (\n <Host>\n <textarea\n autoCapitalize={this.host.autocapitalize}\n autoComplete={this.autoComplete}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={this.host.autofocus}\n class=\"qds-textarea\"\n cols={this.cols}\n data-size={this.size ?? 'standard'}\n data-status={this.#computedStatus}\n disabled={this.disabled}\n enterKeyHint={this.enterkeyhint}\n inputMode={this.inputmode}\n maxLength={this.maxLength}\n minLength={this.minLength}\n onBlur={this.#onBlur}\n onChange={this.#onChange}\n onFocus={this.#onFocus}\n onInput={this.#onInput}\n placeholder={this.placeholder}\n ref={this.#ref}\n readOnly={this.readonly}\n rows={this.rows}\n spellcheck={this.host.spellcheck}\n tabIndex={this.#computedDisabled ? undefined : this.tabIndex}\n wrap={this.wrap}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n />\n <slot onSlotchange={this.#onSlotchange} />\n </Host>\n )\n }\n\n public checkValidity: ElementInternals['checkValidity'] = () =>\n this.internals.checkValidity()\n\n public reportValidity: ElementInternals['reportValidity'] = () =>\n this.internals.reportValidity()\n\n public setCustomValidity: HTMLTextAreaElement['setCustomValidity'] = (\n error,\n ) => {\n invariant(this.#textarea)\n\n this.#textarea.setCustomValidity(error)\n if (error)\n this.internals.setValidity(CUSTOM_ERROR_FLAGS, error, this.#textarea)\n else this.internals.setValidity(NO_ERROR_FLAGS)\n }\n\n public select: HTMLTextAreaElement['select'] = () => {\n invariant(this.#textarea)\n\n this.#textarea.select()\n }\n\n public setRangeText = (\n replacement: string,\n start: number,\n end: number,\n selectionMode?: SelectionMode,\n ): void => {\n invariant(this.#textarea)\n\n this.#textarea.setRangeText(replacement, start, end, selectionMode)\n\n if (this.value !== this.#textarea.value) {\n this.value = this.#textarea.value\n this.inputEmitter.emit()\n this.changeEmitter.emit()\n }\n }\n\n public setSelectionRange: HTMLTextAreaElement['setSelectionRange'] = (\n start,\n end,\n direction,\n ) => {\n invariant(this.#textarea)\n\n this.#textarea.setSelectionRange(start, end, direction)\n }\n\n readonly #getSelectionDirection: () => HTMLTextAreaElement['selectionDirection'] =\n () => {\n invariant(this.#textarea)\n\n return this.#textarea.selectionDirection\n }\n\n readonly #getSelectionStart: () => HTMLTextAreaElement['selectionStart'] =\n () => {\n invariant(this.#textarea)\n\n return this.#textarea.selectionStart\n }\n\n readonly #getSelectionEnd: () => HTMLTextAreaElement['selectionEnd'] = () => {\n invariant(this.#textarea)\n\n return this.#textarea.selectionEnd\n }\n\n readonly #ref = (textarea?: HTMLTextAreaElement): void => {\n this.#textarea = textarea\n }\n\n readonly #onBlur = (event: FocusEvent): void => {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onChange = (): void => {\n this.changeEmitter.emit()\n }\n\n readonly #onFocus = (event: FocusEvent): void => {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onInput = (event: InputEvent): void => {\n invariant(this.#textarea)\n\n this.value = this.#textarea.value\n this.inputEmitter.emit(pickInputEventAttributes(event))\n }\n\n readonly #onSlotchange = (): void => {\n invariant(this.#textarea)\n this.#textarea.innerHTML = this.host.innerHTML\n }\n\n #defineGetter(p: PropertyKey, get: () => unknown): void {\n Object.defineProperty(this.host, p, { enumerable: true, get })\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"qds-textarea.js","mappings":";;;;;;;;;AAAA,MAAM,WAAW,GAAG,4sEAA4sE;;ACAhuE;AACA;AACA;;;;;;;;;;;;;;;;;;MAiDa,QAAQ,iBAAAA,kBAAA,CAAA,MAAA,QAAA,SAAAC,CAAA,CAAA;AANrB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;;;;;AAOE;;;;;;;AAOG;AACqB,QAAA,IAAI,CAAA,IAAA,GAAU,UAAU;AA6EhD;;;;;;;;;;;;;;;AAeG;;AAEqB,QAAA,IAAI,CAAA,IAAA,GAAsC,IAAI;AAWtE;;;;;;;;AAQG;AACqB,QAAA,IAAM,CAAA,MAAA,GAC5B,EAAgC;AA6ElC;;;;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EAAA,0CAAA,EAAA,YAAY,EAAE,sBAAA,CAAA,IAAI,8BAAc,EAAI,CAAA,CACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlKT,IAAA,QACE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC;QAC3D,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,OAAO;AAElD,CAAC,EAAA,2BAAA,GAAA,SAAA,2BAAA,GAAA;AAGC,IAAA,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ;AAAE,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;AAEhE,IAAA,OAAO,IAAI,CAAC,KAAK,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK;AACrD,CAAC,EAAA,4BAAA,GAAA,SAAA,4BAAA,GAAA;AAGC,IAAA,QAAQ,IAAI,CAAC,MAAM;AACjB,QAAA,KAAK,OAAO;AACZ,QAAA,KAAK,SAAS;QACd,KAAK,SAAS,EAAE;YACd,OAAO,IAAI,CAAC,MAAM;;QAEpB,SAAS;AACP,YAAA,OAAO,SAAS;;;AAGtB,CAAC,EAAA,sBAAA,GAAA,SAAA,sBAAA,CAiPa,CAAc,EAAE,GAAkB,EAAA;AAC9C,IAAA,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AAChE,CAAC;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/textarea/textarea.css?tag=qds-textarea&encapsulation=shadow","src/components/textarea/textarea.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: inline-block;\n resize: both;\n}\n\nslot {\n display: none;\n}\n\n.qds-textarea {\n background-color: var(--qds-theme-form-input-background-active);\n border-radius: var(--qds-form-input-border-radius);\n border: var(--qds-form-input-border-width-default) solid\n var(--qds-theme-form-input-border-default);\n box-sizing: border-box;\n color: var(--qds-theme-form-input-text-active);\n height: 100%;\n padding-inline: var(--qds-control-input-padding-horizontal);\n resize: inherit;\n width: 100%;\n\n &:hover {\n background-color: var(--qds-theme-form-input-background-hover);\n border-color: var(--qds-theme-form-input-border-hover);\n }\n\n &:disabled {\n background-color: var(--qds-theme-form-input-background-default);\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n }\n\n &:read-only {\n background-color: var(--qds-theme-form-input-background-read-only);\n border-color: var(--qds-theme-form-input-border-disabled);\n }\n\n &:focus-visible {\n /* inner ring */\n outline: var(--qds-theme-focus-border-contrast) solid\n var(--qds-focus-light-border-width);\n outline-offset: 0;\n\n /* outer ring */\n box-shadow: 0 0 0 var(--qds-focus-heavy-border-width)\n var(--qds-theme-focus-border);\n }\n\n &:placeholder-shown {\n color: var(--qds-theme-control-text-placeholder);\n }\n\n &:not(:focus):user-invalid {\n border-color: var(--qds-theme-form-input-border-error);\n }\n\n &[data-status] {\n border-width: var(--qds-form-input-border-width-status)\n var(\n --qds-form-input-border-width-inline-end,\n var(--qds-form-input-border-width-status)\n )\n var(\n --qds-form-input-border-width-block-end,\n var(--qds-form-input-border-width-status)\n )\n var(--qds-form-input-border-width-status);\n }\n\n &[data-status='success'] {\n border-color: var(--qds-theme-form-input-border-success);\n }\n\n &[data-status='warning'] {\n border-color: var(--qds-theme-form-input-border-warning);\n }\n\n &[data-status='error'] {\n border-color: var(--qds-theme-form-input-border-error);\n }\n}\n\n[data-size='small'] {\n font: var(--qds-control-small-text);\n padding-block: var(--qds-control-small-padding-auto-height);\n}\n\n[data-size='standard'] {\n font: var(--qds-control-standard-text);\n padding-block: var(--qds-control-standard-padding-auto-height);\n}\n\n[data-size='large'] {\n font: var(--qds-control-large-text);\n padding-block: var(--qds-control-large-padding-auto-height);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\n\nimport type {\n Attributes,\n QdsFocusEventDetail,\n QdsInputEventDetail,\n} from '../../helpers'\nimport {\n inheritAriaAttributes,\n invariant,\n pickFocusEventAttributes,\n pickInputEventAttributes,\n} from '../../helpers'\nimport type { EnterKeyHint, InputMode, Value } from '../controls'\nimport { CUSTOM_ERROR_FLAGS, NO_ERROR_FLAGS, VALID_STATE } from '../controls'\nimport type { Size, Status } from '../shared'\n\nexport type TextAreaAutoComplete = 'off' | 'on'\n// TODO: `hard` value isn't supported by Firefox or Safari\nexport type Wrap = 'off' | 'soft'\nexport type TextAreaStatus = Exclude<Status, 'info'>\n\n/**\n * The `<qds-textarea>` element represents a multi-line plain-text editing\n * control, useful when you want to allow users to enter a sizeable amount of\n * free-form text, for example a comment on a review or feedback form.\n *\n * @see https://quartz.se.com/build/components/textarea\n */\n@Component({\n tag: 'qds-textarea',\n formAssociated: true,\n shadow: { delegatesFocus: true },\n styleUrl: 'textarea.css',\n})\nexport class TextArea implements ComponentInterface {\n /**\n * The textarea's size.\n *\n * > **_NOTE:_** The native [`size` HTML attribute][] is not supported. CSS\n * `width` should be used instead if this functionality is needed.\n *\n * [`size` HTML attribute]: https://developer.mozilla.org/docs/Web/HTML/Attributes/size\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * The textarea's status.\n */\n @Prop() public readonly status?: TextAreaStatus\n\n /**\n * Indicates whether the value of the textarea can be automatically completed\n * by the browser. Possible values:\n *\n * `off`: The user must explicitly enter a value into this field for every\n * use, or the document provides its own auto-completion method; the browser\n * does not automatically complete the entry.\n * `on`: The browser can automatically complete the value based on values\n * that the user has entered during previous uses.\n *\n * If the `autocomplete` attribute is not specified on a `<qds-textarea>`\n * element, then the browser uses the `autocomplete` attribute value of the\n * `<qds-textarea>` element's form owner. The form owner is either the\n * [`<form>`][] element that this `<qds-textarea>` element is a descendant of\n * or the form element whose `id` is specified by the `form` attribute of the\n * `qds-textarea` element. For more information, see the [`autocomplete`]\n * attribute in [`<form>`][].\n *\n * [`<form>`]: https://developer.mozilla.org/docs/Web/HTML/Element/form\n * [`autocomplete`]: https://developer.mozilla.org/docs/Web/HTML/Element/form#autocomplete\n *\n * @webnative\n */\n @Prop({ attribute: 'autocomplete' })\n public readonly autoComplete?: TextAreaAutoComplete\n\n /**\n * The visible width of the text control, in average character widths. If it\n * is specified, it must be a positive integer. If it is not specified, the\n * default value is `20`.\n *\n * @webnative\n */\n @Prop() public readonly cols?: number\n\n /**\n * Prevents the textarea from being interacted with: it cannot be pressed or\n * focused.\n *\n * @webnative\n */\n @Prop() public disabled?: boolean\n\n /**\n * Prevents the user from changing the value of the textarea.\n */\n @Prop() public readonly readonly?: boolean\n\n /**\n * What action label (or icon) to present for the enter key on virtual\n * keyboards. Possible values:\n *\n * - `\"done\"`: Typically meaning there is nothing more to input and the input\n * method editor (IME) will be closed.\n * - `\"enter\"`:\tTypically inserting a new line.\n * - `\"go\"`: \tTypically meaning to take the user to the target of the text\n * they typed.\n * - `\"next\"`: \tTypically taking the user to the next field that will accept\n * text.\n * - `\"previous\"`: Typically taking the user to the previous field that will\n * accept text.\n * - `\"search\"`: Typically taking the user to the results of searching for\n * the text they have typed.\n * - `\"send\"`: Typically delivering the text to its target.\n *\n * @webnative\n */\n // FIXME: Can't use `attribute` option here to name this `enterKeyHint` instead.\n @Prop() public readonly enterkeyhint?: EnterKeyHint\n\n /**\n * The [`<form>`][] element to associate the input with (its form owner).\n *\n * The value of this attribute must be the id of a `<form>` in the same\n * document. If this attribute is not set, the `<qds-textarea>` is associated\n * with its ancestor `<form>` element, if any.\n *\n * This attribute lets you associate `<qds-textarea>` elements to `<form>`s\n * anywhere in the document, not just inside a `<form>`. It can also override\n * an ancestor `<form>` element.\n *\n * [`<form>`]: https://developer.mozilla.org/docs/Web/HTML/Element/form\n *\n * @readonly\n * @webnative\n */\n // eslint-disable-next-line unicorn/no-null\n @Prop() public readonly form: ElementInternals['form'] | string = null\n\n /**\n * Provide a hint to browsers as to the type of virtual keyboard\n * configuration to use when editing this element or its contents.\n *\n * @webnative\n */\n // FIXME: Can't use `attribute` option here to name this `inputMode` instead.\n @Prop() public readonly inputmode?: InputMode\n\n /**\n * Returns a list of the [`<label>`][] elements associated with the\n * `qds-textarea` element.\n *\n * [`<label>`]: https://developer.mozilla.org/docs/Web/HTML/Element/label\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly labels: ElementInternals['labels'] =\n {} as ElementInternals['labels']\n\n /**\n * The maximum number of characters (as UTF-16 code units) the user can enter\n * into the textarea. This must be an non-negative integer value. If no\n * `maxlength` is specified, or an invalid value is specified, the textarea\n * has no maximum length.\n *\n * The textarea will fail [constraint validation][] if the length of the text\n * entered into the field is greater than `maxlength` UTF-16 code units long.\n * By default, browsers prevent users from entering more characters than\n * allowed by the `maxlength` attribute. See [Client-side validation][] for\n * more information.\n *\n * [constraint validation]: https://developer.mozilla.org/docs/Web/Guide/HTML/Constraint_validation\n * [Client-side validation]: https://developer.mozilla.org/docs/Web/HTML/Element/input#client-side_validation\n *\n * @webnative\n */\n @Prop({ attribute: 'maxlength' }) public readonly maxLength?: number\n\n /**\n * The minimum number of characters (as UTF-16 code units) the user can enter\n * into the textarea. This must be an non-negative integer value smaller than\n * or equal to the value specified by `maxlength`. If no `minlength` is\n * specified, or an invalid value is specified, the textarea has no minimum\n * length.\n *\n * The textarea will fail [constraint validation][] if the length of the text\n * entered into the field is fewer than `minlength` UTF-16 code units long,\n * preventing form submission. See [Client-side validation][] for more\n * information.\n *\n * [constraint validation]: https://developer.mozilla.org/docs/Web/Guide/HTML/Constraint_validation\n * [Client-side validation]: https://developer.mozilla.org/docs/Web/HTML/Element/input#client-side_validation\n *\n * @webnative\n */\n @Prop({ attribute: 'minlength' }) public readonly minLength?: number\n\n /**\n * The name of the textarea, which is submitted with the form data.\n *\n * @webnative\n */\n @Prop() public readonly name?: string\n\n /**\n * Text that appears in the textarea when it has no value set.\n *\n * @webnative\n */\n @Prop() public readonly placeholder?: string\n\n /**\n * A value must be specified for the textarea before the owning form can be\n * submitted.\n *\n * See [Client-side validation][] and the [HTML attribute: `required`][] for\n * more information.\n *\n * [Client-side validation]: https://developer.mozilla.org/docs/Web/HTML/Element/input#client-side_validation\n * [HTML attribute: `required`]: https://developer.mozilla.org/docs/Web/HTML/Attributes/required\n *\n * @webnative\n */\n @Prop() public readonly required?: boolean\n\n /**\n * The number of visible text lines for the control. If it is specified, it\n * must be a positive integer. If it is not specified, the default value is\n * `2`.\n *\n * @webnative\n */\n @Prop() public readonly rows?: number\n\n /**\n * Get or set the selection direction of a text selection.\n *\n * > **_NOTE:_** This property has no effect when used as an attribute.\n *\n * @webnative\n */\n @Prop({ mutable: true })\n // FIXME: Use `HTMLTextAreaElement['selectionDirection']` instead.\n // eslint-disable-next-line unicorn/no-null\n public selectionDirection: HTMLInputElement['selectionDirection'] = null\n\n /**\n * Get or set the ending position or offset of a text selection.\n *\n * > **_NOTE:_** This property has no effect when used as an attribute.\n *\n * @webnative\n */\n @Prop({ mutable: true })\n // FIXME: Use `HTMLTextAreaElement['selectionEnd']` instead.\n // eslint-disable-next-line unicorn/no-null\n public selectionEnd: HTMLInputElement['selectionEnd'] = null\n\n /**\n * Get or set the starting position or offset of a text selection.\n *\n * > **_NOTE:_** This property has no effect when used as an attribute.\n *\n * @webnative\n */\n @Prop({ mutable: true })\n // FIXME: Use `HTMLTextAreaElement['selectionStart']` instead.\n // eslint-disable-next-line unicorn/no-null\n public selectionStart: HTMLInputElement['selectionStart'] = null\n\n /**\n * The error message that would be shown to the user if the `<qds-select>`\n * was to be checked for validity.\n *\n * @readonly\n * @webnative\n */\n @Prop()\n public readonly validationMessage: ElementInternals['validationMessage'] = ''\n\n /**\n * The [`ValidityState`][] object for this `<qds-select>`.\n *\n * [`ValidityState`]: https://developer.mozilla.org/docs/Web/API/ValidityState\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly validity: ElementInternals['validity'] = VALID_STATE\n\n /**\n * The value of the textarea.\n *\n * @webnative\n */\n @Prop({ mutable: true }) public value?: Value\n\n /**\n * True if `<qds-textarea>` will be validated when the form is submitted;\n * false otherwise.\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly willValidate: ElementInternals['willValidate'] = false\n\n /**\n * Indicates how the control should wrap the value for form submission.\n * Possible values are:\n *\n * - `hard`: The browser automatically inserts line breaks (`CR+LF`) so that\n * each line is no longer than the width of the control; the `cols` attribute\n * must be specified for this to take effect\n * - `soft`: The browser ensures that all line breaks in the entered value\n * are a `CR+LF` pair, but no additional line breaks are added to the value.\n * - `off`: Like `soft` but changes appearance to `white-space: pre` so line\n * segments exceeding `cols` are not wrapped and the `<qds-textarea>` becomes\n * horizontally scrollable.\n *\n * If this attribute is not specified, `soft` is its default value.\n *\n * @webnative\n */\n @Prop() public readonly wrap?: Wrap\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n /**\n * Emitted when the textarea loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when an alteration to the textarea's value is committed by the\n * user.\n */\n @Event({ eventName: 'qdsChange', cancelable: false })\n private readonly changeEmitter!: EventEmitter<void>\n\n /**\n * Emitted when the textarea gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the textarea's value changes.\n */\n @Event({ eventName: 'qdsInput', cancelable: false })\n private readonly inputEmitter!: EventEmitter<QdsInputEventDetail>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private tabIndex?: number\n\n #inheritedAttributes: Attributes = {}\n\n #textarea?: HTMLTextAreaElement\n\n get #computedDisabled(): boolean {\n return (\n (this.host.matches(':disabled') || (this.disabled ?? false)) &&\n this.host.getAttribute('disabled') !== 'false'\n )\n }\n\n get #computedValue(): Parameters<ElementInternals['setFormValue']>[0] {\n if (typeof this.value === 'number') return this.value.toString()\n // eslint-disable-next-line unicorn/no-null\n return this.value === undefined ? null : this.value\n }\n\n get #computedStatus(): TextAreaStatus | undefined {\n switch (this.status) {\n case 'error':\n case 'success':\n case 'warning': {\n return this.status\n }\n default: {\n return undefined\n }\n }\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) event.stopImmediatePropagation()\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n if (this.#computedDisabled)\n // eslint-disable-next-line unicorn/no-null\n this.internals.setFormValue(null)\n else this.internals.setFormValue(this.#computedValue)\n }\n\n @Watch('selectionDirection')\n protected selectionDirectionChanged(): void {\n invariant(this.#textarea)\n\n // @ts-expect-error: `null` is a valid value according to the HTML spec.\n this.#textarea.selectionDirection = this.selectionDirection\n }\n\n @Watch('selectionEnd')\n protected selectionEndChanged(): void {\n invariant(this.#textarea)\n\n // @ts-expect-error: `null` is a valid value according to the HTML spec.\n this.#textarea.selectionEnd = this.selectionEnd\n }\n\n @Watch('selectionStart')\n protected selectionStartChanged(): void {\n invariant(this.#textarea)\n\n // @ts-expect-error: `null` is a valid value according to the HTML spec.\n this.#textarea.selectionStart = this.selectionStart\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string): void {\n const parsedValue = Number.parseInt(newValue, 10)\n this.tabIndex =\n parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue\n }\n\n @Watch('maxLength')\n @Watch('minLength')\n @Watch('required')\n @Watch('value')\n protected validationChanged(): void {\n invariant(this.#textarea)\n\n if (this.maxLength !== undefined) this.#textarea.maxLength = this.maxLength\n if (this.minLength !== undefined) this.#textarea.minLength = this.minLength\n this.#textarea.required = this.required ?? false\n // eslint-disable-next-line unicorn/no-null\n if (this.value != null) this.#textarea.value = this.value.toString()\n\n const { valid } = this.#textarea.validity\n if (valid)\n this.internals.setValidity(NO_ERROR_FLAGS, undefined, this.#textarea)\n else\n this.internals.setValidity(\n this.#textarea.validity,\n this.#textarea.validationMessage,\n this.#textarea,\n )\n }\n\n @Watch('value')\n protected valueChanged(): void {\n if (!this.#computedDisabled)\n this.internals.setFormValue(this.#computedValue)\n }\n\n @Watch('status')\n protected statusChanged(): void {\n this.internals.ariaInvalid = (this.#computedStatus === 'error').toString()\n }\n\n public componentWillLoad(): void {\n this.#defineGetter('form', () => this.internals.form)\n this.#defineGetter('willValidate', () => this.internals.willValidate)\n this.#defineGetter('validity', () => this.internals.validity)\n this.#defineGetter(\n 'validationMessage',\n () => this.internals.validationMessage,\n )\n this.#defineGetter('labels', () => this.internals.labels)\n\n this.#defineGetter('selectionDirection', this.#getSelectionDirection)\n this.#defineGetter('selectionStart', this.#getSelectionStart)\n this.#defineGetter('selectionEnd', this.#getSelectionEnd)\n\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n this.statusChanged()\n }\n\n public componentDidLoad(): void {\n invariant(this.#textarea)\n\n this.validationChanged()\n this.valueChanged()\n }\n\n public render() {\n return (\n <Host>\n <textarea\n autoCapitalize={this.host.autocapitalize}\n autoComplete={this.autoComplete}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={this.host.autofocus}\n class=\"qds-textarea\"\n cols={this.cols}\n data-size={this.size ?? 'standard'}\n data-status={this.#computedStatus}\n disabled={this.disabled}\n enterKeyHint={this.enterkeyhint}\n inputMode={this.inputmode}\n maxLength={this.maxLength}\n minLength={this.minLength}\n onBlur={this.#onBlur}\n onChange={this.#onChange}\n onFocus={this.#onFocus}\n onInput={this.#onInput}\n placeholder={this.placeholder}\n ref={this.#ref}\n readOnly={this.readonly}\n rows={this.rows}\n spellcheck={this.host.spellcheck}\n tabIndex={this.#computedDisabled ? undefined : this.tabIndex}\n wrap={this.wrap}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n />\n <slot onSlotchange={this.#onSlotchange} />\n </Host>\n )\n }\n\n public checkValidity: ElementInternals['checkValidity'] = () =>\n this.internals.checkValidity()\n\n public reportValidity: ElementInternals['reportValidity'] = () =>\n this.internals.reportValidity()\n\n public setCustomValidity: HTMLTextAreaElement['setCustomValidity'] = (\n error,\n ) => {\n invariant(this.#textarea)\n\n this.#textarea.setCustomValidity(error)\n if (error)\n this.internals.setValidity(CUSTOM_ERROR_FLAGS, error, this.#textarea)\n else this.internals.setValidity(NO_ERROR_FLAGS)\n }\n\n public select: HTMLTextAreaElement['select'] = () => {\n invariant(this.#textarea)\n\n this.#textarea.select()\n }\n\n public setRangeText = (\n replacement: string,\n start: number,\n end: number,\n selectionMode?: SelectionMode,\n ): void => {\n invariant(this.#textarea)\n\n this.#textarea.setRangeText(replacement, start, end, selectionMode)\n\n if (this.value !== this.#textarea.value) {\n this.value = this.#textarea.value\n this.inputEmitter.emit()\n this.changeEmitter.emit()\n }\n }\n\n public setSelectionRange: HTMLTextAreaElement['setSelectionRange'] = (\n start,\n end,\n direction,\n ) => {\n invariant(this.#textarea)\n\n this.#textarea.setSelectionRange(start, end, direction)\n }\n\n readonly #getSelectionDirection: () => HTMLTextAreaElement['selectionDirection'] =\n () => {\n invariant(this.#textarea)\n\n return this.#textarea.selectionDirection\n }\n\n readonly #getSelectionStart: () => HTMLTextAreaElement['selectionStart'] =\n () => {\n invariant(this.#textarea)\n\n return this.#textarea.selectionStart\n }\n\n readonly #getSelectionEnd: () => HTMLTextAreaElement['selectionEnd'] = () => {\n invariant(this.#textarea)\n\n return this.#textarea.selectionEnd\n }\n\n readonly #ref = (textarea?: HTMLTextAreaElement): void => {\n this.#textarea = textarea\n }\n\n readonly #onBlur = (event: FocusEvent): void => {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onChange = (): void => {\n this.changeEmitter.emit()\n }\n\n readonly #onFocus = (event: FocusEvent): void => {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onInput = (event: InputEvent): void => {\n invariant(this.#textarea)\n\n this.value = this.#textarea.value\n this.inputEmitter.emit(pickInputEventAttributes(event))\n }\n\n readonly #onSlotchange = (): void => {\n invariant(this.#textarea)\n this.#textarea.innerHTML = this.host.innerHTML\n }\n\n #defineGetter(p: PropertyKey, get: () => unknown): void {\n Object.defineProperty(this.host, p, { enumerable: true, get })\n }\n}\n"],"version":3}
|
package/components/qds-title.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { T as Title, d as defineCustomElement$1 } from './p-
|
|
6
|
+
import { T as Title, d as defineCustomElement$1 } from './p-D5u-bDNf.js';
|
|
7
7
|
|
|
8
8
|
const QdsTitle = Title;
|
|
9
9
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { T as Tooltip, d as defineCustomElement$1 } from './p-
|
|
6
|
+
import { T as Tooltip, d as defineCustomElement$1 } from './p-BGAgQ6J5.js';
|
|
7
7
|
|
|
8
8
|
const QdsTooltip = Tooltip;
|
|
9
9
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -275,6 +275,9 @@ const closestElement = (selector, base) => {
|
|
|
275
275
|
}
|
|
276
276
|
return closestFrom(base);
|
|
277
277
|
};
|
|
278
|
+
const isRTL = (element) => getComputedStyle(element).direction === 'rtl';
|
|
279
|
+
const getSubmenuOpenKey = (element) => isRTL(element) ? 'ArrowLeft' : 'ArrowRight';
|
|
280
|
+
const getSubmenuCloseKey = (element) => isRTL(element) ? 'ArrowRight' : 'ArrowLeft';
|
|
278
281
|
const isCurrentPage = (url) => {
|
|
279
282
|
try {
|
|
280
283
|
const currentUrl = new URL(window.location.href);
|
|
@@ -292,17 +295,20 @@ exports.VERTICAL_MOVE_KEYS = VERTICAL_MOVE_KEYS;
|
|
|
292
295
|
exports.closestElement = closestElement;
|
|
293
296
|
exports.componentOnReady = componentOnReady;
|
|
294
297
|
exports.determineLinkIcon = determineLinkIcon;
|
|
298
|
+
exports.getSubmenuCloseKey = getSubmenuCloseKey;
|
|
299
|
+
exports.getSubmenuOpenKey = getSubmenuOpenKey;
|
|
295
300
|
exports.ignorePromise = ignorePromise;
|
|
296
301
|
exports.inheritAriaAttributes = inheritAriaAttributes;
|
|
297
302
|
exports.invariant = invariant;
|
|
298
303
|
exports.isCurrentPage = isCurrentPage;
|
|
299
304
|
exports.isEllipsisActive = isEllipsisActive;
|
|
305
|
+
exports.isRTL = isRTL;
|
|
300
306
|
exports.isTouchDevice = isTouchDevice;
|
|
301
307
|
exports.pickFocusEventAttributes = pickFocusEventAttributes;
|
|
302
308
|
exports.pickInputEventAttributes = pickInputEventAttributes;
|
|
303
309
|
exports.propertyToPx = propertyToPx;
|
|
304
310
|
exports.resolvePanelElement = resolvePanelElement;
|
|
305
311
|
exports.resolveTarget = resolveTarget;
|
|
306
|
-
//# sourceMappingURL=helpers-
|
|
312
|
+
//# sourceMappingURL=helpers-CPSgo4Ef.js.map
|
|
307
313
|
|
|
308
|
-
//# sourceMappingURL=helpers-
|
|
314
|
+
//# sourceMappingURL=helpers-CPSgo4Ef.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers-Qs3cpKiI.js","sources":["src/helpers.ts"],"sourcesContent":["// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n MiddlewareState,\n OffsetOptions as LibraryOffsetOptions,\n ReferenceElement,\n} from '@floating-ui/dom'\nimport type { Except, Replace } from 'type-fest'\n\nimport type { LinkIcon } from './components/shared'\n\nexport type Attributes = Record<string, string | undefined>\n\nconst inheritAttributes = (\n element: Element,\n attributes: string[] = [],\n): Attributes => {\n const attributeObject: Attributes = {}\n\n for (const attribute of attributes) {\n const value = element.getAttribute(attribute)\n if (value !== null) {\n attributeObject[attribute] = value\n element.removeAttribute(attribute)\n }\n }\n\n return attributeObject\n}\n\ntype ARIAAttribute =\n | Replace<Lowercase<keyof ARIAMixin>, 'aria', 'aria-'>\n | 'aria-activedescendant'\n | 'aria-braillelabel'\n | 'aria-brailleroledescription'\n | 'aria-colindextext'\n | 'aria-controls'\n | 'aria-describedby'\n | 'aria-description'\n | 'aria-details'\n | 'aria-errormessage'\n | 'aria-flowto'\n | 'aria-labelledby'\n | 'aria-owns'\n | 'aria-relevant'\n | 'aria-rowindextext'\n\nconst ariaAttributes: ARIAAttribute[] = [\n 'aria-activedescendant',\n 'aria-atomic',\n 'aria-autocomplete',\n 'aria-braillelabel',\n 'aria-brailleroledescription',\n 'aria-busy',\n 'aria-checked',\n 'aria-colcount',\n 'aria-colindex',\n 'aria-colindextext',\n 'aria-colspan',\n 'aria-controls',\n 'aria-current',\n 'aria-describedby',\n 'aria-description',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-flowto',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-level',\n 'aria-live',\n 'aria-multiline',\n 'aria-multiselectable',\n 'aria-orientation',\n 'aria-owns',\n 'aria-placeholder',\n 'aria-posinset',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-relevant',\n 'aria-required',\n 'aria-roledescription',\n 'aria-rowcount',\n 'aria-rowindex',\n 'aria-rowindextext',\n 'aria-rowspan',\n 'aria-selected',\n 'aria-setsize',\n 'aria-sort',\n 'aria-valuemax',\n 'aria-valuemin',\n 'aria-valuenow',\n 'aria-valuetext',\n 'role',\n]\n\n/**\n * Returns an array of aria attributes that should be copied from\n * the shadow host element to a target within the light DOM.\n *\n * @param element The element that the attributes should be copied from.\n */\nexport const inheritAriaAttributes = (\n element: Element,\n): ReturnType<typeof inheritAttributes> =>\n inheritAttributes(element, ariaAttributes)\n\nconst isProduction = process.env.NODE_ENV === 'production'\nconst prefix = 'Invariant failed'\n\n/**\n * Throws an error if the value is falsy.\n *\n * @param value Value to test.\n * @param message Optional message to display in development builds.\n */\nexport function invariant(value: unknown, message?: string): asserts value {\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (value) return\n if (isProduction) throw new Error(prefix)\n\n const error = message === undefined ? prefix : `${prefix}: ${message}`\n throw new Error(error)\n}\n\n/**\n * From an object pick a set of keys.\n *\n * @param object Object to pick from.\n * @param keys They keys to pick.\n * @returns New object with only the picked keys.\n */\nexport const pick = <T, K extends keyof T>(\n object: T,\n ...keys: K[]\n): Pick<T, K> => {\n const returnValue: Partial<Pick<T, K>> = {}\n for (const key of keys) returnValue[key] = object[key]\n return returnValue as Pick<T, K>\n}\n\nexport type QdsFocusEventDetail = Pick<FocusEvent, 'relatedTarget'>\nexport type QdsInputEventDetail = Pick<\n InputEvent,\n 'data' | 'inputType' | 'isComposing'\n>\nexport const pickFocusEventAttributes = (\n event: FocusEvent,\n): QdsFocusEventDetail => pick(event, 'relatedTarget')\nexport const pickInputEventAttributes = (\n event: InputEvent,\n): QdsInputEventDetail => pick(event, 'data', 'inputType', 'isComposing')\n\nconst getConversionFactor = (\n element: Element,\n unit: string,\n): number | undefined => {\n switch (unit) {\n case 'cm': {\n return 96 / 2.54\n }\n case 'em': {\n return Number.parseFloat(\n globalThis.getComputedStyle(\n element.parentElement ?? document.documentElement,\n ).fontSize,\n )\n }\n case 'in': {\n return 96\n }\n case 'mm': {\n return 96 / 25.4\n }\n case 'pc': {\n return 16\n }\n case 'pt': {\n return 96 / 72\n }\n case 'px': {\n return 1\n }\n case 'rem': {\n return Number.parseFloat(\n globalThis.getComputedStyle(document.documentElement).fontSize,\n )\n }\n default: {\n return undefined\n }\n }\n}\n\nexport const propertyToPx = (\n element: Element,\n property: string,\n): number | undefined => {\n const value = globalThis.getComputedStyle(element).getPropertyValue(property)\n const number = Number.parseFloat(value)\n if (Number.isNaN(number)) return undefined\n const unit = /\\s*[\\d+.-]*\\s*(.*)/.exec(value)?.[1] ?? ''\n\n const conversionFactor = getConversionFactor(element, unit) ?? 1\n return number * conversionFactor\n}\n\nexport const ignorePromise = <T>(promise: Promise<T>): void => {\n promise.catch(() => {\n invariant(false)\n })\n}\n\nexport const isTouchDevice = (): boolean =>\n 'ontouchstart' in globalThis ||\n ('maxTouchPoints' in globalThis && globalThis.navigator.maxTouchPoints > 0)\n\n/**\n * Checks if an element's ellipsis is active.\n *\n * @param element The element to check.\n * @returns `true` if ellipsis is active, `false` otherwise.\n */\nexport const isEllipsisActive = (element: Element): boolean => {\n const range = document.createRange()\n range.selectNodeContents(element)\n\n const rangeRect = range.getBoundingClientRect()\n const elementWidth = element.getBoundingClientRect().width\n\n if (rangeRect.width > elementWidth) return true\n\n const { webkitLineClamp, lineHeight } = globalThis.getComputedStyle(element)\n\n const parsedLineClamp = Number.parseInt(webkitLineClamp, 10)\n if (Number.isNaN(parsedLineClamp)) return false\n const parsedLineHeight = Number.parseInt(lineHeight, 10)\n if (Number.isNaN(parsedLineHeight)) return false\n\n return rangeRect.height >= (parsedLineClamp + 1) * parsedLineHeight\n}\n\nexport const determineLinkIcon = (\n target?: string,\n // eslint-disable-next-line unicorn/prevent-abbreviations\n rel?: string,\n): LinkIcon | undefined => {\n if (!(rel?.split(' ') ?? []).includes('external')) return undefined\n return target === '_blank' ? 'external-new-tab-link' : 'external-link'\n}\n\nexport const resolveTarget = (\n target?: ReferenceElement | string | (() => ReferenceElement | string),\n): ReferenceElement | undefined => {\n const resolvedTarget = typeof target === 'function' ? target() : target\n if (typeof resolvedTarget !== 'string') return resolvedTarget\n\n const element = document.querySelector(resolvedTarget)\n if (element === null) throw new Error('String must resolve to an Element.')\n return element\n}\n\n/**\n * Patched version of requestAnimationFrame that avoids ngzone\n * Use only when you know ngzone should not run\n */\nconst raf = (h: FrameRequestCallback): number => {\n const win = window as Window & {\n ['__zone_symbol__requestAnimationFrame']?: (\n callback: FrameRequestCallback,\n ) => number\n }\n // eslint-disable-next-line no-underscore-dangle\n if (typeof win.__zone_symbol__requestAnimationFrame === 'function') {\n // eslint-disable-next-line no-underscore-dangle\n return win.__zone_symbol__requestAnimationFrame(h)\n }\n if (typeof requestAnimationFrame === 'function') {\n return requestAnimationFrame(h)\n }\n return setTimeout(h)\n}\n\n/**\n * Waits for a component to be ready for\n * both custom element and non-custom element builds.\n * If non-custom element build, el.componentOnReady\n * will be used.\n * For custom element builds, we wait a frame\n * so that the inner contents of the component\n * have a chance to render.\n *\n * Use this utility rather than calling\n * el.componentOnReady yourself.\n *\n * Reference: https://stenciljs.com/docs/api#componentonready\n */\nexport const componentOnReady = <\n T extends { componentOnReady?: () => Promise<T> },\n>(\n element: T,\n callback: (element_: T) => void,\n): void => {\n if (element.componentOnReady === undefined) {\n raf(() => {\n callback(element)\n })\n } else {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n element.componentOnReady().then((resolvedElement) => {\n callback(resolvedElement)\n })\n }\n}\n\nconst resolvePanelFromValue = (value: unknown): HTMLElement | undefined => {\n if (value instanceof HTMLElement) {\n return value\n }\n\n if (typeof value === 'string') {\n const element = document.querySelector(value)\n return element instanceof HTMLElement ? element : undefined\n }\n\n return undefined\n}\n\nexport const resolvePanelElement = (\n tab: HTMLQdsTabElement,\n): HTMLElement | undefined => {\n const panelValue = typeof tab.panel === 'function' ? tab.panel() : tab.panel\n return resolvePanelFromValue(panelValue)\n}\n\ntype OffsetValue = Except<\n Exclude<\n LibraryOffsetOptions,\n // eslint-disable-next-line @typescript-eslint/ban-types\n Function | number\n >,\n 'mainAxis'\n>\ntype OffsetFunction = (state: MiddlewareState) => OffsetValue\nexport type OffsetOptions = OffsetFunction | OffsetValue\n\nexport const HORIZONTAL_MOVE_KEYS: ReadonlySet<string> = new Set([\n 'ArrowLeft',\n 'ArrowRight',\n 'Home',\n 'End',\n])\n\nexport const VERTICAL_MOVE_KEYS: ReadonlySet<string> = new Set([\n 'ArrowUp',\n 'ArrowDown',\n 'Home',\n 'End',\n])\n\nexport const closestElement = (\n selector: string,\n base: Element,\n): Element | undefined => {\n function closestFrom(\n element: Document | Element | typeof globalThis,\n ): Element | undefined {\n if (element === document || element === globalThis) return undefined\n const { assignedSlot } = element as Slottable\n // eslint-disable-next-line no-param-reassign\n if (assignedSlot) element = assignedSlot\n const found = (element as Element).closest(selector)\n return (\n found ??\n closestFrom(((element as Element).getRootNode() as ShadowRoot).host)\n )\n }\n return closestFrom(base)\n}\n\nexport const isCurrentPage = (url: string): boolean => {\n try {\n const currentUrl = new URL(window.location.href)\n const targetUrl = new URL(url)\n return (\n currentUrl.origin === targetUrl.origin &&\n currentUrl.pathname === targetUrl.pathname\n )\n } catch {\n return false\n }\n}\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;AACA;AAaA,MAAM,iBAAiB,GAAG,CACxB,OAAgB,EAChB,UAAuB,GAAA,EAAE,KACX;IACd,MAAM,eAAe,GAAe,EAAE;AAEtC,IAAA,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;QAClC,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC;AAC7C,QAAA,IAAI,KAAK,KAAK,IAAI,EAAE;AAClB,YAAA,eAAe,CAAC,SAAS,CAAC,GAAG,KAAK;AAClC,YAAA,OAAO,CAAC,eAAe,CAAC,SAAS,CAAC;;;AAItC,IAAA,OAAO,eAAe;AACxB,CAAC;AAmBD,MAAM,cAAc,GAAoB;IACtC,uBAAuB;IACvB,aAAa;IACb,mBAAmB;IACnB,mBAAmB;IACnB,6BAA6B;IAC7B,WAAW;IACX,cAAc;IACd,eAAe;IACf,eAAe;IACf,mBAAmB;IACnB,cAAc;IACd,eAAe;IACf,cAAc;IACd,kBAAkB;IAClB,kBAAkB;IAClB,cAA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AAM,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC;AAC9B,QAAA,QACE,UAAU,CAAC,MAAM,KAAK,SAAS,CAAC,MAAM;AACtC,YAAA,UAAU,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ;;AAE5C,IAAA,MAAM;AACN,QAAA,OAAO,KAAK;;AAEhB;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"helpers-CPSgo4Ef.js","sources":["src/helpers.ts"],"sourcesContent":["// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n MiddlewareState,\n OffsetOptions as LibraryOffsetOptions,\n ReferenceElement,\n} from '@floating-ui/dom'\nimport type { Except, Replace } from 'type-fest'\n\nimport type { LinkIcon } from './components/shared'\n\nexport type Attributes = Record<string, string | undefined>\n\nconst inheritAttributes = (\n element: Element,\n attributes: string[] = [],\n): Attributes => {\n const attributeObject: Attributes = {}\n\n for (const attribute of attributes) {\n const value = element.getAttribute(attribute)\n if (value !== null) {\n attributeObject[attribute] = value\n element.removeAttribute(attribute)\n }\n }\n\n return attributeObject\n}\n\ntype ARIAAttribute =\n | Replace<Lowercase<keyof ARIAMixin>, 'aria', 'aria-'>\n | 'aria-activedescendant'\n | 'aria-braillelabel'\n | 'aria-brailleroledescription'\n | 'aria-colindextext'\n | 'aria-controls'\n | 'aria-describedby'\n | 'aria-description'\n | 'aria-details'\n | 'aria-errormessage'\n | 'aria-flowto'\n | 'aria-labelledby'\n | 'aria-owns'\n | 'aria-relevant'\n | 'aria-rowindextext'\n\nconst ariaAttributes: ARIAAttribute[] = [\n 'aria-activedescendant',\n 'aria-atomic',\n 'aria-autocomplete',\n 'aria-braillelabel',\n 'aria-brailleroledescription',\n 'aria-busy',\n 'aria-checked',\n 'aria-colcount',\n 'aria-colindex',\n 'aria-colindextext',\n 'aria-colspan',\n 'aria-controls',\n 'aria-current',\n 'aria-describedby',\n 'aria-description',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-flowto',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-level',\n 'aria-live',\n 'aria-multiline',\n 'aria-multiselectable',\n 'aria-orientation',\n 'aria-owns',\n 'aria-placeholder',\n 'aria-posinset',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-relevant',\n 'aria-required',\n 'aria-roledescription',\n 'aria-rowcount',\n 'aria-rowindex',\n 'aria-rowindextext',\n 'aria-rowspan',\n 'aria-selected',\n 'aria-setsize',\n 'aria-sort',\n 'aria-valuemax',\n 'aria-valuemin',\n 'aria-valuenow',\n 'aria-valuetext',\n 'role',\n]\n\n/**\n * Returns an array of aria attributes that should be copied from\n * the shadow host element to a target within the light DOM.\n *\n * @param element The element that the attributes should be copied from.\n */\nexport const inheritAriaAttributes = (\n element: Element,\n): ReturnType<typeof inheritAttributes> =>\n inheritAttributes(element, ariaAttributes)\n\nconst isProduction = process.env.NODE_ENV === 'production'\nconst prefix = 'Invariant failed'\n\n/**\n * Throws an error if the value is falsy.\n *\n * @param value Value to test.\n * @param message Optional message to display in development builds.\n */\nexport function invariant(value: unknown, message?: string): asserts value {\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (value) return\n if (isProduction) throw new Error(prefix)\n\n const error = message === undefined ? prefix : `${prefix}: ${message}`\n throw new Error(error)\n}\n\n/**\n * From an object pick a set of keys.\n *\n * @param object Object to pick from.\n * @param keys They keys to pick.\n * @returns New object with only the picked keys.\n */\nexport const pick = <T, K extends keyof T>(\n object: T,\n ...keys: K[]\n): Pick<T, K> => {\n const returnValue: Partial<Pick<T, K>> = {}\n for (const key of keys) returnValue[key] = object[key]\n return returnValue as Pick<T, K>\n}\n\nexport type QdsFocusEventDetail = Pick<FocusEvent, 'relatedTarget'>\nexport type QdsInputEventDetail = Pick<\n InputEvent,\n 'data' | 'inputType' | 'isComposing'\n>\nexport const pickFocusEventAttributes = (\n event: FocusEvent,\n): QdsFocusEventDetail => pick(event, 'relatedTarget')\nexport const pickInputEventAttributes = (\n event: InputEvent,\n): QdsInputEventDetail => pick(event, 'data', 'inputType', 'isComposing')\n\nconst getConversionFactor = (\n element: Element,\n unit: string,\n): number | undefined => {\n switch (unit) {\n case 'cm': {\n return 96 / 2.54\n }\n case 'em': {\n return Number.parseFloat(\n globalThis.getComputedStyle(\n element.parentElement ?? document.documentElement,\n ).fontSize,\n )\n }\n case 'in': {\n return 96\n }\n case 'mm': {\n return 96 / 25.4\n }\n case 'pc': {\n return 16\n }\n case 'pt': {\n return 96 / 72\n }\n case 'px': {\n return 1\n }\n case 'rem': {\n return Number.parseFloat(\n globalThis.getComputedStyle(document.documentElement).fontSize,\n )\n }\n default: {\n return undefined\n }\n }\n}\n\nexport const propertyToPx = (\n element: Element,\n property: string,\n): number | undefined => {\n const value = globalThis.getComputedStyle(element).getPropertyValue(property)\n const number = Number.parseFloat(value)\n if (Number.isNaN(number)) return undefined\n const unit = /\\s*[\\d+.-]*\\s*(.*)/.exec(value)?.[1] ?? ''\n\n const conversionFactor = getConversionFactor(element, unit) ?? 1\n return number * conversionFactor\n}\n\nexport const ignorePromise = <T>(promise: Promise<T>): void => {\n promise.catch(() => {\n invariant(false)\n })\n}\n\nexport const isTouchDevice = (): boolean =>\n 'ontouchstart' in globalThis ||\n ('maxTouchPoints' in globalThis && globalThis.navigator.maxTouchPoints > 0)\n\n/**\n * Checks if an element's ellipsis is active.\n *\n * @param element The element to check.\n * @returns `true` if ellipsis is active, `false` otherwise.\n */\nexport const isEllipsisActive = (element: Element): boolean => {\n const range = document.createRange()\n range.selectNodeContents(element)\n\n const rangeRect = range.getBoundingClientRect()\n const elementWidth = element.getBoundingClientRect().width\n\n if (rangeRect.width > elementWidth) return true\n\n const { webkitLineClamp, lineHeight } = globalThis.getComputedStyle(element)\n\n const parsedLineClamp = Number.parseInt(webkitLineClamp, 10)\n if (Number.isNaN(parsedLineClamp)) return false\n const parsedLineHeight = Number.parseInt(lineHeight, 10)\n if (Number.isNaN(parsedLineHeight)) return false\n\n return rangeRect.height >= (parsedLineClamp + 1) * parsedLineHeight\n}\n\nexport const determineLinkIcon = (\n target?: string,\n // eslint-disable-next-line unicorn/prevent-abbreviations\n rel?: string,\n): LinkIcon | undefined => {\n if (!(rel?.split(' ') ?? []).includes('external')) return undefined\n return target === '_blank' ? 'external-new-tab-link' : 'external-link'\n}\n\nexport const resolveTarget = (\n target?: ReferenceElement | string | (() => ReferenceElement | string),\n): ReferenceElement | undefined => {\n const resolvedTarget = typeof target === 'function' ? target() : target\n if (typeof resolvedTarget !== 'string') return resolvedTarget\n\n const element = document.querySelector(resolvedTarget)\n if (element === null) throw new Error('String must resolve to an Element.')\n return element\n}\n\n/**\n * Patched version of requestAnimationFrame that avoids ngzone\n * Use only when you know ngzone should not run\n */\nconst raf = (h: FrameRequestCallback): number => {\n const win = window as Window & {\n ['__zone_symbol__requestAnimationFrame']?: (\n callback: FrameRequestCallback,\n ) => number\n }\n // eslint-disable-next-line no-underscore-dangle\n if (typeof win.__zone_symbol__requestAnimationFrame === 'function') {\n // eslint-disable-next-line no-underscore-dangle\n return win.__zone_symbol__requestAnimationFrame(h)\n }\n if (typeof requestAnimationFrame === 'function') {\n return requestAnimationFrame(h)\n }\n return setTimeout(h)\n}\n\n/**\n * Waits for a component to be ready for\n * both custom element and non-custom element builds.\n * If non-custom element build, el.componentOnReady\n * will be used.\n * For custom element builds, we wait a frame\n * so that the inner contents of the component\n * have a chance to render.\n *\n * Use this utility rather than calling\n * el.componentOnReady yourself.\n *\n * Reference: https://stenciljs.com/docs/api#componentonready\n */\nexport const componentOnReady = <\n T extends { componentOnReady?: () => Promise<T> },\n>(\n element: T,\n callback: (element_: T) => void,\n): void => {\n if (element.componentOnReady === undefined) {\n raf(() => {\n callback(element)\n })\n } else {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n element.componentOnReady().then((resolvedElement) => {\n callback(resolvedElement)\n })\n }\n}\n\nconst resolvePanelFromValue = (value: unknown): HTMLElement | undefined => {\n if (value instanceof HTMLElement) {\n return value\n }\n\n if (typeof value === 'string') {\n const element = document.querySelector(value)\n return element instanceof HTMLElement ? element : undefined\n }\n\n return undefined\n}\n\nexport const resolvePanelElement = (tab: {\n panel: Element | string | (() => Element | string)\n}): HTMLElement | undefined => {\n const panelValue = typeof tab.panel === 'function' ? tab.panel() : tab.panel\n return resolvePanelFromValue(panelValue)\n}\n\ntype OffsetValue = Except<\n Exclude<\n LibraryOffsetOptions,\n // eslint-disable-next-line @typescript-eslint/ban-types\n Function | number\n >,\n 'mainAxis'\n>\ntype OffsetFunction = (state: MiddlewareState) => OffsetValue\nexport type OffsetOptions = OffsetFunction | OffsetValue\n\nexport const HORIZONTAL_MOVE_KEYS: ReadonlySet<string> = new Set([\n 'ArrowLeft',\n 'ArrowRight',\n 'Home',\n 'End',\n])\n\nexport const VERTICAL_MOVE_KEYS: ReadonlySet<string> = new Set([\n 'ArrowUp',\n 'ArrowDown',\n 'Home',\n 'End',\n])\n\nexport const closestElement = (\n selector: string,\n base: Element,\n): Element | undefined => {\n function closestFrom(\n element: Document | Element | typeof globalThis,\n ): Element | undefined {\n if (element === document || element === globalThis) return undefined\n const { assignedSlot } = element as Slottable\n // eslint-disable-next-line no-param-reassign\n if (assignedSlot) element = assignedSlot\n const found = (element as Element).closest(selector)\n return (\n found ??\n closestFrom(((element as Element).getRootNode() as ShadowRoot).host)\n )\n }\n return closestFrom(base)\n}\n\nexport const isRTL = (element: Element): boolean =>\n getComputedStyle(element).direction === 'rtl'\n\nexport const getSubmenuOpenKey = (element: Element): string =>\n isRTL(element) ? 'ArrowLeft' : 'ArrowRight'\n\nexport const getSubmenuCloseKey = (element: Element): string =>\n isRTL(element) ? 'ArrowRight' : 'ArrowLeft'\n\nexport const isCurrentPage = (url: string): boolean => {\n try {\n const currentUrl = new URL(window.location.href)\n const targetUrl = new URL(url)\n return (\n currentUrl.origin === targetUrl.origin &&\n currentUrl.pathname === targetUrl.pathname\n )\n } catch {\n return false\n }\n}\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;AACA;AAaA,MAAM,iBAAiB,GAAG,CACxB,OAAgB,EAChB,UAAuB,GAAA,EAAE,KACX;IACd,MAAM,eAAe,GAAe,EAAE;AAEtC,IAAA,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;QAClC,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC;AAC7C,QAAA,IAAI,KAAK,KAAK,IAAI,EAAE;AAClB,YAAA,eAAe,CAAC,SAAS,CAAC,GAAG,KAAK;AAClC,YAAA,OAAO,CAAC,eAAe,CAAC,SAAS,CAAC;;;AAItC,IAAA,OAAO,eAAe;AACxB,CAAC;AAmBD,MAAM,cAAc,GAAoB;IACtC,uBAAuB;IACvB,aAAa;IACb,mBAAmB;IACnB,mBAAmB;IACnB,6BAA6B;IAC7B,WAAW;IACX,cAAc;IACd,eAAe;IACf,eAAe;IACf,mBAAmB;IACnB,cAAc;IACd,eAAe;IACf,cAAc;IACd,kBAAkB;IAClB,kBAAkB;IAClB,cAAc;IACd,eAAe;IACf,mBAAmB;IACnB,eAAe;IACf,aAAa;IACb,eAAe;IACf,aAAa;IACb,cAAc;IACd,mBAAmB;IACnB,YAAY;IACZ,iBAAiB;IACjB,YAAY;IACZ,WAAW;IACX,gBAAgB;IAChB,sBAAsB;IACtB,kBAAkB;IAClB,WAAW;IACX,kBAAkB;IAClB,eAAe;IACf,cAAc;IACd,eAAe;IACf,eAAe;IACf,eAAe;IACf,sBAAsB;IACtB,eAAe;IACf,eAAe;IACf,mBAAmB;IACnB,cAAc;IACd,eAAe;IACf,cAAc;IACd,WAAW;IACX,eAAe;IACf,eAAe;IACf,eAAe;IACf,gBAAgB;IAChB,MAAM;CACP;AAED;;;;;AAKG;AACI,MAAM,qBAAqB,GAAG,CACnC,OAAgB,KAEhB,iBAAiB,CAAC,OAAO,EAAE,cAAc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