@luzmo/lucero 0.0.26 → 0.0.28
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 +4 -4
- package/components/accordion/index.js +4 -4
- package/components/action-bar/index.cjs +1 -1
- package/components/action-bar/index.js +6 -6
- package/components/action-button/index.cjs +2 -2
- package/components/action-button/index.js +5 -5
- package/components/action-group/index.cjs +1 -1
- package/components/action-group/index.js +1 -1
- package/components/{action-group-DngGfcr_.js → action-group-DBImibFn.js} +2 -2
- package/components/{action-group-hy1HZxOi.cjs → action-group-DJGMcRHb.cjs} +1 -1
- package/components/action-menu/index.cjs +2 -2
- package/components/action-menu/index.js +6 -6
- package/components/{async-directive-B0s_zDWg.cjs → async-directive-BX1T1e1_.cjs} +1 -1
- package/components/{async-directive-C0KryStG.js → async-directive-BfcqVjDp.js} +1 -1
- package/components/avatar/index.cjs +3 -3
- package/components/avatar/index.js +10 -10
- package/components/base-CBCg3yyw.cjs +40 -0
- package/components/{base-DroC2Znx.js → base-WsynuqaS.js} +54 -51
- package/components/button/index.cjs +1 -1
- package/components/button/index.js +6 -6
- package/components/{button-base-BRZtaOk8.js → button-base-DbkDzb71.js} +4 -4
- package/components/{button-base-CJc7kjJK.cjs → button-base-XgPLmwP-.cjs} +1 -1
- package/components/button-group/index.cjs +1 -1
- package/components/button-group/index.js +2 -2
- package/components/calendar/index.cjs +1 -1
- package/components/calendar/index.js +1 -1
- package/components/checkbox/index.cjs +1 -1
- package/components/checkbox/index.js +4 -4
- package/components/{checkbox-mixin-CcPwhZst.cjs → checkbox-mixin-BDN0dBtS.cjs} +1 -1
- package/components/{checkbox-mixin-DbcpHFBw.js → checkbox-mixin-Do7EgtpQ.js} +2 -2
- package/components/{class-map-DuvNig0r.cjs → class-map-Di1D_rCm.cjs} +1 -1
- package/components/{class-map-CjcRhurN.js → class-map-NbVXqBU0.js} +1 -1
- package/components/{clear-button-Nwq4REOv.js → clear-button-DoeRUWQ3.js} +16 -16
- package/components/clear-button-Qi1pMA5S.cjs +18 -0
- package/components/close-button-BFMBEw3q.cjs +18 -0
- package/components/{close-button-9l1TxW7Y.cjs → close-button-BWXdHSx3.js} +34 -1
- package/components/color-area/index.cjs +1 -1
- package/components/color-area/index.js +3 -3
- package/components/color-field/index.cjs +1 -1
- package/components/color-field/index.js +2 -2
- package/components/color-handle/index.cjs +1 -1
- package/components/color-handle/index.js +2 -2
- package/components/color-loupe/index.cjs +1 -1
- package/components/color-loupe/index.js +1 -1
- package/components/{color-loupe-Ck2IRn4K.cjs → color-loupe-CaA_Lfkk.cjs} +1 -1
- package/components/{color-loupe-B0mH9Jyx.js → color-loupe-CmMsXbjT.js} +1 -1
- package/components/color-menu/index.cjs +4 -4
- package/components/color-menu/index.js +4 -4
- package/components/color-picker/index.cjs +1 -1
- package/components/color-picker/index.js +3 -3
- package/components/color-slider/index.cjs +1 -1
- package/components/color-slider/index.js +5 -5
- package/components/date-time-picker/index.cjs +3 -3
- package/components/date-time-picker/index.js +10 -10
- package/components/directive-helpers-Cm6gitnu.js +62 -0
- package/components/{directive-helpers-OG6wWKJt.js → directive-helpers-DyIRTWwA.cjs} +2 -8
- package/components/divider/index.cjs +1 -1
- package/components/divider/index.js +5 -5
- package/components/{divider.module-CXMNveQc.cjs → divider.module-DDvBo9zo.cjs} +1 -1
- package/components/{divider.module-DwOuLGU3.js → divider.module-DoQWQEIJ.js} +1 -1
- package/components/field-group/index.cjs +1 -1
- package/components/field-group/index.js +1 -1
- package/components/{field-group-ClxYbp6Z.js → field-group-DXfBWrkO.js} +2 -2
- package/components/{field-group-CIach2C_.cjs → field-group-DkGst3r5.cjs} +1 -1
- package/components/field-label/index.cjs +1 -1
- package/components/field-label/index.js +1 -1
- package/components/{field-label-BaOJ2i-l.js → field-label-CZ2zzChK.js} +2 -2
- package/components/{field-label-CkZCXvyb.cjs → field-label-mO1AkUgR.cjs} +1 -1
- package/components/flow-D-0MTYCm.js +527 -0
- package/components/flow-DM3dNAKs.cjs +30 -0
- package/components/{focusable-Dy9nRVST.js → focusable-BxtpnzWp.js} +1 -1
- package/components/{focusable-BW4I5ppi.cjs → focusable-EbipgXRh.cjs} +1 -1
- package/components/icon/index.cjs +1 -1
- package/components/icon/index.js +3 -3
- package/components/{if-defined-D7nbLM5n.cjs → if-defined-C9YGdo33.cjs} +1 -1
- package/components/{if-defined-CUCu7LSf.js → if-defined-DOaE2coe.js} +1 -1
- package/components/{index-C6wHQ74z.js → index-A-yOTB_d.js} +20 -20
- package/components/index-BLWuwZXx.cjs +113 -0
- package/components/index.cjs +1 -1
- package/components/index.js +132 -127
- package/components/infield-button/index.cjs +1 -1
- package/components/infield-button/index.js +3 -3
- package/components/label/index.cjs +1 -1
- package/components/label/index.js +1 -1
- package/components/{like-anchor-CkIPVvtI.js → like-anchor-Bvn_vLQ8.js} +2 -2
- package/components/{like-anchor-s-5FEzRQ.cjs → like-anchor-sod1C1fR.cjs} +1 -1
- package/components/luzmo-icons-DbwDQtuO.js +229 -0
- package/components/luzmo-icons-DletXGWU.cjs +29 -0
- package/components/{manage-help-text-DGwDhPtP.cjs → manage-help-text-DhgARkZX.cjs} +1 -1
- package/components/{manage-help-text-BzyCpgqN.js → manage-help-text-syYnjKGL.js} +2 -2
- package/components/menu/index.cjs +8 -8
- package/components/menu/index.js +19 -19
- package/components/multi-language-field/index.cjs +1 -1
- package/components/multi-language-field/index.js +3 -3
- package/components/number-field/index.cjs +3 -3
- package/components/number-field/index.js +10 -10
- package/components/{observe-slot-text-BMloiRX5.js → observe-slot-text-BPfIQQtz.js} +1 -1
- package/components/{observe-slot-text-BzdHQBH3.cjs → observe-slot-text-Ceb7SvYT.cjs} +1 -1
- package/components/options/index.cjs +104 -0
- package/components/options/index.d.ts +13 -0
- package/components/options/index.js +1172 -0
- package/components/options/option.d.ts +70 -0
- package/components/options/options-divider.d.ts +14 -0
- package/components/options/options.d.ts +85 -0
- package/components/overlay/index.cjs +4 -4
- package/components/overlay/index.js +8 -8
- package/components/{overlay-D4oZnKKd.js → overlay-BBNyvs8F.js} +4 -4
- package/components/{overlay-DAVu8dy8.cjs → overlay-o0tLxsk-.cjs} +1 -1
- package/components/{pending-state-xRhujC3J.js → pending-state-C5OtdXCm.js} +2 -2
- package/components/{pending-state-CkibRs0D.cjs → pending-state-gs6IxYtB.cjs} +1 -1
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +2 -2
- package/components/picker/picker.d.ts +2 -2
- package/components/picker-CM3kN655.js +461 -0
- package/components/picker-C__p3kzA.cjs +123 -0
- package/components/picker-button/index.cjs +2 -2
- package/components/picker-button/index.js +6 -6
- package/components/popover/index.cjs +1 -1
- package/components/popover/index.js +1 -1
- package/components/{popover-Cx4MhaoE.js → popover-DjX0aAnY.js} +2 -2
- package/components/{popover-DBQ1YYW6.cjs → popover-KFfO0IYL.cjs} +1 -1
- package/components/progress-circle/index.cjs +1 -1
- package/components/progress-circle/index.js +1 -1
- package/components/{progress-circle-BGubjTvj.cjs → progress-circle-B12-2Gww.cjs} +1 -1
- package/components/{progress-circle-B25wyiBi.js → progress-circle-CWGsfHnp.js} +3 -3
- package/components/radio/index.cjs +1 -1
- package/components/radio/index.js +3 -3
- package/components/search/index.cjs +4 -4
- package/components/search/index.js +5 -5
- package/components/select/index.cjs +156 -0
- package/components/select/index.d.ts +7 -0
- package/components/select/index.js +572 -0
- package/components/{multi-picker/multi-picker.d.ts → select/select.d.ts} +83 -59
- package/components/{sized-mixin-CDhX3fJn.cjs → sized-mixin-CPxE5C96.cjs} +1 -1
- package/components/{sized-mixin-Y_QuYtjJ.js → sized-mixin-D4ACoVUr.js} +1 -1
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +2 -2
- package/components/{state-Bq6oXknJ.cjs → state-D8JEtYqe.cjs} +1 -1
- package/components/{state-BF7jO1DT.js → state-Deh-vKYE.js} +1 -1
- package/components/strategies-Bc3hG-HA.js +195 -0
- package/components/strategies-DGwsR7Xf.cjs +18 -0
- package/components/{streaming-listener-Cm6s-WvF.cjs → streaming-listener-B00MvALi.cjs} +1 -1
- package/components/{streaming-listener-Dxbr_Jiv.js → streaming-listener-CP-JE6Fa.js} +2 -2
- package/components/{style-map-Cp3I-AN3.cjs → style-map-CeilmSgs.cjs} +1 -1
- package/components/{style-map-DqptyE0A.js → style-map-IgqIKvlE.js} +1 -1
- package/components/swatch/index.cjs +2 -2
- package/components/swatch/index.js +11 -11
- package/components/switch/index.cjs +1 -1
- package/components/switch/index.js +4 -4
- package/components/tabs/index.cjs +5 -5
- package/components/tabs/index.js +10 -10
- package/components/tags/index.cjs +1 -1
- package/components/tags/index.js +3 -3
- package/components/text-field/index.cjs +2 -2
- package/components/text-field/index.js +8 -8
- package/components/{text-field-DWC0tpq4.js → text-field-BIADXoLC.js} +11 -11
- package/components/{text-field-CThL0T_y.cjs → text-field-D5d_Gt0t.cjs} +5 -5
- package/components/toast/index.cjs +4 -4
- package/components/toast/index.js +5 -5
- package/components/tooltip/index.cjs +1 -1
- package/components/tooltip/index.js +3 -3
- package/components/unit-input/index.cjs +3 -3
- package/components/unit-input/index.js +4 -4
- package/components/utils.cjs +1 -1
- package/components/utils.js +4 -4
- package/custom-elements.json +1 -1
- package/index.d.ts +2 -1
- package/package.json +11 -6
- package/{components/picker → utils/button-interaction-controllers}/interaction-controller.d.ts +6 -5
- package/{components/picker → utils/button-interaction-controllers}/mobile-controller.d.ts +2 -2
- package/components/base-CTSOJw6c.cjs +0 -40
- package/components/clear-button-BkQsOIoW.cjs +0 -18
- package/components/close-button-7ut4xT4f.js +0 -51
- package/components/directive-helpers-BQRjDUVe.cjs +0 -22
- package/components/index-CbaDCtQl.cjs +0 -113
- package/components/multi-picker/index.cjs +0 -127
- package/components/multi-picker/index.d.ts +0 -7
- package/components/multi-picker/index.js +0 -502
- package/components/picker-D0wr8mRN.js +0 -460
- package/components/picker-PMfW3n8Z.cjs +0 -123
- package/components/strategies-CzfvQU_H.js +0 -192
- package/components/strategies-D_cIzAJE.cjs +0 -18
- /package/{components/picker → utils/button-interaction-controllers}/desktop-controller.d.ts +0 -0
- /package/{components/picker → utils/button-interaction-controllers}/strategies.d.ts +0 -0
|
@@ -0,0 +1,572 @@
|
|
|
1
|
+
/*! * Lucero - The design system for Luzmo.
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2025 Luzmo
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
|
6
|
+
* This license allows users with a current active Luzmo account to use Lucero.
|
|
7
|
+
* This license terminates automatically if a user no longer has an active Luzmo account.
|
|
8
|
+
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
9
|
+
*
|
|
10
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
|
+
* SOFTWARE.
|
|
17
|
+
* */
|
|
18
|
+
import { VIRTUALIZE_AS_OF_NUM_ITEMS as D } from "../options/index.js";
|
|
19
|
+
import { O as f, x as V, T as R, I as N, z as K } from "../luzmo-icons-DbwDQtuO.js";
|
|
20
|
+
import { r as U, E as v, x as n, B as W, n as c } from "../base-WsynuqaS.js";
|
|
21
|
+
import { r as x } from "../state-Deh-vKYE.js";
|
|
22
|
+
import { e as z } from "../query-D_KR_GUc.js";
|
|
23
|
+
import { e as H } from "../class-map-NbVXqBU0.js";
|
|
24
|
+
import { o as y } from "../if-defined-DOaE2coe.js";
|
|
25
|
+
import { M as j, I as G, s as L } from "../strategies-Bc3hG-HA.js";
|
|
26
|
+
import { F as Z } from "../focusable-BxtpnzWp.js";
|
|
27
|
+
import { D as J } from "../dependency-manger-CEXvGQUV.js";
|
|
28
|
+
import { P as Q } from "../pending-state-C5OtdXCm.js";
|
|
29
|
+
import { S as X } from "../sized-mixin-D4ACoVUr.js";
|
|
30
|
+
import "../icon/index.js";
|
|
31
|
+
import "../overlay/index.js";
|
|
32
|
+
import "../popover/index.js";
|
|
33
|
+
import "../progress-circle/index.js";
|
|
34
|
+
import "../tooltip/index.js";
|
|
35
|
+
const A = () => {
|
|
36
|
+
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
37
|
+
const p = document.createElement("style");
|
|
38
|
+
p.setAttribute("data-luzmo-vars", ""), p.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}', document.head.appendChild(p);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
A();
|
|
42
|
+
const Y = ':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-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)))}';
|
|
43
|
+
var ee = Object.defineProperty, s = (p, e, t, a) => {
|
|
44
|
+
for (var r = void 0, o = p.length - 1, i; o >= 0; o--)
|
|
45
|
+
(i = p[o]) && (r = i(e, t, r) || r);
|
|
46
|
+
return r && ee(e, t, r), r;
|
|
47
|
+
};
|
|
48
|
+
const oe = () => n`
|
|
49
|
+
<div class="disclosure-icon icon">
|
|
50
|
+
${f(R, { className: "indicator" })}
|
|
51
|
+
</div>
|
|
52
|
+
`, te = () => n`
|
|
53
|
+
<div class="icon-container validation-icon icon">
|
|
54
|
+
${f(N)}
|
|
55
|
+
</div>
|
|
56
|
+
`, re = () => n`
|
|
57
|
+
<div class="icon-container search-icon icon" id="search-icon">
|
|
58
|
+
${f(K)}
|
|
59
|
+
</div>
|
|
60
|
+
`, M = "select-option-menu", le = 20;
|
|
61
|
+
class l extends X(Z, {
|
|
62
|
+
noDefaultSize: !0
|
|
63
|
+
}) {
|
|
64
|
+
/**
|
|
65
|
+
* Initializes the `PendingStateController` for the Picker component.
|
|
66
|
+
* The `PendingStateController` manages the pending state of the Picker.
|
|
67
|
+
*/
|
|
68
|
+
constructor() {
|
|
69
|
+
super(), this.disabled = !1, this.focused = !1, this.variant = "checkmarks", this.emphasized = !1, this.invalid = !1, this.search = "auto", this.noWrap = !1, this.retrieving = !1, this.pending = !1, this.clearable = !1, this.pendingLabel = "Pending", this.searchLabel = "Search", this.noResultsLabel = "No results", this.noDataLabel = "No data", this.multipleLabelTemplate = "Selected {count} items", this.open = !1, this.readonly = !1, this.placement = "bottom-end", this.quiet = !1, this.value = [], this.options = [], this.selects = "multiple", this.dependencyManager = new J(this), this.isMobile = new j(this, G), this.listRole = "listbox", this.itemRole = "option", this.hasRenderedOverlay = !1, this._selfManageFocusElement = !1, this.selectionPromise = Promise.resolve(), this.enterKeydownOn = null, this._selectedOptions = [], this.handleSlottableRequest = (e) => {
|
|
70
|
+
}, this.renderAngleIcon = () => oe(), this.renderAlertIcon = () => te(), this.handleEnterKeydown = (e) => {
|
|
71
|
+
if (e.code === "Enter") {
|
|
72
|
+
if (this.enterKeydownOn) {
|
|
73
|
+
e.preventDefault();
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
this.enterKeydownOn = e.target, this.addEventListener(
|
|
77
|
+
"keyup",
|
|
78
|
+
(t) => {
|
|
79
|
+
t.code === "Enter" && (this.enterKeydownOn = null);
|
|
80
|
+
},
|
|
81
|
+
{ once: !0 }
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
}, this.clearValue = (e) => {
|
|
85
|
+
e.preventDefault(), e.stopPropagation(), this.value = [], this.strategy && (this.strategy.preventNextToggle = "no"), this.open = !1, this.strategy && (this.strategy.open = !1), this.dispatchEvent(
|
|
86
|
+
new CustomEvent("change", {
|
|
87
|
+
bubbles: !0,
|
|
88
|
+
cancelable: !0,
|
|
89
|
+
composed: !0,
|
|
90
|
+
detail: {
|
|
91
|
+
value: this.value ?? []
|
|
92
|
+
}
|
|
93
|
+
})
|
|
94
|
+
);
|
|
95
|
+
}, this.handleKeydown = (e) => {
|
|
96
|
+
var a, r;
|
|
97
|
+
const { code: t } = e;
|
|
98
|
+
if (["Delete", "Backspace"].includes(t)) {
|
|
99
|
+
this.clearValue(e);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (this.focused = !0, !(!t.startsWith("Arrow") || this.readonly || this.pending)) {
|
|
103
|
+
if (t === "ArrowUp" || t === "ArrowDown") {
|
|
104
|
+
this.toggle(!0), e.preventDefault();
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (e.preventDefault(), this.selects === "single") {
|
|
108
|
+
const o = t === "ArrowRight" ? 1 : -1, i = this.options.findIndex(
|
|
109
|
+
(d) => {
|
|
110
|
+
var b, m, g;
|
|
111
|
+
return ((b = d == null ? void 0 : d.value) == null ? void 0 : b.toString()) === ((g = (m = this.value) == null ? void 0 : m[0]) == null ? void 0 : g.toString());
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
let u = (this.options.length + i + o) % this.options.length, h = this.options.length;
|
|
115
|
+
for (; (r = (a = this.options) == null ? void 0 : a[u]) != null && r.disabled && h; )
|
|
116
|
+
h -= 1, u = (this.options.length + u + o) % this.options.length;
|
|
117
|
+
this.value = [this.options[u].value];
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}, this.pendingStateController = new Q(this);
|
|
121
|
+
}
|
|
122
|
+
static get styles() {
|
|
123
|
+
return [U(Y)];
|
|
124
|
+
}
|
|
125
|
+
get selfManageFocusElement() {
|
|
126
|
+
return this._selfManageFocusElement;
|
|
127
|
+
}
|
|
128
|
+
get focusElement() {
|
|
129
|
+
var e;
|
|
130
|
+
return this.open ? this.search === "on" || this.search === "auto" && ((e = this.options) == null ? void 0 : e.length) > le ? this.searchInput : this.optionsMenu : this.button;
|
|
131
|
+
}
|
|
132
|
+
forceFocusVisible() {
|
|
133
|
+
this.disabled || (this.focused = !0);
|
|
134
|
+
}
|
|
135
|
+
click() {
|
|
136
|
+
this.disabled || this.toggle();
|
|
137
|
+
}
|
|
138
|
+
handleButtonBlur() {
|
|
139
|
+
this.focused = !1;
|
|
140
|
+
}
|
|
141
|
+
focus(e) {
|
|
142
|
+
super.focus(e), !this.disabled && this.focusElement && (this.focused = this.hasVisibleFocusInTree());
|
|
143
|
+
}
|
|
144
|
+
handleHelperFocus() {
|
|
145
|
+
this.focused = !0, this.button.focus();
|
|
146
|
+
}
|
|
147
|
+
handleChange(e) {
|
|
148
|
+
var t;
|
|
149
|
+
this.value = ((t = e == null ? void 0 : e.detail) == null ? void 0 : t.value) ?? [], this.strategy && (this.strategy.preventNextToggle = "no"), e.stopPropagation(), (!e.cancelable || this.selects === "single") && (this.open = !1, this.strategy && (this.strategy.open = !1)), e.preventDefault(), this.dispatchEvent(
|
|
150
|
+
new CustomEvent("change", {
|
|
151
|
+
bubbles: !0,
|
|
152
|
+
cancelable: !0,
|
|
153
|
+
composed: !0,
|
|
154
|
+
detail: {
|
|
155
|
+
value: this.value ?? []
|
|
156
|
+
}
|
|
157
|
+
})
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
handleButtonFocus(e) {
|
|
161
|
+
var t;
|
|
162
|
+
(t = this.strategy) == null || t.handleButtonFocus(e);
|
|
163
|
+
}
|
|
164
|
+
toggle(e) {
|
|
165
|
+
this.readonly || this.pending || (this.open = e === void 0 ? !this.open : e, this.strategy && (this.strategy.open = this.open), this._selfManageFocusElement = this.open);
|
|
166
|
+
}
|
|
167
|
+
close() {
|
|
168
|
+
this.readonly || this.strategy && (this.open = !1, this.strategy.open = !1);
|
|
169
|
+
}
|
|
170
|
+
bindEvents() {
|
|
171
|
+
var e;
|
|
172
|
+
(e = this.strategy) == null || e.abort(), this.strategy = this.isMobile.matches ? new L.mobile(this.button, this) : new L.desktop(this.button, this);
|
|
173
|
+
}
|
|
174
|
+
connectedCallback() {
|
|
175
|
+
super.connectedCallback();
|
|
176
|
+
}
|
|
177
|
+
disconnectedCallback() {
|
|
178
|
+
var e;
|
|
179
|
+
this.close(), (e = this.strategy) == null || e.releaseDescription(), super.disconnectedCallback();
|
|
180
|
+
}
|
|
181
|
+
handleTooltipSlotchange(e) {
|
|
182
|
+
this.tooltipEl = e.target.assignedElements()[0];
|
|
183
|
+
}
|
|
184
|
+
get labelTemplate() {
|
|
185
|
+
var h, d, b, m, g, w, k, $, S, E, I, C, O, _, q;
|
|
186
|
+
console.log(this.icons, "icons");
|
|
187
|
+
const e = ((h = this._selectedOptions) == null ? void 0 : h.length) === 1 && ((d = this._selectedOptions[0]) == null ? void 0 : d.icon), t = n`<div
|
|
188
|
+
id="icon"
|
|
189
|
+
?hidden=${typeof this.icons == "string" || ((b = this.value) == null ? void 0 : b.length) > 1 || !e}
|
|
190
|
+
>
|
|
191
|
+
${e ? f(this._selectedOptions[0].icon) : v}
|
|
192
|
+
</div>`, a = (P) => P.replaceAll(
|
|
193
|
+
/{([^}]+)}/g,
|
|
194
|
+
(T, F) => {
|
|
195
|
+
var B;
|
|
196
|
+
return F === "count" ? String((B = this.value) == null ? void 0 : B.length) : T;
|
|
197
|
+
}
|
|
198
|
+
), r = {
|
|
199
|
+
"visually-hidden": this.icons === "only" && ((m = this.value) == null ? void 0 : m.length) > 0,
|
|
200
|
+
placeholder: !((g = this.value) != null && g.length),
|
|
201
|
+
label: !0
|
|
202
|
+
};
|
|
203
|
+
let o;
|
|
204
|
+
(w = this.value) != null && w.length ? o = this.value.length === 1 ? n`<span
|
|
205
|
+
>${(($ = (k = this._selectedOptions) == null ? void 0 : k[0]) == null ? void 0 : $.shortLabel) ?? ((E = (S = this._selectedOptions) == null ? void 0 : S[0]) == null ? void 0 : E.label) ?? ((I = this.value) == null ? void 0 : I[0])}</span
|
|
206
|
+
>` : n`<span
|
|
207
|
+
>${a(this.multipleLabelTemplate)}</span
|
|
208
|
+
>` : o = n`
|
|
209
|
+
<slot name="label" id="label">
|
|
210
|
+
<span aria-hidden="true"> ${this.label} </span>
|
|
211
|
+
</slot>
|
|
212
|
+
`;
|
|
213
|
+
const i = (C = this.value) != null && C.length ? n`
|
|
214
|
+
<div aria-hidden="true" class="visually-hidden" id="applied-label">
|
|
215
|
+
${this.label}
|
|
216
|
+
<slot name="label"></slot>
|
|
217
|
+
</div>
|
|
218
|
+
` : n` <span hidden id="applied-label">${this.label}</span> `, u = () => n`
|
|
219
|
+
<div class="icon-container clear-icon icon" @click=${this.clearValue}>
|
|
220
|
+
${f(V)}
|
|
221
|
+
</div>
|
|
222
|
+
`;
|
|
223
|
+
return [
|
|
224
|
+
n`
|
|
225
|
+
${((O = this.value) == null ? void 0 : O.length) === 1 ? t : v}
|
|
226
|
+
<div
|
|
227
|
+
id=${y((_ = this.value) != null && _.length ? "label" : void 0)}
|
|
228
|
+
class=${H(r)}
|
|
229
|
+
>
|
|
230
|
+
${o}
|
|
231
|
+
</div>
|
|
232
|
+
${i}
|
|
233
|
+
${this.invalid && !this.pending ? n` ${this.renderAlertIcon()} ` : v}
|
|
234
|
+
${this.pendingStateController.renderPendingState()}
|
|
235
|
+
${this.clearable && !this.readonly && ((q = this.value) == null ? void 0 : q.length) > 0 ? u() : v}
|
|
236
|
+
${this.readonly ? v : this.renderAngleIcon()}
|
|
237
|
+
<slot
|
|
238
|
+
aria-hidden="true"
|
|
239
|
+
name="tooltip"
|
|
240
|
+
id="tooltip"
|
|
241
|
+
@slotchange=${this.handleTooltipSlotchange}
|
|
242
|
+
></slot>
|
|
243
|
+
`
|
|
244
|
+
];
|
|
245
|
+
}
|
|
246
|
+
update(e) {
|
|
247
|
+
e.has("disabled") && this.disabled && this.strategy && (this.open = !1, this.strategy.open = !1), e.has("pending") && this.pending && this.strategy && (this.open = !1, this.strategy.open = !1), e.has("value"), super.update(e);
|
|
248
|
+
}
|
|
249
|
+
bindButtonKeydownListener() {
|
|
250
|
+
this.button.addEventListener("keydown", this.handleKeydown);
|
|
251
|
+
}
|
|
252
|
+
willUpdate(e) {
|
|
253
|
+
var u;
|
|
254
|
+
const t = e.has("open"), a = e.has("value"), r = e.has("options"), o = e.has("selects"), i = e.get("open");
|
|
255
|
+
o && this.selects === "single" && ((u = this.value) == null ? void 0 : u.length) > 1 && (console.warn(
|
|
256
|
+
"luzmo-select is being set to a single value given the selects property changed to 'single'"
|
|
257
|
+
), this.value = this.value.slice(0, 1)), t && i === !1 && this.open && this.searchString && (this.searchString = ""), (a || r) && this.setSelectedOptionsFromValue();
|
|
258
|
+
}
|
|
259
|
+
updated(e) {
|
|
260
|
+
var r;
|
|
261
|
+
super.updated(e);
|
|
262
|
+
const t = e.has("options");
|
|
263
|
+
if (e.has("open") && (this.strategy.open = this.open, this.open === !1 && this.optionsMenu.scrollToTop()), t)
|
|
264
|
+
if (((r = this.options) == null ? void 0 : r.length) > D) {
|
|
265
|
+
const o = this.options.reduce((i, u) => {
|
|
266
|
+
var h, d;
|
|
267
|
+
return (((h = i == null ? void 0 : i.label) == null ? void 0 : h.length) ?? 0) > (((d = u == null ? void 0 : u.label) == null ? void 0 : d.length) ?? 0) ? i : u;
|
|
268
|
+
}, 0);
|
|
269
|
+
this._estimatePopoverWidth(o);
|
|
270
|
+
} else
|
|
271
|
+
this.style.removeProperty("--select-popover-width");
|
|
272
|
+
}
|
|
273
|
+
firstUpdated(e) {
|
|
274
|
+
super.firstUpdated(e), this.bindButtonKeydownListener(), this.bindEvents();
|
|
275
|
+
}
|
|
276
|
+
_getCssVarInPixels(e) {
|
|
277
|
+
const t = getComputedStyle(this), a = t.getPropertyValue(e).trim();
|
|
278
|
+
let r;
|
|
279
|
+
if (a.endsWith("rem")) {
|
|
280
|
+
const o = Number.parseFloat(
|
|
281
|
+
getComputedStyle(document.documentElement).fontSize
|
|
282
|
+
);
|
|
283
|
+
r = Number.parseFloat(a) * o;
|
|
284
|
+
} else if (a.endsWith("em")) {
|
|
285
|
+
const o = Number.parseFloat(t.fontSize);
|
|
286
|
+
r = Number.parseFloat(a) * o;
|
|
287
|
+
} else
|
|
288
|
+
r = Number.parseFloat(a);
|
|
289
|
+
return r >= 0 ? r : void 0;
|
|
290
|
+
}
|
|
291
|
+
_estimatePopoverWidth(e) {
|
|
292
|
+
const t = this._getCssVarInPixels("--luzmo-select-font-size") ?? this._getCssVarInPixels("--select-font-size"), a = this._getCssVarInPixels("--luzmo-select-popover-min-width") ?? this._getCssVarInPixels("--select-popover-min-width"), r = this._getCssVarInPixels("--luzmo-spacing-5"), o = document.createElement("luzmo-options");
|
|
293
|
+
o.style.setProperty("--luzmo-select-font-size", `${t}px`), o.options = [e], o.value = [e], o.variant = this.variant, o.size = this.size, o.style.position = "absolute", o.style.left = "-9999px", o.style.top = "-9999px", o.style.opacity = "0", o.style.width = "auto", document.body.append(o), o.updateComplete.then(() => {
|
|
294
|
+
const i = o.offsetWidth + (r ?? 0);
|
|
295
|
+
return i > (a ?? 0) ? this.style.setProperty("--select-popover-width", `${i}px`) : this.style.removeProperty("--select-popover-width"), o.remove(), i;
|
|
296
|
+
}).catch((i) => {
|
|
297
|
+
console.error(i), o.remove();
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
get dismissHelper() {
|
|
301
|
+
return n`
|
|
302
|
+
<div class="visually-hidden">
|
|
303
|
+
<button
|
|
304
|
+
tabindex="-1"
|
|
305
|
+
aria-label="Dismiss"
|
|
306
|
+
@click=${this.close}
|
|
307
|
+
></button>
|
|
308
|
+
</div>
|
|
309
|
+
`;
|
|
310
|
+
}
|
|
311
|
+
// a helper to throw focus to the button is needed because Safari
|
|
312
|
+
// won't include buttons in the tab order even with tabindex="0"
|
|
313
|
+
render() {
|
|
314
|
+
return this.tooltipEl && (this.tooltipEl.disabled = this.open), n`
|
|
315
|
+
<span
|
|
316
|
+
id="focus-helper"
|
|
317
|
+
tabindex=${this.focused || this.open ? "-1" : "0"}
|
|
318
|
+
@focus=${this.handleHelperFocus}
|
|
319
|
+
aria-describedby=${M}
|
|
320
|
+
></span>
|
|
321
|
+
<button
|
|
322
|
+
aria-controls=${y(this.open ? "menu" : void 0)}
|
|
323
|
+
aria-describedby="tooltip"
|
|
324
|
+
aria-expanded=${this.open ? "true" : "false"}
|
|
325
|
+
aria-haspopup="true"
|
|
326
|
+
aria-labelledby="loader icon label applied-label"
|
|
327
|
+
id="button"
|
|
328
|
+
class=${y(
|
|
329
|
+
this.labelAlignment ? `label-${this.labelAlignment}` : void 0
|
|
330
|
+
)}
|
|
331
|
+
@blur=${this.handleButtonBlur}
|
|
332
|
+
@keydown=${{
|
|
333
|
+
handleEvent: this.handleEnterKeydown,
|
|
334
|
+
capture: !0
|
|
335
|
+
}}
|
|
336
|
+
?disabled=${this.disabled}
|
|
337
|
+
tabindex="-1"
|
|
338
|
+
>
|
|
339
|
+
${this.labelTemplate}
|
|
340
|
+
</button>
|
|
341
|
+
${this.renderMenu} ${this.renderDescriptionSlot}
|
|
342
|
+
`;
|
|
343
|
+
}
|
|
344
|
+
get renderDescriptionSlot() {
|
|
345
|
+
return n`
|
|
346
|
+
<div id=${M}>
|
|
347
|
+
<slot name="description"></slot>
|
|
348
|
+
</div>
|
|
349
|
+
`;
|
|
350
|
+
}
|
|
351
|
+
setSelectedOptionsFromValue() {
|
|
352
|
+
this._selectedOptions = this.options.filter((e) => {
|
|
353
|
+
var a;
|
|
354
|
+
const t = typeof e == "string" ? e : e == null ? void 0 : e.value;
|
|
355
|
+
return (a = this.value) == null ? void 0 : a.includes(t);
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
renderSearchInput() {
|
|
359
|
+
return n`
|
|
360
|
+
<div id="search-container">
|
|
361
|
+
<input
|
|
362
|
+
type="text"
|
|
363
|
+
id="search"
|
|
364
|
+
.placeholder=${this.searchLabel}
|
|
365
|
+
@input=${this.handleSearchInput}
|
|
366
|
+
@change=${this.handleSearchInput}
|
|
367
|
+
@keydown=${this.handleSearchKeydown}
|
|
368
|
+
.value=${this.searchString ?? ""}
|
|
369
|
+
.aria-label=${this.searchLabel}
|
|
370
|
+
autocomplete="off"
|
|
371
|
+
tabindex="0"
|
|
372
|
+
role="searchbox"
|
|
373
|
+
/>
|
|
374
|
+
${re()}
|
|
375
|
+
</div>
|
|
376
|
+
`;
|
|
377
|
+
}
|
|
378
|
+
get renderMenu() {
|
|
379
|
+
const e = this.options.filter((a) => {
|
|
380
|
+
var o, i, u;
|
|
381
|
+
const r = typeof a == "string" ? a : a == null ? void 0 : a.label;
|
|
382
|
+
return (u = (o = r == null ? void 0 : r.toString()) == null ? void 0 : o.toLowerCase()) == null ? void 0 : u.includes(((i = this.searchString) == null ? void 0 : i.toLowerCase()) ?? "");
|
|
383
|
+
}), t = n`
|
|
384
|
+
<luzmo-options
|
|
385
|
+
.variant=${this.variant}
|
|
386
|
+
aria-labelledby="applied-label"
|
|
387
|
+
id="menu"
|
|
388
|
+
?emphasized=${this.emphasized}
|
|
389
|
+
.selects=${this.selects ?? "multiple"}
|
|
390
|
+
.options=${e}
|
|
391
|
+
.value=${this.value}
|
|
392
|
+
?pending=${this.retrieving}
|
|
393
|
+
?no-wrap=${this.noWrap}
|
|
394
|
+
@change=${this.handleChange}
|
|
395
|
+
@keydown=${{
|
|
396
|
+
handleEvent: this.handleEnterKeydown,
|
|
397
|
+
capture: !0
|
|
398
|
+
}}
|
|
399
|
+
@luzmo-exceeded-top=${this.handleExceededTop}
|
|
400
|
+
role=${this.listRole}
|
|
401
|
+
size=${this.size}
|
|
402
|
+
tabindex="0"
|
|
403
|
+
>
|
|
404
|
+
</luzmo-options>
|
|
405
|
+
${e.length === 0 && !this.retrieving && !this.pending ? n`<div id="no-results">
|
|
406
|
+
${this.searchString ? this.noResultsLabel : this.noDataLabel}
|
|
407
|
+
</div>` : v}
|
|
408
|
+
`;
|
|
409
|
+
return this.hasRenderedOverlay = this.hasRenderedOverlay || this.focused || this.open, this.hasRenderedOverlay ? (this.dependencyManager.loaded && this.dependencyManager.add("luzmo-overlay"), this.renderOverlay(t)) : t;
|
|
410
|
+
}
|
|
411
|
+
renderOverlay(e) {
|
|
412
|
+
var a, r, o;
|
|
413
|
+
if (((a = this.strategy) == null ? void 0 : a.overlay) === void 0)
|
|
414
|
+
return e;
|
|
415
|
+
const t = this.renderContainer(e);
|
|
416
|
+
return W(t, (r = this.strategy) == null ? void 0 : r.overlay, {
|
|
417
|
+
host: this
|
|
418
|
+
}), (o = this.strategy) == null ? void 0 : o.overlay;
|
|
419
|
+
}
|
|
420
|
+
renderContainer(e) {
|
|
421
|
+
var r;
|
|
422
|
+
const t = this.search === "on" || this.search === "auto" && ((r = this.options) == null ? void 0 : r.length) > 20 ? this.renderSearchInput() : v, a = n`
|
|
423
|
+
${t} ${this.dismissHelper} ${e} ${this.dismissHelper}
|
|
424
|
+
`;
|
|
425
|
+
return this.dependencyManager.add("luzmo-popover"), n`
|
|
426
|
+
<luzmo-popover
|
|
427
|
+
id="popover"
|
|
428
|
+
size=${this.size}
|
|
429
|
+
role="presentation"
|
|
430
|
+
placement=${this.placement}
|
|
431
|
+
>
|
|
432
|
+
${a}
|
|
433
|
+
</luzmo-popover>
|
|
434
|
+
`;
|
|
435
|
+
}
|
|
436
|
+
async getUpdateComplete() {
|
|
437
|
+
const e = await super.getUpdateComplete();
|
|
438
|
+
return await this.selectionPromise, this.overlayElement && await this.overlayElement.updateComplete, e;
|
|
439
|
+
}
|
|
440
|
+
handleExceededTop(e) {
|
|
441
|
+
e.preventDefault(), e.stopPropagation(), this.searchInput ? this.searchInput.focus() : this.toggle(!1);
|
|
442
|
+
}
|
|
443
|
+
handleSearchInput(e) {
|
|
444
|
+
this.searchString = e.target.value, this.dispatchEvent(
|
|
445
|
+
new CustomEvent("luzmo-search", {
|
|
446
|
+
bubbles: !0,
|
|
447
|
+
composed: !0,
|
|
448
|
+
cancelable: !0,
|
|
449
|
+
detail: {
|
|
450
|
+
string: this.searchString
|
|
451
|
+
}
|
|
452
|
+
})
|
|
453
|
+
);
|
|
454
|
+
}
|
|
455
|
+
handleSearchKeydown(e) {
|
|
456
|
+
if (e.code === "Escape") {
|
|
457
|
+
this.searchString = "";
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
if (e.code === "ArrowDown") {
|
|
461
|
+
this.optionsMenu.focus(), e.preventDefault(), e.stopPropagation();
|
|
462
|
+
return;
|
|
463
|
+
} else if (e.code === "ArrowUp") {
|
|
464
|
+
this.toggle(!1);
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
s([
|
|
470
|
+
z("#button")
|
|
471
|
+
], l.prototype, "button");
|
|
472
|
+
s([
|
|
473
|
+
c({ type: Boolean, reflect: !0 })
|
|
474
|
+
], l.prototype, "disabled");
|
|
475
|
+
s([
|
|
476
|
+
c({ type: Boolean, reflect: !0 })
|
|
477
|
+
], l.prototype, "focused");
|
|
478
|
+
s([
|
|
479
|
+
c({ type: String, reflect: !0 })
|
|
480
|
+
], l.prototype, "icons");
|
|
481
|
+
s([
|
|
482
|
+
c({ type: String, reflect: !0 })
|
|
483
|
+
], l.prototype, "variant");
|
|
484
|
+
s([
|
|
485
|
+
c({ type: Boolean, reflect: !0 })
|
|
486
|
+
], l.prototype, "emphasized");
|
|
487
|
+
s([
|
|
488
|
+
c({ type: Boolean, reflect: !0 })
|
|
489
|
+
], l.prototype, "invalid");
|
|
490
|
+
s([
|
|
491
|
+
c({ type: String, reflect: !0 })
|
|
492
|
+
], l.prototype, "search");
|
|
493
|
+
s([
|
|
494
|
+
c({ type: Boolean, reflect: !0, attribute: "no-wrap" })
|
|
495
|
+
], l.prototype, "noWrap");
|
|
496
|
+
s([
|
|
497
|
+
c({ type: Boolean, reflect: !0 })
|
|
498
|
+
], l.prototype, "retrieving");
|
|
499
|
+
s([
|
|
500
|
+
c({ type: Boolean, reflect: !0 })
|
|
501
|
+
], l.prototype, "pending");
|
|
502
|
+
s([
|
|
503
|
+
c({ type: Boolean, reflect: !0 })
|
|
504
|
+
], l.prototype, "clearable");
|
|
505
|
+
s([
|
|
506
|
+
c({ type: String, attribute: "pending-label" })
|
|
507
|
+
], l.prototype, "pendingLabel");
|
|
508
|
+
s([
|
|
509
|
+
c({ type: String, attribute: "search-label" })
|
|
510
|
+
], l.prototype, "searchLabel");
|
|
511
|
+
s([
|
|
512
|
+
c({ type: String, attribute: "no-results-label" })
|
|
513
|
+
], l.prototype, "noResultsLabel");
|
|
514
|
+
s([
|
|
515
|
+
c({ type: String, attribute: "no-data-label" })
|
|
516
|
+
], l.prototype, "noDataLabel");
|
|
517
|
+
s([
|
|
518
|
+
c({
|
|
519
|
+
type: String,
|
|
520
|
+
attribute: "multiple-label-template",
|
|
521
|
+
reflect: !0
|
|
522
|
+
})
|
|
523
|
+
], l.prototype, "multipleLabelTemplate");
|
|
524
|
+
s([
|
|
525
|
+
c()
|
|
526
|
+
], l.prototype, "label");
|
|
527
|
+
s([
|
|
528
|
+
c({ type: Boolean, reflect: !0 })
|
|
529
|
+
], l.prototype, "open");
|
|
530
|
+
s([
|
|
531
|
+
c({ type: Boolean, reflect: !0 })
|
|
532
|
+
], l.prototype, "readonly");
|
|
533
|
+
s([
|
|
534
|
+
x()
|
|
535
|
+
], l.prototype, "labelAlignment");
|
|
536
|
+
s([
|
|
537
|
+
x()
|
|
538
|
+
], l.prototype, "displayLabelContent");
|
|
539
|
+
s([
|
|
540
|
+
x()
|
|
541
|
+
], l.prototype, "searchString");
|
|
542
|
+
s([
|
|
543
|
+
z("luzmo-options")
|
|
544
|
+
], l.prototype, "optionsMenu");
|
|
545
|
+
s([
|
|
546
|
+
z("#search")
|
|
547
|
+
], l.prototype, "searchInput");
|
|
548
|
+
s([
|
|
549
|
+
z("luzmo-overlay")
|
|
550
|
+
], l.prototype, "overlayElement");
|
|
551
|
+
s([
|
|
552
|
+
z("lit-virtualizer")
|
|
553
|
+
], l.prototype, "virtualizer");
|
|
554
|
+
s([
|
|
555
|
+
c({ type: String, reflect: !0 })
|
|
556
|
+
], l.prototype, "placement");
|
|
557
|
+
s([
|
|
558
|
+
c({ type: Boolean, reflect: !0 })
|
|
559
|
+
], l.prototype, "quiet");
|
|
560
|
+
s([
|
|
561
|
+
c({ type: Array })
|
|
562
|
+
], l.prototype, "value");
|
|
563
|
+
s([
|
|
564
|
+
c({ type: Array })
|
|
565
|
+
], l.prototype, "options");
|
|
566
|
+
s([
|
|
567
|
+
c({ type: String, reflect: !0 })
|
|
568
|
+
], l.prototype, "selects");
|
|
569
|
+
customElements.get("luzmo-select") || customElements.define("luzmo-select", l);
|
|
570
|
+
export {
|
|
571
|
+
l as LuzmoSelect
|
|
572
|
+
};
|