@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
package/components/qds-input.js
CHANGED
|
@@ -1,244 +1,562 @@
|
|
|
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
|
-
import { proxyCustomElement,
|
|
7
|
-
import {
|
|
6
|
+
import { p as proxyCustomElement, H, c as createEvent, h } from './p-D2489VzR.js';
|
|
7
|
+
import { i as invariant, p as pickFocusEventAttributes, e as pickInputEventAttributes, c as inheritAriaAttributes } from './p-CXP6q9Mr.js';
|
|
8
|
+
import { V as VALID_STATE, C as CUSTOM_ERROR_FLAGS, N as NO_ERROR_FLAGS } from './p-CZRW1LV_.js';
|
|
9
|
+
import { d as defineCustomElement$3 } from './p-BkgfW_tl.js';
|
|
10
|
+
import { d as defineCustomElement$2 } from './p-Dsc0-aXK.js';
|
|
8
11
|
|
|
9
|
-
const inputCss = ".sc-qds-input-h{box-sizing:border-box}[hidden].sc-qds-input-h{display:none !important}.sc-qds-input-h *.sc-qds-input,.sc-qds-input-h *.sc-qds-input::before,.sc-qds-input-h *.sc-qds-input::after{box-sizing:inherit}.sc-qds-input-h{display:inline-block}.input.sc-qds-input{-webkit-appearance:textfield;appearance:textfield;padding:0;background-color:var(--qds-theme-control-input-background);border:var(--qds-control-border-width) solid var(--qds-theme-control-border);border-radius:var(--qds-control-border-radius);color:var(--qds-theme-control-text-standard);gap:var(--qds-control-input-gap-internal);padding-inline:var(--qds-control-input-padding-horizontal);width:100%}.input[aria-invalid='true'].sc-qds-input:not(:focus){border-color:var(--qds-theme-feedback-result-failure)}.input[type='color'].sc-qds-input{-webkit-appearance:none;appearance:none;min-width:50px;padding-block:var(--qds-control-input-padding-horizontal);cursor:pointer}.input[type='color'].sc-qds-input::-webkit-color-swatch-wrapper{padding:0}.input[type='color'].sc-qds-input::-webkit-color-swatch{border:var(--qds-control-border-width) solid\n var(--qds-theme-control-border);border-radius:var(--qds-control-border-radius)}.input[type='color'].sc-qds-input::-moz-color-swatch{border:var(--qds-control-border-width) solid\n var(--qds-theme-control-border);border-radius:var(--qds-control-border-radius)}.input[type='color'].sc-qds-input:hover{background-color:var(--qds-theme-interactive-background-hover)}.input[type='color'].sc-qds-input:active{background-color:var(--qds-theme-interactive-background-pressed)}.input.sc-qds-input:disabled{opacity:var(--qds-theme-disabled);pointer-events:none}.input.sc-qds-input:focus-visible{outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:var(--qds-focus-border-offset)}.input.sc-qds-input:placeholder-shown{color:var(--qds-theme-control-text-placeholder)}[data-size='small'].sc-qds-input{font:var(--qds-control-small-text);height:var(--qds-control-small-height)}[data-size='standard'].sc-qds-input{font:var(--qds-control-standard-text);height:var(--qds-control-standard-height)}[data-size='large'].sc-qds-input{font:var(--qds-control-large-text);height:var(--qds-control-large-height)}";
|
|
12
|
+
const inputCss = ":host([hidden]){display:none!important}:host{display:inline-block}@-moz-document url-prefix(){[type=date]~.qds-icon-container,[type=datetime-local]~.qds-icon-container,[type=month]~.qds-icon-container,[type=time]~.qds-icon-container,[type=week]~.qds-icon-container{display:none}}input[type=password]::-ms-reveal{display:none}.qds-container,.qds-input{max-width:inherit;width:inherit}.qds-container{align-content:flex-start;align-items:center;box-sizing:border-box;display:grid;grid-template-areas:\"d\"}.qds-icon-container,.qds-input{grid-area:d}.qds-focus-ring{border-radius:max(1px,var(\n --qds-control-border-radius-top-left,var(--qds-form-input-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-top-right,var(--qds-form-input-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-right,var(--qds-form-input-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-left,var(--qds-form-input-border-radius)\n ));box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);grid-area:d;height:calc(100% + var(--qds-form-input-border-width-default) - var(\n --qds-control-border-width-block-end,\n var(--qds-form-input-border-width-default)\n ));isolation:isolate;outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0;pointer-events:none;visibility:hidden;width:calc(100% + var(--qds-form-input-border-width-default) - var(\n --qds-control-border-width-inline-end,\n var(--qds-form-input-border-width-default)\n ))}[data-size=large]{font:var(--qds-form-large-text);min-height:var(--qds-form-input-large-height);padding-inline:var(--qds-form-input-large-padding-start) var(--qds-form-input-large-padding-end)}.qds-password-padding[data-size=large],[data-size=large][type=date],[data-size=large][type=datetime-local],[data-size=large][type=month],[data-size=large][type=time],[data-size=large][type=week]{padding-inline:var(--qds-form-input-large-padding-end) calc(var(--qds-form-input-large-padding-end) + var(--qds-form-input-large-height))}[data-size=large]~.qds-icon-container{padding-inline-end:var(--qds-form-input-large-padding-end)}[data-size=large][type=number]{padding-inline:var(--qds-form-input-large-padding-start) var(--qds-form-input-large-padding-end)}[data-size=large][type=file]{padding-block:var(--qds-form-input-large-padding-start) var(--qds-form-input-large-padding-end)}[data-size=large][type=file]::file-selector-button{font:var(--qds-form-large-text);margin-inline-end:var(--qds-control-large-gap-siblings-related);min-height:var(--qds-form-input-large-height);padding-inline:var(--qds-control-button-large-padding-horizontal)}[data-size=large][type=search]{padding-inline:var(--qds-form-input-large-padding-end) calc(var(--qds-form-input-small-height) + var(--qds-control-mini-button-standard-size) + var(--qds-form-input-large-padding-end) + var(--qds-form-input-large-gap-internal))}[data-size=large][type=search]~.qds-icon-container{gap:var(--qds-form-input-large-gap-internal)}.qds-padding[data-size=large]{padding-inline:var(--qds-form-input-large-padding-start) var(--qds-form-input-large-padding-end)}[data-size=large]{@-moz-document url-prefix(){&[type=date],&[type=datetime-local],&[type=month],&[type=time],&[type=week]{padding-inline:var(--qds-form-input-large-padding-start) var(--qds-form-input-large-padding-end)}}}[data-size=standard]{font:var(--qds-form-standard-text);min-height:var(--qds-form-input-standard-height);padding-inline:var(--qds-form-input-standard-padding-start) var(--qds-form-input-standard-padding-end)}.qds-password-padding[data-size=standard],[data-size=standard][type=date],[data-size=standard][type=datetime-local],[data-size=standard][type=month],[data-size=standard][type=time],[data-size=standard][type=week]{padding-inline:var(--qds-form-input-standard-padding-start) calc(var(--qds-form-input-standard-padding-end) + var(--qds-form-input-standard-height))}[data-size=standard]~.qds-icon-container{padding-inline-end:var(--qds-form-input-standard-padding-end)}[data-size=standard][type=number]{padding-inline:var(--qds-form-input-standard-padding-start) var(--qds-form-input-standard-padding-end)}[data-size=standard][type=file]{padding-block:var(--qds-form-input-standard-padding-start) var(--qds-form-input-standard-padding-end)}[data-size=standard][type=file]::file-selector-button{font:var(--qds-form-standard-text);margin-inline-end:var(--qds-control-standard-gap-siblings-related);min-height:var(--qds-form-input-standard-height);padding-inline:var(--qds-control-button-standard-padding-horizontal)}[data-size=standard][type=search]{padding-inline:var(--qds-form-input-standard-padding-end) calc(var(--qds-form-input-small-height) + var(--qds-control-mini-button-standard-size) + var(--qds-form-input-standard-padding-end) + var(--qds-form-input-standard-gap-internal))}[data-size=standard][type=search]~.qds-icon-container{gap:var(--qds-form-input-standard-gap-internal)}.qds-padding[data-size=standard]{padding-inline:var(--qds-form-input-standard-padding-start) var(--qds-form-input-standard-padding-end)}[data-size=standard]{@-moz-document url-prefix(){&[type=date],&[type=datetime-local],&[type=month],&[type=time],&[type=week]{padding-inline:var(--qds-form-input-standard-padding-start) var(--qds-form-input-standard-padding-end)}}}[data-size=small]{font:var(--qds-form-small-text);min-height:var(--qds-form-input-small-height);padding-inline:var(--qds-form-input-small-padding-start) var(--qds-form-input-small-padding-end)}.qds-password-padding[data-size=small],[data-size=small][type=date],[data-size=small][type=datetime-local],[data-size=small][type=month],[data-size=small][type=time],[data-size=small][type=week]{padding-inline:var(--qds-form-input-small-padding-end) calc(var(--qds-form-input-small-padding-end) + var(--qds-form-input-small-height))}[data-size=small]~.qds-icon-container{padding-inline-end:var(--qds-form-input-small-padding-end)}[data-size=small][type=number]{padding-inline:var(--qds-form-input-small-padding-start) var(--qds-form-input-small-padding-end)}[data-size=small][type=file]{padding-block:var(--qds-form-input-small-padding-start) var(--qds-form-input-small-padding-end)}[data-size=small][type=file]::file-selector-button{font:var(--qds-form-small-text);margin-inline-end:var(--qds-control-small-gap-siblings-related);min-height:var(--qds-form-input-small-height);padding-inline:var(--qds-control-button-small-padding-horizontal)}[data-size=small][type=search]{padding-inline:var(--qds-form-input-small-padding-end) calc(var(--qds-form-input-small-height) + var(--qds-control-mini-button-standard-size) + var(--qds-form-input-small-padding-end) + var(--qds-form-input-small-gap-internal))}[data-size=small][type=search]~.qds-icon-container{gap:var(--qds-form-input-small-gap-internal)}.qds-padding[data-size=small]{padding-inline:var(--qds-form-input-small-padding-start) var(--qds-form-input-small-padding-end)}[data-size=small]{@-moz-document url-prefix(){&[type=date],&[type=datetime-local],&[type=month],&[type=time],&[type=week]{padding-inline:var(--qds-form-input-small-padding-start) var(--qds-form-input-small-padding-end)}}}.qds-input{-webkit-appearance:textfield;appearance:textfield;background-color:var(--qds-theme-form-input-background-default);border-color:var(--qds-theme-form-input-border-default);border-radius:var(\n --qds-control-border-radius-top-left,var(--qds-form-input-border-radius)\n ) var(\n --qds-control-border-radius-top-right,var(--qds-form-input-border-radius)\n ) var(\n --qds-control-border-radius-bottom-right,var(--qds-form-input-border-radius)\n ) var(\n --qds-control-border-radius-bottom-left,var(--qds-form-input-border-radius)\n );border-style:solid;border-width:var(--qds-form-input-border-width-default) var(\n --qds-control-border-width-inline-end,var(--qds-form-input-border-width-default)\n ) var(\n --qds-control-border-width-block-end,var(--qds-form-input-border-width-default)\n ) var(--qds-form-input-border-width-default);box-sizing:border-box;color:var(--qds-theme-form-input-text-active);grid-area:d;padding-block:0}.qds-input.qds-hide~.qds-icon-container{display:none}.qds-input:disabled,.qds-input:disabled~.qds-icon-container{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-input:focus-visible{outline:none}.qds-input:focus-visible~.qds-focus-ring{visibility:visible}.qds-input:read-only{background-color:var(--qds-theme-form-input-background-read-only);border-color:var(--qds-theme-form-input-border-disabled)}.qds-input:placeholder-shown{color:var(--qds-theme-control-text-placeholder)}.qds-input:hover{background-color:var(--qds-theme-form-input-background-hover);border-color:var(--qds-theme-form-input-border-hover)}.qds-input:active{background-color:var(--qds-theme-form-input-background-active);color:var(--qds-theme-form-input-text-active)}.qds-input::-webkit-search-cancel-button,.qds-input:is([type=date],[type=datetime-local],[type=month],[type=time],[type=week])::-webkit-calendar-picker-indicator{display:none}.qds-input[type=file]::file-selector-button{background-color:initial;border:var(--qds-form-input-border-width-default) solid var(--qds-theme-form-input-border-default);border-radius:var(--qds-control-border-radius);color:var(--qds-theme-form-input-text-active)}.qds-input[type=file]::file-selector-button:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-input[type=file]::file-selector-button:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-input[type=color]{-webkit-appearance:none;appearance:none;cursor:pointer;min-width:50px;padding-block:var(--qds-form-input-standard-padding-end);padding-inline:var(--qds-form-input-standard-padding-end)}.qds-input[type=color]::-webkit-color-swatch-wrapper{padding:0}.qds-input[type=color]::-webkit-color-swatch{border:var(--qds-form-input-border-width-default) solid var(--qds-theme-form-input-border-default);border-radius:var(--qds-control-border-radius)}.qds-input[type=color]::-moz-color-swatch{border:var(--qds-form-input-border-width-default) solid var(--qds-theme-form-input-border-default);border-radius:var(--qds-control-border-radius)}.qds-input[type=color]:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-input[type=color]:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-input.qds-search-padding[data-size=standard]{padding-inline:var(--qds-form-input-standard-padding-end) calc(var(--qds-form-input-small-height) + var(--qds-form-input-standard-padding-end))}.qds-input[data-size=standard][type=file]{height:auto}.qds-input.qds-search-padding[data-size=large]{padding-inline:var(--qds-form-input-large-padding-end) calc(var(--qds-form-input-small-height) + var(--qds-form-input-large-padding-end))}.qds-input[data-size=large][type=file]{height:auto}.qds-input.qds-search-padding[data-size=small]{padding-inline:var(--qds-form-input-small-padding-end) calc(var(--qds-form-input-small-height) + var(--qds-form-input-small-padding-end))}.qds-input[data-size=small][type=file]{height:auto}.qds-input{@-moz-document url-prefix(){&[type=number]{appearance:none}}}.qds-input[data-status=success]{border-color:var(--qds-theme-form-input-border-success)}.qds-input[data-status=warning]{border-color:var(--qds-theme-form-input-border-warning)}.qds-input:not(:focus):user-invalid,.qds-input[data-status=error]{border-color:var(--qds-theme-form-input-border-error)}.qds-icon-container{align-items:center;display:flex;justify-content:center;justify-self:end}.qds-icon-container.no-padding{padding-inline-end:0}";
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
14
|
+
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
15
|
+
//
|
|
16
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
var __classPrivateFieldGet = (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 __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
25
|
+
if (kind === "m")
|
|
26
|
+
throw new TypeError("Private method is not writable");
|
|
27
|
+
if (kind === "a" && !f)
|
|
28
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
29
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
30
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
31
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
32
|
+
};
|
|
33
|
+
var _Input_instances, _Input_inheritedAttributes, _Input_input, _Input_computedDisabled_get, _Input_computedIconName_get, _Input_computedSize_get, _Input_computedValue_get, _Input_computedStatus_get, _Input_hasInteractiveIcon_get, _Input_iconClickHandler_get, _Input_computedType_get, _Input_computedInteractiveIconAriaLabel_get, _Input_togglePasswordVisibility, _Input_ref, _Input_getFiles, _Input_onBlur, _Input_onCancel, _Input_onSearch, _Input_onChange, _Input_onClear, _Input_onFocus, _Input_onInput, _Input_defineGetter, _Input_clearValue;
|
|
34
|
+
const stopImmediatePropagation = (event) => {
|
|
35
|
+
event.stopImmediatePropagation();
|
|
36
|
+
};
|
|
37
|
+
const supportsSearchEvent = () => {
|
|
38
|
+
const input = document.createElement('input');
|
|
39
|
+
input.type = 'search';
|
|
40
|
+
return input.onsearch !== undefined;
|
|
41
|
+
};
|
|
42
|
+
const Input = /*@__PURE__*/ proxyCustomElement(class Input extends H {
|
|
43
|
+
constructor(registerHost) {
|
|
44
|
+
super();
|
|
45
|
+
if (registerHost !== false) {
|
|
46
|
+
this.__registerHost();
|
|
47
|
+
}
|
|
48
|
+
this.__attachShadow();
|
|
49
|
+
this.blurEmitter = createEvent(this, "qdsBlur", 2);
|
|
50
|
+
this.cancelEmitter = createEvent(this, "qdsCancel", 6);
|
|
51
|
+
this.searchEmitter = createEvent(this, "qdsSearch", 6);
|
|
52
|
+
this.changeEmitter = createEvent(this, "qdsChange", 6);
|
|
53
|
+
this.focusEmitter = createEvent(this, "qdsFocus", 2);
|
|
54
|
+
this.inputEmitter = createEvent(this, "qdsInput", 6);
|
|
55
|
+
this.internals = this.attachInternals();
|
|
56
|
+
_Input_instances.add(this);
|
|
57
|
+
/**
|
|
58
|
+
* Hide the input type's icon.
|
|
59
|
+
*
|
|
60
|
+
* > **_NOTE:_** Due to browser limitations, the icon may not be hidden in
|
|
61
|
+
* all browsers.
|
|
62
|
+
*/
|
|
63
|
+
this.noIcon = false;
|
|
64
|
+
/**
|
|
65
|
+
* The input's size.
|
|
66
|
+
*
|
|
67
|
+
* > **_NOTE:_** The native [`size` HTML attribute][size] is not supported.
|
|
68
|
+
* CSS `width` should be used instead if this functionality is needed.
|
|
69
|
+
*
|
|
70
|
+
* [size]: https://developer.mozilla.org/docs/Web/HTML/Attributes/size
|
|
71
|
+
*/
|
|
72
|
+
this.size = 'standard';
|
|
73
|
+
/**
|
|
74
|
+
* Returns a file list for a `file` type input.
|
|
75
|
+
*
|
|
76
|
+
* @readonly
|
|
77
|
+
* @webnative
|
|
78
|
+
*/
|
|
79
|
+
// eslint-disable-next-line unicorn/no-null
|
|
80
|
+
this.files = null;
|
|
81
|
+
/**
|
|
82
|
+
* The [`<form>`][] element to associate the input with (its form owner).
|
|
83
|
+
*
|
|
84
|
+
* The value of this attribute must be the id of a `<form>` in the same
|
|
85
|
+
* document. If this attribute is not set, the `<qds-input>` is associated
|
|
86
|
+
* with its ancestor `<form>` element, if any.
|
|
87
|
+
*
|
|
88
|
+
* This attribute lets you associate `<qds-input>` elements to `<form>`s
|
|
89
|
+
* anywhere in the document, not just inside a `<form>`. It can also override
|
|
90
|
+
* an ancestor `<form>` element.
|
|
91
|
+
*
|
|
92
|
+
* [`<form>`]: https://developer.mozilla.org/docs/Web/HTML/Element/form
|
|
93
|
+
*
|
|
94
|
+
* @readonly
|
|
95
|
+
* @webnative
|
|
96
|
+
*/
|
|
97
|
+
// eslint-disable-next-line unicorn/no-null
|
|
98
|
+
this.form = null;
|
|
99
|
+
/**
|
|
100
|
+
* Returns a list of the [`<label>`][] elements associated with the
|
|
101
|
+
* `qds-input` element.
|
|
102
|
+
*
|
|
103
|
+
* [`<label>`]: https://developer.mozilla.org/docs/Web/HTML/Element/label
|
|
104
|
+
*
|
|
105
|
+
* @readonly
|
|
106
|
+
* @webnative
|
|
107
|
+
*/
|
|
108
|
+
this.labels = {};
|
|
109
|
+
/**
|
|
110
|
+
* Get or set the selection direction of a text selection.
|
|
111
|
+
*
|
|
112
|
+
* > **_NOTE:_** This property has no effect when used as an attribute.
|
|
113
|
+
*
|
|
114
|
+
* @webnative
|
|
115
|
+
*/
|
|
116
|
+
this.selectionDirection = null;
|
|
117
|
+
/**
|
|
118
|
+
* Get or set the ending position or offset of a text selection.
|
|
119
|
+
*
|
|
120
|
+
* > **_NOTE:_** This property has no effect when used as an attribute.
|
|
121
|
+
*
|
|
122
|
+
* @webnative
|
|
123
|
+
*/
|
|
124
|
+
this.selectionEnd = null;
|
|
125
|
+
/**
|
|
126
|
+
* Get or set the starting position or offset of a text selection.
|
|
127
|
+
*
|
|
128
|
+
* > **_NOTE:_** This property has no effect when used as an attribute.
|
|
129
|
+
*
|
|
130
|
+
* @webnative
|
|
131
|
+
*/
|
|
132
|
+
this.selectionStart = null;
|
|
133
|
+
/**
|
|
134
|
+
* The error message that would be shown to the user if the `<qds-input>`
|
|
135
|
+
* was to be checked for validity.
|
|
136
|
+
*
|
|
137
|
+
* @readonly
|
|
138
|
+
* @webnative
|
|
139
|
+
*/
|
|
140
|
+
this.validationMessage = '';
|
|
141
|
+
/**
|
|
142
|
+
* The [`ValidityState`][] object for this `<qds-input>`.
|
|
143
|
+
*
|
|
144
|
+
* [`ValidityState`]: https://developer.mozilla.org/docs/Web/API/ValidityState
|
|
145
|
+
*
|
|
146
|
+
* @readonly
|
|
147
|
+
* @webnative
|
|
148
|
+
*/
|
|
149
|
+
this.validity = VALID_STATE;
|
|
150
|
+
/**
|
|
151
|
+
* True if `<qds-input>` will be validated when the form is submitted; false
|
|
152
|
+
* otherwise.
|
|
153
|
+
*
|
|
154
|
+
* @readonly
|
|
155
|
+
* @webnative
|
|
156
|
+
*/
|
|
157
|
+
this.willValidate = false;
|
|
158
|
+
this.isPasswordVisible = false;
|
|
159
|
+
_Input_inheritedAttributes.set(this, {});
|
|
160
|
+
_Input_input.set(this, void 0);
|
|
161
|
+
this.checkValidity = () => this.internals.checkValidity();
|
|
162
|
+
this.reportValidity = () => this.internals.reportValidity();
|
|
163
|
+
this.setCustomValidity = (error) => {
|
|
164
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
165
|
+
__classPrivateFieldGet(this, _Input_input, "f").setCustomValidity(error);
|
|
166
|
+
if (error)
|
|
167
|
+
this.internals.setValidity(CUSTOM_ERROR_FLAGS, error, __classPrivateFieldGet(this, _Input_input, "f"));
|
|
168
|
+
else
|
|
169
|
+
this.internals.setValidity(NO_ERROR_FLAGS);
|
|
170
|
+
};
|
|
171
|
+
this.select = () => {
|
|
172
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
173
|
+
__classPrivateFieldGet(this, _Input_input, "f").select();
|
|
174
|
+
};
|
|
175
|
+
this.getSelectionDirection = () => {
|
|
176
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
177
|
+
return __classPrivateFieldGet(this, _Input_input, "f").selectionDirection;
|
|
178
|
+
};
|
|
179
|
+
this.getSelectionStart = () => {
|
|
180
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
181
|
+
return __classPrivateFieldGet(this, _Input_input, "f").selectionStart;
|
|
182
|
+
};
|
|
183
|
+
this.getSelectionEnd = () => {
|
|
184
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
185
|
+
return __classPrivateFieldGet(this, _Input_input, "f").selectionEnd;
|
|
186
|
+
};
|
|
187
|
+
this.setRangeText = (replacement, start, end, selectionMode) => {
|
|
188
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
189
|
+
__classPrivateFieldGet(this, _Input_input, "f").setRangeText(replacement, start, end, selectionMode);
|
|
190
|
+
if (this.value !== __classPrivateFieldGet(this, _Input_input, "f").value) {
|
|
191
|
+
this.value = __classPrivateFieldGet(this, _Input_input, "f").value;
|
|
192
|
+
this.inputEmitter.emit();
|
|
193
|
+
this.changeEmitter.emit();
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
this.setSelectionRange = (start, end, direction) => {
|
|
197
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
198
|
+
__classPrivateFieldGet(this, _Input_input, "f").setSelectionRange(start, end, direction);
|
|
199
|
+
};
|
|
200
|
+
this.stepDown = (n) => {
|
|
201
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
202
|
+
__classPrivateFieldGet(this, _Input_input, "f").stepDown(n);
|
|
203
|
+
};
|
|
204
|
+
this.stepUp = (n) => {
|
|
205
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
206
|
+
__classPrivateFieldGet(this, _Input_input, "f").stepUp(n);
|
|
207
|
+
};
|
|
208
|
+
this.showPicker = () => {
|
|
209
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
210
|
+
__classPrivateFieldGet(this, _Input_input, "f").showPicker();
|
|
211
|
+
};
|
|
212
|
+
_Input_togglePasswordVisibility.set(this, () => {
|
|
213
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
214
|
+
this.isPasswordVisible = !this.isPasswordVisible;
|
|
215
|
+
__classPrivateFieldGet(this, _Input_input, "f").type = __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedType_get);
|
|
216
|
+
});
|
|
217
|
+
_Input_ref.set(this, (input) => {
|
|
218
|
+
__classPrivateFieldSet(this, _Input_input, input, "f");
|
|
219
|
+
});
|
|
220
|
+
_Input_getFiles.set(this, () => {
|
|
221
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
222
|
+
return __classPrivateFieldGet(this, _Input_input, "f").files;
|
|
223
|
+
});
|
|
224
|
+
_Input_onBlur.set(this, (event) => {
|
|
225
|
+
this.blurEmitter.emit(pickFocusEventAttributes(event));
|
|
226
|
+
});
|
|
227
|
+
_Input_onCancel.set(this, () => {
|
|
228
|
+
this.cancelEmitter.emit();
|
|
229
|
+
});
|
|
230
|
+
_Input_onSearch.set(this, () => {
|
|
231
|
+
this.searchEmitter.emit();
|
|
232
|
+
});
|
|
233
|
+
_Input_onChange.set(this, () => {
|
|
234
|
+
this.changeEmitter.emit();
|
|
235
|
+
});
|
|
236
|
+
_Input_onClear.set(this, () => {
|
|
237
|
+
__classPrivateFieldGet(this, _Input_instances, "m", _Input_clearValue).call(this);
|
|
238
|
+
__classPrivateFieldGet(this, _Input_onInput, "f").call(this, new InputEvent('input', { inputType: 'deleteContent' }));
|
|
239
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
240
|
+
if (document.activeElement !== __classPrivateFieldGet(this, _Input_input, "f")) {
|
|
241
|
+
__classPrivateFieldGet(this, _Input_input, "f").focus();
|
|
242
|
+
}
|
|
243
|
+
this.searchEmitter.emit();
|
|
244
|
+
});
|
|
245
|
+
_Input_onFocus.set(this, (event) => {
|
|
246
|
+
this.focusEmitter.emit(pickFocusEventAttributes(event));
|
|
247
|
+
});
|
|
248
|
+
_Input_onInput.set(this, (event) => {
|
|
249
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
250
|
+
this.value = __classPrivateFieldGet(this, _Input_input, "f").value;
|
|
251
|
+
this.inputEmitter.emit(pickInputEventAttributes(event));
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
onClick(event) {
|
|
255
|
+
if (__classPrivateFieldGet(this, _Input_instances, "a", _Input_computedDisabled_get))
|
|
256
|
+
event.stopImmediatePropagation();
|
|
257
|
+
}
|
|
258
|
+
onKeydown(event) {
|
|
259
|
+
if (__classPrivateFieldGet(this, _Input_instances, "a", _Input_computedDisabled_get)) {
|
|
260
|
+
event.stopImmediatePropagation();
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
if (event.key === 'Enter' && this.internals.form) {
|
|
264
|
+
this.internals.form.requestSubmit();
|
|
265
|
+
event.preventDefault();
|
|
266
|
+
}
|
|
267
|
+
if (event.key === 'Enter' && !supportsSearchEvent()) {
|
|
268
|
+
this.searchEmitter.emit();
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
ariaLabelChanged(newValue) {
|
|
272
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
273
|
+
__classPrivateFieldGet(this, _Input_input, "f").ariaLabel =
|
|
274
|
+
newValue ??
|
|
275
|
+
[...this.internals.labels]
|
|
276
|
+
.map((node) => node.textContent === ''
|
|
277
|
+
? this.host.parentElement?.querySelector('qds-label')?.text
|
|
278
|
+
: node.textContent?.trim())
|
|
279
|
+
.join(' ');
|
|
280
|
+
}
|
|
281
|
+
statusChanged() {
|
|
282
|
+
this.internals.ariaInvalid = (__classPrivateFieldGet(this, _Input_instances, "a", _Input_computedStatus_get) === 'error').toString();
|
|
283
|
+
}
|
|
284
|
+
disabledChanged() {
|
|
285
|
+
if (__classPrivateFieldGet(this, _Input_instances, "a", _Input_computedDisabled_get))
|
|
286
|
+
// eslint-disable-next-line unicorn/no-null
|
|
287
|
+
this.internals.setFormValue(null);
|
|
288
|
+
else
|
|
289
|
+
this.internals.setFormValue(__classPrivateFieldGet(this, _Input_instances, "a", _Input_computedValue_get));
|
|
290
|
+
}
|
|
291
|
+
selectionDirectionChanged() {
|
|
292
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
293
|
+
__classPrivateFieldGet(this, _Input_input, "f").selectionDirection = this.selectionDirection;
|
|
294
|
+
}
|
|
295
|
+
selectionEndChanged() {
|
|
296
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
297
|
+
__classPrivateFieldGet(this, _Input_input, "f").selectionEnd = this.selectionEnd;
|
|
298
|
+
}
|
|
299
|
+
selectionStartChanged() {
|
|
300
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
301
|
+
__classPrivateFieldGet(this, _Input_input, "f").selectionStart = this.selectionStart;
|
|
302
|
+
}
|
|
303
|
+
tabindexChanged(newValue) {
|
|
304
|
+
const parsedValue = Number.parseInt(newValue, 10);
|
|
305
|
+
this.tabIndex =
|
|
306
|
+
parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue;
|
|
307
|
+
}
|
|
308
|
+
validationChanged() {
|
|
309
|
+
if (!__classPrivateFieldGet(this, _Input_input, "f"))
|
|
310
|
+
return;
|
|
311
|
+
if (__classPrivateFieldGet(this, _Input_input, "f").max !== this.max && this.max !== undefined)
|
|
312
|
+
__classPrivateFieldGet(this, _Input_input, "f").max = this.max.toString();
|
|
313
|
+
if (this.maxLength !== undefined)
|
|
314
|
+
__classPrivateFieldGet(this, _Input_input, "f").maxLength = this.maxLength;
|
|
315
|
+
if (__classPrivateFieldGet(this, _Input_input, "f").min !== this.min && this.min !== undefined)
|
|
316
|
+
__classPrivateFieldGet(this, _Input_input, "f").min = this.min.toString();
|
|
317
|
+
if (this.minLength !== undefined)
|
|
318
|
+
__classPrivateFieldGet(this, _Input_input, "f").minLength = this.minLength;
|
|
319
|
+
if (this.pattern !== undefined)
|
|
320
|
+
__classPrivateFieldGet(this, _Input_input, "f").pattern = this.pattern;
|
|
321
|
+
__classPrivateFieldGet(this, _Input_input, "f").required = this.required ?? false;
|
|
322
|
+
if (__classPrivateFieldGet(this, _Input_input, "f").step !== this.step && this.step !== undefined)
|
|
323
|
+
__classPrivateFieldGet(this, _Input_input, "f").step = this.step.toString();
|
|
324
|
+
__classPrivateFieldGet(this, _Input_input, "f").type = __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedType_get);
|
|
325
|
+
const { valid } = __classPrivateFieldGet(this, _Input_input, "f").validity;
|
|
326
|
+
if (valid)
|
|
327
|
+
this.internals.setValidity(NO_ERROR_FLAGS, undefined, __classPrivateFieldGet(this, _Input_input, "f"));
|
|
328
|
+
else
|
|
329
|
+
this.internals.setValidity(__classPrivateFieldGet(this, _Input_input, "f").validity, __classPrivateFieldGet(this, _Input_input, "f").validationMessage, __classPrivateFieldGet(this, _Input_input, "f"));
|
|
330
|
+
}
|
|
331
|
+
valueChanged() {
|
|
332
|
+
if (!__classPrivateFieldGet(this, _Input_instances, "a", _Input_computedDisabled_get))
|
|
333
|
+
this.internals.setFormValue(__classPrivateFieldGet(this, _Input_instances, "a", _Input_computedValue_get));
|
|
334
|
+
if ((__classPrivateFieldGet(this, _Input_instances, "a", _Input_computedValue_get) === null || __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedValue_get) === '') &&
|
|
335
|
+
this.type === 'file') {
|
|
336
|
+
__classPrivateFieldGet(this, _Input_instances, "m", _Input_clearValue).call(this);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
componentWillLoad() {
|
|
340
|
+
__classPrivateFieldGet(this, _Input_instances, "m", _Input_defineGetter).call(this, 'form', () => this.internals.form);
|
|
341
|
+
__classPrivateFieldGet(this, _Input_instances, "m", _Input_defineGetter).call(this, 'willValidate', () => this.internals.willValidate);
|
|
342
|
+
__classPrivateFieldGet(this, _Input_instances, "m", _Input_defineGetter).call(this, 'validity', () => this.internals.validity);
|
|
343
|
+
__classPrivateFieldGet(this, _Input_instances, "m", _Input_defineGetter).call(this, 'validationMessage', () => this.internals.validationMessage);
|
|
344
|
+
__classPrivateFieldGet(this, _Input_instances, "m", _Input_defineGetter).call(this, 'files', __classPrivateFieldGet(this, _Input_getFiles, "f"));
|
|
345
|
+
__classPrivateFieldGet(this, _Input_instances, "m", _Input_defineGetter).call(this, 'labels', () => this.internals.labels);
|
|
346
|
+
__classPrivateFieldSet(this, _Input_inheritedAttributes, inheritAriaAttributes(this.host), "f");
|
|
347
|
+
this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0');
|
|
348
|
+
this.statusChanged();
|
|
349
|
+
}
|
|
350
|
+
componentDidLoad() {
|
|
351
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
352
|
+
this.ariaLabelChanged(this.host.ariaLabel);
|
|
353
|
+
this.validationChanged();
|
|
354
|
+
this.valueChanged();
|
|
355
|
+
// FIXME: This event is supported by the native `<input>` element but not
|
|
356
|
+
// recognized by Stencil's type definitions, so it needs to be manually
|
|
357
|
+
// bound here.
|
|
358
|
+
__classPrivateFieldGet(this, _Input_input, "f").addEventListener('cancel', __classPrivateFieldGet(this, _Input_onCancel, "f"));
|
|
359
|
+
__classPrivateFieldGet(this, _Input_input, "f").addEventListener('search', __classPrivateFieldGet(this, _Input_onSearch, "f"));
|
|
360
|
+
}
|
|
361
|
+
disconnectedCallback() {
|
|
362
|
+
if (__classPrivateFieldGet(this, _Input_input, "f")) {
|
|
363
|
+
__classPrivateFieldGet(this, _Input_input, "f").removeEventListener('cancel', __classPrivateFieldGet(this, _Input_onCancel, "f"));
|
|
364
|
+
__classPrivateFieldGet(this, _Input_input, "f").removeEventListener('search', __classPrivateFieldGet(this, _Input_onSearch, "f"));
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
render() {
|
|
368
|
+
const hasValue = this.value !== null && this.value !== undefined && this.value !== '';
|
|
369
|
+
const isSearchType = this.type === 'search';
|
|
370
|
+
const shouldShowClearButton = isSearchType && hasValue;
|
|
371
|
+
const shouldShowSearchButton = isSearchType && this.noIcon === false;
|
|
372
|
+
const shouldHideIcon = !isSearchType && this.noIcon === true;
|
|
373
|
+
const shouldRemoveSearchPadding = isSearchType && this.noIcon === true;
|
|
374
|
+
return (h("div", { key: 'db31ec02c256f64f5a4d946331405b7ba349784d', class: "qds-container" }, h("input", { key: '9e91aadb684a260ea63dfa7a64a1bffdcbe1f3a2', accept: this.accept, autoCapitalize: this.host.autocapitalize, autoComplete: this.autoComplete,
|
|
375
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
376
|
+
autoFocus: this.host.autofocus, capture: this.capture, class: {
|
|
377
|
+
'qds-search-padding': shouldRemoveSearchPadding,
|
|
378
|
+
'qds-input': true,
|
|
379
|
+
'qds-hide': shouldHideIcon,
|
|
380
|
+
'qds-padding': shouldHideIcon,
|
|
381
|
+
'qds-password-padding': this.type === 'password' ||
|
|
382
|
+
(this.isPasswordVisible && this.type === 'text'),
|
|
383
|
+
}, "data-status": __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedStatus_get), "data-size": __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedSize_get), disabled: this.disabled, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, max: this.max, maxLength: this.maxLength, min: this.min, minLength: this.minLength, multiple: this.multiple, onBlur: __classPrivateFieldGet(this, _Input_onBlur, "f"), onChange: __classPrivateFieldGet(this, _Input_onChange, "f"), onFocus: __classPrivateFieldGet(this, _Input_onFocus, "f"), onInput: __classPrivateFieldGet(this, _Input_onInput, "f"), placeholder: this.placeholder, readOnly: this.readonly, ref: __classPrivateFieldGet(this, _Input_ref, "f"), spellcheck: this.host.spellcheck, step: this.step, tabIndex: __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedDisabled_get) ? undefined : this.tabIndex, type: __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedType_get), value: this.value ?? '', ...__classPrivateFieldGet(this, _Input_inheritedAttributes, "f") }), h("div", { key: '1a70a9546cbb333975fb5ddc3e3d6f4e2ea28769', class: "qds-focus-ring" }), __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedIconName_get) && (h("div", { key: 'afcfdac0375d089869ace600729d8381df262107', class: {
|
|
384
|
+
'qds-icon-container': true,
|
|
385
|
+
'no-padding': shouldRemoveSearchPadding,
|
|
386
|
+
} }, shouldShowClearButton && (h("qds-mini-button", { key: 'a19339646b5e2fda9d544fae4830a68536c7bd3f', class: "qds-hide", text: "clear input", library: "core", name: "clear", disabled: this.disabled, onClick: __classPrivateFieldGet(this, _Input_onClear, "f"), tabindex: -1, onQdsFocus: stopImmediatePropagation })), __classPrivateFieldGet(this, _Input_instances, "a", _Input_hasInteractiveIcon_get) && (h("qds-mini-button", { key: 'eeedd9c8d2a3269d09da86fec16459ec82be8b03', disabled: this.disabled, onClick: __classPrivateFieldGet(this, _Input_instances, "a", _Input_iconClickHandler_get), text: __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedInteractiveIconAriaLabel_get), library: "core", name: __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedIconName_get), tabindex: -1, onQdsFocus: stopImmediatePropagation })), shouldShowSearchButton ? (h("qds-mini-button", { text: "search", library: "core", name: __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedIconName_get), disabled: this.disabled, onClick: __classPrivateFieldGet(this, _Input_onSearch, "f"), tabindex: -1, onQdsFocus: stopImmediatePropagation })) : (h("div", null))))));
|
|
387
|
+
}
|
|
388
|
+
static get delegatesFocus() { return true; }
|
|
389
|
+
static get formAssociated() { return true; }
|
|
390
|
+
get host() { return this; }
|
|
391
|
+
static get watchers() { return {
|
|
392
|
+
"aria-label": ["ariaLabelChanged"],
|
|
393
|
+
"status": ["statusChanged"],
|
|
394
|
+
"disabled": ["disabledChanged"],
|
|
395
|
+
"selectionDirection": ["selectionDirectionChanged"],
|
|
396
|
+
"selectionEnd": ["selectionEndChanged"],
|
|
397
|
+
"selectionStart": ["selectionStartChanged"],
|
|
398
|
+
"tabindex": ["tabindexChanged"],
|
|
399
|
+
"max": ["validationChanged"],
|
|
400
|
+
"maxLength": ["validationChanged"],
|
|
401
|
+
"min": ["validationChanged"],
|
|
402
|
+
"minLength": ["validationChanged"],
|
|
403
|
+
"pattern": ["validationChanged"],
|
|
404
|
+
"required": ["validationChanged"],
|
|
405
|
+
"step": ["validationChanged"],
|
|
406
|
+
"type": ["validationChanged"],
|
|
407
|
+
"value": ["validationChanged", "valueChanged"]
|
|
408
|
+
}; }
|
|
409
|
+
static get style() { return inputCss; }
|
|
410
|
+
}, [337, "qds-input", {
|
|
411
|
+
"status": [1],
|
|
412
|
+
"readonly": [4],
|
|
413
|
+
"noIcon": [4, "no-icon"],
|
|
414
|
+
"size": [1],
|
|
415
|
+
"accept": [1],
|
|
416
|
+
"autoComplete": [1, "autocomplete"],
|
|
417
|
+
"capture": [1],
|
|
418
|
+
"disabled": [4],
|
|
419
|
+
"enterkeyhint": [1],
|
|
420
|
+
"files": [16],
|
|
421
|
+
"form": [1],
|
|
422
|
+
"inputmode": [1],
|
|
423
|
+
"labels": [16],
|
|
424
|
+
"max": [8],
|
|
425
|
+
"maxLength": [2, "maxlength"],
|
|
426
|
+
"min": [8],
|
|
427
|
+
"minLength": [2, "minlength"],
|
|
428
|
+
"multiple": [4],
|
|
429
|
+
"name": [1],
|
|
430
|
+
"pattern": [1],
|
|
431
|
+
"placeholder": [1],
|
|
432
|
+
"required": [4],
|
|
433
|
+
"selectionDirection": [1025, "selection-direction"],
|
|
434
|
+
"selectionEnd": [1026, "selection-end"],
|
|
435
|
+
"selectionStart": [1026, "selection-start"],
|
|
436
|
+
"step": [8],
|
|
437
|
+
"type": [1],
|
|
438
|
+
"validationMessage": [1, "validation-message"],
|
|
439
|
+
"validity": [16],
|
|
440
|
+
"value": [1032],
|
|
441
|
+
"willValidate": [4, "will-validate"],
|
|
442
|
+
"tabIndex": [32],
|
|
443
|
+
"isPasswordVisible": [32]
|
|
444
|
+
}, [[0, "click", "onClick"], [0, "keydown", "onKeydown"]], {
|
|
445
|
+
"aria-label": ["ariaLabelChanged"],
|
|
446
|
+
"status": ["statusChanged"],
|
|
447
|
+
"disabled": ["disabledChanged"],
|
|
448
|
+
"selectionDirection": ["selectionDirectionChanged"],
|
|
449
|
+
"selectionEnd": ["selectionEndChanged"],
|
|
450
|
+
"selectionStart": ["selectionStartChanged"],
|
|
451
|
+
"tabindex": ["tabindexChanged"],
|
|
452
|
+
"max": ["validationChanged"],
|
|
453
|
+
"maxLength": ["validationChanged"],
|
|
454
|
+
"min": ["validationChanged"],
|
|
455
|
+
"minLength": ["validationChanged"],
|
|
456
|
+
"pattern": ["validationChanged"],
|
|
457
|
+
"required": ["validationChanged"],
|
|
458
|
+
"step": ["validationChanged"],
|
|
459
|
+
"type": ["validationChanged"],
|
|
460
|
+
"value": ["validationChanged", "valueChanged"]
|
|
461
|
+
}]);
|
|
462
|
+
_Input_inheritedAttributes = new WeakMap(), _Input_input = new WeakMap(), _Input_togglePasswordVisibility = new WeakMap(), _Input_ref = new WeakMap(), _Input_getFiles = new WeakMap(), _Input_onBlur = new WeakMap(), _Input_onCancel = new WeakMap(), _Input_onSearch = new WeakMap(), _Input_onChange = new WeakMap(), _Input_onClear = new WeakMap(), _Input_onFocus = new WeakMap(), _Input_onInput = new WeakMap(), _Input_instances = new WeakSet(), _Input_computedDisabled_get = function _Input_computedDisabled_get() {
|
|
463
|
+
return this.host.matches(':disabled') || (this.disabled ?? false);
|
|
464
|
+
}, _Input_computedIconName_get = function _Input_computedIconName_get() {
|
|
465
|
+
if (this.type === 'password')
|
|
466
|
+
return this.isPasswordVisible
|
|
467
|
+
? 'input-password-hide'
|
|
468
|
+
: 'input-password-show';
|
|
469
|
+
switch (this.type) {
|
|
470
|
+
case 'date':
|
|
471
|
+
case 'datetime-local':
|
|
472
|
+
case 'month':
|
|
473
|
+
case 'search':
|
|
474
|
+
case 'time':
|
|
475
|
+
case 'week': {
|
|
476
|
+
return `input-${this.type}`;
|
|
477
|
+
}
|
|
478
|
+
default: {
|
|
479
|
+
return undefined;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}, _Input_computedSize_get = function _Input_computedSize_get() {
|
|
483
|
+
switch (this.size) {
|
|
484
|
+
case 'standard':
|
|
485
|
+
case 'small':
|
|
486
|
+
case 'large': {
|
|
487
|
+
return this.size;
|
|
488
|
+
}
|
|
489
|
+
default: {
|
|
490
|
+
return 'standard';
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}, _Input_computedValue_get = function _Input_computedValue_get() {
|
|
494
|
+
if (typeof this.value === 'number')
|
|
495
|
+
return this.value.toString();
|
|
496
|
+
// eslint-disable-next-line unicorn/no-null
|
|
497
|
+
return this.value === undefined ? null : this.value;
|
|
498
|
+
}, _Input_computedStatus_get = function _Input_computedStatus_get() {
|
|
499
|
+
switch (this.status) {
|
|
500
|
+
case 'error':
|
|
501
|
+
case 'success':
|
|
502
|
+
case 'warning': {
|
|
503
|
+
return this.status;
|
|
504
|
+
}
|
|
505
|
+
default: {
|
|
506
|
+
return undefined;
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}, _Input_hasInteractiveIcon_get = function _Input_hasInteractiveIcon_get() {
|
|
510
|
+
return (typeof this.type === 'string' &&
|
|
511
|
+
['month', 'time', 'date', 'datetime-local', 'week', 'password'].includes(this.type));
|
|
512
|
+
}, _Input_iconClickHandler_get = function _Input_iconClickHandler_get() {
|
|
513
|
+
return this.type === 'password'
|
|
514
|
+
? __classPrivateFieldGet(this, _Input_togglePasswordVisibility, "f")
|
|
515
|
+
: this.showPicker;
|
|
516
|
+
}, _Input_computedType_get = function _Input_computedType_get() {
|
|
517
|
+
return this.type === 'password' && this.isPasswordVisible
|
|
518
|
+
? 'text'
|
|
519
|
+
: (this.type ?? 'text');
|
|
520
|
+
}, _Input_computedInteractiveIconAriaLabel_get = function _Input_computedInteractiveIconAriaLabel_get() {
|
|
521
|
+
return this.type === 'password'
|
|
522
|
+
? this.isPasswordVisible
|
|
523
|
+
? 'Hide password'
|
|
524
|
+
: 'Show password'
|
|
525
|
+
: (this.type ?? '');
|
|
526
|
+
}, _Input_defineGetter = function _Input_defineGetter(p, get) {
|
|
527
|
+
Object.defineProperty(this.host, p, { enumerable: true, get });
|
|
528
|
+
}, _Input_clearValue = function _Input_clearValue() {
|
|
529
|
+
invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
530
|
+
__classPrivateFieldGet(this, _Input_input, "f").value = '';
|
|
531
|
+
};
|
|
225
532
|
function defineCustomElement$1() {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
533
|
+
if (typeof customElements === "undefined") {
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
const components = ["qds-input", "qds-icon", "qds-mini-button"];
|
|
537
|
+
components.forEach(tagName => { switch (tagName) {
|
|
538
|
+
case "qds-input":
|
|
539
|
+
if (!customElements.get(tagName)) {
|
|
540
|
+
customElements.define(tagName, Input);
|
|
541
|
+
}
|
|
542
|
+
break;
|
|
543
|
+
case "qds-icon":
|
|
544
|
+
if (!customElements.get(tagName)) {
|
|
545
|
+
defineCustomElement$3();
|
|
546
|
+
}
|
|
547
|
+
break;
|
|
548
|
+
case "qds-mini-button":
|
|
549
|
+
if (!customElements.get(tagName)) {
|
|
550
|
+
defineCustomElement$2();
|
|
551
|
+
}
|
|
552
|
+
break;
|
|
553
|
+
} });
|
|
237
554
|
}
|
|
238
555
|
|
|
239
556
|
const QdsInput = Input;
|
|
240
557
|
const defineCustomElement = defineCustomElement$1;
|
|
241
558
|
|
|
242
559
|
export { QdsInput, defineCustomElement };
|
|
560
|
+
//# sourceMappingURL=qds-input.js.map
|
|
243
561
|
|
|
244
562
|
//# sourceMappingURL=qds-input.js.map
|