@quartzds/core 1.0.0-beta.9 → 1.0.0-beta.91
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/README.md +5 -5
- package/components/index.d.ts +48 -0
- package/components/index.js +60 -28
- package/components/index.js.map +1 -1
- package/components/p-2806fee1.js +1887 -0
- package/components/p-2806fee1.js.map +1 -0
- package/components/p-2bf0797c.js +272 -0
- package/components/p-2bf0797c.js.map +1 -0
- package/components/p-3baf75f4.js +111 -0
- package/components/p-3baf75f4.js.map +1 -0
- package/components/p-3c48ff53.js +103 -0
- package/components/p-3c48ff53.js.map +1 -0
- package/components/p-8abba29b.js +204 -0
- package/components/p-8abba29b.js.map +1 -0
- package/components/p-a020ece3.js +142 -0
- package/components/p-a020ece3.js.map +1 -0
- package/components/p-a6310886.js +144 -0
- package/components/p-a6310886.js.map +1 -0
- package/components/p-b4c302d4.js +91 -0
- package/components/p-b4c302d4.js.map +1 -0
- package/components/p-ba880369.js +256 -0
- package/components/p-ba880369.js.map +1 -0
- package/components/p-c80f112a.js +408 -0
- package/components/p-c80f112a.js.map +1 -0
- package/components/p-d107c90c.js +27 -0
- package/components/p-d107c90c.js.map +1 -0
- package/components/p-d6e52d0b.js +404 -0
- package/components/p-d6e52d0b.js.map +1 -0
- package/components/{floating-ui.dom.esm.js → p-fdd0abae.js} +468 -416
- package/components/p-fdd0abae.js.map +1 -0
- package/components/p-fed0d11f.js +94 -0
- package/components/p-fed0d11f.js.map +1 -0
- package/components/qds-badge-counter.d.ts +11 -0
- package/components/qds-badge-counter.js +13 -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 +13 -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 +126 -0
- package/components/qds-breadcrumb-item.js.map +1 -0
- package/components/qds-button.d.ts +2 -2
- package/components/qds-button.js +3 -138
- package/components/qds-button.js.map +1 -1
- package/components/qds-checkbox.d.ts +2 -2
- package/components/qds-checkbox.js +3 -146
- package/components/qds-checkbox.js.map +1 -1
- package/components/qds-chip.d.ts +11 -0
- package/components/qds-chip.js +296 -0
- package/components/qds-chip.js.map +1 -0
- package/components/qds-dialog.d.ts +11 -0
- package/components/qds-dialog.js +126 -0
- package/components/qds-dialog.js.map +1 -0
- package/components/qds-divider.d.ts +2 -2
- package/components/qds-divider.js +3 -39
- package/components/qds-divider.js.map +1 -1
- package/components/qds-dropdown.d.ts +2 -2
- package/components/qds-dropdown.js +273 -239
- package/components/qds-dropdown.js.map +1 -1
- package/components/qds-form-message.d.ts +11 -0
- package/components/qds-form-message.js +112 -0
- package/components/qds-form-message.js.map +1 -0
- package/components/qds-icon.d.ts +2 -2
- package/components/qds-icon.js +3 -3
- package/components/qds-inline-link.d.ts +2 -2
- package/components/qds-inline-link.js +136 -73
- package/components/qds-inline-link.js.map +1 -1
- package/components/qds-input.d.ts +2 -2
- package/components/qds-input.js +489 -230
- package/components/qds-input.js.map +1 -1
- package/components/qds-label.d.ts +2 -2
- package/components/qds-label.js +3 -3
- package/components/qds-list-item.d.ts +11 -0
- package/components/qds-list-item.js +212 -0
- package/components/qds-list-item.js.map +1 -0
- package/components/qds-loader.d.ts +11 -0
- package/components/qds-loader.js +113 -0
- package/components/qds-loader.js.map +1 -0
- package/components/qds-nav-list-item.d.ts +11 -0
- package/components/qds-nav-list-item.js +162 -0
- package/components/qds-nav-list-item.js.map +1 -0
- package/components/qds-progress-bar.d.ts +11 -0
- package/components/qds-progress-bar.js +153 -0
- package/components/qds-progress-bar.js.map +1 -0
- package/components/qds-radio.d.ts +2 -2
- package/components/qds-radio.js +147 -93
- package/components/qds-radio.js.map +1 -1
- package/components/qds-select.d.ts +11 -0
- package/components/qds-select.js +361 -0
- package/components/qds-select.js.map +1 -0
- package/components/qds-standalone-link.d.ts +11 -0
- package/components/qds-standalone-link.js +174 -0
- package/components/qds-standalone-link.js.map +1 -0
- package/components/qds-switch.d.ts +2 -2
- package/components/qds-switch.js +221 -105
- package/components/qds-switch.js.map +1 -1
- package/components/qds-tab.d.ts +11 -0
- package/components/qds-tab.js +379 -0
- package/components/qds-tab.js.map +1 -0
- package/components/qds-tabbar.d.ts +11 -0
- package/components/qds-tabbar.js +407 -0
- package/components/qds-tabbar.js.map +1 -0
- package/components/qds-table-body.d.ts +11 -0
- package/components/qds-table-body.js +68 -0
- package/components/qds-table-body.js.map +1 -0
- package/components/qds-table-cell.d.ts +11 -0
- package/components/qds-table-cell.js +71 -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 +73 -0
- package/components/qds-table-head-cell.js.map +1 -0
- package/components/qds-table-head.d.ts +11 -0
- package/components/qds-table-head.js +68 -0
- package/components/qds-table-head.js.map +1 -0
- package/components/qds-table-row.d.ts +11 -0
- package/components/qds-table-row.js +68 -0
- package/components/qds-table-row.js.map +1 -0
- package/components/qds-table.d.ts +11 -0
- package/components/qds-table.js +68 -0
- package/components/qds-table.js.map +1 -0
- package/components/qds-tag.d.ts +11 -0
- package/components/qds-tag.js +13 -0
- package/components/qds-tag.js.map +1 -0
- package/components/qds-textarea.d.ts +2 -2
- package/components/qds-textarea.js +331 -193
- package/components/qds-textarea.js.map +1 -1
- package/components/qds-title.d.ts +2 -2
- package/components/qds-title.js +3 -84
- package/components/qds-title.js.map +1 -1
- package/components/qds-tooltip.d.ts +2 -2
- package/components/qds-tooltip.js +3 -315
- package/components/qds-tooltip.js.map +1 -1
- package/dist/cjs/app-globals-c4cf08df.js +12 -0
- package/dist/cjs/app-globals-c4cf08df.js.map +1 -0
- package/dist/cjs/controls-ee3d2ec8.js +31 -0
- package/dist/cjs/controls-ee3d2ec8.js.map +1 -0
- package/dist/cjs/{floating-ui.dom.esm-71fa96af.js → floating-ui.dom.esm-19b2b933.js} +468 -416
- package/dist/cjs/floating-ui.dom.esm-19b2b933.js.map +1 -0
- package/dist/cjs/helpers-10154521.js +217 -0
- package/dist/cjs/helpers-10154521.js.map +1 -0
- package/dist/cjs/index-523dd2e0.js +2149 -0
- package/dist/cjs/index-523dd2e0.js.map +1 -0
- package/dist/cjs/index.cjs.js +39 -27
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/library-41b19b9e.js +117 -0
- package/dist/cjs/library-41b19b9e.js.map +1 -0
- package/dist/cjs/loader.cjs.js +8 -6
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/qds-badge-counter_2.cjs.entry.js +151 -0
- package/dist/cjs/qds-badge-counter_2.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +96 -0
- package/dist/cjs/qds-breadcrumb-item.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-button.cjs.entry.js +321 -90
- package/dist/cjs/qds-button.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-checkbox.cjs.entry.js +212 -100
- package/dist/cjs/qds-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-chip.cjs.entry.js +256 -0
- package/dist/cjs/qds-chip.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-dialog.cjs.entry.js +108 -0
- package/dist/cjs/qds-dialog.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-divider.cjs.entry.js +60 -18
- package/dist/cjs/qds-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-dropdown.cjs.entry.js +232 -206
- package/dist/cjs/qds-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-form-message.cjs.entry.js +86 -0
- package/dist/cjs/qds-form-message.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-icon.cjs.entry.js +113 -90
- package/dist/cjs/qds-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-inline-link.cjs.entry.js +99 -46
- package/dist/cjs/qds-inline-link.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-input.cjs.entry.js +404 -185
- package/dist/cjs/qds-input.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-label.cjs.entry.js +102 -24
- package/dist/cjs/qds-label.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-list-item.cjs.entry.js +157 -0
- package/dist/cjs/qds-list-item.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-loader.cjs.entry.js +94 -0
- package/dist/cjs/qds-loader.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-nav-list-item.cjs.entry.js +124 -0
- package/dist/cjs/qds-nav-list-item.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-progress-bar.cjs.entry.js +135 -0
- package/dist/cjs/qds-progress-bar.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-radio.cjs.entry.js +102 -57
- package/dist/cjs/qds-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-select.cjs.entry.js +323 -0
- package/dist/cjs/qds-select.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-standalone-link.cjs.entry.js +134 -0
- package/dist/cjs/qds-standalone-link.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-switch.cjs.entry.js +193 -64
- package/dist/cjs/qds-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-tab.cjs.entry.js +299 -0
- package/dist/cjs/qds-tab.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-tabbar.cjs.entry.js +349 -0
- package/dist/cjs/qds-tabbar.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-table-body.cjs.entry.js +54 -0
- package/dist/cjs/qds-table-body.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-table-cell.cjs.entry.js +54 -0
- package/dist/cjs/qds-table-cell.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-table-head-cell.cjs.entry.js +54 -0
- package/dist/cjs/qds-table-head-cell.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-table-head.cjs.entry.js +54 -0
- package/dist/cjs/qds-table-head.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-table-row.cjs.entry.js +54 -0
- package/dist/cjs/qds-table-row.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-table.cjs.entry.js +54 -0
- package/dist/cjs/qds-table.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-tag_2.cjs.entry.js +181 -0
- package/dist/cjs/qds-tag_2.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-textarea.cjs.entry.js +288 -153
- package/dist/cjs/qds-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-tooltip.cjs.entry.js +332 -260
- package/dist/cjs/qds-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/qds.cjs.js +15 -13
- package/dist/cjs/qds.cjs.js.map +1 -1
- package/dist/custom-elements.json +8727 -2151
- package/dist/docs.d.ts +344 -240
- package/dist/docs.json +9364 -2903
- package/dist/esm/app-globals-8ced3a41.js +10 -0
- package/dist/esm/app-globals-8ced3a41.js.map +1 -0
- package/dist/esm/controls-a4768aaf.js +27 -0
- package/dist/esm/controls-a4768aaf.js.map +1 -0
- package/dist/esm/{floating-ui.dom.esm-f96ac766.js → floating-ui.dom.esm-61986f35.js} +468 -416
- package/dist/esm/floating-ui.dom.esm-61986f35.js.map +1 -0
- package/dist/esm/helpers-2e4ca34d.js +204 -0
- package/dist/esm/helpers-2e4ca34d.js.map +1 -0
- package/dist/esm/index-b1d6acd2.js +2118 -0
- package/dist/esm/index-b1d6acd2.js.map +1 -0
- package/dist/esm/index.js +39 -28
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/library-2e5458af.js +113 -0
- package/dist/esm/library-2e5458af.js.map +1 -0
- package/dist/esm/loader.js +9 -7
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/qds-badge-counter_2.entry.js +146 -0
- package/dist/esm/qds-badge-counter_2.entry.js.map +1 -0
- package/dist/esm/qds-breadcrumb-item.entry.js +92 -0
- package/dist/esm/qds-breadcrumb-item.entry.js.map +1 -0
- package/dist/esm/qds-button.entry.js +321 -90
- package/dist/esm/qds-button.entry.js.map +1 -1
- package/dist/esm/qds-checkbox.entry.js +212 -100
- package/dist/esm/qds-checkbox.entry.js.map +1 -1
- package/dist/esm/qds-chip.entry.js +252 -0
- package/dist/esm/qds-chip.entry.js.map +1 -0
- package/dist/esm/qds-dialog.entry.js +104 -0
- package/dist/esm/qds-dialog.entry.js.map +1 -0
- package/dist/esm/qds-divider.entry.js +60 -18
- package/dist/esm/qds-divider.entry.js.map +1 -1
- package/dist/esm/qds-dropdown.entry.js +232 -206
- package/dist/esm/qds-dropdown.entry.js.map +1 -1
- package/dist/esm/qds-form-message.entry.js +82 -0
- package/dist/esm/qds-form-message.entry.js.map +1 -0
- package/dist/esm/qds-icon.entry.js +113 -90
- package/dist/esm/qds-icon.entry.js.map +1 -1
- package/dist/esm/qds-inline-link.entry.js +99 -46
- package/dist/esm/qds-inline-link.entry.js.map +1 -1
- package/dist/esm/qds-input.entry.js +404 -185
- package/dist/esm/qds-input.entry.js.map +1 -1
- package/dist/esm/qds-label.entry.js +102 -24
- package/dist/esm/qds-label.entry.js.map +1 -1
- package/dist/esm/qds-list-item.entry.js +153 -0
- package/dist/esm/qds-list-item.entry.js.map +1 -0
- package/dist/esm/qds-loader.entry.js +90 -0
- package/dist/esm/qds-loader.entry.js.map +1 -0
- package/dist/esm/qds-nav-list-item.entry.js +120 -0
- package/dist/esm/qds-nav-list-item.entry.js.map +1 -0
- package/dist/esm/qds-progress-bar.entry.js +131 -0
- package/dist/esm/qds-progress-bar.entry.js.map +1 -0
- package/dist/esm/qds-radio.entry.js +102 -57
- package/dist/esm/qds-radio.entry.js.map +1 -1
- package/dist/esm/qds-select.entry.js +319 -0
- package/dist/esm/qds-select.entry.js.map +1 -0
- package/dist/esm/qds-standalone-link.entry.js +130 -0
- package/dist/esm/qds-standalone-link.entry.js.map +1 -0
- package/dist/esm/qds-switch.entry.js +193 -64
- package/dist/esm/qds-switch.entry.js.map +1 -1
- package/dist/esm/qds-tab.entry.js +295 -0
- package/dist/esm/qds-tab.entry.js.map +1 -0
- package/dist/esm/qds-tabbar.entry.js +345 -0
- package/dist/esm/qds-tabbar.entry.js.map +1 -0
- package/dist/esm/qds-table-body.entry.js +50 -0
- package/dist/esm/qds-table-body.entry.js.map +1 -0
- package/dist/esm/qds-table-cell.entry.js +50 -0
- package/dist/esm/qds-table-cell.entry.js.map +1 -0
- package/dist/esm/qds-table-head-cell.entry.js +50 -0
- package/dist/esm/qds-table-head-cell.entry.js.map +1 -0
- package/dist/esm/qds-table-head.entry.js +50 -0
- package/dist/esm/qds-table-head.entry.js.map +1 -0
- package/dist/esm/qds-table-row.entry.js +50 -0
- package/dist/esm/qds-table-row.entry.js.map +1 -0
- package/dist/esm/qds-table.entry.js +50 -0
- package/dist/esm/qds-table.entry.js.map +1 -0
- package/dist/esm/qds-tag_2.entry.js +176 -0
- package/dist/esm/qds-tag_2.entry.js.map +1 -0
- package/dist/esm/qds-textarea.entry.js +288 -153
- package/dist/esm/qds-textarea.entry.js.map +1 -1
- package/dist/esm/qds-tooltip.entry.js +332 -260
- package/dist/esm/qds-tooltip.entry.js.map +1 -1
- package/dist/esm/qds.js +16 -14
- package/dist/esm/qds.js.map +1 -1
- 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 +160 -0
- package/dist/types/components/button/button.d.ts +272 -194
- 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 +35 -0
- package/dist/types/components/divider/divider.d.ts +13 -9
- package/dist/types/components/dropdown/dropdown.d.ts +107 -125
- package/dist/types/components/form-message/form-message.d.ts +42 -0
- 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/inline-link/inline-link.d.ts +208 -191
- package/dist/types/components/input/input.d.ts +415 -368
- package/dist/types/components/label/label.d.ts +26 -24
- package/dist/types/components/list-item/list-item.d.ts +100 -0
- package/dist/types/components/loader/loader.d.ts +27 -0
- package/dist/types/components/nav-list-item/nav-list-item.d.ts +67 -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 +233 -0
- package/dist/types/components/switch/switch.d.ts +114 -107
- package/dist/types/components/tab/tab.d.ts +160 -0
- package/dist/types/components/tabbar/tabbar.d.ts +47 -0
- package/dist/types/components/table/table.d.ts +15 -0
- package/dist/types/components/table-body/table-body.d.ts +15 -0
- package/dist/types/components/table-cell/table-cell.d.ts +32 -0
- package/dist/types/components/table-head/table-head.d.ts +15 -0
- package/dist/types/components/table-head-cell/table-head-cell.d.ts +56 -0
- package/dist/types/components/table-row/table-row.d.ts +15 -0
- package/dist/types/components/tag/tag.d.ts +55 -0
- package/dist/types/components/textarea/textarea.d.ts +285 -300
- package/dist/types/components/title/title.d.ts +39 -32
- package/dist/types/components/tooltip/tooltip.d.ts +123 -137
- package/dist/types/components.d.ts +3957 -833
- package/dist/types/helpers.d.ts +15 -16
- package/dist/types/index.d.ts +2 -1
- package/dist/types/interface-overrides.d.ts +211 -0
- package/dist/types/qds-test.d.ts +22 -11
- package/dist/types/stencil-public-runtime.d.ts +55 -15
- package/dist/types/utils.d.ts +11 -4
- package/dist/vscode.html-custom-data.json +1528 -210
- package/hydrate/index.d.ts +59 -18
- package/hydrate/index.js +25724 -9014
- package/hydrate/index.mjs +26627 -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 +53 -89
- package/styles/core.css +137 -14
- 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 -175
- 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-71fa96af.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-0a619eeb.js +0 -62
- package/dist/cjs/library-0a619eeb.js.map +0 -1
- package/dist/cjs/qds-title.cjs.entry.js +0 -66
- package/dist/cjs/qds-title.cjs.entry.js.map +0 -1
- package/dist/esm/floating-ui.dom.esm-f96ac766.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-021aca11.js +0 -58
- package/dist/esm/library-021aca11.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-title.entry.js +0 -62
- package/dist/esm/qds-title.entry.js.map +0 -1
- package/dist/types/components/create-story.d.ts +0 -5
|
@@ -1,199 +1,418 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SPDX-FileCopyrightText: ©
|
|
2
|
+
* SPDX-FileCopyrightText: © 2025 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
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
|
10
|
-
const index = require('./index-
|
|
11
|
-
const helpers = require('./helpers-
|
|
10
|
+
const index = require('./index-523dd2e0.js');
|
|
11
|
+
const helpers = require('./helpers-10154521.js');
|
|
12
|
+
const controls = require('./controls-ee3d2ec8.js');
|
|
12
13
|
|
|
13
|
-
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)}";
|
|
14
|
+
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}}.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:\"a\"}.qds-icon{--qds-theme-interactive-background-hover:none;--qds-theme-interactive-background-pressed:none;--qds-control-small-height:var(--qds-control-small-icon-size);flex-shrink:0}.qds-icon-container,.qds-input{grid-area:a}.qds-icon-container{align-items:center;display:flex;justify-content:center;justify-self:end;padding-inline-end:var(--qds-control-input-padding-horizontal)}.qds-icon-container.no-padding{padding-inline-end:0}.qds-focus-ring{border-radius:max(1px,var(\n --qds-control-border-radius-top-left,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-top-right,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-right,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-left,var(--qds-control-border-radius)\n ));grid-area:a;height:calc(100% + var(--qds-control-border-width) - var(--qds-control-border-width-block-end, var(--qds-control-border-width)));isolation:isolate;outline:var(--qds-control-input-focus-border-width) solid var(--qds-theme-control-input-focus-border);pointer-events:none;visibility:hidden;width:calc(100% + var(--qds-control-border-width) - var(\n --qds-control-border-width-inline-end,\n var(--qds-control-border-width)\n ))}[data-size=small]{font:var(--qds-control-small-text);height:var(--qds-control-small-height)}.qds-icon[data-size=small]{--qds-experimental-icon-click-target-size:var(--qds-control-small-height);height:var(--qds-control-small-icon-size);width:var(--qds-control-small-icon-size)}[data-size=small]~.qds-icon-container{gap:var(--qds-control-small-gap-internal);margin-inline-start:var(--qds-control-small-gap-internal)}[data-size=small][type=date],[data-size=small][type=datetime-local],[data-size=small][type=email],[data-size=small][type=month],[data-size=small][type=tel],[data-size=small][type=time],[data-size=small][type=url],[data-size=small][type=week]{padding-inline:var(--qds-control-input-padding-horizontal) calc(var(--qds-control-input-padding-horizontal) + var(--qds-control-small-height))}[data-size=small][type=file]::file-selector-button{font:var(--qds-control-small-text);height:var(--qds-control-small-height);margin-inline-end:var(--qds-control-small-gap-siblings-related);padding-inline:var(--qds-control-button-small-padding-horizontal)}[data-size=small][type=number]::-webkit-inner-spin-button,[data-size=small][type=number]::-webkit-outer-spin-button{margin-inline-start:var(--qds-control-small-gap-internal)}[data-size=small][type=search]{padding-inline:var(--qds-control-input-padding-horizontal) calc(var(--qds-control-small-height) + var(--qds-control-small-icon-size) + var(--qds-control-input-padding-horizontal) + var(--qds-control-small-gap-internal))}[data-size=standard]{font:var(--qds-control-standard-text);height:var(--qds-control-standard-height)}.qds-icon[data-size=standard]{--qds-experimental-icon-click-target-size:var(\n --qds-control-standard-height\n );height:var(--qds-control-standard-icon-size);width:var(--qds-control-standard-icon-size)}[data-size=standard]~.qds-icon-container{gap:var(--qds-control-standard-gap-internal);margin-inline-start:var(--qds-control-standard-gap-internal)}[data-size=standard][type=date],[data-size=standard][type=datetime-local],[data-size=standard][type=email],[data-size=standard][type=month],[data-size=standard][type=tel],[data-size=standard][type=time],[data-size=standard][type=url],[data-size=standard][type=week]{padding-inline:var(--qds-control-input-padding-horizontal) calc(var(--qds-control-input-padding-horizontal) + var(--qds-control-standard-height))}[data-size=standard][type=file]::file-selector-button{font:var(--qds-control-standard-text);height:var(--qds-control-standard-height);margin-inline-end:var(--qds-control-standard-gap-siblings-related);padding-inline:var(--qds-control-button-standard-padding-horizontal)}[data-size=standard][type=number]::-webkit-inner-spin-button,[data-size=standard][type=number]::-webkit-outer-spin-button{margin-inline-start:var(--qds-control-standard-gap-internal)}[data-size=standard][type=search]{padding-inline:var(--qds-control-input-padding-horizontal) calc(var(--qds-control-small-height) + var(--qds-control-standard-icon-size) + var(--qds-control-input-padding-horizontal) + var(--qds-control-standard-gap-internal))}[data-size=large]{font:var(--qds-control-large-text);height:var(--qds-control-large-height)}.qds-icon[data-size=large]{--qds-experimental-icon-click-target-size:var(--qds-control-large-height);height:var(--qds-control-large-icon-size);width:var(--qds-control-large-icon-size)}[data-size=large]~.qds-icon-container{gap:var(--qds-control-large-gap-internal);margin-inline-start:var(--qds-control-large-gap-internal)}[data-size=large][type=date],[data-size=large][type=datetime-local],[data-size=large][type=email],[data-size=large][type=month],[data-size=large][type=tel],[data-size=large][type=time],[data-size=large][type=url],[data-size=large][type=week]{padding-inline:var(--qds-control-input-padding-horizontal) calc(var(--qds-control-input-padding-horizontal) + var(--qds-control-large-height))}[data-size=large][type=file]::file-selector-button{font:var(--qds-control-large-text);height:var(--qds-control-large-height);margin-inline-end:var(--qds-control-large-gap-siblings-related);padding-inline:var(--qds-control-button-large-padding-horizontal)}[data-size=large][type=number]::-webkit-inner-spin-button,[data-size=large][type=number]::-webkit-outer-spin-button{margin-inline-start:var(--qds-control-large-gap-internal)}[data-size=large][type=search]{padding-inline:var(--qds-control-input-padding-horizontal) calc(var(--qds-control-small-height) + var(--qds-control-large-icon-size) + var(--qds-control-input-padding-horizontal) + var(--qds-control-large-gap-internal))}.qds-input{-webkit-appearance:textfield;appearance:textfield;background-color:var(--qds-theme-control-input-background);border-color:var(--qds-theme-control-border);border-radius:var(\n --qds-control-border-radius-top-left,var(--qds-control-border-radius)\n ) var(--qds-control-border-radius-top-right,var(--qds-control-border-radius)) var(\n --qds-control-border-radius-bottom-right,var(--qds-control-border-radius)\n ) var(\n --qds-control-border-radius-bottom-left,var(--qds-control-border-radius)\n );border-style:solid;border-width:var(--qds-control-border-width) var(--qds-control-border-width-inline-end,var(--qds-control-border-width)) var(--qds-control-border-width-block-end,var(--qds-control-border-width)) var(--qds-control-border-width);box-sizing:border-box;color:var(--qds-theme-control-text-standard);grid-area:a;padding-block:0;padding-inline:var(--qds-control-input-padding-horizontal)}.qds-input.qds-hide~.qds-icon-container{display:none}.qds-input:disabled{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:placeholder-shown{color:var(--qds-theme-control-text-placeholder)}.qds-input:not(:focus):user-invalid{border-color:var(--qds-theme-feedback-result-failure)}.qds-input::-webkit-search-cancel-button,.qds-input:is([type=date],[type=datetime-local],[type=month],[type=time],[type=week])::-webkit-calendar-picker-indicator{cursor:pointer;display:none}.qds-input[type=file]{padding-block:var(--qds-control-input-padding-horizontal)}.qds-input[type=file]::file-selector-button{background-color:initial;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)}.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],.qds-input[type=number],.qds-input[type=password],.qds-input[type=text]{padding-inline:var(--qds-control-input-padding-horizontal)}.qds-input[type=color]{-webkit-appearance:none;appearance:none;cursor:pointer;min-width:50px;padding-block:var(--qds-control-input-padding-horizontal)}.qds-input[type=color]::-webkit-color-swatch-wrapper{padding:0}.qds-input[type=color]::-webkit-color-swatch{border:var(--qds-control-border-width) solid var(--qds-theme-control-border);border-radius:var(--qds-control-border-radius)}.qds-input[type=color]::-moz-color-swatch{border:var(--qds-control-border-width) solid var(--qds-theme-control-border);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=large],.qds-input.qds-search-padding[data-size=small],.qds-input.qds-search-padding[data-size=standard]{padding-inline:var(--qds-control-input-padding-horizontal) calc(var(--qds-control-small-height) + var(--qds-control-input-padding-horizontal))}.qds-input[data-size=large][type=file],.qds-input[data-size=small][type=file],.qds-input[data-size=standard][type=file]{height:auto}.qds-input.qds-padding[data-size=large],.qds-input.qds-padding[data-size=small],.qds-input.qds-padding[data-size=standard]{padding-inline:var(--qds-control-input-padding-horizontal)}.qds-input[data-size=large],.qds-input[data-size=small],.qds-input[data-size=standard]{@-moz-document url-prefix(){&[type=date],&[type=datetime-local],&[type=month],&[type=time],&[type=week]{padding-inline-end:var(--qds-control-input-padding-horizontal)}}}.qds-input{@-moz-document url-prefix(){&[type=number]{appearance:none}}}";
|
|
15
|
+
const QdsInputStyle0 = inputCss;
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
18
|
+
//
|
|
19
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
20
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
21
|
+
if (kind === "a" && !f)
|
|
22
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
23
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
24
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
25
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
26
|
+
};
|
|
27
|
+
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
28
|
+
if (kind === "m")
|
|
29
|
+
throw new TypeError("Private method is not writable");
|
|
30
|
+
if (kind === "a" && !f)
|
|
31
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
32
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
33
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
34
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
35
|
+
};
|
|
36
|
+
var _Input_instances, _Input_inheritedAttributes, _Input_input, _Input_computedDisabled_get, _Input_computedIconName_get, _Input_computedSize_get, _Input_computedValue_get, _Input_hasIcon_get, _Input_hasInteractiveIcon_get, _Input_ref, _Input_getFiles, _Input_onBlur, _Input_onCancel, _Input_onChange, _Input_onClear, _Input_onFocus, _Input_onInput, _Input_defineGetter;
|
|
16
37
|
const Input = class {
|
|
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
|
-
|
|
38
|
+
constructor(hostRef) {
|
|
39
|
+
index.registerInstance(this, hostRef);
|
|
40
|
+
this.blurEmitter = index.createEvent(this, "qdsBlur", 2);
|
|
41
|
+
this.cancelEmitter = index.createEvent(this, "qdsCancel", 6);
|
|
42
|
+
this.changeEmitter = index.createEvent(this, "qdsChange", 6);
|
|
43
|
+
this.focusEmitter = index.createEvent(this, "qdsFocus", 2);
|
|
44
|
+
this.inputEmitter = index.createEvent(this, "qdsInput", 6);
|
|
45
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
46
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
50
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
51
|
+
}
|
|
52
|
+
_Input_instances.add(this);
|
|
53
|
+
/**
|
|
54
|
+
* Hide the input type's icon.
|
|
55
|
+
*
|
|
56
|
+
* > **_NOTE:_** Due to browser limitations, the icon may not be hidden in
|
|
57
|
+
* all browsers.
|
|
58
|
+
*/
|
|
59
|
+
this.noIcon = false;
|
|
60
|
+
/**
|
|
61
|
+
* The input's size.
|
|
62
|
+
*
|
|
63
|
+
* > **_NOTE:_** The native [`size` HTML attribute][size] is not supported.
|
|
64
|
+
* CSS `width` should be used instead if this functionality is needed.
|
|
65
|
+
*
|
|
66
|
+
* [size]: https://developer.mozilla.org/docs/Web/HTML/Attributes/size
|
|
67
|
+
*/
|
|
68
|
+
this.size = 'standard';
|
|
69
|
+
/**
|
|
70
|
+
* Returns a file list for a `file` type input.
|
|
71
|
+
*
|
|
72
|
+
* @readonly
|
|
73
|
+
* @webnative
|
|
74
|
+
*/
|
|
75
|
+
// eslint-disable-next-line unicorn/no-null
|
|
76
|
+
this.files = null;
|
|
77
|
+
/**
|
|
78
|
+
* The [`<form>`][] element to associate the input with (its form owner).
|
|
79
|
+
*
|
|
80
|
+
* The value of this attribute must be the id of a `<form>` in the same
|
|
81
|
+
* document. If this attribute is not set, the `<qds-input>` is associated
|
|
82
|
+
* with its ancestor `<form>` element, if any.
|
|
83
|
+
*
|
|
84
|
+
* This attribute lets you associate `<qds-input>` elements to `<form>`s
|
|
85
|
+
* anywhere in the document, not just inside a `<form>`. It can also override
|
|
86
|
+
* an ancestor `<form>` element.
|
|
87
|
+
*
|
|
88
|
+
* [`<form>`]: https://developer.mozilla.org/docs/Web/HTML/Element/form
|
|
89
|
+
*
|
|
90
|
+
* @readonly
|
|
91
|
+
* @webnative
|
|
92
|
+
*/
|
|
93
|
+
// eslint-disable-next-line unicorn/no-null
|
|
94
|
+
this.form = null;
|
|
95
|
+
/**
|
|
96
|
+
* Returns a list of the [`<label>`][] elements associated with the
|
|
97
|
+
* `qds-input` element.
|
|
98
|
+
*
|
|
99
|
+
* [`<label>`]: https://developer.mozilla.org/docs/Web/HTML/Element/label
|
|
100
|
+
*
|
|
101
|
+
* @readonly
|
|
102
|
+
* @webnative
|
|
103
|
+
*/
|
|
104
|
+
this.labels = {};
|
|
105
|
+
/**
|
|
106
|
+
* Get or set the selection direction of a text selection.
|
|
107
|
+
*
|
|
108
|
+
* > **_NOTE:_** This property has no effect when used as an attribute.
|
|
109
|
+
*
|
|
110
|
+
* @webnative
|
|
111
|
+
*/
|
|
112
|
+
this.selectionDirection = null;
|
|
113
|
+
/**
|
|
114
|
+
* Get or set the ending position or offset of a text selection.
|
|
115
|
+
*
|
|
116
|
+
* > **_NOTE:_** This property has no effect when used as an attribute.
|
|
117
|
+
*
|
|
118
|
+
* @webnative
|
|
119
|
+
*/
|
|
120
|
+
this.selectionEnd = null;
|
|
121
|
+
/**
|
|
122
|
+
* Get or set the starting position or offset of a text selection.
|
|
123
|
+
*
|
|
124
|
+
* > **_NOTE:_** This property has no effect when used as an attribute.
|
|
125
|
+
*
|
|
126
|
+
* @webnative
|
|
127
|
+
*/
|
|
128
|
+
this.selectionStart = null;
|
|
129
|
+
/**
|
|
130
|
+
* The error message that would be shown to the user if the `<qds-input>`
|
|
131
|
+
* was to be checked for validity.
|
|
132
|
+
*
|
|
133
|
+
* @readonly
|
|
134
|
+
* @webnative
|
|
135
|
+
*/
|
|
136
|
+
this.validationMessage = '';
|
|
137
|
+
/**
|
|
138
|
+
* The [`ValidityState`][] object for this `<qds-input>`.
|
|
139
|
+
*
|
|
140
|
+
* [`ValidityState`]: https://developer.mozilla.org/docs/Web/API/ValidityState
|
|
141
|
+
*
|
|
142
|
+
* @readonly
|
|
143
|
+
* @webnative
|
|
144
|
+
*/
|
|
145
|
+
this.validity = controls.VALID_STATE;
|
|
146
|
+
/**
|
|
147
|
+
* True if `<qds-input>` will be validated when the form is submitted; false
|
|
148
|
+
* otherwise.
|
|
149
|
+
*
|
|
150
|
+
* @readonly
|
|
151
|
+
* @webnative
|
|
152
|
+
*/
|
|
153
|
+
this.willValidate = false;
|
|
154
|
+
_Input_inheritedAttributes.set(this, {});
|
|
155
|
+
_Input_input.set(this, void 0);
|
|
156
|
+
this.checkValidity = () => this.internals.checkValidity();
|
|
157
|
+
this.reportValidity = () => this.internals.reportValidity();
|
|
158
|
+
this.setCustomValidity = (error) => {
|
|
159
|
+
helpers.invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
160
|
+
__classPrivateFieldGet(this, _Input_input, "f").setCustomValidity(error);
|
|
161
|
+
if (error)
|
|
162
|
+
this.internals.setValidity(controls.CUSTOM_ERROR_FLAGS, error, __classPrivateFieldGet(this, _Input_input, "f"));
|
|
163
|
+
else
|
|
164
|
+
this.internals.setValidity(controls.NO_ERROR_FLAGS);
|
|
165
|
+
};
|
|
166
|
+
this.select = () => {
|
|
167
|
+
helpers.invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
168
|
+
__classPrivateFieldGet(this, _Input_input, "f").select();
|
|
169
|
+
};
|
|
170
|
+
this.getSelectionDirection = () => {
|
|
171
|
+
helpers.invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
172
|
+
return __classPrivateFieldGet(this, _Input_input, "f").selectionDirection;
|
|
173
|
+
};
|
|
174
|
+
this.getSelectionStart = () => {
|
|
175
|
+
helpers.invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
176
|
+
return __classPrivateFieldGet(this, _Input_input, "f").selectionStart;
|
|
177
|
+
};
|
|
178
|
+
this.getSelectionEnd = () => {
|
|
179
|
+
helpers.invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
180
|
+
return __classPrivateFieldGet(this, _Input_input, "f").selectionEnd;
|
|
181
|
+
};
|
|
182
|
+
this.setRangeText = (replacement, start, end, selectionMode) => {
|
|
183
|
+
helpers.invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
184
|
+
__classPrivateFieldGet(this, _Input_input, "f").setRangeText(replacement, start, end, selectionMode);
|
|
185
|
+
if (this.value !== __classPrivateFieldGet(this, _Input_input, "f").value) {
|
|
186
|
+
this.value = __classPrivateFieldGet(this, _Input_input, "f").value;
|
|
187
|
+
this.inputEmitter.emit();
|
|
188
|
+
this.changeEmitter.emit();
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
this.setSelectionRange = (start, end, direction) => {
|
|
192
|
+
helpers.invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
193
|
+
__classPrivateFieldGet(this, _Input_input, "f").setSelectionRange(start, end, direction);
|
|
194
|
+
};
|
|
195
|
+
this.stepDown = (n) => {
|
|
196
|
+
helpers.invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
197
|
+
__classPrivateFieldGet(this, _Input_input, "f").stepDown(n);
|
|
198
|
+
};
|
|
199
|
+
this.stepUp = (n) => {
|
|
200
|
+
helpers.invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
201
|
+
__classPrivateFieldGet(this, _Input_input, "f").stepUp(n);
|
|
202
|
+
};
|
|
203
|
+
this.showPicker = () => {
|
|
204
|
+
helpers.invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
205
|
+
__classPrivateFieldGet(this, _Input_input, "f").showPicker();
|
|
206
|
+
};
|
|
207
|
+
_Input_ref.set(this, (input) => {
|
|
208
|
+
__classPrivateFieldSet(this, _Input_input, input, "f");
|
|
209
|
+
});
|
|
210
|
+
_Input_getFiles.set(this, () => {
|
|
211
|
+
helpers.invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
212
|
+
return __classPrivateFieldGet(this, _Input_input, "f").files;
|
|
213
|
+
});
|
|
214
|
+
_Input_onBlur.set(this, (event) => {
|
|
215
|
+
this.blurEmitter.emit(helpers.pickFocusEventAttributes(event));
|
|
216
|
+
});
|
|
217
|
+
_Input_onCancel.set(this, () => {
|
|
218
|
+
this.cancelEmitter.emit();
|
|
219
|
+
});
|
|
220
|
+
_Input_onChange.set(this, () => {
|
|
221
|
+
this.changeEmitter.emit();
|
|
222
|
+
});
|
|
223
|
+
_Input_onClear.set(this, () => {
|
|
224
|
+
helpers.invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
225
|
+
__classPrivateFieldGet(this, _Input_input, "f").value = '';
|
|
226
|
+
__classPrivateFieldGet(this, _Input_onInput, "f").call(this, new InputEvent('input', { inputType: 'deleteContent' }));
|
|
227
|
+
});
|
|
228
|
+
_Input_onFocus.set(this, (event) => {
|
|
229
|
+
this.focusEmitter.emit(helpers.pickFocusEventAttributes(event));
|
|
230
|
+
});
|
|
231
|
+
_Input_onInput.set(this, (event) => {
|
|
232
|
+
helpers.invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
233
|
+
this.value = __classPrivateFieldGet(this, _Input_input, "f").value;
|
|
234
|
+
this.inputEmitter.emit(helpers.pickInputEventAttributes(event));
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
onClick(event) {
|
|
238
|
+
if (__classPrivateFieldGet(this, _Input_instances, "a", _Input_computedDisabled_get))
|
|
239
|
+
event.stopImmediatePropagation();
|
|
240
|
+
}
|
|
241
|
+
onKeydown(event) {
|
|
242
|
+
if (__classPrivateFieldGet(this, _Input_instances, "a", _Input_computedDisabled_get)) {
|
|
243
|
+
event.stopImmediatePropagation();
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
if (event.key === 'Enter' && this.internals.form) {
|
|
247
|
+
this.internals.form.requestSubmit();
|
|
248
|
+
event.preventDefault();
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
disabledChanged() {
|
|
252
|
+
if (__classPrivateFieldGet(this, _Input_instances, "a", _Input_computedDisabled_get))
|
|
253
|
+
// eslint-disable-next-line unicorn/no-null
|
|
254
|
+
this.internals.setFormValue(null);
|
|
255
|
+
else
|
|
256
|
+
this.internals.setFormValue(__classPrivateFieldGet(this, _Input_instances, "a", _Input_computedValue_get));
|
|
257
|
+
}
|
|
258
|
+
selectionDirectionChanged() {
|
|
259
|
+
helpers.invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
260
|
+
__classPrivateFieldGet(this, _Input_input, "f").selectionDirection = this.selectionDirection;
|
|
261
|
+
}
|
|
262
|
+
selectionEndChanged() {
|
|
263
|
+
helpers.invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
264
|
+
__classPrivateFieldGet(this, _Input_input, "f").selectionEnd = this.selectionEnd;
|
|
265
|
+
}
|
|
266
|
+
selectionStartChanged() {
|
|
267
|
+
helpers.invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
268
|
+
__classPrivateFieldGet(this, _Input_input, "f").selectionStart = this.selectionStart;
|
|
269
|
+
}
|
|
270
|
+
tabindexChanged(newValue) {
|
|
271
|
+
const parsedValue = Number.parseInt(newValue, 10);
|
|
272
|
+
this.tabIndex =
|
|
273
|
+
parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue;
|
|
274
|
+
}
|
|
275
|
+
validationChanged() {
|
|
276
|
+
if (!__classPrivateFieldGet(this, _Input_input, "f"))
|
|
277
|
+
return;
|
|
278
|
+
if (__classPrivateFieldGet(this, _Input_input, "f").max !== this.max && this.max !== undefined)
|
|
279
|
+
__classPrivateFieldGet(this, _Input_input, "f").max = this.max.toString();
|
|
280
|
+
if (this.maxLength !== undefined)
|
|
281
|
+
__classPrivateFieldGet(this, _Input_input, "f").maxLength = this.maxLength;
|
|
282
|
+
if (__classPrivateFieldGet(this, _Input_input, "f").min !== this.min && this.min !== undefined)
|
|
283
|
+
__classPrivateFieldGet(this, _Input_input, "f").min = this.min.toString();
|
|
284
|
+
if (this.minLength !== undefined)
|
|
285
|
+
__classPrivateFieldGet(this, _Input_input, "f").minLength = this.minLength;
|
|
286
|
+
if (this.pattern !== undefined)
|
|
287
|
+
__classPrivateFieldGet(this, _Input_input, "f").pattern = this.pattern;
|
|
288
|
+
__classPrivateFieldGet(this, _Input_input, "f").required = this.required ?? false;
|
|
289
|
+
if (__classPrivateFieldGet(this, _Input_input, "f").step !== this.step && this.step !== undefined)
|
|
290
|
+
__classPrivateFieldGet(this, _Input_input, "f").step = this.step.toString();
|
|
291
|
+
if (this.type !== undefined)
|
|
292
|
+
__classPrivateFieldGet(this, _Input_input, "f").type = this.type;
|
|
293
|
+
// eslint-disable-next-line unicorn/no-null
|
|
294
|
+
if (this.type !== 'file' && this.value != null)
|
|
295
|
+
__classPrivateFieldGet(this, _Input_input, "f").value = this.value.toString();
|
|
296
|
+
const { valid } = __classPrivateFieldGet(this, _Input_input, "f").validity;
|
|
297
|
+
if (valid)
|
|
298
|
+
this.internals.setValidity(controls.NO_ERROR_FLAGS, undefined, __classPrivateFieldGet(this, _Input_input, "f"));
|
|
299
|
+
else
|
|
300
|
+
this.internals.setValidity(__classPrivateFieldGet(this, _Input_input, "f").validity, __classPrivateFieldGet(this, _Input_input, "f").validationMessage, __classPrivateFieldGet(this, _Input_input, "f"));
|
|
301
|
+
}
|
|
302
|
+
valueChanged() {
|
|
303
|
+
if (!__classPrivateFieldGet(this, _Input_instances, "a", _Input_computedDisabled_get))
|
|
304
|
+
this.internals.setFormValue(__classPrivateFieldGet(this, _Input_instances, "a", _Input_computedValue_get));
|
|
305
|
+
}
|
|
306
|
+
componentWillLoad() {
|
|
307
|
+
__classPrivateFieldGet(this, _Input_instances, "m", _Input_defineGetter).call(this, 'form', () => this.internals.form);
|
|
308
|
+
__classPrivateFieldGet(this, _Input_instances, "m", _Input_defineGetter).call(this, 'willValidate', () => this.internals.willValidate);
|
|
309
|
+
__classPrivateFieldGet(this, _Input_instances, "m", _Input_defineGetter).call(this, 'validity', () => this.internals.validity);
|
|
310
|
+
__classPrivateFieldGet(this, _Input_instances, "m", _Input_defineGetter).call(this, 'validationMessage', () => this.internals.validationMessage);
|
|
311
|
+
__classPrivateFieldGet(this, _Input_instances, "m", _Input_defineGetter).call(this, 'files', __classPrivateFieldGet(this, _Input_getFiles, "f"));
|
|
312
|
+
__classPrivateFieldGet(this, _Input_instances, "m", _Input_defineGetter).call(this, 'labels', () => this.internals.labels);
|
|
313
|
+
__classPrivateFieldSet(this, _Input_inheritedAttributes, helpers.inheritAriaAttributes(this.host), "f");
|
|
314
|
+
this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0');
|
|
315
|
+
}
|
|
316
|
+
componentDidLoad() {
|
|
317
|
+
helpers.invariant(__classPrivateFieldGet(this, _Input_input, "f"));
|
|
318
|
+
this.validationChanged();
|
|
319
|
+
this.valueChanged();
|
|
320
|
+
// FIXME: This event is supported by the native `<input>` element but not
|
|
321
|
+
// recognized by Stencil's type definitions, so it needs to be manually
|
|
322
|
+
// bound here.
|
|
323
|
+
__classPrivateFieldGet(this, _Input_input, "f").addEventListener('cancel', __classPrivateFieldGet(this, _Input_onCancel, "f"));
|
|
324
|
+
}
|
|
325
|
+
disconnectedCallback() {
|
|
326
|
+
if (__classPrivateFieldGet(this, _Input_input, "f"))
|
|
327
|
+
__classPrivateFieldGet(this, _Input_input, "f").removeEventListener('cancel', __classPrivateFieldGet(this, _Input_onCancel, "f"));
|
|
328
|
+
}
|
|
329
|
+
render() {
|
|
330
|
+
const hasValue = this.value !== null && this.value !== undefined && this.value !== '';
|
|
331
|
+
const isSearchType = this.type === 'search';
|
|
332
|
+
const shouldShowClearButton = isSearchType && hasValue;
|
|
333
|
+
const shouldShowSearchIcon = isSearchType && this.noIcon === false;
|
|
334
|
+
const shouldHideIcon = !isSearchType && this.noIcon === true;
|
|
335
|
+
const shouldRemoveSearchPadding = isSearchType && this.noIcon === true;
|
|
336
|
+
return (index.h("div", { key: '1896729930a4fad1d75e2ecb44fd73c450a046e9', class: "qds-container" }, index.h("input", { key: '496c8f82b467f762e869b4f9730806231f7cd6ad', accept: this.accept, autoCapitalize: this.host.autocapitalize, autoComplete: this.autoComplete,
|
|
337
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
338
|
+
autoFocus: this.host.autofocus, capture: this.capture, class: {
|
|
339
|
+
'qds-search-padding': shouldRemoveSearchPadding,
|
|
340
|
+
'qds-input': true,
|
|
341
|
+
'qds-hide': shouldHideIcon,
|
|
342
|
+
'qds-padding': shouldHideIcon,
|
|
343
|
+
}, "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, 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: this.type, ...__classPrivateFieldGet(this, _Input_inheritedAttributes, "f") }), index.h("div", { key: '4fb72502435349071f8c43222f51b34ede2151b9', class: "qds-focus-ring" }), __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedIconName_get) && (index.h("div", { key: '3ee0c7c55a1bb74eb802db9e11786d799c39bf52', class: {
|
|
344
|
+
'qds-icon-container': true,
|
|
345
|
+
'no-padding': shouldRemoveSearchPadding,
|
|
346
|
+
} }, shouldShowClearButton && (index.h("qds-button", { key: 'ebb601275245ac08328e30a4b37f1c14f4b41ea0', class: {
|
|
347
|
+
'qds-icon': true,
|
|
348
|
+
'qds-hide': !hasValue,
|
|
349
|
+
}, disabled: this.disabled, iconLibrary: "core", iconName: "clear", iconOnly: true, importance: "subdued", onClick: __classPrivateFieldGet(this, _Input_onClear, "f"), size: "small", text: "clear input" })), __classPrivateFieldGet(this, _Input_instances, "a", _Input_hasIcon_get) && (index.h("qds-icon", { key: 'e343dcff629da268d611ee78a7a8ee90f957aa11', "aria-hidden": "true", class: "qds-icon", "data-size": __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedSize_get), library: "core", name: __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedIconName_get) })), __classPrivateFieldGet(this, _Input_instances, "a", _Input_hasInteractiveIcon_get) && (index.h("qds-button", { key: '4963e7f006cc65254da5d52a2570aea71cf7048a', class: "qds-icon", disabled: this.disabled, iconLibrary: "core", iconName: __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedIconName_get), iconOnly: true, importance: "subdued", onClick: this.showPicker, size: "small", text: this.type ?? '' })), shouldShowSearchIcon ? (index.h("qds-icon", { "aria-hidden": "true", class: "qds-icon", "data-size": __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedSize_get), library: "core", name: __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedIconName_get) })) : (index.h("div", null))))));
|
|
350
|
+
}
|
|
351
|
+
static get delegatesFocus() { return true; }
|
|
352
|
+
static get formAssociated() { return true; }
|
|
353
|
+
get host() { return index.getElement(this); }
|
|
354
|
+
static get watchers() { return {
|
|
355
|
+
"disabled": ["disabledChanged"],
|
|
356
|
+
"selectionDirection": ["selectionDirectionChanged"],
|
|
357
|
+
"selectionEnd": ["selectionEndChanged"],
|
|
358
|
+
"selectionStart": ["selectionStartChanged"],
|
|
359
|
+
"tabindex": ["tabindexChanged"],
|
|
360
|
+
"max": ["validationChanged"],
|
|
361
|
+
"maxLength": ["validationChanged"],
|
|
362
|
+
"min": ["validationChanged"],
|
|
363
|
+
"minLength": ["validationChanged"],
|
|
364
|
+
"pattern": ["validationChanged"],
|
|
365
|
+
"required": ["validationChanged"],
|
|
366
|
+
"step": ["validationChanged"],
|
|
367
|
+
"type": ["validationChanged"],
|
|
368
|
+
"value": ["validationChanged", "valueChanged"]
|
|
369
|
+
}; }
|
|
370
|
+
};
|
|
371
|
+
_Input_inheritedAttributes = new WeakMap(), _Input_input = new WeakMap(), _Input_ref = new WeakMap(), _Input_getFiles = new WeakMap(), _Input_onBlur = new WeakMap(), _Input_onCancel = 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() {
|
|
372
|
+
return this.host.matches(':disabled') || (this.disabled ?? false);
|
|
373
|
+
}, _Input_computedIconName_get = function _Input_computedIconName_get() {
|
|
374
|
+
switch (this.type) {
|
|
375
|
+
case 'date':
|
|
376
|
+
case 'datetime-local':
|
|
377
|
+
case 'email':
|
|
378
|
+
case 'month':
|
|
379
|
+
case 'search':
|
|
380
|
+
case 'tel':
|
|
381
|
+
case 'time':
|
|
382
|
+
case 'url':
|
|
383
|
+
case 'week': {
|
|
384
|
+
return `input-${this.type}`;
|
|
385
|
+
}
|
|
386
|
+
default: {
|
|
387
|
+
return undefined;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}, _Input_computedSize_get = function _Input_computedSize_get() {
|
|
391
|
+
switch (this.size) {
|
|
392
|
+
case 'standard':
|
|
393
|
+
case 'small':
|
|
394
|
+
case 'large': {
|
|
395
|
+
return this.size;
|
|
396
|
+
}
|
|
397
|
+
default: {
|
|
398
|
+
return 'standard';
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}, _Input_computedValue_get = function _Input_computedValue_get() {
|
|
402
|
+
if (typeof this.value === 'number')
|
|
403
|
+
return this.value.toString();
|
|
404
|
+
// eslint-disable-next-line unicorn/no-null
|
|
405
|
+
return this.value === undefined ? null : this.value;
|
|
406
|
+
}, _Input_hasIcon_get = function _Input_hasIcon_get() {
|
|
407
|
+
return (typeof this.type === 'string' &&
|
|
408
|
+
['email', 'tel', 'url'].includes(this.type));
|
|
409
|
+
}, _Input_hasInteractiveIcon_get = function _Input_hasInteractiveIcon_get() {
|
|
410
|
+
return (typeof this.type === 'string' &&
|
|
411
|
+
['month', 'time', 'date', 'datetime-local', 'week'].includes(this.type));
|
|
412
|
+
}, _Input_defineGetter = function _Input_defineGetter(p, get) {
|
|
413
|
+
Object.defineProperty(this.host, p, { enumerable: true, get });
|
|
195
414
|
};
|
|
196
|
-
Input.style =
|
|
415
|
+
Input.style = QdsInputStyle0;
|
|
197
416
|
|
|
198
417
|
exports.qds_input = Input;
|
|
199
418
|
|