@quartzds/core 1.0.0-beta.12 → 1.0.0-beta.120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1895 -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-5RFBIepu.js +112 -0
- package/components/p-5RFBIepu.js.map +1 -0
- package/components/p-B03FWheS.js +393 -0
- package/components/p-B03FWheS.js.map +1 -0
- package/components/p-BkBJDD6Y.js +274 -0
- package/components/p-BkBJDD6Y.js.map +1 -0
- package/components/p-BkgfW_tl.js +282 -0
- package/components/p-BkgfW_tl.js.map +1 -0
- package/components/p-Bnc7Puxx.js +164 -0
- package/components/p-Bnc7Puxx.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-CDRwHAIT.js +105 -0
- package/components/p-CDRwHAIT.js.map +1 -0
- package/components/p-CFVg7I9T.js +269 -0
- package/components/p-CFVg7I9T.js.map +1 -0
- package/components/p-CRVPDKfO.js +163 -0
- package/components/p-CRVPDKfO.js.map +1 -0
- package/components/p-CXP6q9Mr.js +286 -0
- package/components/p-CXP6q9Mr.js.map +1 -0
- package/components/p-CZRW1LV_.js +28 -0
- package/components/p-CZRW1LV_.js.map +1 -0
- package/components/p-D2489VzR.js +2133 -0
- package/components/p-D2489VzR.js.map +1 -0
- package/components/p-DeRqCYmp.js +102 -0
- package/components/p-DeRqCYmp.js.map +1 -0
- package/components/p-DnZdwX0l.js +149 -0
- package/components/p-DnZdwX0l.js.map +1 -0
- package/components/p-Dsc0-aXK.js +162 -0
- package/components/p-Dsc0-aXK.js.map +1 -0
- package/components/p-DwxIJEUj.js +91 -0
- package/components/p-DwxIJEUj.js.map +1 -0
- package/components/p-U2Q0vF-d.js +96 -0
- package/components/p-U2Q0vF-d.js.map +1 -0
- package/components/p-eFhV8w2l.js +428 -0
- package/components/p-eFhV8w2l.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 +548 -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 +363 -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-BIL8yXqA.js +303 -0
- package/dist/cjs/helpers-BIL8yXqA.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 +473 -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 +319 -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 +12056 -2304
- package/dist/docs.d.ts +344 -240
- package/dist/docs.json +13125 -3360
- 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-BgaJNF9u.js +286 -0
- package/dist/esm/helpers-BgaJNF9u.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 +473 -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 +317 -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 +431 -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 +203 -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 +4403 -959
- 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 +2365 -445
- package/hydrate/index.d.ts +73 -18
- package/hydrate/index.js +28020 -9256
- package/hydrate/index.mjs +28907 -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
|
@@ -1,227 +1,391 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SPDX-FileCopyrightText: ©
|
|
2
|
+
* SPDX-FileCopyrightText: © 2026 Schneider Electric
|
|
3
3
|
*
|
|
4
|
-
* SPDX-License-Identifier:
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
var index = require('./index-DIY7gpXM.js');
|
|
9
|
+
var floatingUi_dom = require('./floating-ui.dom-Bvzubd50.js');
|
|
10
|
+
var helpers = require('./helpers-BIL8yXqA.js');
|
|
9
11
|
|
|
10
|
-
const
|
|
11
|
-
const floatingUi_dom_esm = require('./floating-ui.dom.esm-7f1cac3e.js');
|
|
12
|
-
const helpers = require('./helpers-452256e8.js');
|
|
13
|
-
|
|
14
|
-
const dropdownCss = ":host{box-sizing:border-box}:host([hidden]){display:none !important}:host([hidden]){}:host *,:host *::before,:host *::after{box-sizing:inherit}:host{background:var(--qds-theme-accessory-background);border-radius:var(--qds-accessory-border-radius);box-shadow:var(--qds-theme-accessory-elevation);display:inline-block;left:0;top:0}";
|
|
12
|
+
const dropdownCss = ":host([hidden]){display:none!important}:host{background-color:var(--qds-theme-popup-background);border:none;border-radius:var(--qds-popup-border-radius);box-shadow:var(--qds-popup-elevation);box-sizing:border-box;display:inline-block;inset:unset;margin:0;overflow:initial;padding:0}";
|
|
15
13
|
|
|
14
|
+
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
15
|
+
//
|
|
16
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
18
|
+
if (kind === "m")
|
|
19
|
+
throw new TypeError("Private method is not writable");
|
|
20
|
+
if (kind === "a" && !f)
|
|
21
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
22
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
23
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
24
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
25
|
+
};
|
|
26
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
27
|
+
if (kind === "a" && !f)
|
|
28
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
29
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
30
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
31
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
32
|
+
};
|
|
33
|
+
var _Dropdown_instances, _Dropdown_cleanup, _Dropdown_Items, _Dropdown_gap, _Dropdown_middleware, _Dropdown_referenceElement, _Dropdown_open, _Dropdown_opened, _Dropdown_onFocusout, _Dropdown_focusOnTrigger, _Dropdown_onKeydown, _Dropdown_onReferenceClick, _Dropdown_focusFirstItem, _Dropdown_disconnectReferenceElement, _Dropdown_boundOnFocusout, _Dropdown_boundOnKeydown, _Dropdown_boundOnReferenceClick, _Dropdown_onSlotchange;
|
|
16
34
|
let autoIncrementingId = 1;
|
|
35
|
+
const isQdsButton = (element) => element.tagName.toLowerCase() === 'qds-button';
|
|
36
|
+
const ALLOWED_TAGS = new Set([
|
|
37
|
+
'qds-action-item',
|
|
38
|
+
'qds-menu-item',
|
|
39
|
+
'qds-list-item',
|
|
40
|
+
]);
|
|
41
|
+
const isEnabledItem = (element) => element instanceof HTMLElement &&
|
|
42
|
+
ALLOWED_TAGS.has(element.tagName.toLowerCase()) &&
|
|
43
|
+
!element.hasAttribute('disabled') &&
|
|
44
|
+
!element.inert;
|
|
17
45
|
const Dropdown = class {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
constructor(hostRef) {
|
|
47
|
+
index.registerInstance(this, hostRef);
|
|
48
|
+
this.cancelEmitter = index.createEvent(this, "qdsCancel", 3);
|
|
49
|
+
this.closeEmitter = index.createEvent(this, "qdsClose", 2);
|
|
50
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
51
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
55
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
56
|
+
}
|
|
57
|
+
_Dropdown_instances.add(this);
|
|
58
|
+
/**
|
|
59
|
+
* Prevents the dropdown from being shown by user interaction. The dropdown
|
|
60
|
+
* can still be displayed by calling the `show()` method.
|
|
61
|
+
*/
|
|
62
|
+
this.disabled = false;
|
|
63
|
+
/**
|
|
64
|
+
* Disable Floating UI's
|
|
65
|
+
* [`flip` middleware](https://floating-ui.com/docs/flip).
|
|
66
|
+
*/
|
|
67
|
+
this.noFlip = false;
|
|
68
|
+
/**
|
|
69
|
+
* Disable Floating UI's
|
|
70
|
+
* [`shift` middleware](https://floating-ui.com/docs/shift).
|
|
71
|
+
*/
|
|
72
|
+
this.noShift = false;
|
|
73
|
+
/**
|
|
74
|
+
* Where to place the dropdown relative to the `target`.
|
|
75
|
+
*
|
|
76
|
+
* @see https://floating-ui.com/docs/tutorial#placements
|
|
77
|
+
*/
|
|
78
|
+
this.placement = 'bottom-start';
|
|
79
|
+
/**
|
|
80
|
+
* By default, the dropdown is closed when an item is selected. This attribute will keep it open instead. Useful for
|
|
81
|
+
* dropdowns that allow for multiple interactions.
|
|
82
|
+
*/
|
|
83
|
+
this.keepOpenOnSelect = false;
|
|
84
|
+
_Dropdown_cleanup.set(this, void 0);
|
|
85
|
+
_Dropdown_Items.set(this, []);
|
|
86
|
+
_Dropdown_gap.set(this, 0);
|
|
87
|
+
_Dropdown_middleware.set(this, void 0);
|
|
88
|
+
_Dropdown_referenceElement.set(this, void 0);
|
|
89
|
+
_Dropdown_open.set(this, false
|
|
90
|
+
/**
|
|
91
|
+
* Whether the dropdown has been opened at least once.
|
|
92
|
+
* This is used to determine whether the dropdown should update its position, gap
|
|
93
|
+
* and middleware when it is opened.
|
|
94
|
+
*/
|
|
95
|
+
);
|
|
96
|
+
/**
|
|
97
|
+
* Whether the dropdown has been opened at least once.
|
|
98
|
+
* This is used to determine whether the dropdown should update its position, gap
|
|
99
|
+
* and middleware when it is opened.
|
|
100
|
+
*/
|
|
101
|
+
_Dropdown_opened.set(this, false
|
|
102
|
+
/**
|
|
103
|
+
* Updates the gap between the dropdown and its target element.
|
|
104
|
+
*/
|
|
105
|
+
);
|
|
106
|
+
_Dropdown_onFocusout.set(this, async (event) => {
|
|
107
|
+
if (!(event instanceof FocusEvent))
|
|
108
|
+
return;
|
|
109
|
+
const { relatedTarget } = event;
|
|
110
|
+
const dropdownItem = __classPrivateFieldGet(this, _Dropdown_Items, "f").find((item) => item === relatedTarget);
|
|
111
|
+
if (relatedTarget instanceof globalThis.Element &&
|
|
112
|
+
!this.host.contains(relatedTarget) &&
|
|
113
|
+
__classPrivateFieldGet(this, _Dropdown_referenceElement, "f") !== relatedTarget &&
|
|
114
|
+
!dropdownItem)
|
|
115
|
+
await this.close();
|
|
116
|
+
});
|
|
117
|
+
_Dropdown_onKeydown.set(this, async (event) => {
|
|
118
|
+
if (!(event instanceof KeyboardEvent))
|
|
119
|
+
return;
|
|
120
|
+
const { key, target } = event;
|
|
121
|
+
if (key === 'Enter' && !this.keepOpenOnSelect && isEnabledItem(target)) {
|
|
122
|
+
await this.close();
|
|
123
|
+
__classPrivateFieldGet(this, _Dropdown_instances, "m", _Dropdown_focusOnTrigger).call(this);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
if (key === 'Escape' &&
|
|
127
|
+
(target === __classPrivateFieldGet(this, _Dropdown_referenceElement, "f") ||
|
|
128
|
+
(target instanceof globalThis.Element &&
|
|
129
|
+
helpers.closestElement('qds-dropdown', target) === this.host))) {
|
|
130
|
+
const cancelEvent = this.cancelEmitter.emit();
|
|
131
|
+
if (cancelEvent.defaultPrevented)
|
|
132
|
+
return;
|
|
133
|
+
await this.close();
|
|
134
|
+
__classPrivateFieldGet(this, _Dropdown_instances, "m", _Dropdown_focusOnTrigger).call(this);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (target === __classPrivateFieldGet(this, _Dropdown_referenceElement, "f") &&
|
|
138
|
+
(key === 'ArrowDown' || key === 'ArrowUp')) {
|
|
139
|
+
if (!__classPrivateFieldGet(this, _Dropdown_open, "f"))
|
|
140
|
+
await this.show();
|
|
141
|
+
__classPrivateFieldGet(this, _Dropdown_instances, "m", _Dropdown_focusFirstItem).call(this);
|
|
142
|
+
event.preventDefault();
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
if (!helpers.VERTICAL_MOVE_KEYS.has(key))
|
|
146
|
+
return;
|
|
147
|
+
const Items = __classPrivateFieldGet(this, _Dropdown_Items, "f").filter((item) => isEnabledItem(item) &&
|
|
148
|
+
helpers.closestElement('qds-dropdown', item) === this.host);
|
|
149
|
+
if (Items.length === 0)
|
|
150
|
+
return;
|
|
151
|
+
event.preventDefault();
|
|
152
|
+
event.stopPropagation();
|
|
153
|
+
const currentIndex = Items.findIndex((item) => item.getAttribute('tabindex') === '0');
|
|
154
|
+
let nextIndex = currentIndex;
|
|
155
|
+
switch (key) {
|
|
156
|
+
case 'ArrowUp': {
|
|
157
|
+
nextIndex = currentIndex > 0 ? currentIndex - 1 : Items.length - 1;
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
case 'ArrowDown': {
|
|
161
|
+
nextIndex = currentIndex < Items.length - 1 ? currentIndex + 1 : 0;
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
case 'Home': {
|
|
165
|
+
nextIndex = 0;
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
case 'End': {
|
|
169
|
+
nextIndex = Items.length - 1;
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
default: {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
const nextItem = Items[nextIndex];
|
|
177
|
+
for (const [index, item] of Items.entries()) {
|
|
178
|
+
item.setAttribute('tabindex', index === nextIndex ? '0' : '-1');
|
|
179
|
+
}
|
|
180
|
+
nextItem.focus();
|
|
181
|
+
event.preventDefault();
|
|
182
|
+
});
|
|
183
|
+
_Dropdown_onReferenceClick.set(this, async () => {
|
|
184
|
+
if (this.disabled)
|
|
185
|
+
return;
|
|
186
|
+
if (__classPrivateFieldGet(this, _Dropdown_open, "f")) {
|
|
187
|
+
await this.close();
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
await this.show();
|
|
191
|
+
__classPrivateFieldGet(this, _Dropdown_instances, "m", _Dropdown_focusFirstItem).call(this);
|
|
192
|
+
});
|
|
193
|
+
_Dropdown_boundOnFocusout.set(this, (event) => {
|
|
194
|
+
helpers.ignorePromise(__classPrivateFieldGet(this, _Dropdown_onFocusout, "f").call(this, event));
|
|
195
|
+
});
|
|
196
|
+
_Dropdown_boundOnKeydown.set(this, (event) => {
|
|
197
|
+
helpers.ignorePromise(__classPrivateFieldGet(this, _Dropdown_onKeydown, "f").call(this, event));
|
|
198
|
+
});
|
|
199
|
+
_Dropdown_boundOnReferenceClick.set(this, () => {
|
|
200
|
+
helpers.ignorePromise(__classPrivateFieldGet(this, _Dropdown_onReferenceClick, "f").call(this));
|
|
201
|
+
});
|
|
202
|
+
_Dropdown_onSlotchange.set(this, (event) => {
|
|
203
|
+
const slot = event.target;
|
|
204
|
+
const assignedElements = slot.assignedElements({ flatten: true });
|
|
205
|
+
__classPrivateFieldSet(this, _Dropdown_Items, assignedElements.filter((element) => isEnabledItem(element)), "f");
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Updates the gap between the dropdown and its target element.
|
|
210
|
+
*/
|
|
211
|
+
async updateGap() {
|
|
212
|
+
__classPrivateFieldSet(this, _Dropdown_gap, helpers.propertyToPx(this.host, '--qds-accessory-gap-floating') ?? 0, "f");
|
|
213
|
+
await this.updateMiddleware();
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Shows the dropdown.
|
|
217
|
+
*/
|
|
218
|
+
async show() {
|
|
219
|
+
if (__classPrivateFieldGet(this, _Dropdown_open, "f"))
|
|
220
|
+
return;
|
|
221
|
+
const reference = __classPrivateFieldGet(this, _Dropdown_referenceElement, "f");
|
|
222
|
+
const { host } = this;
|
|
223
|
+
if (reference instanceof globalThis.Element) {
|
|
224
|
+
reference.setAttribute('aria-expanded', 'true');
|
|
225
|
+
reference.setAttribute('aria-controls', host.id);
|
|
226
|
+
host.setAttribute('aria-labelledby', reference.id);
|
|
227
|
+
if (!reference.hasAttribute('aria-haspopup'))
|
|
228
|
+
reference.setAttribute('aria-haspopup', 'true');
|
|
229
|
+
if (isQdsButton(reference) && reference.action === 'dropdown')
|
|
230
|
+
reference.action = 'dropdown-close';
|
|
231
|
+
}
|
|
232
|
+
if (!__classPrivateFieldGet(this, _Dropdown_opened, "f")) {
|
|
233
|
+
await this.updateGap();
|
|
234
|
+
__classPrivateFieldSet(this, _Dropdown_opened, true, "f");
|
|
235
|
+
}
|
|
236
|
+
this.startAutoUpdate();
|
|
237
|
+
__classPrivateFieldSet(this, _Dropdown_open, true, "f");
|
|
238
|
+
host.hidden = false;
|
|
239
|
+
host.showPopover();
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Closes the dropdown.
|
|
243
|
+
*/
|
|
244
|
+
async close() {
|
|
245
|
+
if (!__classPrivateFieldGet(this, _Dropdown_open, "f"))
|
|
246
|
+
return;
|
|
247
|
+
if (__classPrivateFieldGet(this, _Dropdown_referenceElement, "f") instanceof globalThis.Element) {
|
|
248
|
+
__classPrivateFieldGet(this, _Dropdown_referenceElement, "f").setAttribute('aria-expanded', 'false');
|
|
249
|
+
__classPrivateFieldGet(this, _Dropdown_referenceElement, "f").removeAttribute('aria-controls');
|
|
250
|
+
if (isQdsButton(__classPrivateFieldGet(this, _Dropdown_referenceElement, "f")) &&
|
|
251
|
+
__classPrivateFieldGet(this, _Dropdown_referenceElement, "f").action === 'dropdown-close')
|
|
252
|
+
__classPrivateFieldGet(this, _Dropdown_referenceElement, "f").action = 'dropdown';
|
|
253
|
+
}
|
|
254
|
+
if (__classPrivateFieldGet(this, _Dropdown_cleanup, "f"))
|
|
255
|
+
__classPrivateFieldGet(this, _Dropdown_cleanup, "f").call(this);
|
|
256
|
+
__classPrivateFieldSet(this, _Dropdown_open, false, "f");
|
|
257
|
+
this.host.hidden = true;
|
|
258
|
+
this.host.hidePopover();
|
|
259
|
+
this.closeEmitter.emit();
|
|
260
|
+
}
|
|
261
|
+
async handleMouseDown(event) {
|
|
262
|
+
if (!__classPrivateFieldGet(this, _Dropdown_open, "f"))
|
|
263
|
+
return;
|
|
264
|
+
const composedPath = event.composedPath();
|
|
265
|
+
const withinBounds = composedPath.includes(this.host) ||
|
|
266
|
+
(__classPrivateFieldGet(this, _Dropdown_referenceElement, "f") instanceof globalThis.Element &&
|
|
267
|
+
composedPath.includes(__classPrivateFieldGet(this, _Dropdown_referenceElement, "f")));
|
|
268
|
+
if (!withinBounds)
|
|
269
|
+
await this.close();
|
|
270
|
+
}
|
|
271
|
+
async onItemClick(event) {
|
|
272
|
+
if (!this.keepOpenOnSelect && isEnabledItem(event.target)) {
|
|
273
|
+
await this.close();
|
|
274
|
+
}
|
|
56
275
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
276
|
+
async updateReferenceElement() {
|
|
277
|
+
var _a;
|
|
278
|
+
__classPrivateFieldGet(this, _Dropdown_instances, "m", _Dropdown_disconnectReferenceElement).call(this);
|
|
279
|
+
__classPrivateFieldSet(this, _Dropdown_referenceElement, helpers.resolveTarget(this.target), "f");
|
|
280
|
+
if (!(__classPrivateFieldGet(this, _Dropdown_referenceElement, "f") instanceof globalThis.Element))
|
|
281
|
+
return;
|
|
282
|
+
__classPrivateFieldGet(this, _Dropdown_referenceElement, "f").setAttribute('aria-expanded', 'false');
|
|
283
|
+
__classPrivateFieldGet(this, _Dropdown_referenceElement, "f").addEventListener('click', __classPrivateFieldGet(this, _Dropdown_boundOnReferenceClick, "f"));
|
|
284
|
+
__classPrivateFieldGet(this, _Dropdown_referenceElement, "f").addEventListener('focusout', __classPrivateFieldGet(this, _Dropdown_boundOnFocusout, "f"));
|
|
285
|
+
__classPrivateFieldGet(this, _Dropdown_referenceElement, "f").addEventListener('keydown', __classPrivateFieldGet(this, _Dropdown_boundOnKeydown, "f"));
|
|
286
|
+
if (this.host.role === 'menu') {
|
|
287
|
+
(_a = __classPrivateFieldGet(this, _Dropdown_referenceElement, "f")).id || (_a.id = `qds-dropdown-trigger-${autoIncrementingId}`);
|
|
288
|
+
this.host.setAttribute('aria-labelledby', __classPrivateFieldGet(this, _Dropdown_referenceElement, "f").id);
|
|
289
|
+
}
|
|
70
290
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
(this.referenceElement instanceof globalThis.Element &&
|
|
89
|
-
composedPath.includes(this.referenceElement));
|
|
90
|
-
if (!withinBounds)
|
|
91
|
-
await this.close();
|
|
92
|
-
}
|
|
93
|
-
async updateReferenceElement() {
|
|
94
|
-
var _a;
|
|
95
|
-
this.disconnectReferenceElement();
|
|
96
|
-
const resolvedTarget = typeof this.target === 'function' ? this.target() : this.target;
|
|
97
|
-
if (typeof resolvedTarget === 'string') {
|
|
98
|
-
const element = document.querySelector(resolvedTarget);
|
|
99
|
-
if (element === null)
|
|
100
|
-
throw new Error('String `target` must resolve to an Element.');
|
|
101
|
-
this.referenceElement = element;
|
|
291
|
+
async updateMiddleware() {
|
|
292
|
+
__classPrivateFieldSet(this, _Dropdown_middleware, [
|
|
293
|
+
floatingUi_dom.offset({
|
|
294
|
+
...this.offsetOptions,
|
|
295
|
+
mainAxis: __classPrivateFieldGet(this, _Dropdown_gap, "f"),
|
|
296
|
+
}),
|
|
297
|
+
!this.noFlip &&
|
|
298
|
+
floatingUi_dom.flip({
|
|
299
|
+
crossAxis: this.noShift,
|
|
300
|
+
...this.flipOptions,
|
|
301
|
+
}),
|
|
302
|
+
!this.noShift &&
|
|
303
|
+
floatingUi_dom.shift({
|
|
304
|
+
limiter: floatingUi_dom.limitShift(),
|
|
305
|
+
...this.shiftOptions,
|
|
306
|
+
}),
|
|
307
|
+
], "f");
|
|
102
308
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
309
|
+
async updatePosition() {
|
|
310
|
+
if (!__classPrivateFieldGet(this, _Dropdown_referenceElement, "f"))
|
|
311
|
+
return;
|
|
312
|
+
const { x, y, strategy } = await floatingUi_dom.computePosition(__classPrivateFieldGet(this, _Dropdown_referenceElement, "f"), this.host, {
|
|
313
|
+
middleware: __classPrivateFieldGet(this, _Dropdown_middleware, "f"),
|
|
314
|
+
placement: this.placement,
|
|
315
|
+
strategy: this.strategy,
|
|
316
|
+
});
|
|
317
|
+
Object.assign(this.host.style, {
|
|
318
|
+
position: strategy,
|
|
319
|
+
left: `${x}px`,
|
|
320
|
+
top: `${y}px`,
|
|
321
|
+
});
|
|
114
322
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
323
|
+
startAutoUpdate() {
|
|
324
|
+
if (!__classPrivateFieldGet(this, _Dropdown_referenceElement, "f"))
|
|
325
|
+
return;
|
|
326
|
+
if (__classPrivateFieldGet(this, _Dropdown_cleanup, "f"))
|
|
327
|
+
__classPrivateFieldGet(this, _Dropdown_cleanup, "f").call(this);
|
|
328
|
+
__classPrivateFieldSet(this, _Dropdown_cleanup, floatingUi_dom.autoUpdate(__classPrivateFieldGet(this, _Dropdown_referenceElement, "f"), this.host, () => {
|
|
329
|
+
helpers.ignorePromise(this.updatePosition());
|
|
330
|
+
}, this.autoUpdateOptions), "f");
|
|
331
|
+
}
|
|
332
|
+
async componentWillLoad() {
|
|
333
|
+
var _a;
|
|
334
|
+
this.host.hidden = true;
|
|
335
|
+
this.host.popover = 'manual';
|
|
336
|
+
this.internals.role = 'menu';
|
|
337
|
+
(_a = this.host).id || (_a.id = `qds-dropdown-${autoIncrementingId}`);
|
|
338
|
+
await this.updateReferenceElement();
|
|
339
|
+
autoIncrementingId += 1;
|
|
340
|
+
}
|
|
341
|
+
disconnectedCallback() {
|
|
342
|
+
__classPrivateFieldGet(this, _Dropdown_instances, "m", _Dropdown_disconnectReferenceElement).call(this);
|
|
343
|
+
}
|
|
344
|
+
render() {
|
|
345
|
+
return (index.h(index.Host, { key: '052f625928e9ace10076f39b8a4d7f84b238c407', onKeyDown: __classPrivateFieldGet(this, _Dropdown_onKeydown, "f"), onFocusout: __classPrivateFieldGet(this, _Dropdown_onFocusout, "f") }, index.h("slot", { key: '962dc5ef2ae9a6249c124bfc7e1a6e18fff2957e', onSlotchange: __classPrivateFieldGet(this, _Dropdown_onSlotchange, "f") })));
|
|
346
|
+
}
|
|
347
|
+
static get delegatesFocus() { return true; }
|
|
348
|
+
get host() { return index.getElement(this); }
|
|
349
|
+
static get watchers() { return {
|
|
350
|
+
"target": ["updateReferenceElement"],
|
|
351
|
+
"flipOptions": ["updateMiddleware"],
|
|
352
|
+
"noFlip": ["updateMiddleware"],
|
|
353
|
+
"noShift": ["updateMiddleware"],
|
|
354
|
+
"offsetOptions": ["updateMiddleware"],
|
|
355
|
+
"shiftOptions": ["updateMiddleware"],
|
|
356
|
+
"middleware": ["updatePosition"],
|
|
357
|
+
"placement": ["updatePosition"],
|
|
358
|
+
"strategy": ["updatePosition"],
|
|
359
|
+
"autoUpdateOptions": ["startAutoUpdate"]
|
|
360
|
+
}; }
|
|
361
|
+
};
|
|
362
|
+
_Dropdown_cleanup = new WeakMap(), _Dropdown_Items = new WeakMap(), _Dropdown_gap = new WeakMap(), _Dropdown_middleware = new WeakMap(), _Dropdown_referenceElement = new WeakMap(), _Dropdown_open = new WeakMap(), _Dropdown_opened = new WeakMap(), _Dropdown_onFocusout = new WeakMap(), _Dropdown_onKeydown = new WeakMap(), _Dropdown_onReferenceClick = new WeakMap(), _Dropdown_boundOnFocusout = new WeakMap(), _Dropdown_boundOnKeydown = new WeakMap(), _Dropdown_boundOnReferenceClick = new WeakMap(), _Dropdown_onSlotchange = new WeakMap(), _Dropdown_instances = new WeakSet(), _Dropdown_focusOnTrigger = function _Dropdown_focusOnTrigger() {
|
|
363
|
+
if (__classPrivateFieldGet(this, _Dropdown_referenceElement, "f") instanceof globalThis.HTMLElement ||
|
|
364
|
+
__classPrivateFieldGet(this, _Dropdown_referenceElement, "f") instanceof globalThis.SVGElement) {
|
|
365
|
+
__classPrivateFieldGet(this, _Dropdown_referenceElement, "f").focus();
|
|
366
|
+
}
|
|
367
|
+
}, _Dropdown_focusFirstItem = function _Dropdown_focusFirstItem() {
|
|
368
|
+
requestAnimationFrame(() => {
|
|
369
|
+
const firstItem = __classPrivateFieldGet(this, _Dropdown_Items, "f").find((item) => item instanceof HTMLElement &&
|
|
370
|
+
isEnabledItem(item) &&
|
|
371
|
+
helpers.closestElement('qds-dropdown', item) === this.host);
|
|
372
|
+
if (!firstItem)
|
|
373
|
+
return;
|
|
374
|
+
for (const item of __classPrivateFieldGet(this, _Dropdown_Items, "f"))
|
|
375
|
+
item.setAttribute('tabindex', '-1');
|
|
376
|
+
firstItem.setAttribute('tabindex', '0');
|
|
377
|
+
firstItem.focus();
|
|
141
378
|
});
|
|
142
|
-
|
|
143
|
-
this.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
helpers.ignorePromise(this.updatePosition());
|
|
151
|
-
}, this.autoUpdateOptions);
|
|
152
|
-
}
|
|
153
|
-
async componentWillLoad() {
|
|
154
|
-
var _a, _b;
|
|
155
|
-
this.hostDisplay = 'none';
|
|
156
|
-
(_a = this.element).role ?? (_a.role = 'menu');
|
|
157
|
-
(_b = this.element).id || (_b.id = `qds-dropdown-${autoIncrementingId}`);
|
|
158
|
-
await this.updateReferenceElement();
|
|
159
|
-
autoIncrementingId += 1;
|
|
160
|
-
await this.updateMiddleware();
|
|
161
|
-
}
|
|
162
|
-
disconnectedCallback() {
|
|
163
|
-
this.disconnectReferenceElement();
|
|
164
|
-
}
|
|
165
|
-
render() {
|
|
166
|
-
return (index.h(index.Host, { "aria-labelledby": this.hostAriaLabelledBy, onKeyDown: this.boundEscape, onFocusout: this.boundFocusout, style: {
|
|
167
|
-
display: this.hostDisplay,
|
|
168
|
-
position: this.hostPosition,
|
|
169
|
-
transform: this.hostTransform,
|
|
170
|
-
} }, index.h("slot", null)));
|
|
171
|
-
}
|
|
172
|
-
async handleFocusOut(event) {
|
|
173
|
-
if (!(event instanceof FocusEvent))
|
|
174
|
-
return;
|
|
175
|
-
const { relatedTarget } = event;
|
|
176
|
-
if (relatedTarget instanceof globalThis.Element &&
|
|
177
|
-
!this.element.contains(relatedTarget) &&
|
|
178
|
-
this.referenceElement !== relatedTarget)
|
|
179
|
-
await this.close();
|
|
180
|
-
}
|
|
181
|
-
async handleEscape(event) {
|
|
182
|
-
if (!(event instanceof KeyboardEvent) ||
|
|
183
|
-
event.key !== 'Escape' ||
|
|
184
|
-
(event.target !== this.referenceElement &&
|
|
185
|
-
event.target instanceof globalThis.Element &&
|
|
186
|
-
event.target.closest('qds-dropdown') !== this.element))
|
|
187
|
-
return;
|
|
188
|
-
const cancelEvent = this.cancelEmitter.emit();
|
|
189
|
-
if (cancelEvent.defaultPrevented)
|
|
190
|
-
return;
|
|
191
|
-
await this.close();
|
|
192
|
-
if (this.referenceElement instanceof globalThis.HTMLElement ||
|
|
193
|
-
this.referenceElement instanceof globalThis.SVGElement)
|
|
194
|
-
this.referenceElement.focus();
|
|
195
|
-
}
|
|
196
|
-
async handleReferenceClick() {
|
|
197
|
-
if (!this.disabled)
|
|
198
|
-
await (this.open ? this.close() : this.show());
|
|
199
|
-
}
|
|
200
|
-
disconnectReferenceElement() {
|
|
201
|
-
this.hostAriaLabelledBy = undefined;
|
|
202
|
-
if (!(this.referenceElement instanceof globalThis.Element))
|
|
203
|
-
return;
|
|
204
|
-
this.referenceElement.removeEventListener('click', this.boundReferenceClick);
|
|
205
|
-
this.referenceElement.removeEventListener('focusout', this.boundFocusout);
|
|
206
|
-
this.referenceElement.removeEventListener('keydown', this.boundEscape);
|
|
207
|
-
this.referenceElement.removeAttribute('aria-expanded');
|
|
208
|
-
this.referenceElement.removeAttribute('aria-controls');
|
|
209
|
-
}
|
|
210
|
-
get element() { return index.getElement(this); }
|
|
211
|
-
static get watchers() { return {
|
|
212
|
-
"target": ["updateReferenceElement"],
|
|
213
|
-
"flipOptions": ["updateMiddleware"],
|
|
214
|
-
"noFlip": ["updateMiddleware"],
|
|
215
|
-
"noShift": ["updateMiddleware"],
|
|
216
|
-
"offsetOptions": ["updateMiddleware"],
|
|
217
|
-
"shiftOptions": ["updateMiddleware"],
|
|
218
|
-
"placement": ["updatePosition"],
|
|
219
|
-
"strategy": ["updatePosition"],
|
|
220
|
-
"autoUpdateOptions": ["startAutoUpdate"]
|
|
221
|
-
}; }
|
|
379
|
+
}, _Dropdown_disconnectReferenceElement = function _Dropdown_disconnectReferenceElement() {
|
|
380
|
+
this.host.removeAttribute('aria-labelledby');
|
|
381
|
+
if (!(__classPrivateFieldGet(this, _Dropdown_referenceElement, "f") instanceof globalThis.Element))
|
|
382
|
+
return;
|
|
383
|
+
__classPrivateFieldGet(this, _Dropdown_referenceElement, "f").removeEventListener('focusout', __classPrivateFieldGet(this, _Dropdown_boundOnFocusout, "f"));
|
|
384
|
+
__classPrivateFieldGet(this, _Dropdown_referenceElement, "f").removeEventListener('keydown', __classPrivateFieldGet(this, _Dropdown_boundOnKeydown, "f"));
|
|
385
|
+
__classPrivateFieldGet(this, _Dropdown_referenceElement, "f").removeAttribute('aria-expanded');
|
|
386
|
+
__classPrivateFieldGet(this, _Dropdown_referenceElement, "f").removeAttribute('aria-controls');
|
|
222
387
|
};
|
|
223
388
|
Dropdown.style = dropdownCss;
|
|
224
389
|
|
|
225
390
|
exports.qds_dropdown = Dropdown;
|
|
226
|
-
|
|
227
|
-
//# sourceMappingURL=qds-dropdown.cjs.entry.js.map
|
|
391
|
+
//# sourceMappingURL=qds-dropdown.entry.cjs.js.map
|