@luzmo/lucero 1.0.1-alpha.15 → 1.0.1-alpha.17
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/components/accordion/index.cjs +183 -6
- package/components/accordion/index.js +136 -88
- package/components/action-bar/index.cjs +85 -4
- package/components/action-bar/index.js +72 -50
- package/components/action-button/index.cjs +205 -3
- package/components/action-button/index.js +167 -93
- package/components/action-group/index.cjs +7 -1
- package/components/action-group/index.js +12 -8
- package/components/action-group-DHp8RHDf.js +392 -0
- package/components/action-group-MPf19RPV.cjs +391 -0
- package/components/action-menu/index.cjs +91 -11
- package/components/action-menu/index.js +66 -47
- package/components/avatar/index.cjs +63 -3
- package/components/avatar/index.js +54 -42
- package/components/base-COw9n7UR.cjs +119 -0
- package/components/base-DmeVy0cq.js +120 -0
- package/components/button/index.cjs +134 -2
- package/components/button/index.js +106 -72
- package/components/button-base-7Ak55xFd.cjs +206 -0
- package/components/button-base-C3kf6BTK.js +207 -0
- package/components/button-group/index.cjs +45 -1
- package/components/button-group/index.js +37 -25
- package/components/calendar/index.cjs +632 -1
- package/components/calendar/index.js +637 -7
- package/components/checkbox/index.cjs +111 -4
- package/components/checkbox/index.js +98 -53
- package/components/checkbox-mixin-8cL-vfDy.js +84 -0
- package/components/checkbox-mixin-CE7dJj3J.cjs +83 -0
- package/components/clear-button-Co6oKSgl.js +59 -0
- package/components/clear-button-X_HDY2eH.cjs +58 -0
- package/components/close-button-DPBK6Kpu.cjs +59 -0
- package/components/close-button-Miw9ZjoJ.js +60 -0
- package/components/color-area/index.cjs +440 -13
- package/components/color-area/index.js +322 -187
- package/components/color-controller-BjDZaxhX.js +491 -0
- package/components/color-controller-C3c_vb2P.cjs +490 -0
- package/components/color-field/index.cjs +95 -2
- package/components/color-field/index.js +77 -41
- package/components/color-handle/index.cjs +64 -3
- package/components/color-handle/index.js +58 -37
- package/components/color-loupe/index.cjs +7 -1
- package/components/color-loupe/index.js +12 -8
- package/components/color-loupe-BQqNR8YD.cjs +88 -0
- package/components/color-loupe-B_DDFv8l.js +89 -0
- package/components/color-menu/index.cjs +217 -12
- package/components/color-menu/index.js +187 -93
- package/components/color-palette/index.cjs +89 -1
- package/components/color-palette/index.js +78 -51
- package/components/color-palette-group/index.cjs +259 -3
- package/components/color-palette-group/index.js +193 -105
- package/components/color-picker/index.cjs +114 -6
- package/components/color-picker/index.js +92 -72
- package/components/color-slider/index.cjs +585 -1
- package/components/color-slider/index.js +590 -7
- package/components/{directive-oAbCiebi.js → condition-attribute-with-id-Cn815e9W.js} +22 -22
- package/components/condition-attribute-with-id-DEc2Yjne.cjs +43 -0
- package/components/date-time-picker/index.cjs +1357 -31
- package/components/date-time-picker/index.js +951 -637
- package/components/dependency-manger-CcIE1uvQ.cjs +63 -0
- package/components/{dependency-manger-CEXvGQUV.js → dependency-manger-XHpQjFgK.js} +24 -14
- package/components/divider/index.cjs +54 -1
- package/components/divider/index.js +49 -30
- package/components/divider.module-Cm5LcDRV.cjs +20 -0
- package/components/divider.module-DauH6k2_.js +21 -0
- package/components/element-resolution-DCsrhGZO.cjs +112 -0
- package/components/element-resolution-nMlmW4Jy.js +113 -0
- package/components/field-group/index.cjs +7 -1
- package/components/field-group/index.js +12 -8
- package/components/field-group-DNmY8W9v.cjs +86 -0
- package/components/field-group-DVdAWCQF.js +87 -0
- package/components/field-label/index.cjs +7 -1
- package/components/field-label/index.js +12 -8
- package/components/field-label-CKH9EXpR.cjs +156 -0
- package/components/field-label-Dpsecoc6.js +157 -0
- package/components/focus-group-BqDAk9Is.js +337 -0
- package/components/focus-group-DFzOlalL.cjs +336 -0
- package/components/focus-visible-B-B8-P9R.cjs +104 -0
- package/components/focus-visible-BUPRWlsh.js +105 -0
- package/components/focusable-BPrTcZPd.cjs +262 -0
- package/components/focusable-ChCLg1k4.js +263 -0
- package/components/{directive-C7oCP5Bh.cjs → focusable-selectors-D0t_5P7C.cjs} +16 -5
- package/components/{focusable-selectors-B4YgbghQ.js → focusable-selectors-IltOAOd9.js} +7 -4
- package/components/icon/index.cjs +90 -1
- package/components/icon/index.js +74 -46
- package/components/index.cjs +174 -1
- package/components/index.js +174 -172
- package/components/infield-button/index.cjs +46 -2
- package/components/infield-button/index.js +41 -30
- package/components/label/index.cjs +37 -1
- package/components/label/index.js +36 -24
- package/components/{language-resolution-8yZa5r_P.js → language-resolution-BSGJAWiQ.js} +21 -16
- package/components/language-resolution-iN9EImbb.cjs +57 -0
- package/components/like-anchor-D62faRNG.cjs +79 -0
- package/components/like-anchor-v3cJ9RWM.js +80 -0
- package/components/manage-help-text-BYx84zZR.cjs +125 -0
- package/components/manage-help-text-DOuMTGht.js +126 -0
- package/components/menu/index.cjs +1297 -29
- package/components/menu/index.js +954 -499
- package/components/multi-language-field/index.cjs +132 -2
- package/components/multi-language-field/index.js +118 -88
- package/components/number-field/index.cjs +613 -10
- package/components/number-field/index.js +442 -243
- package/components/observe-slot-presence-9AwLGUQ_.cjs +78 -0
- package/components/observe-slot-presence-DcMdoumP.js +79 -0
- package/components/observe-slot-text-CSofZeeF.cjs +104 -0
- package/components/observe-slot-text-CjnkkBPn.js +105 -0
- package/components/options/index.cjs +693 -60
- package/components/options/index.js +519 -953
- package/components/overlay/index.cjs +367 -21
- package/components/overlay/index.js +273 -189
- package/components/overlay-CN8ISP1F.js +2485 -0
- package/components/overlay-LViy9VWM.cjs +2484 -0
- package/components/{pending-state-DTX7ggyF.js → pending-state-CXbe-Xul.js} +28 -13
- package/components/pending-state-e4RbXe9u.cjs +75 -0
- package/components/picker/index.cjs +9 -1
- package/components/picker/index.js +15 -11
- package/components/picker-DNde3awt.cjs +672 -0
- package/components/picker-PfUAF05y.js +673 -0
- package/components/picker-button/index.cjs +56 -4
- package/components/picker-button/index.js +45 -34
- package/components/platform-CxDar3Dn.cjs +68 -0
- package/components/platform-Cxn0WbyT.js +69 -0
- package/components/popover/index.cjs +7 -1
- package/components/popover/index.js +12 -8
- package/components/popover-BkbYhl3i.js +74 -0
- package/components/popover-BkgUf0kL.cjs +74 -0
- package/components/progress-circle/index.cjs +7 -1
- package/components/progress-circle/index.js +12 -8
- package/components/progress-circle-Hu_ivPHf.js +133 -0
- package/components/progress-circle-_Etqsj9f.cjs +132 -0
- package/components/radio/index.cjs +244 -2
- package/components/radio/index.js +192 -110
- package/components/{when-CDK1Tt5Y.js → random-id-BE6HA503.cjs} +7 -10
- package/components/{random-id-ByCz1xaq.js → random-id-BEc6QIUL.js} +3 -3
- package/components/roving-tabindex-AsmAh2In.cjs +95 -0
- package/components/roving-tabindex-DPF9NmrH.js +96 -0
- package/components/search/index.cjs +115 -8
- package/components/search/index.js +96 -66
- package/components/select/index.cjs +720 -51
- package/components/select/index.js +563 -347
- package/components/sized-mixin-DmkrNdWB.js +80 -0
- package/components/sized-mixin-UaTVa-AE.cjs +79 -0
- package/components/slider/index.cjs +119 -1
- package/components/slider/index.js +100 -1113
- package/components/{condition-attribute-with-id-Dv4lSRbe.js → slottable-request-event-CANixJnR.cjs} +15 -13
- package/components/{slottable-request-event-DggLA4Rx.js → slottable-request-event-D9WzrdWv.js} +12 -9
- package/components/strategies-DlMlaSJR.cjs +317 -0
- package/components/strategies-DlPQoTFE.js +318 -0
- package/components/streaming-listener-D4sHaMub.cjs +145 -0
- package/components/streaming-listener-cAz5zJyk.js +146 -0
- package/components/swatch/index.cjs +436 -7
- package/components/swatch/index.js +350 -205
- package/components/switch/index.cjs +61 -2
- package/components/switch/index.js +51 -34
- package/components/tabs/index.cjs +693 -26
- package/components/tabs/index.js +521 -388
- package/components/tags/index.cjs +201 -4
- package/components/tags/index.js +152 -87
- package/components/text-field/index.cjs +49 -3
- package/components/text-field/index.js +44 -30
- package/components/text-field-11tcnftU.cjs +338 -0
- package/components/text-field-Chi9J2Cz.js +339 -0
- package/components/text-field.module-CMBS0jSL.js +21 -0
- package/components/text-field.module-DIJdV_sA.cjs +20 -0
- package/components/toast/index.cjs +177 -12
- package/components/toast/index.js +145 -73
- package/components/tooltip/index.cjs +221 -6
- package/components/tooltip/index.js +155 -131
- package/components/tooltip/tooltip.d.ts +1 -12
- package/components/unit-input/index.cjs +232 -8
- package/components/unit-input/index.js +201 -108
- package/components/utils.cjs +25 -1
- package/components/utils.js +22 -22
- package/custom-elements.json +1 -1
- package/package.json +1 -1
- package/components/NumberFormatter-DewVDY5w.cjs +0 -18
- package/components/NumberFormatter-DgOUVrge.js +0 -136
- package/components/NumberParser-Dik4a0h-.cjs +0 -18
- package/components/NumberParser-ci9J5EKv.js +0 -173
- package/components/action-group-DBImibFn.js +0 -258
- package/components/action-group-DJGMcRHb.cjs +0 -20
- package/components/async-directive-BX1T1e1_.cjs +0 -22
- package/components/async-directive-BfcqVjDp.js +0 -82
- package/components/base-BjTwmyRF.cjs +0 -22
- package/components/base-CBCg3yyw.cjs +0 -40
- package/components/base-D76d76ww.js +0 -26
- package/components/base-WsynuqaS.js +0 -677
- package/components/button-base-DbkDzb71.js +0 -144
- package/components/button-base-XgPLmwP-.cjs +0 -25
- package/components/checkbox-mixin-BDN0dBtS.cjs +0 -27
- package/components/checkbox-mixin-Do7EgtpQ.js +0 -70
- package/components/class-map-Di1D_rCm.cjs +0 -22
- package/components/class-map-NbVXqBU0.js +0 -51
- package/components/clear-button-BbVqNU-g.js +0 -53
- package/components/clear-button-DYdeFsS8.cjs +0 -18
- package/components/close-button-CpfKibqg.cjs +0 -18
- package/components/close-button-DzOZZmkY.js +0 -51
- package/components/color-controller-B0uX6Zso.js +0 -3230
- package/components/color-controller-CoUL5f9K.cjs +0 -18
- package/components/color-loupe-CaA_Lfkk.cjs +0 -56
- package/components/color-loupe-CmMsXbjT.js +0 -81
- package/components/condition-attribute-with-id-DrQYZzFS.cjs +0 -18
- package/components/dependency-manger-C5HCkMMB.cjs +0 -18
- package/components/directive-helpers-Cm6gitnu.js +0 -62
- package/components/directive-helpers-DyIRTWwA.cjs +0 -22
- package/components/divider.module-DDvBo9zo.cjs +0 -18
- package/components/divider.module-DoQWQEIJ.js +0 -21
- package/components/element-resolution-BvRLGqIU.cjs +0 -18
- package/components/element-resolution-FCUT-wql.js +0 -91
- package/components/field-group-DXfBWrkO.js +0 -66
- package/components/field-group-DkGst3r5.cjs +0 -23
- package/components/field-label-CZ2zzChK.js +0 -106
- package/components/field-label-mO1AkUgR.cjs +0 -25
- package/components/flow-D-0MTYCm.js +0 -527
- package/components/flow-DM3dNAKs.cjs +0 -30
- package/components/focus-group-DHeTq18L.js +0 -218
- package/components/focus-group-DnxZUBhQ.cjs +0 -18
- package/components/focus-visible-B0P9aY_G.cjs +0 -18
- package/components/focus-visible-DBlJGoEW.js +0 -74
- package/components/focusable-BxtpnzWp.js +0 -153
- package/components/focusable-EbipgXRh.cjs +0 -18
- package/components/focusable-selectors-BgFlyFcY.cjs +0 -18
- package/components/if-defined-C9YGdo33.cjs +0 -22
- package/components/if-defined-DOaE2coe.js +0 -27
- package/components/index-BQoI8AD3.cjs +0 -113
- package/components/index-BwxgAdzi.cjs +0 -57
- package/components/index-Cb9zsiz6.js +0 -1490
- package/components/index-HjQa8tew.js +0 -1174
- package/components/language-resolution-DJzmyzZq.cjs +0 -18
- package/components/like-anchor-Bvn_vLQ8.js +0 -69
- package/components/like-anchor-sod1C1fR.cjs +0 -32
- package/components/luzmo-icons-D47EGj-3.cjs +0 -29
- package/components/luzmo-icons-NEyaMpEM.js +0 -229
- package/components/manage-help-text-DhgARkZX.cjs +0 -30
- package/components/manage-help-text-syYnjKGL.js +0 -92
- package/components/mutation-controller-DH7YOCyj.js +0 -52
- package/components/mutation-controller-DkOMCW-c.cjs +0 -22
- package/components/observe-slot-presence-CmVi0zTc.js +0 -68
- package/components/observe-slot-presence-bc9chhsi.cjs +0 -18
- package/components/observe-slot-text-BPfIQQtz.js +0 -87
- package/components/observe-slot-text-Ceb7SvYT.cjs +0 -18
- package/components/overlay-Cig9r6uU.js +0 -2747
- package/components/overlay-KSKMzzkh.cjs +0 -47
- package/components/pending-state-CaH1si5b.cjs +0 -26
- package/components/picker-CAYj4hBD.js +0 -461
- package/components/picker-apS0Zrly.cjs +0 -123
- package/components/platform-BM-uMWpX.js +0 -69
- package/components/platform-BiXhwqk3.cjs +0 -18
- package/components/popover-DjX0aAnY.js +0 -67
- package/components/popover-KFfO0IYL.cjs +0 -30
- package/components/progress-circle-BvRJNuNo.cjs +0 -33
- package/components/progress-circle-DXH9z8-6.js +0 -97
- package/components/query-BL-TJj7K.cjs +0 -22
- package/components/query-D_KR_GUc.js +0 -51
- package/components/query-assigned-elements-DjfhL1cl.js +0 -36
- package/components/query-assigned-elements-DsKsfk7G.cjs +0 -22
- package/components/query-assigned-nodes-BcKWmGzy.cjs +0 -22
- package/components/query-assigned-nodes-C76XVPWY.js +0 -36
- package/components/random-id-CqvckpWe.cjs +0 -18
- package/components/roving-tabindex-By_fCy_e.cjs +0 -18
- package/components/roving-tabindex-DOg4z6ZU.js +0 -66
- package/components/sized-mixin-CPxE5C96.cjs +0 -18
- package/components/sized-mixin-D4ACoVUr.js +0 -63
- package/components/slottable-request-event-BfUUt1Mh.cjs +0 -18
- package/components/state-D8JEtYqe.cjs +0 -22
- package/components/state-Deh-vKYE.js +0 -29
- package/components/strategies-9indNIEb.js +0 -195
- package/components/strategies-BACP6MhR.cjs +0 -18
- package/components/streaming-listener-B00MvALi.cjs +0 -18
- package/components/streaming-listener-CP-JE6Fa.js +0 -91
- package/components/style-map-CeilmSgs.cjs +0 -22
- package/components/style-map-IgqIKvlE.js +0 -53
- package/components/text-field-BYF2RHY8.cjs +0 -85
- package/components/text-field-PYafEYeO.js +0 -314
- package/components/text-field.module-C2KVUJcX.js +0 -21
- package/components/text-field.module-DXhFA9G-.cjs +0 -18
- package/components/when-CDZyJPvd.cjs +0 -22
|
@@ -15,125 +15,200 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
import
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
18
|
+
const initializeGlobalLuzmoCSSVariables = () => {
|
|
19
|
+
if (typeof document !== "undefined" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
20
|
+
const styleElement = document.createElement("style");
|
|
21
|
+
styleElement.setAttribute("data-luzmo-vars", "");
|
|
22
|
+
styleElement.textContent = `html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}`;
|
|
23
|
+
document.head.appendChild(styleElement);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
initializeGlobalLuzmoCSSVariables();
|
|
27
|
+
import "@lit-labs/virtualizer";
|
|
28
|
+
import { luzmoIcon, luzmoClose14, luzmoAngleDown, luzmoAlert, luzmoSearch } from "@luzmo/icons";
|
|
29
|
+
import { unsafeCSS, nothing, html, render } from "lit";
|
|
30
|
+
import { query, property, state } from "lit/decorators.js";
|
|
31
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
32
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
33
|
+
import { M as MatchMediaController, I as IS_MOBILE, s as strategies } from "../strategies-DlPQoTFE.js";
|
|
34
|
+
import { F as Focusable } from "../focusable-ChCLg1k4.js";
|
|
35
|
+
import { D as DependencyManagerController } from "../dependency-manger-XHpQjFgK.js";
|
|
36
|
+
import { P as PendingStateController } from "../pending-state-CXbe-Xul.js";
|
|
37
|
+
import { S as SizedMixin } from "../sized-mixin-DmkrNdWB.js";
|
|
30
38
|
import "../icon/index.js";
|
|
39
|
+
import { VIRTUALIZE_AS_OF_NUM_ITEMS } from "../options/index.js";
|
|
31
40
|
import "../overlay/index.js";
|
|
32
41
|
import "../popover/index.js";
|
|
33
42
|
import "../progress-circle/index.js";
|
|
34
43
|
import "../tooltip/index.js";
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
const getCssVariableValue = (element, variable) => {
|
|
45
|
+
let value = getComputedStyle(element).getPropertyValue(variable);
|
|
46
|
+
while (!value && element.parentElement) {
|
|
47
|
+
element = element.parentElement;
|
|
48
|
+
value = getComputedStyle(element).getPropertyValue(variable);
|
|
39
49
|
}
|
|
50
|
+
return value.trim();
|
|
40
51
|
};
|
|
41
|
-
D();
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}, ee = ':host{font-family:var(--luzmo-select-font-family, var(--select-font-family));font-size:var(--luzmo-select-font-size, var(--select-font-size))}#button{cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--luzmo-button-font-family, var(--luzmo-font-family));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:var(--luzmo-button-line-height, var(--luzmo-line-height, 1.3));text-transform:none;vertical-align:top;-webkit-appearance:button;transition:background var(--luzmo-button-animation-duration, var(--luzmo-animation-duration)) ease-out,border-color var(--luzmo-button-animation-duration, var(--luzmo-animation-duration)) ease-out,color var(--luzmo-button-animation-duration, var(--luzmo-animation-duration)) ease-out,box-shadow var(--luzmo-button-animation-duration, var(--luzmo-animation-duration)) ease-out;justify-content:center;align-items:center;margin:0;-webkit-text-decoration:none;text-decoration:none;display:inline-flex;position:relative;overflow:visible}#button::-moz-focus-inner{border-style:none;padding:0}#button:focus{outline:none}#icon{margin-inline-end:var(--luzmo-select-spacing-text-to-icon, var(--select-spacing-text-to-icon));font-size:var(--luzmo-select-font-size, var(--select-font-size))}@media (forced-colors: active){:host{--highcontrast-select-focus-indicator-color: Highlight;--highcontrast-select-border-color-default: ButtonBorder;--highcontrast-select-border-color-hover: Highlight;--highcontrast-select-border-color-disabled: GrayText;--highcontrast-select-content-color-default: ButtonText;--highcontrast-select-content-color-disabled: GrayText;--highcontrast-select-background-color: ButtonFace}#button:focus-visible{--highcontrast-select-border-color-hover: ButtonText}#button .label,#button:after{forced-color-adjust:none}}#button{box-sizing:border-box;max-inline-size:100%;min-inline-size:calc(var(--select-minimum-width-multiplier) * var(--luzmo-select-button-block-size, var(--select-button-block-size)));block-size:var(--luzmo-select-button-block-size, var(--select-button-block-size));border-width:var(--luzmo-select-button-border-width, var(--select-button-border-width));border-radius:var(--luzmo-select-button-border-radius, var(--select-button-border-radius));box-shadow:var(--luzmo-select-button-box-shadow, var(--select-button-box-shadow));transition:background-color var(--luzmo-select-animation-duration, var(--select-animation-duration)),box-shadow var(--luzmo-select-animation-duration, var(--select-animation-duration)),border-color var(--luzmo-select-animation-duration, var(--select-animation-duration)) ease-in-out;color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-default, var(--select-font-color-default)));background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-default, var(--select-background-color-default)));border-style:solid;border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-default, var(--select-border-color-default)));margin-block-start:var(--luzmo-select-spacing-label-to-select, var(--select-spacing-label-to-select));padding-block:0;padding-inline-start:var(--luzmo-select-spacing-edge-to-text, var(--select-spacing-edge-to-text));padding-inline-end:var(--luzmo-select-spacing-edge-to-disclosure-icon, var(--select-spacing-edge-to-disclosure-icon));display:flex}#button:after{pointer-events:none;content:"";block-size:calc(100% + var(--luzmo-select-focus-indicator-gap, var(--select-focus-indicator-gap)) * 2 + var(--luzmo-select-button-border-width, var(--select-button-border-width)) * 2);inline-size:calc(100% + var(--luzmo-select-focus-indicator-gap, var(--select-focus-indicator-gap)) * 2 + var(--luzmo-select-button-border-width, var(--select-button-border-width)) * 2);border-style:solid;border-width:var(--luzmo-select-focus-indicator-width, var(--select-focus-indicator-width));border-radius:calc(var(--luzmo-select-button-border-radius, var(--select-button-border-radius)) + var(--luzmo-select-focus-indicator-gap, var(--select-focus-indicator-gap)) + var(--luzmo-select-button-border-width, var(--select-button-border-width)));border-color:#0000;margin-block-start:calc((var(--luzmo-select-focus-indicator-gap, var(--select-focus-indicator-gap)) + var(--luzmo-select-focus-indicator-width, var(--select-focus-indicator-width)) + var(--luzmo-select-button-border-width, var(--select-button-border-width))) * -1);margin-inline-start:calc((var(--luzmo-select-focus-indicator-gap, var(--select-focus-indicator-gap)) + var(--luzmo-select-focus-indicator-width, var(--select-focus-indicator-width)) + var(--luzmo-select-button-border-width, var(--select-button-border-width))) * -1);position:absolute;inset-block:0;inset-inline:0}#button:active{background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-active, var(--select-background-color-active)));border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-active, var(--select-border-color-active)))}#button:active:after{border-color:#0000}#button.placeholder:active .label{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-active, var(--select-font-color-active)))}#button:focus-visible{background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-key-focus, var(--select-background-color-key-focus)));border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-key-focus, var(--select-border-color-key-focus)));color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-key-focus, var(--select-font-color-key-focus)));outline:none}#button:focus-visible:after{border-color:var(--highcontrast-select-focus-indicator-color, var(--luzmo-select-focus-indicator-color, var(--select-focus-indicator-color)))}#button.placeholder:focus-visible{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-key-focus, var(--select-font-color-key-focus)))}#button:focus-visible .disclosure-icon,#button:focus-visible .clear-icon{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-key-focus, var(--select-icon-color-key-focus)))}:host([open]) #button:not(:disabled,.is-disabled){color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-default-open, var(--select-font-color-default-open)));background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-default-open, var(--select-background-color-default-open)));border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-default-open, var(--select-border-color-default-open)))}:host([open]) #button:not(:disabled,.is-disabled) .disclosure-icon,:host([open]) #button:not(:disabled,.is-disabled) .clear-icon{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-default-open, var(--select-icon-color-default-open)))}:host([invalid]) #button:not(:disabled,.is-disabled){border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-error-default, var(--select-border-color-error-default)))}:host([invalid]) #button:not(:disabled,.is-disabled) .validation-icon{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-error, var(--select-icon-color-error)))}:host([invalid]) #button:not(:disabled,.is-disabled):active{border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-error-active, var(--select-border-color-error-active)))}:host([invalid][open]) #button:not(:disabled,.is-disabled){border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-error-default-open, var(--select-border-color-error-default-open)))}:host([invalid]) #button:not(:disabled,.is-disabled):focus-visible{border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-error-key-focus, var(--select-border-color-error-key-focus)))}:host([pending]) #button .disclosure-icon,:host([pending]) #button .clear-icon{color:var(--highcontrast-select-content-color-disabled, var(--luzmo-select-icon-color-disabled, var(--select-icon-color-disabled)))}.icon{flex-shrink:0}.label{white-space:nowrap;font-size:var(--luzmo-select-font-size, var(--select-font-size));line-height:var(--luzmo-select-button-line-height, var(--select-button-line-height));font-weight:var(--luzmo-select-font-weight, var(--select-font-weight));text-overflow:ellipsis;text-align:start;flex:auto;overflow:hidden}.label.placeholder{font-weight:var(--luzmo-select-placeholder-font-weight, var(--select-font-weight));font-style:var(--luzmo-select-placeholder-font-style, var(--select-placeholder-font-style));transition:color var(--luzmo-select-animation-duration, var(--select-animation-duration)) ease-in-out;color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-default, var(--select-font-color-default)))}.label.placeholder:active{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-active, var(--select-font-color-active)))}.clear-icon,.disclosure-icon{vertical-align:top;transition:color var(--luzmo-select-animation-duration, var(--select-animation-duration)) ease-out;color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-default, var(--select-icon-color-default)));flex-shrink:0;display:inline-block;position:relative}.disclosure-icon{margin-inline-start:var(--luzmo-select-spacing-icon-to-disclosure-icon, var(--select-spacing-icon-to-disclosure-icon))}.clear-icon{margin-inline-start:var(--luzmo-select-spacing-icon-to-clear-icon, var(--select-spacing-icon-to-clear-icon))}.disclosure-icon:active{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-active, var(--select-icon-color-active)))}luzmo-progress-circle,.validation-icon{margin-inline-start:var(--luzmo-select-spacing-text-to-icon, var(--select-spacing-text-to-icon))}.icon-container{display:flex;position:relative;height:100%;align-items:center;font-size:var(--luzmo-select-disclosure-icon-size, var(--select-disclosure-icon-size))}.icon-container.disclosure-icon{margin-inline-end:0}.label~.disclosure-icon,.label~.clear-icon{margin-inline-start:var(--luzmo-select-spacing-text-to-icon, var(--select-spacing-text-to-icon))}:host([quiet]) #button{inline-size:auto;min-inline-size:0;padding-inline:var(--luzmo-select-spacing-edge-to-text-quiet, var(--select-spacing-edge-to-text-quiet));color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-default, var(--select-font-color-default)));background-color:initial;background-color:var(--highcontrast-select-background-color, transparent);border:none;border-radius:0;box-shadow:none;margin-block-start:calc(var(--luzmo-select-spacing-label-to-select-quiet, var(--select-spacing-label-to-select-quiet)) + 1px)}:host([quiet]) #button.label-inline{margin-block-start:0}:host([quiet]) #button .disclosure-icon{margin-inline-end:var(--luzmo-select-spacing-edge-to-disclosure-icon-quiet, var(--select-spacing-edge-to-disclosure-icon-quiet))}:host([quiet]) #button:after{block-size:auto;inline-size:auto;border:none}@media (hover: hover){#button:hover{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-hover, var(--select-font-color-hover)));background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-hover, var(--select-background-color-hover)));border-color:var(--highcontrast-select-border-color-hover, var(--luzmo-select-border-color-hover, var(--select-border-color-hover)))}#button:hover .disclosure-icon,#button:hover .clear-icon{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-hover, var(--select-icon-color-hover)))}#button:hover .clear-icon:hover{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-clear-icon-color-hover, var(--select-icon-color-focus)))}:host([open]):not([quiet]) #button:not(:disabled,.is-disabled):hover{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-hover-open, var(--select-font-color-hover-open)));background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-hover-open, var(--select-background-color-hover-open)));border-color:var(--highcontrast-select-border-color-hover, var(--luzmo-select-border-color-hover-open, var(--select-border-color-hover-open)))}:host([open]) #button:not(:disabled,.is-disabled):hover .disclosure-icon,:host([open]) #button:not(:disabled,.is-disabled):hover .clear-icon{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-hover-open, var(--select-icon-color-hover-open)))}:host([invalid]) #button:not(:disabled,.is-disabled):hover{border-color:var(--highcontrast-select-border-color-hover, var(--luzmo-select-border-color-error-hover, var(--select-border-color-error-hover)))}:host([invalid][open]) #button:not(:disabled,.is-disabled):hover{border-color:var(--highcontrast-select-border-color-hover, var(--luzmo-select-border-color-error-hover-open, var(--select-border-color-error-hover-open)))}.label.placeholder:hover{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-hover, var(--select-font-color-hover)))}:host([quiet]) #button:hover{background-color:initial;background-color:var(--highcontrast-select-background-color, transparent)!important}}:host([quiet]) #button:focus-visible{background-color:initial;background-color:var(--highcontrast-select-background-color, transparent)}:host([quiet]) #button:focus-visible:after{box-shadow:0 var(--luzmo-select-focus-indicator-width, var(--select-focus-indicator-width)) 0 0 var(--highcontrast-select-focus-indicator-color, var(--luzmo-select-focus-indicator-color, var(--select-focus-indicator-color)));margin:calc((var(--luzmo-select-focus-indicator-gap, var(--select-focus-indicator-gap)) + var(--luzmo-select-button-border-width, var(--select-button-border-width))) * -1) 0;border:none;border-radius:0}:host([quiet][open]) #button,:host([quiet][disabled]) #button#button,:host([quiet]) #button#button:disabled,:host([quiet]) #button:active{background-color:initial;background-color:var(--highcontrast-select-background-color, transparent)}.label-inline{vertical-align:top;display:inline-flex}:host([disabled]) #button,#button:disabled{cursor:default;background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-disabled, var(--select-background-color-disabled)));border-color:#0000;border-color:var(--highcontrast-select-border-color-disabled, transparent);color:var(--highcontrast-select-content-color-disabled, var(--luzmo-select-font-color-disabled, var(--select-font-color-disabled)))}:host([disabled]) #button .icon,:host([disabled]) #button .disclosure-icon,:host([disabled]) #button .clear-icon,:host([disabled]) #button .validation-icon,#button:disabled .icon,#button:disabled .disclosure-icon,#button:disabled .clear-icon,#button:disabled .validation-icon{color:var(--highcontrast-select-content-color-disabled, var(--luzmo-select-icon-color-disabled, var(--select-icon-color-disabled)))}:host([disabled]) #button .label.placeholder,#button:disabled .label.placeholder{color:var(--highcontrast-select-content-color-disabled, var(--luzmo-select-font-color-disabled, var(--select-font-color-disabled)))}#popover{max-width:var(--luzmo-select-popover-max-width, var(--select-popover-max-width));min-width:var(--luzmo-select-popover-min-width, var(--select-popover-min-width));width:var(--luzmo-select-popover-width, var(--select-popover-width))}#search-container{flex:0 0 auto;display:flex;position:relative;border-bottom:var(--luzmo-select-search-container-border-bottom-width, var(--select-search-container-border-bottom-width)) solid var(--luzmo-select-search-container-border-bottom-color, var(--select-search-container-border-bottom-color))}#search-icon{position:absolute;left:var(--luzmo-select-spacing-edge-to-text, var(--select-spacing-edge-to-text));color:var(--luzmo-select-search-icon-color, var(--select-search-icon-color));top:0;bottom:0;pointer-events:none}#search:focus-within+#search-icon,#search:focus+#search-icon{color:var(--luzmo-select-search-icon-color-focus, var(--select-search-icon-color-focus))}#search{width:100%;box-sizing:border-box;color:var(--luzmo-select-search-color, var(--select-search-color));height:var(--luzmo-select-button-block-size, var(--select-button-block-size));padding-left:calc(var(--luzmo-select-spacing-edge-to-text, var(--select-spacing-edge-to-text)) + var(--luzmo-select-spacing-search-icon-to-text, var(--select-spacing-search-icon-to-text)) + var(--luzmo-select-font-size, var(--select-font-size)));padding-right:var(--luzmo-select-spacing-edge-to-text, var(--select-spacing-edge-to-text));font-size:var(--luzmo-select-font-size, var(--select-font-size));line-height:var(--luzmo-select-button-line-height, var(--select-button-line-height));font-weight:var(--luzmo-select-font-weight, var(--select-font-weight));border:var(--luzmo-select-search-input-border-bottom-width, var(--select-search-input-border-bottom-width)) solid var(--luzmo-select-search-input-border-bottom-color, var(--select-search-input-border-bottom-color));outline:none}#no-results{color:var(--luzmo-select-no-results-color, var(--select-no-results-color));font-style:var(--luzmo-select-no-results-font-style, var(--select-no-results-font-style));height:var(--luzmo-select-no-results-height, var(--select-no-results-height));padding-inline:var(--luzmo-select-no-results-spacing-edge-to-text, var(--select-no-results-spacing-edge-to-text));display:flex;align-items:center}:host{--select-popover-max-width: 300px;--select-popover-min-width: 160px;--select-font-family: var(--luzmo-font-family);--select-font-size: var(--luzmo-font-size);--select-spacing-search-icon-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-search-icon-color: var(--luzmo-disabled-color);--select-search-icon-color-focus: var(--luzmo-font-color);--select-search-color: var(--luzmo-font-color);--select-search-container-border-bottom-width: var(--luzmo-border-width);--select-search-container-border-bottom-color: var(--luzmo-border-color);--select-search-input-border-bottom-width: var(--luzmo-border-width);--select-search-input-border-bottom-color: transparent;--select-background-color-default: var(--luzmo-background-color);--select-background-color-default-open: var(--luzmo-background-color-hover);--select-background-color-active: var(--luzmo-background-color-down);--select-background-color-hover: var(--luzmo-background-color-hover);--select-background-color-hover-open: var(--luzmo-background-color-down);--select-background-color-key-focus: var(--luzmo-background-color-down);--select-border-color-default: var(--luzmo-border-color);--select-border-color-default-open: var(--luzmo-border-color-hover);--select-border-color-hover: var(--luzmo-border-color);--select-border-color-hover-open: var(--luzmo-border-color-hover);--select-border-color-active: var(--luzmo-border-color);--select-border-color-key-focus: var(--luzmo-border-color);--select-button-border-width: var(--luzmo-border-width);--select-font-weight: var(--luzmo-font-weight);--select-placeholder-font-style: var(--luzmo-font-style);--select-button-line-height: var(--luzmo-line-height);--select-button-box-shadow: 0px 1px 3px 0px rgba(var(--luzmo-border-color-rgb), .06);--select-button-block-size: var(--luzmo-component-height);--select-button-border-radius: var(--luzmo-border-radius);--select-button-border-radius-reset: 0;--select-spacing-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-spacing-text-to-icon: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-spacing-text-to-icon-inline-end: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-spacing-icon-to-disclosure-icon: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-spacing-icon-to-clear-icon: var( --select-spacing-icon-to-disclosure-icon );--select-spacing-edge-to-text-quiet: 0px;--select-spacing-label-to-select: 0px;--select-spacing-label-to-select-quiet: calc( -1 * var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-spacing-edge-to-disclosure-icon: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-spacing-edge-to-disclosure-icon-quiet: 0px;--select-animation-duration: var(--luzmo-animation-duration);--select-font-color-default: var(--luzmo-font-color);--select-font-color-default-open: var(--luzmo-font-color-hover);--select-font-color-hover: var(--luzmo-font-color-hover);--select-font-color-hover-open: var(--luzmo-font-color-down);--select-font-color-active: var(--luzmo-font-color-focus);--select-font-color-key-focus: var(--luzmo-font-color-focus);--select-icon-color-default: var(--luzmo-font-color);--select-icon-color-default-open: var(--luzmo-font-color-hover);--select-icon-color-hover: var(--luzmo-font-color-hover);--select-icon-color-hover-open: var(--luzmo-font-color-hover);--select-icon-color-active: var(--luzmo-font-color-focus);--select-icon-color-key-focus: var(--luzmo-font-color-focus);--select-border-color-error-default: var(--luzmo-negative-color);--select-border-color-error-default-open: var(--luzmo-negative-color-down);--select-border-color-error-hover: var(--luzmo-negative-color-hover);--select-border-color-error-hover-open: var(--luzmo-negative-color-down);--select-border-color-error-active: var(--luzmo-negative-color-down);--select-border-color-error-key-focus: var(--luzmo-negative-color-focus);--select-icon-color-error: var(--luzmo-negative-color);--select-background-color-disabled: var(--luzmo-background-color-disabled);--select-font-color-disabled: var(--luzmo-disabled-color);--select-icon-color-disabled: var(--luzmo-disabled-color);--select-focus-indicator-gap: var(--luzmo-indicator-gap);--select-focus-indicator-width: var(--luzmo-indicator-width);--select-focus-indicator-color: var(--luzmo-indicator-color);--select-disclosure-icon-size: var(--luzmo-font-size-s);--select-no-results-height: var(--select-button-block-size);--select-no-results-color: var(--select-font-color-disabled);--select-no-results-font-style: italic;--select-no-results-spacing-edge-to-text: var(--select-spacing-edge-to-text)}:host([size=s]){--select-button-block-size: var(--luzmo-component-height-s);--select-font-size: var(--luzmo-font-size-s);--select-popover-max-width: 280px;--select-popover-min-width: 140px;--select-spacing-search-icon-to-text: var(--luzmo-spacing-3);--select-spacing-edge-to-text: var(--luzmo-spacing-3);--select-spacing-text-to-icon: var(--luzmo-spacing-3);--select-spacing-text-to-icon-inline-end: var(--luzmo-spacing-3);--select-spacing-icon-to-disclosure-icon: var(--luzmo-spacing-3);--select-spacing-label-to-select-quiet: calc(-1 * var(--luzmo-spacing-3));--select-spacing-edge-to-disclosure-icon: var(--luzmo-spacing-3);--select-disclosure-icon-size: var(--luzmo-font-size-s)}:host([size=l]){--select-button-block-size: var(--luzmo-component-height-l);--select-font-size: var(--luzmo-font-size-l);--select-popover-max-width: 360px;--select-popover-min-width: 220px;--select-spacing-search-icon-to-text: var(--luzmo-spacing-4);--select-spacing-edge-to-text: var(--luzmo-spacing-4);--select-spacing-text-to-icon: var(--luzmo-spacing-4);--select-spacing-text-to-icon-inline-end: var(--luzmo-spacing-4);--select-spacing-icon-to-disclosure-icon: var(--luzmo-spacing-4);--select-spacing-label-to-select-quiet: calc(-1 * var(--luzmo-spacing-4));--select-spacing-edge-to-disclosure-icon: var(--luzmo-spacing-4);--select-disclosure-icon-size: var(--luzmo-font-size)}:host([size=xl]){--select-button-block-size: var(--luzmo-component-height-xl);--select-font-size: var(--luzmo-font-size-xl);--select-popover-max-width: 400px;--select-popover-min-width: 260px;--select-spacing-search-icon-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-spacing-edge-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-spacing-text-to-icon: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-spacing-text-to-icon-inline-end: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-spacing-icon-to-disclosure-icon: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-spacing-label-to-select-quiet: calc( -1 * var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-spacing-edge-to-disclosure-icon: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-disclosure-icon-size: var(--luzmo-font-size-l)}:host([variant=highlight]) ::slotted(luzmo-option[selected]){--option-highlight-label-content-color: var(--luzmo-primary-inverse-color);--option-label-icon-color-default: var(--luzmo-primary-inverse-color);--menu-checkmark-display: var(--menu-checkmark-display-hidden);padding-inline-start:var(--luzmo-option-label-inline-edge-to-content, var(--option-label-inline-edge-to-content));background-color:var(--luzmo-option-highlight-label-background-color, var(--option-highlight-label-background-color, var(--luzmo-border-color)))}:host{display:inline-flex;vertical-align:top;max-inline-size:100%;inline-size:var(--luzmo-select-inline-size, var(--select-inline-size));min-inline-size:calc(var(--select-minimum-width-multiplier) * var(--luzmo-select-block-size, var(--select-block-size)))}:host([quiet]){width:auto;min-width:0}:host([disabled]){pointer-events:none}#button{width:100%;min-width:100%;max-width:100%}#icon:not([hidden]){display:inline-flex}:host([readonly]) #button{-webkit-user-select:inherit;user-select:inherit}.validation-icon{flex-shrink:0}luzmo-overlay{pointer-events:none}luzmo-options{pointer-events:initial}:host>#no-results,:host>luzmo-options{display:none}:host([focused]:not([quiet])) #button #label.placeholder{color:var(--select-placeholder-text-color-key-focus, var(--alias-placeholder-text-color-hover))}.visually-hidden{border:0;clip:rect(0,0,0,0);clip-path:inset(50%);height:1px;margin:0 -1px -1px 0;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}luzmo-overlay:not(:defined){display:none}#button.remove-focus-ring-safari-hack:focus-visible{background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-default, var(--select-background-color-default)));border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-default, var(--select-border-color-default)));color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-default, var(--select-font-color-default)))}#button.remove-focus-ring-safari-hack:after{border:none}#button.remove-focus-ring-safari-hack:focus-visible:after{box-shadow:none}#button.remove-focus-ring-safari-hack:active{background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-default, var(--select-background-color-default)));border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-default, var(--select-border-color-default)));color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-default, var(--select-font-color-default)))}';
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
(i = d[t]) && (s = i(e, o, s) || s);
|
|
51
|
-
return s && oe(e, o, s), s;
|
|
52
|
+
const selectStyles = ':host{font-family:var(--luzmo-select-font-family, var(--select-font-family));font-size:var(--luzmo-select-font-size, var(--select-font-size))}#button{cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--luzmo-button-font-family, var(--luzmo-font-family));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:var(--luzmo-button-line-height, var(--luzmo-line-height, 1.3));text-transform:none;vertical-align:top;-webkit-appearance:button;transition:background var(--luzmo-button-animation-duration, var(--luzmo-animation-duration)) ease-out,border-color var(--luzmo-button-animation-duration, var(--luzmo-animation-duration)) ease-out,color var(--luzmo-button-animation-duration, var(--luzmo-animation-duration)) ease-out,box-shadow var(--luzmo-button-animation-duration, var(--luzmo-animation-duration)) ease-out;justify-content:center;align-items:center;margin:0;-webkit-text-decoration:none;text-decoration:none;display:inline-flex;position:relative;overflow:visible}#button::-moz-focus-inner{border-style:none;padding:0}#button:focus{outline:none}#icon{margin-inline-end:var(--luzmo-select-spacing-text-to-icon, var(--select-spacing-text-to-icon));font-size:var(--luzmo-select-font-size, var(--select-font-size))}@media (forced-colors: active){:host{--highcontrast-select-focus-indicator-color: Highlight;--highcontrast-select-border-color-default: ButtonBorder;--highcontrast-select-border-color-hover: Highlight;--highcontrast-select-border-color-disabled: GrayText;--highcontrast-select-content-color-default: ButtonText;--highcontrast-select-content-color-disabled: GrayText;--highcontrast-select-background-color: ButtonFace}#button:focus-visible{--highcontrast-select-border-color-hover: ButtonText}#button .label,#button:after{forced-color-adjust:none}}#button{box-sizing:border-box;max-inline-size:100%;min-inline-size:calc(var(--select-minimum-width-multiplier) * var(--luzmo-select-button-block-size, var(--select-button-block-size)));block-size:var(--luzmo-select-button-block-size, var(--select-button-block-size));border-width:var(--luzmo-select-button-border-width, var(--select-button-border-width));border-radius:var(--luzmo-select-button-border-radius, var(--select-button-border-radius));box-shadow:var(--luzmo-select-button-box-shadow, var(--select-button-box-shadow));transition:background-color var(--luzmo-select-animation-duration, var(--select-animation-duration)),box-shadow var(--luzmo-select-animation-duration, var(--select-animation-duration)),border-color var(--luzmo-select-animation-duration, var(--select-animation-duration)) ease-in-out;color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-default, var(--select-font-color-default)));background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-default, var(--select-background-color-default)));border-style:solid;border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-default, var(--select-border-color-default)));margin-block-start:var(--luzmo-select-spacing-label-to-select, var(--select-spacing-label-to-select));padding-block:0;padding-inline-start:var(--luzmo-select-spacing-edge-to-text, var(--select-spacing-edge-to-text));padding-inline-end:var(--luzmo-select-spacing-edge-to-disclosure-icon, var(--select-spacing-edge-to-disclosure-icon));display:flex}#button:after{pointer-events:none;content:"";block-size:calc(100% + var(--luzmo-select-focus-indicator-gap, var(--select-focus-indicator-gap)) * 2 + var(--luzmo-select-button-border-width, var(--select-button-border-width)) * 2);inline-size:calc(100% + var(--luzmo-select-focus-indicator-gap, var(--select-focus-indicator-gap)) * 2 + var(--luzmo-select-button-border-width, var(--select-button-border-width)) * 2);border-style:solid;border-width:var(--luzmo-select-focus-indicator-width, var(--select-focus-indicator-width));border-radius:calc(var(--luzmo-select-button-border-radius, var(--select-button-border-radius)) + var(--luzmo-select-focus-indicator-gap, var(--select-focus-indicator-gap)) + var(--luzmo-select-button-border-width, var(--select-button-border-width)));border-color:#0000;margin-block-start:calc((var(--luzmo-select-focus-indicator-gap, var(--select-focus-indicator-gap)) + var(--luzmo-select-focus-indicator-width, var(--select-focus-indicator-width)) + var(--luzmo-select-button-border-width, var(--select-button-border-width))) * -1);margin-inline-start:calc((var(--luzmo-select-focus-indicator-gap, var(--select-focus-indicator-gap)) + var(--luzmo-select-focus-indicator-width, var(--select-focus-indicator-width)) + var(--luzmo-select-button-border-width, var(--select-button-border-width))) * -1);position:absolute;inset-block:0;inset-inline:0}#button:active{background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-active, var(--select-background-color-active)));border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-active, var(--select-border-color-active)))}#button:active:after{border-color:#0000}#button.placeholder:active .label{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-active, var(--select-font-color-active)))}#button:focus-visible{background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-key-focus, var(--select-background-color-key-focus)));border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-key-focus, var(--select-border-color-key-focus)));color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-key-focus, var(--select-font-color-key-focus)));outline:none}#button:focus-visible:after{border-color:var(--highcontrast-select-focus-indicator-color, var(--luzmo-select-focus-indicator-color, var(--select-focus-indicator-color)))}#button.placeholder:focus-visible{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-key-focus, var(--select-font-color-key-focus)))}#button:focus-visible .disclosure-icon,#button:focus-visible .clear-icon{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-key-focus, var(--select-icon-color-key-focus)))}:host([open]) #button:not(:disabled,.is-disabled){color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-default-open, var(--select-font-color-default-open)));background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-default-open, var(--select-background-color-default-open)));border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-default-open, var(--select-border-color-default-open)))}:host([open]) #button:not(:disabled,.is-disabled) .disclosure-icon,:host([open]) #button:not(:disabled,.is-disabled) .clear-icon{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-default-open, var(--select-icon-color-default-open)))}:host([invalid]) #button:not(:disabled,.is-disabled){border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-error-default, var(--select-border-color-error-default)))}:host([invalid]) #button:not(:disabled,.is-disabled) .validation-icon{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-error, var(--select-icon-color-error)))}:host([invalid]) #button:not(:disabled,.is-disabled):active{border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-error-active, var(--select-border-color-error-active)))}:host([invalid][open]) #button:not(:disabled,.is-disabled){border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-error-default-open, var(--select-border-color-error-default-open)))}:host([invalid]) #button:not(:disabled,.is-disabled):focus-visible{border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-error-key-focus, var(--select-border-color-error-key-focus)))}:host([pending]) #button .disclosure-icon,:host([pending]) #button .clear-icon{color:var(--highcontrast-select-content-color-disabled, var(--luzmo-select-icon-color-disabled, var(--select-icon-color-disabled)))}.icon{flex-shrink:0}.label{white-space:nowrap;font-size:var(--luzmo-select-font-size, var(--select-font-size));line-height:var(--luzmo-select-button-line-height, var(--select-button-line-height));font-weight:var(--luzmo-select-font-weight, var(--select-font-weight));text-overflow:ellipsis;text-align:start;flex:auto;overflow:hidden}.label.placeholder{font-weight:var(--luzmo-select-placeholder-font-weight, var(--select-font-weight));font-style:var(--luzmo-select-placeholder-font-style, var(--select-placeholder-font-style));transition:color var(--luzmo-select-animation-duration, var(--select-animation-duration)) ease-in-out;color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-default, var(--select-font-color-default)))}.label.placeholder:active{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-active, var(--select-font-color-active)))}.clear-icon,.disclosure-icon{vertical-align:top;transition:color var(--luzmo-select-animation-duration, var(--select-animation-duration)) ease-out;color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-default, var(--select-icon-color-default)));flex-shrink:0;display:inline-block;position:relative}.disclosure-icon{margin-inline-start:var(--luzmo-select-spacing-icon-to-disclosure-icon, var(--select-spacing-icon-to-disclosure-icon))}.clear-icon{margin-inline-start:var(--luzmo-select-spacing-icon-to-clear-icon, var(--select-spacing-icon-to-clear-icon))}.disclosure-icon:active{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-active, var(--select-icon-color-active)))}luzmo-progress-circle,.validation-icon{margin-inline-start:var(--luzmo-select-spacing-text-to-icon, var(--select-spacing-text-to-icon))}.icon-container{display:flex;position:relative;height:100%;align-items:center;font-size:var(--luzmo-select-disclosure-icon-size, var(--select-disclosure-icon-size))}.icon-container.disclosure-icon{margin-inline-end:0}.label~.disclosure-icon,.label~.clear-icon{margin-inline-start:var(--luzmo-select-spacing-text-to-icon, var(--select-spacing-text-to-icon))}:host([quiet]) #button{inline-size:auto;min-inline-size:0;padding-inline:var(--luzmo-select-spacing-edge-to-text-quiet, var(--select-spacing-edge-to-text-quiet));color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-default, var(--select-font-color-default)));background-color:initial;background-color:var(--highcontrast-select-background-color, transparent);border:none;border-radius:0;box-shadow:none;margin-block-start:calc(var(--luzmo-select-spacing-label-to-select-quiet, var(--select-spacing-label-to-select-quiet)) + 1px)}:host([quiet]) #button.label-inline{margin-block-start:0}:host([quiet]) #button .disclosure-icon{margin-inline-end:var(--luzmo-select-spacing-edge-to-disclosure-icon-quiet, var(--select-spacing-edge-to-disclosure-icon-quiet))}:host([quiet]) #button:after{block-size:auto;inline-size:auto;border:none}@media (hover: hover){#button:hover{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-hover, var(--select-font-color-hover)));background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-hover, var(--select-background-color-hover)));border-color:var(--highcontrast-select-border-color-hover, var(--luzmo-select-border-color-hover, var(--select-border-color-hover)))}#button:hover .disclosure-icon,#button:hover .clear-icon{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-hover, var(--select-icon-color-hover)))}#button:hover .clear-icon:hover{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-clear-icon-color-hover, var(--select-icon-color-focus)))}:host([open]):not([quiet]) #button:not(:disabled,.is-disabled):hover{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-hover-open, var(--select-font-color-hover-open)));background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-hover-open, var(--select-background-color-hover-open)));border-color:var(--highcontrast-select-border-color-hover, var(--luzmo-select-border-color-hover-open, var(--select-border-color-hover-open)))}:host([open]) #button:not(:disabled,.is-disabled):hover .disclosure-icon,:host([open]) #button:not(:disabled,.is-disabled):hover .clear-icon{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-icon-color-hover-open, var(--select-icon-color-hover-open)))}:host([invalid]) #button:not(:disabled,.is-disabled):hover{border-color:var(--highcontrast-select-border-color-hover, var(--luzmo-select-border-color-error-hover, var(--select-border-color-error-hover)))}:host([invalid][open]) #button:not(:disabled,.is-disabled):hover{border-color:var(--highcontrast-select-border-color-hover, var(--luzmo-select-border-color-error-hover-open, var(--select-border-color-error-hover-open)))}.label.placeholder:hover{color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-hover, var(--select-font-color-hover)))}:host([quiet]) #button:hover{background-color:initial;background-color:var(--highcontrast-select-background-color, transparent)!important}}:host([quiet]) #button:focus-visible{background-color:initial;background-color:var(--highcontrast-select-background-color, transparent)}:host([quiet]) #button:focus-visible:after{box-shadow:0 var(--luzmo-select-focus-indicator-width, var(--select-focus-indicator-width)) 0 0 var(--highcontrast-select-focus-indicator-color, var(--luzmo-select-focus-indicator-color, var(--select-focus-indicator-color)));margin:calc((var(--luzmo-select-focus-indicator-gap, var(--select-focus-indicator-gap)) + var(--luzmo-select-button-border-width, var(--select-button-border-width))) * -1) 0;border:none;border-radius:0}:host([quiet][open]) #button,:host([quiet][disabled]) #button#button,:host([quiet]) #button#button:disabled,:host([quiet]) #button:active{background-color:initial;background-color:var(--highcontrast-select-background-color, transparent)}.label-inline{vertical-align:top;display:inline-flex}:host([disabled]) #button,#button:disabled{cursor:default;background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-disabled, var(--select-background-color-disabled)));border-color:#0000;border-color:var(--highcontrast-select-border-color-disabled, transparent);color:var(--highcontrast-select-content-color-disabled, var(--luzmo-select-font-color-disabled, var(--select-font-color-disabled)))}:host([disabled]) #button .icon,:host([disabled]) #button .disclosure-icon,:host([disabled]) #button .clear-icon,:host([disabled]) #button .validation-icon,#button:disabled .icon,#button:disabled .disclosure-icon,#button:disabled .clear-icon,#button:disabled .validation-icon{color:var(--highcontrast-select-content-color-disabled, var(--luzmo-select-icon-color-disabled, var(--select-icon-color-disabled)))}:host([disabled]) #button .label.placeholder,#button:disabled .label.placeholder{color:var(--highcontrast-select-content-color-disabled, var(--luzmo-select-font-color-disabled, var(--select-font-color-disabled)))}#popover{max-width:var(--luzmo-select-popover-max-width, var(--select-popover-max-width));min-width:var(--luzmo-select-popover-min-width, var(--select-popover-min-width));width:var(--luzmo-select-popover-width, var(--select-popover-width))}#search-container{flex:0 0 auto;display:flex;position:relative;border-bottom:var(--luzmo-select-search-container-border-bottom-width, var(--select-search-container-border-bottom-width)) solid var(--luzmo-select-search-container-border-bottom-color, var(--select-search-container-border-bottom-color))}#search-icon{position:absolute;left:var(--luzmo-select-spacing-edge-to-text, var(--select-spacing-edge-to-text));color:var(--luzmo-select-search-icon-color, var(--select-search-icon-color));top:0;bottom:0;pointer-events:none}#search:focus-within+#search-icon,#search:focus+#search-icon{color:var(--luzmo-select-search-icon-color-focus, var(--select-search-icon-color-focus))}#search{width:100%;box-sizing:border-box;color:var(--luzmo-select-search-color, var(--select-search-color));height:var(--luzmo-select-button-block-size, var(--select-button-block-size));padding-left:calc(var(--luzmo-select-spacing-edge-to-text, var(--select-spacing-edge-to-text)) + var(--luzmo-select-spacing-search-icon-to-text, var(--select-spacing-search-icon-to-text)) + var(--luzmo-select-font-size, var(--select-font-size)));padding-right:var(--luzmo-select-spacing-edge-to-text, var(--select-spacing-edge-to-text));font-size:var(--luzmo-select-font-size, var(--select-font-size));line-height:var(--luzmo-select-button-line-height, var(--select-button-line-height));font-weight:var(--luzmo-select-font-weight, var(--select-font-weight));border:var(--luzmo-select-search-input-border-bottom-width, var(--select-search-input-border-bottom-width)) solid var(--luzmo-select-search-input-border-bottom-color, var(--select-search-input-border-bottom-color));outline:none}#no-results{color:var(--luzmo-select-no-results-color, var(--select-no-results-color));font-style:var(--luzmo-select-no-results-font-style, var(--select-no-results-font-style));height:var(--luzmo-select-no-results-height, var(--select-no-results-height));padding-inline:var(--luzmo-select-no-results-spacing-edge-to-text, var(--select-no-results-spacing-edge-to-text));display:flex;align-items:center}:host{--select-popover-max-width: 300px;--select-popover-min-width: 160px;--select-font-family: var(--luzmo-font-family);--select-font-size: var(--luzmo-font-size);--select-spacing-search-icon-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-search-icon-color: var(--luzmo-disabled-color);--select-search-icon-color-focus: var(--luzmo-font-color);--select-search-color: var(--luzmo-font-color);--select-search-container-border-bottom-width: var(--luzmo-border-width);--select-search-container-border-bottom-color: var(--luzmo-border-color);--select-search-input-border-bottom-width: var(--luzmo-border-width);--select-search-input-border-bottom-color: transparent;--select-background-color-default: var(--luzmo-background-color);--select-background-color-default-open: var(--luzmo-background-color-hover);--select-background-color-active: var(--luzmo-background-color-down);--select-background-color-hover: var(--luzmo-background-color-hover);--select-background-color-hover-open: var(--luzmo-background-color-down);--select-background-color-key-focus: var(--luzmo-background-color-down);--select-border-color-default: var(--luzmo-border-color);--select-border-color-default-open: var(--luzmo-border-color-hover);--select-border-color-hover: var(--luzmo-border-color);--select-border-color-hover-open: var(--luzmo-border-color-hover);--select-border-color-active: var(--luzmo-border-color);--select-border-color-key-focus: var(--luzmo-border-color);--select-button-border-width: var(--luzmo-border-width);--select-font-weight: var(--luzmo-font-weight);--select-placeholder-font-style: var(--luzmo-font-style);--select-button-line-height: var(--luzmo-line-height);--select-button-box-shadow: 0px 1px 3px 0px rgba(var(--luzmo-border-color-rgb), .06);--select-button-block-size: var(--luzmo-component-height);--select-button-border-radius: var(--luzmo-border-radius);--select-button-border-radius-reset: 0;--select-spacing-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-spacing-text-to-icon: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-spacing-text-to-icon-inline-end: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-spacing-icon-to-disclosure-icon: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-spacing-icon-to-clear-icon: var( --select-spacing-icon-to-disclosure-icon );--select-spacing-edge-to-text-quiet: 0px;--select-spacing-label-to-select: 0px;--select-spacing-label-to-select-quiet: calc( -1 * var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-spacing-edge-to-disclosure-icon: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--select-spacing-edge-to-disclosure-icon-quiet: 0px;--select-animation-duration: var(--luzmo-animation-duration);--select-font-color-default: var(--luzmo-font-color);--select-font-color-default-open: var(--luzmo-font-color-hover);--select-font-color-hover: var(--luzmo-font-color-hover);--select-font-color-hover-open: var(--luzmo-font-color-down);--select-font-color-active: var(--luzmo-font-color-focus);--select-font-color-key-focus: var(--luzmo-font-color-focus);--select-icon-color-default: var(--luzmo-font-color);--select-icon-color-default-open: var(--luzmo-font-color-hover);--select-icon-color-hover: var(--luzmo-font-color-hover);--select-icon-color-hover-open: var(--luzmo-font-color-hover);--select-icon-color-active: var(--luzmo-font-color-focus);--select-icon-color-key-focus: var(--luzmo-font-color-focus);--select-border-color-error-default: var(--luzmo-negative-color);--select-border-color-error-default-open: var(--luzmo-negative-color-down);--select-border-color-error-hover: var(--luzmo-negative-color-hover);--select-border-color-error-hover-open: var(--luzmo-negative-color-down);--select-border-color-error-active: var(--luzmo-negative-color-down);--select-border-color-error-key-focus: var(--luzmo-negative-color-focus);--select-icon-color-error: var(--luzmo-negative-color);--select-background-color-disabled: var(--luzmo-background-color-disabled);--select-font-color-disabled: var(--luzmo-disabled-color);--select-icon-color-disabled: var(--luzmo-disabled-color);--select-focus-indicator-gap: var(--luzmo-indicator-gap);--select-focus-indicator-width: var(--luzmo-indicator-width);--select-focus-indicator-color: var(--luzmo-indicator-color);--select-disclosure-icon-size: var(--luzmo-font-size-s);--select-no-results-height: var(--select-button-block-size);--select-no-results-color: var(--select-font-color-disabled);--select-no-results-font-style: italic;--select-no-results-spacing-edge-to-text: var(--select-spacing-edge-to-text)}:host([size=s]){--select-button-block-size: var(--luzmo-component-height-s);--select-font-size: var(--luzmo-font-size-s);--select-popover-max-width: 280px;--select-popover-min-width: 140px;--select-spacing-search-icon-to-text: var(--luzmo-spacing-3);--select-spacing-edge-to-text: var(--luzmo-spacing-3);--select-spacing-text-to-icon: var(--luzmo-spacing-3);--select-spacing-text-to-icon-inline-end: var(--luzmo-spacing-3);--select-spacing-icon-to-disclosure-icon: var(--luzmo-spacing-3);--select-spacing-label-to-select-quiet: calc(-1 * var(--luzmo-spacing-3));--select-spacing-edge-to-disclosure-icon: var(--luzmo-spacing-3);--select-disclosure-icon-size: var(--luzmo-font-size-s)}:host([size=l]){--select-button-block-size: var(--luzmo-component-height-l);--select-font-size: var(--luzmo-font-size-l);--select-popover-max-width: 360px;--select-popover-min-width: 220px;--select-spacing-search-icon-to-text: var(--luzmo-spacing-4);--select-spacing-edge-to-text: var(--luzmo-spacing-4);--select-spacing-text-to-icon: var(--luzmo-spacing-4);--select-spacing-text-to-icon-inline-end: var(--luzmo-spacing-4);--select-spacing-icon-to-disclosure-icon: var(--luzmo-spacing-4);--select-spacing-label-to-select-quiet: calc(-1 * var(--luzmo-spacing-4));--select-spacing-edge-to-disclosure-icon: var(--luzmo-spacing-4);--select-disclosure-icon-size: var(--luzmo-font-size)}:host([size=xl]){--select-button-block-size: var(--luzmo-component-height-xl);--select-font-size: var(--luzmo-font-size-xl);--select-popover-max-width: 400px;--select-popover-min-width: 260px;--select-spacing-search-icon-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-spacing-edge-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-spacing-text-to-icon: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-spacing-text-to-icon-inline-end: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-spacing-icon-to-disclosure-icon: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-spacing-label-to-select-quiet: calc( -1 * var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-spacing-edge-to-disclosure-icon: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--select-disclosure-icon-size: var(--luzmo-font-size-l)}:host([variant=highlight]) ::slotted(luzmo-option[selected]){--option-highlight-label-content-color: var(--luzmo-primary-inverse-color);--option-label-icon-color-default: var(--luzmo-primary-inverse-color);--menu-checkmark-display: var(--menu-checkmark-display-hidden);padding-inline-start:var(--luzmo-option-label-inline-edge-to-content, var(--option-label-inline-edge-to-content));background-color:var(--luzmo-option-highlight-label-background-color, var(--option-highlight-label-background-color, var(--luzmo-border-color)))}:host{display:inline-flex;vertical-align:top;max-inline-size:100%;inline-size:var(--luzmo-select-inline-size, var(--select-inline-size));min-inline-size:calc(var(--select-minimum-width-multiplier) * var(--luzmo-select-block-size, var(--select-block-size)))}:host([quiet]){width:auto;min-width:0}:host([disabled]){pointer-events:none}#button{width:100%;min-width:100%;max-width:100%}#icon:not([hidden]){display:inline-flex}:host([readonly]) #button{-webkit-user-select:inherit;user-select:inherit}.validation-icon{flex-shrink:0}luzmo-overlay{pointer-events:none}luzmo-options{pointer-events:initial}:host>#no-results,:host>luzmo-options{display:none}:host([focused]:not([quiet])) #button #label.placeholder{color:var(--select-placeholder-text-color-key-focus, var(--alias-placeholder-text-color-hover))}.visually-hidden{border:0;clip:rect(0,0,0,0);clip-path:inset(50%);height:1px;margin:0 -1px -1px 0;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}luzmo-overlay:not(:defined){display:none}#button.remove-focus-ring-safari-hack:focus-visible{background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-default, var(--select-background-color-default)));border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-default, var(--select-border-color-default)));color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-default, var(--select-font-color-default)))}#button.remove-focus-ring-safari-hack:after{border:none}#button.remove-focus-ring-safari-hack:focus-visible:after{box-shadow:none}#button.remove-focus-ring-safari-hack:active{background-color:var(--highcontrast-select-background-color, var(--luzmo-select-background-color-default, var(--select-background-color-default)));border-color:var(--highcontrast-select-border-color-default, var(--luzmo-select-border-color-default, var(--select-border-color-default)));color:var(--highcontrast-select-content-color-default, var(--luzmo-select-font-color-default, var(--select-font-color-default)))}';
|
|
53
|
+
var __defProp = Object.defineProperty;
|
|
54
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
55
|
+
var result = void 0;
|
|
56
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
57
|
+
if (decorator = decorators[i])
|
|
58
|
+
result = decorator(target, key, result) || result;
|
|
59
|
+
if (result) __defProp(target, key, result);
|
|
60
|
+
return result;
|
|
52
61
|
};
|
|
53
|
-
const
|
|
62
|
+
const angleIcon = () => html`
|
|
54
63
|
<div class="disclosure-icon icon">
|
|
55
|
-
${
|
|
64
|
+
${luzmoIcon(luzmoAngleDown, { className: "indicator" })}
|
|
56
65
|
</div>
|
|
57
|
-
|
|
66
|
+
`;
|
|
67
|
+
const alertIcon = () => html`
|
|
58
68
|
<div class="icon-container validation-icon icon">
|
|
59
|
-
${
|
|
69
|
+
${luzmoIcon(luzmoAlert)}
|
|
60
70
|
</div>
|
|
61
|
-
|
|
71
|
+
`;
|
|
72
|
+
const searchIcon = () => html`
|
|
62
73
|
<div class="icon-container search-icon icon" id="search-icon">
|
|
63
|
-
${
|
|
74
|
+
${luzmoIcon(luzmoSearch)}
|
|
64
75
|
</div>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
76
|
+
`;
|
|
77
|
+
const DESCRIPTION_ID = "select-option-menu";
|
|
78
|
+
const SEARCH_AS_OF_NUM_ITEMS = 20;
|
|
79
|
+
class LuzmoSelect extends SizedMixin(Focusable, {
|
|
80
|
+
noDefaultSize: true
|
|
68
81
|
}) {
|
|
69
82
|
constructor() {
|
|
70
|
-
super()
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
super();
|
|
84
|
+
this.disabled = false;
|
|
85
|
+
this.focused = false;
|
|
86
|
+
this.variant = "checkmarks";
|
|
87
|
+
this.emphasized = false;
|
|
88
|
+
this.invalid = false;
|
|
89
|
+
this.search = "auto";
|
|
90
|
+
this.noWrap = false;
|
|
91
|
+
this.retrieving = false;
|
|
92
|
+
this.pending = false;
|
|
93
|
+
this.clearable = false;
|
|
94
|
+
this.pendingLabel = "Pending";
|
|
95
|
+
this.searchLabel = "Search";
|
|
96
|
+
this.noResultsLabel = "No results";
|
|
97
|
+
this.noDataLabel = "No data";
|
|
98
|
+
this.multipleLabelTemplate = "Selected {count} items";
|
|
99
|
+
this.open = false;
|
|
100
|
+
this.readonly = false;
|
|
101
|
+
this.placement = "bottom-end";
|
|
102
|
+
this.quiet = false;
|
|
103
|
+
this.value = [];
|
|
104
|
+
this.options = [];
|
|
105
|
+
this.selects = "multiple";
|
|
106
|
+
this.dependencyManager = new DependencyManagerController(this);
|
|
107
|
+
this.isMobile = new MatchMediaController(this, IS_MOBILE);
|
|
108
|
+
this.listRole = "listbox";
|
|
109
|
+
this.itemRole = "option";
|
|
110
|
+
this.hasRenderedOverlay = false;
|
|
111
|
+
this._selfManageFocusElement = false;
|
|
112
|
+
this.selectionPromise = Promise.resolve();
|
|
113
|
+
this.enterKeydownOn = null;
|
|
114
|
+
this._selectedOptions = [];
|
|
115
|
+
this.handleSlottableRequest = (_event) => {
|
|
116
|
+
};
|
|
117
|
+
this.renderAngleIcon = () => angleIcon();
|
|
118
|
+
this.renderAlertIcon = () => alertIcon();
|
|
119
|
+
this.handleEnterKeydown = (event) => {
|
|
120
|
+
if (event.code !== "Enter") {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (this.enterKeydownOn) {
|
|
124
|
+
event.preventDefault();
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
this.enterKeydownOn = event.target;
|
|
128
|
+
this.addEventListener(
|
|
129
|
+
"keyup",
|
|
130
|
+
(keyupEvent) => {
|
|
131
|
+
if (keyupEvent.code !== "Enter") {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
this.enterKeydownOn = null;
|
|
135
|
+
},
|
|
136
|
+
{ once: true }
|
|
137
|
+
);
|
|
138
|
+
};
|
|
139
|
+
this.clearValue = (event) => {
|
|
140
|
+
event.preventDefault();
|
|
141
|
+
event.stopPropagation();
|
|
142
|
+
this.value = [];
|
|
143
|
+
if (this.strategy) {
|
|
144
|
+
this.strategy.preventNextToggle = "no";
|
|
84
145
|
}
|
|
85
|
-
|
|
86
|
-
|
|
146
|
+
this.open = false;
|
|
147
|
+
if (this.strategy) {
|
|
148
|
+
this.strategy.open = false;
|
|
149
|
+
}
|
|
150
|
+
this.dispatchEvent(
|
|
87
151
|
new CustomEvent("change", {
|
|
88
|
-
bubbles:
|
|
89
|
-
cancelable:
|
|
90
|
-
composed:
|
|
152
|
+
bubbles: true,
|
|
153
|
+
cancelable: true,
|
|
154
|
+
composed: true,
|
|
91
155
|
detail: {
|
|
92
156
|
value: this.value ?? []
|
|
93
157
|
}
|
|
94
158
|
})
|
|
95
159
|
);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
160
|
+
};
|
|
161
|
+
this.handleKeydown = (event) => {
|
|
162
|
+
var _a, _b;
|
|
163
|
+
const { code } = event;
|
|
164
|
+
if (["Delete", "Backspace"].includes(code)) {
|
|
165
|
+
this.clearValue(event);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
this.focused = true;
|
|
169
|
+
if (!code.startsWith("Arrow") || this.readonly || this.pending) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
if (code === "ArrowUp" || code === "ArrowDown") {
|
|
173
|
+
this.toggle(true);
|
|
174
|
+
event.preventDefault();
|
|
101
175
|
return;
|
|
102
176
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
177
|
+
event.preventDefault();
|
|
178
|
+
if (this.selects === "single") {
|
|
179
|
+
const step = code === "ArrowRight" ? 1 : -1;
|
|
180
|
+
const selectedIndex = this.options.findIndex(
|
|
181
|
+
(option) => {
|
|
182
|
+
var _a2, _b2, _c;
|
|
183
|
+
return ((_a2 = option == null ? void 0 : option.value) == null ? void 0 : _a2.toString()) === ((_c = (_b2 = this.value) == null ? void 0 : _b2[0]) == null ? void 0 : _c.toString());
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
let newIndex = (this.options.length + selectedIndex + step) % this.options.length;
|
|
187
|
+
let availableItems = this.options.length;
|
|
188
|
+
while (((_b = (_a = this.options) == null ? void 0 : _a[newIndex]) == null ? void 0 : _b.disabled) && availableItems) {
|
|
189
|
+
availableItems -= 1;
|
|
190
|
+
newIndex = (this.options.length + newIndex + step) % this.options.length;
|
|
107
191
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
192
|
+
this.value = [this.options[newIndex].value];
|
|
193
|
+
this.dispatchEvent(
|
|
194
|
+
new CustomEvent("change", {
|
|
195
|
+
bubbles: true,
|
|
196
|
+
cancelable: true,
|
|
197
|
+
composed: true,
|
|
198
|
+
detail: {
|
|
199
|
+
value: this.value ?? []
|
|
113
200
|
}
|
|
114
|
-
)
|
|
115
|
-
|
|
116
|
-
for (; (s = (r = this.options) == null ? void 0 : r[u]) != null && s.disabled && p; )
|
|
117
|
-
p -= 1, u = (this.options.length + u + t) % this.options.length;
|
|
118
|
-
this.value = [this.options[u].value], this.dispatchEvent(
|
|
119
|
-
new CustomEvent("change", {
|
|
120
|
-
bubbles: !0,
|
|
121
|
-
cancelable: !0,
|
|
122
|
-
composed: !0,
|
|
123
|
-
detail: {
|
|
124
|
-
value: this.value ?? []
|
|
125
|
-
}
|
|
126
|
-
})
|
|
127
|
-
);
|
|
128
|
-
}
|
|
201
|
+
})
|
|
202
|
+
);
|
|
129
203
|
}
|
|
130
|
-
}
|
|
204
|
+
};
|
|
205
|
+
this.pendingStateController = new PendingStateController(this);
|
|
131
206
|
}
|
|
132
207
|
/**
|
|
133
208
|
* @internal
|
|
134
209
|
*/
|
|
135
210
|
static get styles() {
|
|
136
|
-
return [
|
|
211
|
+
return [unsafeCSS(selectStyles)];
|
|
137
212
|
}
|
|
138
213
|
/**
|
|
139
214
|
* @internal
|
|
@@ -145,116 +220,170 @@ class l extends X(Z, {
|
|
|
145
220
|
* @internal
|
|
146
221
|
*/
|
|
147
222
|
get focusElement() {
|
|
148
|
-
var
|
|
149
|
-
|
|
223
|
+
var _a;
|
|
224
|
+
if (this.open) {
|
|
225
|
+
if (this.search === "on" || this.search === "auto" && ((_a = this.options) == null ? void 0 : _a.length) > SEARCH_AS_OF_NUM_ITEMS) {
|
|
226
|
+
return this.searchInput;
|
|
227
|
+
}
|
|
228
|
+
return this.optionsMenu;
|
|
229
|
+
}
|
|
230
|
+
return this.button;
|
|
150
231
|
}
|
|
151
232
|
forceFocusVisible() {
|
|
152
|
-
|
|
233
|
+
if (this.disabled) {
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
this.focused = true;
|
|
153
237
|
}
|
|
154
238
|
click() {
|
|
155
|
-
this.disabled
|
|
239
|
+
if (this.disabled) {
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
this.toggle();
|
|
156
243
|
}
|
|
157
244
|
handleButtonBlur() {
|
|
158
|
-
this.focused =
|
|
245
|
+
this.focused = false;
|
|
159
246
|
}
|
|
160
|
-
focus(
|
|
161
|
-
super.focus(
|
|
247
|
+
focus(options) {
|
|
248
|
+
super.focus(options);
|
|
249
|
+
if (!this.disabled && this.focusElement) {
|
|
250
|
+
this.focused = this.hasVisibleFocusInTree();
|
|
251
|
+
}
|
|
162
252
|
}
|
|
163
253
|
handleHelperFocus() {
|
|
164
|
-
this.focused =
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
254
|
+
this.focused = true;
|
|
255
|
+
this.button.focus();
|
|
256
|
+
}
|
|
257
|
+
handleChange(event) {
|
|
258
|
+
var _a;
|
|
259
|
+
this.value = ((_a = event == null ? void 0 : event.detail) == null ? void 0 : _a.value) ?? [];
|
|
260
|
+
if (this.strategy) {
|
|
261
|
+
this.strategy.preventNextToggle = "no";
|
|
262
|
+
}
|
|
263
|
+
event.stopPropagation();
|
|
264
|
+
if (!event.cancelable || this.selects === "single") {
|
|
265
|
+
this.open = false;
|
|
266
|
+
if (this.strategy) {
|
|
267
|
+
this.strategy.open = false;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
event.preventDefault();
|
|
271
|
+
this.dispatchEvent(
|
|
169
272
|
new CustomEvent("change", {
|
|
170
|
-
bubbles:
|
|
171
|
-
cancelable:
|
|
172
|
-
composed:
|
|
273
|
+
bubbles: true,
|
|
274
|
+
cancelable: true,
|
|
275
|
+
composed: true,
|
|
173
276
|
detail: {
|
|
174
277
|
value: this.value ?? []
|
|
175
278
|
}
|
|
176
279
|
})
|
|
177
280
|
);
|
|
178
281
|
}
|
|
179
|
-
handleButtonFocus(
|
|
180
|
-
var
|
|
181
|
-
(
|
|
282
|
+
handleButtonFocus(event) {
|
|
283
|
+
var _a;
|
|
284
|
+
(_a = this.strategy) == null ? void 0 : _a.handleButtonFocus(event);
|
|
182
285
|
}
|
|
183
|
-
toggle(
|
|
184
|
-
this.readonly || this.pending
|
|
286
|
+
toggle(target) {
|
|
287
|
+
if (this.readonly || this.pending) {
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
this.open = target === void 0 ? !this.open : target;
|
|
291
|
+
if (this.strategy) {
|
|
292
|
+
this.strategy.open = this.open;
|
|
293
|
+
}
|
|
294
|
+
this._selfManageFocusElement = this.open;
|
|
185
295
|
}
|
|
186
296
|
close() {
|
|
187
|
-
|
|
297
|
+
if (this.readonly) {
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
if (this.strategy) {
|
|
301
|
+
this.open = false;
|
|
302
|
+
this.strategy.open = false;
|
|
303
|
+
}
|
|
188
304
|
}
|
|
189
305
|
bindEvents() {
|
|
190
|
-
var
|
|
191
|
-
(
|
|
306
|
+
var _a;
|
|
307
|
+
(_a = this.strategy) == null ? void 0 : _a.abort();
|
|
308
|
+
this.strategy = this.isMobile.matches ? new strategies.mobile(this.button, this) : new strategies.desktop(this.button, this);
|
|
192
309
|
}
|
|
193
310
|
connectedCallback() {
|
|
194
311
|
super.connectedCallback();
|
|
195
312
|
}
|
|
196
313
|
disconnectedCallback() {
|
|
197
|
-
var
|
|
198
|
-
this.close()
|
|
314
|
+
var _a;
|
|
315
|
+
this.close();
|
|
316
|
+
(_a = this.strategy) == null ? void 0 : _a.releaseDescription();
|
|
317
|
+
super.disconnectedCallback();
|
|
199
318
|
}
|
|
200
|
-
handleTooltipSlotchange(
|
|
201
|
-
this.tooltipEl =
|
|
319
|
+
handleTooltipSlotchange(event) {
|
|
320
|
+
this.tooltipEl = event.target.assignedElements()[0];
|
|
202
321
|
}
|
|
203
322
|
/**
|
|
204
323
|
* @internal
|
|
205
324
|
*/
|
|
206
325
|
get labelTemplate() {
|
|
207
|
-
var
|
|
208
|
-
const
|
|
326
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
327
|
+
const hasIcon = ((_a = this._selectedOptions) == null ? void 0 : _a.length) === 1 && ((_b = this._selectedOptions[0]) == null ? void 0 : _b.icon);
|
|
328
|
+
const iconTemplate = html`<div
|
|
209
329
|
id="icon"
|
|
210
|
-
?hidden=${typeof this.icons
|
|
330
|
+
?hidden=${typeof this.icons === "string" || ((_c = this.value) == null ? void 0 : _c.length) > 1 || !hasIcon}
|
|
211
331
|
>
|
|
212
|
-
${
|
|
213
|
-
</div
|
|
214
|
-
|
|
215
|
-
(
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
332
|
+
${hasIcon ? luzmoIcon(this._selectedOptions[0].icon) : nothing}
|
|
333
|
+
</div>`;
|
|
334
|
+
const fillInTemplateWithCount = (template) => {
|
|
335
|
+
return template.replaceAll(
|
|
336
|
+
/{([^}]+)}/g,
|
|
337
|
+
(match, key) => {
|
|
338
|
+
var _a2;
|
|
339
|
+
return key === "count" ? String((_a2 = this.value) == null ? void 0 : _a2.length) : match;
|
|
340
|
+
}
|
|
341
|
+
);
|
|
342
|
+
};
|
|
343
|
+
const labelClasses = {
|
|
344
|
+
"visually-hidden": this.icons === "only" && ((_d = this.value) == null ? void 0 : _d.length) > 0,
|
|
345
|
+
placeholder: !((_e = this.value) == null ? void 0 : _e.length),
|
|
346
|
+
label: true
|
|
223
347
|
};
|
|
224
|
-
let
|
|
225
|
-
(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
348
|
+
let labelValueTemplate;
|
|
349
|
+
if ((_f = this.value) == null ? void 0 : _f.length) {
|
|
350
|
+
labelValueTemplate = this.value.length === 1 ? html`<span
|
|
351
|
+
>${((_h = (_g = this._selectedOptions) == null ? void 0 : _g[0]) == null ? void 0 : _h.shortLabel) ?? ((_j = (_i = this._selectedOptions) == null ? void 0 : _i[0]) == null ? void 0 : _j.label) ?? ((_k = this.value) == null ? void 0 : _k[0])}</span
|
|
352
|
+
>` : html`<span
|
|
353
|
+
>${fillInTemplateWithCount(this.multipleLabelTemplate)}</span
|
|
354
|
+
>`;
|
|
355
|
+
} else {
|
|
356
|
+
labelValueTemplate = html`
|
|
230
357
|
<slot name="label" id="label">
|
|
231
358
|
<span aria-hidden="true"> ${this.label} </span>
|
|
232
359
|
</slot>
|
|
233
360
|
`;
|
|
234
|
-
|
|
361
|
+
}
|
|
362
|
+
const appliedLabelTemplate = ((_l = this.value) == null ? void 0 : _l.length) ? html`
|
|
235
363
|
<div aria-hidden="true" class="visually-hidden" id="applied-label">
|
|
236
364
|
${this.label}
|
|
237
365
|
<slot name="label"></slot>
|
|
238
366
|
</div>
|
|
239
|
-
` :
|
|
367
|
+
` : html` <span hidden id="applied-label">${this.label}</span> `;
|
|
368
|
+
const clearIcon = () => html`
|
|
240
369
|
<div class="icon-container clear-icon icon" @click=${this.clearValue}>
|
|
241
|
-
${
|
|
370
|
+
${luzmoIcon(luzmoClose14)}
|
|
242
371
|
</div>
|
|
243
372
|
`;
|
|
244
373
|
return [
|
|
245
|
-
|
|
246
|
-
${((
|
|
374
|
+
html`
|
|
375
|
+
${((_m = this.value) == null ? void 0 : _m.length) === 1 ? iconTemplate : nothing}
|
|
247
376
|
<div
|
|
248
|
-
id=${
|
|
249
|
-
class=${
|
|
377
|
+
id=${ifDefined(((_n = this.value) == null ? void 0 : _n.length) ? "label" : void 0)}
|
|
378
|
+
class=${classMap(labelClasses)}
|
|
250
379
|
>
|
|
251
|
-
${
|
|
380
|
+
${labelValueTemplate}
|
|
252
381
|
</div>
|
|
253
|
-
${
|
|
254
|
-
${this.invalid && !this.pending ?
|
|
382
|
+
${appliedLabelTemplate}
|
|
383
|
+
${this.invalid && !this.pending ? html` ${this.renderAlertIcon()} ` : nothing}
|
|
255
384
|
${this.pendingStateController.renderPendingState()}
|
|
256
|
-
${this.clearable && !this.readonly && ((
|
|
257
|
-
${this.readonly ?
|
|
385
|
+
${this.clearable && !this.readonly && ((_o = this.value) == null ? void 0 : _o.length) > 0 ? clearIcon() : nothing}
|
|
386
|
+
${this.readonly ? nothing : this.renderAngleIcon()}
|
|
258
387
|
<slot
|
|
259
388
|
aria-hidden="true"
|
|
260
389
|
name="tooltip"
|
|
@@ -264,67 +393,121 @@ class l extends X(Z, {
|
|
|
264
393
|
`
|
|
265
394
|
];
|
|
266
395
|
}
|
|
267
|
-
update(
|
|
268
|
-
|
|
396
|
+
update(changes) {
|
|
397
|
+
if (changes.has("disabled") && this.disabled && this.strategy) {
|
|
398
|
+
this.open = false;
|
|
399
|
+
this.strategy.open = false;
|
|
400
|
+
}
|
|
401
|
+
if (changes.has("pending") && this.pending && this.strategy) {
|
|
402
|
+
this.open = false;
|
|
403
|
+
this.strategy.open = false;
|
|
404
|
+
}
|
|
405
|
+
super.update(changes);
|
|
269
406
|
}
|
|
270
407
|
bindButtonKeydownListener() {
|
|
271
408
|
this.button.addEventListener("keydown", this.handleKeydown);
|
|
272
409
|
}
|
|
273
|
-
willUpdate(
|
|
274
|
-
var
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
410
|
+
willUpdate(changes) {
|
|
411
|
+
var _a;
|
|
412
|
+
const changedOpen = changes.has("open");
|
|
413
|
+
const changedValue = changes.has("value");
|
|
414
|
+
const changedOptions = changes.has("options");
|
|
415
|
+
const changedSelects = changes.has("selects");
|
|
416
|
+
const previousOpen = changes.get("open");
|
|
417
|
+
if (changedSelects && this.selects === "single" && ((_a = this.value) == null ? void 0 : _a.length) > 1) {
|
|
418
|
+
console.warn(
|
|
419
|
+
`luzmo-select is being set to a single value given the selects property changed to 'single'`
|
|
420
|
+
);
|
|
421
|
+
this.value = this.value.slice(0, 1);
|
|
422
|
+
}
|
|
423
|
+
if (changedOpen && previousOpen === false && this.open && this.searchString) {
|
|
424
|
+
this.searchString = "";
|
|
425
|
+
}
|
|
426
|
+
if (changedValue || changedOptions) {
|
|
427
|
+
this.setSelectedOptionsFromValue();
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
updated(changes) {
|
|
431
|
+
var _a;
|
|
432
|
+
super.updated(changes);
|
|
433
|
+
const changedOptions = changes.has("options");
|
|
434
|
+
const changedOpen = changes.has("open");
|
|
435
|
+
if (changedOpen) {
|
|
436
|
+
this.strategy.open = this.open;
|
|
437
|
+
if (this.open === false) {
|
|
438
|
+
this.optionsMenu.scrollToTop();
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
if (changedOptions) {
|
|
442
|
+
if (((_a = this.options) == null ? void 0 : _a.length) > VIRTUALIZE_AS_OF_NUM_ITEMS) {
|
|
443
|
+
const longestLabelOption = this.options.reduce((max, option) => {
|
|
444
|
+
var _a2, _b;
|
|
445
|
+
return (((_a2 = max == null ? void 0 : max.label) == null ? void 0 : _a2.length) ?? 0) > (((_b = option == null ? void 0 : option.label) == null ? void 0 : _b.length) ?? 0) ? max : option;
|
|
289
446
|
}, 0);
|
|
290
|
-
this._estimatePopoverWidth(
|
|
291
|
-
} else
|
|
447
|
+
this._estimatePopoverWidth(longestLabelOption);
|
|
448
|
+
} else {
|
|
292
449
|
this.style.removeProperty("--select-popover-width");
|
|
450
|
+
}
|
|
451
|
+
}
|
|
293
452
|
}
|
|
294
|
-
firstUpdated(
|
|
295
|
-
super.firstUpdated(
|
|
453
|
+
firstUpdated(changes) {
|
|
454
|
+
super.firstUpdated(changes);
|
|
455
|
+
this.bindButtonKeydownListener();
|
|
456
|
+
this.bindEvents();
|
|
296
457
|
}
|
|
297
|
-
_getCssVarInPixels(
|
|
298
|
-
const
|
|
299
|
-
let
|
|
300
|
-
if (
|
|
301
|
-
const
|
|
458
|
+
_getCssVarInPixels(cssVarName) {
|
|
459
|
+
const value = getCssVariableValue(this, cssVarName);
|
|
460
|
+
let pxValue;
|
|
461
|
+
if (value.endsWith("rem")) {
|
|
462
|
+
const rootFontSize = Number.parseFloat(
|
|
302
463
|
getComputedStyle(document.documentElement).fontSize
|
|
303
464
|
);
|
|
304
|
-
|
|
305
|
-
} else if (
|
|
306
|
-
const
|
|
465
|
+
pxValue = Number.parseFloat(value) * rootFontSize;
|
|
466
|
+
} else if (value.endsWith("em")) {
|
|
467
|
+
const elementFontSize = Number.parseFloat(
|
|
307
468
|
getComputedStyle(this).fontSize
|
|
308
469
|
);
|
|
309
|
-
|
|
310
|
-
} else
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
470
|
+
pxValue = Number.parseFloat(value) * elementFontSize;
|
|
471
|
+
} else {
|
|
472
|
+
pxValue = Number.parseFloat(value);
|
|
473
|
+
}
|
|
474
|
+
return pxValue >= 0 ? pxValue : void 0;
|
|
475
|
+
}
|
|
476
|
+
_estimatePopoverWidth(longestString) {
|
|
477
|
+
const fontSize = this._getCssVarInPixels("--luzmo-select-font-size") ?? this._getCssVarInPixels("--select-font-size");
|
|
478
|
+
const minWidth = this._getCssVarInPixels("--luzmo-select-popover-min-width") ?? this._getCssVarInPixels("--select-popover-min-width");
|
|
479
|
+
const spacing = this._getCssVarInPixels("--luzmo-spacing-5");
|
|
480
|
+
const el = document.createElement("luzmo-options");
|
|
481
|
+
el.style.setProperty("--luzmo-select-font-size", `${fontSize}px`);
|
|
482
|
+
el.options = [longestString];
|
|
483
|
+
el.value = [longestString];
|
|
484
|
+
el.variant = this.variant;
|
|
485
|
+
el.size = this.size;
|
|
486
|
+
el.style.position = "absolute";
|
|
487
|
+
el.style.left = "-9999px";
|
|
488
|
+
el.style.top = "-9999px";
|
|
489
|
+
el.style.opacity = "0";
|
|
490
|
+
el.style.width = "auto";
|
|
491
|
+
document.body.append(el);
|
|
492
|
+
el.updateComplete.then(() => {
|
|
493
|
+
const width = el.offsetWidth + (spacing ?? 0);
|
|
494
|
+
if (width > (minWidth ?? 0)) {
|
|
495
|
+
this.style.setProperty("--select-popover-width", `${width}px`);
|
|
496
|
+
} else {
|
|
497
|
+
this.style.removeProperty("--select-popover-width");
|
|
498
|
+
}
|
|
499
|
+
el.remove();
|
|
500
|
+
return width;
|
|
501
|
+
}).catch((error) => {
|
|
502
|
+
console.error(error);
|
|
503
|
+
el.remove();
|
|
321
504
|
});
|
|
322
505
|
}
|
|
323
506
|
/**
|
|
324
507
|
* @internal
|
|
325
508
|
*/
|
|
326
509
|
get dismissHelper() {
|
|
327
|
-
return
|
|
510
|
+
return html`
|
|
328
511
|
<div class="visually-hidden">
|
|
329
512
|
<button
|
|
330
513
|
tabindex="-1"
|
|
@@ -337,27 +520,30 @@ class l extends X(Z, {
|
|
|
337
520
|
// a helper to throw focus to the button is needed because Safari
|
|
338
521
|
// won't include buttons in the tab order even with tabindex="0"
|
|
339
522
|
render() {
|
|
340
|
-
|
|
523
|
+
if (this.tooltipEl) {
|
|
524
|
+
this.tooltipEl.disabled = this.open;
|
|
525
|
+
}
|
|
526
|
+
return html`
|
|
341
527
|
<span
|
|
342
528
|
id="focus-helper"
|
|
343
529
|
tabindex=${this.focused || this.open ? "-1" : "0"}
|
|
344
530
|
@focus=${this.handleHelperFocus}
|
|
345
|
-
aria-describedby=${
|
|
531
|
+
aria-describedby=${DESCRIPTION_ID}
|
|
346
532
|
></span>
|
|
347
533
|
<button
|
|
348
|
-
aria-controls=${
|
|
534
|
+
aria-controls=${ifDefined(this.open ? "menu" : void 0)}
|
|
349
535
|
aria-describedby="tooltip"
|
|
350
536
|
aria-expanded=${this.open ? "true" : "false"}
|
|
351
537
|
aria-haspopup="true"
|
|
352
538
|
aria-labelledby="loader icon label applied-label"
|
|
353
539
|
id="button"
|
|
354
|
-
class=${
|
|
540
|
+
class=${ifDefined(
|
|
355
541
|
this.labelAlignment ? `label-${this.labelAlignment}` : void 0
|
|
356
542
|
)}
|
|
357
543
|
@blur=${this.handleButtonBlur}
|
|
358
544
|
@keydown=${{
|
|
359
545
|
handleEvent: this.handleEnterKeydown,
|
|
360
|
-
capture:
|
|
546
|
+
capture: true
|
|
361
547
|
}}
|
|
362
548
|
?disabled=${this.disabled}
|
|
363
549
|
tabindex="-1"
|
|
@@ -371,21 +557,21 @@ class l extends X(Z, {
|
|
|
371
557
|
* @internal
|
|
372
558
|
*/
|
|
373
559
|
get renderDescriptionSlot() {
|
|
374
|
-
return
|
|
375
|
-
<div id=${
|
|
560
|
+
return html`
|
|
561
|
+
<div id=${DESCRIPTION_ID}>
|
|
376
562
|
<slot name="description"></slot>
|
|
377
563
|
</div>
|
|
378
564
|
`;
|
|
379
565
|
}
|
|
380
566
|
setSelectedOptionsFromValue() {
|
|
381
|
-
this._selectedOptions = this.options.filter((
|
|
382
|
-
var
|
|
383
|
-
const
|
|
384
|
-
return (
|
|
567
|
+
this._selectedOptions = this.options.filter((option) => {
|
|
568
|
+
var _a;
|
|
569
|
+
const value = typeof option === "string" ? option : option == null ? void 0 : option.value;
|
|
570
|
+
return (_a = this.value) == null ? void 0 : _a.includes(value);
|
|
385
571
|
});
|
|
386
572
|
}
|
|
387
573
|
renderSearchInput() {
|
|
388
|
-
|
|
574
|
+
const searchInput = html`
|
|
389
575
|
<div id="search-container">
|
|
390
576
|
<input
|
|
391
577
|
type="text"
|
|
@@ -400,33 +586,35 @@ class l extends X(Z, {
|
|
|
400
586
|
tabindex="0"
|
|
401
587
|
role="searchbox"
|
|
402
588
|
/>
|
|
403
|
-
${
|
|
589
|
+
${searchIcon()}
|
|
404
590
|
</div>
|
|
405
591
|
`;
|
|
592
|
+
return searchInput;
|
|
406
593
|
}
|
|
407
594
|
/**
|
|
408
595
|
* @internal
|
|
409
596
|
*/
|
|
410
597
|
get renderMenu() {
|
|
411
|
-
const
|
|
412
|
-
var
|
|
413
|
-
const
|
|
414
|
-
return (
|
|
415
|
-
})
|
|
598
|
+
const filteredOptions = this.options.filter((choice) => {
|
|
599
|
+
var _a, _b, _c;
|
|
600
|
+
const label = typeof choice === "string" ? choice : choice == null ? void 0 : choice.label;
|
|
601
|
+
return (_c = (_a = label == null ? void 0 : label.toString()) == null ? void 0 : _a.toLowerCase()) == null ? void 0 : _c.includes(((_b = this.searchString) == null ? void 0 : _b.toLowerCase()) ?? "");
|
|
602
|
+
});
|
|
603
|
+
const menu = html`
|
|
416
604
|
<luzmo-options
|
|
417
605
|
.variant=${this.variant}
|
|
418
606
|
aria-labelledby="applied-label"
|
|
419
607
|
id="menu"
|
|
420
608
|
?emphasized=${this.emphasized}
|
|
421
609
|
.selects=${this.selects ?? "multiple"}
|
|
422
|
-
.options=${
|
|
610
|
+
.options=${filteredOptions}
|
|
423
611
|
.value=${this.value}
|
|
424
612
|
?pending=${this.retrieving}
|
|
425
613
|
?no-wrap=${this.noWrap}
|
|
426
614
|
@change=${this.handleChange}
|
|
427
615
|
@keydown=${{
|
|
428
616
|
handleEvent: this.handleEnterKeydown,
|
|
429
|
-
capture:
|
|
617
|
+
capture: true
|
|
430
618
|
}}
|
|
431
619
|
@luzmo-scrolled=${this.handleScrolled}
|
|
432
620
|
@luzmo-exceeded-top=${this.handleExceededTop}
|
|
@@ -435,185 +623,213 @@ class l extends X(Z, {
|
|
|
435
623
|
tabindex="0"
|
|
436
624
|
>
|
|
437
625
|
</luzmo-options>
|
|
438
|
-
${
|
|
626
|
+
${filteredOptions.length === 0 && !this.retrieving && !this.pending ? html`<div id="no-results">
|
|
439
627
|
${this.searchString ? this.noResultsLabel : this.noDataLabel}
|
|
440
|
-
</div>` :
|
|
628
|
+
</div>` : nothing}
|
|
441
629
|
`;
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
return
|
|
448
|
-
|
|
449
|
-
return
|
|
630
|
+
this.hasRenderedOverlay = this.hasRenderedOverlay || this.focused || this.open;
|
|
631
|
+
if (this.hasRenderedOverlay) {
|
|
632
|
+
if (this.dependencyManager.loaded) {
|
|
633
|
+
this.dependencyManager.add("luzmo-overlay");
|
|
634
|
+
}
|
|
635
|
+
return this.renderOverlay(menu);
|
|
636
|
+
}
|
|
637
|
+
return menu;
|
|
638
|
+
}
|
|
639
|
+
renderOverlay(menu) {
|
|
640
|
+
var _a, _b, _c;
|
|
641
|
+
if (((_a = this.strategy) == null ? void 0 : _a.overlay) === void 0) {
|
|
642
|
+
return menu;
|
|
643
|
+
}
|
|
644
|
+
const container = this.renderContainer(menu);
|
|
645
|
+
render(container, (_b = this.strategy) == null ? void 0 : _b.overlay, {
|
|
450
646
|
host: this
|
|
451
|
-
})
|
|
647
|
+
});
|
|
648
|
+
return (_c = this.strategy) == null ? void 0 : _c.overlay;
|
|
452
649
|
}
|
|
453
|
-
renderContainer(
|
|
454
|
-
var
|
|
455
|
-
const
|
|
456
|
-
|
|
650
|
+
renderContainer(menu) {
|
|
651
|
+
var _a, _b;
|
|
652
|
+
const searchBox = this.search === "on" || this.searchString && ((_a = this.searchString) == null ? void 0 : _a.length) > 0 || this.search === "auto" && ((_b = this.options) == null ? void 0 : _b.length) > 20 ? this.renderSearchInput() : nothing;
|
|
653
|
+
const accessibleMenu = html`
|
|
654
|
+
${searchBox} ${this.dismissHelper} ${menu} ${this.dismissHelper}
|
|
457
655
|
`;
|
|
458
|
-
|
|
656
|
+
this.dependencyManager.add("luzmo-popover");
|
|
657
|
+
return html`
|
|
459
658
|
<luzmo-popover
|
|
460
659
|
id="popover"
|
|
461
660
|
size=${this.size}
|
|
462
661
|
role="presentation"
|
|
463
662
|
placement=${this.placement}
|
|
464
663
|
>
|
|
465
|
-
${
|
|
664
|
+
${accessibleMenu}
|
|
466
665
|
</luzmo-popover>
|
|
467
666
|
`;
|
|
468
667
|
}
|
|
469
668
|
async getUpdateComplete() {
|
|
470
|
-
const
|
|
471
|
-
|
|
669
|
+
const complete = await super.getUpdateComplete();
|
|
670
|
+
await this.selectionPromise;
|
|
671
|
+
if (this.overlayElement) {
|
|
672
|
+
await this.overlayElement.updateComplete;
|
|
673
|
+
}
|
|
674
|
+
return complete;
|
|
472
675
|
}
|
|
473
|
-
handleScrolled(
|
|
474
|
-
var
|
|
475
|
-
|
|
676
|
+
handleScrolled(event) {
|
|
677
|
+
var _a, _b;
|
|
678
|
+
event.stopPropagation();
|
|
679
|
+
event.preventDefault();
|
|
680
|
+
this.dispatchEvent(
|
|
476
681
|
new CustomEvent("luzmo-scrolled", {
|
|
477
|
-
bubbles:
|
|
478
|
-
composed:
|
|
479
|
-
cancelable:
|
|
682
|
+
bubbles: true,
|
|
683
|
+
composed: true,
|
|
684
|
+
cancelable: true,
|
|
480
685
|
detail: {
|
|
481
|
-
first: (
|
|
482
|
-
last: (
|
|
686
|
+
first: (_a = event == null ? void 0 : event.detail) == null ? void 0 : _a.first,
|
|
687
|
+
last: (_b = event == null ? void 0 : event.detail) == null ? void 0 : _b.last
|
|
483
688
|
}
|
|
484
689
|
})
|
|
485
690
|
);
|
|
486
691
|
}
|
|
487
|
-
handleExceededTop(
|
|
488
|
-
|
|
692
|
+
handleExceededTop(event) {
|
|
693
|
+
event.preventDefault();
|
|
694
|
+
event.stopPropagation();
|
|
695
|
+
if (this.searchInput) {
|
|
696
|
+
this.searchInput.focus();
|
|
697
|
+
} else {
|
|
698
|
+
this.toggle(false);
|
|
699
|
+
}
|
|
489
700
|
}
|
|
490
|
-
handleSearchInput(
|
|
491
|
-
this.searchString =
|
|
701
|
+
handleSearchInput(event) {
|
|
702
|
+
this.searchString = event.target.value;
|
|
703
|
+
this.dispatchEvent(
|
|
492
704
|
new CustomEvent("luzmo-search", {
|
|
493
|
-
bubbles:
|
|
494
|
-
composed:
|
|
495
|
-
cancelable:
|
|
705
|
+
bubbles: true,
|
|
706
|
+
composed: true,
|
|
707
|
+
cancelable: true,
|
|
496
708
|
detail: {
|
|
497
709
|
string: this.searchString
|
|
498
710
|
}
|
|
499
711
|
})
|
|
500
712
|
);
|
|
501
713
|
}
|
|
502
|
-
handleSearchKeydown(
|
|
503
|
-
if (
|
|
714
|
+
handleSearchKeydown(event) {
|
|
715
|
+
if (event.code === "Escape") {
|
|
504
716
|
this.searchString = "";
|
|
505
717
|
return;
|
|
506
718
|
}
|
|
507
|
-
if (
|
|
508
|
-
this.optionsMenu.focus()
|
|
719
|
+
if (event.code === "ArrowDown") {
|
|
720
|
+
this.optionsMenu.focus();
|
|
721
|
+
event.preventDefault();
|
|
722
|
+
event.stopPropagation();
|
|
509
723
|
return;
|
|
510
|
-
} else if (
|
|
511
|
-
this.toggle(
|
|
724
|
+
} else if (event.code === "ArrowUp") {
|
|
725
|
+
this.toggle(false);
|
|
512
726
|
return;
|
|
513
727
|
}
|
|
514
728
|
}
|
|
515
729
|
}
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
],
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
],
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
],
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
],
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
],
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
],
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
],
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
],
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
],
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
],
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
],
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
],
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
],
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
],
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
],
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
],
|
|
564
|
-
|
|
565
|
-
|
|
730
|
+
__decorateClass([
|
|
731
|
+
query("#button")
|
|
732
|
+
], LuzmoSelect.prototype, "button");
|
|
733
|
+
__decorateClass([
|
|
734
|
+
property({ type: Boolean, reflect: true })
|
|
735
|
+
], LuzmoSelect.prototype, "disabled");
|
|
736
|
+
__decorateClass([
|
|
737
|
+
property({ type: Boolean, reflect: true })
|
|
738
|
+
], LuzmoSelect.prototype, "focused");
|
|
739
|
+
__decorateClass([
|
|
740
|
+
property({ type: String, reflect: true })
|
|
741
|
+
], LuzmoSelect.prototype, "icons");
|
|
742
|
+
__decorateClass([
|
|
743
|
+
property({ type: String, reflect: true })
|
|
744
|
+
], LuzmoSelect.prototype, "variant");
|
|
745
|
+
__decorateClass([
|
|
746
|
+
property({ type: Boolean, reflect: true })
|
|
747
|
+
], LuzmoSelect.prototype, "emphasized");
|
|
748
|
+
__decorateClass([
|
|
749
|
+
property({ type: Boolean, reflect: true })
|
|
750
|
+
], LuzmoSelect.prototype, "invalid");
|
|
751
|
+
__decorateClass([
|
|
752
|
+
property({ type: String, reflect: true })
|
|
753
|
+
], LuzmoSelect.prototype, "search");
|
|
754
|
+
__decorateClass([
|
|
755
|
+
property({ type: Boolean, reflect: true, attribute: "no-wrap" })
|
|
756
|
+
], LuzmoSelect.prototype, "noWrap");
|
|
757
|
+
__decorateClass([
|
|
758
|
+
property({ type: Boolean, reflect: true })
|
|
759
|
+
], LuzmoSelect.prototype, "retrieving");
|
|
760
|
+
__decorateClass([
|
|
761
|
+
property({ type: Boolean, reflect: true })
|
|
762
|
+
], LuzmoSelect.prototype, "pending");
|
|
763
|
+
__decorateClass([
|
|
764
|
+
property({ type: Boolean, reflect: true })
|
|
765
|
+
], LuzmoSelect.prototype, "clearable");
|
|
766
|
+
__decorateClass([
|
|
767
|
+
property({ type: String, attribute: "pending-label" })
|
|
768
|
+
], LuzmoSelect.prototype, "pendingLabel");
|
|
769
|
+
__decorateClass([
|
|
770
|
+
property({ type: String, attribute: "search-label" })
|
|
771
|
+
], LuzmoSelect.prototype, "searchLabel");
|
|
772
|
+
__decorateClass([
|
|
773
|
+
property({ type: String, attribute: "no-results-label" })
|
|
774
|
+
], LuzmoSelect.prototype, "noResultsLabel");
|
|
775
|
+
__decorateClass([
|
|
776
|
+
property({ type: String, attribute: "no-data-label" })
|
|
777
|
+
], LuzmoSelect.prototype, "noDataLabel");
|
|
778
|
+
__decorateClass([
|
|
779
|
+
property({
|
|
566
780
|
type: String,
|
|
567
781
|
attribute: "multiple-label-template",
|
|
568
|
-
reflect:
|
|
782
|
+
reflect: true
|
|
569
783
|
})
|
|
570
|
-
],
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
],
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
],
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
],
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
],
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
],
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
],
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
],
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
],
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
],
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
],
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
],
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
],
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
],
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
],
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
],
|
|
616
|
-
customElements.get("luzmo-select")
|
|
784
|
+
], LuzmoSelect.prototype, "multipleLabelTemplate");
|
|
785
|
+
__decorateClass([
|
|
786
|
+
property()
|
|
787
|
+
], LuzmoSelect.prototype, "label");
|
|
788
|
+
__decorateClass([
|
|
789
|
+
property({ type: Boolean, reflect: true })
|
|
790
|
+
], LuzmoSelect.prototype, "open");
|
|
791
|
+
__decorateClass([
|
|
792
|
+
property({ type: Boolean, reflect: true })
|
|
793
|
+
], LuzmoSelect.prototype, "readonly");
|
|
794
|
+
__decorateClass([
|
|
795
|
+
state()
|
|
796
|
+
], LuzmoSelect.prototype, "labelAlignment");
|
|
797
|
+
__decorateClass([
|
|
798
|
+
state()
|
|
799
|
+
], LuzmoSelect.prototype, "displayLabelContent");
|
|
800
|
+
__decorateClass([
|
|
801
|
+
state()
|
|
802
|
+
], LuzmoSelect.prototype, "searchString");
|
|
803
|
+
__decorateClass([
|
|
804
|
+
query("luzmo-options")
|
|
805
|
+
], LuzmoSelect.prototype, "optionsMenu");
|
|
806
|
+
__decorateClass([
|
|
807
|
+
query("#search")
|
|
808
|
+
], LuzmoSelect.prototype, "searchInput");
|
|
809
|
+
__decorateClass([
|
|
810
|
+
query("luzmo-overlay")
|
|
811
|
+
], LuzmoSelect.prototype, "overlayElement");
|
|
812
|
+
__decorateClass([
|
|
813
|
+
query("lit-virtualizer")
|
|
814
|
+
], LuzmoSelect.prototype, "virtualizer");
|
|
815
|
+
__decorateClass([
|
|
816
|
+
property({ type: String, reflect: true })
|
|
817
|
+
], LuzmoSelect.prototype, "placement");
|
|
818
|
+
__decorateClass([
|
|
819
|
+
property({ type: Boolean, reflect: true })
|
|
820
|
+
], LuzmoSelect.prototype, "quiet");
|
|
821
|
+
__decorateClass([
|
|
822
|
+
property({ type: Array })
|
|
823
|
+
], LuzmoSelect.prototype, "value");
|
|
824
|
+
__decorateClass([
|
|
825
|
+
property({ type: Array })
|
|
826
|
+
], LuzmoSelect.prototype, "options");
|
|
827
|
+
__decorateClass([
|
|
828
|
+
property({ type: String, reflect: true })
|
|
829
|
+
], LuzmoSelect.prototype, "selects");
|
|
830
|
+
if (!customElements.get("luzmo-select")) {
|
|
831
|
+
customElements.define("luzmo-select", LuzmoSelect);
|
|
832
|
+
}
|
|
617
833
|
export {
|
|
618
|
-
|
|
834
|
+
LuzmoSelect
|
|
619
835
|
};
|