@luzmo/lucero 1.0.1-alpha.2 → 1.0.1-alpha.21
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 +8 -8
- package/components/action-bar/index.cjs +1 -1
- package/components/action-bar/index.js +7 -7
- 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-DJGMcRHb.cjs → action-group-C54IxNZk.cjs} +1 -1
- package/components/{action-group-DBImibFn.js → action-group-C9dsPJg-.js} +2 -2
- package/components/action-menu/index.cjs +1 -1
- package/components/action-menu/index.js +6 -6
- package/components/{async-directive-BfcqVjDp.js → async-directive-BwIAw5tB.js} +1 -1
- package/components/{async-directive-BX1T1e1_.cjs → async-directive-DLz6JB0v.cjs} +1 -1
- package/components/avatar/index.cjs +1 -1
- package/components/avatar/index.js +5 -5
- package/components/{base-WsynuqaS.js → base-CFWO09N1.js} +62 -55
- package/components/{base-CBCg3yyw.cjs → base-Cy0MQrPT.cjs} +6 -6
- package/components/button/button-base.d.ts +16 -0
- package/components/button/button.d.ts +37 -1
- package/components/button/index.cjs +2 -2
- package/components/button/index.js +31 -28
- package/components/{button-base-DbkDzb71.js → button-base-BwbaTInD.js} +53 -38
- package/components/{button-base-XgPLmwP-.cjs → button-base-CC9ZL53k.cjs} +3 -3
- 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-Do7EgtpQ.js → checkbox-mixin-BOTvuPEu.js} +2 -2
- package/components/{checkbox-mixin-BDN0dBtS.cjs → checkbox-mixin-BVPpXtsq.cjs} +1 -1
- package/components/{class-map-NbVXqBU0.js → class-map-CGfNk3Ee.js} +1 -1
- package/components/{class-map-Di1D_rCm.cjs → class-map-D-Y-hsN5.cjs} +1 -1
- package/components/{clear-button-Qi1pMA5S.cjs → clear-button-CHcbu9Bz.cjs} +1 -1
- package/components/{clear-button-DoeRUWQ3.js → clear-button-ahIIuwV-.js} +4 -4
- package/components/{close-button-BWXdHSx3.js → close-button-DFh14y6u.js} +4 -4
- package/components/{close-button-BFMBEw3q.cjs → close-button-DMd52_KV.cjs} +1 -1
- package/components/color-area/index.cjs +1 -1
- package/components/color-area/index.js +5 -5
- package/components/{color-controller-DTp1juRz.js → color-controller-B0uX6Zso.js} +116 -84
- package/components/{color-controller-_ZwyhvaU.cjs → color-controller-CoUL5f9K.cjs} +1 -1
- package/components/color-field/color-field.d.ts +8 -0
- package/components/color-field/index.cjs +4 -4
- package/components/color-field/index.js +36 -24
- 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-CaA_Lfkk.cjs → color-loupe-CrM2DVY3.cjs} +1 -1
- package/components/{color-loupe-CmMsXbjT.js → color-loupe-DmQe3SpP.js} +1 -1
- package/components/color-menu/index.cjs +7 -7
- package/components/color-menu/index.js +44 -44
- package/components/color-palette/color-palette.d.ts +53 -0
- package/components/color-palette/index.cjs +18 -0
- package/components/color-palette/index.d.ts +7 -0
- package/components/color-palette/index.js +88 -0
- package/components/color-palette-group/color-palette-group.d.ts +79 -0
- package/components/color-palette-group/index.cjs +28 -0
- package/components/color-palette-group/index.d.ts +7 -0
- package/components/color-palette-group/index.js +205 -0
- package/components/color-picker/color-picker.d.ts +31 -2
- package/components/color-picker/index.cjs +4 -3
- package/components/color-picker/index.js +16 -12
- package/components/color-slider/index.cjs +1 -1
- package/components/color-slider/index.js +1 -1
- package/components/date-time-picker/index.cjs +3 -3
- package/components/date-time-picker/index.js +11 -11
- package/components/{dependency-manger-CEXvGQUV.js → dependency-manger-CO-VPlqq.js} +4 -4
- package/components/{dependency-manger-C5HCkMMB.cjs → dependency-manger-uthev62E.cjs} +1 -1
- package/components/{directive-helpers-Cm6gitnu.js → directive-helpers-D4KMv2dC.js} +1 -1
- package/components/{directive-helpers-DyIRTWwA.cjs → directive-helpers-t-TVum7J.cjs} +1 -1
- package/components/divider/index.cjs +1 -1
- package/components/divider/index.js +2 -2
- package/components/field-group/index.cjs +1 -1
- package/components/field-group/index.js +1 -1
- package/components/{field-group-DkGst3r5.cjs → field-group-5WQMBOk4.cjs} +1 -1
- package/components/{field-group-DXfBWrkO.js → field-group-D4B0IOdA.js} +2 -2
- package/components/field-label/index.cjs +1 -1
- package/components/field-label/index.js +1 -1
- package/components/{field-label-CZ2zzChK.js → field-label-DxmPiC5p.js} +2 -2
- package/components/{field-label-mO1AkUgR.cjs → field-label-Dz9kisdW.cjs} +1 -1
- package/components/{focus-visible-DBlJGoEW.js → focus-visible-BvScGDCE.js} +20 -20
- package/components/focus-visible-D4BXb5RB.cjs +18 -0
- package/components/{focusable-EbipgXRh.cjs → focusable-B_KwfEec.cjs} +1 -1
- package/components/{focusable-BxtpnzWp.js → focusable-C5JjRZmT.js} +2 -2
- package/components/icon/index.cjs +1 -1
- package/components/icon/index.js +4 -4
- package/components/{if-defined-DOaE2coe.js → if-defined-DULpqYwi.js} +1 -1
- package/components/{if-defined-C9YGdo33.cjs → if-defined-DaXWqfzc.cjs} +1 -1
- package/components/{index-BwxgAdzi.cjs → index-CNK8wHXu.cjs} +1 -1
- package/components/{index-A-yOTB_d.js → index-Cf6G4q52.js} +6 -6
- package/components/{index-HjQa8tew.js → index-D3ICqC7S.js} +6 -6
- package/components/{index-BLWuwZXx.cjs → index-hqVbNKYy.cjs} +3 -3
- package/components/index.cjs +1 -1
- package/components/index.js +141 -137
- 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/{language-resolution-8yZa5r_P.js → language-resolution-B-wjV5bb.js} +9 -8
- package/components/{language-resolution-DJzmyzZq.cjs → language-resolution-EUER43cg.cjs} +1 -1
- package/components/{like-anchor-sod1C1fR.cjs → like-anchor-Bu3pXbjT.cjs} +1 -1
- package/components/{like-anchor-Bvn_vLQ8.js → like-anchor-DCFJN0LV.js} +2 -2
- package/components/{luzmo-icons-DbwDQtuO.js → luzmo-icons-CiSek5iM.js} +25 -25
- package/components/{luzmo-icons-DletXGWU.cjs → luzmo-icons-CtA-TJPd.cjs} +2 -2
- package/components/{manage-help-text-syYnjKGL.js → manage-help-text-CHfMLzSa.js} +2 -2
- package/components/{manage-help-text-DhgARkZX.cjs → manage-help-text-DNqdEkTA.cjs} +1 -1
- package/components/menu/index.cjs +38 -13
- package/components/menu/index.js +132 -98
- package/components/menu/menu-item.d.ts +8 -1
- 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 +8 -8
- package/components/{observe-slot-text-BPfIQQtz.js → observe-slot-text-C3moTjwy.js} +1 -1
- package/components/{observe-slot-text-Ceb7SvYT.cjs → observe-slot-text-D2VAEFSd.cjs} +1 -1
- package/components/options/index.cjs +4 -4
- package/components/options/index.js +22 -22
- package/components/overlay/index.cjs +1 -1
- package/components/overlay/index.js +5 -5
- package/components/overlay-B3ajDLLq.cjs +47 -0
- package/components/{overlay-Cig9r6uU.js → overlay-CUKs69yr.js} +74 -76
- package/components/{pending-state-DTX7ggyF.js → pending-state-B2wWssTo.js} +2 -2
- package/components/{pending-state-CaH1si5b.cjs → pending-state-bJr-nEJl.cjs} +1 -1
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +2 -2
- package/components/{picker-BmoXv1jt.js → picker-BsQJBF9j.js} +38 -37
- package/components/{picker-DWsBWdPN.cjs → picker-X96xmLAw.cjs} +7 -7
- package/components/picker-button/index.cjs +1 -1
- package/components/picker-button/index.js +5 -5
- package/components/popover/index.cjs +1 -1
- package/components/popover/index.js +1 -1
- package/components/{popover-KFfO0IYL.cjs → popover-fwJeZHMQ.cjs} +1 -1
- package/components/{popover-DjX0aAnY.js → popover-iD8f5Jkp.js} +2 -2
- package/components/progress-circle/index.cjs +1 -1
- package/components/progress-circle/index.js +1 -1
- package/components/{progress-circle-BvRJNuNo.cjs → progress-circle-DZxaMe8L.cjs} +1 -1
- package/components/{progress-circle-DXH9z8-6.js → progress-circle-USIIU1up.js} +3 -3
- package/components/radio/index.cjs +1 -1
- package/components/radio/index.js +4 -4
- package/components/search/index.cjs +4 -4
- package/components/search/index.js +4 -4
- package/components/select/index.cjs +15 -15
- package/components/select/index.js +80 -79
- package/components/{sized-mixin-D4ACoVUr.js → sized-mixin-CJbBHWRQ.js} +1 -1
- package/components/{sized-mixin-CPxE5C96.cjs → sized-mixin-WPHH0a_D.cjs} +1 -1
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +2 -2
- package/components/{state-Deh-vKYE.js → state-DwIwYPvt.js} +1 -1
- package/components/{state-D8JEtYqe.cjs → state-vf0PJN3_.cjs} +1 -1
- package/components/{strategies-9indNIEb.js → strategies-Bk97oVn1.js} +15 -50
- package/components/strategies-CNgBb6dM.cjs +18 -0
- package/components/{streaming-listener-CP-JE6Fa.js → streaming-listener-BQ68fKMa.js} +2 -2
- package/components/{streaming-listener-B00MvALi.cjs → streaming-listener-DeGQYM-9.cjs} +1 -1
- package/components/{style-map-IgqIKvlE.js → style-map-Bnhf_mVZ.js} +1 -1
- package/components/{style-map-CeilmSgs.cjs → style-map-DuMd5xlY.cjs} +1 -1
- package/components/swatch/index.cjs +5 -5
- package/components/swatch/index.js +12 -12
- package/components/switch/index.cjs +1 -1
- package/components/switch/index.js +4 -4
- package/components/tabs/index.cjs +3 -3
- package/components/tabs/index.js +9 -9
- package/components/tags/index.cjs +1 -1
- package/components/tags/index.js +4 -4
- package/components/text-field/index.cjs +2 -2
- package/components/text-field/index.js +4 -4
- package/components/{text-field-D5d_Gt0t.cjs → text-field-BkFPYo7S.cjs} +3 -3
- package/components/{text-field-BIADXoLC.js → text-field-C2n3rzCK.js} +9 -9
- package/components/{text-field.module-ColtFhf_.js → text-field.module-C2KVUJcX.js} +1 -1
- package/components/{text-field.module-p_VF2tC_.cjs → text-field.module-DXhFA9G-.cjs} +1 -1
- package/components/toast/index.cjs +3 -3
- package/components/toast/index.js +4 -4
- package/components/tooltip/index.cjs +2 -2
- package/components/tooltip/index.js +55 -32
- package/components/tooltip/tooltip.d.ts +12 -1
- package/components/unit-input/index.cjs +3 -3
- package/components/unit-input/index.js +21 -21
- package/components/utils.cjs +1 -1
- package/components/utils.js +5 -5
- package/custom-elements.json +1 -1
- package/index.d.ts +2 -0
- package/package.json +12 -2
- package/components/focus-visible-B0P9aY_G.cjs +0 -18
- package/components/overlay-KSKMzzkh.cjs +0 -47
- package/components/strategies-BACP6MhR.cjs +0 -18
|
@@ -0,0 +1,205 @@
|
|
|
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 { a as d, r as m, x as p, n as u } from "../base-CFWO09N1.js";
|
|
19
|
+
import { s as h } from "../mutation-controller-DH7YOCyj.js";
|
|
20
|
+
import { e as z } from "../query-D_KR_GUc.js";
|
|
21
|
+
import { o as g } from "../if-defined-DULpqYwi.js";
|
|
22
|
+
import { R as f } from "../roving-tabindex-DOg4z6ZU.js";
|
|
23
|
+
import { S as b } from "../sized-mixin-CJbBHWRQ.js";
|
|
24
|
+
const n = () => {
|
|
25
|
+
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
26
|
+
const s = document.createElement("style");
|
|
27
|
+
s.setAttribute("data-luzmo-vars", ""), s.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(s);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
n();
|
|
31
|
+
const v = ".color-palette-group{column-gap:var(--luzmo-color-palette-group-column-gap, var(--color-palette-group-column-gap));row-gap:var(--luzmo-color-palette-group-row-gap, var(--color-palette-group-row-gap));flex-wrap:wrap;display:flex}::slotted(*){flex-shrink:0}::slotted(:focus-visible){z-index:1}:host{--color-palette-group-column-gap: var(--luzmo-spacing-3);--color-palette-group-row-gap: var(--luzmo-spacing-3)}:host([size=s]){--color-palette-group-column-gap: var(--luzmo-spacing-2);--color-palette-group-row-gap: var(--luzmo-spacing-2)}:host,:host([size=l]),:host([size=xl]){--color-palette-group-column-gap: var(--luzmo-spacing-3);--color-palette-group-row-gap: var(--luzmo-spacing-3)}";
|
|
32
|
+
var x = Object.defineProperty, y = Object.getOwnPropertyDescriptor, i = (s, e, o, l) => {
|
|
33
|
+
for (var r = l > 1 ? void 0 : l ? y(e, o) : e, t = s.length - 1, c; t >= 0; t--)
|
|
34
|
+
(c = s[t]) && (r = (l ? c(e, o, r) : c(r)) || r);
|
|
35
|
+
return l && r && x(e, o, r), r;
|
|
36
|
+
};
|
|
37
|
+
class a extends b(d, {
|
|
38
|
+
validSizes: ["s", "m", "l", "xl"],
|
|
39
|
+
noDefaultSize: !0
|
|
40
|
+
}) {
|
|
41
|
+
constructor() {
|
|
42
|
+
super(), this.disabled = !1, this.horizontal = !1, this._palettes = [], this.rovingTabindexController = new f(
|
|
43
|
+
this,
|
|
44
|
+
{
|
|
45
|
+
focusInIndex: (e) => e.findIndex(
|
|
46
|
+
(o) => this.selected ? !o.disabled && o.value === this.selected : !o.disabled
|
|
47
|
+
),
|
|
48
|
+
elements: () => this.palettes,
|
|
49
|
+
isFocusableElement: (e) => !e.disabled
|
|
50
|
+
}
|
|
51
|
+
), this.label = "", this._onKeyDown = (e) => {
|
|
52
|
+
if (e.code === "Enter" || e.code === "Space") {
|
|
53
|
+
e.preventDefault();
|
|
54
|
+
const o = e.target;
|
|
55
|
+
if (o.value === void 0)
|
|
56
|
+
return;
|
|
57
|
+
this.deselectSelectedPalettes(), o.selected = !0, o.tabIndex = 0, o.setAttribute("aria-checked", "true"), this.setSelected(o.value, !0);
|
|
58
|
+
}
|
|
59
|
+
}, this.manageColorPalettes = () => {
|
|
60
|
+
if (!this.slotElement)
|
|
61
|
+
return;
|
|
62
|
+
const o = this.slotElement.assignedElements({
|
|
63
|
+
flatten: !0
|
|
64
|
+
}).reduce((l, r) => {
|
|
65
|
+
if (r.matches("luzmo-color-palette"))
|
|
66
|
+
l.push(r);
|
|
67
|
+
else {
|
|
68
|
+
const t = [
|
|
69
|
+
...r.querySelectorAll(":scope > luzmo-color-palette")
|
|
70
|
+
];
|
|
71
|
+
l.push(...t);
|
|
72
|
+
}
|
|
73
|
+
return l;
|
|
74
|
+
}, []);
|
|
75
|
+
this.palettes = o, this.manageChildren(), this.manageSelects();
|
|
76
|
+
}, new h(this, {
|
|
77
|
+
config: {
|
|
78
|
+
childList: !0,
|
|
79
|
+
subtree: !0
|
|
80
|
+
},
|
|
81
|
+
callback: () => {
|
|
82
|
+
this.manageColorPalettes();
|
|
83
|
+
},
|
|
84
|
+
skipInitial: !0
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The styles of the color palette
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
static get styles() {
|
|
92
|
+
return [m(v)];
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The color palette elements in the group
|
|
96
|
+
* @internal
|
|
97
|
+
*/
|
|
98
|
+
set palettes(e) {
|
|
99
|
+
e !== this.palettes && (this._palettes = e, this.rovingTabindexController.clearElementCache());
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The color palette elements in the group
|
|
103
|
+
* @internal
|
|
104
|
+
*/
|
|
105
|
+
get palettes() {
|
|
106
|
+
return this._palettes;
|
|
107
|
+
}
|
|
108
|
+
get selected() {
|
|
109
|
+
return this._selected;
|
|
110
|
+
}
|
|
111
|
+
set selected(e) {
|
|
112
|
+
this.requestUpdate("selected", this._selected), this._selected = e, this.updateComplete.then(() => {
|
|
113
|
+
this.applySelects(), this.manageChildren();
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
dispatchChange(e) {
|
|
117
|
+
this.dispatchEvent(
|
|
118
|
+
new Event("change", {
|
|
119
|
+
bubbles: !0,
|
|
120
|
+
composed: !0,
|
|
121
|
+
cancelable: !0
|
|
122
|
+
})
|
|
123
|
+
) || (this.setSelected(e), this.palettes.map((l) => {
|
|
124
|
+
l.selected = !!(l.value && this.selected === l.value);
|
|
125
|
+
}));
|
|
126
|
+
}
|
|
127
|
+
setSelected(e, o) {
|
|
128
|
+
if (e === this.selected)
|
|
129
|
+
return;
|
|
130
|
+
const l = this.selected;
|
|
131
|
+
this.requestUpdate("selected", l), this._selected = e, o && this.dispatchChange(l);
|
|
132
|
+
}
|
|
133
|
+
focus(e) {
|
|
134
|
+
this.rovingTabindexController.focus(e);
|
|
135
|
+
}
|
|
136
|
+
deselectSelectedPalettes() {
|
|
137
|
+
this.palettes.forEach((e) => {
|
|
138
|
+
e.selected && (e.selected = !1, e.tabIndex = -1, e.setAttribute("aria-checked", "false"));
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
_handleClick(e) {
|
|
142
|
+
const o = e.target;
|
|
143
|
+
o.value !== void 0 && (this.deselectSelectedPalettes(), o.selected = !0, o.tabIndex = 0, o.setAttribute("aria-checked", "true"), this.setSelected(o.value, !0));
|
|
144
|
+
}
|
|
145
|
+
async applySelects() {
|
|
146
|
+
await this.manageSelects();
|
|
147
|
+
}
|
|
148
|
+
async manageSelects() {
|
|
149
|
+
if (this.palettes.length === 0)
|
|
150
|
+
return;
|
|
151
|
+
const e = this.palettes;
|
|
152
|
+
this.setAttribute("role", "radiogroup");
|
|
153
|
+
const o = [], l = e.map(async (t) => {
|
|
154
|
+
await t.updateComplete, t.setAttribute("role", "radio"), t.setAttribute("aria-checked", t.selected ? "true" : "false"), t.selected && o.push(t);
|
|
155
|
+
});
|
|
156
|
+
await Promise.all(l);
|
|
157
|
+
const r = o.map((t) => t.value).find(Boolean);
|
|
158
|
+
this.setSelected(r);
|
|
159
|
+
}
|
|
160
|
+
render() {
|
|
161
|
+
return p`
|
|
162
|
+
<div
|
|
163
|
+
class="color-palette-group"
|
|
164
|
+
aria-label=${g(this.label ?? void 0)}
|
|
165
|
+
role="radiogroup"
|
|
166
|
+
@keydown=${this._onKeyDown}
|
|
167
|
+
@slotchange=${this.manageColorPalettes}
|
|
168
|
+
>
|
|
169
|
+
<slot role="presentation"></slot>
|
|
170
|
+
</div>
|
|
171
|
+
`;
|
|
172
|
+
}
|
|
173
|
+
firstUpdated(e) {
|
|
174
|
+
super.firstUpdated(e), this.addEventListener("click", this._handleClick);
|
|
175
|
+
}
|
|
176
|
+
updated(e) {
|
|
177
|
+
super.updated(e), e.has("horizontal") && this.palettes.forEach((l) => {
|
|
178
|
+
l.horizontal = this.horizontal;
|
|
179
|
+
}), this.manageSelects(), this.manageChildren(), e.has("size") && this.manageChildren(e), e.has("label") && (this.label || e.get("label") !== void 0) && (this.label.length > 0 ? this.setAttribute("aria-label", this.label) : this.removeAttribute("aria-label"));
|
|
180
|
+
}
|
|
181
|
+
manageChildren(e) {
|
|
182
|
+
this.palettes.forEach((o) => {
|
|
183
|
+
o.setAttribute("aria-label", `color palette: ${o.value}`), o.selected = !!(o.value && this.selected === o.value), this.size && (this.size !== "m" || (e == null ? void 0 : e.get("size")) !== void 0) && (o.size = this.size), this.disabled && (o.disabled = !0), o.horizontal = this.horizontal;
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
i([
|
|
188
|
+
u({ type: Boolean, reflect: !0 })
|
|
189
|
+
], a.prototype, "disabled", 2);
|
|
190
|
+
i([
|
|
191
|
+
u({ type: Boolean, reflect: !0 })
|
|
192
|
+
], a.prototype, "horizontal", 2);
|
|
193
|
+
i([
|
|
194
|
+
u({ type: String })
|
|
195
|
+
], a.prototype, "label", 2);
|
|
196
|
+
i([
|
|
197
|
+
u({ type: String })
|
|
198
|
+
], a.prototype, "selected", 1);
|
|
199
|
+
i([
|
|
200
|
+
z("slot")
|
|
201
|
+
], a.prototype, "slotElement", 2);
|
|
202
|
+
customElements.get("luzmo-color-palette-group") || customElements.define("luzmo-color-palette-group", a);
|
|
203
|
+
export {
|
|
204
|
+
a as LuzmoColorPaletteGroup
|
|
205
|
+
};
|
|
@@ -3,6 +3,7 @@ import { LuzmoElement } from '../../utils/base';
|
|
|
3
3
|
import { ColorValue } from '../../utils/reactive-controllers/color';
|
|
4
4
|
import '../color-menu';
|
|
5
5
|
import '../overlay';
|
|
6
|
+
import { Placement } from '../overlay/overlay-types';
|
|
6
7
|
import '../popover';
|
|
7
8
|
import '../swatch';
|
|
8
9
|
import { SwatchRounding, SwatchShape } from './../swatch/swatch';
|
|
@@ -17,13 +18,41 @@ declare const LuzmoColorPicker_base: typeof LuzmoElement & {
|
|
|
17
18
|
*/
|
|
18
19
|
export declare class LuzmoColorPicker extends LuzmoColorPicker_base {
|
|
19
20
|
static styles: import("lit").CSSResult;
|
|
21
|
+
/**
|
|
22
|
+
* The color of the color picker.
|
|
23
|
+
*/
|
|
20
24
|
color?: ColorValue;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the color picker is open.
|
|
27
|
+
*/
|
|
21
28
|
open: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Whether the color picker is disabled.
|
|
31
|
+
*/
|
|
22
32
|
disabled: boolean;
|
|
23
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Whether the color picker is read only.
|
|
35
|
+
*/
|
|
36
|
+
readOnly: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* The placement of the color picker.
|
|
39
|
+
*/
|
|
40
|
+
placement: Placement;
|
|
41
|
+
/**
|
|
42
|
+
* The rounding of the color picker.
|
|
43
|
+
*/
|
|
24
44
|
rounding?: SwatchRounding;
|
|
25
|
-
|
|
45
|
+
/**
|
|
46
|
+
* The shape of the color picker.
|
|
47
|
+
*/
|
|
48
|
+
shape?: SwatchShape;
|
|
49
|
+
/**
|
|
50
|
+
* The swatches of the color picker.
|
|
51
|
+
*/
|
|
26
52
|
swatches: string[];
|
|
53
|
+
/**
|
|
54
|
+
* Whether the color picker has an alpha channel.
|
|
55
|
+
*/
|
|
27
56
|
noAlphaChannel: boolean;
|
|
28
57
|
private menuElement;
|
|
29
58
|
private overlayElement;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../base-
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../base-Cy0MQrPT.cjs"),h=require("../state-vf0PJN3_.cjs"),u=require("../query-BL-TJj7K.cjs"),c=require("../sized-mixin-WPHH0a_D.cjs");require("../color-menu/index.cjs");require("../overlay/index.cjs");const d=require("../slottable-request-event-BfUUt1Mh.cjs");require("../popover/index.cjs");require("../swatch/index.cjs");const m="luzmo-popover{margin-left:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap));margin-right:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap))}luzmo-swatch{cursor:pointer}:host([read-only]) luzmo-swatch{cursor:default;pointer-events:none}:host{--luzmo-popover-content-area-spacing-vertical: 0;--color-picker-popover-horizontal-gap: var(--luzmo-spacing-4)}:host([size=s]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-3)}:host([size=l]),:host([size=xl]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-5)}";var y=Object.defineProperty,o=(i,r,a,v)=>{for(var l=void 0,n=i.length-1,p;n>=0;n--)(p=i[n])&&(l=p(r,a,l)||l);return l&&y(r,a,l),l};const s=class s extends c.SizedMixin(t.LuzmoElement){constructor(){super(...arguments),this.color="rgb(255, 0, 0)",this.open=!1,this.disabled=!1,this.readOnly=!1,this.placement="left-start",this.rounding="full",this.swatches=[],this.noAlphaChannel=!1,this._renderMenu=!1}overlayCloseEvent(){this.open=!1}overlayOpenEvent(){this.open=!0}handleColorChange(){const r=this.menuElement.color;this.color=typeof r=="string"?r:String(r),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}firstUpdated(){this.overlayElement.addEventListener("slottable-request",r=>{this._renderMenu=r.data!==d.removeSlottableRequest})}updated(r){r.has("open")&&this.open===!0&&(this._renderMenu=!0)}renderColorMenu(){return t.x`
|
|
19
19
|
<luzmo-color-menu
|
|
20
20
|
.size=${this.size}
|
|
21
21
|
.color=${this.color}
|
|
@@ -32,11 +32,12 @@
|
|
|
32
32
|
.color=${this.color}
|
|
33
33
|
.selected=${this.open&&!this.disabled}
|
|
34
34
|
?disabled=${this.disabled}
|
|
35
|
+
?read-only=${this.readOnly}
|
|
35
36
|
@luzmo-closed=${this.overlayCloseEvent}
|
|
36
37
|
@luzmo-opened=${this.overlayOpenEvent}
|
|
37
38
|
></luzmo-swatch>
|
|
38
39
|
<luzmo-overlay
|
|
39
|
-
trigger=${this.disabled?"":"trigger@click"}
|
|
40
|
+
trigger=${this.disabled||this.readOnly?"":"trigger@click"}
|
|
40
41
|
.placement=${this.placement}
|
|
41
42
|
type="auto"
|
|
42
43
|
>
|
|
@@ -44,4 +45,4 @@
|
|
|
44
45
|
${this._renderMenu?this.renderColorMenu():t.x``}
|
|
45
46
|
</luzmo-popover>
|
|
46
47
|
</luzmo-overlay>
|
|
47
|
-
`}};s.styles=t.r(m);let e=s;o([t.n({type:String,reflect:!0})],e.prototype,"color");o([t.n({type:Boolean,reflect:!0})],e.prototype,"open");o([t.n({type:Boolean,reflect:!0})],e.prototype,"disabled");o([t.n({type:String,reflect:!0})],e.prototype,"placement");o([t.n({type:String,reflect:!0})],e.prototype,"rounding");o([t.n({type:String,reflect:!0})],e.prototype,"shape");o([t.n({type:Array,reflect:!0})],e.prototype,"swatches");o([t.n({type:Boolean,reflect:!0,attribute:"no-alpha-channel"})],e.prototype,"noAlphaChannel");o([u.e("luzmo-color-menu")],e.prototype,"menuElement");o([u.e("luzmo-overlay")],e.prototype,"overlayElement");o([
|
|
48
|
+
`}};s.styles=t.r(m);let e=s;o([t.n({type:String,reflect:!0})],e.prototype,"color");o([t.n({type:Boolean,reflect:!0})],e.prototype,"open");o([t.n({type:Boolean,reflect:!0})],e.prototype,"disabled");o([t.n({type:Boolean,reflect:!0,attribute:"read-only"})],e.prototype,"readOnly");o([t.n({type:String,reflect:!0})],e.prototype,"placement");o([t.n({type:String,reflect:!0})],e.prototype,"rounding");o([t.n({type:String,reflect:!0})],e.prototype,"shape");o([t.n({type:Array,reflect:!0})],e.prototype,"swatches");o([t.n({type:Boolean,reflect:!0,attribute:"no-alpha-channel"})],e.prototype,"noAlphaChannel");o([u.e("luzmo-color-menu")],e.prototype,"menuElement");o([u.e("luzmo-overlay")],e.prototype,"overlayElement");o([h.r()],e.prototype,"_renderMenu");customElements.get("luzmo-color-picker")||customElements.define("luzmo-color-picker",e);exports.LuzmoColorPicker=e;
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { a as z, r as d, x as u, n as l } from "../base-
|
|
19
|
-
import { r as h } from "../state-
|
|
20
|
-
import { e as
|
|
21
|
-
import { S as g } from "../sized-mixin-
|
|
18
|
+
import { a as z, r as d, x as u, n as l } from "../base-CFWO09N1.js";
|
|
19
|
+
import { r as h } from "../state-DwIwYPvt.js";
|
|
20
|
+
import { e as m } from "../query-D_KR_GUc.js";
|
|
21
|
+
import { S as g } from "../sized-mixin-CJbBHWRQ.js";
|
|
22
22
|
import "../color-menu/index.js";
|
|
23
23
|
import "../overlay/index.js";
|
|
24
24
|
import { r as f } from "../slottable-request-event-DggLA4Rx.js";
|
|
@@ -31,15 +31,15 @@ const p = () => {
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
p();
|
|
34
|
-
const b = "luzmo-popover{margin-left:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap));margin-right:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap))}luzmo-swatch{cursor:pointer}:host{--luzmo-popover-content-area-spacing-vertical: 0;--color-picker-popover-horizontal-gap: var(--luzmo-spacing-4)}:host([size=s]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-3)}:host([size=l]),:host([size=xl]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-5)}";
|
|
35
|
-
var v = Object.defineProperty, e = (t, r, s,
|
|
36
|
-
for (var n = void 0, i = t.length - 1,
|
|
37
|
-
(
|
|
34
|
+
const b = "luzmo-popover{margin-left:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap));margin-right:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap))}luzmo-swatch{cursor:pointer}:host([read-only]) luzmo-swatch{cursor:default;pointer-events:none}:host{--luzmo-popover-content-area-spacing-vertical: 0;--color-picker-popover-horizontal-gap: var(--luzmo-spacing-4)}:host([size=s]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-3)}:host([size=l]),:host([size=xl]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-5)}";
|
|
35
|
+
var v = Object.defineProperty, e = (t, r, s, y) => {
|
|
36
|
+
for (var n = void 0, i = t.length - 1, c; i >= 0; i--)
|
|
37
|
+
(c = t[i]) && (n = c(r, s, n) || n);
|
|
38
38
|
return n && v(r, s, n), n;
|
|
39
39
|
};
|
|
40
40
|
const a = class a extends g(z) {
|
|
41
41
|
constructor() {
|
|
42
|
-
super(...arguments), this.color = "rgb(255, 0, 0)", this.open = !1, this.disabled = !1, this.placement = "left-start", this.rounding = "full", this.swatches = [], this.noAlphaChannel = !1, this._renderMenu = !1;
|
|
42
|
+
super(...arguments), this.color = "rgb(255, 0, 0)", this.open = !1, this.disabled = !1, this.readOnly = !1, this.placement = "left-start", this.rounding = "full", this.swatches = [], this.noAlphaChannel = !1, this._renderMenu = !1;
|
|
43
43
|
}
|
|
44
44
|
overlayCloseEvent() {
|
|
45
45
|
this.open = !1;
|
|
@@ -85,11 +85,12 @@ const a = class a extends g(z) {
|
|
|
85
85
|
.color=${this.color}
|
|
86
86
|
.selected=${this.open && !this.disabled}
|
|
87
87
|
?disabled=${this.disabled}
|
|
88
|
+
?read-only=${this.readOnly}
|
|
88
89
|
@luzmo-closed=${this.overlayCloseEvent}
|
|
89
90
|
@luzmo-opened=${this.overlayOpenEvent}
|
|
90
91
|
></luzmo-swatch>
|
|
91
92
|
<luzmo-overlay
|
|
92
|
-
trigger=${this.disabled ? "" : "trigger@click"}
|
|
93
|
+
trigger=${this.disabled || this.readOnly ? "" : "trigger@click"}
|
|
93
94
|
.placement=${this.placement}
|
|
94
95
|
type="auto"
|
|
95
96
|
>
|
|
@@ -111,6 +112,9 @@ e([
|
|
|
111
112
|
e([
|
|
112
113
|
l({ type: Boolean, reflect: !0 })
|
|
113
114
|
], o.prototype, "disabled");
|
|
115
|
+
e([
|
|
116
|
+
l({ type: Boolean, reflect: !0, attribute: "read-only" })
|
|
117
|
+
], o.prototype, "readOnly");
|
|
114
118
|
e([
|
|
115
119
|
l({ type: String, reflect: !0 })
|
|
116
120
|
], o.prototype, "placement");
|
|
@@ -127,10 +131,10 @@ e([
|
|
|
127
131
|
l({ type: Boolean, reflect: !0, attribute: "no-alpha-channel" })
|
|
128
132
|
], o.prototype, "noAlphaChannel");
|
|
129
133
|
e([
|
|
130
|
-
|
|
134
|
+
m("luzmo-color-menu")
|
|
131
135
|
], o.prototype, "menuElement");
|
|
132
136
|
e([
|
|
133
|
-
|
|
137
|
+
m("luzmo-overlay")
|
|
134
138
|
], o.prototype, "overlayElement");
|
|
135
139
|
e([
|
|
136
140
|
h()
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-CNK8wHXu.cjs");exports.LuzmoColorSlider=e.LuzmoColorSlider;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { L as u } from "../index-
|
|
18
|
+
import { L as u } from "../index-D3ICqC7S.js";
|
|
19
19
|
const l = () => {
|
|
20
20
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
21
21
|
const o = document.createElement("style");
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../index-BLWuwZXx.cjs"),R=require("../NumberParser-Dik4a0h-.cjs"),u=require("../base-CBCg3yyw.cjs"),P=require("../state-D8JEtYqe.cjs"),A=require("../query-BL-TJj7K.cjs"),j=require("../class-map-Di1D_rCm.cjs"),S=require("../if-defined-C9YGdo33.cjs"),W=require("../style-map-CeilmSgs.cjs"),L=require("../when-CDZyJPvd.cjs"),G=require("../focusable-EbipgXRh.cjs"),I=require("../sized-mixin-CPxE5C96.cjs"),O=require("../luzmo-icons-DletXGWU.cjs");require("../icon/index.cjs");require("../overlay/index.cjs");require("../picker-button/index.cjs");require("../popover/index.cjs");const K=require("../manage-help-text-DhgARkZX.cjs"),B=require("../NumberFormatter-DewVDY5w.cjs"),X=require("../text-field.module-p_VF2tC_.cjs"),o={Year:"year",Month:"month",Day:"day",Hour:"hour",Minute:"minute",Second:"second",Millisecond:"fractionalSecond",DayPeriod:"dayPeriod",Literal:"literal"},J={[o.Year]:"––––",[o.Month]:"––",[o.Day]:"––",[o.Hour]:"––",[o.Minute]:"––",[o.Second]:"––",[o.Millisecond]:"–––",[o.DayPeriod]:"––"},v={Day:"day",Hour:"hour",Minute:"minute",Second:"second",Millisecond:"millisecond"},V=0,D=12,H=2e3,Q=31;function x(n){return typeof n=="number"}function _(n){return n instanceof c.$35ea8db9cb2ccb90$export$d3b7288e7994edea}function C(n){return n instanceof c.$35ea8db9cb2ccb90$export$ca871e8dbb80966f}function F(n){return n instanceof c.$35ea8db9cb2ccb90$export$99faa760c7908e4f}function N(n,e){return n=n%D+e}function Z(n){return n>=D?D:V}function E(n,e){return n.length===e.length&&n.every((t,i)=>t===e[i])}function U(n){return F(n)?new Date(n.year,n.month-1,n.day):new Date(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond)}class ${constructor(e,t,i){this.type=e,this.formatted=t,this.label=i,this.placeholder=J[e]}increment(e){this.value===void 0?this.value=this.minValue:(this.value=this.value+1,this.value>this.maxValue&&(this.value=this.minValue))}decrement(e){this.value===void 0?this.value=this.maxValue:(this.value=this.value-1,this.value<this.minValue&&(this.value=this.maxValue))}setValueFromDate(e){this.type==="fractionalSecond"?this.value=e.millisecond:this.type!==o.DayPeriod&&(this.value=e[this.type])}clear(){this.value=void 0}handleInput(e,t){const i=t.parse(e);if(Number.isNaN(i))return;const a=t.parse(`${this.value??""}${i}`);if(this.isInputValueCompliant(a)){this.value=a;return}this.isInputValueCompliant(i)&&(this.value=i)}isInputValueCompliant(e){const{minValue:t,maxValue:i}=this.inputValidationLimits;return e>=t&&e<=i}get inputValidationLimits(){return{minValue:this.minValue,maxValue:this.maxValue}}updateValueToLimits(){this.value!==void 0&&(this.value<this.minValue&&(this.value=this.minValue),this.value>this.maxValue&&(this.value=this.maxValue))}}class Y extends ${constructor(e,t){super(o.Year,e,t),this.minValue=1,this.maxValue=9999}setLimits(e){this.minValue=1,this.maxValue=e.calendar.getYearsInEra(e),this.updateValueToLimits()}increment(e){this.value===void 0?this.value=e.year:super.increment()}decrement(e){this.value===void 0?this.value=e.year:super.decrement()}clear(){if(this.value===void 0)return;const e=Math.floor(this.value/10);this.value=e>0?e:void 0}}class M{constructor(e){this.segments=e}get all(){return this.segments}get editableValues(){return this.all.filter(e=>e instanceof $).map(e=>e.value)}get year(){const e=this.getByType(o.Year);if(e&&e instanceof Y)return e}get month(){const e=this.getByType(o.Month);if(e)return e}get day(){const e=this.getByType(o.Day);if(e)return e}get hour(){const e=this.getByType(o.Hour);if(e)return e}get minute(){const e=this.getByType(o.Minute);if(e)return e}get second(){const e=this.getByType(o.Second);if(e)return e}get millisecond(){const e=this.getByType(o.Millisecond);if(e)return e}get dayPeriod(){const e=this.getByType(o.DayPeriod);if(e)return e}getByType(e){return this.segments.find(t=>t.type===e)}getFormattedDate(e=v.Day){var d,g,b,k,f,z,y;const t=(d=this.year)==null?void 0:d.value,i=(g=this.month)==null?void 0:g.value,a=(b=this.day)==null?void 0:b.value;if(!x(t)||!x(i)||!x(a))return;if(e===v.Day)return new c.$35ea8db9cb2ccb90$export$99faa760c7908e4f(t,i,a);let r=(k=this.hour)==null?void 0:k.value;if(!x(r))return;if(this.dayPeriod){const w=this.dayPeriod.value;if(!x(w))return;r=N(r,w)}if(e===v.Hour)return new c.$35ea8db9cb2ccb90$export$ca871e8dbb80966f(t,i,a,r);const s=(f=this.minute)==null?void 0:f.value;if(!x(s))return;if(e===v.Minute)return new c.$35ea8db9cb2ccb90$export$ca871e8dbb80966f(t,i,a,r,s);const l=(z=this.second)==null?void 0:z.value;if(!x(l))return;if(e===v.Second)return new c.$35ea8db9cb2ccb90$export$ca871e8dbb80966f(t,i,a,r,s,l);const h=(y=this.millisecond)==null?void 0:y.value;if(x(h))return new c.$35ea8db9cb2ccb90$export$ca871e8dbb80966f(t,i,a,r,s,l,h)}}class ee{constructor(e,t){this.dateFormatter=e,this.currentDate=t,this.numberFormatter=new B.$488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(this.dateFormatter.resolvedOptions().locale,{useGrouping:!1})}format(e){if(!e.year||!e.month||!e.day)return e;const t=this.getDateInfoWithDefaults(e);return t&&(this.setSegmentsFormatted(e,t),this.padSegmentsFormatted(e)),e}setSegmentsFormatted(e,t){var f;e=new M(e.all);const{year:i,month:a,day:r,hour:s,minute:l,second:h,millisecond:d}=t,g=new Date(i,a-1,r,s,l,h,d);if(!e.year)return;e.year.formatted=this.numberFormatter.format(i);const b=[o.Month,o.Day,o.Hour,o.Minute,o.Second,o.DayPeriod],k=this.dateFormatter.formatToParts(g);for(const z of b){const y=e[z];if(!y)continue;const w=(f=k.find(q=>q.type===z))==null?void 0:f.value;w&&(y.formatted=w)}}padSegmentsFormatted(e){if(!e.hour)return;const t=[o.Month,o.Day,o.Hour,o.Minute,o.Second];for(const i of t){const a=e[i];a&&(a.formatted=a.formatted.padStart(2,this.numberFormatter.format(0)))}}getDateInfoWithDefaults(e){var g,b,k,f,z;if(!e.year||!e.month||!e.day)return;const t=e.day.value??c.$14e0f24ef4ac5c92$export$b2f4953d301981d5(this.currentDate),i=e.month.value??c.$14e0f24ef4ac5c92$export$5412ac11713b72ad(this.currentDate),a=e.year.value??H,r=(g=e.dayPeriod)==null?void 0:g.value;let s=(b=e.hour)==null?void 0:b.value;x(s)?x(r)&&(s=N(s,r)):s=x(r)?r:this.currentDate.hour;const l=((k=e.minute)==null?void 0:k.value)??this.currentDate.minute,h=((f=e.second)==null?void 0:f.value)??this.currentDate.second,d=((z=e.millisecond)==null?void 0:z.value)??this.currentDate.millisecond;return{year:a,month:i,day:t,hour:s,minute:l,second:h,millisecond:d}}}class T{constructor(e){const{dateFormatter:t,segments:i,currentDate:a}=e;this.segments=new M(i.all),this.dateFormatter=t,this.currentDate=a}modify(e){const t=this.segments.getByType(e);if(!t)return this.segments;this.modifySegment(t),this.updateSegmentsLimits(e);const i=new ee(this.dateFormatter,this.currentDate);return this.segments=i.format(this.segments),this.segments}updateSegmentsLimits(e){const t=e===o.Year,i=e===o.Month,a=this.segments.year,r=this.segments.month,s=this.segments.day;t&&(r==null||r.setLimits(this.currentDate),s==null||s.setLimits(this.currentDate,r==null?void 0:r.value,a==null?void 0:a.value)),i&&(s==null||s.setLimits(this.currentDate,r==null?void 0:r.value,a==null?void 0:a.value))}}class te extends T{modifySegment(e){e.clear()}}class ie extends T{modifySegment(e){e.decrement(this.currentDate)}}class ae extends T{modifySegment(e){e.increment(this.currentDate)}}class re extends T{constructor(e){const{dateFormatter:t,segments:i,currentDate:a}=e;super({dateFormatter:t,segments:i,currentDate:a}),this.eventData=e.eventData,this.numberParser=e.numberParser}modifySegment(e){this.eventData!==null&&e.handleInput(this.eventData,this.numberParser)}}class oe extends ${constructor(e,t){super(o.Day,e,t),this.minValue=1,this.maxValue=31}setLimits(e,t,i){if(!x(t)){this.minValue=1,this.maxValue=Q;return}x(i)||(i=H);const a=new c.$35ea8db9cb2ccb90$export$99faa760c7908e4f(i,t,1);this.maxValue=e.calendar.getDaysInMonth(a),this.minValue=c.$14e0f24ef4ac5c92$export$b2f4953d301981d5(a),this.updateValueToLimits()}}class ne extends ${constructor(e,t){super(o.Month,e,t),this.minValue=1,this.maxValue=12}setLimits(e){this.minValue=c.$14e0f24ef4ac5c92$export$5412ac11713b72ad(e),this.maxValue=e.calendar.getMonthsInYear(e),this.updateValueToLimits()}}class se{constructor(e){this.formatted=e,this.type=o.Literal}}class ce extends ${constructor(e,t){super(o.DayPeriod,e,t),this.minValue=V,this.maxValue=D,this.localizedMinValue="AM",this.localizedMaxValue="PM"}toggleAmPm(){this.value=this.value===V?D:V}increment(){this.value===void 0?this.value=this.minValue:this.toggleAmPm()}decrement(){this.value===void 0?this.value=this.maxValue:this.toggleAmPm()}setValueFromDate(e){this.value=Z(e.hour)}handleInput(e){const t=e.toLowerCase(),i=this.localizedMinValue.toLowerCase().includes(t),a=this.localizedMaxValue.toLowerCase().includes(t);i&&a||(i&&(this.value=V),a&&(this.value=D))}setLocalizedLimits(e){const t=new Date(0,0,0,this.minValue,0),i=new Date(0,0,0,this.maxValue,0),[a,r]=[t,i].map(this.getDayPeriodFromDate.bind(this,e));a&&(this.localizedMinValue=a),r&&(this.localizedMaxValue=r)}getDayPeriodFromDate(e,t){var i;return(i=e.formatToParts(t).find(a=>a.type===this.type))==null?void 0:i.value}}class le extends ${constructor(e,t){super(o.Hour,e,t),this.minValue=0,this.maxValue=23}setLimits(e){this.minValue=0,this.maxValue=23,e&&(this.minValue=0,this.maxValue=11),this.updateValueToLimits()}setValueFromDate(e,t){t?this.value=e.hour-Z(e.hour):super.setValueFromDate(e)}get inputValidationLimits(){const e=this.maxValue===11;return{minValue:e?1:0,maxValue:e?12:23}}}class de extends ${constructor(e,t){super(o.Millisecond,e,t),this.minValue=0,this.maxValue=999}}class ue extends ${constructor(e,t){super(o.Minute,e,t),this.minValue=0,this.maxValue=59}}class me extends ${constructor(e,t){super(o.Second,e,t),this.minValue=0,this.maxValue=59}}class he{constructor(e){this.dateFormatter=e;const t=this.dateFormatter.resolvedOptions().locale;this.numberFormatter=new B.$488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(t,{useGrouping:!1}),this.dateTimeFieldDisplayNames=new Intl.DisplayNames([t],{type:"dateTimeField"})}createSegments(e,t=!1){const i=U(e),a=this.dateFormatter.formatToParts(i).map(y=>{const w=y.type;let q=y.value;return w==="year"&&(q=this.numberFormatter.format(e.year)),this.createSegment(w,q)}),r=new M(a),s=r.year,l=r.month,h=r.day;s.setLimits(e),l.setLimits(e),t&&(s.setValueFromDate(e),l.setValueFromDate(e)),h.setLimits(e,l.value,s.value),t&&h.setValueFromDate(e);const d=r.hour,g=r.minute,b=r.second,k=r.millisecond,f=r.dayPeriod;if(f&&f.setLocalizedLimits(this.dateFormatter),!d)return r;const z=!!f;if(d.setLimits(z),t){if(d.setValueFromDate(e,z),z&&r.dayPeriod.setValueFromDate(e),!g||(g.setValueFromDate(e),!b)||(b.setValueFromDate(e),!k))return r;k.setValueFromDate(e)}return r}createSegment(e,t){if(e===o.Literal)return new se(t);const i=this.displayNameOfType(e);switch(e){case o.Year:return new Y(t,i);case o.Month:return new ne(t,i);case o.Day:return new oe(t,i);case o.Hour:return new le(t,i);case o.Minute:return new ue(t,i);case o.Second:return new me(t,i);case o.Millisecond:return new de(t,i);case o.DayPeriod:return new ce(t,i)}}displayNameOfType(e){const t=e==="fractionalSecond"?"millisecond":this.dateTimeFieldDisplayNames.of(e);return t?t.charAt(0).toUpperCase()+t.slice(1):""}}const pe='@charset "UTF-8";:host{font-family:var(--luzmo-font-family);--date-time-picker-border-radius: var( --luzmo-date-time-picker-border-radius, var(--luzmo-border-radius) );--date-time-picker-border-radius-quiet: var( --luzmo-date-time-picker-border-radius-quiet, 0 );--date-time-picker-border-width: var(--luzmo-border-width);--date-time-picker-button-border-color: var( --highcontrast-datepicker-pickerbutton-border-color, var( --luzmo-date-time-picker-pickerbutton-border-color, var(--luzmo-border-color) ) );--date-time-picker-button-border-color-focus: var( --highcontrast-datepicker-pickerbutton-border-color, var( --luzmo-date-time-picker-pickerbutton-border-color-focus, var(--luzmo-primary) ) );--date-time-picker-button-border-color-invalid: var( --highcontrast-datepicker-pickerbutton-border-color, var( --luzmo-date-time-picker-pickerbutton-border-color-invalid, var(--luzmo-negative-color) ) );--date-time-picker-button-width: calc( var(--date-time-picker-edge-to-disclosure-icon) * 2 + var(--date-time-picker-icon-size) );--date-time-picker-quiet-button-offset: var( --luzmo-date-time-picker-quiet-button-offset, var(--date-time-picker-text-to-visual) );--date-time-picker-icon-to-text: var(--date-time-picker-edge-to-text);--date-time-picker-button-width-quiet: calc( var(--date-time-picker-button-width) - var( --date-time-picker-quiet-button-offset ) );--date-time-picker-focus-ring-gap: var( --luzmo-date-time-picker-focus-ring-gap, var(--luzmo-indicator-gap) );--date-time-picker-focus-thickness: var( --luzmo-date-time-picker-focus-thickness, var(--luzmo-indicator-width) );--date-time-picker-focus-animation: var( --luzmo-date-time-picker-focus-animation, var(--luzmo-animation-duration) );--date-time-picker-focus-ring-width: var( --luzmo-date-time-picker-focus-ring-width, var(--luzmo-border-width) );--date-time-picker-focus-ring-color: var( --highcontrast-datepicker-focus-ring-color, var(--luzmo-date-time-picker-focus-ring-color, var(--luzmo-indicator-color)) );--date-time-picker-focus-line-gap: var( --luzmo-date-time-picker-focus-line-gap, var(--luzmo-spacing-2) );--date-time-picker-invalid-quiet-color: var( --luzmo-date-time-picker-invalid-quiet-color, var(--luzmo-negative-color) );--date-time-picker-quiet-border-color-hover: var( --luzmo-date-time-picker-quiet-border-color-hover, var(--luzmo-border-color-hover) );--date-time-picker-border-color-disabled: var( --luzmo-date-time-picker-border-color-disabled, var(--luzmo-border-color-disabled) );--date-time-picker-dash-font-size: var( --luzmo-date-time-picker-dash-font-size, var(--date-time-picker-dash-font-size) );--date-time-picker-dash-color: var( --highcontrast-datepicker-dash-color, var(--luzmo-date-time-picker-dash-color, var(--luzmo-font-color)) );--date-time-picker-range-dash-padding-top: var( --luzmo-date-time-picker-range-dash-padding-top, 0 );--date-time-picker-range-dash-margin-inline-start: var( --luzmo-date-time-picker-range-dash-margin-left, calc(var(--date-time-picker-dash-font-size) * -.5) );--date-time-picker-range-input-width-first: var( --luzmo-date-time-picker-range-input-width-first, calc( var(--date-time-picker-initial-width) - var( --date-time-picker-generic-padding ) * 2 ) );--date-time-picker-input-width-base: calc( var(--date-time-picker-range-input-width-first) + var(--date-time-picker-icon-size) );--date-time-picker-input-width: var( --luzmo-date-time-picker-input-width, calc( var(--date-time-picker-input-width-base) + var(--date-time-picker-initial-height) ) );--date-time-picker-range-input-width-quiet-first: var( --luzmo-date-time-picker-range-input-width-quiet-first, calc( var(--date-time-picker-width-quiet-first) + var(--date-time-picker-width-quiet-second) ) );--date-time-picker-input-width-quiet: var( --luzmo-date-time-picker-input-width-quiet, calc( var(--date-time-picker-range-input-width-quiet-first) + var(--date-time-picker-icon-size) + var(--date-time-picker-initial-height) ) );--date-time-picker-datetime-input-width-first: var( --luzmo-date-time-picker-datetime-input-width-first, calc( var(--date-time-picker-input-width-base) + var(--date-time-picker-datetime-width-first) ) );--date-time-picker-datetime-input-width: var( --luzmo-date-time-picker-datetime-input-width, calc( var(--date-time-picker-datetime-input-width-first) + var(--date-time-picker-icon-size) + var(--date-time-picker-initial-height) ) );--date-time-picker-datetime-quiet-input-width-first: var( --luzmo-date-time-picker-datetime-quiet-input-width-first, calc( var(--date-time-picker-input-width-base) + var(--date-time-picker-input-datetime-width) ) );--date-time-picker-datetime-quiet-input-width: var( --luzmo-date-time-picker-datetime-quiet-input-width, calc( var(--date-time-picker-datetime-quiet-input-width-first) + var(--date-time-picker-icon-size) + var(--date-time-picker-initial-height) ) );--date-time-picker-padding-inline-end: var( --luzmo-date-time-picker-padding-inline, calc( var(--date-time-picker-button-width) + var(--date-time-picker-edge-to-text) - var( --date-time-picker-border-width ) * 2 ) );--date-time-picker-padding-inline-end-quiet: var( --luzmo-date-time-picker-padding-inline-quiet, calc( var(--date-time-picker-button-width) + var(--date-time-picker-edge-to-text) - var( --date-time-picker-quiet-button-offset ) ) );--date-time-picker-padding-inline-end-invalid-quiet: var( --luzmo-date-time-picker-padding-inline-end-invalid-quiet, calc( var(--date-time-picker-button-width-quiet) + var(--date-time-picker-icon-size) + var(--date-time-picker-icon-to-text) ) );min-inline-size:var(--luzmo-date-time-picker-min-width, var(--date-time-picker-min-width));border-radius:var(--date-time-picker-border-radius);flex-flow:row;display:inline-flex;position:relative}:host([disabled]) luzmo-picker-button{cursor:default}:host([disabled]){--luzmo-date-time-picker-dash-color: var( --luzmo-date-time-picker-dash-color-disabled, var(--disabled-content-color) );--luzmo-text-field-border-color-disabled: transparent}:host([invalid]),:host([invalid]) #text-field .icon{--luzmo-text-field-icon-spacing-inline-end-invalid: calc( var(--date-time-picker-button-width) + var(--date-time-picker-invalid-icon-to-button) );--luzmo-text-field-icon-spacing-inline-end-quiet-invalid: calc( var(--date-time-picker-button-width-quiet) + var(--date-time-picker-invalid-icon-to-button-quiet) )}:host(:not([quiet])){inline-size:var(--luzmo-date-time-picker-width, var(--date-time-picker-width))}:host([quiet]){inline-size:var(--luzmo-date-time-picker-width-quiet, var(--date-time-picker-width-quiet, var(--date-time-picker-width)))}:host(:not([quiet],[disabled])){--luzmo-picker-button-border-color: var( --date-time-picker-button-border-color )}:host([focused]),:host([focused]:not([quiet],[disabled])){--luzmo-picker-button-border-color: var( --date-time-picker-button-border-color-focus )}:host([invalid]:not([quiet],[disabled])){--luzmo-picker-button-border-color: var( --date-time-picker-button-border-color-invalid )}.input{inline-size:100%;flex:1;padding-inline-end:var(--date-time-picker-padding-inline-end);border-color:var(--luzmo-date-time-picker-border-color, var(--datepicker-border-color))}:host .input:read-only{border-color:var(--luzmo-date-time-picker-border-color, var(--datepicker-border-color))}.input.luzmo-DatePicker-startField{border-inline-end:0;border-start-end-radius:0;border-end-end-radius:0;padding-inline-end:var(--luzmo-date-time-picker-generic-padding, var(--date-time-picker-generic-padding))}.input.luzmo-DatePicker-endField{border-inline-start:0;border-start-start-radius:0;border-end-start-radius:0;padding-inline-start:var(--luzmo-date-time-picker-generic-padding, var(--date-time-picker-generic-padding))}luzmo-picker-button{cursor:pointer;position:absolute;inset-inline-end:0}.luzmo-DatePicker-rangeDash{color:var(--date-time-picker-dash-color);line-height:var(--luzmo-date-time-picker-dash-line-height, var(--date-time-picker-dash-line-height));flex:initial;inline-size:0;z-index:1;padding-block-start:var(--date-time-picker-range-dash-padding-top)}.luzmo-DatePicker-rangeDash:before{content:"–";margin-block:0;margin-inline:var(--date-time-picker-range-dash-margin-inline-start);text-align:center;vertical-align:middle;inline-size:var(--date-time-picker-dash-font-size);display:inline-block;overflow:hidden}:host([quiet]){--luzmo-date-time-picker-border-radius: var( --date-time-picker-border-radius-quiet );--luzmo-date-time-picker-padding-inline: var( --date-time-picker-padding-inline-end-quiet );--luzmo-picker-button-border-color-disabled: var( --date-time-picker-border-color-disabled );--luzmo-picker-button-background-color-hover-disabled: var( --date-time-picker-border-color-disabled )}:host([quiet][disabled]){--luzmo-text-field-border-color-disabled: var( --date-time-picker-border-color-disabled )}:host([quiet][invalid]) .input:not(.luzmo-DatePicker-startField){padding-inline-end:var(--date-time-picker-padding-inline-end-invalid-quiet)}@media (hover: hover){:host(:hover):not([focused],[disabled],[invalid]){--luzmo-picker-button-border-color: var( --date-time-picker-quiet-border-color-hover )}}:host([quiet][invalid]){--luzmo-picker-button-border-color: var( --date-time-picker-invalid-quiet-color )}:host([quiet]) luzmo-picker-button{inline-size:auto;inset-inline-end:calc(var(--date-time-picker-quiet-button-offset) * -1)}:host([quiet]) luzmo-picker-button:not(.is-open){--luzmo-picker-button-border-color-disabled: transparent}:host([quiet]) luzmo-picker-button:not(:disabled,.is-open){--luzmo-picker-button-background-color: transparent}.luzmo-DatePicker--range{--luzmo-date-time-picker-border-radius: var(--date-time-picker-border-radius)}.luzmo-DatePicker--range:after{pointer-events:none;content:"";margin:calc(var(--date-time-picker-focus-ring-gap) * -1);border-radius:calc(var(--date-time-picker-border-radius) + var(--date-time-picker-focus-ring-gap));transition:box-shadow var(--date-time-picker-focus-animation) ease-in-out,border-color var(--date-time-picker-focus-animation) ease-in-out;border-color:#0000;position:absolute;top:0;right:0;bottom:0;left:0}:host([focused]) .luzmo-DatePicker--range:not(.luzmo-DatePicker--quiet):after{box-shadow:0 0 0 var(--date-time-picker-focus-ring-width) var(--date-time-picker-focus-ring-color)}:host([focused]) .luzmo-DatePicker--range:not(.luzmo-DatePicker--quiet) #text-field:after{display:none}:host([quiet]) .luzmo-DatePicker--range{--luzmo-date-time-picker-border-radius: var( --date-time-picker-border-radius-quiet )}:host([quiet][focused]) .luzmo-DatePicker--range:after{box-shadow:none;border-block-end:var(--date-time-picker-focus-thickness) solid var(--date-time-picker-focus-ring-color);border-radius:0;margin:0;inset-block-end:calc(var(--date-time-picker-focus-line-gap) * -1)}:host([quiet]) .luzmo-DatePicker--range #text-field{min-inline-size:0;inline-size:var(--date-time-picker-input-width-quiet)}:host([quiet]) .luzmo-DatePicker--range #text-field:first-of-type{inline-size:var(--date-time-picker-range-input-width-quiet-first)}.luzmo-DatePicker--range.luzmo-DatePicker--datetimeRange #text-field{inline-size:var(--date-time-picker-datetime-input-width);min-inline-size:0}.luzmo-DatePicker--range.luzmo-DatePicker--datetimeRange #text-field:first-of-type{inline-size:var(--date-time-picker-datetime-input-width-first)}:host([quiet]) .luzmo-DatePicker--range.luzmo-DatePicker--datetimeRange #text-field{inline-size:var(--date-time-picker-datetime-quiet-input-width)}:host([quiet]) .luzmo-DatePicker--range.luzmo-DatePicker--datetimeRange #text-field:first-of-type{inline-size:var(--date-time-picker-datetime-quiet-input-width-first)}.luzmo-DatePicker--range #text-field{flex:initial;min-inline-size:0;inline-size:var(--date-time-picker-input-width)}.luzmo-DatePicker--range #text-field:first-of-type{inline-size:var(--date-time-picker-range-input-width-first)}@media (forced-colors: active){:host{--highcontrast-datepicker-dash-color: CanvasText;--highcontrast-datepicker-focus-ring-color: Highlight;--highcontrast-datepicker-pickerbutton-border-color: Highlight}:host([disabled]){--highcontrast-datepicker-dash-color: GrayText}:host([quiet][invalid]){--highcontrast-datepicker-pickerbutton-border-color: Highlight}}:host{--date-time-picker-width: auto;--date-time-picker-initial-height: var(--system-date-picker-initial-height);--date-time-picker-font-color-default: var(--luzmo-font-color);--datepicker-border-color: var(--luzmo-border-color);--date-time-picker-button-indicator-color: var(--luzmo-indicator-color);--text-field-focus-indicator-color: var(--luzmo-background-color-highlight);--date-time-picker-initial-width: 120px;--date-time-picker-min-width: 160px;--date-time-picker-calendar-padding: var(--luzmo-spacing-4);--date-time-picker-icon-size: 18px;--date-time-picker-dash-font-size: var(--luzmo-font-size);--date-time-picker-text-to-visual: var(--luzmo-spacing-3);--date-time-picker-edge-to-disclosure-icon: var(--luzmo-spacing-3);--date-time-picker-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-icon-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-invalid-icon-to-button: var(--luzmo-spacing-3);--date-time-picker-generic-padding: var(--luzmo-spacing-4)}:host([size=s]){--date-time-picker-min-width: 140px;--date-time-picker-calendar-padding: var(--luzmo-spacing-3);--date-time-picker-icon-size: 16px;--date-time-picker-dash-font-size: var(--luzmo-font-size-s);--date-time-picker-text-to-visual: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--date-time-picker-edge-to-disclosure-icon: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--date-time-picker-edge-to-text: var(--luzmo-spacing-3);--date-time-picker-invalid-icon-to-button: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--date-time-picker-icon-to-text: var(--luzmo-spacing-3)}:host([invalid][size=s]){--text-field-icon-spacing-block-invalid: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) )}:host([size=m]){--date-time-picker-min-width: 160px;--date-time-picker-calendar-padding: var(--luzmo-spacing-4);--date-time-picker-icon-size: 18px;--date-time-picker-dash-font-size: var(--luzmo-font-size-m);--date-time-picker-text-to-visual: var(--luzmo-spacing-3);--date-time-picker-edge-to-disclosure-icon: var(--luzmo-spacing-3);--date-time-picker-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-invalid-icon-to-button: var(--luzmo-spacing-3);--date-time-picker-icon-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) )}:host([size=l]){--date-time-picker-min-width: 180px;--date-time-picker-calendar-padding: var(--luzmo-spacing-5);--date-time-picker-icon-size: 20px;--date-time-picker-dash-font-size: var(--luzmo-font-size-l);--date-time-picker-text-to-visual: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-edge-to-disclosure-icon: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-edge-to-text: var(--luzmo-spacing-4);--date-time-picker-invalid-icon-to-button: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-icon-to-text: var(--luzmo-spacing-4)}:host([size=xl]){--date-time-picker-min-width: 200px;--date-time-picker-calendar-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--date-time-picker-icon-size: 22px;--date-time-picker-dash-font-size: var(--luzmo-font-size-xl);--date-time-picker-text-to-visual: var(--luzmo-spacing-4);--date-time-picker-edge-to-disclosure-icon: var(--luzmo-spacing-4);--date-time-picker-edge-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--date-time-picker-invalid-icon-to-button: var(--luzmo-spacing-4);--date-time-picker-icon-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) )}:host{--status-icon-size: var( --luzmo-text-field-icon-size-invalid, var(--text-field-icon-size-invalid) );--picker-button-size: var( --luzmo-text-field-height, var(--text-field-height) );--input-spacing: var( --luzmo-text-field-spacing-inline, var(--text-field-spacing-inline) );--input-border-width: var( --luzmo-text-field-border-width, var(--luzmo-border-width) );--text-to-icon: var( --luzmo-text-field-icon-spacing-inline-start-invalid, var(--text-field-icon-spacing-inline-start-invalid) );--date-time-picker-input-width: var(--date-time-picker-width);flex-wrap:wrap}:host #text-field{display:inline-block}:host #text-field .input,:host([quiet]) #text-field .input,:host([valid]) #text-field .input,:host([invalid]) #text-field .input{inline-size:100%}:host #text-field .input,:host([quiet]) #text-field .input{padding-inline-end:calc(var(--picker-button-size) + var(--input-spacing) - var(--input-border-width))}:host([valid]) #text-field .input,:host([invalid]) #text-field .input{inline-size:100%;padding-inline-end:calc(var(--status-icon-size) + var(--picker-button-size) + var(--input-spacing) - var(--input-border-width) + var(--text-to-icon))}@media (hover: hover){:host([invalid]) #text-field:hover .input,:host([focused][invalid]) .input:hover,:host([focused][invalid]) #text-field:hover .input{border-color:var(--highcontrast-text-field-border-color-invalid-default, var(--luzmo-text-field-border-color-invalid-default, var(--luzmo-negative-color-hover)))}}luzmo-picker-button:focus-visible{outline:none}luzmo-popover{overflow-y:auto}luzmo-popover .popover-content{padding:var(--luzmo-date-time-picker-calendar-padding, var(--date-time-picker-calendar-padding))}.input-content{display:flex;align-items:center;height:100%;overflow:auto hidden;scrollbar-width:none;line-height:normal}.input-content::-webkit-scrollbar{display:none;width:0;height:0}.literal-segment,.editable-segment{display:inline-block;color:var(--luzmo-date-time-picker-font-color-default, var(--date-time-picker-font-color-default))}.editable-segment{padding:0 .15em;font-variant-numeric:tabular-nums;text-align:end;white-space:nowrap;caret-color:transparent;outline:none}[dir=ltr] .editable-segment{text-align:start}.literal-segment{white-space:pre;user-select:none;-webkit-user-select:none}.is-placeholder,.is-placeholder+.literal-segment{color:var(--luzmo-font-color-disabled)}.editable-segment:focus-visible{color:var(--white);background-color:var(--highcontrast-text-field-focus-indicator-color, var(--luzmo-text-field-focus-indicator-color, var(--text-field-focus-indicator-color)))}.editable-segment::selection{background-color:transparent}';var fe=Object.defineProperty,ve=Object.getOwnPropertyDescriptor,p=(n,e,t,i)=>{for(var a=i>1?void 0:i?ve(e,t):e,r=n.length-1,s;r>=0;r--)(s=n[r])&&(a=(i?s(e,t,a):s(a))||a);return i&&a&&fe(e,t,a),a};class m extends K.ManageHelpText(I.SizedMixin(G.Focusable,{validSizes:Object.values(I.ElementSizes)})){constructor(){super(),this._precision=v.Minute,this.isUserSetPrecision=!1,this.invalid=!1,this.readonly=!1,this.quiet=!1,this.placement="bottom",this.language="en",this.labels={previous:"Previous",next:"Next",today:"Today",selected:"Selected",empty:"Empty",calendar:"Calendar"},this.focused=!1,this.segments=new M([]),this.isCalendarOpen=!1,this._timeZone=this.timeZone??c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2(),this.cachedLocalTime=c.$14e0f24ef4ac5c92$export$461939dd4422153(this._timeZone),this.setNumberParser(),this.setDateFormatter(),this.setAriaDateFormatter(),this.addEventListener("focusin",()=>this.previousCommitedValue=this._value),this.addEventListener("focusout",()=>this.commitValue())}static get styles(){return[u.r(pe),u.r(X.textFieldStyles)]}get precision(){return this._precision}set precision(e){this.isUserSetPrecision=!0;const t=this._precision;e!==t&&(this._precision=e,this.requestUpdate("precision",t))}get _language(){try{return this.language?new Intl.Locale(this.language).language:"en"}catch{return"en"}}get focusElement(){return this.firstEditableSegment}get currentDate(){return this._value?c.$11d87f3f76e88657$export$84c95a83c799e074(this._value,this._timeZone):this.cachedLocalTime}get includesTime(){return[v.Hour,v.Minute,v.Second,v.Millisecond].includes(this.precision)}clear(){this._value=void 0,this.setSegments()}willUpdate(e){const t=e.has("value"),i=e.has("timeZone"),a=e.has("min"),r=e.has("max"),s=e.has("language"),l=e.has("dateFormat"),h=e.has("dateSeparator"),d=e.has("precision"),g=e.has("segments"),b=e.has("disabled");if(s&&this.setNumberParser(),(s||d)&&(this.setDateFormatter(),this.setAriaDateFormatter()),t||a||r||i){this._value=this.value?c.$fae977aafc393c5c$export$5adfdab05168c219(new Date(this.value).toISOString(),"UTC"):void 0,this._min=this.min?c.$fae977aafc393c5c$export$5adfdab05168c219(new Date(this.min).toISOString(),"UTC"):void 0,this._max=this.max?c.$fae977aafc393c5c$export$5adfdab05168c219(new Date(this.max).toISOString(),"UTC"):void 0;const f=this.mostSpecificDateValue;f&&(this.convertDatePropsToMatch(f),this.checkDatePropsCompliance(a||r),this.updateDateProps(),this.updateDefaultPrecision())}(t||s||d||l||i||h)&&this.setSegments(),g&&this.setValueFromSegments(),b&&this.isCalendarOpen&&(this.isCalendarOpen=!1);const k=this._value&&this.labels.selected+": "+this.ariaDateFormatter.format(U(this._value));this.setAttribute("aria-label",k??this.labels.empty)}get mostSpecificDateValue(){const e=[this._value,this._min,this._max].filter(r=>r!==void 0);if(e.length===0)return;const t=e.filter(r=>_(r));if(t.length>0)return t[0];const i=e.filter(r=>C(r));return i.length>0?i[0]:e.find(r=>F(r))}convertDatePropsToMatch(e){if(_(e)){this._timeZone=this.timeZone??e.timeZone,this._value=this._value&&c.$11d87f3f76e88657$export$84c95a83c799e074(this._value,this._timeZone),this._min=this._min&&c.$11d87f3f76e88657$export$84c95a83c799e074(this._min,this._timeZone),this._max=this._max&&c.$11d87f3f76e88657$export$84c95a83c799e074(this._max,this._timeZone);return}if(this._timeZone=this.timeZone??c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2(),C(e)){this._value=this._value&&c.$11d87f3f76e88657$export$b21e0b124e224484(this._value),this._min=this._min&&c.$11d87f3f76e88657$export$b21e0b124e224484(this._min),this._max=this._max&&c.$11d87f3f76e88657$export$b21e0b124e224484(this._max);return}this._value=this._value&&c.$11d87f3f76e88657$export$93522d1a439f3617(this._value),this._min=this._min&&c.$11d87f3f76e88657$export$93522d1a439f3617(this._min),this._max=this._max&&c.$11d87f3f76e88657$export$93522d1a439f3617(this._max)}checkDatePropsCompliance(e){e&&this._min&&this._max&&(this._min.compare(this._max)<0||(console.warn(this,`<${this.localName}> expects the 'min' to be less than 'max'. Please ensure that 'min' property's date is earlier than 'max' property's date.`),this._min=void 0,this._max=void 0)),this.isNonCompliantValue()&&(console.warn(this,`<${this.localName}> expects the preselected value to comply with the min and max constraints. Please ensure that 'value' property's date is in between the dates for the 'min' and 'max' properties.`),this._value=void 0),!this._min&&!this._max&&!this._value&&(this._timeZone=c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())}isNonCompliantValue(){return this._value===void 0?!1:!!(this._min&&this._value.compare(this._min)<0||this._max&&this._value.compare(this._max)>0)}updateDateProps(){const e=this.mostSpecificDateValue;if(!e||!this.isUserSetPrecision)return;this.includesTime&&F(e)&&this.convertDatePropsToMatch(c.$11d87f3f76e88657$export$b21e0b124e224484(e))}updateDefaultPrecision(){if(this.isUserSetPrecision)return;const e=this.mostSpecificDateValue;e&&(this._precision=F(e)?v.Day:v.Minute)}render(){return u.x`
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../index-hqVbNKYy.cjs"),R=require("../NumberParser-Dik4a0h-.cjs"),u=require("../base-Cy0MQrPT.cjs"),P=require("../state-vf0PJN3_.cjs"),A=require("../query-BL-TJj7K.cjs"),j=require("../class-map-D-Y-hsN5.cjs"),S=require("../if-defined-DaXWqfzc.cjs"),W=require("../style-map-DuMd5xlY.cjs"),L=require("../when-CDZyJPvd.cjs"),G=require("../focusable-B_KwfEec.cjs"),I=require("../sized-mixin-WPHH0a_D.cjs"),O=require("../luzmo-icons-CtA-TJPd.cjs");require("../icon/index.cjs");require("../overlay/index.cjs");require("../picker-button/index.cjs");require("../popover/index.cjs");const K=require("../manage-help-text-DNqdEkTA.cjs"),B=require("../NumberFormatter-DewVDY5w.cjs"),X=require("../text-field.module-DXhFA9G-.cjs"),o={Year:"year",Month:"month",Day:"day",Hour:"hour",Minute:"minute",Second:"second",Millisecond:"fractionalSecond",DayPeriod:"dayPeriod",Literal:"literal"},J={[o.Year]:"––––",[o.Month]:"––",[o.Day]:"––",[o.Hour]:"––",[o.Minute]:"––",[o.Second]:"––",[o.Millisecond]:"–––",[o.DayPeriod]:"––"},v={Day:"day",Hour:"hour",Minute:"minute",Second:"second",Millisecond:"millisecond"},V=0,D=12,H=2e3,Q=31;function x(n){return typeof n=="number"}function _(n){return n instanceof c.$35ea8db9cb2ccb90$export$d3b7288e7994edea}function C(n){return n instanceof c.$35ea8db9cb2ccb90$export$ca871e8dbb80966f}function F(n){return n instanceof c.$35ea8db9cb2ccb90$export$99faa760c7908e4f}function N(n,e){return n=n%D+e}function Z(n){return n>=D?D:V}function E(n,e){return n.length===e.length&&n.every((t,i)=>t===e[i])}function U(n){return F(n)?new Date(n.year,n.month-1,n.day):new Date(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond)}class ${constructor(e,t,i){this.type=e,this.formatted=t,this.label=i,this.placeholder=J[e]}increment(e){this.value===void 0?this.value=this.minValue:(this.value=this.value+1,this.value>this.maxValue&&(this.value=this.minValue))}decrement(e){this.value===void 0?this.value=this.maxValue:(this.value=this.value-1,this.value<this.minValue&&(this.value=this.maxValue))}setValueFromDate(e){this.type==="fractionalSecond"?this.value=e.millisecond:this.type!==o.DayPeriod&&(this.value=e[this.type])}clear(){this.value=void 0}handleInput(e,t){const i=t.parse(e);if(Number.isNaN(i))return;const a=t.parse(`${this.value??""}${i}`);if(this.isInputValueCompliant(a)){this.value=a;return}this.isInputValueCompliant(i)&&(this.value=i)}isInputValueCompliant(e){const{minValue:t,maxValue:i}=this.inputValidationLimits;return e>=t&&e<=i}get inputValidationLimits(){return{minValue:this.minValue,maxValue:this.maxValue}}updateValueToLimits(){this.value!==void 0&&(this.value<this.minValue&&(this.value=this.minValue),this.value>this.maxValue&&(this.value=this.maxValue))}}class Y extends ${constructor(e,t){super(o.Year,e,t),this.minValue=1,this.maxValue=9999}setLimits(e){this.minValue=1,this.maxValue=e.calendar.getYearsInEra(e),this.updateValueToLimits()}increment(e){this.value===void 0?this.value=e.year:super.increment()}decrement(e){this.value===void 0?this.value=e.year:super.decrement()}clear(){if(this.value===void 0)return;const e=Math.floor(this.value/10);this.value=e>0?e:void 0}}class M{constructor(e){this.segments=e}get all(){return this.segments}get editableValues(){return this.all.filter(e=>e instanceof $).map(e=>e.value)}get year(){const e=this.getByType(o.Year);if(e&&e instanceof Y)return e}get month(){const e=this.getByType(o.Month);if(e)return e}get day(){const e=this.getByType(o.Day);if(e)return e}get hour(){const e=this.getByType(o.Hour);if(e)return e}get minute(){const e=this.getByType(o.Minute);if(e)return e}get second(){const e=this.getByType(o.Second);if(e)return e}get millisecond(){const e=this.getByType(o.Millisecond);if(e)return e}get dayPeriod(){const e=this.getByType(o.DayPeriod);if(e)return e}getByType(e){return this.segments.find(t=>t.type===e)}getFormattedDate(e=v.Day){var d,g,b,k,f,z,y;const t=(d=this.year)==null?void 0:d.value,i=(g=this.month)==null?void 0:g.value,a=(b=this.day)==null?void 0:b.value;if(!x(t)||!x(i)||!x(a))return;if(e===v.Day)return new c.$35ea8db9cb2ccb90$export$99faa760c7908e4f(t,i,a);let r=(k=this.hour)==null?void 0:k.value;if(!x(r))return;if(this.dayPeriod){const w=this.dayPeriod.value;if(!x(w))return;r=N(r,w)}if(e===v.Hour)return new c.$35ea8db9cb2ccb90$export$ca871e8dbb80966f(t,i,a,r);const s=(f=this.minute)==null?void 0:f.value;if(!x(s))return;if(e===v.Minute)return new c.$35ea8db9cb2ccb90$export$ca871e8dbb80966f(t,i,a,r,s);const l=(z=this.second)==null?void 0:z.value;if(!x(l))return;if(e===v.Second)return new c.$35ea8db9cb2ccb90$export$ca871e8dbb80966f(t,i,a,r,s,l);const h=(y=this.millisecond)==null?void 0:y.value;if(x(h))return new c.$35ea8db9cb2ccb90$export$ca871e8dbb80966f(t,i,a,r,s,l,h)}}class ee{constructor(e,t){this.dateFormatter=e,this.currentDate=t,this.numberFormatter=new B.$488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(this.dateFormatter.resolvedOptions().locale,{useGrouping:!1})}format(e){if(!e.year||!e.month||!e.day)return e;const t=this.getDateInfoWithDefaults(e);return t&&(this.setSegmentsFormatted(e,t),this.padSegmentsFormatted(e)),e}setSegmentsFormatted(e,t){var f;e=new M(e.all);const{year:i,month:a,day:r,hour:s,minute:l,second:h,millisecond:d}=t,g=new Date(i,a-1,r,s,l,h,d);if(!e.year)return;e.year.formatted=this.numberFormatter.format(i);const b=[o.Month,o.Day,o.Hour,o.Minute,o.Second,o.DayPeriod],k=this.dateFormatter.formatToParts(g);for(const z of b){const y=e[z];if(!y)continue;const w=(f=k.find(q=>q.type===z))==null?void 0:f.value;w&&(y.formatted=w)}}padSegmentsFormatted(e){if(!e.hour)return;const t=[o.Month,o.Day,o.Hour,o.Minute,o.Second];for(const i of t){const a=e[i];a&&(a.formatted=a.formatted.padStart(2,this.numberFormatter.format(0)))}}getDateInfoWithDefaults(e){var g,b,k,f,z;if(!e.year||!e.month||!e.day)return;const t=e.day.value??c.$14e0f24ef4ac5c92$export$b2f4953d301981d5(this.currentDate),i=e.month.value??c.$14e0f24ef4ac5c92$export$5412ac11713b72ad(this.currentDate),a=e.year.value??H,r=(g=e.dayPeriod)==null?void 0:g.value;let s=(b=e.hour)==null?void 0:b.value;x(s)?x(r)&&(s=N(s,r)):s=x(r)?r:this.currentDate.hour;const l=((k=e.minute)==null?void 0:k.value)??this.currentDate.minute,h=((f=e.second)==null?void 0:f.value)??this.currentDate.second,d=((z=e.millisecond)==null?void 0:z.value)??this.currentDate.millisecond;return{year:a,month:i,day:t,hour:s,minute:l,second:h,millisecond:d}}}class T{constructor(e){const{dateFormatter:t,segments:i,currentDate:a}=e;this.segments=new M(i.all),this.dateFormatter=t,this.currentDate=a}modify(e){const t=this.segments.getByType(e);if(!t)return this.segments;this.modifySegment(t),this.updateSegmentsLimits(e);const i=new ee(this.dateFormatter,this.currentDate);return this.segments=i.format(this.segments),this.segments}updateSegmentsLimits(e){const t=e===o.Year,i=e===o.Month,a=this.segments.year,r=this.segments.month,s=this.segments.day;t&&(r==null||r.setLimits(this.currentDate),s==null||s.setLimits(this.currentDate,r==null?void 0:r.value,a==null?void 0:a.value)),i&&(s==null||s.setLimits(this.currentDate,r==null?void 0:r.value,a==null?void 0:a.value))}}class te extends T{modifySegment(e){e.clear()}}class ie extends T{modifySegment(e){e.decrement(this.currentDate)}}class ae extends T{modifySegment(e){e.increment(this.currentDate)}}class re extends T{constructor(e){const{dateFormatter:t,segments:i,currentDate:a}=e;super({dateFormatter:t,segments:i,currentDate:a}),this.eventData=e.eventData,this.numberParser=e.numberParser}modifySegment(e){this.eventData!==null&&e.handleInput(this.eventData,this.numberParser)}}class oe extends ${constructor(e,t){super(o.Day,e,t),this.minValue=1,this.maxValue=31}setLimits(e,t,i){if(!x(t)){this.minValue=1,this.maxValue=Q;return}x(i)||(i=H);const a=new c.$35ea8db9cb2ccb90$export$99faa760c7908e4f(i,t,1);this.maxValue=e.calendar.getDaysInMonth(a),this.minValue=c.$14e0f24ef4ac5c92$export$b2f4953d301981d5(a),this.updateValueToLimits()}}class ne extends ${constructor(e,t){super(o.Month,e,t),this.minValue=1,this.maxValue=12}setLimits(e){this.minValue=c.$14e0f24ef4ac5c92$export$5412ac11713b72ad(e),this.maxValue=e.calendar.getMonthsInYear(e),this.updateValueToLimits()}}class se{constructor(e){this.formatted=e,this.type=o.Literal}}class ce extends ${constructor(e,t){super(o.DayPeriod,e,t),this.minValue=V,this.maxValue=D,this.localizedMinValue="AM",this.localizedMaxValue="PM"}toggleAmPm(){this.value=this.value===V?D:V}increment(){this.value===void 0?this.value=this.minValue:this.toggleAmPm()}decrement(){this.value===void 0?this.value=this.maxValue:this.toggleAmPm()}setValueFromDate(e){this.value=Z(e.hour)}handleInput(e){const t=e.toLowerCase(),i=this.localizedMinValue.toLowerCase().includes(t),a=this.localizedMaxValue.toLowerCase().includes(t);i&&a||(i&&(this.value=V),a&&(this.value=D))}setLocalizedLimits(e){const t=new Date(0,0,0,this.minValue,0),i=new Date(0,0,0,this.maxValue,0),[a,r]=[t,i].map(this.getDayPeriodFromDate.bind(this,e));a&&(this.localizedMinValue=a),r&&(this.localizedMaxValue=r)}getDayPeriodFromDate(e,t){var i;return(i=e.formatToParts(t).find(a=>a.type===this.type))==null?void 0:i.value}}class le extends ${constructor(e,t){super(o.Hour,e,t),this.minValue=0,this.maxValue=23}setLimits(e){this.minValue=0,this.maxValue=23,e&&(this.minValue=0,this.maxValue=11),this.updateValueToLimits()}setValueFromDate(e,t){t?this.value=e.hour-Z(e.hour):super.setValueFromDate(e)}get inputValidationLimits(){const e=this.maxValue===11;return{minValue:e?1:0,maxValue:e?12:23}}}class de extends ${constructor(e,t){super(o.Millisecond,e,t),this.minValue=0,this.maxValue=999}}class ue extends ${constructor(e,t){super(o.Minute,e,t),this.minValue=0,this.maxValue=59}}class me extends ${constructor(e,t){super(o.Second,e,t),this.minValue=0,this.maxValue=59}}class he{constructor(e){this.dateFormatter=e;const t=this.dateFormatter.resolvedOptions().locale;this.numberFormatter=new B.$488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(t,{useGrouping:!1}),this.dateTimeFieldDisplayNames=new Intl.DisplayNames([t],{type:"dateTimeField"})}createSegments(e,t=!1){const i=U(e),a=this.dateFormatter.formatToParts(i).map(y=>{const w=y.type;let q=y.value;return w==="year"&&(q=this.numberFormatter.format(e.year)),this.createSegment(w,q)}),r=new M(a),s=r.year,l=r.month,h=r.day;s.setLimits(e),l.setLimits(e),t&&(s.setValueFromDate(e),l.setValueFromDate(e)),h.setLimits(e,l.value,s.value),t&&h.setValueFromDate(e);const d=r.hour,g=r.minute,b=r.second,k=r.millisecond,f=r.dayPeriod;if(f&&f.setLocalizedLimits(this.dateFormatter),!d)return r;const z=!!f;if(d.setLimits(z),t){if(d.setValueFromDate(e,z),z&&r.dayPeriod.setValueFromDate(e),!g||(g.setValueFromDate(e),!b)||(b.setValueFromDate(e),!k))return r;k.setValueFromDate(e)}return r}createSegment(e,t){if(e===o.Literal)return new se(t);const i=this.displayNameOfType(e);switch(e){case o.Year:return new Y(t,i);case o.Month:return new ne(t,i);case o.Day:return new oe(t,i);case o.Hour:return new le(t,i);case o.Minute:return new ue(t,i);case o.Second:return new me(t,i);case o.Millisecond:return new de(t,i);case o.DayPeriod:return new ce(t,i)}}displayNameOfType(e){const t=e==="fractionalSecond"?"millisecond":this.dateTimeFieldDisplayNames.of(e);return t?t.charAt(0).toUpperCase()+t.slice(1):""}}const pe='@charset "UTF-8";:host{font-family:var(--luzmo-font-family);--date-time-picker-border-radius: var( --luzmo-date-time-picker-border-radius, var(--luzmo-border-radius) );--date-time-picker-border-radius-quiet: var( --luzmo-date-time-picker-border-radius-quiet, 0 );--date-time-picker-border-width: var(--luzmo-border-width);--date-time-picker-button-border-color: var( --highcontrast-datepicker-pickerbutton-border-color, var( --luzmo-date-time-picker-pickerbutton-border-color, var(--luzmo-border-color) ) );--date-time-picker-button-border-color-focus: var( --highcontrast-datepicker-pickerbutton-border-color, var( --luzmo-date-time-picker-pickerbutton-border-color-focus, var(--luzmo-primary) ) );--date-time-picker-button-border-color-invalid: var( --highcontrast-datepicker-pickerbutton-border-color, var( --luzmo-date-time-picker-pickerbutton-border-color-invalid, var(--luzmo-negative-color) ) );--date-time-picker-button-width: calc( var(--date-time-picker-edge-to-disclosure-icon) * 2 + var(--date-time-picker-icon-size) );--date-time-picker-quiet-button-offset: var( --luzmo-date-time-picker-quiet-button-offset, var(--date-time-picker-text-to-visual) );--date-time-picker-icon-to-text: var(--date-time-picker-edge-to-text);--date-time-picker-button-width-quiet: calc( var(--date-time-picker-button-width) - var( --date-time-picker-quiet-button-offset ) );--date-time-picker-focus-ring-gap: var( --luzmo-date-time-picker-focus-ring-gap, var(--luzmo-indicator-gap) );--date-time-picker-focus-thickness: var( --luzmo-date-time-picker-focus-thickness, var(--luzmo-indicator-width) );--date-time-picker-focus-animation: var( --luzmo-date-time-picker-focus-animation, var(--luzmo-animation-duration) );--date-time-picker-focus-ring-width: var( --luzmo-date-time-picker-focus-ring-width, var(--luzmo-border-width) );--date-time-picker-focus-ring-color: var( --highcontrast-datepicker-focus-ring-color, var(--luzmo-date-time-picker-focus-ring-color, var(--luzmo-indicator-color)) );--date-time-picker-focus-line-gap: var( --luzmo-date-time-picker-focus-line-gap, var(--luzmo-spacing-2) );--date-time-picker-invalid-quiet-color: var( --luzmo-date-time-picker-invalid-quiet-color, var(--luzmo-negative-color) );--date-time-picker-quiet-border-color-hover: var( --luzmo-date-time-picker-quiet-border-color-hover, var(--luzmo-border-color-hover) );--date-time-picker-border-color-disabled: var( --luzmo-date-time-picker-border-color-disabled, var(--luzmo-border-color-disabled) );--date-time-picker-dash-font-size: var( --luzmo-date-time-picker-dash-font-size, var(--date-time-picker-dash-font-size) );--date-time-picker-dash-color: var( --highcontrast-datepicker-dash-color, var(--luzmo-date-time-picker-dash-color, var(--luzmo-font-color)) );--date-time-picker-range-dash-padding-top: var( --luzmo-date-time-picker-range-dash-padding-top, 0 );--date-time-picker-range-dash-margin-inline-start: var( --luzmo-date-time-picker-range-dash-margin-left, calc(var(--date-time-picker-dash-font-size) * -.5) );--date-time-picker-range-input-width-first: var( --luzmo-date-time-picker-range-input-width-first, calc( var(--date-time-picker-initial-width) - var( --date-time-picker-generic-padding ) * 2 ) );--date-time-picker-input-width-base: calc( var(--date-time-picker-range-input-width-first) + var(--date-time-picker-icon-size) );--date-time-picker-input-width: var( --luzmo-date-time-picker-input-width, calc( var(--date-time-picker-input-width-base) + var(--date-time-picker-initial-height) ) );--date-time-picker-range-input-width-quiet-first: var( --luzmo-date-time-picker-range-input-width-quiet-first, calc( var(--date-time-picker-width-quiet-first) + var(--date-time-picker-width-quiet-second) ) );--date-time-picker-input-width-quiet: var( --luzmo-date-time-picker-input-width-quiet, calc( var(--date-time-picker-range-input-width-quiet-first) + var(--date-time-picker-icon-size) + var(--date-time-picker-initial-height) ) );--date-time-picker-datetime-input-width-first: var( --luzmo-date-time-picker-datetime-input-width-first, calc( var(--date-time-picker-input-width-base) + var(--date-time-picker-datetime-width-first) ) );--date-time-picker-datetime-input-width: var( --luzmo-date-time-picker-datetime-input-width, calc( var(--date-time-picker-datetime-input-width-first) + var(--date-time-picker-icon-size) + var(--date-time-picker-initial-height) ) );--date-time-picker-datetime-quiet-input-width-first: var( --luzmo-date-time-picker-datetime-quiet-input-width-first, calc( var(--date-time-picker-input-width-base) + var(--date-time-picker-input-datetime-width) ) );--date-time-picker-datetime-quiet-input-width: var( --luzmo-date-time-picker-datetime-quiet-input-width, calc( var(--date-time-picker-datetime-quiet-input-width-first) + var(--date-time-picker-icon-size) + var(--date-time-picker-initial-height) ) );--date-time-picker-padding-inline-end: var( --luzmo-date-time-picker-padding-inline, calc( var(--date-time-picker-button-width) + var(--date-time-picker-edge-to-text) - var( --date-time-picker-border-width ) * 2 ) );--date-time-picker-padding-inline-end-quiet: var( --luzmo-date-time-picker-padding-inline-quiet, calc( var(--date-time-picker-button-width) + var(--date-time-picker-edge-to-text) - var( --date-time-picker-quiet-button-offset ) ) );--date-time-picker-padding-inline-end-invalid-quiet: var( --luzmo-date-time-picker-padding-inline-end-invalid-quiet, calc( var(--date-time-picker-button-width-quiet) + var(--date-time-picker-icon-size) + var(--date-time-picker-icon-to-text) ) );min-inline-size:var(--luzmo-date-time-picker-min-width, var(--date-time-picker-min-width));border-radius:var(--date-time-picker-border-radius);flex-flow:row;display:inline-flex;position:relative}:host([disabled]) luzmo-picker-button{cursor:default}:host([disabled]){--luzmo-date-time-picker-dash-color: var( --luzmo-date-time-picker-dash-color-disabled, var(--disabled-content-color) );--luzmo-text-field-border-color-disabled: transparent}:host([invalid]),:host([invalid]) #text-field .icon{--luzmo-text-field-icon-spacing-inline-end-invalid: calc( var(--date-time-picker-button-width) + var(--date-time-picker-invalid-icon-to-button) );--luzmo-text-field-icon-spacing-inline-end-quiet-invalid: calc( var(--date-time-picker-button-width-quiet) + var(--date-time-picker-invalid-icon-to-button-quiet) )}:host(:not([quiet])){inline-size:var(--luzmo-date-time-picker-width, var(--date-time-picker-width))}:host([quiet]){inline-size:var(--luzmo-date-time-picker-width-quiet, var(--date-time-picker-width-quiet, var(--date-time-picker-width)))}:host(:not([quiet],[disabled])){--luzmo-picker-button-border-color: var( --date-time-picker-button-border-color )}:host([focused]),:host([focused]:not([quiet],[disabled])){--luzmo-picker-button-border-color: var( --date-time-picker-button-border-color-focus )}:host([invalid]:not([quiet],[disabled])){--luzmo-picker-button-border-color: var( --date-time-picker-button-border-color-invalid )}.input{inline-size:100%;flex:1;padding-inline-end:var(--date-time-picker-padding-inline-end);border-color:var(--luzmo-date-time-picker-border-color, var(--datepicker-border-color))}:host .input:read-only{border-color:var(--luzmo-date-time-picker-border-color, var(--datepicker-border-color))}.input.luzmo-DatePicker-startField{border-inline-end:0;border-start-end-radius:0;border-end-end-radius:0;padding-inline-end:var(--luzmo-date-time-picker-generic-padding, var(--date-time-picker-generic-padding))}.input.luzmo-DatePicker-endField{border-inline-start:0;border-start-start-radius:0;border-end-start-radius:0;padding-inline-start:var(--luzmo-date-time-picker-generic-padding, var(--date-time-picker-generic-padding))}luzmo-picker-button{cursor:pointer;position:absolute;inset-inline-end:0}.luzmo-DatePicker-rangeDash{color:var(--date-time-picker-dash-color);line-height:var(--luzmo-date-time-picker-dash-line-height, var(--date-time-picker-dash-line-height));flex:initial;inline-size:0;z-index:1;padding-block-start:var(--date-time-picker-range-dash-padding-top)}.luzmo-DatePicker-rangeDash:before{content:"–";margin-block:0;margin-inline:var(--date-time-picker-range-dash-margin-inline-start);text-align:center;vertical-align:middle;inline-size:var(--date-time-picker-dash-font-size);display:inline-block;overflow:hidden}:host([quiet]){--luzmo-date-time-picker-border-radius: var( --date-time-picker-border-radius-quiet );--luzmo-date-time-picker-padding-inline: var( --date-time-picker-padding-inline-end-quiet );--luzmo-picker-button-border-color-disabled: var( --date-time-picker-border-color-disabled );--luzmo-picker-button-background-color-hover-disabled: var( --date-time-picker-border-color-disabled )}:host([quiet][disabled]){--luzmo-text-field-border-color-disabled: var( --date-time-picker-border-color-disabled )}:host([quiet][invalid]) .input:not(.luzmo-DatePicker-startField){padding-inline-end:var(--date-time-picker-padding-inline-end-invalid-quiet)}@media (hover: hover){:host(:hover):not([focused],[disabled],[invalid]){--luzmo-picker-button-border-color: var( --date-time-picker-quiet-border-color-hover )}}:host([quiet][invalid]){--luzmo-picker-button-border-color: var( --date-time-picker-invalid-quiet-color )}:host([quiet]) luzmo-picker-button{inline-size:auto;inset-inline-end:calc(var(--date-time-picker-quiet-button-offset) * -1)}:host([quiet]) luzmo-picker-button:not(.is-open){--luzmo-picker-button-border-color-disabled: transparent}:host([quiet]) luzmo-picker-button:not(:disabled,.is-open){--luzmo-picker-button-background-color: transparent}.luzmo-DatePicker--range{--luzmo-date-time-picker-border-radius: var(--date-time-picker-border-radius)}.luzmo-DatePicker--range:after{pointer-events:none;content:"";margin:calc(var(--date-time-picker-focus-ring-gap) * -1);border-radius:calc(var(--date-time-picker-border-radius) + var(--date-time-picker-focus-ring-gap));transition:box-shadow var(--date-time-picker-focus-animation) ease-in-out,border-color var(--date-time-picker-focus-animation) ease-in-out;border-color:#0000;position:absolute;top:0;right:0;bottom:0;left:0}:host([focused]) .luzmo-DatePicker--range:not(.luzmo-DatePicker--quiet):after{box-shadow:0 0 0 var(--date-time-picker-focus-ring-width) var(--date-time-picker-focus-ring-color)}:host([focused]) .luzmo-DatePicker--range:not(.luzmo-DatePicker--quiet) #text-field:after{display:none}:host([quiet]) .luzmo-DatePicker--range{--luzmo-date-time-picker-border-radius: var( --date-time-picker-border-radius-quiet )}:host([quiet][focused]) .luzmo-DatePicker--range:after{box-shadow:none;border-block-end:var(--date-time-picker-focus-thickness) solid var(--date-time-picker-focus-ring-color);border-radius:0;margin:0;inset-block-end:calc(var(--date-time-picker-focus-line-gap) * -1)}:host([quiet]) .luzmo-DatePicker--range #text-field{min-inline-size:0;inline-size:var(--date-time-picker-input-width-quiet)}:host([quiet]) .luzmo-DatePicker--range #text-field:first-of-type{inline-size:var(--date-time-picker-range-input-width-quiet-first)}.luzmo-DatePicker--range.luzmo-DatePicker--datetimeRange #text-field{inline-size:var(--date-time-picker-datetime-input-width);min-inline-size:0}.luzmo-DatePicker--range.luzmo-DatePicker--datetimeRange #text-field:first-of-type{inline-size:var(--date-time-picker-datetime-input-width-first)}:host([quiet]) .luzmo-DatePicker--range.luzmo-DatePicker--datetimeRange #text-field{inline-size:var(--date-time-picker-datetime-quiet-input-width)}:host([quiet]) .luzmo-DatePicker--range.luzmo-DatePicker--datetimeRange #text-field:first-of-type{inline-size:var(--date-time-picker-datetime-quiet-input-width-first)}.luzmo-DatePicker--range #text-field{flex:initial;min-inline-size:0;inline-size:var(--date-time-picker-input-width)}.luzmo-DatePicker--range #text-field:first-of-type{inline-size:var(--date-time-picker-range-input-width-first)}@media (forced-colors: active){:host{--highcontrast-datepicker-dash-color: CanvasText;--highcontrast-datepicker-focus-ring-color: Highlight;--highcontrast-datepicker-pickerbutton-border-color: Highlight}:host([disabled]){--highcontrast-datepicker-dash-color: GrayText}:host([quiet][invalid]){--highcontrast-datepicker-pickerbutton-border-color: Highlight}}:host{--date-time-picker-width: auto;--date-time-picker-initial-height: var(--system-date-picker-initial-height);--date-time-picker-font-color-default: var(--luzmo-font-color);--datepicker-border-color: var(--luzmo-border-color);--date-time-picker-button-indicator-color: var(--luzmo-indicator-color);--text-field-focus-indicator-color: var(--luzmo-background-color-highlight);--date-time-picker-initial-width: 120px;--date-time-picker-min-width: 160px;--date-time-picker-calendar-padding: var(--luzmo-spacing-4);--date-time-picker-icon-size: 18px;--date-time-picker-dash-font-size: var(--luzmo-font-size);--date-time-picker-text-to-visual: var(--luzmo-spacing-3);--date-time-picker-edge-to-disclosure-icon: var(--luzmo-spacing-3);--date-time-picker-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-icon-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-invalid-icon-to-button: var(--luzmo-spacing-3);--date-time-picker-generic-padding: var(--luzmo-spacing-4)}:host([size=s]){--date-time-picker-min-width: 140px;--date-time-picker-calendar-padding: var(--luzmo-spacing-3);--date-time-picker-icon-size: 16px;--date-time-picker-dash-font-size: var(--luzmo-font-size-s);--date-time-picker-text-to-visual: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--date-time-picker-edge-to-disclosure-icon: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--date-time-picker-edge-to-text: var(--luzmo-spacing-3);--date-time-picker-invalid-icon-to-button: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--date-time-picker-icon-to-text: var(--luzmo-spacing-3)}:host([invalid][size=s]){--text-field-icon-spacing-block-invalid: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) )}:host([size=m]){--date-time-picker-min-width: 160px;--date-time-picker-calendar-padding: var(--luzmo-spacing-4);--date-time-picker-icon-size: 18px;--date-time-picker-dash-font-size: var(--luzmo-font-size-m);--date-time-picker-text-to-visual: var(--luzmo-spacing-3);--date-time-picker-edge-to-disclosure-icon: var(--luzmo-spacing-3);--date-time-picker-edge-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-invalid-icon-to-button: var(--luzmo-spacing-3);--date-time-picker-icon-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) )}:host([size=l]){--date-time-picker-min-width: 180px;--date-time-picker-calendar-padding: var(--luzmo-spacing-5);--date-time-picker-icon-size: 20px;--date-time-picker-dash-font-size: var(--luzmo-font-size-l);--date-time-picker-text-to-visual: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-edge-to-disclosure-icon: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-edge-to-text: var(--luzmo-spacing-4);--date-time-picker-invalid-icon-to-button: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--date-time-picker-icon-to-text: var(--luzmo-spacing-4)}:host([size=xl]){--date-time-picker-min-width: 200px;--date-time-picker-calendar-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--date-time-picker-icon-size: 22px;--date-time-picker-dash-font-size: var(--luzmo-font-size-xl);--date-time-picker-text-to-visual: var(--luzmo-spacing-4);--date-time-picker-edge-to-disclosure-icon: var(--luzmo-spacing-4);--date-time-picker-edge-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--date-time-picker-invalid-icon-to-button: var(--luzmo-spacing-4);--date-time-picker-icon-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) )}:host{--status-icon-size: var( --luzmo-text-field-icon-size-invalid, var(--text-field-icon-size-invalid) );--picker-button-size: var( --luzmo-text-field-height, var(--text-field-height) );--input-spacing: var( --luzmo-text-field-spacing-inline, var(--text-field-spacing-inline) );--input-border-width: var( --luzmo-text-field-border-width, var(--luzmo-border-width) );--text-to-icon: var( --luzmo-text-field-icon-spacing-inline-start-invalid, var(--text-field-icon-spacing-inline-start-invalid) );--date-time-picker-input-width: var(--date-time-picker-width);flex-wrap:wrap}:host #text-field{display:inline-block}:host #text-field .input,:host([quiet]) #text-field .input,:host([valid]) #text-field .input,:host([invalid]) #text-field .input{inline-size:100%}:host #text-field .input,:host([quiet]) #text-field .input{padding-inline-end:calc(var(--picker-button-size) + var(--input-spacing) - var(--input-border-width))}:host([valid]) #text-field .input,:host([invalid]) #text-field .input{inline-size:100%;padding-inline-end:calc(var(--status-icon-size) + var(--picker-button-size) + var(--input-spacing) - var(--input-border-width) + var(--text-to-icon))}@media (hover: hover){:host([invalid]) #text-field:hover .input,:host([focused][invalid]) .input:hover,:host([focused][invalid]) #text-field:hover .input{border-color:var(--highcontrast-text-field-border-color-invalid-default, var(--luzmo-text-field-border-color-invalid-default, var(--luzmo-negative-color-hover)))}}luzmo-picker-button:focus-visible{outline:none}luzmo-popover{overflow-y:auto}luzmo-popover .popover-content{padding:var(--luzmo-date-time-picker-calendar-padding, var(--date-time-picker-calendar-padding))}.input-content{display:flex;align-items:center;height:100%;overflow:auto hidden;scrollbar-width:none;line-height:normal}.input-content::-webkit-scrollbar{display:none;width:0;height:0}.literal-segment,.editable-segment{display:inline-block;color:var(--luzmo-date-time-picker-font-color-default, var(--date-time-picker-font-color-default))}.editable-segment{padding:0 .15em;font-variant-numeric:tabular-nums;text-align:end;white-space:nowrap;caret-color:transparent;outline:none}[dir=ltr] .editable-segment{text-align:start}.literal-segment{white-space:pre;user-select:none;-webkit-user-select:none}.is-placeholder,.is-placeholder+.literal-segment{color:var(--luzmo-font-color-disabled)}.editable-segment:focus-visible{color:var(--white);background-color:var(--highcontrast-text-field-focus-indicator-color, var(--luzmo-text-field-focus-indicator-color, var(--text-field-focus-indicator-color)))}.editable-segment::selection{background-color:transparent}';var fe=Object.defineProperty,ve=Object.getOwnPropertyDescriptor,p=(n,e,t,i)=>{for(var a=i>1?void 0:i?ve(e,t):e,r=n.length-1,s;r>=0;r--)(s=n[r])&&(a=(i?s(e,t,a):s(a))||a);return i&&a&&fe(e,t,a),a};class m extends K.ManageHelpText(I.SizedMixin(G.Focusable,{validSizes:Object.values(I.ElementSizes)})){constructor(){super(),this._precision=v.Minute,this.isUserSetPrecision=!1,this.invalid=!1,this.readonly=!1,this.quiet=!1,this.placement="bottom",this.language="en",this.labels={previous:"Previous",next:"Next",today:"Today",selected:"Selected",empty:"Empty",calendar:"Calendar"},this.focused=!1,this.segments=new M([]),this.isCalendarOpen=!1,this._timeZone=this.timeZone??c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2(),this.cachedLocalTime=c.$14e0f24ef4ac5c92$export$461939dd4422153(this._timeZone),this.setNumberParser(),this.setDateFormatter(),this.setAriaDateFormatter(),this.addEventListener("focusin",()=>this.previousCommitedValue=this._value),this.addEventListener("focusout",()=>this.commitValue())}static get styles(){return[u.r(pe),u.r(X.textFieldStyles)]}get precision(){return this._precision}set precision(e){this.isUserSetPrecision=!0;const t=this._precision;e!==t&&(this._precision=e,this.requestUpdate("precision",t))}get _language(){try{return this.language?new Intl.Locale(this.language).language:"en"}catch{return"en"}}get focusElement(){return this.firstEditableSegment}get currentDate(){return this._value?c.$11d87f3f76e88657$export$84c95a83c799e074(this._value,this._timeZone):this.cachedLocalTime}get includesTime(){return[v.Hour,v.Minute,v.Second,v.Millisecond].includes(this.precision)}clear(){this._value=void 0,this.setSegments()}willUpdate(e){const t=e.has("value"),i=e.has("timeZone"),a=e.has("min"),r=e.has("max"),s=e.has("language"),l=e.has("dateFormat"),h=e.has("dateSeparator"),d=e.has("precision"),g=e.has("segments"),b=e.has("disabled");if(s&&this.setNumberParser(),(s||d)&&(this.setDateFormatter(),this.setAriaDateFormatter()),t||a||r||i){this._value=this.value?c.$fae977aafc393c5c$export$5adfdab05168c219(new Date(this.value).toISOString(),"UTC"):void 0,this._min=this.min?c.$fae977aafc393c5c$export$5adfdab05168c219(new Date(this.min).toISOString(),"UTC"):void 0,this._max=this.max?c.$fae977aafc393c5c$export$5adfdab05168c219(new Date(this.max).toISOString(),"UTC"):void 0;const f=this.mostSpecificDateValue;f&&(this.convertDatePropsToMatch(f),this.checkDatePropsCompliance(a||r),this.updateDateProps(),this.updateDefaultPrecision())}(t||s||d||l||i||h)&&this.setSegments(),g&&this.setValueFromSegments(),b&&this.isCalendarOpen&&(this.isCalendarOpen=!1);const k=this._value&&this.labels.selected+": "+this.ariaDateFormatter.format(U(this._value));this.setAttribute("aria-label",k??this.labels.empty)}get mostSpecificDateValue(){const e=[this._value,this._min,this._max].filter(r=>r!==void 0);if(e.length===0)return;const t=e.filter(r=>_(r));if(t.length>0)return t[0];const i=e.filter(r=>C(r));return i.length>0?i[0]:e.find(r=>F(r))}convertDatePropsToMatch(e){if(_(e)){this._timeZone=this.timeZone??e.timeZone,this._value=this._value&&c.$11d87f3f76e88657$export$84c95a83c799e074(this._value,this._timeZone),this._min=this._min&&c.$11d87f3f76e88657$export$84c95a83c799e074(this._min,this._timeZone),this._max=this._max&&c.$11d87f3f76e88657$export$84c95a83c799e074(this._max,this._timeZone);return}if(this._timeZone=this.timeZone??c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2(),C(e)){this._value=this._value&&c.$11d87f3f76e88657$export$b21e0b124e224484(this._value),this._min=this._min&&c.$11d87f3f76e88657$export$b21e0b124e224484(this._min),this._max=this._max&&c.$11d87f3f76e88657$export$b21e0b124e224484(this._max);return}this._value=this._value&&c.$11d87f3f76e88657$export$93522d1a439f3617(this._value),this._min=this._min&&c.$11d87f3f76e88657$export$93522d1a439f3617(this._min),this._max=this._max&&c.$11d87f3f76e88657$export$93522d1a439f3617(this._max)}checkDatePropsCompliance(e){e&&this._min&&this._max&&(this._min.compare(this._max)<0||(console.warn(this,`<${this.localName}> expects the 'min' to be less than 'max'. Please ensure that 'min' property's date is earlier than 'max' property's date.`),this._min=void 0,this._max=void 0)),this.isNonCompliantValue()&&(console.warn(this,`<${this.localName}> expects the preselected value to comply with the min and max constraints. Please ensure that 'value' property's date is in between the dates for the 'min' and 'max' properties.`),this._value=void 0),!this._min&&!this._max&&!this._value&&(this._timeZone=c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())}isNonCompliantValue(){return this._value===void 0?!1:!!(this._min&&this._value.compare(this._min)<0||this._max&&this._value.compare(this._max)>0)}updateDateProps(){const e=this.mostSpecificDateValue;if(!e||!this.isUserSetPrecision)return;this.includesTime&&F(e)&&this.convertDatePropsToMatch(c.$11d87f3f76e88657$export$b21e0b124e224484(e))}updateDefaultPrecision(){if(this.isUserSetPrecision)return;const e=this.mostSpecificDateValue;e&&(this._precision=F(e)?v.Day:v.Minute)}render(){return u.x`
|
|
19
19
|
<div id="text-field">
|
|
20
20
|
${this.renderStateIcons()} ${this.renderInputContent()}
|
|
21
21
|
</div>
|
|
22
22
|
${this.renderHelpText(this.invalid)}${this.renderPicker()}
|
|
23
23
|
`}renderStateIcons(){return this.invalid?u.x`
|
|
24
24
|
<luzmo-icon
|
|
25
|
-
.icon=${O
|
|
25
|
+
.icon=${O.$}
|
|
26
26
|
.size=${this.size}
|
|
27
27
|
id="invalid"
|
|
28
28
|
class="icon"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
>
|
|
40
40
|
<slot name="calendar-icon" slot="icon">
|
|
41
41
|
<luzmo-icon
|
|
42
|
-
.icon=${O.
|
|
42
|
+
.icon=${O.o0}
|
|
43
43
|
.size=${this.size}
|
|
44
44
|
block
|
|
45
45
|
></luzmo-icon>
|
|
@@ -15,25 +15,25 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { $ as ae, a as F, b as H, c as j, d as G, e as E, f as re, g as S, h as A, i as D, j as C, k as oe, l as ne, m as N } from "../index-
|
|
18
|
+
import { $ as ae, a as F, b as H, c as j, d as G, e as E, f as re, g as S, h as A, i as D, j as C, k as oe, l as ne, m as N } from "../index-Cf6G4q52.js";
|
|
19
19
|
import { $ as se } from "../NumberParser-ci9J5EKv.js";
|
|
20
|
-
import { r as Z, x as _, E as U, n as b } from "../base-
|
|
21
|
-
import { r as M } from "../state-
|
|
20
|
+
import { r as Z, x as _, E as U, n as b } from "../base-CFWO09N1.js";
|
|
21
|
+
import { r as M } from "../state-DwIwYPvt.js";
|
|
22
22
|
import { e as W } from "../query-D_KR_GUc.js";
|
|
23
|
-
import { e as le } from "../class-map-
|
|
24
|
-
import { o as $ } from "../if-defined-
|
|
25
|
-
import { o as ce } from "../style-map-
|
|
23
|
+
import { e as le } from "../class-map-CGfNk3Ee.js";
|
|
24
|
+
import { o as $ } from "../if-defined-DULpqYwi.js";
|
|
25
|
+
import { o as ce } from "../style-map-Bnhf_mVZ.js";
|
|
26
26
|
import { n as Y } from "../when-CDK1Tt5Y.js";
|
|
27
|
-
import { F as de } from "../focusable-
|
|
28
|
-
import { S as ue, E as me } from "../sized-mixin-
|
|
29
|
-
import {
|
|
27
|
+
import { F as de } from "../focusable-C5JjRZmT.js";
|
|
28
|
+
import { S as ue, E as me } from "../sized-mixin-CJbBHWRQ.js";
|
|
29
|
+
import { $ as he, o as pe } from "../luzmo-icons-CiSek5iM.js";
|
|
30
30
|
import "../icon/index.js";
|
|
31
31
|
import "../overlay/index.js";
|
|
32
32
|
import "../picker-button/index.js";
|
|
33
33
|
import "../popover/index.js";
|
|
34
|
-
import { M as fe } from "../manage-help-text-
|
|
34
|
+
import { M as fe } from "../manage-help-text-CHfMLzSa.js";
|
|
35
35
|
import { $ as K } from "../NumberFormatter-DgOUVrge.js";
|
|
36
|
-
import { t as ve } from "../text-field.module-
|
|
36
|
+
import { t as ve } from "../text-field.module-C2KVUJcX.js";
|
|
37
37
|
const ie = () => {
|
|
38
38
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
39
39
|
const n = document.createElement("style");
|