@quartzds/core 1.0.0-beta.12 → 1.0.0-beta.121
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 +1919 -0
- package/README.md +23 -23
- package/components/index.d.ts +50 -0
- package/components/index.js +62 -28
- package/components/index.js.map +1 -1
- package/components/p-5dwtV5iH.js +428 -0
- package/components/p-5dwtV5iH.js.map +1 -0
- package/components/p-B2ZVUvk9.js +162 -0
- package/components/p-B2ZVUvk9.js.map +1 -0
- package/components/{floating-ui.dom.esm.js → p-Bv2vPjgL.js} +557 -345
- package/components/p-Bv2vPjgL.js.map +1 -0
- package/components/p-C1c4JVlg.js +112 -0
- package/components/p-C1c4JVlg.js.map +1 -0
- package/components/p-CDRwHAIT.js +105 -0
- package/components/p-CDRwHAIT.js.map +1 -0
- package/components/p-CURs27Ur.js +291 -0
- package/components/p-CURs27Ur.js.map +1 -0
- package/components/p-CZRW1LV_.js +28 -0
- package/components/p-CZRW1LV_.js.map +1 -0
- package/components/p-CjVnGhSO.js +91 -0
- package/components/p-CjVnGhSO.js.map +1 -0
- package/components/p-CkUTS1aU.js +102 -0
- package/components/p-CkUTS1aU.js.map +1 -0
- package/components/p-CkyaV9az.js +269 -0
- package/components/p-CkyaV9az.js.map +1 -0
- package/components/p-D2489VzR.js +2133 -0
- package/components/p-D2489VzR.js.map +1 -0
- package/components/p-D82sb4oJ.js +393 -0
- package/components/p-D82sb4oJ.js.map +1 -0
- package/components/p-D9pW936J.js +164 -0
- package/components/p-D9pW936J.js.map +1 -0
- package/components/p-DNHI4C-W.js +274 -0
- package/components/p-DNHI4C-W.js.map +1 -0
- package/components/p-DR79BVX5.js +149 -0
- package/components/p-DR79BVX5.js.map +1 -0
- package/components/p-DtxwXYGb.js +282 -0
- package/components/p-DtxwXYGb.js.map +1 -0
- package/components/p-U2Q0vF-d.js +96 -0
- package/components/p-U2Q0vF-d.js.map +1 -0
- package/components/p-laE-pGH7.js +163 -0
- package/components/p-laE-pGH7.js.map +1 -0
- package/components/qds-action-item.d.ts +11 -0
- package/components/qds-action-item.js +183 -0
- package/components/qds-action-item.js.map +1 -0
- package/components/qds-avatar-media.d.ts +11 -0
- package/components/qds-avatar-media.js +14 -0
- package/components/qds-avatar-media.js.map +1 -0
- package/components/qds-badge-counter.d.ts +11 -0
- package/components/qds-badge-counter.js +14 -0
- package/components/qds-badge-counter.js.map +1 -0
- package/components/qds-badge-indicator.d.ts +11 -0
- package/components/qds-badge-indicator.js +14 -0
- package/components/qds-badge-indicator.js.map +1 -0
- package/components/qds-breadcrumb-item.d.ts +11 -0
- package/components/qds-breadcrumb-item.js +169 -0
- package/components/qds-breadcrumb-item.js.map +1 -0
- package/components/qds-button.d.ts +2 -2
- package/components/qds-button.js +457 -129
- package/components/qds-button.js.map +1 -1
- package/components/qds-checkbox.d.ts +2 -2
- package/components/qds-checkbox.js +4 -146
- package/components/qds-checkbox.js.map +1 -1
- package/components/qds-chip.d.ts +11 -0
- package/components/qds-chip.js +304 -0
- package/components/qds-chip.js.map +1 -0
- package/components/qds-dialog.d.ts +2 -2
- package/components/qds-dialog.js +179 -93
- package/components/qds-dialog.js.map +1 -1
- package/components/qds-divider.d.ts +2 -2
- package/components/qds-divider.js +4 -39
- package/components/qds-divider.js.map +1 -1
- package/components/qds-dropdown.d.ts +2 -2
- package/components/qds-dropdown.js +4 -249
- package/components/qds-dropdown.js.map +1 -1
- package/components/qds-form-message.d.ts +2 -2
- package/components/qds-form-message.js +100 -50
- package/components/qds-form-message.js.map +1 -1
- package/components/qds-icon-button.d.ts +11 -0
- package/components/qds-icon-button.js +14 -0
- package/components/qds-icon-button.js.map +1 -0
- 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.d.ts +2 -2
- package/components/qds-icon.js +4 -3
- package/components/qds-inline-link.d.ts +2 -2
- package/components/qds-inline-link.js +171 -74
- package/components/qds-inline-link.js.map +1 -1
- package/components/qds-input.d.ts +2 -2
- package/components/qds-input.js +575 -230
- package/components/qds-input.js.map +1 -1
- package/components/qds-label.d.ts +2 -2
- package/components/qds-label.js +4 -3
- package/components/qds-list-item.d.ts +11 -0
- package/components/qds-list-item.js +395 -0
- package/components/qds-list-item.js.map +1 -0
- package/components/qds-loader.d.ts +11 -0
- package/components/qds-loader.js +152 -0
- package/components/qds-loader.js.map +1 -0
- package/components/qds-menu-item.d.ts +11 -0
- package/components/qds-menu-item.js +204 -0
- package/components/qds-menu-item.js.map +1 -0
- package/components/qds-mini-button.d.ts +11 -0
- package/components/qds-mini-button.js +14 -0
- package/components/qds-mini-button.js.map +1 -0
- package/components/qds-progress-bar.d.ts +11 -0
- package/components/qds-progress-bar.js +155 -0
- package/components/qds-progress-bar.js.map +1 -0
- package/components/qds-radio.d.ts +2 -2
- package/components/qds-radio.js +4 -99
- package/components/qds-radio.js.map +1 -1
- package/components/qds-select.d.ts +11 -0
- package/components/qds-select.js +381 -0
- package/components/qds-select.js.map +1 -0
- package/components/qds-standalone-link.d.ts +11 -0
- package/components/qds-standalone-link.js +208 -0
- package/components/qds-standalone-link.js.map +1 -0
- package/components/qds-switch.d.ts +2 -2
- package/components/qds-switch.js +257 -105
- package/components/qds-switch.js.map +1 -1
- package/components/qds-tab.d.ts +11 -0
- package/components/qds-tab.js +339 -0
- package/components/qds-tab.js.map +1 -0
- package/components/qds-tabbar.d.ts +11 -0
- package/components/qds-tabbar.js +410 -0
- package/components/qds-tabbar.js.map +1 -0
- package/components/qds-table-cell.d.ts +11 -0
- package/components/qds-table-cell.js +81 -0
- package/components/qds-table-cell.js.map +1 -0
- package/components/qds-table-head-cell.d.ts +11 -0
- package/components/qds-table-head-cell.js +87 -0
- package/components/qds-table-head-cell.js.map +1 -0
- package/components/qds-table-row.d.ts +11 -0
- package/components/qds-table-row.js +48 -0
- package/components/qds-table-row.js.map +1 -0
- package/components/qds-table.d.ts +11 -0
- package/components/qds-table.js +48 -0
- package/components/qds-table.js.map +1 -0
- package/components/qds-tag.d.ts +11 -0
- package/components/qds-tag.js +14 -0
- package/components/qds-tag.js.map +1 -0
- package/components/qds-textarea.d.ts +2 -2
- package/components/qds-textarea.js +352 -193
- package/components/qds-textarea.js.map +1 -1
- package/components/qds-title.d.ts +2 -2
- package/components/qds-title.js +4 -84
- package/components/qds-title.js.map +1 -1
- package/components/qds-tooltip.d.ts +2 -2
- package/components/qds-tooltip.js +4 -315
- package/components/qds-tooltip.js.map +1 -1
- package/dist/cjs/app-globals-CLoao1by.js +13 -0
- package/dist/cjs/app-globals-CLoao1by.js.map +1 -0
- package/dist/cjs/controls-DKGeNyr5.js +32 -0
- package/dist/cjs/controls-DKGeNyr5.js.map +1 -0
- package/dist/cjs/{floating-ui.dom.esm-7f1cac3e.js → floating-ui.dom-Bvzubd50.js} +557 -345
- package/dist/cjs/floating-ui.dom-Bvzubd50.js.map +1 -0
- package/dist/cjs/helpers-Qs3cpKiI.js +308 -0
- package/dist/cjs/helpers-Qs3cpKiI.js.map +1 -0
- package/dist/cjs/index-DIY7gpXM.js +2376 -0
- package/dist/cjs/index-DIY7gpXM.js.map +1 -0
- package/dist/cjs/index.cjs.js +40 -31
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/library-CeKRI2f2.js +142 -0
- package/dist/cjs/library-CeKRI2f2.js.map +1 -0
- package/dist/cjs/loader.cjs.js +9 -10
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/qds-action-item.cjs.entry.js +145 -0
- package/dist/cjs/qds-action-item.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-avatar-media.qds-checkbox.qds-radio.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-avatar-media_3.cjs.entry.js +399 -0
- package/dist/cjs/qds-badge-counter.qds-badge-indicator.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-badge-counter_2.cjs.entry.js +146 -0
- package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +129 -0
- package/dist/cjs/qds-breadcrumb-item.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-button.cjs.entry.js +385 -93
- package/dist/cjs/qds-button.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-chip.cjs.entry.js +252 -0
- package/dist/cjs/qds-chip.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-dialog.cjs.entry.js +124 -77
- package/dist/cjs/qds-dialog.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-divider.qds-icon-button.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-divider_2.cjs.entry.js +280 -0
- package/dist/cjs/qds-dropdown.cjs.entry.js +373 -209
- package/dist/cjs/qds-dropdown.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-form-message.cjs.entry.js +70 -27
- package/dist/cjs/qds-form-message.entry.cjs.js.map +1 -0
- 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 +112 -93
- package/dist/cjs/qds-icon.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-inline-link.cjs.entry.js +137 -49
- package/dist/cjs/qds-inline-link.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-input.cjs.entry.js +499 -188
- package/dist/cjs/qds-input.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-label.cjs.entry.js +118 -27
- package/dist/cjs/qds-label.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-list-item.cjs.entry.js +290 -0
- package/dist/cjs/qds-list-item.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-loader.cjs.entry.js +126 -0
- package/dist/cjs/qds-loader.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-menu-item.cjs.entry.js +158 -0
- package/dist/cjs/qds-menu-item.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-mini-button.cjs.entry.js +132 -0
- package/dist/cjs/qds-mini-button.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-progress-bar.cjs.entry.js +131 -0
- package/dist/cjs/qds-progress-bar.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-select.cjs.entry.js +335 -0
- package/dist/cjs/qds-select.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-standalone-link.cjs.entry.js +169 -0
- package/dist/cjs/qds-standalone-link.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-switch.cjs.entry.js +221 -67
- package/dist/cjs/qds-switch.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-tab.cjs.entry.js +265 -0
- package/dist/cjs/qds-tab.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-tabbar.cjs.entry.js +344 -0
- package/dist/cjs/qds-tabbar.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-table-cell.cjs.entry.js +61 -0
- package/dist/cjs/qds-table-cell.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-table-head-cell.cjs.entry.js +65 -0
- package/dist/cjs/qds-table-head-cell.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-table-row.cjs.entry.js +34 -0
- package/dist/cjs/qds-table-row.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-table.cjs.entry.js +34 -0
- package/dist/cjs/qds-table.entry.cjs.js.map +1 -0
- 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 +303 -156
- package/dist/cjs/qds-textarea.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-title.cjs.entry.js +61 -52
- package/dist/cjs/qds-title.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-tooltip.cjs.entry.js +334 -263
- package/dist/cjs/qds-tooltip.entry.cjs.js.map +1 -0
- package/dist/cjs/qds.cjs.js +18 -17
- package/dist/cjs/qds.cjs.js.map +1 -1
- package/dist/custom-elements.json +12148 -2304
- package/dist/docs.d.ts +344 -240
- package/dist/docs.json +13199 -3351
- package/dist/esm/app-globals-WylVyaRG.js +11 -0
- package/dist/esm/app-globals-WylVyaRG.js.map +1 -0
- package/dist/esm/controls-CZRW1LV_.js +28 -0
- package/dist/esm/controls-CZRW1LV_.js.map +1 -0
- package/dist/esm/{floating-ui.dom.esm-c2f3e549.js → floating-ui.dom-Bv2vPjgL.js} +557 -345
- package/dist/esm/floating-ui.dom-Bv2vPjgL.js.map +1 -0
- package/dist/esm/helpers-eFD8hV6J.js +291 -0
- package/dist/esm/helpers-eFD8hV6J.js.map +1 -0
- package/dist/esm/index-Hg1Liloy.js +2364 -0
- package/dist/esm/index-Hg1Liloy.js.map +1 -0
- package/dist/esm/index.js +40 -30
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/library-CBfntPWH.js +138 -0
- package/dist/esm/library-CBfntPWH.js.map +1 -0
- package/dist/esm/loader.js +10 -9
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/qds-action-item.entry.js +143 -0
- package/dist/esm/qds-action-item.entry.js.map +1 -0
- package/dist/esm/qds-avatar-media.qds-checkbox.qds-radio.entry.js.map +1 -0
- package/dist/esm/qds-avatar-media_3.entry.js +395 -0
- package/dist/esm/qds-badge-counter.qds-badge-indicator.entry.js.map +1 -0
- package/dist/esm/qds-badge-counter_2.entry.js +143 -0
- package/dist/esm/qds-breadcrumb-item.entry.js +127 -0
- package/dist/esm/qds-breadcrumb-item.entry.js.map +1 -0
- package/dist/esm/qds-button.entry.js +385 -91
- package/dist/esm/qds-button.entry.js.map +1 -1
- package/dist/esm/qds-chip.entry.js +250 -0
- package/dist/esm/qds-chip.entry.js.map +1 -0
- package/dist/esm/qds-dialog.entry.js +124 -75
- package/dist/esm/qds-dialog.entry.js.map +1 -1
- package/dist/esm/qds-divider.qds-icon-button.entry.js.map +1 -0
- package/dist/esm/qds-divider_2.entry.js +277 -0
- package/dist/esm/qds-dropdown.entry.js +373 -207
- package/dist/esm/qds-dropdown.entry.js.map +1 -1
- package/dist/esm/qds-form-message.entry.js +70 -25
- 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 +112 -91
- package/dist/esm/qds-icon.entry.js.map +1 -1
- package/dist/esm/qds-inline-link.entry.js +137 -47
- package/dist/esm/qds-inline-link.entry.js.map +1 -1
- package/dist/esm/qds-input.entry.js +499 -186
- package/dist/esm/qds-input.entry.js.map +1 -1
- package/dist/esm/qds-label.entry.js +118 -25
- package/dist/esm/qds-label.entry.js.map +1 -1
- package/dist/esm/qds-list-item.entry.js +288 -0
- package/dist/esm/qds-list-item.entry.js.map +1 -0
- package/dist/esm/qds-loader.entry.js +124 -0
- package/dist/esm/qds-loader.entry.js.map +1 -0
- package/dist/esm/qds-menu-item.entry.js +156 -0
- package/dist/esm/qds-menu-item.entry.js.map +1 -0
- package/dist/esm/qds-mini-button.entry.js +130 -0
- package/dist/esm/qds-mini-button.entry.js.map +1 -0
- package/dist/esm/qds-progress-bar.entry.js +129 -0
- package/dist/esm/qds-progress-bar.entry.js.map +1 -0
- package/dist/esm/qds-select.entry.js +333 -0
- package/dist/esm/qds-select.entry.js.map +1 -0
- package/dist/esm/qds-standalone-link.entry.js +167 -0
- package/dist/esm/qds-standalone-link.entry.js.map +1 -0
- package/dist/esm/qds-switch.entry.js +221 -65
- package/dist/esm/qds-switch.entry.js.map +1 -1
- package/dist/esm/qds-tab.entry.js +263 -0
- package/dist/esm/qds-tab.entry.js.map +1 -0
- package/dist/esm/qds-tabbar.entry.js +342 -0
- package/dist/esm/qds-tabbar.entry.js.map +1 -0
- package/dist/esm/qds-table-cell.entry.js +59 -0
- package/dist/esm/qds-table-cell.entry.js.map +1 -0
- package/dist/esm/qds-table-head-cell.entry.js +63 -0
- package/dist/esm/qds-table-head-cell.entry.js.map +1 -0
- package/dist/esm/qds-table-row.entry.js +32 -0
- package/dist/esm/qds-table-row.entry.js.map +1 -0
- package/dist/esm/qds-table.entry.js +32 -0
- package/dist/esm/qds-table.entry.js.map +1 -0
- 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 +303 -154
- package/dist/esm/qds-textarea.entry.js.map +1 -1
- package/dist/esm/qds-title.entry.js +61 -50
- package/dist/esm/qds-title.entry.js.map +1 -1
- package/dist/esm/qds-tooltip.entry.js +334 -261
- package/dist/esm/qds-tooltip.entry.js.map +1 -1
- package/dist/esm/qds.js +18 -16
- package/dist/esm/qds.js.map +1 -1
- package/dist/types/components/action-item/action-item.d.ts +67 -0
- package/dist/types/components/avatar-media/avatar-media.d.ts +39 -0
- package/dist/types/components/badge-counter/badge-counter.d.ts +40 -0
- package/dist/types/components/badge-indicator/badge-indicator.d.ts +36 -0
- package/dist/types/components/breadcrumb-item/breadcrumb-item.d.ts +178 -0
- package/dist/types/components/button/button.d.ts +282 -198
- package/dist/types/components/checkbox/checkbox.d.ts +137 -124
- package/dist/types/components/chip/chip.d.ts +109 -0
- package/dist/types/components/controls.d.ts +4 -1
- package/dist/types/components/dialog/dialog.d.ts +32 -41
- package/dist/types/components/divider/divider.d.ts +14 -9
- package/dist/types/components/dropdown/dropdown.d.ts +116 -125
- package/dist/types/components/form-message/form-message.d.ts +33 -25
- package/dist/types/components/icon/icon.d.ts +24 -24
- package/dist/types/components/icon/library.d.ts +3 -3
- package/dist/types/components/icon/request.d.ts +5 -9
- package/dist/types/components/icon-button/icon-button.d.ts +121 -0
- package/dist/types/components/icon-tab/icon-tab.d.ts +110 -0
- package/dist/types/components/inline-link/inline-link.d.ts +209 -191
- package/dist/types/components/input/input.d.ts +441 -368
- package/dist/types/components/label/label.d.ts +37 -24
- package/dist/types/components/list-item/list-item.d.ts +121 -0
- package/dist/types/components/loader/loader.d.ts +32 -0
- package/dist/types/components/menu-item/menu-item.d.ts +71 -0
- package/dist/types/components/mini-button/mini-button.d.ts +82 -0
- package/dist/types/components/progress-bar/progress-bar.d.ts +60 -0
- package/dist/types/components/radio/radio.d.ts +90 -95
- package/dist/types/components/select/select.d.ts +209 -0
- package/dist/types/components/shared.d.ts +6 -0
- package/dist/types/components/standalone-link/standalone-link.d.ts +234 -0
- package/dist/types/components/switch/switch.d.ts +122 -107
- package/dist/types/components/tab/tab.d.ts +155 -0
- package/dist/types/components/tabbar/tabbar.d.ts +56 -0
- package/dist/types/components/table/table.d.ts +14 -0
- package/dist/types/components/table-cell/table-cell.d.ts +33 -0
- package/dist/types/components/table-head-cell/table-head-cell.d.ts +50 -0
- package/dist/types/components/table-row/table-row.d.ts +14 -0
- package/dist/types/components/tag/tag.d.ts +55 -0
- package/dist/types/components/textarea/textarea.d.ts +295 -300
- package/dist/types/components/title/title.d.ts +39 -32
- package/dist/types/components/tooltip/tooltip.d.ts +111 -136
- package/dist/types/components.d.ts +4419 -957
- package/dist/types/helpers.d.ts +38 -19
- package/dist/types/index.d.ts +2 -1
- package/dist/types/interface-overrides.d.ts +215 -0
- package/dist/types/qds-test.d.ts +22 -11
- package/dist/types/stencil-public-runtime.d.ts +109 -17
- package/dist/types/utils.d.ts +11 -4
- package/dist/vscode.html-custom-data.json +2378 -439
- package/hydrate/index.d.ts +73 -18
- package/hydrate/index.js +28066 -9253
- package/hydrate/index.mjs +28956 -0
- package/hydrate/package.json +7 -1
- package/loader/cdn.js +3 -4
- package/loader/index.cjs.js +3 -4
- package/loader/index.d.ts +4 -1
- package/loader/index.es2017.js +3 -4
- package/loader/index.js +3 -4
- package/package.json +23 -180
- package/styles/core.css +147 -19
- package/components/floating-ui.dom.esm.js.map +0 -1
- package/components/helpers.js +0 -175
- package/components/helpers.js.map +0 -1
- package/components/icon.js +0 -185
- package/components/icon.js.map +0 -1
- package/components/label.js +0 -55
- package/components/label.js.map +0 -1
- package/dist/cjs/floating-ui.dom.esm-7f1cac3e.js.map +0 -1
- package/dist/cjs/helpers-452256e8.js +0 -185
- package/dist/cjs/helpers-452256e8.js.map +0 -1
- package/dist/cjs/index-d181f952.js +0 -2039
- package/dist/cjs/index-d181f952.js.map +0 -1
- package/dist/cjs/library-ad8d9466.js +0 -72
- package/dist/cjs/library-ad8d9466.js.map +0 -1
- package/dist/cjs/qds-button.cjs.entry.js.map +0 -1
- package/dist/cjs/qds-checkbox.cjs.entry.js +0 -116
- package/dist/cjs/qds-checkbox.cjs.entry.js.map +0 -1
- package/dist/cjs/qds-dialog.cjs.entry.js.map +0 -1
- package/dist/cjs/qds-divider.cjs.entry.js +0 -33
- package/dist/cjs/qds-divider.cjs.entry.js.map +0 -1
- package/dist/cjs/qds-dropdown.cjs.entry.js.map +0 -1
- package/dist/cjs/qds-form-message.cjs.entry.js.map +0 -1
- package/dist/cjs/qds-icon.cjs.entry.js.map +0 -1
- package/dist/cjs/qds-inline-link.cjs.entry.js.map +0 -1
- package/dist/cjs/qds-input.cjs.entry.js.map +0 -1
- package/dist/cjs/qds-label.cjs.entry.js.map +0 -1
- package/dist/cjs/qds-radio.cjs.entry.js +0 -74
- package/dist/cjs/qds-radio.cjs.entry.js.map +0 -1
- package/dist/cjs/qds-switch.cjs.entry.js.map +0 -1
- package/dist/cjs/qds-textarea.cjs.entry.js.map +0 -1
- package/dist/cjs/qds-title.cjs.entry.js.map +0 -1
- package/dist/cjs/qds-tooltip.cjs.entry.js.map +0 -1
- package/dist/esm/floating-ui.dom.esm-c2f3e549.js.map +0 -1
- package/dist/esm/helpers-76b84f45.js +0 -175
- package/dist/esm/helpers-76b84f45.js.map +0 -1
- package/dist/esm/index-d7183092.js +0 -2009
- package/dist/esm/index-d7183092.js.map +0 -1
- package/dist/esm/library-f36d7d09.js +0 -68
- package/dist/esm/library-f36d7d09.js.map +0 -1
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/qds-checkbox.entry.js +0 -112
- package/dist/esm/qds-checkbox.entry.js.map +0 -1
- package/dist/esm/qds-divider.entry.js +0 -29
- package/dist/esm/qds-divider.entry.js.map +0 -1
- package/dist/esm/qds-radio.entry.js +0 -70
- package/dist/esm/qds-radio.entry.js.map +0 -1
- package/dist/types/components/create-story.d.ts +0 -5
- package/loader/package.json +0 -11
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* SPDX-FileCopyrightText: © 2026 Schneider Electric
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-Hg1Liloy.js';
|
|
7
|
+
import { i as invariant, p as pickFocusEventAttributes, e as pickInputEventAttributes, c as inheritAriaAttributes } from './helpers-eFD8hV6J.js';
|
|
8
|
+
import { V as VALID_STATE, C as CUSTOM_ERROR_FLAGS, N as NO_ERROR_FLAGS } from './controls-CZRW1LV_.js';
|
|
9
|
+
|
|
10
|
+
const selectCss = ":host([hidden]){display:none!important}:host{display:inline-block}slot{display:none}.qds-container{box-sizing:border-box;display:grid;grid-template-areas:\"j\"}.qds-container,.qds-select{width:inherit}.qds-icon,.qds-select{color:var(--qds-theme-form-input-text-placeholder);grid-area:j}.qds-icon{place-self:center end;pointer-events:none}.qds-select{-webkit-appearance:none;appearance:none;background-color:var(--qds-theme-form-input-background-default);border-color:var(--qds-theme-form-input-border-default);border-radius:var(\n --qds-control-border-radius-top-left,var(--qds-form-input-border-radius)\n ) var(\n --qds-control-border-radius-top-right,var(--qds-form-input-border-radius)\n ) var(\n --qds-control-border-radius-bottom-right,var(--qds-form-input-border-radius)\n ) var(\n --qds-control-border-radius-bottom-left,var(--qds-form-input-border-radius)\n );border-style:solid;border-width:var(--qds-form-input-border-width-default) var(\n --qds-control-border-width-inline-end,var(--qds-form-input-border-width-default)\n ) var(\n --qds-control-border-width-block-end,var(--qds-form-input-border-width-default)\n ) var(--qds-form-input-border-width-default);margin:0;outline:0;padding-block:0;text-overflow:ellipsis}.qds-select:enabled:hover{background-color:var(--qds-theme-form-input-background-hover);border-color:var(--qds-theme-form-input-border-hover)}.qds-select:enabled:active{background-color:var(--qds-theme-form-input-background-active);color:var(--qds-theme-form-input-text-active)}.qds-select:not(:focus):user-invalid{border-color:var(--qds-theme-feedback-result-failure)}.qds-select[data-status]{border-width:var(--qds-form-input-border-width-status) var(\n --qds-control-border-width-inline-end,var(--qds-form-input-border-width-status)\n ) var(\n --qds-control-border-width-block-end,var(--qds-form-input-border-width-status)\n ) var(--qds-form-input-border-width-status)}.qds-select[data-status=success]{border-color:var(--qds-theme-form-input-border-success)}.qds-select[data-status=warning]{border-color:var(--qds-theme-form-input-border-warning)}.qds-select :not(:focus):user-invalid,.qds-select[data-status=error]{border-color:var(--qds-theme-form-input-border-error)}.qds-select:disabled,.qds-select:disabled+.qds-icon{opacity:var(--qds-theme-disabled)}:is(::slotted(optgroup),::slotted(optgroup:not(:disabled)>option),::slotted(option)):disabled{opacity:var(--qds-theme-disabled)}::slotted(optgroup){font:var(--qds-accessory-section-title)}::slotted(optgroup>option),::slotted(option){font:var(--qds-list-item-label-main)}.qds-select[data-size=small]{font:var(--qds-form-small-text);padding-inline:var(--qds-form-input-small-padding-start) var(--qds-form-input-small-padding-end)}.qds-select[data-size=small]:not([multiple]){min-height:var(--qds-form-input-small-height);padding-inline-end:calc(var(--qds-control-small-icon-size) + var(--qds-form-input-small-gap-internal) + var(--qds-form-input-small-padding-end))}.qds-icon[data-size=small]{height:var(--qds-control-small-icon-size);margin-inline-end:calc(var(--qds-form-input-small-padding-end) + var(--qds-form-input-border-width-default));width:var(--qds-control-small-icon-size)}.qds-select[data-size=standard]{font:var(--qds-form-standard-text);padding-inline:var(--qds-form-input-standard-padding-start) var(--qds-form-input-standard-padding-end)}.qds-select[data-size=standard]:not([multiple]){min-height:var(--qds-form-input-standard-height);padding-inline-end:calc(var(--qds-control-standard-icon-size) + var(--qds-form-input-standard-gap-internal) + var(--qds-form-input-standard-padding-end))}.qds-icon[data-size=standard]{height:var(--qds-control-standard-icon-size);margin-inline-end:calc(var(--qds-form-input-standard-padding-end) + var(--qds-form-input-border-width-default));width:var(--qds-control-standard-icon-size)}.qds-select[data-size=large]{font:var(--qds-form-large-text);padding-inline:var(--qds-form-input-large-padding-start) var(--qds-form-input-large-padding-end)}.qds-select[data-size=large]:not([multiple]){min-height:var(--qds-form-input-large-height);padding-inline-end:calc(var(--qds-control-large-icon-size) + var(--qds-form-input-large-gap-internal) + var(--qds-form-input-large-padding-end))}.qds-icon[data-size=large]{height:var(--qds-control-large-icon-size);margin-inline-end:calc(var(--qds-form-input-large-padding-end) + var(--qds-form-input-border-width-default));width:var(--qds-control-large-icon-size)}.qds-focus-ring{border-radius:max(1px,var(\n --qds-control-border-radius-top-left,var(--qds-form-input-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-top-right,var(--qds-form-input-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-right,var(--qds-form-input-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-left,var(--qds-form-input-border-radius)\n ));box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);grid-area:j;height:calc(100% + var(--qds-form-input-border-width-default) - var(\n --qds-control-border-width-block-end,\n var(--qds-form-input-border-width-default)\n ));isolation:isolate;outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0;pointer-events:none;visibility:hidden;width:calc(100% + var(--qds-form-input-border-width-default) - var(\n --qds-control-border-width-inline-end,\n var(--qds-form-input-border-width-default)\n ))}.qds-select:focus-visible~.qds-focus-ring{visibility:visible}";
|
|
11
|
+
|
|
12
|
+
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
15
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
16
|
+
if (kind === "a" && !f)
|
|
17
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
18
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
19
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
20
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
21
|
+
};
|
|
22
|
+
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
23
|
+
if (kind === "m")
|
|
24
|
+
throw new TypeError("Private method is not writable");
|
|
25
|
+
if (kind === "a" && !f)
|
|
26
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
27
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
28
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
29
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
30
|
+
};
|
|
31
|
+
var _Select_instances, _Select_inheritedAttributes, _Select_select, _Select_computedDisabled_get, _Select_computedOptions_get, _Select_computedStatus_get, _Select_computedSize_get, _Select_computedType_get, _Select_computedValue_get, _Select_computedSelectedOptions_get, _Select_ref, _Select_onBlur, _Select_onChange, _Select_onFocus, _Select_onInput, _Select_onSlotchange, _Select_defineGetter;
|
|
32
|
+
const throwError = () => {
|
|
33
|
+
invariant(false);
|
|
34
|
+
};
|
|
35
|
+
const EMPTY_OPTIONS_COLLECTION = {
|
|
36
|
+
length: 0,
|
|
37
|
+
selectedIndex: -1,
|
|
38
|
+
add: throwError,
|
|
39
|
+
remove: throwError,
|
|
40
|
+
item: throwError,
|
|
41
|
+
namedItem: throwError,
|
|
42
|
+
[Symbol.iterator]: throwError,
|
|
43
|
+
};
|
|
44
|
+
const Select = class {
|
|
45
|
+
constructor(hostRef) {
|
|
46
|
+
registerInstance(this, hostRef);
|
|
47
|
+
this.blurEmitter = createEvent(this, "qdsBlur", 2);
|
|
48
|
+
this.changeEmitter = createEvent(this, "qdsChange", 6);
|
|
49
|
+
this.focusEmitter = createEvent(this, "qdsFocus", 2);
|
|
50
|
+
this.inputEmitter = createEvent(this, "qdsInput", 6);
|
|
51
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
52
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
56
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
57
|
+
}
|
|
58
|
+
_Select_instances.add(this);
|
|
59
|
+
/**
|
|
60
|
+
* The select's size.
|
|
61
|
+
*
|
|
62
|
+
* > ***NOTE:*** The native [`size` HTML attribute] is not supported. CSS
|
|
63
|
+
* `height` should be used instead if this functionality is needed.
|
|
64
|
+
*
|
|
65
|
+
* [`size` HTML attribute]: https://developer.mozilla.org/docs/Web/HTML/Attributes/size
|
|
66
|
+
*/
|
|
67
|
+
this.size = 'standard';
|
|
68
|
+
/**
|
|
69
|
+
* The [`<form>`][] element to associate the select with (its form owner).
|
|
70
|
+
*
|
|
71
|
+
* The value of this attribute must be the id of a `<form>` in the same
|
|
72
|
+
* document. If this attribute is not set, the `<qds-select>` is associated
|
|
73
|
+
* with its ancestor `<form>` element, if any.
|
|
74
|
+
*
|
|
75
|
+
* This attribute lets you associate `<qds-select>` elements to `<form>`s
|
|
76
|
+
* anywhere in the document, not just inside a `<form>`. It can also override
|
|
77
|
+
* an ancestor `<form>` element.
|
|
78
|
+
*
|
|
79
|
+
* [`<form>`]: https://developer.mozilla.org/docs/Web/HTML/Element/form
|
|
80
|
+
*
|
|
81
|
+
* @readonly
|
|
82
|
+
* @webnative
|
|
83
|
+
*/
|
|
84
|
+
// eslint-disable-next-line unicorn/no-null
|
|
85
|
+
this.form = null;
|
|
86
|
+
/**
|
|
87
|
+
* Returns the number of elements in the [`<option>`s collection][].
|
|
88
|
+
*
|
|
89
|
+
* [`<option>`s collection]: https://developer.mozilla.org/docs/Web/API/HTMLOptionsCollection
|
|
90
|
+
*
|
|
91
|
+
* @readonly
|
|
92
|
+
* @webnative
|
|
93
|
+
*/
|
|
94
|
+
this.length = 0;
|
|
95
|
+
/**
|
|
96
|
+
* An [`HTMLOptionsCollection`][] of the [`<option>`][] elements contained by
|
|
97
|
+
* the `<qds-select>` element.
|
|
98
|
+
*
|
|
99
|
+
* [`HTMLOptionsCollection`]: https://developer.mozilla.org/docs/Web/API/HTMLOptionsCollection
|
|
100
|
+
* [`<option>`]: https://developer.mozilla.org/docs/Web/HTML/Element/option
|
|
101
|
+
*
|
|
102
|
+
* @readonly
|
|
103
|
+
* @webnative
|
|
104
|
+
*/
|
|
105
|
+
this.options = EMPTY_OPTIONS_COLLECTION;
|
|
106
|
+
/**
|
|
107
|
+
* The index of the first or last selected [`<option>`][] element, depending
|
|
108
|
+
* on the value of `multiple`. The value `-1` indicates that no element is
|
|
109
|
+
* selected.
|
|
110
|
+
*
|
|
111
|
+
* [`<option>`]: https://developer.mozilla.org/docs/Web/HTML/Element/option
|
|
112
|
+
*
|
|
113
|
+
* @webnative
|
|
114
|
+
*/
|
|
115
|
+
this.selectedIndex = -1;
|
|
116
|
+
/**
|
|
117
|
+
* Collection of the [`<option>`][] elements contained within the
|
|
118
|
+
* `<qds-select>` element that are currently selected.
|
|
119
|
+
*
|
|
120
|
+
* [`<option>`]: https://developer.mozilla.org/docs/Web/HTML/Element/option
|
|
121
|
+
*
|
|
122
|
+
* @readonly
|
|
123
|
+
* @webnative
|
|
124
|
+
*/
|
|
125
|
+
this.selectedOptions = EMPTY_OPTIONS_COLLECTION;
|
|
126
|
+
/**
|
|
127
|
+
* Returns `select-multiple` if the `multiple` attribute is true;
|
|
128
|
+
* `select-one` otherwise.
|
|
129
|
+
*
|
|
130
|
+
* @readonly
|
|
131
|
+
* @webnative
|
|
132
|
+
*/
|
|
133
|
+
this.type = 'select-one';
|
|
134
|
+
/**
|
|
135
|
+
* The error message that would be shown to the user if the `<qds-select>`
|
|
136
|
+
* was to be checked for validity.
|
|
137
|
+
*
|
|
138
|
+
* @readonly
|
|
139
|
+
* @webnative
|
|
140
|
+
*/
|
|
141
|
+
this.validationMessage = '';
|
|
142
|
+
/**
|
|
143
|
+
* The [`ValidityState`][] object for this `<qds-select>`.
|
|
144
|
+
*
|
|
145
|
+
* [`ValidityState`]: https://developer.mozilla.org/docs/Web/API/ValidityState
|
|
146
|
+
*
|
|
147
|
+
* @readonly
|
|
148
|
+
* @webnative
|
|
149
|
+
*/
|
|
150
|
+
this.validity = VALID_STATE;
|
|
151
|
+
/**
|
|
152
|
+
* The `value` property of the first selected [`<option>`][] element, or the
|
|
153
|
+
* empty string if no options are selected.
|
|
154
|
+
*
|
|
155
|
+
* [`<option>`]: https://developer.mozilla.org/docs/Web/HTML/Element/option
|
|
156
|
+
*
|
|
157
|
+
* @webnative
|
|
158
|
+
*/
|
|
159
|
+
this.value = '';
|
|
160
|
+
/**
|
|
161
|
+
* True if `<qds-select>` will be validated when the form is submitted;
|
|
162
|
+
* false otherwise.
|
|
163
|
+
*
|
|
164
|
+
* @readonly
|
|
165
|
+
* @webnative
|
|
166
|
+
*/
|
|
167
|
+
this.willValidate = false;
|
|
168
|
+
_Select_inheritedAttributes.set(this, {});
|
|
169
|
+
_Select_select.set(this, void 0);
|
|
170
|
+
this.checkValidity = () => this.internals.checkValidity();
|
|
171
|
+
this.reportValidity = () => this.internals.reportValidity();
|
|
172
|
+
this.setCustomValidity = (error) => {
|
|
173
|
+
invariant(__classPrivateFieldGet(this, _Select_select, "f"));
|
|
174
|
+
__classPrivateFieldGet(this, _Select_select, "f").setCustomValidity(error);
|
|
175
|
+
if (error)
|
|
176
|
+
this.internals.setValidity(CUSTOM_ERROR_FLAGS, error, __classPrivateFieldGet(this, _Select_select, "f"));
|
|
177
|
+
else
|
|
178
|
+
this.internals.setValidity(NO_ERROR_FLAGS);
|
|
179
|
+
};
|
|
180
|
+
this.addItem = (element, before) => {
|
|
181
|
+
invariant(__classPrivateFieldGet(this, _Select_select, "f"));
|
|
182
|
+
__classPrivateFieldGet(this, _Select_select, "f").add(element, before);
|
|
183
|
+
};
|
|
184
|
+
this.removeItem = (index) => {
|
|
185
|
+
invariant(__classPrivateFieldGet(this, _Select_select, "f"));
|
|
186
|
+
__classPrivateFieldGet(this, _Select_select, "f").remove(index);
|
|
187
|
+
};
|
|
188
|
+
this.item = (index) => {
|
|
189
|
+
invariant(__classPrivateFieldGet(this, _Select_select, "f"));
|
|
190
|
+
return __classPrivateFieldGet(this, _Select_select, "f").item(index);
|
|
191
|
+
};
|
|
192
|
+
this.namedItem = (name) => {
|
|
193
|
+
invariant(__classPrivateFieldGet(this, _Select_select, "f"));
|
|
194
|
+
return __classPrivateFieldGet(this, _Select_select, "f").namedItem(name);
|
|
195
|
+
};
|
|
196
|
+
_Select_ref.set(this, (select) => {
|
|
197
|
+
__classPrivateFieldSet(this, _Select_select, select, "f");
|
|
198
|
+
});
|
|
199
|
+
_Select_onBlur.set(this, (event) => {
|
|
200
|
+
this.blurEmitter.emit(pickFocusEventAttributes(event));
|
|
201
|
+
});
|
|
202
|
+
_Select_onChange.set(this, () => {
|
|
203
|
+
this.changeEmitter.emit();
|
|
204
|
+
});
|
|
205
|
+
_Select_onFocus.set(this, (event) => {
|
|
206
|
+
this.focusEmitter.emit(pickFocusEventAttributes(event));
|
|
207
|
+
});
|
|
208
|
+
_Select_onInput.set(this, (event) => {
|
|
209
|
+
invariant(__classPrivateFieldGet(this, _Select_select, "f"));
|
|
210
|
+
this.value = __classPrivateFieldGet(this, _Select_select, "f").value;
|
|
211
|
+
this.inputEmitter.emit(pickInputEventAttributes(event));
|
|
212
|
+
});
|
|
213
|
+
_Select_onSlotchange.set(this, (event) => {
|
|
214
|
+
invariant(__classPrivateFieldGet(this, _Select_select, "f"));
|
|
215
|
+
const { currentTarget } = event;
|
|
216
|
+
invariant(currentTarget instanceof HTMLSlotElement);
|
|
217
|
+
__classPrivateFieldGet(this, _Select_select, "f").replaceChildren(...currentTarget.assignedNodes().map((node) => node.cloneNode(true)));
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
onClick(event) {
|
|
221
|
+
if (__classPrivateFieldGet(this, _Select_instances, "a", _Select_computedDisabled_get))
|
|
222
|
+
event.stopImmediatePropagation();
|
|
223
|
+
}
|
|
224
|
+
disabledChanged() {
|
|
225
|
+
if (__classPrivateFieldGet(this, _Select_instances, "a", _Select_computedDisabled_get))
|
|
226
|
+
// eslint-disable-next-line unicorn/no-null
|
|
227
|
+
this.internals.setFormValue(null);
|
|
228
|
+
else
|
|
229
|
+
this.internals.setFormValue(__classPrivateFieldGet(this, _Select_instances, "a", _Select_computedValue_get));
|
|
230
|
+
}
|
|
231
|
+
selectedIndexChanged() {
|
|
232
|
+
invariant(__classPrivateFieldGet(this, _Select_select, "f"));
|
|
233
|
+
__classPrivateFieldGet(this, _Select_select, "f").selectedIndex = this.selectedIndex;
|
|
234
|
+
}
|
|
235
|
+
tabindexChanged(newValue) {
|
|
236
|
+
const parsedValue = Number.parseInt(newValue, 10);
|
|
237
|
+
this.tabIndex =
|
|
238
|
+
parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue;
|
|
239
|
+
}
|
|
240
|
+
validationChanged() {
|
|
241
|
+
invariant(__classPrivateFieldGet(this, _Select_select, "f"));
|
|
242
|
+
__classPrivateFieldGet(this, _Select_select, "f").value = __classPrivateFieldGet(this, _Select_instances, "a", _Select_computedValue_get);
|
|
243
|
+
__classPrivateFieldGet(this, _Select_select, "f").required = this.required ?? false;
|
|
244
|
+
const { valid } = __classPrivateFieldGet(this, _Select_select, "f").validity;
|
|
245
|
+
if (valid)
|
|
246
|
+
this.internals.setValidity(NO_ERROR_FLAGS, undefined, __classPrivateFieldGet(this, _Select_select, "f"));
|
|
247
|
+
else
|
|
248
|
+
this.internals.setValidity(__classPrivateFieldGet(this, _Select_select, "f").validity, __classPrivateFieldGet(this, _Select_select, "f").validationMessage, __classPrivateFieldGet(this, _Select_select, "f"));
|
|
249
|
+
}
|
|
250
|
+
statusChanged() {
|
|
251
|
+
this.internals.ariaInvalid = (__classPrivateFieldGet(this, _Select_instances, "a", _Select_computedStatus_get) === 'error').toString();
|
|
252
|
+
}
|
|
253
|
+
componentWillLoad() {
|
|
254
|
+
__classPrivateFieldGet(this, _Select_instances, "m", _Select_defineGetter).call(this, 'form', () => this.internals.form);
|
|
255
|
+
__classPrivateFieldGet(this, _Select_instances, "m", _Select_defineGetter).call(this, 'willValidate', () => this.internals.willValidate);
|
|
256
|
+
__classPrivateFieldGet(this, _Select_instances, "m", _Select_defineGetter).call(this, 'validity', () => this.internals.validity);
|
|
257
|
+
__classPrivateFieldGet(this, _Select_instances, "m", _Select_defineGetter).call(this, 'validationMessage', () => this.internals.validationMessage);
|
|
258
|
+
__classPrivateFieldGet(this, _Select_instances, "m", _Select_defineGetter).call(this, 'type', () => __classPrivateFieldGet(this, _Select_instances, "a", _Select_computedType_get));
|
|
259
|
+
__classPrivateFieldGet(this, _Select_instances, "m", _Select_defineGetter).call(this, 'options', () => __classPrivateFieldGet(this, _Select_instances, "a", _Select_computedOptions_get));
|
|
260
|
+
__classPrivateFieldGet(this, _Select_instances, "m", _Select_defineGetter).call(this, 'length', () => __classPrivateFieldGet(this, _Select_instances, "a", _Select_computedOptions_get).length);
|
|
261
|
+
__classPrivateFieldGet(this, _Select_instances, "m", _Select_defineGetter).call(this, 'selectedOptions', () => __classPrivateFieldGet(this, _Select_instances, "a", _Select_computedSelectedOptions_get));
|
|
262
|
+
__classPrivateFieldSet(this, _Select_inheritedAttributes, inheritAriaAttributes(this.host), "f");
|
|
263
|
+
this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0');
|
|
264
|
+
this.statusChanged();
|
|
265
|
+
}
|
|
266
|
+
componentDidLoad() {
|
|
267
|
+
invariant(__classPrivateFieldGet(this, _Select_select, "f"));
|
|
268
|
+
this.validationChanged();
|
|
269
|
+
this.selectedIndex = __classPrivateFieldGet(this, _Select_select, "f").selectedIndex;
|
|
270
|
+
}
|
|
271
|
+
render() {
|
|
272
|
+
return (h("div", { key: '4e54c80117271921cdf5eeaa8498f91467b514f5', class: {
|
|
273
|
+
'qds-container': true,
|
|
274
|
+
'qds-multiple': this.multiple ?? false,
|
|
275
|
+
}, "data-size": __classPrivateFieldGet(this, _Select_instances, "a", _Select_computedSize_get) }, h("select", { key: '239e13dcdd0dec5f835005d80417b546cb41b181', autoComplete: this.autoComplete,
|
|
276
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
277
|
+
autoFocus: this.host.autofocus, class: "qds-select", "data-size": __classPrivateFieldGet(this, _Select_instances, "a", _Select_computedSize_get), "data-status": __classPrivateFieldGet(this, _Select_instances, "a", _Select_computedStatus_get), disabled: __classPrivateFieldGet(this, _Select_instances, "a", _Select_computedDisabled_get), multiple: this.multiple, name: this.name, onBlur: __classPrivateFieldGet(this, _Select_onBlur, "f"), onChange: __classPrivateFieldGet(this, _Select_onChange, "f"), onFocus: __classPrivateFieldGet(this, _Select_onFocus, "f"), onInput: __classPrivateFieldGet(this, _Select_onInput, "f"), ref: __classPrivateFieldGet(this, _Select_ref, "f"), required: this.required, tabIndex: __classPrivateFieldGet(this, _Select_instances, "a", _Select_computedDisabled_get) ? undefined : this.tabIndex, ...__classPrivateFieldGet(this, _Select_inheritedAttributes, "f") }), this.multiple !== true && (h("qds-icon", { key: '4d3e255a814e9d5ba41e125d33f918d24f446438', "aria-hidden": "true", class: "qds-icon", "data-size": __classPrivateFieldGet(this, _Select_instances, "a", _Select_computedSize_get), library: "core", name: "dropdown" })), h("slot", { key: '1bbdca184b14af7b56ca0f0b484455e310ada1b9', onSlotchange: __classPrivateFieldGet(this, _Select_onSlotchange, "f") }), h("div", { key: 'e79fbfb62d6b4420a009180df83e911b575b321f', class: "qds-focus-ring" })));
|
|
278
|
+
}
|
|
279
|
+
static get delegatesFocus() { return true; }
|
|
280
|
+
static get formAssociated() { return true; }
|
|
281
|
+
get host() { return getElement(this); }
|
|
282
|
+
static get watchers() { return {
|
|
283
|
+
"disabled": ["disabledChanged"],
|
|
284
|
+
"selectedIndex": ["selectedIndexChanged"],
|
|
285
|
+
"tabindex": ["tabindexChanged"],
|
|
286
|
+
"required": ["validationChanged"],
|
|
287
|
+
"value": ["validationChanged"],
|
|
288
|
+
"status": ["statusChanged"]
|
|
289
|
+
}; }
|
|
290
|
+
};
|
|
291
|
+
_Select_inheritedAttributes = new WeakMap(), _Select_select = new WeakMap(), _Select_ref = new WeakMap(), _Select_onBlur = new WeakMap(), _Select_onChange = new WeakMap(), _Select_onFocus = new WeakMap(), _Select_onInput = new WeakMap(), _Select_onSlotchange = new WeakMap(), _Select_instances = new WeakSet(), _Select_computedDisabled_get = function _Select_computedDisabled_get() {
|
|
292
|
+
return ((this.host.matches(':disabled') || (this.disabled ?? false)) &&
|
|
293
|
+
this.host.getAttribute('disabled') !== 'false');
|
|
294
|
+
}, _Select_computedOptions_get = function _Select_computedOptions_get() {
|
|
295
|
+
invariant(__classPrivateFieldGet(this, _Select_select, "f"));
|
|
296
|
+
return __classPrivateFieldGet(this, _Select_select, "f").options;
|
|
297
|
+
}, _Select_computedStatus_get = function _Select_computedStatus_get() {
|
|
298
|
+
switch (this.status) {
|
|
299
|
+
case 'error':
|
|
300
|
+
case 'success':
|
|
301
|
+
case 'warning': {
|
|
302
|
+
return this.status;
|
|
303
|
+
}
|
|
304
|
+
default: {
|
|
305
|
+
return undefined;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}, _Select_computedSize_get = function _Select_computedSize_get() {
|
|
309
|
+
switch (this.size) {
|
|
310
|
+
case 'standard':
|
|
311
|
+
case 'small':
|
|
312
|
+
case 'large': {
|
|
313
|
+
return this.size;
|
|
314
|
+
}
|
|
315
|
+
default: {
|
|
316
|
+
return 'standard';
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}, _Select_computedType_get = function _Select_computedType_get() {
|
|
320
|
+
invariant(__classPrivateFieldGet(this, _Select_select, "f"));
|
|
321
|
+
return __classPrivateFieldGet(this, _Select_select, "f").type;
|
|
322
|
+
}, _Select_computedValue_get = function _Select_computedValue_get() {
|
|
323
|
+
return this.value ?? '';
|
|
324
|
+
}, _Select_computedSelectedOptions_get = function _Select_computedSelectedOptions_get() {
|
|
325
|
+
invariant(__classPrivateFieldGet(this, _Select_select, "f"));
|
|
326
|
+
return __classPrivateFieldGet(this, _Select_select, "f").selectedOptions;
|
|
327
|
+
}, _Select_defineGetter = function _Select_defineGetter(p, get) {
|
|
328
|
+
Object.defineProperty(this.host, p, { enumerable: true, get });
|
|
329
|
+
};
|
|
330
|
+
Select.style = selectCss;
|
|
331
|
+
|
|
332
|
+
export { Select as qds_select };
|
|
333
|
+
//# sourceMappingURL=qds-select.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qds-select.entry.js","sources":["src/components/select/select.css?tag=qds-select&encapsulation=shadow","src/components/select/select.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}\n\nslot {\n display: none;\n}\n\n.qds-container {\n box-sizing: border-box;\n display: grid;\n grid-template-areas: 'select';\n}\n\n.qds-container,\n.qds-select {\n width: inherit;\n}\n\n.qds-icon,\n.qds-select {\n color: var(--qds-theme-form-input-text-placeholder);\n grid-area: select;\n}\n\n.qds-icon {\n place-self: center end;\n pointer-events: none;\n}\n\n.qds-select {\n appearance: none;\n background-color: var(--qds-theme-form-input-background-default);\n border-color: var(--qds-theme-form-input-border-default);\n border-radius: var(\n --qds-control-border-radius-top-left,\n var(--qds-form-input-border-radius)\n )\n var(\n --qds-control-border-radius-top-right,\n var(--qds-form-input-border-radius)\n )\n var(\n --qds-control-border-radius-bottom-right,\n var(--qds-form-input-border-radius)\n )\n var(\n --qds-control-border-radius-bottom-left,\n var(--qds-form-input-border-radius)\n );\n border-style: solid;\n border-width: var(--qds-form-input-border-width-default)\n var(\n --qds-control-border-width-inline-end,\n var(--qds-form-input-border-width-default)\n )\n var(\n --qds-control-border-width-block-end,\n var(--qds-form-input-border-width-default)\n )\n var(--qds-form-input-border-width-default);\n margin: 0;\n outline: 0;\n padding-block: 0;\n text-overflow: ellipsis;\n\n &:enabled:hover {\n background-color: var(--qds-theme-form-input-background-hover);\n border-color: var(--qds-theme-form-input-border-hover);\n }\n\n &:enabled:active {\n background-color: var(--qds-theme-form-input-background-active);\n color: var(--qds-theme-form-input-text-active);\n }\n\n &:not(:focus):user-invalid {\n border-color: var(--qds-theme-feedback-result-failure);\n }\n\n &[data-status] {\n border-width: var(--qds-form-input-border-width-status)\n var(\n --qds-control-border-width-inline-end,\n var(--qds-form-input-border-width-status)\n )\n var(\n --qds-control-border-width-block-end,\n var(--qds-form-input-border-width-status)\n )\n var(--qds-form-input-border-width-status);\n }\n\n &[data-status='success'] {\n border-color: var(--qds-theme-form-input-border-success);\n }\n\n &[data-status='warning'] {\n border-color: var(--qds-theme-form-input-border-warning);\n }\n\n &[data-status='error'],\n :not(:focus):user-invalid {\n border-color: var(--qds-theme-form-input-border-error);\n }\n}\n\n.qds-select:disabled,\n.qds-select:disabled + .qds-icon {\n opacity: var(--qds-theme-disabled);\n}\n\n:is(\n ::slotted(optgroup),\n ::slotted(optgroup:not(:disabled) > option),\n ::slotted(option)\n):disabled {\n opacity: var(--qds-theme-disabled);\n}\n\n::slotted(optgroup) {\n font: var(--qds-accessory-section-title);\n}\n\n::slotted(optgroup > option),\n::slotted(option) {\n font: var(--qds-list-item-label-main);\n}\n\n[data-size='small'] {\n &.qds-select {\n font: var(--qds-form-small-text);\n padding-inline: var(--qds-form-input-small-padding-start)\n var(--qds-form-input-small-padding-end);\n\n &:not([multiple]) {\n min-height: var(--qds-form-input-small-height);\n padding-inline-end: calc(\n var(--qds-control-small-icon-size) +\n var(--qds-form-input-small-gap-internal) +\n var(--qds-form-input-small-padding-end)\n );\n }\n }\n\n &.qds-icon {\n margin-inline-end: calc(\n var(--qds-form-input-small-padding-end) +\n var(--qds-form-input-border-width-default)\n );\n height: var(--qds-control-small-icon-size);\n width: var(--qds-control-small-icon-size);\n }\n}\n\n[data-size='standard'] {\n &.qds-select {\n font: var(--qds-form-standard-text);\n padding-inline: var(--qds-form-input-standard-padding-start)\n var(--qds-form-input-standard-padding-end);\n\n &:not([multiple]) {\n min-height: var(--qds-form-input-standard-height);\n padding-inline-end: calc(\n var(--qds-control-standard-icon-size) +\n var(--qds-form-input-standard-gap-internal) +\n var(--qds-form-input-standard-padding-end)\n );\n }\n }\n\n &.qds-icon {\n margin-inline-end: calc(\n var(--qds-form-input-standard-padding-end) +\n var(--qds-form-input-border-width-default)\n );\n height: var(--qds-control-standard-icon-size);\n width: var(--qds-control-standard-icon-size);\n }\n}\n\n[data-size='large'] {\n &.qds-select {\n font: var(--qds-form-large-text);\n padding-inline: var(--qds-form-input-large-padding-start)\n var(--qds-form-input-large-padding-end);\n\n &:not([multiple]) {\n min-height: var(--qds-form-input-large-height);\n padding-inline-end: calc(\n var(--qds-control-large-icon-size) +\n var(--qds-form-input-large-gap-internal) +\n var(--qds-form-input-large-padding-end)\n );\n }\n }\n\n &.qds-icon {\n margin-inline-end: calc(\n var(--qds-form-input-large-padding-end) +\n var(--qds-form-input-border-width-default)\n );\n height: var(--qds-control-large-icon-size);\n width: var(--qds-control-large-icon-size);\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-form-input-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-top-right,\n var(--qds-form-input-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-bottom-right,\n var(--qds-form-input-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-bottom-left,\n var(--qds-form-input-border-radius)\n )\n );\n grid-area: select;\n isolation: isolate;\n\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 pointer-events: none;\n visibility: hidden;\n width: calc(\n 100% + var(--qds-form-input-border-width-default) -\n var(\n --qds-control-border-width-inline-end,\n var(--qds-form-input-border-width-default)\n )\n );\n height: calc(\n 100% + var(--qds-form-input-border-width-default) -\n var(\n --qds-control-border-width-block-end,\n var(--qds-form-input-border-width-default)\n )\n );\n}\n\n.qds-select:focus-visible ~ .qds-focus-ring {\n visibility: visible;\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 {\n Attributes,\n QdsFocusEventDetail,\n QdsInputEventDetail,\n} from '../../helpers'\nimport {\n inheritAriaAttributes,\n invariant,\n pickFocusEventAttributes,\n pickInputEventAttributes,\n} from '../../helpers'\nimport type { AutoComplete } from '../controls'\nimport { CUSTOM_ERROR_FLAGS, NO_ERROR_FLAGS, VALID_STATE } from '../controls'\nimport type { Size, Status } from '../shared'\n\nexport type SelectType = 'select-multiple' | 'select-one'\nexport type SelectStatus = Exclude<Status, 'info'>\n\nconst throwError = (): never => {\n invariant(false)\n}\nconst EMPTY_OPTIONS_COLLECTION: HTMLSelectElement['options'] = {\n length: 0,\n selectedIndex: -1,\n add: throwError,\n remove: throwError,\n item: throwError,\n namedItem: throwError,\n [Symbol.iterator]: throwError,\n}\n\n/**\n * The `<qds-select>` element represents a control that provides a menu of\n * options.\n *\n * @see https://quartz.se.com/build/components/select\n */\n@Component({\n tag: 'qds-select',\n formAssociated: true,\n shadow: { delegatesFocus: true },\n styleUrl: 'select.css',\n})\nexport class Select implements ComponentInterface {\n /**\n * The select's status.\n */\n @Prop() public readonly status?: SelectStatus\n\n /**\n * The select's size.\n *\n * > ***NOTE:*** The native [`size` HTML attribute] is not supported. CSS\n * `height` should be used instead if this functionality is needed.\n *\n * [`size` HTML attribute]: https://developer.mozilla.org/docs/Web/HTML/Attributes/size\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * Provides a hint for a [user agent's][] autocomplete feature. See\n * [the HTML `autocomplete` attribute][] for a complete list of values and\n * details on how to use `autoComplete`.\n *\n * [user agent's]: https://developer.mozilla.org/docs/Glossary/User_agent\n * [the HTML `autocomplete` attribute]: https://developer.mozilla.org/docs/Web/HTML/Attributes/autocomplete\n *\n * @webnative\n */\n @Prop({ attribute: 'autocomplete' })\n public readonly autoComplete?: AutoComplete\n\n /**\n * Prevents the select 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 select 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-select>` is associated\n * with its ancestor `<form>` element, if any.\n *\n * This attribute lets you associate `<qds-select>` 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 * Returns the number of elements in the [`<option>`s collection][].\n *\n * [`<option>`s collection]: https://developer.mozilla.org/docs/Web/API/HTMLOptionsCollection\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly length: HTMLSelectElement['length'] = 0\n\n /**\n * Indicates that multiple options can be selected in the list. If it is not\n * specified, then only one option can be selected at a time. When `multiple`\n * is specified, most browsers will show a scrolling list box instead of a\n * single line dropdown.\n *\n * @webnative\n */\n @Prop() public multiple?: boolean\n\n /**\n * The name of the select, which is submitted with the form data.\n *\n * @webnative\n */\n @Prop() public readonly name?: string\n\n /**\n * An [`HTMLOptionsCollection`][] of the [`<option>`][] elements contained by\n * the `<qds-select>` element.\n *\n * [`HTMLOptionsCollection`]: https://developer.mozilla.org/docs/Web/API/HTMLOptionsCollection\n * [`<option>`]: https://developer.mozilla.org/docs/Web/HTML/Element/option\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly options: HTMLSelectElement['options'] =\n EMPTY_OPTIONS_COLLECTION\n\n /**\n * An `<option>` with a non-empty string value must be selected before this\n * select can be submitted.\n *\n * See [Client-side validation] and the [HTML attribute: `required`] for more\n * information.\n *\n * [Client-side validation]: https://developer.mozilla.org/docs/Web/HTML/Element/input#client-side_validation\n * [HTML attribute: `required`]: https://developer.mozilla.org/docs/Web/HTML/Attributes/required\n *\n * @webnative\n */\n @Prop() public readonly required?: boolean\n\n /**\n * The index of the first or last selected [`<option>`][] element, depending\n * on the value of `multiple`. The value `-1` indicates that no element is\n * selected.\n *\n * [`<option>`]: https://developer.mozilla.org/docs/Web/HTML/Element/option\n *\n * @webnative\n */\n @Prop({ mutable: true })\n public selectedIndex: HTMLSelectElement['selectedIndex'] = -1\n\n /**\n * Collection of the [`<option>`][] elements contained within the\n * `<qds-select>` element that are currently selected.\n *\n * [`<option>`]: https://developer.mozilla.org/docs/Web/HTML/Element/option\n *\n * @readonly\n * @webnative\n */\n @Prop()\n public readonly selectedOptions: HTMLSelectElement['selectedOptions'] =\n EMPTY_OPTIONS_COLLECTION\n\n /**\n * Returns `select-multiple` if the `multiple` attribute is true;\n * `select-one` otherwise.\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly type: SelectType = 'select-one'\n\n /**\n * The error message that would be shown to the user if the `<qds-select>`\n * was to be checked for validity.\n *\n * @readonly\n * @webnative\n */\n @Prop()\n public readonly validationMessage: ElementInternals['validationMessage'] = ''\n\n /**\n * The [`ValidityState`][] object for this `<qds-select>`.\n *\n * [`ValidityState`]: https://developer.mozilla.org/docs/Web/API/ValidityState\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly validity: ElementInternals['validity'] = VALID_STATE\n\n /**\n * The `value` property of the first selected [`<option>`][] element, or the\n * empty string if no options are selected.\n *\n * [`<option>`]: https://developer.mozilla.org/docs/Web/HTML/Element/option\n *\n * @webnative\n */\n @Prop({ mutable: true }) public value? = ''\n\n /**\n * True if `<qds-select>` 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 @AttachInternals() private readonly internals!: ElementInternals\n\n /**\n * Emitted when the select loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when an alteration to the select's value is committed by the\n * user.\n */\n @Event({ eventName: 'qdsChange', cancelable: false })\n private readonly changeEmitter!: EventEmitter<void>\n\n /**\n * Emitted when the select gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the select's value changes.\n */\n @Event({ eventName: 'qdsInput', cancelable: false })\n private readonly inputEmitter!: EventEmitter<QdsInputEventDetail>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private tabIndex?: number\n\n #inheritedAttributes: Attributes = {}\n\n #select?: HTMLSelectElement\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 #computedOptions(): HTMLSelectElement['options'] {\n invariant(this.#select)\n\n return this.#select.options\n }\n\n get #computedStatus(): SelectStatus | undefined {\n switch (this.status) {\n case 'error':\n case 'success':\n case 'warning': {\n return this.status\n }\n default: {\n return undefined\n }\n }\n }\n\n 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 #computedType(): HTMLSelectElement['type'] {\n invariant(this.#select)\n\n return this.#select.type\n }\n\n get #computedValue(): string {\n return this.value ?? ''\n }\n\n get #computedSelectedOptions(): HTMLSelectElement['selectedOptions'] {\n invariant(this.#select)\n\n return this.#select.selectedOptions\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) event.stopImmediatePropagation()\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n if (this.#computedDisabled)\n // eslint-disable-next-line unicorn/no-null\n this.internals.setFormValue(null)\n else this.internals.setFormValue(this.#computedValue)\n }\n\n @Watch('selectedIndex')\n protected selectedIndexChanged(): void {\n invariant(this.#select)\n\n this.#select.selectedIndex = this.selectedIndex\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('required')\n @Watch('value')\n protected validationChanged(): void {\n invariant(this.#select)\n\n this.#select.value = this.#computedValue\n this.#select.required = this.required ?? false\n\n const { valid } = this.#select.validity\n if (valid)\n this.internals.setValidity(NO_ERROR_FLAGS, undefined, this.#select)\n else\n this.internals.setValidity(\n this.#select.validity,\n this.#select.validationMessage,\n this.#select,\n )\n }\n\n @Watch('status')\n protected statusChanged(): void {\n this.internals.ariaInvalid = (this.#computedStatus === 'error').toString()\n }\n\n public componentWillLoad(): void {\n this.#defineGetter('form', () => this.internals.form)\n this.#defineGetter('willValidate', () => this.internals.willValidate)\n this.#defineGetter('validity', () => this.internals.validity)\n this.#defineGetter(\n 'validationMessage',\n () => this.internals.validationMessage,\n )\n\n this.#defineGetter('type', () => this.#computedType)\n this.#defineGetter('options', () => this.#computedOptions)\n this.#defineGetter('length', () => this.#computedOptions.length)\n this.#defineGetter('selectedOptions', () => this.#computedSelectedOptions)\n\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n this.statusChanged()\n }\n\n public componentDidLoad(): void {\n invariant(this.#select)\n\n this.validationChanged()\n this.selectedIndex = this.#select.selectedIndex\n }\n\n public render() {\n return (\n <div\n class={{\n 'qds-container': true,\n 'qds-multiple': this.multiple ?? false,\n }}\n data-size={this.#computedSize}\n >\n <select\n autoComplete={this.autoComplete}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={this.host.autofocus}\n class=\"qds-select\"\n data-size={this.#computedSize}\n data-status={this.#computedStatus}\n disabled={this.#computedDisabled}\n multiple={this.multiple}\n name={this.name}\n onBlur={this.#onBlur}\n onChange={this.#onChange}\n onFocus={this.#onFocus}\n onInput={this.#onInput}\n ref={this.#ref}\n required={this.required}\n tabIndex={this.#computedDisabled ? undefined : this.tabIndex}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n />\n {this.multiple !== true && (\n <qds-icon\n aria-hidden=\"true\"\n class=\"qds-icon\"\n data-size={this.#computedSize}\n library=\"core\"\n name=\"dropdown\"\n />\n )}\n <slot onSlotchange={this.#onSlotchange} />\n <div class=\"qds-focus-ring\" />\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: HTMLSelectElement['setCustomValidity'] = (\n error,\n ) => {\n invariant(this.#select)\n\n this.#select.setCustomValidity(error)\n if (error)\n this.internals.setValidity(CUSTOM_ERROR_FLAGS, error, this.#select)\n else this.internals.setValidity(NO_ERROR_FLAGS)\n }\n\n public addItem: HTMLSelectElement['add'] = (element, before) => {\n invariant(this.#select)\n\n this.#select.add(element, before)\n }\n\n public removeItem = (index: number): void => {\n invariant(this.#select)\n\n this.#select.remove(index)\n }\n\n public item: HTMLSelectElement['item'] = (index) => {\n invariant(this.#select)\n\n return this.#select.item(index)\n }\n\n public namedItem: HTMLSelectElement['namedItem'] = (name) => {\n invariant(this.#select)\n\n return this.#select.namedItem(name)\n }\n\n readonly #ref = (select?: HTMLSelectElement): void => {\n this.#select = select\n }\n\n readonly #onBlur = (event: FocusEvent): void => {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onChange = (): void => {\n this.changeEmitter.emit()\n }\n\n readonly #onFocus = (event: FocusEvent): void => {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onInput = (event: InputEvent): void => {\n invariant(this.#select)\n\n this.value = this.#select.value\n this.inputEmitter.emit(pickInputEventAttributes(event))\n }\n\n readonly #onSlotchange = (event: Event): void => {\n invariant(this.#select)\n const { currentTarget } = event\n invariant(currentTarget instanceof HTMLSlotElement)\n\n this.#select.replaceChildren(\n ...currentTarget.assignedNodes().map((node) => node.cloneNode(true)),\n )\n }\n\n #defineGetter(p: PropertyKey, get: () => unknown): void {\n Object.defineProperty(this.host, p, { enumerable: true, get })\n }\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA,MAAM,SAAS,GAAG,wgLAAwgL;;ACA1hL;AACA;AACA;;;;;;;;;;;;;;;;;;AAiCA,MAAM,UAAU,GAAG,MAAY;IAC7B,SAAS,CAAC,KAAK,CAAC;AAClB,CAAC;AACD,MAAM,wBAAwB,GAAiC;AAC7D,IAAA,MAAM,EAAE,CAAC;IACT,aAAa,EAAE,EAAE;AACjB,IAAA,GAAG,EAAE,UAAU;AACf,IAAA,MAAM,EAAE,UAAU;AAClB,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,SAAS,EAAE,UAAU;AACrB,IAAA,CAAC,MAAM,CAAC,QAAQ,GAAG,UAAU;CAC9B;MAcY,MAAM,GAAA,MAAA;AANnB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;;;;;AAYE;;;;;;;AAOG;AACqB,QAAA,IAAI,CAAA,IAAA,GAAU,UAAU;AAuBhD;;;;;;;;;;;;;;;AAeG;;AAEqB,QAAA,IAAI,CAAA,IAAA,GAAsC,IAAI;AAEtE;;;;;;;AAOG;AACqB,QAAA,IAAM,CAAA,MAAA,GAAgC,CAAC;AAmB/D;;;;;;;;;AASG;AACqB,QAAA,IAAO,CAAA,OAAA,GAC7B,wBAAwB;AAgB1B;;;;;;;;AAQG;AAEI,QAAA,IAA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,CAAC;IAEvB,OAAO,sBAAA,CAAA,IAAI,EAAQ,cAAA,EAAA,GAAA,CAAA,CAAC,IAAI;AAC1B,CAAC,EAAA,yBAAA,GAAA,SAAA,yBAAA,GAAA;AAGC,IAAA,OAAO,IAAI,CAAC,KAAK,IAAI,EAAE;AACzB,CAAC,EAAA,mCAAA,GAAA,SAAA,mCAAA,GAAA;IAGC,SAAS,CAAC,sBAAA,CAAA,IAAI,EAAA,cAAA,EAAA,GAAA,CAAQ,CAAC;IAEvB,OAAO,sBAAA,CAAA,IAAI,EAAQ,cAAA,EAAA,GAAA,CAAA,CAAC,eAAe;AACrC,CAAC,EAAA,oBAAA,GAAA,SAAA,oBAAA,CAqMa,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;;;;;"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* SPDX-FileCopyrightText: © 2026 Schneider Electric
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-Hg1Liloy.js';
|
|
7
|
+
import { p as pickFocusEventAttributes, i as invariant, d as determineLinkIcon } from './helpers-eFD8hV6J.js';
|
|
8
|
+
|
|
9
|
+
const standaloneLinkCss = ":host([hidden]){display:none!important}:host{display:inline-block}:host(:focus-visible){border-radius:var(--qds-control-border-radius);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-icon-crop{align-items:center;display:flex;justify-content:center}.qds-icon{flex-shrink:0;transform:scaleX(var(--qds-direction-factor,1))}.qds-standalone-link{box-sizing:border-box;display:inline-flex;justify-content:center;-webkit-print-color-adjust:exact;print-color-adjust:exact;width:100%}.qds-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}[data-importance=subdued]{color:var(--qds-theme-link-subdued-default)}.qds-visitable[data-importance=subdued]:visited{color:var(--qds-theme-link-visited-default)}[data-importance=subdued]:hover{color:var(--qds-theme-link-subdued-hover)}[data-importance=subdued]:active{color:var(--qds-theme-link-subdued-pressed)}.qds-visitable[data-importance=subdued]:visited:hover{color:var(--qds-theme-link-visited-hover)}.qds-visitable[data-importance=subdued]:visited:active{color:var(--qds-theme-link-visited-pressed)}[data-importance=standard]{color:var(--qds-theme-link-standard-default)}.qds-visitable[data-importance=standard]:visited{color:var(--qds-theme-link-visited-default)}[data-importance=standard]:hover{color:var(--qds-theme-link-standard-hover)}[data-importance=standard]:active{color:var(--qds-theme-link-standard-pressed)}.qds-visitable[data-importance=standard]:visited:hover{color:var(--qds-theme-link-visited-hover)}.qds-visitable[data-importance=standard]:visited:active{color:var(--qds-theme-link-visited-pressed)}[data-importance=emphasized]{color:var(--qds-theme-link-emphasized-default)}.qds-visitable[data-importance=emphasized]:visited{color:var(--qds-theme-link-visited-default)}[data-importance=emphasized]:hover{color:var(--qds-theme-link-emphasized-hover)}[data-importance=emphasized]:active{color:var(--qds-theme-link-emphasized-pressed)}.qds-visitable[data-importance=emphasized]:visited:hover{color:var(--qds-theme-link-visited-hover)}.qds-visitable[data-importance=emphasized]:visited:active{color:var(--qds-theme-link-visited-pressed)}.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-standalone-link[data-size=small]{font:var(--qds-control-small-link);gap:var(--qds-control-small-gap-internal);min-height:var(--qds-control-small-height);padding-block:var(--qds-control-small-padding-auto-height)}[data-size=small][data-importance=subdued]{font:var(--qds-control-small-text)}.qds-icon-crop[data-size=small]{height:var(--qds-control-small-icon-crop-height)}.qds-icon[data-size=small]{height:var(--qds-control-small-icon-size);width:var(--qds-control-small-icon-size)}.qds-standalone-link[data-size=standard]{font:var(--qds-control-standard-link);gap:var(--qds-control-standard-gap-internal);min-height:var(--qds-control-standard-height);padding-block:var(--qds-control-standard-padding-auto-height)}[data-size=standard][data-importance=subdued]{font:var(--qds-control-standard-text)}.qds-icon-crop[data-size=standard]{height:var(--qds-control-standard-icon-crop-height)}.qds-icon[data-size=standard]{height:var(--qds-control-standard-icon-size);width:var(--qds-control-standard-icon-size)}.qds-standalone-link[data-size=large]{font:var(--qds-control-large-link);gap:var(--qds-control-large-gap-internal);min-height:var(--qds-control-large-height);padding-block:var(--qds-control-large-padding-auto-height)}[data-size=large][data-importance=subdued]{font:var(--qds-control-large-text)}.qds-icon-crop[data-size=large]{height:var(--qds-control-large-icon-crop-height)}.qds-icon[data-size=large]{height:var(--qds-control-large-icon-size);width:var(--qds-control-large-icon-size)}";
|
|
10
|
+
|
|
11
|
+
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
12
|
+
//
|
|
13
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
14
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
15
|
+
if (kind === "a" && !f)
|
|
16
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
17
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
18
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
19
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
20
|
+
};
|
|
21
|
+
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
22
|
+
if (kind === "m")
|
|
23
|
+
throw new TypeError("Private method is not writable");
|
|
24
|
+
if (kind === "a" && !f)
|
|
25
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
26
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
27
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
28
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
29
|
+
};
|
|
30
|
+
var _StandaloneLink_instances, _StandaloneLink_savedTabIndex, _StandaloneLink_link, _StandaloneLink_computedImportance_get, _StandaloneLink_computedSize_get, _StandaloneLink_openInNewTab_get, _StandaloneLink_updateAriaLabelElements, _StandaloneLink_linkRef, _StandaloneLink_onBlur, _StandaloneLink_onFocus, _StandaloneLink_onSlotchange;
|
|
31
|
+
const StandaloneLink = class {
|
|
32
|
+
constructor(hostRef) {
|
|
33
|
+
registerInstance(this, hostRef);
|
|
34
|
+
this.blurEmitter = createEvent(this, "qdsBlur", 2);
|
|
35
|
+
this.focusEmitter = createEvent(this, "qdsFocus", 2);
|
|
36
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
37
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
41
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
42
|
+
}
|
|
43
|
+
_StandaloneLink_instances.add(this);
|
|
44
|
+
/**
|
|
45
|
+
* Prevents the standalone link from being interacted with: it cannot be pressed
|
|
46
|
+
* or focused.
|
|
47
|
+
*/
|
|
48
|
+
this.disabled = false;
|
|
49
|
+
/**
|
|
50
|
+
* The name of a registered icon library.
|
|
51
|
+
*/
|
|
52
|
+
this.iconLibrary = 'default';
|
|
53
|
+
/**
|
|
54
|
+
* The standalone link's importance.
|
|
55
|
+
*/
|
|
56
|
+
this.importance = 'standard';
|
|
57
|
+
/**
|
|
58
|
+
* The standalone link's size.
|
|
59
|
+
*/
|
|
60
|
+
this.size = 'standard';
|
|
61
|
+
/**
|
|
62
|
+
* Defines if the standalone link will display the visited state.
|
|
63
|
+
*/
|
|
64
|
+
this.visitable = false;
|
|
65
|
+
_StandaloneLink_savedTabIndex.set(this, 0);
|
|
66
|
+
_StandaloneLink_link.set(this, void 0);
|
|
67
|
+
_StandaloneLink_updateAriaLabelElements.set(this, () => {
|
|
68
|
+
this.internals.ariaLabel = `${this.host.textContent} ${__classPrivateFieldGet(this, _StandaloneLink_instances, "a", _StandaloneLink_openInNewTab_get) ? 'Opens in a new tab' : ''}`.trim();
|
|
69
|
+
});
|
|
70
|
+
_StandaloneLink_linkRef.set(this, (link) => {
|
|
71
|
+
__classPrivateFieldSet(this, _StandaloneLink_link, link, "f");
|
|
72
|
+
});
|
|
73
|
+
_StandaloneLink_onBlur.set(this, (event) => {
|
|
74
|
+
this.blurEmitter.emit(pickFocusEventAttributes(event));
|
|
75
|
+
});
|
|
76
|
+
_StandaloneLink_onFocus.set(this, (event) => {
|
|
77
|
+
this.focusEmitter.emit(pickFocusEventAttributes(event));
|
|
78
|
+
});
|
|
79
|
+
_StandaloneLink_onSlotchange.set(this, () => {
|
|
80
|
+
__classPrivateFieldGet(this, _StandaloneLink_updateAriaLabelElements, "f").call(this);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
onClick(event) {
|
|
84
|
+
if (this.disabled)
|
|
85
|
+
event.stopImmediatePropagation();
|
|
86
|
+
}
|
|
87
|
+
onKeydown(event) {
|
|
88
|
+
invariant(__classPrivateFieldGet(this, _StandaloneLink_link, "f"));
|
|
89
|
+
if (this.disabled)
|
|
90
|
+
return;
|
|
91
|
+
if (event.key === 'Enter')
|
|
92
|
+
__classPrivateFieldGet(this, _StandaloneLink_link, "f").click();
|
|
93
|
+
}
|
|
94
|
+
disabledChanged() {
|
|
95
|
+
this.internals.ariaDisabled = this.disabled.toString();
|
|
96
|
+
if (this.disabled)
|
|
97
|
+
this.host.removeAttribute('tabindex');
|
|
98
|
+
else
|
|
99
|
+
this.host.tabIndex = __classPrivateFieldGet(this, _StandaloneLink_savedTabIndex, "f");
|
|
100
|
+
}
|
|
101
|
+
tabindexChanged(newValue) {
|
|
102
|
+
const parsedValue = Number.parseInt(newValue, 10);
|
|
103
|
+
// FIXME: `undefined` instead of `0` causes `qdsFocus/qdsBlur` E2E tests
|
|
104
|
+
// to fail, but it's not clear why this is the case since it works for
|
|
105
|
+
// other components.
|
|
106
|
+
__classPrivateFieldSet(this, _StandaloneLink_savedTabIndex, Number.isNaN(parsedValue) ? 0 : parsedValue, "f");
|
|
107
|
+
if (this.disabled)
|
|
108
|
+
this.host.removeAttribute('tabindex');
|
|
109
|
+
else
|
|
110
|
+
this.host.tabIndex = __classPrivateFieldGet(this, _StandaloneLink_savedTabIndex, "f");
|
|
111
|
+
}
|
|
112
|
+
hrefTargetChanged() {
|
|
113
|
+
this.linkIcon = determineLinkIcon(this.target, this.rel);
|
|
114
|
+
__classPrivateFieldGet(this, _StandaloneLink_updateAriaLabelElements, "f").call(this);
|
|
115
|
+
}
|
|
116
|
+
componentWillLoad() {
|
|
117
|
+
this.internals.role = 'link';
|
|
118
|
+
this.disabledChanged();
|
|
119
|
+
this.hrefTargetChanged();
|
|
120
|
+
this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0');
|
|
121
|
+
}
|
|
122
|
+
componentDidLoad() {
|
|
123
|
+
__classPrivateFieldGet(this, _StandaloneLink_updateAriaLabelElements, "f").call(this);
|
|
124
|
+
}
|
|
125
|
+
render() {
|
|
126
|
+
return (h("a", { key: '91c07ea8152387f46020e1431858cd35bd126ced', "aria-hidden": "true", class: {
|
|
127
|
+
'qds-standalone-link': true,
|
|
128
|
+
'qds-disabled': this.disabled,
|
|
129
|
+
'qds-visitable': this.visitable,
|
|
130
|
+
}, "data-importance": __classPrivateFieldGet(this, _StandaloneLink_instances, "a", _StandaloneLink_computedImportance_get), "data-size": __classPrivateFieldGet(this, _StandaloneLink_instances, "a", _StandaloneLink_computedSize_get), download: this.download, href: this.href?.toString(), hrefLang: this.hreflang, onBlur: __classPrivateFieldGet(this, _StandaloneLink_onBlur, "f"), onFocus: __classPrivateFieldGet(this, _StandaloneLink_onFocus, "f"), referrerPolicy: this.referrerPolicy, rel: this.rel, tabIndex: -1, target: this.target, ref: __classPrivateFieldGet(this, _StandaloneLink_linkRef, "f") }, this.iconName !== undefined && this.iconName !== '' && (h("span", { key: '11ef79b0704c1be48b7c96bf67d5395324a4da78', class: "qds-icon-crop", "data-size": __classPrivateFieldGet(this, _StandaloneLink_instances, "a", _StandaloneLink_computedSize_get) }, h("qds-icon", { key: 'b13b23fb3cade4a2419435e1ee9199929e38caa7', "aria-hidden": "true", class: "qds-icon", "data-size": __classPrivateFieldGet(this, _StandaloneLink_instances, "a", _StandaloneLink_computedSize_get), library: this.iconLibrary, name: this.iconName }))), h("span", { key: '14dc1bd1fb86f9e910df3a752b5b21e9d6a32614', class: "qds-text" }, h("slot", { key: '3bec7502fd6a1d8ac80bce195e0aae082fbd6071', onSlotchange: __classPrivateFieldGet(this, _StandaloneLink_onSlotchange, "f") })), this.linkIcon && (h("span", { key: '2baed1edfde4437a36acd524ddcc80eff6ed3d6a', class: "qds-icon-crop", "data-size": __classPrivateFieldGet(this, _StandaloneLink_instances, "a", _StandaloneLink_computedSize_get) }, h("qds-icon", { key: 'd4998672b43c3a94762823d0d0f7439df632b344', "aria-hidden": "true", class: "qds-icon", library: "core", "data-size": __classPrivateFieldGet(this, _StandaloneLink_instances, "a", _StandaloneLink_computedSize_get), name: this.linkIcon }))), this.importance === 'emphasized' && (h("span", { key: '20e1eccfa5db5faf5f704d9297502d908f5dd105', class: "qds-icon-crop", "data-size": __classPrivateFieldGet(this, _StandaloneLink_instances, "a", _StandaloneLink_computedSize_get) }, h("qds-icon", { key: '82461b636037dd9bf41246a4d666ea9f6c17765a', class: "qds-icon", "aria-hidden": "true", "data-size": __classPrivateFieldGet(this, _StandaloneLink_instances, "a", _StandaloneLink_computedSize_get), library: "core", name: "next" })))));
|
|
131
|
+
}
|
|
132
|
+
get host() { return getElement(this); }
|
|
133
|
+
static get watchers() { return {
|
|
134
|
+
"disabled": ["disabledChanged"],
|
|
135
|
+
"tabindex": ["tabindexChanged"],
|
|
136
|
+
"rel": ["hrefTargetChanged"],
|
|
137
|
+
"target": ["hrefTargetChanged"]
|
|
138
|
+
}; }
|
|
139
|
+
};
|
|
140
|
+
_StandaloneLink_savedTabIndex = new WeakMap(), _StandaloneLink_link = new WeakMap(), _StandaloneLink_updateAriaLabelElements = new WeakMap(), _StandaloneLink_linkRef = new WeakMap(), _StandaloneLink_onBlur = new WeakMap(), _StandaloneLink_onFocus = new WeakMap(), _StandaloneLink_onSlotchange = new WeakMap(), _StandaloneLink_instances = new WeakSet(), _StandaloneLink_computedImportance_get = function _StandaloneLink_computedImportance_get() {
|
|
141
|
+
switch (this.importance) {
|
|
142
|
+
case 'subdued':
|
|
143
|
+
case 'emphasized': {
|
|
144
|
+
return this.importance;
|
|
145
|
+
}
|
|
146
|
+
default: {
|
|
147
|
+
return 'standard';
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}, _StandaloneLink_computedSize_get = function _StandaloneLink_computedSize_get() {
|
|
151
|
+
switch (this.size) {
|
|
152
|
+
case 'standard':
|
|
153
|
+
case 'small':
|
|
154
|
+
case 'large': {
|
|
155
|
+
return this.size;
|
|
156
|
+
}
|
|
157
|
+
default: {
|
|
158
|
+
return 'standard';
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}, _StandaloneLink_openInNewTab_get = function _StandaloneLink_openInNewTab_get() {
|
|
162
|
+
return this.target === '_blank';
|
|
163
|
+
};
|
|
164
|
+
StandaloneLink.style = standaloneLinkCss;
|
|
165
|
+
|
|
166
|
+
export { StandaloneLink as qds_standalone_link };
|
|
167
|
+
//# sourceMappingURL=qds-standalone-link.entry.js.map
|