@quartzds/core 1.0.0-beta.119 → 1.0.0-beta.120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/components/index.d.ts +2 -0
- package/components/index.js +2 -1
- package/components/index.js.map +1 -1
- package/components/{p--RtuuN-f.js → p-5RFBIepu.js} +4 -4
- package/components/{p--RtuuN-f.js.map → p-5RFBIepu.js.map} +1 -1
- package/components/{p-BcuDZbUA.js → p-B03FWheS.js} +23 -27
- package/components/p-B03FWheS.js.map +1 -0
- package/components/{p-Bv_uu0s1.js → p-BkBJDD6Y.js} +7 -7
- package/components/p-BkBJDD6Y.js.map +1 -0
- package/components/{p-B_6Kulw9.js → p-BkgfW_tl.js} +4 -4
- package/components/{p-B_6Kulw9.js.map → p-BkgfW_tl.js.map} +1 -1
- package/components/{p-DdqipBK9.js → p-Bnc7Puxx.js} +10 -10
- package/components/p-Bnc7Puxx.js.map +1 -0
- package/components/{p-CXI7fTbm.js → p-CFVg7I9T.js} +6 -6
- package/components/p-CFVg7I9T.js.map +1 -0
- package/components/{p-kI1bxLGk.js → p-CRVPDKfO.js} +7 -7
- package/components/p-CRVPDKfO.js.map +1 -0
- package/{dist/esm/helpers-BVuIKvSk.js → components/p-CXP6q9Mr.js} +13 -11
- package/components/p-CXP6q9Mr.js.map +1 -0
- package/components/{p-CndRvQiV.js → p-DeRqCYmp.js} +5 -5
- package/components/{p-CndRvQiV.js.map → p-DeRqCYmp.js.map} +1 -1
- package/components/{p-aWJYkykh.js → p-DnZdwX0l.js} +7 -7
- package/components/{p-aWJYkykh.js.map → p-DnZdwX0l.js.map} +1 -1
- package/components/{p-BWYKuRRD.js → p-Dsc0-aXK.js} +5 -5
- package/components/{p-BWYKuRRD.js.map → p-Dsc0-aXK.js.map} +1 -1
- package/components/{p-C80aM3BN.js → p-DwxIJEUj.js} +3 -3
- package/components/{p-C80aM3BN.js.map → p-DwxIJEUj.js.map} +1 -1
- package/components/{p-FsslOC0B.js → p-U2Q0vF-d.js} +3 -3
- package/components/p-U2Q0vF-d.js.map +1 -0
- package/components/{p-D4vlGPhk.js → p-eFhV8w2l.js} +6 -4
- package/components/p-eFhV8w2l.js.map +1 -0
- package/components/qds-action-item.js +4 -4
- package/components/qds-action-item.js.map +1 -1
- package/components/qds-avatar-media.js +1 -1
- package/components/qds-badge-indicator.js +1 -1
- package/components/qds-breadcrumb-item.js +13 -7
- package/components/qds-breadcrumb-item.js.map +1 -1
- package/components/qds-button.js +39 -10
- package/components/qds-button.js.map +1 -1
- package/components/qds-checkbox.js +1 -1
- package/components/qds-chip.js +4 -4
- package/components/qds-dialog.js +7 -7
- package/components/qds-dialog.js.map +1 -1
- package/components/qds-divider.js +1 -1
- package/components/qds-dropdown.js +1 -1
- package/components/qds-form-message.js +3 -3
- package/components/qds-form-message.js.map +1 -1
- package/components/qds-icon-button.js +1 -1
- package/components/qds-icon-tab.d.ts +11 -0
- package/components/qds-icon-tab.js +278 -0
- package/components/qds-icon-tab.js.map +1 -0
- package/components/qds-icon.js +1 -1
- package/components/qds-inline-link.js +5 -5
- package/components/qds-inline-link.js.map +1 -1
- package/components/qds-input.js +27 -8
- package/components/qds-input.js.map +1 -1
- package/components/qds-label.js +1 -1
- package/components/qds-list-item.js +24 -19
- package/components/qds-list-item.js.map +1 -1
- package/components/qds-loader.js +1 -1
- package/components/qds-menu-item.js +7 -7
- package/components/qds-menu-item.js.map +1 -1
- package/components/qds-mini-button.js +1 -1
- package/components/qds-progress-bar.js +1 -1
- package/components/qds-radio.js +1 -1
- package/components/qds-select.js +6 -6
- package/components/qds-select.js.map +1 -1
- package/components/qds-standalone-link.js +5 -5
- package/components/qds-standalone-link.js.map +1 -1
- package/components/qds-switch.js +6 -6
- package/components/qds-switch.js.map +1 -1
- package/components/qds-tab.js +20 -87
- package/components/qds-tab.js.map +1 -1
- package/components/qds-tabbar.js +10 -10
- package/components/qds-table-cell.js +2 -2
- package/components/qds-table-head-cell.js +2 -2
- package/components/qds-table-row.js +1 -1
- package/components/qds-table.js +1 -1
- package/components/qds-tag.js +1 -1
- package/components/qds-textarea.js +4 -4
- package/components/qds-textarea.js.map +1 -1
- package/components/qds-title.js +1 -1
- package/components/qds-tooltip.js +1 -1
- package/dist/cjs/{helpers-wsiRak3m.js → helpers-BIL8yXqA.js} +13 -11
- package/dist/cjs/helpers-BIL8yXqA.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qds-action-item.cjs.entry.js +2 -2
- 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 -1
- package/dist/cjs/qds-avatar-media_3.cjs.entry.js +7 -7
- package/dist/cjs/qds-badge-counter.qds-badge-indicator.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-badge-counter_2.cjs.entry.js +1 -1
- package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +11 -5
- package/dist/cjs/qds-breadcrumb-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-button.cjs.entry.js +33 -6
- package/dist/cjs/qds-button.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-chip.cjs.entry.js +1 -1
- package/dist/cjs/qds-dialog.cjs.entry.js +3 -3
- package/dist/cjs/qds-dialog.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-divider.qds-icon-button.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-divider_2.cjs.entry.js +2 -2
- package/dist/cjs/qds-dropdown.cjs.entry.js +3 -2
- package/dist/cjs/qds-dropdown.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-form-message.cjs.entry.js +2 -2
- package/dist/cjs/qds-form-message.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-icon-tab.cjs.entry.js +214 -0
- package/dist/cjs/qds-icon-tab.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-icon.cjs.entry.js +2 -2
- package/dist/cjs/qds-inline-link.cjs.entry.js +4 -4
- package/dist/cjs/qds-inline-link.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-input.cjs.entry.js +22 -6
- package/dist/cjs/qds-input.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-label.cjs.entry.js +4 -4
- package/dist/cjs/qds-label.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-list-item.cjs.entry.js +14 -9
- package/dist/cjs/qds-list-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-menu-item.cjs.entry.js +4 -4
- package/dist/cjs/qds-menu-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-mini-button.cjs.entry.js +2 -2
- package/dist/cjs/qds-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/qds-select.cjs.entry.js +5 -5
- package/dist/cjs/qds-select.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-standalone-link.cjs.entry.js +4 -4
- package/dist/cjs/qds-standalone-link.entry.cjs.js.map +1 -1
- 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 +10 -70
- package/dist/cjs/qds-tab.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-tabbar.cjs.entry.js +5 -5
- package/dist/cjs/qds-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-head-cell.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-row.cjs.entry.js +1 -1
- package/dist/cjs/qds-table.cjs.entry.js +1 -1
- package/dist/cjs/qds-tag.cjs.entry.js +110 -0
- package/dist/cjs/qds-tag.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-textarea.cjs.entry.js +4 -4
- package/dist/cjs/qds-textarea.entry.cjs.js.map +1 -1
- package/dist/cjs/{qds-tag_2.cjs.entry.js → qds-title.cjs.entry.js} +3 -103
- package/dist/cjs/qds-title.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-tooltip.cjs.entry.js +21 -24
- package/dist/cjs/qds-tooltip.entry.cjs.js.map +1 -1
- package/dist/cjs/qds.cjs.js +1 -1
- package/dist/custom-elements.json +717 -157
- package/dist/docs.json +841 -131
- package/{components/p--gmRsVWR.js → dist/esm/helpers-BgaJNF9u.js} +13 -11
- package/dist/esm/helpers-BgaJNF9u.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/qds-action-item.entry.js +2 -2
- 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 -1
- package/dist/esm/qds-avatar-media_3.entry.js +7 -7
- package/dist/esm/qds-badge-counter.qds-badge-indicator.entry.js.map +1 -1
- package/dist/esm/qds-badge-counter_2.entry.js +1 -1
- package/dist/esm/qds-breadcrumb-item.entry.js +11 -5
- package/dist/esm/qds-breadcrumb-item.entry.js.map +1 -1
- package/dist/esm/qds-button.entry.js +33 -6
- package/dist/esm/qds-button.entry.js.map +1 -1
- package/dist/esm/qds-chip.entry.js +1 -1
- package/dist/esm/qds-dialog.entry.js +3 -3
- package/dist/esm/qds-dialog.entry.js.map +1 -1
- package/dist/esm/qds-divider.qds-icon-button.entry.js.map +1 -1
- package/dist/esm/qds-divider_2.entry.js +2 -2
- package/dist/esm/qds-dropdown.entry.js +3 -2
- package/dist/esm/qds-dropdown.entry.js.map +1 -1
- package/dist/esm/qds-form-message.entry.js +2 -2
- package/dist/esm/qds-form-message.entry.js.map +1 -1
- package/dist/esm/qds-icon-tab.entry.js +212 -0
- package/dist/esm/qds-icon-tab.entry.js.map +1 -0
- package/dist/esm/qds-icon.entry.js +2 -2
- package/dist/esm/qds-inline-link.entry.js +4 -4
- package/dist/esm/qds-inline-link.entry.js.map +1 -1
- package/dist/esm/qds-input.entry.js +22 -6
- package/dist/esm/qds-input.entry.js.map +1 -1
- package/dist/esm/qds-label.entry.js +4 -4
- package/dist/esm/qds-label.entry.js.map +1 -1
- package/dist/esm/qds-list-item.entry.js +14 -9
- package/dist/esm/qds-list-item.entry.js.map +1 -1
- package/dist/esm/qds-menu-item.entry.js +4 -4
- package/dist/esm/qds-menu-item.entry.js.map +1 -1
- package/dist/esm/qds-mini-button.entry.js +2 -2
- package/dist/esm/qds-progress-bar.entry.js +1 -1
- package/dist/esm/qds-select.entry.js +5 -5
- package/dist/esm/qds-select.entry.js.map +1 -1
- package/dist/esm/qds-standalone-link.entry.js +4 -4
- package/dist/esm/qds-standalone-link.entry.js.map +1 -1
- 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 +10 -70
- package/dist/esm/qds-tab.entry.js.map +1 -1
- package/dist/esm/qds-tabbar.entry.js +5 -5
- package/dist/esm/qds-table-cell.entry.js +2 -2
- package/dist/esm/qds-table-head-cell.entry.js +2 -2
- package/dist/esm/qds-table-row.entry.js +1 -1
- package/dist/esm/qds-table.entry.js +1 -1
- package/dist/esm/qds-tag.entry.js +108 -0
- package/dist/esm/qds-tag.entry.js.map +1 -0
- package/dist/esm/qds-textarea.entry.js +4 -4
- package/dist/esm/qds-textarea.entry.js.map +1 -1
- package/dist/esm/{qds-tag_2.entry.js → qds-title.entry.js} +5 -104
- package/dist/esm/qds-title.entry.js.map +1 -0
- package/dist/esm/qds-tooltip.entry.js +21 -24
- package/dist/esm/qds-tooltip.entry.js.map +1 -1
- package/dist/esm/qds.js +1 -1
- package/dist/types/components/button/button.d.ts +7 -0
- package/dist/types/components/dropdown/dropdown.d.ts +4 -4
- package/dist/types/components/icon-tab/icon-tab.d.ts +110 -0
- package/dist/types/components/input/input.d.ts +13 -1
- package/dist/types/components/list-item/list-item.d.ts +2 -2
- package/dist/types/components/tab/tab.d.ts +2 -9
- package/dist/types/components/tooltip/tooltip.d.ts +1 -2
- package/dist/types/components.d.ts +232 -21
- package/dist/types/helpers.d.ts +4 -9
- package/dist/vscode.html-custom-data.json +158 -7
- package/hydrate/index.js +631 -400
- package/hydrate/index.mjs +631 -400
- package/package.json +1 -1
- package/components/p--gmRsVWR.js.map +0 -1
- package/components/p-BcuDZbUA.js.map +0 -1
- package/components/p-Bv_uu0s1.js.map +0 -1
- package/components/p-CXI7fTbm.js.map +0 -1
- package/components/p-D4vlGPhk.js.map +0 -1
- package/components/p-DdqipBK9.js.map +0 -1
- package/components/p-FsslOC0B.js.map +0 -1
- package/components/p-kI1bxLGk.js.map +0 -1
- package/dist/cjs/helpers-wsiRak3m.js.map +0 -1
- package/dist/cjs/qds-tag.qds-title.entry.cjs.js.map +0 -1
- package/dist/esm/helpers-BVuIKvSk.js.map +0 -1
- package/dist/esm/qds-tag.qds-title.entry.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,56 @@ 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.120 (2026-02-25)
|
|
15
|
+
|
|
16
|
+
* feat(qds-tab)!: remove `iconOnly` property ([81fa5a2](https://github.com/quartzds/core-foundations/commit/81fa5a2))
|
|
17
|
+
* feat(qds-tab)!: remove `importance: emphasized` ([ad1ce4a](https://github.com/quartzds/core-foundations/commit/ad1ce4a))
|
|
18
|
+
* fix(qds-list-item)!: set `select` as the default `listAction` value ([59ad6d6](https://github.com/quartzds/core-foundations/commit/59ad6d6))
|
|
19
|
+
* Merge pull request #1662 from quartzds/feat/icon-tab ([9e3ef25](https://github.com/quartzds/core-foundations/commit/9e3ef25)), closes [#1662](https://github.com/quartzds/core-foundations/issues/1662)
|
|
20
|
+
* Merge pull request #1665 from quartzds/fix/tooltip-rtl ([da4c257](https://github.com/quartzds/core-foundations/commit/da4c257)), closes [#1665](https://github.com/quartzds/core-foundations/issues/1665)
|
|
21
|
+
* Merge pull request #1683 from quartzds/1273-breadcrumb-items-previous-links-not-underlined-should-ma ([cf6e804](https://github.com/quartzds/core-foundations/commit/cf6e804)), closes [#1683](https://github.com/quartzds/core-foundations/issues/1683)
|
|
22
|
+
* Merge pull request #1687 from quartzds/fix/dialog-color-inheritance ([f2b00ad](https://github.com/quartzds/core-foundations/commit/f2b00ad)), closes [#1687](https://github.com/quartzds/core-foundations/issues/1687)
|
|
23
|
+
* Merge pull request #1699 from quartzds/1649-token-ready-standalone-inline-link---fix ([11ea847](https://github.com/quartzds/core-foundations/commit/11ea847)), closes [#1699](https://github.com/quartzds/core-foundations/issues/1699)
|
|
24
|
+
* Merge pull request #1700 from quartzds/1686-fix-the-qds-list-item-breaking-change ([ba2b81f](https://github.com/quartzds/core-foundations/commit/ba2b81f)), closes [#1700](https://github.com/quartzds/core-foundations/issues/1700)
|
|
25
|
+
* Merge pull request #1701 from quartzds/fix-checkbox-label ([611081a](https://github.com/quartzds/core-foundations/commit/611081a)), closes [#1701](https://github.com/quartzds/core-foundations/issues/1701)
|
|
26
|
+
* Merge pull request #1702 from quartzds/fix-radio-label ([a24dbd0](https://github.com/quartzds/core-foundations/commit/a24dbd0)), closes [#1702](https://github.com/quartzds/core-foundations/issues/1702)
|
|
27
|
+
* Merge pull request #1703 from quartzds/update-all-focusring-radii ([90ac89a](https://github.com/quartzds/core-foundations/commit/90ac89a)), closes [#1703](https://github.com/quartzds/core-foundations/issues/1703)
|
|
28
|
+
* Merge pull request #1704 from quartzds/fix-label-line-clamp ([a6240e4](https://github.com/quartzds/core-foundations/commit/a6240e4)), closes [#1704](https://github.com/quartzds/core-foundations/issues/1704)
|
|
29
|
+
* Merge pull request #1705 from quartzds/tab/enhancements ([49119d6](https://github.com/quartzds/core-foundations/commit/49119d6)), closes [#1705](https://github.com/quartzds/core-foundations/issues/1705)
|
|
30
|
+
* Merge pull request #1709 from quartzds/fix-form-message ([0bbe3bd](https://github.com/quartzds/core-foundations/commit/0bbe3bd)), closes [#1709](https://github.com/quartzds/core-foundations/issues/1709)
|
|
31
|
+
* Merge pull request #1712 from quartzds/fix-switch-token ([bdb7b5f](https://github.com/quartzds/core-foundations/commit/bdb7b5f)), closes [#1712](https://github.com/quartzds/core-foundations/issues/1712)
|
|
32
|
+
* Merge pull request #1713 from quartzds/fix-neutral-badge-indicator ([fa419fa](https://github.com/quartzds/core-foundations/commit/fa419fa)), closes [#1713](https://github.com/quartzds/core-foundations/issues/1713)
|
|
33
|
+
* Merge pull request #1714 from quartzds/fix-menu-item-vertical-padding ([fe37df9](https://github.com/quartzds/core-foundations/commit/fe37df9)), closes [#1714](https://github.com/quartzds/core-foundations/issues/1714)
|
|
34
|
+
* Merge pull request #1747 from quartzds/revert-icon-only-deletion ([feaff91](https://github.com/quartzds/core-foundations/commit/feaff91)), closes [#1747](https://github.com/quartzds/core-foundations/issues/1747)
|
|
35
|
+
* Merge pull request #1749 from quartzds/fix-visual-regression ([1242498](https://github.com/quartzds/core-foundations/commit/1242498)), closes [#1749](https://github.com/quartzds/core-foundations/issues/1749)
|
|
36
|
+
* fix(qds-breadcrumb-item): add default underline and remove underline for current page ([6ab1f35](https://github.com/quartzds/core-foundations/commit/6ab1f35))
|
|
37
|
+
* fix(qds-menu-item): add vertical padding ([e7c5f18](https://github.com/quartzds/core-foundations/commit/e7c5f18))
|
|
38
|
+
* fix(qds-standalone-link): apply underline style ([3ca2ed8](https://github.com/quartzds/core-foundations/commit/3ca2ed8))
|
|
39
|
+
* fix(qds-label): change `line-clamp` to `text-overflow` on 1 line ([982d054](https://github.com/quartzds/core-foundations/commit/982d054))
|
|
40
|
+
* fix(qds-checkbox): change font design token from `form` to `control` ([4470a92](https://github.com/quartzds/core-foundations/commit/4470a92))
|
|
41
|
+
* fix(qds-radio): change font design token from `form` to `control` ([29fa555](https://github.com/quartzds/core-foundations/commit/29fa555))
|
|
42
|
+
* fix(qds-tooltip): correctly calculate RTL position ([eea90ca](https://github.com/quartzds/core-foundations/commit/eea90ca))
|
|
43
|
+
* fix(qds-badge-indicator): fix neutral `background-color` ([6bd94d7](https://github.com/quartzds/core-foundations/commit/6bd94d7))
|
|
44
|
+
* fix: fixing border-radius design tokens on focus ring ([796d019](https://github.com/quartzds/core-foundations/commit/796d019))
|
|
45
|
+
* fix(qds-dialog): inherit color ([9d69fd4](https://github.com/quartzds/core-foundations/commit/9d69fd4))
|
|
46
|
+
* fix: resolve visual regression test ([da5c782](https://github.com/quartzds/core-foundations/commit/da5c782))
|
|
47
|
+
* fix(qds-form-message): update alignment and padding on inline form message ([65a4002](https://github.com/quartzds/core-foundations/commit/65a4002))
|
|
48
|
+
* fix(qds-input): update new design tokens ([c428a39](https://github.com/quartzds/core-foundations/commit/c428a39))
|
|
49
|
+
* fix(qds-switch): update switch `min-height` design token ([56164fd](https://github.com/quartzds/core-foundations/commit/56164fd))
|
|
50
|
+
* feat(qds-input): add `readOnly ` property ([77139df](https://github.com/quartzds/core-foundations/commit/77139df))
|
|
51
|
+
* feat(qds-icon-tab): add qds-icon-tab ([0ae1a79](https://github.com/quartzds/core-foundations/commit/0ae1a79))
|
|
52
|
+
* feat(qds-input): add status property ([ae11736](https://github.com/quartzds/core-foundations/commit/ae11736))
|
|
53
|
+
* chore: revert removal of the iconOnly feature and add deprecation notice ([8b7e9a1](https://github.com/quartzds/core-foundations/commit/8b7e9a1))
|
|
54
|
+
* chore: update `se-tokens` package to version `beta-83` ([ef6f369](https://github.com/quartzds/core-foundations/commit/ef6f369))
|
|
55
|
+
* refactor(helpers): don't export internal functions ([0d35b46](https://github.com/quartzds/core-foundations/commit/0d35b46))
|
|
56
|
+
* refactor(qds-tab): replace native button with `qds-mini-button` ([a08e863](https://github.com/quartzds/core-foundations/commit/a08e863))
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### BREAKING CHANGE
|
|
60
|
+
|
|
61
|
+
* The `iconOnly` property has been removed and replaced by the dedicated `qds-icon-tab` component . Consumers should migrate to using `qds-icon-tab` for icon-only tabs.
|
|
62
|
+
* The default `listAction` is now `select`, enabling item selection by default. Use `none` for non-interactive list items.
|
|
63
|
+
|
|
14
64
|
## @quartzds/core 1.0.0-beta.119 (2026-02-11)
|
|
15
65
|
|
|
16
66
|
* Merge pull request #1639 from quartzds/fix-target-icon-button ([8b93a74](https://github.com/quartzds/core-foundations/commit/8b93a74)), closes [#1639](https://github.com/quartzds/core-foundations/issues/1639)
|
package/components/index.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export { Icon as QdsIcon } from '../dist/types/components/icon/icon';
|
|
|
27
27
|
export { defineCustomElement as defineCustomElementQdsIcon } from './qds-icon';
|
|
28
28
|
export { IconButton as QdsIconButton } from '../dist/types/components/icon-button/icon-button';
|
|
29
29
|
export { defineCustomElement as defineCustomElementQdsIconButton } from './qds-icon-button';
|
|
30
|
+
export { IconTab as QdsIconTab } from '../dist/types/components/icon-tab/icon-tab';
|
|
31
|
+
export { defineCustomElement as defineCustomElementQdsIconTab } from './qds-icon-tab';
|
|
30
32
|
export { InlineLink as QdsInlineLink } from '../dist/types/components/inline-link/inline-link';
|
|
31
33
|
export { defineCustomElement as defineCustomElementQdsInlineLink } from './qds-inline-link';
|
|
32
34
|
export { Input as QdsInput } from '../dist/types/components/input/input';
|
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-D2489VzR.js';
|
|
7
|
-
export { r as registerIconLibrary, u as unregisterIconLibrary } from './p-
|
|
7
|
+
export { r as registerIconLibrary, u as unregisterIconLibrary } from './p-BkgfW_tl.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';
|
|
@@ -19,6 +19,7 @@ export { QdsDropdown, defineCustomElement as defineCustomElementQdsDropdown } fr
|
|
|
19
19
|
export { QdsFormMessage, defineCustomElement as defineCustomElementQdsFormMessage } from './qds-form-message.js';
|
|
20
20
|
export { QdsIcon, defineCustomElement as defineCustomElementQdsIcon } from './qds-icon.js';
|
|
21
21
|
export { QdsIconButton, defineCustomElement as defineCustomElementQdsIconButton } from './qds-icon-button.js';
|
|
22
|
+
export { QdsIconTab, defineCustomElement as defineCustomElementQdsIconTab } from './qds-icon-tab.js';
|
|
22
23
|
export { QdsInlineLink, defineCustomElement as defineCustomElementQdsInlineLink } from './qds-inline-link.js';
|
|
23
24
|
export { QdsInput, defineCustomElement as defineCustomElementQdsInput } from './qds-input.js';
|
|
24
25
|
export { QdsLabel, defineCustomElement as defineCustomElementQdsLabel } from './qds-label.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,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C;;;;","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,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { p as proxyCustomElement, H, c as createEvent, h } from './p-D2489VzR.js';
|
|
7
|
-
import { d as defineCustomElement$1 } from './p-
|
|
7
|
+
import { d as defineCustomElement$1 } from './p-BkgfW_tl.js';
|
|
8
8
|
|
|
9
9
|
const avatarMediaCss = ":host([hidden]){display:none!important}:host{display:block}.qds-container{align-items:center;align-self:stretch;background:var(--qds-theme-display-background);border:var(--qds-display-border-width) solid var(--qds-theme-display-background-contrast);border-radius:var(--qds-display-rounded-border-radius);display:flex;height:inherit;justify-content:center;width:inherit}.qds-container .qds-picture{border-radius:inherit;flex-shrink:0;height:100%;object-fit:cover;width:100%}.qds-container .qds-icon,.qds-container .qds-text{color:var(--qds-theme-display-background-contrast)}.qds-container .qds-icon{flex-shrink:0;height:60%;width:60%}.qds-container .qds-text{font:var(--qds-display-standard);text-align:center}";
|
|
10
10
|
|
|
@@ -69,7 +69,7 @@ const AvatarMedia = /*@__PURE__*/ proxyCustomElement(class AvatarMedia extends H
|
|
|
69
69
|
this.handleTextChange();
|
|
70
70
|
}
|
|
71
71
|
render() {
|
|
72
|
-
return h("div", { key: '
|
|
72
|
+
return h("div", { key: 'f866a7e64a0431f9f051f931533b4d3836784653', class: "qds-container" }, __classPrivateFieldGet(this, _AvatarMedia_renderContent, "f").call(this));
|
|
73
73
|
}
|
|
74
74
|
static get watchers() { return {
|
|
75
75
|
"text": ["handleTextChange"]
|
|
@@ -107,6 +107,6 @@ function defineCustomElement() {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
export { AvatarMedia as A, defineCustomElement as d };
|
|
110
|
-
//# sourceMappingURL=p
|
|
110
|
+
//# sourceMappingURL=p-5RFBIepu.js.map
|
|
111
111
|
|
|
112
|
-
//# sourceMappingURL=p
|
|
112
|
+
//# sourceMappingURL=p-5RFBIepu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p
|
|
1
|
+
{"file":"p-5RFBIepu.js","mappings":";;;;;;;;AAAA,MAAM,cAAc,GAAG,wsBAAwsB;;ACA/tB;AACA;AACA;;;;;;;;;MAaa,WAAW,iBAAAA,kBAAA,CAAA,MAAA,WAAA,SAAAC,CAAA,CAAA;AALxB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;AAYE;;;AAGG;AACqB,QAAA,IAAG,CAAA,GAAA,GAAW,EAAE;AAOxC;;AAEG;AACqB,QAAA,IAAW,CAAA,WAAA,GAAY,SAAS;AAevC,QAAA,IAAa,CAAA,aAAA,GAAG,KAAK;AAuB7B,QAAA,0BAAA,CAAA,GAAA,CAAA,IAAA,EA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AAS,IAAI,IAAI,CAAC,IAAI,KAAK,EAAE,EAAE;AAC/C,YAAA,IAAI,CAAC,QAAQ,GAAG,SAAS;YACzB;;AAEF,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC;AACzC,QAAA,MAAM,CAAC,KAAK,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;QACvD,IAAI,CAAC,QAAQ,GAAG,CACd,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,EAC1C,iBAAiB,EAAE;;IAGhB,iBAAiB,GAAA;QACtB,IAAI,CAAC,gBAAgB,EAAE;;IAGlB,MAAM,GAAA;AACX,QAAA,OAAO,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,eAAe,EAAE,EAAA,sBAAA,CAAA,IAAI,EAAA,0BAAA,EAAA,GAAA,CAAe,CAAnB,IAAA,CAAA,IAAI,CAAiB,CAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/avatar-media/avatar-media.css?tag=qds-avatar-media&encapsulation=shadow","src/components/avatar-media/avatar-media.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2025 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: block;\n}\n\n.qds-container {\n display: flex;\n justify-content: center;\n align-self: stretch;\n border-radius: var(--qds-display-rounded-border-radius);\n border: var(--qds-display-border-width) solid\n var(--qds-theme-display-background-contrast);\n background: var(--qds-theme-display-background);\n width: inherit;\n height: inherit;\n align-items: center;\n\n .qds-picture {\n height: 100%;\n width: 100%;\n object-fit: cover;\n border-radius: inherit;\n flex-shrink: 0;\n }\n\n .qds-icon,\n .qds-text {\n color: var(--qds-theme-display-background-contrast);\n }\n\n .qds-icon {\n width: 60%;\n height: 60%;\n flex-shrink: 0;\n }\n\n .qds-text {\n text-align: center;\n font: var(--qds-display-standard);\n }\n}\n","// SPDX-FileCopyrightText: © 2025 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport { Component, Event, h, Prop, State, Watch } from '@stencil/core'\n\n/**\n * @experimental\n */\n@Component({\n tag: 'qds-avatar-media',\n shadow: true,\n styleUrl: 'avatar-media.css',\n})\nexport class AvatarMedia implements ComponentInterface {\n /**\n * The avatar-media's image source.\n * @webnative\n */\n @Prop() public readonly src?: string\n\n /**\n * The alt text for the avatar-media's image.\n * @webnative\n */\n @Prop() public readonly alt: string = ''\n\n /**\n * The avatar-media's icon name.\n */\n @Prop() public readonly iconName?: string\n\n /**\n * The avatar-media's icon library.\n */\n @Prop() public readonly iconLibrary?: string = 'default'\n\n /**\n * The avatar-media's text content.\n */\n @Prop() public readonly text?: string\n\n /**\n * Emitted when the avatar-media's image fails to load due to an error.\n */\n @Event({ eventName: 'qdsError', cancelable: false })\n private readonly errorEmitter!: EventEmitter<void>\n\n @State() private initials: string | undefined\n\n @State() private hasImageError = false\n\n @Watch('text')\n private handleTextChange(): void {\n if (this.text === undefined || this.text === '') {\n this.initials = undefined\n return\n }\n const words = this.text.trim().split(' ')\n const [first = '', second = ''] = words.filter(Boolean)\n this.initials = (\n first.charAt(0) + (second.charAt(0) || '')\n ).toLocaleUpperCase()\n }\n\n public componentWillLoad(): Promise<void> | void {\n this.handleTextChange()\n }\n\n public render() {\n return <div class=\"qds-container\">{this.#renderContent()}</div>\n }\n\n readonly #renderContent = (): HTMLElement | undefined => {\n if (this.src !== undefined && this.src !== '' && !this.hasImageError) {\n return (\n <img\n class=\"qds-picture\"\n src={this.src}\n alt={this.alt}\n onError={this.#handleImageError}\n onLoad={() => {\n this.hasImageError = false\n }}\n />\n )\n }\n if (this.text !== undefined && this.text !== '') {\n return <span class=\"qds-text\">{this.initials}</span>\n }\n if (this.iconName !== undefined && this.iconName !== '') {\n return (\n <qds-icon\n class=\"qds-icon\"\n name={this.iconName}\n library={this.iconLibrary}\n />\n )\n }\n\n return <qds-icon class=\"qds-icon\" name=\"user\" library=\"core\" />\n }\n\n readonly #handleImageError = (): void => {\n this.hasImageError = true\n this.errorEmitter.emit()\n }\n}\n"],"version":3}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { p as proxyCustomElement, H, c as createEvent, h, e as Host } from './p-D2489VzR.js';
|
|
7
7
|
import { o as offset, f as flip, s as shift, b as arrow, c as computePosition, a as autoUpdate, l as limitShift } from './p-Bv2vPjgL.js';
|
|
8
|
-
import {
|
|
8
|
+
import { g as ignorePromise, h as propertyToPx, i as invariant, r as resolveTarget, l as isTouchDevice } from './p-CXP6q9Mr.js';
|
|
9
9
|
|
|
10
|
-
const tooltipCss = ":host([hidden]){display:none!important}:host{align-items:flex-start;background-color:var(--qds-theme-accessory-background);border:none;border-radius:var(--qds-accessory-border-radius);box-shadow:var(--qds-accessory-elevation);box-sizing:border-box;color:var(--qds-theme-text-standard);display:flex;flex-direction:column;gap:var(--qds-accessory-gap-children-unrelated);margin:0;overflow:initial;padding:0}:host:before{content:\"\";
|
|
10
|
+
const tooltipCss = ":host([hidden]){display:none!important}:host{align-items:flex-start;background-color:var(--qds-theme-accessory-background);border:none;border-radius:var(--qds-accessory-border-radius);box-shadow:var(--qds-accessory-elevation);box-sizing:border-box;color:var(--qds-theme-text-standard);display:flex;flex-direction:column;gap:var(--qds-accessory-gap-children-unrelated);inset:unset;margin:0;overflow:initial;padding:0}:host:before{content:\"\";position:absolute}::slotted(blockquote),::slotted(button),::slotted(dd),::slotted(dl),::slotted(fieldset),::slotted(figure),::slotted(h1),::slotted(h2),::slotted(h3),::slotted(h4),::slotted(h5),::slotted(h6),::slotted(hr),::slotted(input),::slotted(menu),::slotted(ol),::slotted(p),::slotted(pre),::slotted(select),::slotted(textarea),::slotted(ul){margin:0}:host([data-side=bottom]):before,:host([data-side=top]):before{height:calc(var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px));top:100%;width:100%}:host([data-side=bottom]):before{top:calc((var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))*-1)}:host([data-side=left]):before,:host([data-side=right]):before{left:100%;width:calc(var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))}:host([data-side=right]):before{left:calc((var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))*-1)}.qds-arrow{height:var(--qds-signature-triangle-pointer-size-height);position:absolute;width:var(--qds-signature-triangle-pointer-size-width)}.qds-arrow:before{background-color:var(--qds-theme-accessory-background);clip-path:polygon(0 0,100% 0,50% 100%);height:100%}.qds-arrow:after,.qds-arrow:before{content:\"\";position:absolute;width:100%}.qds-arrow:after{background-color:var(--qds-theme-accessory-border);bottom:calc(var(--qds-accessory-border-width)*-1);clip-path:polygon(0 10%,100% 10%,50% 100%);height:calc(100% + var(--qds-accessory-border-width));z-index:-1}.qds-arrow[data-side=bottom]{top:calc((var(--qds-signature-triangle-pointer-size-height) - var(--qds-accessory-effect-section-position-y))*-1);transform:rotate(180deg)}.qds-arrow[data-side=left]{right:calc((var(--qds-accessory-gap-floating) + var(--qds-signature-triangle-pointer-size-height))*-1 + var(--qds-accessory-effect-section-position-y));transform:rotate(-90deg)}.qds-arrow[data-side=right]{left:calc((var(--qds-accessory-gap-floating) + var(--qds-signature-triangle-pointer-size-height))*-1 + var(--qds-accessory-effect-section-position-y));transform:rotate(90deg)}.qds-arrow[data-side=top]{bottom:calc((var(--qds-signature-triangle-pointer-size-height) - var(--qds-accessory-effect-section-position-y))*-1)}.qds-tooltip{align-items:inherit;border:var(--qds-accessory-border-width) solid var(--qds-theme-accessory-border);border-radius:var(--qds-accessory-border-radius);display:inherit;flex-direction:inherit;flex-wrap:inherit;gap:inherit;justify-content:inherit;max-width:var(--qds-accessory-max-width);padding:var(--qds-accessory-padding-top) var(--qds-accessory-padding-end) var(--qds-accessory-padding-bottom) var(--qds-accessory-padding-start)}";
|
|
11
11
|
|
|
12
12
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
13
13
|
//
|
|
@@ -120,12 +120,13 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
|
|
|
120
120
|
async show() {
|
|
121
121
|
if (__classPrivateFieldGet(this, _Tooltip_open, "f"))
|
|
122
122
|
return;
|
|
123
|
+
if (!__classPrivateFieldGet(this, _Tooltip_opened, "f")) {
|
|
124
|
+
await this.updateArrow();
|
|
125
|
+
__classPrivateFieldSet(this, _Tooltip_opened, true, "f");
|
|
126
|
+
}
|
|
127
|
+
this.startAutoUpdate();
|
|
123
128
|
__classPrivateFieldSet(this, _Tooltip_open, true, "f");
|
|
124
129
|
__classPrivateFieldGet(this, _Tooltip_instances, "m", _Tooltip_setAriaExpanded).call(this);
|
|
125
|
-
this.startAutoUpdate();
|
|
126
|
-
if (!__classPrivateFieldGet(this, _Tooltip_opened, "f"))
|
|
127
|
-
await this.updateArrow();
|
|
128
|
-
__classPrivateFieldSet(this, _Tooltip_opened, true, "f");
|
|
129
130
|
}
|
|
130
131
|
/**
|
|
131
132
|
* Close the tooltip.
|
|
@@ -134,11 +135,11 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
|
|
|
134
135
|
if (!__classPrivateFieldGet(this, _Tooltip_open, "f"))
|
|
135
136
|
return;
|
|
136
137
|
this.closeEmitter.emit();
|
|
138
|
+
if (__classPrivateFieldGet(this, _Tooltip_cleanup, "f"))
|
|
139
|
+
__classPrivateFieldGet(this, _Tooltip_cleanup, "f").call(this);
|
|
137
140
|
__classPrivateFieldSet(this, _Tooltip_open, false, "f");
|
|
138
141
|
__classPrivateFieldGet(this, _Tooltip_instances, "m", _Tooltip_setAriaExpanded).call(this);
|
|
139
142
|
__classPrivateFieldSet(this, _Tooltip_clickedTooltip, false, "f");
|
|
140
|
-
if (__classPrivateFieldGet(this, _Tooltip_cleanup, "f"))
|
|
141
|
-
__classPrivateFieldGet(this, _Tooltip_cleanup, "f").call(this);
|
|
142
143
|
}
|
|
143
144
|
/**
|
|
144
145
|
* Update the tooltip's arrow.
|
|
@@ -176,14 +177,7 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
|
|
|
176
177
|
element: __classPrivateFieldGet(this, _Tooltip_arrow, "f"),
|
|
177
178
|
padding: __classPrivateFieldGet(this, _Tooltip_arrowPadding, "f"),
|
|
178
179
|
}),
|
|
179
|
-
]
|
|
180
|
-
await this.updatePosition();
|
|
181
|
-
}
|
|
182
|
-
updateAriaHasPopup() {
|
|
183
|
-
__classPrivateFieldSet(this, _Tooltip_referenceElement, resolveTarget(this.target), "f");
|
|
184
|
-
if (__classPrivateFieldGet(this, _Tooltip_referenceElement, "f") instanceof globalThis.Element &&
|
|
185
|
-
this.host.role === 'dialog')
|
|
186
|
-
__classPrivateFieldGet(this, _Tooltip_referenceElement, "f").ariaHasPopup = 'dialog';
|
|
180
|
+
], "f");
|
|
187
181
|
}
|
|
188
182
|
async updateReferenceElement() {
|
|
189
183
|
var _a;
|
|
@@ -233,7 +227,6 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
|
|
|
233
227
|
}
|
|
234
228
|
async updatePosition() {
|
|
235
229
|
invariant(__classPrivateFieldGet(this, _Tooltip_referenceElement, "f"));
|
|
236
|
-
invariant(__classPrivateFieldGet(this, _Tooltip_arrow, "f"));
|
|
237
230
|
const { x, y, middlewareData, placement, strategy } = await computePosition(__classPrivateFieldGet(this, _Tooltip_referenceElement, "f"), this.host, {
|
|
238
231
|
middleware: __classPrivateFieldGet(this, _Tooltip_middleware, "f"),
|
|
239
232
|
placement: this.placement,
|
|
@@ -241,16 +234,21 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
|
|
|
241
234
|
});
|
|
242
235
|
const [side] = placement.split('-');
|
|
243
236
|
this.host.dataset.side = side;
|
|
244
|
-
this.host.style
|
|
245
|
-
|
|
237
|
+
Object.assign(this.host.style, {
|
|
238
|
+
position: strategy,
|
|
239
|
+
left: `${x}px`,
|
|
240
|
+
top: `${y}px`,
|
|
241
|
+
});
|
|
246
242
|
if (middlewareData.arrow === undefined)
|
|
247
243
|
return;
|
|
248
244
|
invariant(__classPrivateFieldGet(this, _Tooltip_arrow, "f"));
|
|
249
245
|
const { x: aX, y: aY, centerOffset } = middlewareData.arrow;
|
|
250
246
|
__classPrivateFieldGet(this, _Tooltip_arrow, "f").dataset.side = side;
|
|
251
|
-
__classPrivateFieldGet(this, _Tooltip_arrow, "f").style
|
|
252
|
-
|
|
253
|
-
|
|
247
|
+
Object.assign(__classPrivateFieldGet(this, _Tooltip_arrow, "f").style, {
|
|
248
|
+
display: centerOffset === 0 ? '' : 'none',
|
|
249
|
+
left: aX === undefined ? '' : `${aX}px`,
|
|
250
|
+
top: aY === undefined ? '' : `${aY}px`,
|
|
251
|
+
});
|
|
254
252
|
}
|
|
255
253
|
startAutoUpdate() {
|
|
256
254
|
invariant(__classPrivateFieldGet(this, _Tooltip_referenceElement, "f"));
|
|
@@ -275,7 +273,7 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
|
|
|
275
273
|
__classPrivateFieldGet(this, _Tooltip_referenceElement, "f").removeAttribute('aria-describedby');
|
|
276
274
|
}
|
|
277
275
|
render() {
|
|
278
|
-
return (h(Host, { key: '
|
|
276
|
+
return (h(Host, { key: 'd988515f748a96c82aa9d06e5147e5d0bca5b15a', onKeyDown: __classPrivateFieldGet(this, _Tooltip_boundKeyDown, "f"), onPointerDown: __classPrivateFieldGet(this, _Tooltip_boundTooltipPointerDown, "f") }, h("div", { key: '8a4b87f814af050b52659eb14f04f377a704e19d', class: "qds-tooltip" }, h("slot", { key: 'e4e89b12134a6ed44eb8ae0e6f76d9843341cabe' })), h("div", { key: '3bff9e45b53659775dcdc5ef89d2132951cac5a9', class: "qds-arrow", ref: __classPrivateFieldGet(this, _Tooltip_arrowRef, "f") })));
|
|
279
277
|
}
|
|
280
278
|
get host() { return this; }
|
|
281
279
|
static get watchers() { return {
|
|
@@ -284,7 +282,6 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
|
|
|
284
282
|
"noShift": ["updateMiddleware"],
|
|
285
283
|
"offsetOptions": ["updateMiddleware"],
|
|
286
284
|
"shiftOptions": ["updateMiddleware"],
|
|
287
|
-
"role": ["updateAriaHasPopup"],
|
|
288
285
|
"target": ["updateReferenceElement"],
|
|
289
286
|
"trigger": ["updateEventListeners"],
|
|
290
287
|
"middleware": ["updatePosition"],
|
|
@@ -314,7 +311,6 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
|
|
|
314
311
|
"noShift": ["updateMiddleware"],
|
|
315
312
|
"offsetOptions": ["updateMiddleware"],
|
|
316
313
|
"shiftOptions": ["updateMiddleware"],
|
|
317
|
-
"role": ["updateAriaHasPopup"],
|
|
318
314
|
"target": ["updateReferenceElement"],
|
|
319
315
|
"trigger": ["updateEventListeners"],
|
|
320
316
|
"middleware": ["updatePosition"],
|
|
@@ -392,6 +388,6 @@ function defineCustomElement() {
|
|
|
392
388
|
}
|
|
393
389
|
|
|
394
390
|
export { Tooltip as T, defineCustomElement as d };
|
|
395
|
-
//# sourceMappingURL=p-
|
|
391
|
+
//# sourceMappingURL=p-B03FWheS.js.map
|
|
396
392
|
|
|
397
|
-
//# sourceMappingURL=p-
|
|
393
|
+
//# sourceMappingURL=p-B03FWheS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-B03FWheS.js","mappings":";;;;;;;;;AAAA,MAAM,UAAU,GAAG,unGAAunG;;ACA1oG;AACA;AACA;;;;;;;;;;;;;;;;;;A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,GAAA,SAAA,wBAAA,GAAA;AAGC,IAAA,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,sBAAA,CAAA,IAAI,EAAA,aAAA,EAAA,GAAA,CAAM;AAC9B,IAAA,IAAI,sBAAA,CAAA,IAAI,EAAM,aAAA,EAAA,GAAA,CAAA;AAAE,QAAA,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;;AAClC,QAAA,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;IAE5B,IACE,uBAAA,IAAI,EAAA,yBAAA,EAAA,GAAA,CAAkB,YAAY,UAAU,CAAC,OAAO;AACpD,QAAA,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ;QAE3B,sBAAA,CAAA,IAAI,EAAkB,yBAAA,EAAA,GAAA,CAAA,CAAC,YAAY,GAAG,MAAM,CAAC,sBAAA,CAAA,IAAI,EAAM,aAAA,EAAA,GAAA,CAAA,CAAC;AAC5D,CAAC;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/tooltip/tooltip.css?tag=qds-tooltip&encapsulation=shadow","src/components/tooltip/tooltip.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 align-items: flex-start;\n background-color: var(--qds-theme-accessory-background);\n border-radius: var(--qds-accessory-border-radius);\n border: none;\n box-shadow: var(--qds-accessory-elevation);\n box-sizing: border-box;\n color: var(--qds-theme-text-standard);\n display: flex;\n flex-direction: column;\n gap: var(--qds-accessory-gap-children-unrelated);\n inset: unset;\n margin: 0;\n overflow: initial;\n padding: 0;\n}\n\n:host::before {\n content: '';\n position: absolute;\n}\n\n::slotted(blockquote),\n::slotted(button),\n::slotted(dd),\n::slotted(dl),\n::slotted(fieldset),\n::slotted(figure),\n::slotted(h1),\n::slotted(h2),\n::slotted(h3),\n::slotted(h4),\n::slotted(h5),\n::slotted(h6),\n::slotted(hr),\n::slotted(input),\n::slotted(menu),\n::slotted(ol),\n::slotted(p),\n::slotted(pre),\n::slotted(select),\n::slotted(textarea),\n::slotted(ul) {\n margin: 0;\n}\n\n:host([data-side='top'])::before,\n:host([data-side='bottom'])::before {\n width: 100%;\n height: calc(\n var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px)\n );\n top: 100%;\n}\n\n:host([data-side='bottom'])::before {\n top: calc(\n -1 *\n (\n var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px)\n )\n );\n}\n\n:host([data-side='left'])::before,\n:host([data-side='right'])::before {\n width: calc(\n var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px)\n );\n left: 100%;\n}\n\n:host([data-side='right'])::before {\n left: calc(\n -1 *\n (\n var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px)\n )\n );\n}\n\n.qds-arrow {\n position: absolute;\n width: var(--qds-signature-triangle-pointer-size-width);\n height: var(--qds-signature-triangle-pointer-size-height);\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n background-color: var(--qds-theme-accessory-background);\n clip-path: polygon(0% 0%, 100% 0%, 50% 100%);\n }\n\n &::after {\n content: '';\n position: absolute;\n width: 100%;\n height: calc(100% + var(--qds-accessory-border-width));\n background-color: var(--qds-theme-accessory-border);\n clip-path: polygon(0% 10%, 100% 10%, 50% 100%);\n z-index: -1;\n bottom: calc(-1 * var(--qds-accessory-border-width));\n }\n\n &[data-side='bottom'] {\n top: calc(\n -1 *\n (\n var(--qds-signature-triangle-pointer-size-height) -\n var(--qds-accessory-effect-section-position-y)\n )\n );\n transform: rotate(180deg);\n }\n\n &[data-side='left'] {\n right: calc(\n (\n -1 *\n (\n var(--qds-accessory-gap-floating) +\n var(--qds-signature-triangle-pointer-size-height)\n )\n ) +\n var(--qds-accessory-effect-section-position-y)\n );\n transform: rotate(-90deg);\n }\n\n &[data-side='right'] {\n left: calc(\n (\n -1 *\n (\n var(--qds-accessory-gap-floating) +\n var(--qds-signature-triangle-pointer-size-height)\n )\n ) +\n var(--qds-accessory-effect-section-position-y)\n );\n transform: rotate(90deg);\n }\n\n &[data-side='top'] {\n bottom: calc(\n -1 *\n (\n var(--qds-signature-triangle-pointer-size-height) -\n var(--qds-accessory-effect-section-position-y)\n )\n );\n }\n}\n\n.qds-tooltip {\n border: var(--qds-accessory-border-width) solid\n var(--qds-theme-accessory-border);\n border-radius: var(--qds-accessory-border-radius);\n padding: var(--qds-accessory-padding-top) var(--qds-accessory-padding-end)\n var(--qds-accessory-padding-bottom) var(--qds-accessory-padding-start);\n display: inherit;\n flex-direction: inherit;\n flex-wrap: inherit;\n justify-content: inherit;\n align-items: inherit;\n gap: inherit;\n max-width: var(--qds-accessory-max-width);\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 arrow,\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 Method,\n Prop,\n Watch,\n} from '@stencil/core'\nimport type { Split } from 'type-fest'\n\nimport type { OffsetOptions } from '../../helpers'\nimport {\n ignorePromise,\n invariant,\n isTouchDevice,\n propertyToPx,\n resolveTarget,\n} from '../../helpers'\n\nlet autoIncrementingId = 1\n\nexport type TriggerEvent = Extract<\n keyof GlobalEventHandlersEventMap,\n 'click' | 'focus' | 'focusin' | 'pointerenter'\n>\n\n/**\n * @slot Content to display in the dropdown.\n * @see https://quartz.se.com/build/components/tooltip\n */\n@Component({\n tag: 'qds-tooltip',\n shadow: true,\n styleUrl: 'tooltip.css',\n})\nexport class Tooltip 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 tooltip from being shown by user interaction. The tooltip can\n * 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 tooltip relative to the `target`.\n *\n * @see https://floating-ui.com/docs/tutorial#placements\n */\n @Prop() public readonly placement: Placement = 'top'\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 tooltip. 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 * Determines the events that cause the tooltip to show. Multiple event names\n * are separated by spaces.\n */\n @Prop() public readonly trigger?: TriggerEvent[] | string =\n 'pointerenter focus'\n\n /**\n * Emitted when the tooltip 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 #arrow?: HTMLElement\n\n #arrowPadding = 0\n\n #cleanup?: () => void\n\n #clickedTooltip = false\n\n #isTouchDevice = false\n\n #listeners: {\n element: Element\n event: keyof GlobalEventHandlersEventMap\n listener: EventListenerOrEventListenerObject\n }[] = []\n\n #mainAxisDistance = 0\n\n #middleware?: (Middleware | false)[]\n\n #open = false\n\n /**\n * Ensure that `updateArrow()` is called only once internally as this is\n * expensive.\n */\n #opened = false\n\n #referenceElement?: ReferenceElement\n\n /**\n * Show the tooltip.\n */\n @Method()\n public async show(): Promise<void> {\n if (this.#open) return\n\n if (!this.#opened) {\n await this.updateArrow()\n this.#opened = true\n }\n this.startAutoUpdate()\n this.#open = true\n this.#setAriaExpanded()\n }\n\n /**\n * Close the tooltip.\n */\n @Method()\n public async close(): Promise<void> {\n if (!this.#open) return\n\n this.closeEmitter.emit()\n\n if (this.#cleanup) this.#cleanup()\n this.#open = false\n this.#setAriaExpanded()\n this.#clickedTooltip = false\n }\n\n /**\n * Update the tooltip's arrow.\n *\n * This method should typically be called when the Quartz platform was\n * changed.\n */\n @Method()\n public async updateArrow(): Promise<void> {\n const gap = propertyToPx(this.host, '--qds-accessory-gap-floating') ?? 0\n const height =\n propertyToPx(this.host, '--qds-signature-triangle-pointer-size-height') ??\n 0\n const padding =\n propertyToPx(this.host, '--qds-accessory-border-radius') ?? 0\n this.#mainAxisDistance = gap + height\n this.#arrowPadding = padding\n\n await this.updateMiddleware()\n }\n\n @Watch('flipOptions')\n @Watch('noFlip')\n @Watch('noShift')\n @Watch('offsetOptions')\n @Watch('shiftOptions')\n private async updateMiddleware(): Promise<void> {\n invariant(this.#arrow)\n\n this.#middleware = [\n offset({\n ...this.offsetOptions,\n mainAxis: this.#mainAxisDistance,\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 arrow({\n element: this.#arrow,\n padding: this.#arrowPadding,\n }),\n ]\n }\n\n @Watch('target')\n private async updateReferenceElement(): Promise<void> {\n this.disconnectedCallback()\n\n this.#referenceElement = resolveTarget(this.target)\n\n if (!(this.#referenceElement instanceof globalThis.Element)) return\n\n this.updateEventListeners()\n this.host.id ||= `qds-tooltip-${autoIncrementingId}`\n this.#referenceElement.setAttribute('aria-describedby', this.host.id)\n if (this.host.role === 'dialog')\n this.#referenceElement.ariaHasPopup = 'dialog'\n }\n\n @Watch('trigger')\n private updateEventListeners(): void {\n if (!(this.#referenceElement instanceof globalThis.Element)) return\n\n const triggers = Array.isArray(this.trigger)\n ? this.trigger\n : ((this.trigger?.split(' ') as Split<TriggerEvent, ' '> | undefined) ??\n [])\n\n this.#removeEventListeners()\n\n if (this.#isTouchDevice)\n this.#on(this.#referenceElement, 'click', this.#boundReferenceClick)\n this.#on(document.documentElement, 'pointerdown', this.#boundPointerdown)\n this.#on(this.#referenceElement, 'keydown', this.#boundKeyDown)\n\n for (const trigger of triggers) {\n switch (trigger) {\n case 'click': {\n this.#on(this.#referenceElement, 'click', this.#boundReferenceClick)\n break\n }\n case 'focus':\n case 'focusin': {\n this.#on(this.#referenceElement, trigger, this.#boundFocus)\n this.#on(this.#referenceElement, 'focusout', this.#boundFocusout)\n this.#on(this.host, 'focusout', this.#boundFocusout)\n break\n }\n case 'pointerenter': {\n this.#on(\n this.#referenceElement,\n 'pointerenter',\n this.#boundPointerenter,\n )\n this.#on(\n this.#referenceElement,\n 'pointerleave',\n this.#boundPointerleave,\n )\n this.#on(this.host, 'pointerleave', this.#boundPointerleave)\n break\n }\n default:\n }\n }\n }\n\n @Watch('middleware')\n @Watch('placement')\n @Watch('strategy')\n private async updatePosition(): Promise<void> {\n invariant(this.#referenceElement)\n\n const { x, y, middlewareData, placement, 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 const [side] = placement.split('-') as Split<Placement, '-'>\n\n this.host.dataset.side = side\n Object.assign(this.host.style, {\n position: strategy,\n left: `${x}px`,\n top: `${y}px`,\n })\n\n if (middlewareData.arrow === undefined) return\n\n invariant(this.#arrow)\n\n const { x: aX, y: aY, centerOffset } = middlewareData.arrow\n this.#arrow.dataset.side = side\n Object.assign(this.#arrow.style, {\n display: centerOffset === 0 ? '' : 'none',\n left: aX === undefined ? '' : `${aX}px`,\n top: aY === undefined ? '' : `${aY}px`,\n })\n }\n\n @Watch('autoUpdateOptions')\n private startAutoUpdate(): void {\n invariant(this.#referenceElement)\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.#isTouchDevice = isTouchDevice()\n this.host.hidden = true\n this.host.popover = 'manual'\n this.internals.role = 'tooltip'\n await this.updateReferenceElement()\n autoIncrementingId += 1\n }\n\n public disconnectedCallback(): void {\n if (!(this.#referenceElement instanceof globalThis.Element)) return\n\n this.#removeEventListeners()\n this.#referenceElement.removeAttribute('aria-describedby')\n }\n\n public render() {\n return (\n <Host\n onKeyDown={this.#boundKeyDown}\n onPointerDown={this.#boundTooltipPointerDown}\n >\n <div class=\"qds-tooltip\">\n <slot />\n </div>\n\n <div class=\"qds-arrow\" ref={this.#arrowRef} />\n </Host>\n )\n }\n\n readonly #arrowRef = (div?: HTMLElement): void => {\n this.#arrow = div\n }\n\n readonly #boundTooltipPointerDown = (): void => {\n this.#clickedTooltip = true\n }\n\n async #handleFocus(): Promise<void> {\n if (!this.disabled) await this.show()\n }\n\n readonly #boundFocus = (): void => {\n ignorePromise(this.#handleFocus())\n }\n\n async #handleKeyDown(event: Event): Promise<void> {\n if (event instanceof KeyboardEvent && event.key === 'Escape')\n await this.close()\n }\n\n readonly #boundKeyDown = (event: Event): void => {\n ignorePromise(this.#handleKeyDown(event))\n }\n\n async #handlePointerenter(): Promise<void> {\n if (!this.disabled) await this.show()\n }\n\n readonly #boundPointerenter = (): void => {\n ignorePromise(this.#handlePointerenter())\n }\n\n async #handlePointerleave(event: Event): Promise<void> {\n if (\n !this.#clickedTooltip &&\n document.activeElement !== this.#referenceElement &&\n document.activeElement?.closest('qds-tooltip') !== this.host &&\n event instanceof PointerEvent &&\n event.relatedTarget !== this.#referenceElement &&\n event.relatedTarget !== this.host\n )\n await this.close()\n }\n\n readonly #boundPointerleave = (event: Event): void => {\n ignorePromise(this.#handlePointerleave(event))\n }\n\n async #handleFocusOut(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 readonly #boundFocusout = (event: Event): void => {\n ignorePromise(this.#handleFocusOut(event))\n }\n\n async #handlePointerdown(event: Event): Promise<void> {\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 readonly #boundPointerdown = (event: Event): void => {\n ignorePromise(this.#handlePointerdown(event))\n }\n\n async #handleReferenceClick(): Promise<void> {\n if (!this.disabled) await (this.#open ? this.close() : this.show())\n }\n\n readonly #boundReferenceClick = (): void => {\n ignorePromise(this.#handleReferenceClick())\n }\n\n #on(\n element: Element,\n event: keyof GlobalEventHandlersEventMap,\n listener: EventListenerOrEventListenerObject,\n ): void {\n const hasListener = this.#listeners.some(\n (value) => value.element === element && value.event === event,\n )\n if (hasListener) return\n\n element.addEventListener(event, listener)\n this.#listeners.push({ element, event, listener })\n }\n\n #removeEventListeners(): void {\n for (const { element, event, listener } of this.#listeners)\n element.removeEventListener(event, listener)\n this.#listeners = []\n }\n\n #setAriaExpanded(): void {\n this.host.hidden = !this.#open\n if (this.#open) this.host.showPopover()\n else this.host.hidePopover()\n\n if (\n this.#referenceElement instanceof globalThis.Element &&\n this.host.role === 'dialog'\n )\n this.#referenceElement.ariaExpanded = String(this.#open)\n }\n}\n"],"version":3}
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { p as proxyCustomElement, H, c as createEvent, h } from './p-D2489VzR.js';
|
|
7
|
-
import { p as pickFocusEventAttributes,
|
|
7
|
+
import { p as pickFocusEventAttributes, c as inheritAriaAttributes } from './p-CXP6q9Mr.js';
|
|
8
8
|
import { V as VALID_STATE, C as CUSTOM_ERROR_FLAGS, N as NO_ERROR_FLAGS } from './p-CZRW1LV_.js';
|
|
9
|
-
import { d as defineCustomElement$3 } from './p-
|
|
10
|
-
import { d as defineCustomElement$2 } from './p-
|
|
11
|
-
import { d as defineCustomElement$1 } from './p-
|
|
9
|
+
import { d as defineCustomElement$3 } from './p-BkgfW_tl.js';
|
|
10
|
+
import { d as defineCustomElement$2 } from './p-CRVPDKfO.js';
|
|
11
|
+
import { d as defineCustomElement$1 } from './p-B03FWheS.js';
|
|
12
12
|
|
|
13
|
-
const checkboxCss = ":host([hidden]){display:none!important}:host{display:inline-block;line-height:0}.qds-checkbox,.qds-icon{grid-area:
|
|
13
|
+
const checkboxCss = ":host([hidden]){display:none!important}:host{display:inline-block;line-height:0}.qds-checkbox,.qds-icon{grid-area:c;place-self:center}.qds-icon{color:var(--qds-theme-signature-color-contrast);display:none;pointer-events:none}.qds-container{display:grid;grid-template-areas:\"c\"}.qds-label{align-items:flex-start;background-color:var(--qds-theme-interactive-background-default);border-radius:var(--qds-control-border-radius);box-sizing:border-box;cursor:pointer;display:inline-flex;justify-content:center;width:inherit}.qds-label:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-label:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-label:has(.qds-checkbox:focus-visible){box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-label-inner{flex:1 1 auto;min-width:0;width:100%}.qds-checkbox{-webkit-appearance:none;appearance:none;background-color:var(--qds-theme-interactive-background-default);border:var(--qds-control-border-width) solid var(--qds-theme-control-border);cursor:pointer;margin:0;-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-checkbox:focus-visible{outline:none}.qds-checkbox:checked~.qds-checked,.qds-checkbox:indeterminate~.qds-indeterminate{display:block}.qds-checkbox:checked,.qds-checkbox:indeterminate{background-color:var(--qds-theme-control-background-contrast);border-color:#0000}[aria-disabled=true]{opacity:var(--qds-theme-disabled);pointer-events:none}[data-size=small]{--qds-form-small-text:var(--qds-control-small-text)}.qds-checkbox[data-size=small]{border-radius:var(--qds-control-toggle-small-knob-border-radius);height:var(--qds-control-toggle-small-box-size);width:var(--qds-control-toggle-small-box-size)}.qds-icon[data-size=small]{font-size:var(--qds-control-small-icon-size)}.qds-label[data-size=small]{gap:var(--qds-control-small-gap-siblings-related);min-height:var(--qds-control-toggle-small-height);min-width:var(--qds-control-toggle-small-width);padding-block:var(--qds-control-no-inline-small-padding-vertical)}.qds-inline[data-size=small]{min-height:var(--qds-control-small-height);padding:var(--qds-control-small-padding-auto-height) var(--qds-control-toggle-small-padding-horizontal)}[data-size=standard]{--qds-form-standard-text:var(--qds-control-standard-text)}.qds-checkbox[data-size=standard]{border-radius:var(--qds-control-toggle-standard-knob-border-radius);height:var(--qds-control-toggle-standard-box-size);width:var(--qds-control-toggle-standard-box-size)}.qds-icon[data-size=standard]{font-size:var(--qds-control-standard-icon-size)}.qds-label[data-size=standard]{gap:var(--qds-control-standard-gap-siblings-related);min-height:var(--qds-control-toggle-standard-height);min-width:var(--qds-control-toggle-standard-width);padding-block:var(--qds-control-no-inline-standard-padding-vertical)}.qds-inline[data-size=standard]{min-height:var(--qds-control-standard-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}[data-size=large]{--qds-form-large-text:var(--qds-control-large-text)}.qds-checkbox[data-size=large]{border-radius:var(--qds-control-toggle-large-knob-border-radius);height:var(--qds-control-toggle-large-box-size);width:var(--qds-control-toggle-large-box-size)}.qds-icon[data-size=large]{font-size:var(--qds-control-large-icon-size)}.qds-label[data-size=large]{gap:var(--qds-control-large-gap-siblings-related);min-height:var(--qds-control-toggle-large-height);min-width:var(--qds-control-toggle-large-width);padding-block:var(--qds-control-no-inline-large-padding-vertical)}.qds-inline[data-size=large]{min-height:var(--qds-control-large-height);padding:var(--qds-control-large-padding-auto-height) var(--qds-control-toggle-large-padding-horizontal)}";
|
|
14
14
|
|
|
15
15
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
16
16
|
//
|
|
@@ -269,6 +269,6 @@ function defineCustomElement() {
|
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
export { Checkbox as C, defineCustomElement as d };
|
|
272
|
-
//# sourceMappingURL=p-
|
|
272
|
+
//# sourceMappingURL=p-BkBJDD6Y.js.map
|
|
273
273
|
|
|
274
|
-
//# sourceMappingURL=p-
|
|
274
|
+
//# sourceMappingURL=p-BkBJDD6Y.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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AC,IAAI,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AAChE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/checkbox/checkbox.css?tag=qds-checkbox&encapsulation=shadow","src/components/checkbox/checkbox.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 line-height: 0;\n}\n\n.qds-checkbox,\n.qds-icon {\n grid-area: checkbox;\n place-self: center;\n}\n\n.qds-icon {\n display: none;\n pointer-events: none;\n color: var(--qds-theme-signature-color-contrast);\n}\n\n.qds-container {\n display: grid;\n grid-template-areas: 'checkbox';\n}\n\n.qds-label {\n cursor: pointer;\n display: inline-flex;\n width: inherit;\n border-radius: var(--qds-control-border-radius);\n align-items: flex-start;\n box-sizing: border-box;\n justify-content: center;\n background-color: var(--qds-theme-interactive-background-default);\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 &:has(.qds-checkbox:focus-visible) {\n /* inner ring */\n outline: var(--qds-theme-focus-border-contrast) solid\n var(--qds-focus-light-border-width);\n outline-offset: 0;\n\n /* outer ring */\n box-shadow: 0 0 0 var(--qds-focus-heavy-border-width)\n var(--qds-theme-focus-border);\n }\n}\n\n.qds-label-inner {\n flex: 1 1 auto;\n min-width: 0;\n width: 100%;\n}\n\n.qds-checkbox {\n appearance: none;\n background-color: var(--qds-theme-interactive-background-default);\n border: var(--qds-control-border-width) solid var(--qds-theme-control-border);\n cursor: pointer;\n margin: 0;\n print-color-adjust: exact;\n\n &:focus-visible {\n outline: none;\n }\n\n &:checked ~ .qds-checked,\n &:indeterminate ~ .qds-indeterminate {\n display: block;\n }\n\n &:checked,\n &:indeterminate {\n background-color: var(--qds-theme-control-background-contrast);\n border-color: transparent;\n }\n}\n\n[aria-disabled='true'] {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n[data-size='small'] {\n /* override qds-label font design token */\n --qds-form-small-text: var(--qds-control-small-text);\n\n &.qds-checkbox {\n width: var(--qds-control-toggle-small-box-size);\n height: var(--qds-control-toggle-small-box-size);\n border-radius: var(--qds-control-toggle-small-knob-border-radius);\n }\n\n &.qds-icon {\n font-size: var(--qds-control-small-icon-size);\n }\n\n &.qds-label {\n gap: var(--qds-control-small-gap-siblings-related);\n min-height: var(--qds-control-toggle-small-height);\n padding-block: var(--qds-control-no-inline-small-padding-vertical);\n min-width: var(--qds-control-toggle-small-width);\n }\n\n &.qds-inline {\n min-height: var(--qds-control-small-height);\n padding: var(--qds-control-small-padding-auto-height)\n var(--qds-control-toggle-small-padding-horizontal);\n }\n}\n\n[data-size='standard'] {\n /* override qds-label font design token */\n --qds-form-standard-text: var(--qds-control-standard-text);\n\n &.qds-checkbox {\n width: var(--qds-control-toggle-standard-box-size);\n height: var(--qds-control-toggle-standard-box-size);\n border-radius: var(--qds-control-toggle-standard-knob-border-radius);\n }\n\n &.qds-icon {\n font-size: var(--qds-control-standard-icon-size);\n }\n\n &.qds-label {\n gap: var(--qds-control-standard-gap-siblings-related);\n min-height: var(--qds-control-toggle-standard-height);\n padding-block: var(--qds-control-no-inline-standard-padding-vertical);\n min-width: var(--qds-control-toggle-standard-width);\n }\n\n &.qds-inline {\n min-height: var(--qds-control-standard-height);\n padding: var(--qds-control-standard-padding-auto-height)\n var(--qds-control-toggle-standard-padding-horizontal);\n }\n}\n\n[data-size='large'] {\n /* override qds-label font design token */\n --qds-form-large-text: var(--qds-control-large-text);\n\n &.qds-checkbox {\n width: var(--qds-control-toggle-large-box-size);\n height: var(--qds-control-toggle-large-box-size);\n border-radius: var(--qds-control-toggle-large-knob-border-radius);\n }\n\n &.qds-icon {\n font-size: var(--qds-control-large-icon-size);\n }\n\n &.qds-label {\n gap: var(--qds-control-large-gap-siblings-related);\n min-height: var(--qds-control-toggle-large-height);\n padding-block: var(--qds-control-no-inline-large-padding-vertical);\n min-width: var(--qds-control-toggle-large-width);\n }\n\n &.qds-inline {\n min-height: var(--qds-control-large-height);\n padding: var(--qds-control-large-padding-auto-height)\n var(--qds-control-toggle-large-padding-horizontal);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\n\nimport type { Attributes, QdsFocusEventDetail } from '../../helpers'\nimport { inheritAriaAttributes, pickFocusEventAttributes } from '../../helpers'\nimport { CUSTOM_ERROR_FLAGS, NO_ERROR_FLAGS, VALID_STATE } from '../controls'\nimport type { Size } from '../shared'\n\nexport type CheckboxValue = number | string | null\n\n/**\n * `<qds-checkbox>` elements are rendered as boxes that are checked (ticked)\n * when activated, like you might see in an official government paper form. A\n * checkbox allows you to select single values for submission in a form (or not).\n *\n * @see https://quartz.se.com/build/components/checkbox\n */\n@Component({\n tag: 'qds-checkbox',\n formAssociated: true,\n shadow: { delegatesFocus: true },\n styleUrl: 'checkbox.css',\n})\nexport class Checkbox implements ComponentInterface {\n /**\n * Adds vertical margin to the checkbox for alignment.\n *\n * This is useful when creating inline layouts so that the first lines have\n * the correct vertical centering.\n */\n @Prop() public readonly inline: boolean = false\n\n /**\n * The checkbox's size.\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * The checkbox's text.\n *\n * Its value will also be used as the `aria-label` value when the\n * `checkbox-only` attribute is specified.\n */\n @Prop() public readonly text!: string\n\n /**\n * Sets the checkbox's state.\n *\n * @webnative\n */\n @Prop({ mutable: true }) public checked?: boolean\n\n /**\n * Prevents the checkbox from being interacted with: it cannot be pressed or\n * focused.\n *\n * @webnative\n */\n @Prop() public readonly disabled?: boolean\n\n /**\n * The [`<form>`][] element to associate the checkbox 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-checkbox>` is associated\n * with its ancestor `<form>` element, if any.\n *\n * This attribute lets you associate `<qds-checkbox>` 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 * Sets the checkbox to an indeterminate state. This is usually applied to\n * checkboxes that represent a \"select all/none\" behavior when associated\n * checkboxes have a mix of checked and unchecked states.\n *\n * @webnative\n */\n @Prop({ mutable: true }) public indeterminate?: boolean\n\n /**\n * The name of the checkbox, which is submitted with the form data.\n *\n * @webnative\n */\n @Prop() public readonly name?: string\n\n /**\n * A value must be specified for the checkbox before the owning form can be\n * submitted.\n *\n * See\n * [Client-side validation](https://developer.mozilla.org/docs/Web/HTML/Element/input#client-side_validation)\n * and the\n * [HTML attribute: `required`](https://developer.mozilla.org/docs/Web/HTML/Attributes/required)\n * for more information.\n *\n * @webnative\n */\n @Prop() public readonly required?: boolean\n\n /**\n * The error message that would be shown to the user if the `<qds-checkbox>`\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-checkbox>`.\n *\n * [`ValidityState`]: https://developer.mozilla.org/docs/Web/API/ValidityState\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly validity: ElementInternals['validity'] = VALID_STATE\n\n /**\n * The value of the checkbox, submitted as a name/value pair with form data.\n *\n * @webnative\n */\n @Prop() public readonly value?: CheckboxValue = 'on'\n\n /**\n * True if `<qds-checkbox>` will be validated when the form is submitted;\n * false otherwise.\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly willValidate: ElementInternals['willValidate'] = false\n\n /**\n * Whether or not the text is displayed.\n */\n @Prop() public readonly checkboxOnly: boolean = false\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n /**\n * Emitted when the checkbox loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when a change to the checkbox's state is committed by the user.\n */\n @Event({ eventName: 'qdsChange', cancelable: false })\n private readonly changeEmitter!: EventEmitter<void>\n\n /**\n * Emitted when the checkbox 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 tabIndex?: number\n\n #inheritedAttributes: Attributes = {}\n\n get #computedChecked(): boolean {\n return this.checked ?? false\n }\n\n get #computedDisabled(): boolean {\n return (\n (this.host.matches(':disabled') || (this.disabled ?? false)) &&\n this.host.getAttribute('disabled') !== 'false'\n )\n }\n\n get #computedIndeterminate(): boolean {\n return this.indeterminate ?? false\n }\n\n get #computedSize(): Size {\n switch (this.size) {\n case 'standard':\n case 'small':\n case 'large': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedValue(): string | null {\n // eslint-disable-next-line unicorn/no-null\n return this.value == null ? null : this.value.toString()\n }\n\n get #hasText(): boolean {\n return (this.text !== '' || this.required === true) && !this.checkboxOnly\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) {\n event.stopImmediatePropagation()\n return\n }\n\n event.preventDefault()\n\n this.checked = this.#computedIndeterminate ? true : !this.#computedChecked\n this.changeEmitter.emit()\n this.indeterminate = false\n }\n\n @Watch('checked')\n protected checkedChanged(): void {\n this.internals.setFormValue(\n this.#computedChecked && !this.#computedDisabled\n ? this.#computedValue\n : // eslint-disable-next-line unicorn/no-null\n null,\n )\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n if (this.#computedChecked && !this.#computedDisabled)\n this.internals.setFormValue(this.#computedValue)\n // eslint-disable-next-line unicorn/no-null\n else this.internals.setFormValue(null)\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string): void {\n const parsedValue = Number.parseInt(newValue, 10)\n this.tabIndex =\n parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue\n }\n\n @Watch('value')\n protected valueChanged(): void {\n if (this.#computedChecked && !this.#computedDisabled)\n this.internals.setFormValue(this.#computedValue)\n }\n\n public componentWillLoad(): void {\n this.valueChanged()\n\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\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n }\n\n public render() {\n return (\n // eslint-disable-next-line jsx-a11y/label-has-associated-control\n <label\n aria-disabled={this.#computedDisabled ? 'true' : undefined}\n class={{\n 'qds-inline': this.inline,\n 'qds-label': true,\n }}\n data-size={this.#computedSize}\n >\n <div class=\"qds-container\">\n <input\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={this.host.autofocus}\n checked={this.#computedIndeterminate ? false : this.checked}\n class=\"qds-checkbox\"\n data-size={this.#computedSize}\n disabled={this.#computedDisabled}\n indeterminate={this.indeterminate}\n onBlur={this.#onBlur}\n onFocus={this.#onFocus}\n required={this.required}\n tabIndex={this.#computedDisabled ? undefined : this.tabIndex}\n type=\"checkbox\"\n aria-label={this.checkboxOnly ? this.text : undefined}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n />\n <qds-icon\n aria-hidden=\"true\"\n class={{\n 'qds-icon': true,\n 'qds-checked': true,\n }}\n data-size={this.#computedSize}\n library=\"core\"\n name=\"checked\"\n />\n <qds-icon\n aria-hidden=\"true\"\n class={{\n 'qds-icon': true,\n 'qds-indeterminate': true,\n }}\n data-size={this.#computedSize}\n library=\"core\"\n name=\"indeterminate\"\n />\n </div>\n {this.#hasText && (\n <qds-label\n class=\"qds-label-inner\"\n required={this.required}\n size={this.size}\n text={this.text}\n tabindex={-1}\n tooltipTarget={this.host}\n />\n )}\n </label>\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: HTMLInputElement['setCustomValidity'] = (error) => {\n if (error) this.internals.setValidity(CUSTOM_ERROR_FLAGS, error, this.host)\n else this.internals.setValidity(NO_ERROR_FLAGS)\n }\n\n readonly #onBlur = (event: FocusEvent): void => {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onFocus = (event: FocusEvent): void => {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n\n #defineGetter(p: PropertyKey, get: () => unknown): void {\n Object.defineProperty(this.host, p, { enumerable: true, get })\n }\n}\n"],"version":3}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { g as getAssetPath, p as proxyCustomElement, H, c as createEvent, h } from './p-D2489VzR.js';
|
|
7
|
-
import {
|
|
7
|
+
import { c as inheritAriaAttributes } from './p-CXP6q9Mr.js';
|
|
8
8
|
|
|
9
9
|
const checkedSvg = 'data:image/svg+xml;base64,PCEtLSBTUERYLUZpbGVDb3B5cmlnaHRUZXh0OiDCqSAyMDI1IFNjaG5laWRlciBFbGVjdHJpYyBTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogQXBhY2hlLTIuMCAtLT4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS1taXRlcmxpbWl0PSIxNiIgZD0ibTEyLjExMSAzLjUtNS45MTggOUwzLjg5IDkuMDI0Ii8+PC9zdmc+';
|
|
10
10
|
|
|
@@ -245,7 +245,7 @@ const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends H {
|
|
|
245
245
|
await this.setIcon();
|
|
246
246
|
}
|
|
247
247
|
render() {
|
|
248
|
-
return (h("div", { key: '
|
|
248
|
+
return (h("div", { key: 'fec63ded24fe49475d789744e32175930bfaaf45', class: "qds-container" }, h("span", { key: 'f70431d887b27792ecc3184004286ed0583689e5', class: "qds-icon-wrapper", innerHTML: this.svg }), h("div", { key: '2f6d366099a1a644da8d27e95be8ea2ff4af8e64', class: "qds-click-target" })));
|
|
249
249
|
}
|
|
250
250
|
get host() { return this; }
|
|
251
251
|
static get watchers() { return {
|
|
@@ -277,6 +277,6 @@ function defineCustomElement() {
|
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
export { Icon as I, defineCustomElement as d, registerIconLibrary as r, unregisterIconLibrary as u };
|
|
280
|
-
//# sourceMappingURL=p-
|
|
280
|
+
//# sourceMappingURL=p-BkgfW_tl.js.map
|
|
281
281
|
|
|
282
|
-
//# sourceMappingURL=p-
|
|
282
|
+
//# sourceMappingURL=p-BkgfW_tl.js.map
|