@quartzds/core 1.0.0-beta.114 → 1.0.0-beta.116
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 +49 -0
- package/components/index.d.ts +0 -2
- package/components/index.js +1 -2
- package/components/index.js.map +1 -1
- package/components/{p-CXNbTMs3.js → p-1i9z6mOq.js} +12 -12
- package/components/p-1i9z6mOq.js.map +1 -0
- package/components/{p-Dqnx5weA.js → p-7CRVW1fF.js} +19 -23
- package/components/p-7CRVW1fF.js.map +1 -0
- package/components/{p-UCFkhBz3.js → p-BSl6ytcf.js} +10 -10
- package/components/p-BSl6ytcf.js.map +1 -0
- package/components/{p-D95fZ6r0.js → p-BqX-Z4lF.js} +7 -7
- package/components/p-BqX-Z4lF.js.map +1 -0
- package/components/{p-Du5iO_Mj.js → p-BrXeIZb3.js} +4 -4
- package/components/{p-Du5iO_Mj.js.map → p-BrXeIZb3.js.map} +1 -1
- package/components/{p-BSPxuxTR.js → p-BxvGYLMb.js} +13 -9
- package/components/p-BxvGYLMb.js.map +1 -0
- package/{dist/esm/helpers-CDZIefsI.js → components/p-CmhdNcHF.js} +24 -8
- package/components/{p-CzJQDr3N.js.map → p-CmhdNcHF.js.map} +1 -1
- package/components/{p-BzNdvEIj.js → p-Ctm34vK2.js} +4 -4
- package/components/{p-BzNdvEIj.js.map → p-Ctm34vK2.js.map} +1 -1
- package/components/{p-CoPb0kZk.js → p-DOjR-Isr.js} +13 -13
- package/components/p-DOjR-Isr.js.map +1 -0
- package/{dist/esm/qds-avatar-media.entry.js → components/p-DOvh7lZm.js} +44 -9
- package/components/p-DOvh7lZm.js.map +1 -0
- package/{dist/esm/floating-ui.dom-MCOLEIOA.js → components/p-DrEQjX2g.js} +367 -129
- package/components/p-DrEQjX2g.js.map +1 -0
- package/components/{p-D6H_Ja9U.js → p-bSwFyyHH.js} +5 -5
- package/components/p-bSwFyyHH.js.map +1 -0
- package/components/{p-DGAZYkDF.js → p-pO0PWoAm.js} +4 -4
- package/components/{p-DGAZYkDF.js.map → p-pO0PWoAm.js.map} +1 -1
- package/components/qds-action-item.js +8 -8
- package/components/qds-action-item.js.map +1 -1
- package/components/qds-avatar-media.js +1 -102
- package/components/qds-avatar-media.js.map +1 -1
- package/components/qds-breadcrumb-item.js +7 -7
- package/components/qds-breadcrumb-item.js.map +1 -1
- package/components/qds-button.js +1 -1
- package/components/qds-checkbox.js +1 -1
- package/components/qds-chip.js +11 -11
- package/components/qds-chip.js.map +1 -1
- package/components/qds-dialog.js +27 -8
- package/components/qds-dialog.js.map +1 -1
- package/components/qds-dropdown.js +1 -1
- package/components/qds-form-message.js +4 -4
- package/components/qds-form-message.js.map +1 -1
- package/components/qds-icon-button.js +4 -4
- package/components/qds-icon-button.js.map +1 -1
- package/components/qds-icon.js +1 -1
- package/components/qds-inline-link.js +3 -3
- package/components/qds-inline-link.js.map +1 -1
- package/components/qds-input.js +4 -4
- package/components/qds-label.js +1 -1
- package/components/qds-list-item.js +22 -16
- package/components/qds-list-item.js.map +1 -1
- package/components/qds-loader.js +3 -3
- package/components/qds-loader.js.map +1 -1
- package/components/qds-menu-item.js +9 -9
- 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-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 +6 -6
- package/components/qds-tab.js.map +1 -1
- package/components/qds-tabbar.js +4 -4
- package/components/qds-table-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 +1 -1
- package/components/qds-title.js +1 -1
- package/components/qds-tooltip.js +1 -1
- package/dist/cjs/{floating-ui.dom-CWGOcrxa.js → floating-ui.dom-BgRFi0kr.js} +367 -129
- package/dist/cjs/floating-ui.dom-BgRFi0kr.js.map +1 -0
- package/dist/cjs/{helpers-D--0PcCT.js → helpers-BH_NFaV-.js} +24 -8
- package/dist/cjs/helpers-BH_NFaV-.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{library-BrmEL6Ho.js → library-C_NJJiFI.js} +12 -8
- package/dist/cjs/library-C_NJJiFI.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qds-action-item.cjs.entry.js +6 -6
- package/dist/cjs/qds-action-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-avatar-media.qds-checkbox.qds-radio.entry.cjs.js.map +1 -0
- package/dist/cjs/{qds-checkbox_2.cjs.entry.js → qds-avatar-media_3.cjs.entry.js} +76 -7
- package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +5 -5
- package/dist/cjs/qds-breadcrumb-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-button.cjs.entry.js +8 -8
- package/dist/cjs/qds-button.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-chip.cjs.entry.js +8 -8
- package/dist/cjs/qds-chip.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-dialog.cjs.entry.js +24 -5
- package/dist/cjs/qds-dialog.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-dropdown.cjs.entry.js +17 -20
- package/dist/cjs/qds-dropdown.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-form-message.cjs.entry.js +3 -3
- package/dist/cjs/qds-form-message.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/qds-icon-button.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-icon.cjs.entry.js +2 -2
- package/dist/cjs/qds-inline-link.cjs.entry.js +2 -2
- package/dist/cjs/qds-inline-link.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-input.cjs.entry.js +2 -2
- package/dist/cjs/qds-label.cjs.entry.js +9 -9
- package/dist/cjs/qds-label.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-list-item.cjs.entry.js +10 -10
- package/dist/cjs/qds-list-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-loader.cjs.entry.js +2 -2
- package/dist/cjs/qds-loader.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-menu-item.cjs.entry.js +6 -6
- package/dist/cjs/qds-menu-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-mini-button.cjs.entry.js +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-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 +2 -2
- package/dist/cjs/qds-tab.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-tabbar.cjs.entry.js +1 -1
- package/dist/cjs/qds-table-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.qds-title.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-tag_2.cjs.entry.js +3 -3
- package/dist/cjs/qds-textarea.cjs.entry.js +1 -1
- package/dist/cjs/qds-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/qds.cjs.js +1 -1
- package/dist/custom-elements.json +23 -347
- package/dist/docs.json +94 -432
- package/{components/p-MCOLEIOA.js → dist/esm/floating-ui.dom-DrEQjX2g.js} +367 -129
- package/dist/esm/floating-ui.dom-DrEQjX2g.js.map +1 -0
- package/{components/p-CzJQDr3N.js → dist/esm/helpers-t9FQ7Vl_.js} +24 -8
- package/dist/esm/helpers-t9FQ7Vl_.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/{library-BuEmbYiH.js → library-C7n28y3j.js} +12 -8
- package/dist/esm/library-C7n28y3j.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/qds-action-item.entry.js +6 -6
- package/dist/esm/qds-action-item.entry.js.map +1 -1
- package/dist/esm/qds-avatar-media.qds-checkbox.qds-radio.entry.js.map +1 -0
- package/dist/esm/{qds-checkbox_2.entry.js → qds-avatar-media_3.entry.js} +76 -8
- package/dist/esm/qds-breadcrumb-item.entry.js +5 -5
- package/dist/esm/qds-breadcrumb-item.entry.js.map +1 -1
- package/dist/esm/qds-button.entry.js +8 -8
- package/dist/esm/qds-button.entry.js.map +1 -1
- package/dist/esm/qds-chip.entry.js +8 -8
- package/dist/esm/qds-chip.entry.js.map +1 -1
- package/dist/esm/qds-dialog.entry.js +24 -5
- package/dist/esm/qds-dialog.entry.js.map +1 -1
- package/dist/esm/qds-dropdown.entry.js +17 -20
- package/dist/esm/qds-dropdown.entry.js.map +1 -1
- package/dist/esm/qds-form-message.entry.js +3 -3
- package/dist/esm/qds-form-message.entry.js.map +1 -1
- package/dist/esm/qds-icon-button.entry.js +2 -2
- package/dist/esm/qds-icon-button.entry.js.map +1 -1
- package/dist/esm/qds-icon.entry.js +2 -2
- package/dist/esm/qds-inline-link.entry.js +2 -2
- package/dist/esm/qds-inline-link.entry.js.map +1 -1
- package/dist/esm/qds-input.entry.js +2 -2
- package/dist/esm/qds-label.entry.js +9 -9
- package/dist/esm/qds-label.entry.js.map +1 -1
- package/dist/esm/qds-list-item.entry.js +10 -10
- package/dist/esm/qds-list-item.entry.js.map +1 -1
- package/dist/esm/qds-loader.entry.js +2 -2
- package/dist/esm/qds-loader.entry.js.map +1 -1
- package/dist/esm/qds-menu-item.entry.js +6 -6
- package/dist/esm/qds-menu-item.entry.js.map +1 -1
- package/dist/esm/qds-mini-button.entry.js +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-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 +2 -2
- package/dist/esm/qds-tab.entry.js.map +1 -1
- package/dist/esm/qds-tabbar.entry.js +1 -1
- package/dist/esm/qds-table-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.qds-title.entry.js.map +1 -1
- package/dist/esm/qds-tag_2.entry.js +3 -3
- package/dist/esm/qds-textarea.entry.js +1 -1
- package/dist/esm/qds-tooltip.entry.js +2 -2
- package/dist/esm/qds.js +1 -1
- package/dist/types/components/dropdown/dropdown.d.ts +0 -1
- package/dist/types/components/label/label.d.ts +1 -1
- package/dist/types/components.d.ts +0 -123
- package/dist/types/helpers.d.ts +3 -3
- package/dist/vscode.html-custom-data.json +6 -52
- package/hydrate/index.js +827 -685
- package/hydrate/index.mjs +827 -685
- package/package.json +1 -1
- package/styles/core.css +2 -1
- package/components/p-BSPxuxTR.js.map +0 -1
- package/components/p-CXNbTMs3.js.map +0 -1
- package/components/p-CoPb0kZk.js.map +0 -1
- package/components/p-D6H_Ja9U.js.map +0 -1
- package/components/p-D95fZ6r0.js.map +0 -1
- package/components/p-Dqnx5weA.js.map +0 -1
- package/components/p-MCOLEIOA.js.map +0 -1
- package/components/p-UCFkhBz3.js.map +0 -1
- package/components/qds-nav-list-item.d.ts +0 -11
- package/components/qds-nav-list-item.js +0 -164
- package/components/qds-nav-list-item.js.map +0 -1
- package/dist/cjs/floating-ui.dom-CWGOcrxa.js.map +0 -1
- package/dist/cjs/helpers-D--0PcCT.js.map +0 -1
- package/dist/cjs/library-BrmEL6Ho.js.map +0 -1
- package/dist/cjs/qds-avatar-media.cjs.entry.js +0 -79
- package/dist/cjs/qds-avatar-media.entry.cjs.js.map +0 -1
- package/dist/cjs/qds-checkbox.qds-radio.entry.cjs.js.map +0 -1
- package/dist/cjs/qds-nav-list-item.cjs.entry.js +0 -120
- package/dist/cjs/qds-nav-list-item.entry.cjs.js.map +0 -1
- package/dist/esm/floating-ui.dom-MCOLEIOA.js.map +0 -1
- package/dist/esm/helpers-CDZIefsI.js.map +0 -1
- package/dist/esm/library-BuEmbYiH.js.map +0 -1
- package/dist/esm/qds-avatar-media.entry.js.map +0 -1
- package/dist/esm/qds-checkbox.qds-radio.entry.js.map +0 -1
- package/dist/esm/qds-nav-list-item.entry.js +0 -118
- package/dist/esm/qds-nav-list-item.entry.js.map +0 -1
- package/dist/types/components/nav-list-item/nav-list-item.d.ts +0 -67
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,55 @@ SPDX-License-Identifier: Apache-2.0
|
|
|
11
11
|
|
|
12
12
|
> All notable changes to this project will be documented in this file
|
|
13
13
|
|
|
14
|
+
## @quartzds/core 1.0.0-beta.116 (2025-12-30)
|
|
15
|
+
|
|
16
|
+
* fix(qds-checkbox, qds-radio): remove fallback value for new tokens ([2bc551d](https://github.com/quartzds/core-foundations/commit/2bc551d))
|
|
17
|
+
* Merge pull request #1579 from quartzds/1548-token-ready-checkbox-radio---fixes ([928095c](https://github.com/quartzds/core-foundations/commit/928095c)), closes [#1579](https://github.com/quartzds/core-foundations/issues/1579)
|
|
18
|
+
* Merge pull request #1581 from quartzds/1576-qds-popup-dialog-token-is-undefined ([70c996d](https://github.com/quartzds/core-foundations/commit/70c996d)), closes [#1581](https://github.com/quartzds/core-foundations/issues/1581)
|
|
19
|
+
* Merge pull request #1582 from quartzds/1542-qds-action-item-incorrect-action-icon-placement ([e9f9489](https://github.com/quartzds/core-foundations/commit/e9f9489)), closes [#1582](https://github.com/quartzds/core-foundations/issues/1582)
|
|
20
|
+
* Merge pull request #1583 from quartzds/1571-qds-menu-item-incorrect-shortcut-label-submenu-icon-plac ([7fc67ad](https://github.com/quartzds/core-foundations/commit/7fc67ad)), closes [#1583](https://github.com/quartzds/core-foundations/issues/1583)
|
|
21
|
+
* Merge pull request #1584 from quartzds/1518-dropdown-popover-components-do-not-work-in-rtl-mode ([c049588](https://github.com/quartzds/core-foundations/commit/c049588)), closes [#1584](https://github.com/quartzds/core-foundations/issues/1584)
|
|
22
|
+
* Merge pull request #1588 from quartzds/fix-switch ([954a30d](https://github.com/quartzds/core-foundations/commit/954a30d)), closes [#1588](https://github.com/quartzds/core-foundations/issues/1588)
|
|
23
|
+
* fix(qds-tag): adjust design tokens for padding, line clamp, and min-height ([06af6d9](https://github.com/quartzds/core-foundations/commit/06af6d9))
|
|
24
|
+
* fix(qds-dropdown): correct layout issues in RTL mode ([4cce865](https://github.com/quartzds/core-foundations/commit/4cce865))
|
|
25
|
+
* fix(qds-action-item): ensure text occupies full available width ([e5b2c98](https://github.com/quartzds/core-foundations/commit/e5b2c98))
|
|
26
|
+
* fix(qds-menu-item): ensure text occupies full available width ([16a4027](https://github.com/quartzds/core-foundations/commit/16a4027))
|
|
27
|
+
* fix(qds-dialog): remove undefined token `qds-popup-padding` ([66f7e1e](https://github.com/quartzds/core-foundations/commit/66f7e1e))
|
|
28
|
+
* fix(qds-switch): update design tokens and add a knob container ([e535f69](https://github.com/quartzds/core-foundations/commit/e535f69))
|
|
29
|
+
|
|
30
|
+
## @quartzds/core 1.0.0-beta.115 (2025-12-18)
|
|
31
|
+
|
|
32
|
+
* feat!: support Angular >= 19 ([2afe469](https://github.com/quartzds/core-foundations/commit/2afe469))
|
|
33
|
+
* fix!: remove unused nav-list-item component from core package ([7b2e9e6](https://github.com/quartzds/core-foundations/commit/7b2e9e6))
|
|
34
|
+
* Merge pull request #1552 from quartzds/fix/overflow-detection ([894a059](https://github.com/quartzds/core-foundations/commit/894a059)), closes [#1552](https://github.com/quartzds/core-foundations/issues/1552)
|
|
35
|
+
* Merge pull request #1557 from quartzds/CLS ([56b0b79](https://github.com/quartzds/core-foundations/commit/56b0b79)), closes [#1557](https://github.com/quartzds/core-foundations/issues/1557)
|
|
36
|
+
* Merge pull request #1558 from quartzds/remove-navlist-item ([38db794](https://github.com/quartzds/core-foundations/commit/38db794)), closes [#1558](https://github.com/quartzds/core-foundations/issues/1558)
|
|
37
|
+
* Merge pull request #1559 from quartzds/replace-url-bydata-uri-in-avatar-media-test ([52875bf](https://github.com/quartzds/core-foundations/commit/52875bf)), closes [#1559](https://github.com/quartzds/core-foundations/issues/1559)
|
|
38
|
+
* Merge pull request #1560 from quartzds/1283-design-ready-list-item---fixes ([b80130b](https://github.com/quartzds/core-foundations/commit/b80130b)), closes [#1560](https://github.com/quartzds/core-foundations/issues/1560)
|
|
39
|
+
* Merge pull request #1562 from quartzds/dialog-accessibility ([fb2c69d](https://github.com/quartzds/core-foundations/commit/fb2c69d)), closes [#1562](https://github.com/quartzds/core-foundations/issues/1562)
|
|
40
|
+
* Merge pull request #1568 from quartzds/1553-replace-person-general-icon-by-core-new-core-icon-for-av ([1a505e5](https://github.com/quartzds/core-foundations/commit/1a505e5)), closes [#1568](https://github.com/quartzds/core-foundations/issues/1568)
|
|
41
|
+
* Merge pull request #1573 from quartzds/1493-design-ready-multiple---icon-fixes ([c46bbd8](https://github.com/quartzds/core-foundations/commit/c46bbd8)), closes [#1573](https://github.com/quartzds/core-foundations/issues/1573)
|
|
42
|
+
* fix(qds-button): add icon size to avoid layout shift ([42efa23](https://github.com/quartzds/core-foundations/commit/42efa23))
|
|
43
|
+
* fix(qds-list-item): add icon size to avoid layout shift ([3adc0bb](https://github.com/quartzds/core-foundations/commit/3adc0bb))
|
|
44
|
+
* fix(qds-menu-item): add icon size to avoid layout shift ([1acaae0](https://github.com/quartzds/core-foundations/commit/1acaae0))
|
|
45
|
+
* fix(qds-tab): add icon size to avoid layout shift ([ccb394e](https://github.com/quartzds/core-foundations/commit/ccb394e))
|
|
46
|
+
* fix(qds-tag): fix test by replacing outline icons with solid icons ([6431b7f](https://github.com/quartzds/core-foundations/commit/6431b7f))
|
|
47
|
+
* fix: improve ellipsis detection accuracy ([2f2c647](https://github.com/quartzds/core-foundations/commit/2f2c647))
|
|
48
|
+
* fix(qds-dialog): improve initial focus logic and fallback to close button ([58c8ada](https://github.com/quartzds/core-foundations/commit/58c8ada))
|
|
49
|
+
* fix(qds-inline-link): improve inline-link to avoid layout shift ([5f186a6](https://github.com/quartzds/core-foundations/commit/5f186a6))
|
|
50
|
+
* fix(qds-form-message): replace outline icons with solid icons for status indicators ([59d6669](https://github.com/quartzds/core-foundations/commit/59d6669))
|
|
51
|
+
* fix(qds-loader): replace outline icons with solid icons for status indicators ([5cdd967](https://github.com/quartzds/core-foundations/commit/5cdd967))
|
|
52
|
+
* fix(qds-avatar-media): switch fallback icon from `person` (general) to `user` (core) ([cc6f189](https://github.com/quartzds/core-foundations/commit/cc6f189))
|
|
53
|
+
* fix(qds-list-item): use `qds-avatar-media` instead of `<img>` ([01b81d1](https://github.com/quartzds/core-foundations/commit/01b81d1))
|
|
54
|
+
* test(qds-avatar-media): replace url by data URI ([606b88b](https://github.com/quartzds/core-foundations/commit/606b88b))
|
|
55
|
+
* chore: upgrade design tokens package to beta-80 ([07fd1e9](https://github.com/quartzds/core-foundations/commit/07fd1e9))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### BREAKING CHANGE
|
|
59
|
+
|
|
60
|
+
* Angular < 19 is no longer supported.
|
|
61
|
+
* qds-nav-list-item is not part of the core package anymore
|
|
62
|
+
|
|
14
63
|
## @quartzds/core 1.0.0-beta.114 (2025-12-03)
|
|
15
64
|
|
|
16
65
|
* Merge pull request #1528 from quartzds/a11y-fix-links ([bc73bd6](https://github.com/quartzds/core-foundations/commit/bc73bd6)), closes [#1528](https://github.com/quartzds/core-foundations/issues/1528)
|
package/components/index.d.ts
CHANGED
|
@@ -41,8 +41,6 @@ export { MenuItem as QdsMenuItem } from '../dist/types/components/menu-item/menu
|
|
|
41
41
|
export { defineCustomElement as defineCustomElementQdsMenuItem } from './qds-menu-item';
|
|
42
42
|
export { MiniButton as QdsMiniButton } from '../dist/types/components/mini-button/mini-button';
|
|
43
43
|
export { defineCustomElement as defineCustomElementQdsMiniButton } from './qds-mini-button';
|
|
44
|
-
export { NavListItem as QdsNavListItem } from '../dist/types/components/nav-list-item/nav-list-item';
|
|
45
|
-
export { defineCustomElement as defineCustomElementQdsNavListItem } from './qds-nav-list-item';
|
|
46
44
|
export { ProgressBar as QdsProgressBar } from '../dist/types/components/progress-bar/progress-bar';
|
|
47
45
|
export { defineCustomElement as defineCustomElementQdsProgressBar } from './qds-progress-bar';
|
|
48
46
|
export { Radio as QdsRadio } from '../dist/types/components/radio/radio';
|
package/components/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
export { g as getAssetPath, r as render, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-BEWDu8_P.js';
|
|
7
|
-
export { r as registerIconLibrary, u as unregisterIconLibrary } from './p-
|
|
7
|
+
export { r as registerIconLibrary, u as unregisterIconLibrary } from './p-BxvGYLMb.js';
|
|
8
8
|
export { QdsActionItem, defineCustomElement as defineCustomElementQdsActionItem } from './qds-action-item.js';
|
|
9
9
|
export { QdsAvatarMedia, defineCustomElement as defineCustomElementQdsAvatarMedia } from './qds-avatar-media.js';
|
|
10
10
|
export { QdsBadgeCounter, defineCustomElement as defineCustomElementQdsBadgeCounter } from './qds-badge-counter.js';
|
|
@@ -26,7 +26,6 @@ export { QdsListItem, defineCustomElement as defineCustomElementQdsListItem } fr
|
|
|
26
26
|
export { QdsLoader, defineCustomElement as defineCustomElementQdsLoader } from './qds-loader.js';
|
|
27
27
|
export { QdsMenuItem, defineCustomElement as defineCustomElementQdsMenuItem } from './qds-menu-item.js';
|
|
28
28
|
export { QdsMiniButton, defineCustomElement as defineCustomElementQdsMiniButton } from './qds-mini-button.js';
|
|
29
|
-
export { QdsNavListItem, defineCustomElement as defineCustomElementQdsNavListItem } from './qds-nav-list-item.js';
|
|
30
29
|
export { QdsProgressBar, defineCustomElement as defineCustomElementQdsProgressBar } from './qds-progress-bar.js';
|
|
31
30
|
export { QdsRadio, defineCustomElement as defineCustomElementQdsRadio } from './qds-radio.js';
|
|
32
31
|
export { QdsSelect, defineCustomElement as defineCustomElementQdsSelect } from './qds-select.js';
|
package/components/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"index.js","mappings":"
|
|
1
|
+
{"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AAEA,MAAM,WAAW,GAAG,CAAC,KAAwB,KAA8B;IACzE,IAAI,KAAK,KAAK,SAAS;AAAE,QAAA,OAAO,QAAQ,CAAC,eAAe,CAAC,SAAS;IAClE,IAAI,OAAO,KAAK,KAAK,QAAQ;QAC3B,OAAO,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,SAAS,IAAI,SAAS;IAC9D,OAAO,KAAK,CAAC,SAAS;AACxB,CAAC;AAED,MAAM,UAAU,GAAG,CACjB,IAAY,EACZ,SAAoC,KACd;AACtB,IAAA,IAAI,CAAC,SAAS;AAAE,QAAA,OAAO,SAAS;AAEhC,IAAA,MAAM,MAAM,GAAG,CAAO,IAAA,EAAA,IAAI,GAAG;IAE7B,OAAO,CAAC,GAAG,SAAS;AACjB,SAAA,IAAI,CAAC,CAAC,KAAa,KAAsB,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC;AAClE,UAAE,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,GAAG,CACjB,IAAY,EACZ,KAAa,EACb,OAA0B,KAClB;AACR,IAAA,MAAM,SAAS,GAAG,WAAW,CAAC,OAAO,CAAC;IACtC,IAAI,SAAS,KAAK,SAAS;QAAE;AAE7B,IAAA,MAAM,MAAM,GAAG,CAAO,IAAA,EAAA,IAAI,GAAG;IAE7B,MAAM,cAAc,GAAG,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC;IAClD,IAAI,cAAc,KAAK,SAAS;QAC9B,SAAS,CAAC,MAAM,CAAC,CAAA,EAAG,MAAM,CAAG,EAAA,cAAc,CAAE,CAAA,CAAC;IAChD,SAAS,CAAC,GAAG,CAAC,CAAA,EAAG,MAAM,CAAG,EAAA,KAAK,CAAE,CAAA,CAAC;AACpC,CAAC;AAID;;;;;AAKG;AACU,MAAA,oBAAoB,GAAG,CAAC,MAA+B,KAAU;AAC5E,IAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;QAC/C,IAAI,OAAO,KAAK,KAAK,UAAU,IAAI,GAAG,CAAC,UAAU,CAAC,wBAAwB,CAAC;AACzE,YAAA,KAAK,EAAE;AACb;AAEA;;;;;;;;;;;;;AAaG;AACU,MAAA,WAAW,GAAG,CACzB,OAAyB,KACF,UAAU,CAAC,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC;AAEpE;;;;;;;;;;;;;;AAcG;MACU,WAAW,GAAG,CAKzB,QAAqB,EACrB,OAAyB,KACjB;AACR,IAAA,UAAU,CAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,CAAC;AAC3C;AAEA;;;;;;;;;;;;;AAaG;AACU,MAAA,QAAQ,GAAG,CACtB,OAAyB,KACF,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC;AAEjE;;;;;;;;;;;;;;AAcG;MACU,QAAQ,GAAG,CAKtB,KAAkB,EAClB,OAAyB,KACjB;AACR,IAAA,UAAU,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC;AACrC;;;;","names":[],"sources":["src/utils.ts"],"sourcesContent":["// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nconst toClassList = (value?: Element | string): DOMTokenList | undefined => {\n if (value === undefined) return document.documentElement.classList\n if (typeof value === 'string')\n return document.querySelector(value)?.classList ?? undefined\n return value.classList\n}\n\nconst getVariant = (\n type: string,\n classList?: DOMTokenList | undefined,\n): string | undefined => {\n if (!classList) return undefined\n\n const prefix = `qds-${type}-`\n\n return [...classList]\n .find((value: string): value is string => value.startsWith(prefix))\n ?.replace(prefix, '')\n}\n\nconst setVariant = (\n type: string,\n value: string,\n element?: Element | string,\n): void => {\n const classList = toClassList(element)\n if (classList === undefined) return\n\n const prefix = `qds-${type}-`\n\n const currentVariant = getVariant(type, classList)\n if (currentVariant !== undefined)\n classList.remove(`${prefix}${currentVariant}`)\n classList.add(`${prefix}${value}`)\n}\n\ntype NonEmpty<T extends string = string> = T extends '' ? never : T\n\n/**\n * Calls all exported `defineCustomElementQds*` functions in the provided\n * module.\n *\n * @param module The module to call the exported functions from.\n */\nexport const defineCustomElements = (module: Record<string, unknown>): void => {\n for (const [key, value] of Object.entries(module))\n if (typeof value === 'function' && key.startsWith('defineCustomElementQds'))\n value()\n}\n\n/**\n * Get the currently set platform.\n *\n * @param element The element where the platform will be retrieved from. Can be\n * either:\n *\n * - A non-empty CSS selector string\n * - A reference to an\n * [`Element`](https://developer.mozilla.org/docs/Web/API/Element)\n *\n * By default, this is the root node of the current document.\n *\n * @returns The currently set platform if one is set, `undefined` otherwise.\n */\nexport const getPlatform = <S extends string, E extends Element = Element>(\n element?: E | NonEmpty<S>,\n): string | undefined => getVariant('platform', toClassList(element))\n\n/**\n * Sets the current platform.\n *\n * The current platform represented by a `qds-platform-`-prefixed CSS class\n * will be removed.\n *\n * @param platform The platform to set. Must be a non-empty value.\n * @param element The element where the platform will be set. Can be either:\n *\n * - A non-empty CSS selector string\n * - A reference to an\n * [`Element`](https://developer.mozilla.org/docs/Web/API/Element)\n *\n * By default, this is the root node of the current document.\n */\nexport const setPlatform = <\n P extends string,\n S extends string = string,\n E extends Element = Element,\n>(\n platform: NonEmpty<P>,\n element?: E | NonEmpty<S>,\n): void => {\n setVariant('platform', platform, element)\n}\n\n/**\n * Get the currently set theme.\n *\n * @param element The element where the theme will be retrieved from. Can be\n * either:\n *\n * - A non-empty CSS selector string\n * - A reference to an\n * [`Element`](https://developer.mozilla.org/docs/Web/API/Element)\n *\n * By default, this is the root node of the current document.\n *\n * @returns The currently set theme if one is set, `undefined` otherwise.\n */\nexport const getTheme = <S extends string, E extends Element = Element>(\n element?: E | NonEmpty<S>,\n): string | undefined => getVariant('theme', toClassList(element))\n\n/**\n * Sets the current theme.\n *\n * The current theme represented by a `qds-theme-`-prefixed CSS class will be\n * removed.\n *\n * @param theme The theme to set. Must be a non-empty value.\n * @param element The element where the theme will be set. Can be either:\n *\n * - A non-empty CSS selector string\n * - A reference to an\n * [`Element`](https://developer.mozilla.org/docs/Web/API/Element)\n *\n * By default, this is the root node of the current document.\n */\nexport const setTheme = <\n T extends string,\n S extends string = string,\n E extends Element = Element,\n>(\n theme: NonEmpty<T>,\n element?: E | NonEmpty<S>,\n): void => {\n setVariant('theme', theme, element)\n}\n"],"version":3}
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { p as proxyCustomElement, H, c as createEvent, d as readTask, h } from './p-BEWDu8_P.js';
|
|
7
|
-
import { p as pickFocusEventAttributes, a as
|
|
7
|
+
import { p as pickFocusEventAttributes, a as isEllipsisActive } from './p-CmhdNcHF.js';
|
|
8
8
|
import { V as VALID_STATE, C as CUSTOM_ERROR_FLAGS, N as NO_ERROR_FLAGS } from './p-DQLjJn7-.js';
|
|
9
9
|
import { d as defineCustomElement$4 } from './p-BfIOTt4N.js';
|
|
10
10
|
import { d as defineCustomElement$3 } from './p-CAjMAg1t.js';
|
|
11
|
-
import { d as defineCustomElement$2 } from './p-
|
|
12
|
-
import { d as defineCustomElement$1 } from './p-
|
|
11
|
+
import { d as defineCustomElement$2 } from './p-BxvGYLMb.js';
|
|
12
|
+
import { d as defineCustomElement$1 } from './p-BrXeIZb3.js';
|
|
13
13
|
|
|
14
|
-
const buttonCss = ":host([hidden]){display:none!important}:host{display:inline-block;outline:none}.qds-button:disabled,.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-overflow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qds-overflow[data-size=hero]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal}.qds-action{transform:scaleX(var(--qds-direction-factor,1))}.qds-container{display:grid;grid-template-areas:\"a\"}.qds-focus-ring{border-radius:max(1px,var(\n --qds-control-border-radius-top-left,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-top-right,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-right,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-left,var(--qds-control-border-radius)\n ));grid-area:a;height:calc(100% + var(--qds-control-border-width) - var(--qds-control-border-width));isolation:isolate;outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:var(--qds-focus-border-offset);pointer-events:none;visibility:hidden;width:calc(100% + var(--qds-control-border-width) - var(\n --qds-control-border-width-inline-end,\n var(--qds-control-border-width)\n ))}:host(:focus-visible) .qds-focus-ring{visibility:visible}.qds-button{align-items:center;-webkit-appearance:none;appearance:none;background-color:initial;border:none;border-radius:var(\n --qds-control-border-radius-top-left,var(--qds-control-border-radius)\n ) var(--qds-control-border-radius-top-right,var(--qds-control-border-radius)) var(\n --qds-control-border-radius-bottom-right,var(--qds-control-border-radius)\n ) var(\n --qds-control-border-radius-bottom-left,var(--qds-control-border-radius)\n );box-sizing:border-box;cursor:pointer;display:inline-flex;grid-area:a;justify-content:center;min-width:0;outline:none;padding-block:0;position:relative;-webkit-print-color-adjust:exact;print-color-adjust:exact;text-align:center;-webkit-user-select:none;user-select:none}.qds-button:any-link{-webkit-text-decoration:none;text-decoration:none}.qds-icon{flex-shrink:0}.qds-indicator{inset-block-start:0;inset-inline-end:0;position:absolute;transform:translate(50%,-50%)}[data-size=small]{font:var(--qds-control-small-text)}.qds-button[data-size=small]{gap:var(--qds-control-small-gap-internal);min-height:var(--qds-control-small-height);padding-inline:var(--qds-control-button-small-padding-horizontal)}.qds-button.qds-icon-only[data-size=small]{width:var(--qds-control-small-height)}.qds-icon[data-size=small]{
|
|
14
|
+
const buttonCss = ":host([hidden]){display:none!important}:host{display:inline-block;outline:none}.qds-button:disabled,.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-overflow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qds-overflow[data-size=hero]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal}.qds-action{transform:scaleX(var(--qds-direction-factor,1))}.qds-container{display:grid;grid-template-areas:\"a\"}.qds-focus-ring{border-radius:max(1px,var(\n --qds-control-border-radius-top-left,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-top-right,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-right,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-left,var(--qds-control-border-radius)\n ));grid-area:a;height:calc(100% + var(--qds-control-border-width) - var(--qds-control-border-width));isolation:isolate;outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:var(--qds-focus-border-offset);pointer-events:none;visibility:hidden;width:calc(100% + var(--qds-control-border-width) - var(\n --qds-control-border-width-inline-end,\n var(--qds-control-border-width)\n ))}:host(:focus-visible) .qds-focus-ring{visibility:visible}.qds-button{align-items:center;-webkit-appearance:none;appearance:none;background-color:initial;border:none;border-radius:var(\n --qds-control-border-radius-top-left,var(--qds-control-border-radius)\n ) var(--qds-control-border-radius-top-right,var(--qds-control-border-radius)) var(\n --qds-control-border-radius-bottom-right,var(--qds-control-border-radius)\n ) var(\n --qds-control-border-radius-bottom-left,var(--qds-control-border-radius)\n );box-sizing:border-box;cursor:pointer;display:inline-flex;grid-area:a;justify-content:center;min-width:0;outline:none;padding-block:0;position:relative;-webkit-print-color-adjust:exact;print-color-adjust:exact;text-align:center;-webkit-user-select:none;user-select:none}.qds-button:any-link{-webkit-text-decoration:none;text-decoration:none}.qds-icon{flex-shrink:0}.qds-indicator{inset-block-start:0;inset-inline-end:0;position:absolute;transform:translate(50%,-50%)}[data-size=small]{font:var(--qds-control-small-text)}.qds-button[data-size=small]{gap:var(--qds-control-small-gap-internal);min-height:var(--qds-control-small-height);padding-inline:var(--qds-control-button-small-padding-horizontal)}.qds-button.qds-icon-only[data-size=small]{width:var(--qds-control-small-height)}.qds-icon[data-size=small]{height:var(--qds-control-small-icon-size);width:var(--qds-control-small-icon-size)}[data-size=standard]{font:var(--qds-control-standard-text)}.qds-button[data-size=standard]{gap:var(--qds-control-standard-gap-internal);min-height:var(--qds-control-standard-height);padding-inline:var(--qds-control-button-standard-padding-horizontal)}.qds-button.qds-icon-only[data-size=standard]{width:var(--qds-control-standard-height)}.qds-icon[data-size=standard]{height:var(--qds-control-standard-icon-size);width:var(--qds-control-standard-icon-size)}[data-size=large]{font:var(--qds-control-large-text)}.qds-button[data-size=large]{gap:var(--qds-control-large-gap-internal);min-height:var(--qds-control-large-height);padding-inline:var(--qds-control-button-large-padding-horizontal)}.qds-button.qds-icon-only[data-size=large]{width:var(--qds-control-large-height)}.qds-icon[data-size=large]{height:var(--qds-control-large-icon-size);width:var(--qds-control-large-icon-size)}[data-size=large],[data-size=small],[data-size=standard]{line-height:normal}.qds-button.qds-icon-only[data-size=large],.qds-button.qds-icon-only[data-size=small],.qds-button.qds-icon-only[data-size=standard]{padding-inline:0}[data-size=hero]{font:var(--qds-control-hero-text)}.qds-button[data-size=hero]{border-radius:var(\n --qds-control-border-radius-top-left,var(--qds-control-hero-border-radius)\n ) var(\n --qds-control-border-radius-top-right,var(--qds-control-hero-border-radius)\n ) var(\n --qds-control-border-radius-bottom-right,var(--qds-control-hero-border-radius)\n ) var(\n --qds-control-border-radius-bottom-left,var(--qds-control-hero-border-radius)\n );gap:var(--qds-control-hero-gap-internal);padding-block:var(--qds-control-hero-padding-auto-height);padding-inline:var(--qds-control-button-hero-padding-horizontal)}.qds-button.qds-icon-only[data-size=hero]{min-height:var(--qds-control-hero-height);padding-inline:0;width:var(--qds-control-hero-height)}.qds-focus-ring[data-size=hero]{border-radius:max(1px,var(\n --qds-control-border-radius-top-left,var(--qds-control-hero-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-top-right,var(--qds-control-hero-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-right,var(--qds-control-hero-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-left,var(--qds-control-hero-border-radius)\n ))}.qds-icon[data-size=hero]{height:var(--qds-control-hero-icon-size);width:var(--qds-control-hero-icon-size)}[data-importance=subdued]{color:var(--qds-theme-link-standard-default)}.qds-button[data-importance=subdued]{border-block-end:var(--qds-control-border-width) solid #0000;padding-inline:0}.qds-button[data-importance=subdued]:hover{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-link-standard-hover);color:var(--qds-theme-link-standard-hover)}.qds-button[data-importance=subdued]:active{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-link-standard-pressed);color:var(--qds-theme-link-standard-pressed)}.qds-button[data-importance=subdued]:not(.qds-icon-only){border-radius:0}.qds-button.qds-icon-only[data-importance=subdued]{border:none;color:var(--qds-theme-control-text-standard)}.qds-button.qds-icon-only[data-importance=subdued]:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-button.qds-icon-only[data-importance=subdued]:active{background-color:var(--qds-theme-interactive-background-pressed)}[data-importance=standard]{color:var(--qds-theme-control-text-standard)}.qds-button[data-importance=standard]{border-color:var(--qds-theme-control-border);border-style:solid;border-width:var(--qds-control-border-width)}.qds-button[data-importance=standard]:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-button[data-importance=standard]:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-button[data-importance=emphasized]{background-color:var(--qds-theme-signature-color-default);color:var(--qds-theme-signature-color-contrast)}.qds-button[data-importance=emphasized]:hover{background-color:var(--qds-theme-signature-color-hover)}.qds-button[data-importance=emphasized]:active{background-color:var(--qds-theme-signature-color-pressed)}.qds-button[data-importance=destructive]{background-color:var(--qds-theme-feedback-action-destructive-default);color:var(--qds-theme-feedback-action-destructive-contrast)}.qds-button[data-importance=destructive]:hover{background-color:var(--qds-theme-feedback-action-destructive-hover)}.qds-button[data-importance=destructive]:active{background-color:var(--qds-theme-feedback-action-destructive-pressed)}[data-importance=subdued-destructive]{color:var(--qds-theme-feedback-action-destructive-default)}.qds-button[data-importance=subdued-destructive]{border-block-end:var(--qds-control-border-width) solid #0000;padding-inline:0}.qds-button[data-importance=subdued-destructive]:hover{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-feedback-action-destructive-hover);color:var(--qds-theme-feedback-action-destructive-hover)}.qds-button[data-importance=subdued-destructive]:active{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-feedback-action-destructive-pressed);color:var(--qds-theme-feedback-action-destructive-pressed)}.qds-button[data-importance=subdued-destructive]:not(.qds-icon-only){border-radius:0}.qds-button.qds-icon-only[data-importance=subdued-destructive]{border:none}.qds-button.qds-icon-only[data-importance=subdued-destructive]:hover{background-color:var(--qds-theme-interactive-background-hover);color:var(--qds-theme-feedback-action-destructive-default)}.qds-button.qds-icon-only[data-importance=subdued-destructive]:active{background-color:var(--qds-theme-interactive-background-pressed);color:var(--qds-theme-feedback-action-destructive-default)}[data-action=dropdown-close] .qds-action{transform:rotate(-180deg)}:is([data-action=dropdown],[data-action=dropdown-close]) .qds-action{transition-duration:.3s;transition-property:transform}:is([data-action=dropdown],[data-action=dropdown-close]):not(:has(qds-badge-counter)) .qds-action{margin-inline-start:auto}:is([data-action=dropdown],[data-action=dropdown-close]) qds-badge-counter{margin-inline-start:auto}:is([data-action=dropdown],[data-action=dropdown-close]):not([data-importance=subdued]):not([data-importance=subdued-destructive]){padding-inline:var(--qds-control-input-padding-horizontal)}";
|
|
15
15
|
|
|
16
16
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
17
17
|
//
|
|
@@ -265,10 +265,10 @@ const Button = /*@__PURE__*/ proxyCustomElement(class Button extends H {
|
|
|
265
265
|
return;
|
|
266
266
|
const span = __classPrivateFieldGet(this, _Button_span, "f");
|
|
267
267
|
readTask(() => {
|
|
268
|
-
this.tooltip =
|
|
268
|
+
this.tooltip = isEllipsisActive(span);
|
|
269
269
|
});
|
|
270
270
|
__classPrivateFieldSet(this, _Button_ro, new ResizeObserver(([spanEntry]) => {
|
|
271
|
-
this.tooltip =
|
|
271
|
+
this.tooltip = isEllipsisActive(spanEntry.target);
|
|
272
272
|
}), "f");
|
|
273
273
|
__classPrivateFieldGet(this, _Button_ro, "f").observe(__classPrivateFieldGet(this, _Button_span, "f"));
|
|
274
274
|
}
|
|
@@ -291,16 +291,16 @@ const Button = /*@__PURE__*/ proxyCustomElement(class Button extends H {
|
|
|
291
291
|
}
|
|
292
292
|
render() {
|
|
293
293
|
const Tag = this.href === undefined ? 'button' : 'a';
|
|
294
|
-
return (h("div", { key: '
|
|
294
|
+
return (h("div", { key: '157906e526ed6d08116ded53fd8afe68eaa34993', class: "qds-container", onClick: __classPrivateFieldGet(this, _Button_onClick, "f"), onKeyDown: preventDefault, onKeyUp: preventDefault, onKeyPress: preventDefault, "aria-hidden": "true" }, h(Tag, { key: '3e2ef8022fb8a307c6ac3b8bc5a6cdf39cbaf27f', class: {
|
|
295
295
|
'qds-button': true,
|
|
296
296
|
'qds-disabled': Tag === 'a' ? __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedDisabled_get) : false,
|
|
297
297
|
'qds-icon-only': __classPrivateFieldGet(this, _Button_instances, "a", _Button_iconOnly_get),
|
|
298
|
-
}, "data-importance": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedImportance_get), "data-size": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get), "data-action": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedAction_get), disabled: Tag === 'a' ? undefined : this.disabled, download: Tag === 'a' ? this.download : undefined, formAction: this.formAction, formMethod: this.formMethod, formNoValidate: this.formNoValidate, formTarget: this.formTarget, href: Tag === 'a' ? this.href : undefined, name: Tag === 'a' ? undefined : this.name, ref: __classPrivateFieldGet(this, _Button_buttonRef, "f"), rel: Tag === 'a' ? this.rel : undefined, tabIndex: -1, target: Tag === 'a' ? this.target : undefined, type: Tag === 'a' ? undefined : __classPrivateFieldGet(this, _Button_instances, "a", _Button_buttonType_get), value: Tag === 'a' ? undefined : this.value }, this.iconName !== undefined && this.iconName !== '' && (h("qds-icon", { key: '
|
|
298
|
+
}, "data-importance": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedImportance_get), "data-size": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get), "data-action": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedAction_get), disabled: Tag === 'a' ? undefined : this.disabled, download: Tag === 'a' ? this.download : undefined, formAction: this.formAction, formMethod: this.formMethod, formNoValidate: this.formNoValidate, formTarget: this.formTarget, href: Tag === 'a' ? this.href : undefined, name: Tag === 'a' ? undefined : this.name, ref: __classPrivateFieldGet(this, _Button_buttonRef, "f"), rel: Tag === 'a' ? this.rel : undefined, tabIndex: -1, target: Tag === 'a' ? this.target : undefined, type: Tag === 'a' ? undefined : __classPrivateFieldGet(this, _Button_instances, "a", _Button_buttonType_get), value: Tag === 'a' ? undefined : this.value }, this.iconName !== undefined && this.iconName !== '' && (h("qds-icon", { key: '3af479ea55c61ef970149580631ef2034dc698e7', class: "qds-icon", "data-size": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get), library: this.iconLibrary, name: this.iconName })), !__classPrivateFieldGet(this, _Button_instances, "a", _Button_iconOnly_get) && (h("span", { key: '13bb83b498bd69a75c93c70bd476103091d35aee', class: "qds-overflow", "data-size": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get), ref: __classPrivateFieldGet(this, _Button_spanRef, "f") }, this.text)), isIndicator(this.badge) && (h("qds-badge-indicator", { key: 'a6d174549ed2f38709f294ed50f9ec70b12ba2ad', class: "qds-indicator", status: this.badgeIndicatorStatus, description: this.badgeDescription, size: __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get), strokeRing: true })), isCounter(this.badge) && (h("qds-badge-counter", { key: '09426b20871f0f3e195485528826cb2c3bff5dae', class: {
|
|
299
299
|
'qds-indicator': __classPrivateFieldGet(this, _Button_instances, "a", _Button_iconOnly_get),
|
|
300
|
-
}, description: this.badgeDescription, importance: __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedImportance_get), size: __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get), strokeRing: true, value: this.badge })), __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedActionIcon_get) !== undefined && (h("qds-icon", { key: '
|
|
300
|
+
}, description: this.badgeDescription, importance: __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedImportance_get), size: __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get), strokeRing: true, value: this.badge })), __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedActionIcon_get) !== undefined && (h("qds-icon", { key: 'e56cca72a112e0cd4e30a01e24c15c93dee2f24b', class: "qds-icon qds-action", "data-size": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get), library: "core", name: __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedActionIcon_get) }))), h("div", { key: '76f4a6fada820886abbfd3d5a4d1879ec663d404', class: {
|
|
301
301
|
'qds-focus-ring': true,
|
|
302
302
|
'qds-icon-only': __classPrivateFieldGet(this, _Button_instances, "a", _Button_iconOnly_get),
|
|
303
|
-
}, "data-importance": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedImportance_get), "data-size": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get) }), this.tooltip && (h("qds-tooltip", { key: '
|
|
303
|
+
}, "data-importance": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedImportance_get), "data-size": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get) }), this.tooltip && (h("qds-tooltip", { key: 'd87a01d900d81c9f8845e2f8caf7c975e814d1e1', ref: __classPrivateFieldGet(this, _Button_tooltipRef, "f"), placement: this.tooltipPlacement }, this.text))));
|
|
304
304
|
}
|
|
305
305
|
static get formAssociated() { return true; }
|
|
306
306
|
get host() { return this; }
|
|
@@ -453,6 +453,6 @@ function defineCustomElement() {
|
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
export { Button as B, defineCustomElement as d };
|
|
456
|
-
//# sourceMappingURL=p-
|
|
456
|
+
//# sourceMappingURL=p-1i9z6mOq.js.map
|
|
457
457
|
|
|
458
|
-
//# sourceMappingURL=p-
|
|
458
|
+
//# sourceMappingURL=p-1i9z6mOq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-1i9z6mOq.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,SAAS,GAAG,oiSAAoiS;;ACAtjS;AACA;AACA;;;;;;;;;;;;;;;;;;AAiCA,MAAM,SAAS,GAAG,CAAC,KAAc,KAC/B,OAAO,KAAK,KAAK;AACf,MAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC;AACxC,MAAE,OAAO,KAAK,KAAK,QAAQ;AAE/B,MAAM,WAAW,GAAG,CAAC,KAAc,KACjC,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,IAAI;AAEhC,MAAM,cAAc,GAAG,CAAC,KAAiC,KAAU;IACjE,KAAK,CAAC,cAAc,EAAE;AACxB,CAAC;MAgBY,MAAM,iBAAAA,kBAAA,CAAA,MAAA,MAAA,SAAAC,CAAA,CAAA;AANnB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;;;AA0BE;;AAEG;AAEa,QAAA,IAAoB,CAAA,oBAAA,GAClC,SAAS;AASX;;AAEG;AACqB,QAAA,IAAW,CAAA,WAAA,GAAW,SAAS;AAEvD;;AAEG;AACqB,QAAA,IAAU,CAAA,UAAA,GAAsB,UAAU;AAElE;;AAEG;AACqB,QAAA,IAAI,CAAA,IAAA,GAAmB,UAAU;AAOzD;;AAEG;AACqB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAmBjD;;;;;;;;;;;;;;;AAeG;;AAEqB,QAAA,IAAI,CAAA,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,oBAAA,GAAA,SAAA,oBAAA,CAEa,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/button/button.css?tag=qds-button&encapsulation=shadow","src/components/button/button.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 outline: none;\n}\n\n.qds-button:disabled,\n.qds-disabled {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n.qds-overflow {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n &[data-size='hero'] {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n white-space: normal;\n }\n}\n\n.qds-action {\n transform: scaleX(var(--qds-direction-factor, 1));\n}\n\n.qds-container {\n display: grid;\n grid-template-areas: 'button';\n}\n\n.qds-focus-ring {\n border-radius: max(\n 1px,\n var(\n --qds-control-border-radius-top-left,\n var(--qds-control-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-top-right,\n var(--qds-control-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-bottom-right,\n var(--qds-control-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-bottom-left,\n var(--qds-control-border-radius)\n )\n );\n grid-area: button;\n isolation: isolate;\n outline: var(--qds-theme-focus-border) solid var(--qds-focus-border-width);\n outline-offset: var(--qds-focus-border-offset);\n pointer-events: none;\n visibility: hidden;\n width: calc(\n 100% + var(--qds-control-border-width) -\n var(\n --qds-control-border-width-inline-end,\n var(--qds-control-border-width)\n )\n );\n height: calc(\n 100% + var(--qds-control-border-width) - var(--qds-control-border-width)\n );\n}\n\n:host(:focus-visible) .qds-focus-ring {\n visibility: visible;\n}\n\n.qds-button {\n position: relative;\n align-items: center;\n appearance: none;\n\n /* Avoid automatic minimum size on flex element: https://www.w3.org/TR/css-flexbox-1/#min-size-auto */\n min-width: 0;\n background-color: initial;\n border: none;\n border-radius: var(\n --qds-control-border-radius-top-left,\n var(--qds-control-border-radius)\n )\n var(--qds-control-border-radius-top-right, var(--qds-control-border-radius))\n var(\n --qds-control-border-radius-bottom-right,\n var(--qds-control-border-radius)\n )\n var(\n --qds-control-border-radius-bottom-left,\n var(--qds-control-border-radius)\n );\n box-sizing: border-box;\n cursor: pointer;\n display: inline-flex;\n grid-area: button;\n justify-content: center;\n outline: none;\n padding-block: 0;\n print-color-adjust: exact;\n text-align: center;\n user-select: none;\n\n &:any-link {\n text-decoration: none;\n }\n}\n\n.qds-icon {\n flex-shrink: 0;\n}\n\n.qds-indicator {\n position: absolute;\n inset-block-start: 0;\n inset-inline-end: 0;\n transform: translate(50%, -50%);\n}\n\n[data-size='small'] {\n font: var(--qds-control-small-text);\n\n &.qds-button {\n gap: var(--qds-control-small-gap-internal);\n min-height: var(--qds-control-small-height);\n padding-inline: var(--qds-control-button-small-padding-horizontal);\n\n &.qds-icon-only {\n width: var(--qds-control-small-height);\n }\n }\n\n &.qds-icon {\n width: var(--qds-control-small-icon-size);\n height: var(--qds-control-small-icon-size);\n }\n}\n\n[data-size='standard'] {\n font: var(--qds-control-standard-text);\n\n &.qds-button {\n gap: var(--qds-control-standard-gap-internal);\n min-height: var(--qds-control-standard-height);\n padding-inline: var(--qds-control-button-standard-padding-horizontal);\n\n &.qds-icon-only {\n width: var(--qds-control-standard-height);\n }\n }\n\n &.qds-icon {\n width: var(--qds-control-standard-icon-size);\n height: var(--qds-control-standard-icon-size);\n }\n}\n\n[data-size='large'] {\n font: var(--qds-control-large-text);\n\n &.qds-button {\n gap: var(--qds-control-large-gap-internal);\n min-height: var(--qds-control-large-height);\n padding-inline: var(--qds-control-button-large-padding-horizontal);\n\n &.qds-icon-only {\n width: var(--qds-control-large-height);\n }\n }\n\n &.qds-icon {\n width: var(--qds-control-large-icon-size);\n height: var(--qds-control-large-icon-size);\n }\n}\n\n[data-size='small'],\n[data-size='standard'],\n[data-size='large'] {\n line-height: normal;\n\n &.qds-button.qds-icon-only {\n padding-inline: 0;\n }\n}\n\n[data-size='hero'] {\n font: var(--qds-control-hero-text);\n\n &.qds-button {\n border-radius: var(\n --qds-control-border-radius-top-left,\n var(--qds-control-hero-border-radius)\n )\n var(\n --qds-control-border-radius-top-right,\n var(--qds-control-hero-border-radius)\n )\n var(\n --qds-control-border-radius-bottom-right,\n var(--qds-control-hero-border-radius)\n )\n var(\n --qds-control-border-radius-bottom-left,\n var(--qds-control-hero-border-radius)\n );\n gap: var(--qds-control-hero-gap-internal);\n padding-block: var(--qds-control-hero-padding-auto-height);\n padding-inline: var(--qds-control-button-hero-padding-horizontal);\n\n &.qds-icon-only {\n min-height: var(--qds-control-hero-height);\n padding-inline: 0;\n width: var(--qds-control-hero-height);\n }\n }\n\n &.qds-focus-ring {\n border-radius: max(\n 1px,\n var(\n --qds-control-border-radius-top-left,\n var(--qds-control-hero-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-top-right,\n var(--qds-control-hero-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-bottom-right,\n var(--qds-control-hero-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-bottom-left,\n var(--qds-control-hero-border-radius)\n )\n );\n }\n\n &.qds-icon {\n width: var(--qds-control-hero-icon-size);\n height: var(--qds-control-hero-icon-size);\n }\n}\n\n[data-importance='subdued'] {\n color: var(--qds-theme-link-standard-default);\n\n &.qds-button {\n border-block-end: var(--qds-control-border-width) solid transparent;\n padding-inline: 0;\n\n &:hover {\n border-block-end: var(--qds-control-border-width) solid\n var(--qds-theme-link-standard-hover);\n color: var(--qds-theme-link-standard-hover);\n }\n\n &:active {\n border-block-end: var(--qds-control-border-width) solid\n var(--qds-theme-link-standard-pressed);\n color: var(--qds-theme-link-standard-pressed);\n }\n\n &:not(.qds-icon-only) {\n border-radius: 0;\n }\n\n &.qds-icon-only {\n border: none;\n color: var(--qds-theme-control-text-standard);\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n }\n }\n}\n\n[data-importance='standard'] {\n color: var(--qds-theme-control-text-standard);\n\n &.qds-button {\n border-color: var(--qds-theme-control-border);\n border-style: solid;\n border-width: var(--qds-control-border-width);\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n }\n}\n\n[data-importance='emphasized'] {\n &.qds-button {\n background-color: var(--qds-theme-signature-color-default);\n color: var(--qds-theme-signature-color-contrast);\n\n &:hover {\n background-color: var(--qds-theme-signature-color-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-signature-color-pressed);\n }\n }\n}\n\n[data-importance='destructive'] {\n &.qds-button {\n background-color: var(--qds-theme-feedback-action-destructive-default);\n color: var(--qds-theme-feedback-action-destructive-contrast);\n\n &:hover {\n background-color: var(--qds-theme-feedback-action-destructive-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-feedback-action-destructive-pressed);\n }\n }\n}\n\n[data-importance='subdued-destructive'] {\n color: var(--qds-theme-feedback-action-destructive-default);\n\n &.qds-button {\n border-block-end: var(--qds-control-border-width) solid transparent;\n padding-inline: 0;\n\n &:hover {\n border-block-end: var(--qds-control-border-width) solid\n var(--qds-theme-feedback-action-destructive-hover);\n color: var(--qds-theme-feedback-action-destructive-hover);\n }\n\n &:active {\n border-block-end: var(--qds-control-border-width) solid\n var(--qds-theme-feedback-action-destructive-pressed);\n color: var(--qds-theme-feedback-action-destructive-pressed);\n }\n\n &:not(.qds-icon-only) {\n border-radius: 0;\n }\n\n &.qds-icon-only {\n border: none;\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n color: var(--qds-theme-feedback-action-destructive-default);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n color: var(--qds-theme-feedback-action-destructive-default);\n }\n }\n }\n}\n\n[data-action='dropdown-close'] .qds-action {\n transform: rotate(-180deg);\n}\n\n:is([data-action='dropdown'], [data-action='dropdown-close']) {\n .qds-action {\n transition-duration: 0.3s;\n transition-property: transform;\n }\n\n &:not(:has(qds-badge-counter)) .qds-action {\n margin-inline-start: auto;\n }\n\n qds-badge-counter {\n margin-inline-start: auto;\n }\n\n &:not([data-importance='subdued'], [data-importance='subdued-destructive']) {\n padding-inline: var(--qds-control-input-padding-horizontal);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Placement } from '@floating-ui/dom'\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n readTask,\n State,\n Watch,\n} from '@stencil/core'\nimport type { LiteralUnion } from 'type-fest'\n\nimport type { QdsFocusEventDetail } from '../../helpers'\nimport { isEllipsisActive, pickFocusEventAttributes } from '../../helpers'\nimport { CUSTOM_ERROR_FLAGS, NO_ERROR_FLAGS, VALID_STATE } from '../controls'\nimport type { Importance, Size } from '../shared'\n\nexport type Action = 'dropdown-close' | 'dropdown' | 'next'\nexport type ButtonImportance =\n | Importance\n | 'destructive'\n | 'subdued-destructive'\nexport type ButtonSize = Size | 'hero'\nexport type ButtonTarget = '_blank' | '_parent' | '_self' | '_top'\nexport type ButtonType = 'button' | 'reset' | 'submit'\nexport type FormMethod = 'dialog' | 'get' | 'post'\n\nconst isCounter = (value: unknown): value is number =>\n typeof value === 'string'\n ? !Number.isNaN(Number.parseFloat(value))\n : typeof value === 'number'\n\nconst isIndicator = (value: unknown): value is '' | true =>\n value === '' || value === true\n\nconst preventDefault = (event: KeyboardEvent | MouseEvent): void => {\n event.preventDefault()\n}\n/**\n * The `<qds-button>` element is an interactive element activated by a user\n * with a mouse, keyboard, finger, voice command, or other assistive technology.\n * Once activated, it then performs a programmable action, such as submitting a\n * [form](https://developer.mozilla.org/docs/Learn/Forms)\n * or opening a dialog.\n *\n * @see https://quartz.se.com/build/components/button\n */\n@Component({\n tag: 'qds-button',\n formAssociated: true,\n shadow: true,\n styleUrl: 'button.css',\n})\nexport class Button implements ComponentInterface {\n /**\n * The name of the action icon to render.\n */\n @Prop() public readonly action?: Action\n\n /**\n * Displays an indicator if `true` or the empty string. Otherwise, displays a\n * counter badge if a number or string representing a number is used.\n *\n * @webnative\n */\n @Prop() public readonly badge?: number | string | true\n\n /**\n * The indicator or counter badge's accessible text that will be used by\n * screen readers.\n */\n @Prop() public readonly badgeDescription?: string\n\n /**\n * The indicator's status.\n */\n @Prop()\n public readonly badgeIndicatorStatus?: HTMLQdsBadgeIndicatorElement['status'] =\n 'neutral'\n\n /**\n * The name of the icon to render.\n *\n * Available names depend on the icon library being used.\n */\n @Prop() public readonly iconName?: string\n\n /**\n * The name of a registered icon library.\n */\n @Prop() public readonly iconLibrary: string = 'default'\n\n /**\n * The button's importance.\n */\n @Prop() public readonly importance?: ButtonImportance = 'standard'\n\n /**\n * The button's size.\n */\n @Prop() public readonly size?: Size | 'hero' = 'standard'\n\n /**\n * The button's text.\n */\n @Prop() public readonly text!: string\n\n /**\n * Sets if button is icon only.\n */\n @Prop() public readonly iconOnly: boolean = false\n\n /**\n * Prevents the button from being interacted with: it cannot be pressed or\n * focused.\n *\n * @webnative\n */\n @Prop()\n public readonly disabled?: boolean\n\n /**\n * Tells the browser to download the linked file as this filename. Only used\n * when `href` is set.\n *\n * @webnative\n */\n @Prop() public readonly download?: string\n\n /**\n * The [`<form>`][] element to associate the button 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-button>` is associated\n * with its ancestor `<form>` element, if any.\n *\n * This attribute lets you associate `<qds-button>` 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 * The URL that processes the information submitted by the button. Overrides\n * the [`action`](https://developer.mozilla.org/docs/Web/HTML/Element/button#attr-formaction)\n * attribute of the button's form owner. Does nothing if there is no form owner.\n *\n * @webnative\n */\n @Prop({ attribute: 'formaction' }) public readonly formAction?: string\n\n /**\n * If the button is a submit button (it's inside/associated with a `<form>`\n * and doesn't have `type=\"button\"`), this attribute specifies the\n * [HTTP method][] used to submit the form, or `dialog` which won't submit\n * the form. Possible values:\n *\n * - `get`: The form data are appended to the form's action URL, with a ? as\n * a separator, and the resulting URL is sent to the server. Use this method\n * when the form has no side effects, like search forms.\n * - `post`: The data from the form are included in the body of the HTTP\n * request when sent to the server. Use when the form contains information\n * that shouldn't be public, like login credentials.\n * - `dialog`: Close the dialog box in which the button finds itself, if any,\n * and do not submit the button's form owner.\n *\n * If specified, this attribute overrides the `method` attribute of the\n * button's form owner.\n *\n * [HTTP method]: https://developer.mozilla.org/docs/Web/HTTP/Methods\n *\n * @webnative\n */\n @Prop({ attribute: 'formmethod' }) public readonly formMethod?: FormMethod\n\n /**\n * If the button is a submit button, this attribute specifies that the form\n * is not to be\n * [validated](https://developer.mozilla.org/docs/Learn/Forms/Form_validation)\n * when it is submitted. If this attribute is specified, it overrides the\n * [`novalidate`](https://developer.mozilla.org/docs/Web/HTML/Element/form#attr-novalidate)\n * attribute of the button's form owner.\n *\n * @webnative\n */\n @Prop({ attribute: 'formnovalidate' })\n public readonly formNoValidate: boolean = false\n\n /**\n * If the button is a submit button, this attribute is an author-defined name\n * or standardized, underscore-prefixed keyword indicating where to display\n * the response from submitting the form. This is the `name` of, or keyword\n * for, a browsing context (a tab, window, or\n * [`<iframe>`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe)).\n * If this attribute is specified, it overrides the\n * [`target`](https://developer.mozilla.org/docs/Web/HTML/Element/form#attr-target)\n * attribute of the button's form owner. The following keywords have special\n * meanings:\n *\n * - `_blank`: Load the response into a new unnamed browsing context — usually\n * a new tab or window, depending on the user's browser settings.\n * - `_parent`: Load the response into the parent browsing context of the\n * current one. If there is no parent, this option behaves the same way as\n * `_self`.\n * - `_self`: Load the response into the same browsing context as the current\n * one.\n * - `_top`: Load the response into the top-level browsing context (that is,\n * the browsing context that is an ancestor of the current one, and has no\n * parent). If there is no parent, this option behaves the same way as\n * `_self`.\n *\n * @webnative\n */\n @Prop({ attribute: 'formtarget' })\n public readonly formTarget: LiteralUnion<ButtonTarget, string> = '_self'\n\n /**\n * When set, the underlying button will be rendered as an `<a>` with this\n * `href` instead of a `<button>`.\n *\n * @webnative\n */\n @Prop() public readonly href?: string\n\n /**\n * Returns a list of the [`<label>`][] elements associated with the\n * `qds-button` 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 * When href is define and the button act as a link (`<a>`), the `rel` will be added to the element.\n *\n * @webnative\n */\n @Prop() public readonly rel?: string = 'noopener'\n\n /**\n * The name of the button, submitted as a pair with the button's `value` as\n * part of the form data, when that button is used to submit the form.\n * Ignored when `href` is set.\n *\n * @webnative\n */\n @Prop() public readonly name?: string\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a\n * tab, window, or\n * [`<iframe>`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe).\n * The following keywords have special meanings for where to load the URL:\n *\n * - `_blank`: usually a new tab, but users can configure browsers to open a new\n * window instead.\n * - `_parent`: the parent browsing context of the current one. If no parent,\n * behaves as `_self`.\n * - `_self`: the current browsing context.\n * - `_top`: the topmost browsing context (the \"highest\" context that's an\n * ancestor of the current one). If no ancestors, behaves as `_self`.\n *\n * @webnative\n */\n @Prop() public readonly target?: LiteralUnion<ButtonTarget, string>\n\n /**\n * The type of button.\n *\n * `button`: The button has no default behavior, and does nothing when\n * pressed by default. It can have client-side scripts listen to the\n * element's events, which are triggered when the events occur.\n *\n * `submit`: The button submits the form data to the server. This is the\n * default if the attribute is not specified for buttons associated with a\n * `<form>`, or if the attribute is an empty or invalid value.\n *\n * `reset`: The button resets all the controls to their initial values.\n *\n * @webnative\n */\n @Prop() public readonly type?: ButtonType\n\n /**\n * The error message that would be shown to the user if the `<qds-button>`\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-button>`.\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 * Defines the value associated with the button's `name` when it's submitted\n * with the form data. This value is passed to the server in params when the\n * form is submitted using this button. Ignored when `href` is set.\n *\n * @webnative\n */\n @Prop() public readonly value?: string\n\n /**\n * True if `<qds-button>` will be validated when the form is submitted; false\n * otherwise.\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly willValidate: ElementInternals['willValidate'] = false\n\n /**\n * Placement of the overflow tooltip.\n */\n @Prop() public readonly tooltipPlacement: Placement = 'top'\n\n /**\n * Emitted when the button loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the button gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private tooltip = false\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n #savedTabIndex = 0\n\n #button?: HTMLAnchorElement | HTMLButtonElement\n\n #span?: HTMLSpanElement\n\n #ro?: ResizeObserver\n\n get #buttonType(): ButtonType {\n if (this.type === undefined)\n return this.internals.form ? 'submit' : 'button'\n return this.type\n }\n\n get #iconOnly(): boolean {\n const hasIcon = this.iconName !== undefined && this.iconName !== ''\n\n return hasIcon && this.iconOnly\n }\n\n get #computedAction(): Action | undefined {\n switch (this.action) {\n case 'dropdown':\n case 'dropdown-close':\n case 'next': {\n return this.action\n }\n default: {\n return undefined\n }\n }\n }\n\n get #computedActionIcon(): Exclude<Action, 'dropdown-close'> | undefined {\n switch (this.action) {\n case 'dropdown':\n case 'next': {\n return this.action\n }\n case 'dropdown-close': {\n return 'dropdown'\n }\n default: {\n return undefined\n }\n }\n }\n\n get #computedDisabled(): boolean {\n return this.disabled ?? false\n }\n\n get #computedImportance(): ButtonImportance {\n switch (this.importance) {\n case 'emphasized':\n case 'subdued':\n case 'destructive':\n case 'subdued-destructive': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedSize(): ButtonSize {\n switch (this.size) {\n case 'small':\n case 'large':\n case 'hero': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n @Listen('blur')\n protected onBlur(event: FocusEvent): void {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) {\n event.stopImmediatePropagation()\n return\n }\n\n if (this.#buttonType === 'button' || !this.internals.form) return\n if (this.#buttonType === 'reset') {\n this.internals.form.reset()\n } else {\n this.internals.form.requestSubmit()\n }\n event.preventDefault()\n }\n\n @Listen('focus')\n protected onFocus(event: FocusEvent): void {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n\n @Listen('keydown')\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter') {\n if (this.#button instanceof HTMLAnchorElement) this.#button.click()\n else this.host.click()\n }\n }\n\n @Listen('keyup')\n protected onKeyup(event: KeyboardEvent): void {\n if (event.key === ' ') this.host.click()\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n this.internals.ariaDisabled = this.#computedDisabled.toString()\n if (this.#computedDisabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('href')\n protected hrefChanged(): void {\n this.internals.role = this.href === undefined ? 'button' : 'link'\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string | null): void {\n if (newValue !== null) {\n const parsedValue = Number.parseInt(newValue, 10)\n this.#savedTabIndex =\n Number.isNaN(parsedValue) || !Number.isFinite(parsedValue)\n ? 0\n : parsedValue\n }\n if (this.#computedDisabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('text')\n protected textChanged(): void {\n this.#updateAriaLabel()\n\n if (this.#ro) this.#ro.disconnect()\n if (!this.#span) return\n\n const span = this.#span\n readTask(() => {\n this.tooltip = isEllipsisActive(span)\n })\n this.#ro = new ResizeObserver(([spanEntry]) => {\n this.tooltip = isEllipsisActive(spanEntry.target as HTMLSpanElement)\n })\n this.#ro.observe(this.#span)\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.hrefChanged()\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n this.disabledChanged()\n }\n\n public componentDidLoad(): void {\n this.textChanged()\n }\n\n public disconnectedCallback(): void {\n if (this.#ro) this.#ro.disconnect()\n }\n\n public render() {\n const Tag = this.href === undefined ? 'button' : 'a'\n\n return (\n <div\n class=\"qds-container\"\n onClick={this.#onClick}\n onKeyDown={preventDefault}\n onKeyUp={preventDefault}\n onKeyPress={preventDefault}\n aria-hidden=\"true\"\n >\n <Tag\n class={{\n 'qds-button': true,\n 'qds-disabled': Tag === 'a' ? this.#computedDisabled : false,\n 'qds-icon-only': this.#iconOnly,\n }}\n data-importance={this.#computedImportance}\n data-size={this.#computedSize}\n data-action={this.#computedAction}\n disabled={Tag === 'a' ? undefined : this.disabled}\n download={Tag === 'a' ? this.download : undefined}\n formAction={this.formAction}\n formMethod={this.formMethod}\n formNoValidate={this.formNoValidate}\n formTarget={this.formTarget}\n href={Tag === 'a' ? this.href : undefined}\n name={Tag === 'a' ? undefined : this.name}\n ref={this.#buttonRef}\n rel={Tag === 'a' ? this.rel : undefined}\n tabIndex={-1}\n target={Tag === 'a' ? this.target : undefined}\n type={Tag === 'a' ? undefined : this.#buttonType}\n value={Tag === 'a' ? undefined : this.value}\n >\n {this.iconName !== undefined && this.iconName !== '' && (\n <qds-icon\n class=\"qds-icon\"\n data-size={this.#computedSize}\n library={this.iconLibrary}\n name={this.iconName}\n />\n )}\n {!this.#iconOnly && (\n <span\n class=\"qds-overflow\"\n data-size={this.#computedSize}\n ref={this.#spanRef}\n >\n {this.text}\n </span>\n )}\n {isIndicator(this.badge) && (\n <qds-badge-indicator\n class=\"qds-indicator\"\n status={this.badgeIndicatorStatus}\n description={this.badgeDescription}\n size={this.#computedSize}\n strokeRing\n />\n )}\n {isCounter(this.badge) && (\n <qds-badge-counter\n class={{\n 'qds-indicator': this.#iconOnly,\n }}\n description={this.badgeDescription}\n importance={this.#computedImportance}\n size={this.#computedSize}\n strokeRing\n value={this.badge}\n />\n )}\n {this.#computedActionIcon !== undefined && (\n <qds-icon\n class=\"qds-icon qds-action\"\n data-size={this.#computedSize}\n library=\"core\"\n name={this.#computedActionIcon}\n />\n )}\n </Tag>\n <div\n class={{\n 'qds-focus-ring': true,\n 'qds-icon-only': this.#iconOnly,\n }}\n data-importance={this.#computedImportance}\n data-size={this.#computedSize}\n />\n {this.tooltip && (\n <qds-tooltip ref={this.#tooltipRef} placement={this.tooltipPlacement}>\n {this.text}\n </qds-tooltip>\n )}\n </div>\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: HTMLButtonElement['setCustomValidity'] = (\n error,\n ) => {\n if (error)\n this.internals.setValidity(CUSTOM_ERROR_FLAGS, error, this.#button)\n else this.internals.setValidity(NO_ERROR_FLAGS)\n }\n\n readonly #buttonRef = (\n button?: HTMLAnchorElement | HTMLButtonElement,\n ): void => {\n this.#button = button\n }\n\n readonly #spanRef = (span?: HTMLSpanElement): void => {\n this.#span = span\n }\n\n readonly #tooltipRef = (tooltip?: HTMLQdsTooltipElement): void => {\n if (tooltip)\n // eslint-disable-next-line no-param-reassign\n tooltip.target = this.host\n }\n\n readonly #onClick = (event: MouseEvent): void => {\n if (this.#computedDisabled) {\n preventDefault(event)\n event.stopImmediatePropagation()\n }\n }\n\n #updateAriaLabel(): void {\n if (this.badge !== undefined && this.badgeDescription !== undefined) {\n this.internals.ariaLabel = `${this.text} ${\n isIndicator(this.badge) ? '' : this.badge\n } ${this.badgeDescription}`\n return\n }\n\n if (\n this.target !== undefined &&\n this.target === '_blank' &&\n this.href !== undefined\n ) {\n this.internals.ariaLabel = `${this.text} Opens in a new tab`\n return\n }\n\n this.internals.ariaLabel = this.text\n }\n\n #defineGetter(p: PropertyKey, get: () => unknown): void {\n Object.defineProperty(this.host, p, { enumerable: true, get })\n }\n}\n"],"version":3}
|
|
@@ -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-BEWDu8_P.js';
|
|
7
|
-
import { o as offset, f as flip, s as shift, c as computePosition, a as autoUpdate, l as limitShift } from './p-
|
|
8
|
-
import { V as VERTICAL_MOVE_KEYS, e as ignorePromise, f as propertyToPx, r as resolveTarget
|
|
7
|
+
import { o as offset, f as flip, s as shift, c as computePosition, a as autoUpdate, l as limitShift } from './p-DrEQjX2g.js';
|
|
8
|
+
import { V as VERTICAL_MOVE_KEYS, e as ignorePromise, f as propertyToPx, r as resolveTarget } from './p-CmhdNcHF.js';
|
|
9
9
|
|
|
10
|
-
const dropdownCss = ":host([hidden]){display:none!important}:host{background:var(--qds-theme-popup-background);border:none;border-radius:var(--qds-popup-border-radius);box-shadow:var(--qds-popup-elevation);box-sizing:border-box;display:inline-block;inset
|
|
10
|
+
const dropdownCss = ":host([hidden]){display:none!important}:host{background-color:var(--qds-theme-popup-background);border:none;border-radius:var(--qds-popup-border-radius);box-shadow:var(--qds-popup-elevation);box-sizing:border-box;display:inline-block;inset:unset;margin:0;overflow:initial;padding:0}";
|
|
11
11
|
|
|
12
12
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
13
13
|
//
|
|
@@ -221,13 +221,14 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends H {
|
|
|
221
221
|
if (isQdsButton(reference) && reference.action === 'dropdown')
|
|
222
222
|
reference.action = 'dropdown-close';
|
|
223
223
|
}
|
|
224
|
+
if (!__classPrivateFieldGet(this, _Dropdown_opened, "f")) {
|
|
225
|
+
await this.updateGap();
|
|
226
|
+
__classPrivateFieldSet(this, _Dropdown_opened, true, "f");
|
|
227
|
+
}
|
|
228
|
+
this.startAutoUpdate();
|
|
224
229
|
__classPrivateFieldSet(this, _Dropdown_open, true, "f");
|
|
225
230
|
host.hidden = false;
|
|
226
231
|
host.showPopover();
|
|
227
|
-
this.startAutoUpdate();
|
|
228
|
-
if (!__classPrivateFieldGet(this, _Dropdown_opened, "f"))
|
|
229
|
-
await this.updateGap();
|
|
230
|
-
__classPrivateFieldSet(this, _Dropdown_opened, true, "f");
|
|
231
232
|
}
|
|
232
233
|
/**
|
|
233
234
|
* Closes the dropdown.
|
|
@@ -242,11 +243,11 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends H {
|
|
|
242
243
|
__classPrivateFieldGet(this, _Dropdown_referenceElement, "f").action === 'dropdown-close')
|
|
243
244
|
__classPrivateFieldGet(this, _Dropdown_referenceElement, "f").action = 'dropdown';
|
|
244
245
|
}
|
|
246
|
+
if (__classPrivateFieldGet(this, _Dropdown_cleanup, "f"))
|
|
247
|
+
__classPrivateFieldGet(this, _Dropdown_cleanup, "f").call(this);
|
|
245
248
|
__classPrivateFieldSet(this, _Dropdown_open, false, "f");
|
|
246
249
|
this.host.hidden = true;
|
|
247
250
|
this.host.hidePopover();
|
|
248
|
-
if (__classPrivateFieldGet(this, _Dropdown_cleanup, "f"))
|
|
249
|
-
__classPrivateFieldGet(this, _Dropdown_cleanup, "f").call(this);
|
|
250
251
|
this.closeEmitter.emit();
|
|
251
252
|
}
|
|
252
253
|
async handleMouseDown(event) {
|
|
@@ -264,9 +265,6 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends H {
|
|
|
264
265
|
await this.close();
|
|
265
266
|
}
|
|
266
267
|
}
|
|
267
|
-
async onGapChange() {
|
|
268
|
-
await this.updateMiddleware();
|
|
269
|
-
}
|
|
270
268
|
async updateReferenceElement() {
|
|
271
269
|
var _a;
|
|
272
270
|
__classPrivateFieldGet(this, _Dropdown_instances, "m", _Dropdown_disconnectReferenceElement).call(this);
|
|
@@ -281,7 +279,6 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends H {
|
|
|
281
279
|
(_a = __classPrivateFieldGet(this, _Dropdown_referenceElement, "f")).id || (_a.id = `qds-dropdown-trigger-${autoIncrementingId}`);
|
|
282
280
|
this.host.setAttribute('aria-labelledby', __classPrivateFieldGet(this, _Dropdown_referenceElement, "f").id);
|
|
283
281
|
}
|
|
284
|
-
await this.updatePosition();
|
|
285
282
|
}
|
|
286
283
|
async updateMiddleware() {
|
|
287
284
|
__classPrivateFieldSet(this, _Dropdown_middleware, [
|
|
@@ -299,8 +296,7 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends H {
|
|
|
299
296
|
limiter: limitShift(),
|
|
300
297
|
...this.shiftOptions,
|
|
301
298
|
}),
|
|
302
|
-
]
|
|
303
|
-
await this.updatePosition();
|
|
299
|
+
], "f");
|
|
304
300
|
}
|
|
305
301
|
async updatePosition() {
|
|
306
302
|
if (!__classPrivateFieldGet(this, _Dropdown_referenceElement, "f"))
|
|
@@ -310,8 +306,11 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends H {
|
|
|
310
306
|
placement: this.placement,
|
|
311
307
|
strategy: this.strategy,
|
|
312
308
|
});
|
|
313
|
-
this.host.style
|
|
314
|
-
|
|
309
|
+
Object.assign(this.host.style, {
|
|
310
|
+
position: strategy,
|
|
311
|
+
left: `${x}px`,
|
|
312
|
+
top: `${y}px`,
|
|
313
|
+
});
|
|
315
314
|
}
|
|
316
315
|
startAutoUpdate() {
|
|
317
316
|
if (!__classPrivateFieldGet(this, _Dropdown_referenceElement, "f"))
|
|
@@ -330,18 +329,16 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends H {
|
|
|
330
329
|
(_a = this.host).id || (_a.id = `qds-dropdown-${autoIncrementingId}`);
|
|
331
330
|
await this.updateReferenceElement();
|
|
332
331
|
autoIncrementingId += 1;
|
|
333
|
-
await this.updateMiddleware();
|
|
334
332
|
}
|
|
335
333
|
disconnectedCallback() {
|
|
336
334
|
__classPrivateFieldGet(this, _Dropdown_instances, "m", _Dropdown_disconnectReferenceElement).call(this);
|
|
337
335
|
}
|
|
338
336
|
render() {
|
|
339
|
-
return (h(Host, { key: '
|
|
337
|
+
return (h(Host, { key: '99c7afbc2b4423ed2a0d3958390ec73ff58cc814', onKeyDown: __classPrivateFieldGet(this, _Dropdown_onKeydown, "f"), onFocusout: __classPrivateFieldGet(this, _Dropdown_onFocusout, "f") }, h("slot", { key: 'c85b009572db1ff635747ad7eb610b5c5d3d9e34', onSlotchange: __classPrivateFieldGet(this, _Dropdown_onSlotchange, "f") })));
|
|
340
338
|
}
|
|
341
339
|
static get delegatesFocus() { return true; }
|
|
342
340
|
get host() { return this; }
|
|
343
341
|
static get watchers() { return {
|
|
344
|
-
"gap": ["onGapChange"],
|
|
345
342
|
"target": ["updateReferenceElement"],
|
|
346
343
|
"flipOptions": ["updateMiddleware"],
|
|
347
344
|
"noFlip": ["updateMiddleware"],
|
|
@@ -369,7 +366,6 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends H {
|
|
|
369
366
|
"show": [64],
|
|
370
367
|
"close": [64]
|
|
371
368
|
}, [[4, "click", "handleMouseDown"], [0, "click", "onItemClick"]], {
|
|
372
|
-
"gap": ["onGapChange"],
|
|
373
369
|
"target": ["updateReferenceElement"],
|
|
374
370
|
"flipOptions": ["updateMiddleware"],
|
|
375
371
|
"noFlip": ["updateMiddleware"],
|
|
@@ -421,6 +417,6 @@ function defineCustomElement() {
|
|
|
421
417
|
}
|
|
422
418
|
|
|
423
419
|
export { Dropdown as D, defineCustomElement as d };
|
|
424
|
-
//# sourceMappingURL=p-
|
|
420
|
+
//# sourceMappingURL=p-7CRVW1fF.js.map
|
|
425
421
|
|
|
426
|
-
//# sourceMappingURL=p-
|
|
422
|
+
//# sourceMappingURL=p-7CRVW1fF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-7CRVW1fF.js","mappings":";;;;;;;;;AAAA,MAAM,WAAW,GAAG,4RAA4R;;ACAhT;AACA;AACA;;;;;;;;;;;;;;;;;;AA0CA,IAAI,kBAAkB,GAAG,CAAC;AAE1B,MAAM,WAAW,GAAG,CAClB,OAA2B,KAE3B,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,YAAY;AAEhD,MAAM,YAAY,GAAwB,IAAI,GAAG,CAAC;IAChD,iBAAiB;IACjB,eAAe;AAChB,CAAA,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,OAAgB,KACrC,OAAO,YAAYA,CAAW;IAC9B,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;AAC/C,IAAA,CAAC,OAAO,CAAC,YAAY,CAAC,U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CAAC,eAAe,CAAC,eAAe,CAAC;AACzD,CAAC;;;;;;;;;;;;;;;;;","names":["HTMLElement","__stencil_proxyCustomElement"],"sources":["src/components/dropdown/dropdown.css?tag=qds-dropdown&encapsulation=shadow","src/components/dropdown/dropdown.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 background-color: var(--qds-theme-popup-background);\n border-radius: var(--qds-popup-border-radius);\n border: none;\n box-shadow: var(--qds-popup-elevation);\n box-sizing: border-box;\n display: inline-block;\n inset: unset;\n margin: 0;\n overflow: initial;\n padding: 0;\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n AutoUpdateOptions,\n DetectOverflowOptions,\n FlipOptions,\n Middleware,\n Placement,\n ReferenceElement,\n ShiftOptions,\n Strategy,\n} from '@floating-ui/dom'\nimport {\n autoUpdate,\n computePosition,\n flip,\n limitShift,\n offset,\n shift,\n} from '@floating-ui/dom'\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Host,\n Listen,\n Method,\n Prop,\n Watch,\n} from '@stencil/core'\n\nimport type { OffsetOptions } from '../../helpers'\nimport {\n ignorePromise,\n propertyToPx,\n resolveTarget,\n VERTICAL_MOVE_KEYS,\n} from '../../helpers'\n\nlet autoIncrementingId = 1\n\nconst isQdsButton = (\n element: globalThis.Element,\n): element is HTMLQdsButtonElement =>\n element.tagName.toLowerCase() === 'qds-button'\n\nconst ALLOWED_TAGS: ReadonlySet<string> = new Set([\n 'qds-action-item',\n 'qds-menu-item',\n])\n\nconst isEnabledItem = (element: unknown): element is HTMLElement =>\n element instanceof HTMLElement &&\n ALLOWED_TAGS.has(element.tagName.toLowerCase()) &&\n !element.hasAttribute('disabled') &&\n !element.inert\n\n/**\n * @slot Content to display in the dropdown.\n * @see https://quartz.se.com/build/components/dropdown\n */\n@Component({\n tag: 'qds-dropdown',\n shadow: { delegatesFocus: true },\n styleUrl: 'dropdown.css',\n})\nexport class Dropdown implements ComponentInterface {\n /**\n * Options to pass to Floating UI's\n * [`autoUpdate()` function](https://floating-ui.com/docs/autoUpdate).\n *\n * @see https://floating-ui.com/docs/autoupdate#options\n */\n @Prop() public readonly autoUpdateOptions?: AutoUpdateOptions\n\n /**\n * Prevents the dropdown from being shown by user interaction. The dropdown\n * can still be displayed by calling the `show()` method.\n */\n @Prop() public readonly disabled: boolean = false\n\n /**\n * Options to pass to Floating UI's\n * [`flip` middleware](https://floating-ui.com/docs/flip).\n *\n * The [`crossAxis` option](https://floating-ui.com/docs/flip#crossaxis) is\n * set to the value of the `noShift` property by default for interoperability\n * with the [`shift` middleware](https://floating-ui.com/docs/shift).\n *\n * @see https://floating-ui.com/docs/flip#options\n */\n @Prop() public readonly flipOptions?: Partial<\n DetectOverflowOptions & FlipOptions\n >\n\n /**\n * Disable Floating UI's\n * [`flip` middleware](https://floating-ui.com/docs/flip).\n */\n @Prop() public readonly noFlip: boolean = false\n\n /**\n * Disable Floating UI's\n * [`shift` middleware](https://floating-ui.com/docs/shift).\n */\n @Prop() public readonly noShift: boolean = false\n\n /**\n * Options to pass to Floating UI's\n * [`offset` middleware](https://floating-ui.com/docs/offset).\n *\n * The [`mainAxis` option](https://floating-ui.com/docs/offset#mainaxis) is\n * not supported.\n *\n * @see https://floating-ui.com/docs/offset#options\n */\n @Prop() public readonly offsetOptions?: OffsetOptions\n\n /**\n * Where to place the dropdown relative to the `target`.\n *\n * @see https://floating-ui.com/docs/tutorial#placements\n */\n @Prop() public readonly placement: Placement = 'bottom-start'\n\n /**\n * Options to pass to Floating UI's\n * [`shift` middleware](https://floating-ui.com/docs/shift).\n *\n * @see https://floating-ui.com/docs/shift#options\n */\n @Prop() public readonly shiftOptions?: Partial<\n DetectOverflowOptions & ShiftOptions\n >\n\n /**\n * The CSS position strategy to use.\n *\n * @see https://floating-ui.com/docs/computeposition#strategy\n */\n @Prop() public readonly strategy?: Strategy\n\n /**\n * The trigger element that will trigger the dropdown. The target specified\n * can be any of the following:\n *\n * - A CSS selector string\n * - A reference to an [`Element`][] or [Virtual Element][]\n * - A function returning a reference to an [`Element`][],\n * [Virtual Element][], or a CSS selector string\n *\n * [`Element`]: https://developer.mozilla.org/docs/Web/API/Element\n * [Virtual Element]: https://floating-ui.com/docs/virtual-elements\n */\n @Prop() public readonly target!:\n | ReferenceElement\n | string\n | (() => ReferenceElement | string)\n\n /**\n * By default, the dropdown is closed when an item is selected. This attribute will keep it open instead. Useful for\n * dropdowns that allow for multiple interactions.\n */\n @Prop() public readonly keepOpenOnSelect: boolean = false\n\n /**\n * Emitted when the user instructs the browser that they wish to dismiss the\n * current open dropdown by pressing the `Esc` key.\n *\n * When a dropdown is dismissed with the `Esc` key, both the `qdsCancel` and\n * `qdsClose` events are emitted.\n */\n @Event({ eventName: 'qdsCancel', bubbles: false })\n private readonly cancelEmitter!: EventEmitter<void>\n\n /**\n * Emitted when the dropdown is closed.\n */\n @Event({ eventName: 'qdsClose', bubbles: false, cancelable: false })\n private readonly closeEmitter!: EventEmitter<void>\n\n @Element() private readonly host!: HTMLElement\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n #cleanup?: () => void\n\n #Items: HTMLElement[] = []\n\n #gap = 0\n\n #middleware?: (Middleware | false)[]\n\n #referenceElement?: ReferenceElement\n\n #open = false\n\n /**\n * Whether the dropdown has been opened at least once.\n * This is used to determine whether the dropdown should update its position, gap\n * and middleware when it is opened.\n */\n #opened = false\n\n /**\n * Updates the gap between the dropdown and its target element.\n */\n @Method()\n public async updateGap(): Promise<void> {\n this.#gap = propertyToPx(this.host, '--qds-accessory-gap-floating') ?? 0\n\n await this.updateMiddleware()\n }\n\n /**\n * Shows the dropdown.\n */\n @Method()\n public async show(): Promise<void> {\n if (this.#open) return\n\n const reference = this.#referenceElement\n const { host } = this\n\n if (reference instanceof globalThis.Element) {\n reference.setAttribute('aria-expanded', 'true')\n reference.setAttribute('aria-controls', host.id)\n host.setAttribute('aria-labelledby', reference.id)\n if (!reference.hasAttribute('aria-haspopup'))\n reference.setAttribute('aria-haspopup', 'true')\n\n if (isQdsButton(reference) && reference.action === 'dropdown')\n reference.action = 'dropdown-close'\n }\n\n if (!this.#opened) {\n await this.updateGap()\n this.#opened = true\n }\n this.startAutoUpdate()\n this.#open = true\n host.hidden = false\n host.showPopover()\n }\n\n /**\n * Closes the dropdown.\n */\n @Method()\n public async close(): Promise<void> {\n if (!this.#open) return\n\n if (this.#referenceElement instanceof globalThis.Element) {\n this.#referenceElement.setAttribute('aria-expanded', 'false')\n this.#referenceElement.removeAttribute('aria-controls')\n\n if (\n isQdsButton(this.#referenceElement) &&\n this.#referenceElement.action === 'dropdown-close'\n )\n this.#referenceElement.action = 'dropdown'\n }\n\n if (this.#cleanup) this.#cleanup()\n this.#open = false\n this.host.hidden = true\n this.host.hidePopover()\n\n this.closeEmitter.emit()\n }\n\n @Listen('click', { target: 'document' })\n protected async handleMouseDown(event: MouseEvent): Promise<void> {\n if (!this.#open) return\n\n const composedPath = event.composedPath()\n const withinBounds =\n composedPath.includes(this.host) ||\n (this.#referenceElement instanceof globalThis.Element &&\n composedPath.includes(this.#referenceElement))\n if (!withinBounds) await this.close()\n }\n\n @Listen('click')\n protected async onItemClick(event: MouseEvent): Promise<void> {\n if (!this.keepOpenOnSelect && isEnabledItem(event.target)) {\n await this.close()\n }\n }\n\n @Watch('target')\n protected async updateReferenceElement(): Promise<void> {\n this.#disconnectReferenceElement()\n\n this.#referenceElement = resolveTarget(this.target)\n\n if (!(this.#referenceElement instanceof globalThis.Element)) return\n\n this.#referenceElement.setAttribute('aria-expanded', 'false')\n this.#referenceElement.addEventListener(\n 'click',\n this.#boundOnReferenceClick,\n )\n this.#referenceElement.addEventListener('focusout', this.#boundOnFocusout)\n this.#referenceElement.addEventListener('keydown', this.#boundOnKeydown)\n\n if (this.host.role === 'menu') {\n this.#referenceElement.id ||= `qds-dropdown-trigger-${autoIncrementingId}`\n this.host.setAttribute('aria-labelledby', this.#referenceElement.id)\n }\n }\n\n @Watch('flipOptions')\n @Watch('noFlip')\n @Watch('noShift')\n @Watch('offsetOptions')\n @Watch('shiftOptions')\n protected async updateMiddleware(): Promise<void> {\n this.#middleware = [\n offset({\n ...this.offsetOptions,\n mainAxis: this.#gap,\n }),\n !this.noFlip &&\n flip({\n crossAxis: this.noShift,\n ...this.flipOptions,\n }),\n !this.noShift &&\n shift({\n limiter: limitShift(),\n ...this.shiftOptions,\n }),\n ]\n }\n\n @Watch('placement')\n @Watch('strategy')\n protected async updatePosition(): Promise<void> {\n if (!this.#referenceElement) return\n\n const { x, y, strategy } = await computePosition(\n this.#referenceElement,\n this.host,\n {\n middleware: this.#middleware,\n placement: this.placement,\n strategy: this.strategy,\n },\n )\n Object.assign(this.host.style, {\n position: strategy,\n left: `${x}px`,\n top: `${y}px`,\n })\n }\n\n @Watch('autoUpdateOptions')\n protected startAutoUpdate(): void {\n if (!this.#referenceElement) return\n\n if (this.#cleanup) this.#cleanup()\n this.#cleanup = autoUpdate(\n this.#referenceElement,\n this.host,\n () => {\n ignorePromise(this.updatePosition())\n },\n this.autoUpdateOptions,\n )\n }\n\n public async componentWillLoad(): Promise<void> {\n this.host.hidden = true\n this.host.popover = 'manual'\n this.internals.role = 'menu'\n this.host.id ||= `qds-dropdown-${autoIncrementingId}`\n await this.updateReferenceElement()\n autoIncrementingId += 1\n }\n\n public disconnectedCallback(): void {\n this.#disconnectReferenceElement()\n }\n\n public render() {\n return (\n <Host onKeyDown={this.#onKeydown} onFocusout={this.#onFocusout}>\n <slot onSlotchange={this.#onSlotchange} />\n </Host>\n )\n }\n\n readonly #onFocusout = async (event: Event): Promise<void> => {\n if (!(event instanceof FocusEvent)) return\n const { relatedTarget } = event\n\n if (\n relatedTarget instanceof globalThis.Element &&\n !this.host.contains(relatedTarget) &&\n this.#referenceElement !== relatedTarget\n )\n await this.close()\n }\n\n #focusOnTrigger(): void {\n if (\n this.#referenceElement instanceof globalThis.HTMLElement ||\n this.#referenceElement instanceof globalThis.SVGElement\n ) {\n this.#referenceElement.focus()\n }\n }\n\n readonly #onKeydown = async (event: Event): Promise<void> => {\n if (!(event instanceof KeyboardEvent)) return\n\n const { key, target } = event\n\n if (key === 'Enter' && !this.keepOpenOnSelect && isEnabledItem(target)) {\n await this.close()\n this.#focusOnTrigger()\n return\n }\n\n if (\n key === 'Escape' &&\n (target === this.#referenceElement ||\n (target instanceof globalThis.Element &&\n target.closest('qds-dropdown') === this.host))\n ) {\n const cancelEvent = this.cancelEmitter.emit()\n if (cancelEvent.defaultPrevented) return\n\n await this.close()\n this.#focusOnTrigger()\n\n return\n }\n\n if (\n target === this.#referenceElement &&\n (key === 'ArrowDown' || key === 'ArrowUp')\n ) {\n if (!this.#open) await this.show()\n this.#focusFirstItem()\n event.preventDefault()\n return\n }\n\n if (!VERTICAL_MOVE_KEYS.has(key)) return\n\n const Items = this.#Items.filter(\n (item: HTMLElement) =>\n isEnabledItem(item) && item.closest('qds-dropdown') === this.host,\n )\n\n if (Items.length === 0) return\n\n event.preventDefault()\n event.stopPropagation()\n\n const currentIndex = Items.findIndex(\n (item: HTMLElement) => item.getAttribute('tabindex') === '0',\n )\n\n let nextIndex = currentIndex\n\n switch (key) {\n case 'ArrowUp': {\n nextIndex = currentIndex > 0 ? currentIndex - 1 : Items.length - 1\n break\n }\n case 'ArrowDown': {\n nextIndex = currentIndex < Items.length - 1 ? currentIndex + 1 : 0\n break\n }\n case 'Home': {\n nextIndex = 0\n break\n }\n case 'End': {\n nextIndex = Items.length - 1\n break\n }\n default: {\n return\n }\n }\n const nextItem = Items[nextIndex]\n for (const [index, item] of Items.entries()) {\n ;(item as HTMLElement).setAttribute(\n 'tabindex',\n index === nextIndex ? '0' : '-1',\n )\n }\n\n nextItem.focus()\n event.preventDefault()\n }\n\n readonly #onReferenceClick = async (): Promise<void> => {\n if (this.disabled) return\n\n if (this.#open) {\n await this.close()\n return\n }\n\n await this.show()\n this.#focusFirstItem()\n }\n\n #focusFirstItem(): void {\n requestAnimationFrame(() => {\n const firstItem = this.#Items.find(\n (item) =>\n item instanceof HTMLElement &&\n isEnabledItem(item) &&\n item.closest('qds-dropdown') === this.host,\n )\n if (!firstItem) return\n for (const item of this.#Items) item.setAttribute('tabindex', '-1')\n firstItem.setAttribute('tabindex', '0')\n firstItem.focus()\n })\n }\n\n #disconnectReferenceElement(): void {\n this.host.removeAttribute('aria-labelledby')\n\n if (!(this.#referenceElement instanceof globalThis.Element)) return\n\n this.#referenceElement.removeEventListener(\n 'focusout',\n this.#boundOnFocusout,\n )\n this.#referenceElement.removeEventListener('keydown', this.#boundOnKeydown)\n this.#referenceElement.removeAttribute('aria-expanded')\n this.#referenceElement.removeAttribute('aria-controls')\n }\n\n readonly #boundOnFocusout = (event: Event): void => {\n ignorePromise(this.#onFocusout(event))\n }\n\n readonly #boundOnKeydown = (event: Event): void => {\n ignorePromise(this.#onKeydown(event))\n }\n\n readonly #boundOnReferenceClick = (): void => {\n ignorePromise(this.#onReferenceClick())\n }\n\n readonly #onSlotchange = (event: Event): void => {\n const slot = event.target as HTMLSlotElement\n const assignedElements = slot.assignedElements({ flatten: true })\n\n this.#Items = assignedElements.filter((element): element is HTMLElement =>\n isEnabledItem(element),\n )\n }\n}\n"],"version":3}
|