@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,399 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* SPDX-FileCopyrightText: © 2026 Schneider Electric
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
var index = require('./index-DIY7gpXM.js');
|
|
9
|
+
var helpers = require('./helpers-Qs3cpKiI.js');
|
|
10
|
+
var controls = require('./controls-DKGeNyr5.js');
|
|
11
|
+
|
|
12
|
+
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}";
|
|
13
|
+
|
|
14
|
+
// SPDX-FileCopyrightText: © 2025 Schneider Electric
|
|
15
|
+
//
|
|
16
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
18
|
+
if (kind === "a" && !f)
|
|
19
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
20
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
21
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
22
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
23
|
+
};
|
|
24
|
+
var _AvatarMedia_renderContent, _AvatarMedia_handleImageError;
|
|
25
|
+
const AvatarMedia = class {
|
|
26
|
+
constructor(hostRef) {
|
|
27
|
+
index.registerInstance(this, hostRef);
|
|
28
|
+
this.errorEmitter = index.createEvent(this, "qdsError", 6);
|
|
29
|
+
/**
|
|
30
|
+
* The alt text for the avatar-media's image.
|
|
31
|
+
* @webnative
|
|
32
|
+
*/
|
|
33
|
+
this.alt = '';
|
|
34
|
+
/**
|
|
35
|
+
* The avatar-media's icon library.
|
|
36
|
+
*/
|
|
37
|
+
this.iconLibrary = 'default';
|
|
38
|
+
this.hasImageError = false;
|
|
39
|
+
_AvatarMedia_renderContent.set(this, () => {
|
|
40
|
+
if (this.src !== undefined && this.src !== '' && !this.hasImageError) {
|
|
41
|
+
return (index.h("img", { class: "qds-picture", src: this.src, alt: this.alt, onError: __classPrivateFieldGet$2(this, _AvatarMedia_handleImageError, "f"), onLoad: () => {
|
|
42
|
+
this.hasImageError = false;
|
|
43
|
+
} }));
|
|
44
|
+
}
|
|
45
|
+
if (this.text !== undefined && this.text !== '') {
|
|
46
|
+
return index.h("span", { class: "qds-text" }, this.initials);
|
|
47
|
+
}
|
|
48
|
+
if (this.iconName !== undefined && this.iconName !== '') {
|
|
49
|
+
return (index.h("qds-icon", { class: "qds-icon", name: this.iconName, library: this.iconLibrary }));
|
|
50
|
+
}
|
|
51
|
+
return index.h("qds-icon", { class: "qds-icon", name: "user", library: "core" });
|
|
52
|
+
});
|
|
53
|
+
_AvatarMedia_handleImageError.set(this, () => {
|
|
54
|
+
this.hasImageError = true;
|
|
55
|
+
this.errorEmitter.emit();
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
handleTextChange() {
|
|
59
|
+
if (this.text === undefined || this.text === '') {
|
|
60
|
+
this.initials = undefined;
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const words = this.text.trim().split(' ');
|
|
64
|
+
const [first = '', second = ''] = words.filter(Boolean);
|
|
65
|
+
this.initials = (first.charAt(0) + (second.charAt(0) || '')).toLocaleUpperCase();
|
|
66
|
+
}
|
|
67
|
+
componentWillLoad() {
|
|
68
|
+
this.handleTextChange();
|
|
69
|
+
}
|
|
70
|
+
render() {
|
|
71
|
+
return index.h("div", { key: '2a4d92d823206e950959201c8c2c1b420379ceb1', class: "qds-container" }, __classPrivateFieldGet$2(this, _AvatarMedia_renderContent, "f").call(this));
|
|
72
|
+
}
|
|
73
|
+
static get watchers() { return {
|
|
74
|
+
"text": ["handleTextChange"]
|
|
75
|
+
}; }
|
|
76
|
+
};
|
|
77
|
+
_AvatarMedia_renderContent = new WeakMap(), _AvatarMedia_handleImageError = new WeakMap();
|
|
78
|
+
AvatarMedia.style = avatarMediaCss;
|
|
79
|
+
|
|
80
|
+
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)}";
|
|
81
|
+
|
|
82
|
+
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
83
|
+
//
|
|
84
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
85
|
+
var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
86
|
+
if (kind === "a" && !f)
|
|
87
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
88
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
89
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
90
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
91
|
+
};
|
|
92
|
+
var __classPrivateFieldSet$1 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
93
|
+
if (kind === "m")
|
|
94
|
+
throw new TypeError("Private method is not writable");
|
|
95
|
+
if (kind === "a" && !f)
|
|
96
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
97
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
98
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
99
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
100
|
+
};
|
|
101
|
+
var _Checkbox_instances, _Checkbox_inheritedAttributes, _Checkbox_computedChecked_get, _Checkbox_computedDisabled_get, _Checkbox_computedIndeterminate_get, _Checkbox_computedSize_get, _Checkbox_computedValue_get, _Checkbox_hasText_get, _Checkbox_onBlur, _Checkbox_onFocus, _Checkbox_defineGetter;
|
|
102
|
+
const Checkbox = class {
|
|
103
|
+
constructor(hostRef) {
|
|
104
|
+
index.registerInstance(this, hostRef);
|
|
105
|
+
this.blurEmitter = index.createEvent(this, "qdsBlur", 2);
|
|
106
|
+
this.changeEmitter = index.createEvent(this, "qdsChange", 6);
|
|
107
|
+
this.focusEmitter = index.createEvent(this, "qdsFocus", 2);
|
|
108
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
109
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
113
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
114
|
+
}
|
|
115
|
+
_Checkbox_instances.add(this);
|
|
116
|
+
/**
|
|
117
|
+
* Adds vertical margin to the checkbox for alignment.
|
|
118
|
+
*
|
|
119
|
+
* This is useful when creating inline layouts so that the first lines have
|
|
120
|
+
* the correct vertical centering.
|
|
121
|
+
*/
|
|
122
|
+
this.inline = false;
|
|
123
|
+
/**
|
|
124
|
+
* The checkbox's size.
|
|
125
|
+
*/
|
|
126
|
+
this.size = 'standard';
|
|
127
|
+
/**
|
|
128
|
+
* The [`<form>`][] element to associate the checkbox with (its form owner).
|
|
129
|
+
*
|
|
130
|
+
* The value of this attribute must be the id of a `<form>` in the same
|
|
131
|
+
* document. If this attribute is not set, the `<qds-checkbox>` is associated
|
|
132
|
+
* with its ancestor `<form>` element, if any.
|
|
133
|
+
*
|
|
134
|
+
* This attribute lets you associate `<qds-checkbox>` elements to `<form>`s
|
|
135
|
+
* anywhere in the document, not just inside a `<form>`. It can also override
|
|
136
|
+
* an ancestor `<form>` element.
|
|
137
|
+
*
|
|
138
|
+
* [`<form>`]: https://developer.mozilla.org/docs/Web/HTML/Element/form
|
|
139
|
+
*
|
|
140
|
+
* @readonly
|
|
141
|
+
* @webnative
|
|
142
|
+
*/
|
|
143
|
+
// eslint-disable-next-line unicorn/no-null
|
|
144
|
+
this.form = null;
|
|
145
|
+
/**
|
|
146
|
+
* The error message that would be shown to the user if the `<qds-checkbox>`
|
|
147
|
+
* was to be checked for validity.
|
|
148
|
+
*
|
|
149
|
+
* @readonly
|
|
150
|
+
* @webnative
|
|
151
|
+
*/
|
|
152
|
+
this.validationMessage = '';
|
|
153
|
+
/**
|
|
154
|
+
* The [`ValidityState`][] object for this `<qds-checkbox>`.
|
|
155
|
+
*
|
|
156
|
+
* [`ValidityState`]: https://developer.mozilla.org/docs/Web/API/ValidityState
|
|
157
|
+
*
|
|
158
|
+
* @readonly
|
|
159
|
+
* @webnative
|
|
160
|
+
*/
|
|
161
|
+
this.validity = controls.VALID_STATE;
|
|
162
|
+
/**
|
|
163
|
+
* The value of the checkbox, submitted as a name/value pair with form data.
|
|
164
|
+
*
|
|
165
|
+
* @webnative
|
|
166
|
+
*/
|
|
167
|
+
this.value = 'on';
|
|
168
|
+
/**
|
|
169
|
+
* True if `<qds-checkbox>` will be validated when the form is submitted;
|
|
170
|
+
* false otherwise.
|
|
171
|
+
*
|
|
172
|
+
* @readonly
|
|
173
|
+
* @webnative
|
|
174
|
+
*/
|
|
175
|
+
this.willValidate = false;
|
|
176
|
+
/**
|
|
177
|
+
* Whether or not the text is displayed.
|
|
178
|
+
*/
|
|
179
|
+
this.checkboxOnly = false;
|
|
180
|
+
_Checkbox_inheritedAttributes.set(this, {});
|
|
181
|
+
this.checkValidity = () => this.internals.checkValidity();
|
|
182
|
+
this.reportValidity = () => this.internals.reportValidity();
|
|
183
|
+
this.setCustomValidity = (error) => {
|
|
184
|
+
if (error)
|
|
185
|
+
this.internals.setValidity(controls.CUSTOM_ERROR_FLAGS, error, this.host);
|
|
186
|
+
else
|
|
187
|
+
this.internals.setValidity(controls.NO_ERROR_FLAGS);
|
|
188
|
+
};
|
|
189
|
+
_Checkbox_onBlur.set(this, (event) => {
|
|
190
|
+
this.blurEmitter.emit(helpers.pickFocusEventAttributes(event));
|
|
191
|
+
});
|
|
192
|
+
_Checkbox_onFocus.set(this, (event) => {
|
|
193
|
+
this.focusEmitter.emit(helpers.pickFocusEventAttributes(event));
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
onClick(event) {
|
|
197
|
+
if (__classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get)) {
|
|
198
|
+
event.stopImmediatePropagation();
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
event.preventDefault();
|
|
202
|
+
this.checked = __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedIndeterminate_get) ? true : !__classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedChecked_get);
|
|
203
|
+
this.changeEmitter.emit();
|
|
204
|
+
this.indeterminate = false;
|
|
205
|
+
}
|
|
206
|
+
checkedChanged() {
|
|
207
|
+
this.internals.setFormValue(__classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedChecked_get) && !__classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get)
|
|
208
|
+
? __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedValue_get)
|
|
209
|
+
: // eslint-disable-next-line unicorn/no-null
|
|
210
|
+
null);
|
|
211
|
+
}
|
|
212
|
+
disabledChanged() {
|
|
213
|
+
if (__classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedChecked_get) && !__classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get))
|
|
214
|
+
this.internals.setFormValue(__classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedValue_get));
|
|
215
|
+
// eslint-disable-next-line unicorn/no-null
|
|
216
|
+
else
|
|
217
|
+
this.internals.setFormValue(null);
|
|
218
|
+
}
|
|
219
|
+
tabindexChanged(newValue) {
|
|
220
|
+
const parsedValue = Number.parseInt(newValue, 10);
|
|
221
|
+
this.tabIndex =
|
|
222
|
+
parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue;
|
|
223
|
+
}
|
|
224
|
+
valueChanged() {
|
|
225
|
+
if (__classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedChecked_get) && !__classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get))
|
|
226
|
+
this.internals.setFormValue(__classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedValue_get));
|
|
227
|
+
}
|
|
228
|
+
componentWillLoad() {
|
|
229
|
+
this.valueChanged();
|
|
230
|
+
__classPrivateFieldGet$1(this, _Checkbox_instances, "m", _Checkbox_defineGetter).call(this, 'form', () => this.internals.form);
|
|
231
|
+
__classPrivateFieldGet$1(this, _Checkbox_instances, "m", _Checkbox_defineGetter).call(this, 'willValidate', () => this.internals.willValidate);
|
|
232
|
+
__classPrivateFieldGet$1(this, _Checkbox_instances, "m", _Checkbox_defineGetter).call(this, 'validity', () => this.internals.validity);
|
|
233
|
+
__classPrivateFieldGet$1(this, _Checkbox_instances, "m", _Checkbox_defineGetter).call(this, 'validationMessage', () => this.internals.validationMessage);
|
|
234
|
+
__classPrivateFieldSet$1(this, _Checkbox_inheritedAttributes, helpers.inheritAriaAttributes(this.host), "f");
|
|
235
|
+
this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0');
|
|
236
|
+
}
|
|
237
|
+
render() {
|
|
238
|
+
return (
|
|
239
|
+
// eslint-disable-next-line jsx-a11y/label-has-associated-control
|
|
240
|
+
index.h("label", { key: 'eee46a1d52fdce13a48944878461a64b4010ac2b', "aria-disabled": __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get) ? 'true' : undefined, class: {
|
|
241
|
+
'qds-inline': this.inline,
|
|
242
|
+
'qds-label': true,
|
|
243
|
+
}, "data-size": __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedSize_get) }, index.h("div", { key: 'b22d88f6b62e988057db205e8b493a31cb9eabdc', class: "qds-container" }, index.h("input", { key: 'c1510dc602adc3cf9470edbc6fa95af12f701b9a',
|
|
244
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
245
|
+
autoFocus: this.host.autofocus, checked: __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedIndeterminate_get) ? false : this.checked, class: "qds-checkbox", "data-size": __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), disabled: __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get), indeterminate: this.indeterminate, onBlur: __classPrivateFieldGet$1(this, _Checkbox_onBlur, "f"), onFocus: __classPrivateFieldGet$1(this, _Checkbox_onFocus, "f"), required: this.required, tabIndex: __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get) ? undefined : this.tabIndex, type: "checkbox", "aria-label": this.checkboxOnly ? this.text : undefined, ...__classPrivateFieldGet$1(this, _Checkbox_inheritedAttributes, "f") }), index.h("qds-icon", { key: '7fd98e670537e117298a45d854b34fb9060a8850', "aria-hidden": "true", class: {
|
|
246
|
+
'qds-icon': true,
|
|
247
|
+
'qds-checked': true,
|
|
248
|
+
}, "data-size": __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "checked" }), index.h("qds-icon", { key: '7d5266124a946507ee7384a7086af51e6f5a1d66', "aria-hidden": "true", class: {
|
|
249
|
+
'qds-icon': true,
|
|
250
|
+
'qds-indeterminate': true,
|
|
251
|
+
}, "data-size": __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "indeterminate" })), __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_hasText_get) && (index.h("qds-label", { key: '2abb3aa9fe38db5b754d65024d907fe7e6c05ed0', class: "qds-label-inner", required: this.required, size: this.size, text: this.text, tabindex: -1, tooltipTarget: this.host }))));
|
|
252
|
+
}
|
|
253
|
+
static get delegatesFocus() { return true; }
|
|
254
|
+
static get formAssociated() { return true; }
|
|
255
|
+
get host() { return index.getElement(this); }
|
|
256
|
+
static get watchers() { return {
|
|
257
|
+
"checked": ["checkedChanged"],
|
|
258
|
+
"disabled": ["disabledChanged"],
|
|
259
|
+
"tabindex": ["tabindexChanged"],
|
|
260
|
+
"value": ["valueChanged"]
|
|
261
|
+
}; }
|
|
262
|
+
};
|
|
263
|
+
_Checkbox_inheritedAttributes = new WeakMap(), _Checkbox_onBlur = new WeakMap(), _Checkbox_onFocus = new WeakMap(), _Checkbox_instances = new WeakSet(), _Checkbox_computedChecked_get = function _Checkbox_computedChecked_get() {
|
|
264
|
+
return this.checked ?? false;
|
|
265
|
+
}, _Checkbox_computedDisabled_get = function _Checkbox_computedDisabled_get() {
|
|
266
|
+
return ((this.host.matches(':disabled') || (this.disabled ?? false)) &&
|
|
267
|
+
this.host.getAttribute('disabled') !== 'false');
|
|
268
|
+
}, _Checkbox_computedIndeterminate_get = function _Checkbox_computedIndeterminate_get() {
|
|
269
|
+
return this.indeterminate ?? false;
|
|
270
|
+
}, _Checkbox_computedSize_get = function _Checkbox_computedSize_get() {
|
|
271
|
+
switch (this.size) {
|
|
272
|
+
case 'standard':
|
|
273
|
+
case 'small':
|
|
274
|
+
case 'large': {
|
|
275
|
+
return this.size;
|
|
276
|
+
}
|
|
277
|
+
default: {
|
|
278
|
+
return 'standard';
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}, _Checkbox_computedValue_get = function _Checkbox_computedValue_get() {
|
|
282
|
+
// eslint-disable-next-line unicorn/no-null
|
|
283
|
+
return this.value == null ? null : this.value.toString();
|
|
284
|
+
}, _Checkbox_hasText_get = function _Checkbox_hasText_get() {
|
|
285
|
+
return (this.text !== '' || this.required === true) && !this.checkboxOnly;
|
|
286
|
+
}, _Checkbox_defineGetter = function _Checkbox_defineGetter(p, get) {
|
|
287
|
+
Object.defineProperty(this.host, p, { enumerable: true, get });
|
|
288
|
+
};
|
|
289
|
+
Checkbox.style = checkboxCss;
|
|
290
|
+
|
|
291
|
+
const radioCss = "[hidden].sc-qds-radio-h{display:none!important}.sc-qds-radio-h{display:inline-block;line-height:0}.qds-icon.sc-qds-radio,.qds-radio.sc-qds-radio{grid-area:i;place-self:center}.qds-icon.sc-qds-radio{display:none;pointer-events:none}.qds-container.sc-qds-radio{display:grid;grid-template-areas:\"i\"}.qds-label.sc-qds-radio{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.sc-qds-radio:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-label.sc-qds-radio:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-label.sc-qds-radio:has(.qds-radio: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.sc-qds-radio{flex:1 1 auto;min-width:0;width:100%}.qds-radio.sc-qds-radio{-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);border-radius:var(--qds-control-rounded-border-radius);cursor:pointer;margin:0;padding:var(--qds-control-toggle-padding);-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-radio.sc-qds-radio:focus-visible{outline:none}.qds-radio.sc-qds-radio:checked~.qds-icon.sc-qds-radio{color:var(--qds-theme-control-background-contrast);display:block}[aria-disabled=true].sc-qds-radio{opacity:var(--qds-theme-disabled);pointer-events:none}[data-size=small].sc-qds-radio{--qds-form-small-text:var(--qds-control-small-text)}.qds-radio[data-size=small].sc-qds-radio{height:var(--qds-control-toggle-small-box-size);width:var(--qds-control-toggle-small-box-size)}.qds-icon[data-size=small].sc-qds-radio{font-size:var(--qds-control-small-icon-size)}.qds-label[data-size=small].sc-qds-radio{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].sc-qds-radio{min-height:var(--qds-control-small-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}[data-size=standard].sc-qds-radio{--qds-form-standard-text:var(--qds-control-standard-text)}.qds-radio[data-size=standard].sc-qds-radio{height:var(--qds-control-toggle-standard-box-size);width:var(--qds-control-toggle-standard-box-size)}.qds-icon[data-size=standard].sc-qds-radio{height:var(--qds-control-standard-icon-size);width:var(--qds-control-standard-icon-size)}.qds-label[data-size=standard].sc-qds-radio{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].sc-qds-radio{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].sc-qds-radio{--qds-form-large-text:var(--qds-control-large-text)}.qds-radio[data-size=large].sc-qds-radio{height:var(--qds-control-toggle-large-box-size);width:var(--qds-control-toggle-large-box-size)}.qds-icon[data-size=large].sc-qds-radio{height:var(--qds-control-large-icon-size);width:var(--qds-control-large-icon-size)}.qds-label[data-size=large].sc-qds-radio{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].sc-qds-radio{min-height:var(--qds-control-large-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}";
|
|
292
|
+
|
|
293
|
+
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
294
|
+
//
|
|
295
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
296
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
297
|
+
if (kind === "a" && !f)
|
|
298
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
299
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
300
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
301
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
302
|
+
};
|
|
303
|
+
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
304
|
+
if (kind === "m")
|
|
305
|
+
throw new TypeError("Private method is not writable");
|
|
306
|
+
if (kind === "a" && !f)
|
|
307
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
308
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
309
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
310
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
311
|
+
};
|
|
312
|
+
var _Radio_instances, _Radio_inheritedAttributes, _Radio_input, _Radio_computedDisabled_get, _Radio_computedSize_get, _Radio_hasText_get, _Radio_ref, _Radio_onBlur, _Radio_onChange, _Radio_onFocus;
|
|
313
|
+
const Radio = class {
|
|
314
|
+
constructor(hostRef) {
|
|
315
|
+
index.registerInstance(this, hostRef);
|
|
316
|
+
this.blurEmitter = index.createEvent(this, "qdsBlur", 2);
|
|
317
|
+
this.changeEmitter = index.createEvent(this, "qdsChange", 6);
|
|
318
|
+
this.focusEmitter = index.createEvent(this, "qdsFocus", 2);
|
|
319
|
+
_Radio_instances.add(this);
|
|
320
|
+
/**
|
|
321
|
+
* Adds vertical margin to the radio for alignment.
|
|
322
|
+
*
|
|
323
|
+
* This is useful when creating inline layouts so that the first lines have
|
|
324
|
+
* the correct vertical centering.
|
|
325
|
+
*/
|
|
326
|
+
this.inline = false;
|
|
327
|
+
/**
|
|
328
|
+
* The radio button's size.
|
|
329
|
+
*/
|
|
330
|
+
this.size = 'standard';
|
|
331
|
+
_Radio_inheritedAttributes.set(this, {});
|
|
332
|
+
_Radio_input.set(this, void 0);
|
|
333
|
+
_Radio_ref.set(this, (input) => {
|
|
334
|
+
__classPrivateFieldSet(this, _Radio_input, input, "f");
|
|
335
|
+
});
|
|
336
|
+
_Radio_onBlur.set(this, (event) => {
|
|
337
|
+
this.blurEmitter.emit(helpers.pickFocusEventAttributes(event));
|
|
338
|
+
});
|
|
339
|
+
_Radio_onChange.set(this, () => {
|
|
340
|
+
this.changeEmitter.emit();
|
|
341
|
+
});
|
|
342
|
+
_Radio_onFocus.set(this, (event) => {
|
|
343
|
+
this.focusEmitter.emit(helpers.pickFocusEventAttributes(event));
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
onClick(event) {
|
|
347
|
+
if (__classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedDisabled_get)) {
|
|
348
|
+
event.stopImmediatePropagation();
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
helpers.invariant(__classPrivateFieldGet(this, _Radio_input, "f"));
|
|
352
|
+
this.checked = __classPrivateFieldGet(this, _Radio_input, "f").checked;
|
|
353
|
+
}
|
|
354
|
+
tabindexChanged(newValue) {
|
|
355
|
+
const parsedValue = Number.parseInt(newValue, 10);
|
|
356
|
+
this.tabIndex =
|
|
357
|
+
parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue;
|
|
358
|
+
}
|
|
359
|
+
componentWillLoad() {
|
|
360
|
+
__classPrivateFieldSet(this, _Radio_inheritedAttributes, helpers.inheritAriaAttributes(this.host), "f");
|
|
361
|
+
this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0');
|
|
362
|
+
}
|
|
363
|
+
render() {
|
|
364
|
+
return (
|
|
365
|
+
// eslint-disable-next-line jsx-a11y/label-has-associated-control
|
|
366
|
+
index.h("label", { key: 'd0c73be3ff0a081eb00a0857c8d4c44757b6db2b', "aria-disabled": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedDisabled_get) ? 'true' : undefined, class: {
|
|
367
|
+
'qds-inline': this.inline,
|
|
368
|
+
'qds-label': true,
|
|
369
|
+
}, "data-size": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get) }, index.h("div", { key: '1018adbd92399c84791fed4bd449220431f8525f', class: "qds-container" }, index.h("input", { key: 'f7d1a5bdaf8cc9689b7b4d2257cb360377d8a4b6',
|
|
370
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
371
|
+
autoFocus: this.host.autofocus, checked: this.checked, class: "qds-radio", "data-size": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get), disabled: this.disabled, form: this.form, name: this.name, onBlur: __classPrivateFieldGet(this, _Radio_onBlur, "f"), onChange: __classPrivateFieldGet(this, _Radio_onChange, "f"), onFocus: __classPrivateFieldGet(this, _Radio_onFocus, "f"), ref: __classPrivateFieldGet(this, _Radio_ref, "f"), required: this.required, tabIndex: __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedDisabled_get) ? undefined : this.tabIndex, type: "radio", value: this.value ?? undefined, ...__classPrivateFieldGet(this, _Radio_inheritedAttributes, "f") }), index.h("qds-icon", { key: '5d216956b9bc9a9d673f79ef81302f8a085a4f01', "aria-hidden": "true", class: "qds-icon", "data-size": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get), library: "core", name: "checked-radio" })), __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_hasText_get) && (index.h("qds-label", { key: '023e5f403ff3299ff37153eb7ee96941f485b308', class: "qds-label-inner", size: __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get), text: this.text }))));
|
|
372
|
+
}
|
|
373
|
+
get host() { return index.getElement(this); }
|
|
374
|
+
static get watchers() { return {
|
|
375
|
+
"tabindex": ["tabindexChanged"]
|
|
376
|
+
}; }
|
|
377
|
+
};
|
|
378
|
+
_Radio_inheritedAttributes = new WeakMap(), _Radio_input = new WeakMap(), _Radio_ref = new WeakMap(), _Radio_onBlur = new WeakMap(), _Radio_onChange = new WeakMap(), _Radio_onFocus = new WeakMap(), _Radio_instances = new WeakSet(), _Radio_computedDisabled_get = function _Radio_computedDisabled_get() {
|
|
379
|
+
return this.disabled ?? false;
|
|
380
|
+
}, _Radio_computedSize_get = function _Radio_computedSize_get() {
|
|
381
|
+
switch (this.size) {
|
|
382
|
+
case 'standard':
|
|
383
|
+
case 'small':
|
|
384
|
+
case 'large': {
|
|
385
|
+
return this.size;
|
|
386
|
+
}
|
|
387
|
+
default: {
|
|
388
|
+
return 'standard';
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}, _Radio_hasText_get = function _Radio_hasText_get() {
|
|
392
|
+
return this.text !== undefined && this.text !== '';
|
|
393
|
+
};
|
|
394
|
+
Radio.style = radioCss;
|
|
395
|
+
|
|
396
|
+
exports.qds_avatar_media = AvatarMedia;
|
|
397
|
+
exports.qds_checkbox = Checkbox;
|
|
398
|
+
exports.qds_radio = Radio;
|
|
399
|
+
//# sourceMappingURL=qds-avatar-media.qds-checkbox.qds-radio.entry.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qds-badge-counter.qds-badge-indicator.entry.cjs.js","sources":["src/components/badge-counter/badge-counter.css?tag=qds-badge-counter&encapsulation=shadow","src/components/badge-counter/badge-counter.tsx","src/components/badge-indicator/badge-indicator.css?tag=qds-badge-indicator&encapsulation=shadow","src/components/badge-indicator/badge-indicator.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\n.qds-badge-counter {\n align-items: center;\n background-color: var(--qds-theme-feedback-message-neutral);\n border-radius: var(--qds-feedback-rounded-border-radius);\n color: var(--qds-theme-feedback-message-neutral-contrast);\n display: flex;\n font: var(--qds-feedback-badge-counter-standard-text);\n height: var(--qds-feedback-badge-counter-standard-height);\n justify-content: center;\n margin: 0;\n padding-inline: var(--qds-feedback-badge-counter-standard-padding-horizontal);\n text-align: center;\n}\n\n.qds-stroke-ring {\n border: var(--qds-feedback-badge-border-width) solid\n var(--qds-theme-feedback-message-neutral-contrast);\n}\n\n.qds-sr-only {\n clip: rect(0 0 0 0);\n height: 1px;\n width: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n}\n\n[data-importance='emphasized'] {\n background-color: var(--qds-theme-signature-color-contrast);\n color: var(--qds-theme-signature-color-default);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-signature-color-default);\n }\n}\n\n[data-importance='subdued'] {\n background-color: var(--qds-theme-feedback-message-informational);\n color: var(--qds-theme-feedback-message-informational-contrast);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-informational-contrast);\n }\n}\n\n[data-importance='destructive'] {\n background-color: var(--qds-theme-feedback-message-critical-contrast);\n color: var(--qds-theme-feedback-message-critical);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-critical);\n }\n}\n\n[data-importance='subdued-destructive'] {\n color: var(--qds-theme-feedback-message-critical-contrast);\n background-color: var(--qds-theme-feedback-message-critical);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-critical-contrast);\n }\n}\n\n[data-size='small'] {\n font: var(--qds-feedback-badge-counter-small-text);\n height: var(--qds-feedback-badge-counter-small-height);\n padding-inline: var(--qds-feedback-badge-counter-small-padding-horizontal);\n}\n\n[data-size='large'] {\n font: var(--qds-feedback-badge-counter-large-text);\n height: var(--qds-feedback-badge-counter-large-height);\n padding-inline: var(--qds-feedback-badge-counter-large-padding-horizontal);\n}\n\n[data-size='hero'] {\n font: var(--qds-feedback-badge-counter-hero-text);\n height: var(--qds-feedback-badge-counter-hero-height);\n padding-inline: var(--qds-feedback-badge-counter-hero-padding-horizontal);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface } from '@stencil/core'\nimport { Component, h, Prop } from '@stencil/core'\n\nimport type { Importance, Size } from '../shared'\n\nexport type BadgeCounterImportance =\n | Importance\n | 'destructive'\n | 'subdued-destructive'\nexport type BadgeCounterSize = Size | 'hero'\n\n/**\n * The `<qds-badge-counter>` element is a small, rounded UI element used to\n * display numerical values or counts. It is designed to draw the user's eye to\n * important or dynamic content by providing a visual cue that a countable\n * event or item has occurred or is waiting to be addressed.\n */\n@Component({\n tag: 'qds-badge-counter',\n shadow: true,\n styleUrl: 'badge-counter.css',\n})\nexport class BadgeCounter implements ComponentInterface {\n /**\n * Adds accessible text to the qds-badge-counter that will be used by screen\n * readers.\n *\n * @example\n * <qds-badge-counter value={2} description=\"new notifications\"></qds-badge-counter>\n * // This qds-badge-counter will be read by screen readers as \"two new notifications\"\n */\n @Prop() public readonly description?: string\n\n /**\n * The badge counter's importance.\n */\n @Prop() public readonly importance?: BadgeCounterImportance = 'standard'\n\n /**\n * The badge counter's size.\n */\n @Prop() public readonly size?: BadgeCounterSize = 'standard'\n\n /**\n * Shows a stroke ring around the component for better visibility\n */\n @Prop() public readonly strokeRing: boolean = false\n\n /**\n * The badge-counter's value.\n */\n @Prop() public readonly value!: number | string\n\n get #computedValue(): string {\n const value =\n typeof this.value === 'string'\n ? Number.parseInt(this.value, 10)\n : // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n (this.value ?? Number.NaN)\n if (Number.isNaN(value) || value < 0) return ''\n\n return value < 100 ? value.toString() : '99+'\n }\n\n get #computedImportance(): BadgeCounterImportance {\n switch (this.importance) {\n case 'subdued':\n case 'destructive':\n case 'subdued-destructive':\n case 'emphasized': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedSize(): BadgeCounterSize {\n switch (this.size) {\n case 'hero':\n case 'large':\n case 'small': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n public render() {\n return (\n <span\n class={{\n 'qds-badge-counter': true,\n 'qds-stroke-ring': this.strokeRing,\n }}\n data-importance={this.#computedImportance}\n data-size={this.#computedSize}\n >\n {this.#computedValue}\n <span class=\"qds-sr-only\">{this.description}</span>\n </span>\n )\n }\n}\n","/*\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\n.qds-badge-indicator {\n align-items: center;\n background-color: var(--qds-theme-feedback-message-neutral);\n border-radius: var(--qds-feedback-rounded-border-radius);\n display: flex;\n height: var(--qds-badge-indicator-standard-height);\n justify-content: center;\n width: var(--qds-badge-indicator-standard-height);\n}\n\n.qds-stroke-ring {\n border: var(--qds-feedback-badge-border-width) solid\n var(--qds-theme-feedback-message-neutral-contrast);\n}\n\n.qds-sr-only {\n clip: rect(0 0 0 0);\n height: 1px;\n width: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n}\n\n[data-status='error'] {\n background-color: var(--qds-theme-feedback-message-critical);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-status='info'] {\n background-color: var(--qds-theme-feedback-message-informational);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-status='neutral'] {\n background-color: var(--qds-theme-feedback-message-neutral);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-status='success'] {\n background-color: var(--qds-theme-signature-color-default);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-status='warning'] {\n background-color: var(--qds-theme-feedback-message-important);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-size='small'] {\n height: var(--qds-feedback-badge-indicator-small-size);\n width: var(--qds-feedback-badge-indicator-small-size);\n}\n\n[data-size='standard'] {\n height: var(--qds-feedback-badge-indicator-standard-size);\n width: var(--qds-feedback-badge-indicator-standard-size);\n}\n\n[data-size='large'] {\n height: var(--qds-feedback-badge-indicator-large-size);\n width: var(--qds-feedback-badge-indicator-large-size);\n}\n\n[data-size='hero'] {\n height: var(--qds-feedback-badge-indicator-hero-size);\n width: var(--qds-feedback-badge-indicator-hero-size);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface } from '@stencil/core'\nimport { Component, h, Prop } from '@stencil/core'\n\nimport type { Size, Status } from '../shared'\n\nexport type BadgeIndicatorSize = Size | 'hero'\nexport type BadgeIndicatorStatus = Status | 'neutral'\n\n/**\n * The `<qds-badge-indicator>` element is a small, rounded UI element used to\n * display status indicators. It is designed to draw the user's eye to\n * important or dynamic content by providing a visual cue that an event has\n * occurred or is waiting to be addressed.\n */\n@Component({\n tag: 'qds-badge-indicator',\n shadow: true,\n styleUrl: 'badge-indicator.css',\n})\nexport class BadgeIndicator implements ComponentInterface {\n /**\n * Adds accessible text to the qds-badge-indicator that will be used by\n * screen readers.\n *\n * @example\n * <qds-badge-indicator description=\"success\"></qds-badge-indicator>\n * // This qds-badge-indicator will be read by screen readers as \"success\"\n */\n @Prop() public readonly description?: string\n\n /**\n * The badge indicator's size.\n */\n @Prop() public readonly size?: BadgeIndicatorSize = 'standard'\n\n /**\n * The badge indicator's status.\n */\n @Prop() public readonly status?: BadgeIndicatorStatus = 'neutral'\n\n /**\n * Shows a stroke ring around the badge indicator for better visibility.\n */\n @Prop() public readonly strokeRing: boolean = false\n\n get #computedStatus(): BadgeIndicatorStatus {\n switch (this.status) {\n case 'error':\n case 'info':\n case 'success':\n case 'warning': {\n return this.status\n }\n default: {\n return 'neutral'\n }\n }\n }\n\n get #computedSize(): BadgeIndicatorSize {\n switch (this.size) {\n case 'hero':\n case 'large':\n case 'small': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n public render() {\n return (\n <div\n class={{\n 'qds-badge-indicator': true,\n 'qds-stroke-ring': this.strokeRing,\n }}\n data-size={this.#computedSize}\n data-status={this.#computedStatus}\n >\n <span class=\"qds-sr-only\">{this.description}</span>\n </div>\n )\n }\n}\n"],"names":["h","__classPrivateFieldGet"],"mappings":";;;;;;;;;AAAA,MAAM,eAAe,GAAG,i1EAAi1E;;ACAz2E;AACA;AACA;;;;;;;;;MAwBa,YAAY,GAAA,MAAA;AALzB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAgBE;;AAEG;AACqB,QAAA,IAAU,CAAA,UAAA,GAA4B,UAAU;AAExE;;AAEG;AACqB,QAAA,IAAI,CAAA,IAAA,GAAsB,UAAU;AAE5D;;AAEG;AACqB,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;AA4DpD;IAfQ,MAAM,GAAA;QACX,QACEA,OACE,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE;AACL,gBAAA,mBAAmB,EAAE,IAAI;gBACzB,iBAAiB,EAAE,IAAI,CAAC,UAAU;aACnC,EAAA,iBAAA,EACgBC,yBAAA,IAAI,EAAA,uBAAA,EAAA,GAAA,EAAA,oCAAA,CAAoB,EAC9B,WAAA,EAAAA,wBAAA,CAAA,IAAI,EAAc,uBAAA,EAAA,GAAA,EAAA,8BAAA,CAAA,EAAA,EAE5BA,wBAAA,CAAA,IAAI,EAAe,uBAAA,EAAA,GAAA,EAAA,+BAAA,CAAA,EACpBD,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,aAAa,EAAE,EAAA,IAAI,CAAC,WAAW,CAAQ,CAC9C;;;;AAjDT,IAAA,MAAM,KAAK,GACT,OAAO,IAAI,CAAC,KAAK,KAAK;UAClB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE;AAChC;aACG,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,GAAG,CAAC;IAChC,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC;AAAE,QAAA,OAAO,EAAE;AAE/C,IAAA,OAAO,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC,QAAQ,EAAE,GAAG,KAAK;AAC/C,CAAC,EAAA,oCAAA,GAAA,SAAA,oCAAA,GAAA;AAGC,IAAA,QAAQ,IAAI,CAAC,UAAU;AACrB,QAAA,KAAK,SAAS;AACd,QAAA,KAAK,aAAa;AAClB,QAAA,KAAK,qBAAqB;QAC1B,KAAK,YAAY,EAAE;YACjB,OAAO,IAAI,CAAC,UAAU;;QAExB,SAAS;AACP,YAAA,OAAO,UAAU;;;AAGvB,CAAC,EAAA,8BAAA,GAAA,SAAA,8BAAA,GAAA;AAGC,IAAA,QAAQ,IAAI,CAAC,IAAI;AACf,QAAA,KAAK,MAAM;AACX,QAAA,KAAK,OAAO;QACZ,KAAK,OAAO,EAAE;YACZ,OAAO,IAAI,CAAC,IAAI;;QAElB,SAAS;AACP,YAAA,OAAO,UAAU;;;AAGvB,CAAC;;;AC7FH,MAAM,iBAAiB,GAAG,y+DAAy+D;;ACAngE;AACA;AACA;;;;;;;;;MAqBa,cAAc,GAAA,MAAA;AAL3B,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAgBE;;AAEG;AACqB,QAAA,IAAI,CAAA,IAAA,GAAwB,UAAU;AAE9D;;AAEG;AACqB,QAAA,IAAM,CAAA,MAAA,GAA0B,SAAS;AAEjE;;AAEG;AACqB,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;AA2CpD;IAdQ,MAAM,GAAA;QACX,QACEA,OACE,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE;AACL,gBAAA,qBAAqB,EAAE,IAAI;gBAC3B,iBAAiB,EAAE,IAAI,CAAC,UAAU;aACnC,EAAA,WAAA,EACU,uBAAA,IAAI,EAAA,yBAAA,EAAA,GAAA,EAAA,gCAAA,CAAc,EAChB,aAAA,EAAA,sBAAA,CAAA,IAAI,EAAgB,yBAAA,EAAA,GAAA,EAAA,kCAAA,CAAA,EAAA,EAEjCA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,aAAa,EAAE,EAAA,IAAI,CAAC,WAAW,CAAQ,CAC/C;;;;AArCR,IAAA,QAAQ,IAAI,CAAC,MAAM;AACjB,QAAA,KAAK,OAAO;AACZ,QAAA,KAAK,MAAM;AACX,QAAA,KAAK,SAAS;QACd,KAAK,SAAS,EAAE;YACd,OAAO,IAAI,CAAC,MAAM;;QAEpB,SAAS;AACP,YAAA,OAAO,SAAS;;;AAGtB,CAAC,EAAA,gCAAA,GAAA,SAAA,gCAAA,GAAA;AAGC,IAAA,QAAQ,IAAI,CAAC,IAAI;AACf,QAAA,KAAK,MAAM;AACX,QAAA,KAAK,OAAO;QACZ,KAAK,OAAO,EAAE;YACZ,OAAO,IAAI,CAAC,IAAI;;QAElB,SAAS;AACP,YAAA,OAAO,UAAU;;;AAGvB,CAAC;;;;;;"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* SPDX-FileCopyrightText: © 2026 Schneider Electric
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
var index = require('./index-DIY7gpXM.js');
|
|
9
|
+
|
|
10
|
+
const badgeCounterCss = ":host([hidden]){display:none!important}:host{display:inline-block}.qds-badge-counter{align-items:center;background-color:var(--qds-theme-feedback-message-neutral);border-radius:var(--qds-feedback-rounded-border-radius);color:var(--qds-theme-feedback-message-neutral-contrast);display:flex;font:var(--qds-feedback-badge-counter-standard-text);height:var(--qds-feedback-badge-counter-standard-height);justify-content:center;margin:0;padding-inline:var(--qds-feedback-badge-counter-standard-padding-horizontal);text-align:center}.qds-stroke-ring{border:var(--qds-feedback-badge-border-width) solid var(--qds-theme-feedback-message-neutral-contrast)}.qds-sr-only{clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}[data-importance=emphasized]{background-color:var(--qds-theme-signature-color-contrast);color:var(--qds-theme-signature-color-default)}.qds-stroke-ring[data-importance=emphasized]{border-color:var(--qds-theme-signature-color-default)}[data-importance=subdued]{background-color:var(--qds-theme-feedback-message-informational);color:var(--qds-theme-feedback-message-informational-contrast)}.qds-stroke-ring[data-importance=subdued]{border-color:var(--qds-theme-feedback-message-informational-contrast)}[data-importance=destructive]{background-color:var(--qds-theme-feedback-message-critical-contrast);color:var(--qds-theme-feedback-message-critical)}.qds-stroke-ring[data-importance=destructive]{border-color:var(--qds-theme-feedback-message-critical)}[data-importance=subdued-destructive]{background-color:var(--qds-theme-feedback-message-critical);color:var(--qds-theme-feedback-message-critical-contrast)}.qds-stroke-ring[data-importance=subdued-destructive]{border-color:var(--qds-theme-feedback-message-critical-contrast)}[data-size=small]{font:var(--qds-feedback-badge-counter-small-text);height:var(--qds-feedback-badge-counter-small-height);padding-inline:var(--qds-feedback-badge-counter-small-padding-horizontal)}[data-size=large]{font:var(--qds-feedback-badge-counter-large-text);height:var(--qds-feedback-badge-counter-large-height);padding-inline:var(--qds-feedback-badge-counter-large-padding-horizontal)}[data-size=hero]{font:var(--qds-feedback-badge-counter-hero-text);height:var(--qds-feedback-badge-counter-hero-height);padding-inline:var(--qds-feedback-badge-counter-hero-padding-horizontal)}";
|
|
11
|
+
|
|
12
|
+
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
15
|
+
var __classPrivateFieldGet$1 = (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 _BadgeCounter_instances, _BadgeCounter_computedValue_get, _BadgeCounter_computedImportance_get, _BadgeCounter_computedSize_get;
|
|
23
|
+
const BadgeCounter = class {
|
|
24
|
+
constructor(hostRef) {
|
|
25
|
+
index.registerInstance(this, hostRef);
|
|
26
|
+
_BadgeCounter_instances.add(this);
|
|
27
|
+
/**
|
|
28
|
+
* The badge counter's importance.
|
|
29
|
+
*/
|
|
30
|
+
this.importance = 'standard';
|
|
31
|
+
/**
|
|
32
|
+
* The badge counter's size.
|
|
33
|
+
*/
|
|
34
|
+
this.size = 'standard';
|
|
35
|
+
/**
|
|
36
|
+
* Shows a stroke ring around the component for better visibility
|
|
37
|
+
*/
|
|
38
|
+
this.strokeRing = false;
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
return (index.h("span", { key: '0a706e1e216c17976c3c04c94ac165e69e860e40', class: {
|
|
42
|
+
'qds-badge-counter': true,
|
|
43
|
+
'qds-stroke-ring': this.strokeRing,
|
|
44
|
+
}, "data-importance": __classPrivateFieldGet$1(this, _BadgeCounter_instances, "a", _BadgeCounter_computedImportance_get), "data-size": __classPrivateFieldGet$1(this, _BadgeCounter_instances, "a", _BadgeCounter_computedSize_get) }, __classPrivateFieldGet$1(this, _BadgeCounter_instances, "a", _BadgeCounter_computedValue_get), index.h("span", { key: 'c68fcbe9899495b2e774567f7cd0058162d7d889', class: "qds-sr-only" }, this.description)));
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
_BadgeCounter_instances = new WeakSet(), _BadgeCounter_computedValue_get = function _BadgeCounter_computedValue_get() {
|
|
48
|
+
const value = typeof this.value === 'string'
|
|
49
|
+
? Number.parseInt(this.value, 10)
|
|
50
|
+
: // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
51
|
+
(this.value ?? Number.NaN);
|
|
52
|
+
if (Number.isNaN(value) || value < 0)
|
|
53
|
+
return '';
|
|
54
|
+
return value < 100 ? value.toString() : '99+';
|
|
55
|
+
}, _BadgeCounter_computedImportance_get = function _BadgeCounter_computedImportance_get() {
|
|
56
|
+
switch (this.importance) {
|
|
57
|
+
case 'subdued':
|
|
58
|
+
case 'destructive':
|
|
59
|
+
case 'subdued-destructive':
|
|
60
|
+
case 'emphasized': {
|
|
61
|
+
return this.importance;
|
|
62
|
+
}
|
|
63
|
+
default: {
|
|
64
|
+
return 'standard';
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}, _BadgeCounter_computedSize_get = function _BadgeCounter_computedSize_get() {
|
|
68
|
+
switch (this.size) {
|
|
69
|
+
case 'hero':
|
|
70
|
+
case 'large':
|
|
71
|
+
case 'small': {
|
|
72
|
+
return this.size;
|
|
73
|
+
}
|
|
74
|
+
default: {
|
|
75
|
+
return 'standard';
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
BadgeCounter.style = badgeCounterCss;
|
|
80
|
+
|
|
81
|
+
const badgeIndicatorCss = ":host([hidden]){display:none!important}:host{display:inline-block}.qds-badge-indicator{align-items:center;background-color:var(--qds-theme-feedback-message-neutral);border-radius:var(--qds-feedback-rounded-border-radius);display:flex;height:var(--qds-badge-indicator-standard-height);justify-content:center;width:var(--qds-badge-indicator-standard-height)}.qds-stroke-ring{border:var(--qds-feedback-badge-border-width) solid var(--qds-theme-feedback-message-neutral-contrast)}.qds-sr-only{clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}[data-status=error]{background-color:var(--qds-theme-feedback-message-critical)}.qds-stroke-ring[data-status=error]{border-color:var(--qds-theme-feedback-message-neutral-contrast)}[data-status=info]{background-color:var(--qds-theme-feedback-message-informational)}.qds-stroke-ring[data-status=info]{border-color:var(--qds-theme-feedback-message-neutral-contrast)}[data-status=neutral]{background-color:var(--qds-theme-feedback-message-neutral)}.qds-stroke-ring[data-status=neutral]{border-color:var(--qds-theme-feedback-message-neutral-contrast)}[data-status=success]{background-color:var(--qds-theme-signature-color-default)}.qds-stroke-ring[data-status=success]{border-color:var(--qds-theme-feedback-message-neutral-contrast)}[data-status=warning]{background-color:var(--qds-theme-feedback-message-important)}.qds-stroke-ring[data-status=warning]{border-color:var(--qds-theme-feedback-message-neutral-contrast)}[data-size=small]{height:var(--qds-feedback-badge-indicator-small-size);width:var(--qds-feedback-badge-indicator-small-size)}[data-size=standard]{height:var(--qds-feedback-badge-indicator-standard-size);width:var(--qds-feedback-badge-indicator-standard-size)}[data-size=large]{height:var(--qds-feedback-badge-indicator-large-size);width:var(--qds-feedback-badge-indicator-large-size)}[data-size=hero]{height:var(--qds-feedback-badge-indicator-hero-size);width:var(--qds-feedback-badge-indicator-hero-size)}";
|
|
82
|
+
|
|
83
|
+
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
84
|
+
//
|
|
85
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
86
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
87
|
+
if (kind === "a" && !f)
|
|
88
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
89
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
90
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
91
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
92
|
+
};
|
|
93
|
+
var _BadgeIndicator_instances, _BadgeIndicator_computedStatus_get, _BadgeIndicator_computedSize_get;
|
|
94
|
+
const BadgeIndicator = class {
|
|
95
|
+
constructor(hostRef) {
|
|
96
|
+
index.registerInstance(this, hostRef);
|
|
97
|
+
_BadgeIndicator_instances.add(this);
|
|
98
|
+
/**
|
|
99
|
+
* The badge indicator's size.
|
|
100
|
+
*/
|
|
101
|
+
this.size = 'standard';
|
|
102
|
+
/**
|
|
103
|
+
* The badge indicator's status.
|
|
104
|
+
*/
|
|
105
|
+
this.status = 'neutral';
|
|
106
|
+
/**
|
|
107
|
+
* Shows a stroke ring around the badge indicator for better visibility.
|
|
108
|
+
*/
|
|
109
|
+
this.strokeRing = false;
|
|
110
|
+
}
|
|
111
|
+
render() {
|
|
112
|
+
return (index.h("div", { key: '1442d3293846a5f18a87297abc5e53755aebe4b6', class: {
|
|
113
|
+
'qds-badge-indicator': true,
|
|
114
|
+
'qds-stroke-ring': this.strokeRing,
|
|
115
|
+
}, "data-size": __classPrivateFieldGet(this, _BadgeIndicator_instances, "a", _BadgeIndicator_computedSize_get), "data-status": __classPrivateFieldGet(this, _BadgeIndicator_instances, "a", _BadgeIndicator_computedStatus_get) }, index.h("span", { key: 'f2131c0350fa5b857cb1b10b8f2fb276d3f52bb6', class: "qds-sr-only" }, this.description)));
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
_BadgeIndicator_instances = new WeakSet(), _BadgeIndicator_computedStatus_get = function _BadgeIndicator_computedStatus_get() {
|
|
119
|
+
switch (this.status) {
|
|
120
|
+
case 'error':
|
|
121
|
+
case 'info':
|
|
122
|
+
case 'success':
|
|
123
|
+
case 'warning': {
|
|
124
|
+
return this.status;
|
|
125
|
+
}
|
|
126
|
+
default: {
|
|
127
|
+
return 'neutral';
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}, _BadgeIndicator_computedSize_get = function _BadgeIndicator_computedSize_get() {
|
|
131
|
+
switch (this.size) {
|
|
132
|
+
case 'hero':
|
|
133
|
+
case 'large':
|
|
134
|
+
case 'small': {
|
|
135
|
+
return this.size;
|
|
136
|
+
}
|
|
137
|
+
default: {
|
|
138
|
+
return 'standard';
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
BadgeIndicator.style = badgeIndicatorCss;
|
|
143
|
+
|
|
144
|
+
exports.qds_badge_counter = BadgeCounter;
|
|
145
|
+
exports.qds_badge_indicator = BadgeIndicator;
|
|
146
|
+
//# sourceMappingURL=qds-badge-counter.qds-badge-indicator.entry.cjs.js.map
|