@luzmo/lucero 1.0.1-alpha.4 → 1.0.1-alpha.42
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 +6 -6
- package/components/accordion/index.js +14 -13
- package/components/action-bar/index.cjs +4 -4
- package/components/action-bar/index.js +20 -18
- package/components/action-button/index.cjs +3 -3
- package/components/action-button/index.js +7 -6
- package/components/action-group/index.cjs +1 -1
- package/components/action-group/index.js +2 -2
- package/components/{action-group-DBImibFn.js → action-group-Bwt9w8Vh.js} +10 -9
- package/components/action-group-D917z7XF.cjs +20 -0
- package/components/action-menu/index.cjs +9 -9
- package/components/action-menu/index.js +10 -10
- package/components/avatar/index.cjs +3 -3
- package/components/avatar/index.js +7 -7
- package/components/base-5nDSSNeT.cjs +18 -0
- package/components/base-CdYjmV_8.js +96 -0
- package/components/button/button-base.d.ts +16 -0
- package/components/button/button.d.ts +38 -2
- package/components/button/index.cjs +2 -2
- package/components/button/index.js +84 -50
- package/components/{button-base-DbkDzb71.js → button-base-B_SkfcFn.js} +54 -39
- package/components/button-base-BdzHcHRs.cjs +25 -0
- package/components/button-group/index.cjs +1 -1
- package/components/button-group/index.js +11 -9
- package/components/calendar/index.cjs +96 -1
- package/components/calendar/index.js +538 -6
- package/components/chat-message/chat-message.d.ts +127 -0
- package/components/chat-message/index.cjs +80 -0
- package/components/chat-message/index.d.ts +8 -0
- package/components/chat-message/index.js +254 -0
- package/components/chat-message-group/chat-message-group.d.ts +50 -0
- package/components/chat-message-group/index.cjs +24 -0
- package/components/chat-message-group/index.d.ts +7 -0
- package/components/chat-message-group/index.js +144 -0
- package/components/checkbox/index.cjs +4 -4
- package/components/checkbox/index.js +12 -10
- package/components/{checkbox-mixin-Do7EgtpQ.js → checkbox-mixin-DUbGDm7f.js} +9 -9
- package/components/{checkbox-mixin-BDN0dBtS.cjs → checkbox-mixin-DhN8CIXY.cjs} +3 -3
- package/components/close-button-CGZxCNlI.js +52 -0
- package/components/close-button-Decm0Qbb.cjs +18 -0
- package/components/color-area/index.cjs +5 -5
- package/components/color-area/index.js +12 -11
- package/components/color-controller-7sNUf7SP.js +386 -0
- package/components/color-controller-ChN-A9Ft.cjs +18 -0
- package/components/color-field/color-field.d.ts +8 -0
- package/components/color-field/index.cjs +4 -4
- package/components/color-field/index.js +38 -25
- package/components/color-handle/index.cjs +2 -2
- package/components/color-handle/index.js +8 -6
- package/components/color-loupe/index.cjs +1 -1
- package/components/color-loupe/index.js +2 -2
- package/components/color-loupe-CIEFp7ln.cjs +56 -0
- package/components/{color-loupe-CmMsXbjT.js → color-loupe-CLPX6xVb.js} +6 -4
- package/components/color-menu/index.cjs +8 -8
- package/components/color-menu/index.js +46 -46
- package/components/color-palette/color-palette.d.ts +6 -2
- package/components/color-palette/index.cjs +1 -1
- package/components/color-palette/index.js +35 -34
- 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 +206 -0
- package/components/color-picker/color-picker.d.ts +31 -2
- package/components/color-picker/index.cjs +6 -5
- package/components/color-picker/index.js +16 -12
- package/components/color-slider/index.cjs +40 -1
- package/components/color-slider/index.js +452 -6
- package/components/date-time-picker/index.cjs +16 -16
- package/components/date-time-picker/index.js +105 -106
- 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/divider/index.cjs +1 -1
- package/components/divider/index.js +11 -9
- package/components/field-group/index.cjs +1 -1
- package/components/field-group/index.js +2 -2
- package/components/field-group-BYHNJmv0.cjs +23 -0
- package/components/{field-group-DXfBWrkO.js → field-group-CHmw159R.js} +7 -5
- package/components/field-label/index.cjs +1 -1
- package/components/field-label/index.js +2 -2
- package/components/{field-label-CZ2zzChK.js → field-label-Cy3xMWZ-.js} +9 -8
- package/components/field-label-DZoeqJJX.cjs +25 -0
- package/components/{focus-visible-DBlJGoEW.js → focus-visible-BvScGDCE.js} +20 -20
- package/components/focus-visible-D4BXb5RB.cjs +18 -0
- package/components/{focusable-BxtpnzWp.js → focusable-BjvsvVam.js} +3 -2
- package/components/focusable-CbVKgGfS.cjs +18 -0
- package/components/icon/index.cjs +1 -1
- package/components/icon/index.js +22 -20
- package/components/index.cjs +205 -1
- package/components/index.js +972 -167
- package/components/infield-button/index.cjs +2 -2
- package/components/infield-button/index.js +6 -5
- package/components/label/index.cjs +1 -1
- package/components/label/index.js +7 -5
- package/components/{language-resolution-8yZa5r_P.js → language-resolution-B-wjV5bb.js} +9 -8
- package/components/{directive-C7oCP5Bh.cjs → language-resolution-EUER43cg.cjs} +1 -5
- package/components/like-anchor-B2EqJPdw.cjs +32 -0
- package/components/{like-anchor-Bvn_vLQ8.js → like-anchor-CgqCU210.js} +23 -22
- package/components/{manage-help-text-DhgARkZX.cjs → manage-help-text-Bat9yGvF.cjs} +3 -3
- package/components/{manage-help-text-syYnjKGL.js → manage-help-text-C9sCHK3R.js} +8 -8
- package/components/menu/index.cjs +38 -13
- package/components/menu/index.js +138 -105
- package/components/menu/menu-item.d.ts +8 -1
- package/components/multi-language-field/index.cjs +2 -2
- package/components/multi-language-field/index.js +9 -7
- package/components/number-field/index.cjs +5 -5
- package/components/number-field/index.js +122 -85
- package/components/number-field/number-field.d.ts +145 -0
- package/components/observe-slot-presence-CNltc0C0.cjs +18 -0
- package/components/{observe-slot-presence-CmVi0zTc.js → observe-slot-presence-DFi6GE3H.js} +1 -1
- package/components/observe-slot-text-CBMHpuIK.cjs +18 -0
- package/components/{observe-slot-text-BPfIQQtz.js → observe-slot-text-DorVpCL4.js} +14 -15
- package/components/options/index.cjs +26 -58
- package/components/options/index.js +205 -849
- package/components/overlay/index.cjs +6 -6
- package/components/overlay/index.js +31 -32
- package/components/overlay-BhrVS5h7.cjs +47 -0
- package/components/overlay-C-No3oJQ.js +1736 -0
- package/components/{pending-state-CaH1si5b.cjs → pending-state-DQctFHI8.cjs} +2 -2
- package/components/{pending-state-DTX7ggyF.js → pending-state-Dx1u3EXA.js} +2 -2
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +3 -3
- package/components/picker-DxYgh4LR.cjs +123 -0
- package/components/{picker-BmoXv1jt.js → picker-GyeSAxxY.js} +45 -45
- package/components/picker-button/index.cjs +4 -4
- package/components/picker-button/index.js +9 -8
- package/components/{platform-BiXhwqk3.cjs → platform-BJnOJJag.cjs} +1 -1
- package/components/{platform-BM-uMWpX.js → platform-CqwNrovd.js} +12 -12
- package/components/popover/index.cjs +1 -1
- package/components/popover/index.js +2 -2
- package/components/popover-lcZnODPK.cjs +30 -0
- package/components/{popover-DjX0aAnY.js → popover-ucIgjbQs.js} +8 -7
- package/components/progress-circle/index.cjs +1 -1
- package/components/progress-circle/index.js +2 -2
- package/components/{progress-circle-DXH9z8-6.js → progress-circle-D5J0ZwY0.js} +8 -7
- package/components/progress-circle-DgMbqrzG.cjs +33 -0
- package/components/prompt-box/index.d.ts +8 -0
- package/components/prompt-box/prompt-box.d.ts +326 -0
- package/components/radio/index.cjs +2 -2
- package/components/radio/index.js +12 -11
- package/components/search/index.cjs +6 -6
- package/components/search/index.js +6 -6
- package/components/select/index.cjs +43 -42
- package/components/select/index.js +142 -126
- package/components/select/select.d.ts +1 -1
- package/components/{base-BjTwmyRF.cjs → sized-mixin-DcvJLFeo.cjs} +1 -5
- package/components/{sized-mixin-D4ACoVUr.js → sized-mixin-cJbo3PKR.js} +5 -5
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +48 -1101
- 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-BlWm-XZU.js} +5 -6
- package/components/streaming-listener-D9Wc7skA.cjs +18 -0
- package/components/swatch/index.cjs +7 -7
- package/components/swatch/index.js +18 -17
- package/components/switch/index.cjs +2 -2
- package/components/switch/index.js +6 -5
- package/components/tabs/index.cjs +16 -24
- package/components/tabs/index.js +94 -162
- package/components/tags/index.cjs +5 -5
- package/components/tags/index.js +39 -25
- package/components/tags/tag.d.ts +2 -0
- package/components/tags/tags.d.ts +3 -1
- package/components/text-field/index.cjs +3 -3
- package/components/text-field/index.js +13 -11
- package/components/text-field/text-field.d.ts +1 -0
- package/components/{text-field-BIADXoLC.js → text-field-BHaLKkf1.js} +73 -99
- package/components/text-field-DFP7p8Rv.cjs +81 -0
- package/components/text-field.module-Bp4Mwuvj.js +21 -0
- package/components/text-field.module-eAEqjvZu.cjs +18 -0
- package/components/toast/index.cjs +11 -11
- package/components/toast/index.js +12 -10
- package/components/tooltip/index.cjs +4 -4
- package/components/tooltip/index.js +60 -36
- package/components/tooltip/tooltip.d.ts +12 -1
- package/components/utils.cjs +1 -1
- package/components/utils.js +14 -12
- package/components/voice-recorder-BRq_gEkz.js +210 -0
- package/components/voice-recorder-CAm5iDre.cjs +18 -0
- package/custom-elements.json +1 -1
- package/index.d.ts +4 -1
- package/package.json +84 -6
- package/utils/index.d.ts +1 -0
- package/utils/voice-recorder.d.ts +121 -0
- package/components/NumberFormatter-DewVDY5w.cjs +0 -18
- package/components/NumberFormatter-DgOUVrge.js +0 -136
- package/components/NumberParser-Dik4a0h-.cjs +0 -18
- package/components/NumberParser-ci9J5EKv.js +0 -173
- package/components/action-group-DJGMcRHb.cjs +0 -20
- package/components/async-directive-BX1T1e1_.cjs +0 -22
- package/components/async-directive-BfcqVjDp.js +0 -82
- package/components/base-CBCg3yyw.cjs +0 -40
- package/components/base-D76d76ww.js +0 -26
- package/components/base-WsynuqaS.js +0 -677
- package/components/button-base-XgPLmwP-.cjs +0 -25
- package/components/class-map-Di1D_rCm.cjs +0 -22
- package/components/class-map-NbVXqBU0.js +0 -51
- package/components/clear-button-DoeRUWQ3.js +0 -53
- package/components/clear-button-Qi1pMA5S.cjs +0 -18
- package/components/close-button-BFMBEw3q.cjs +0 -18
- package/components/close-button-BWXdHSx3.js +0 -51
- package/components/color-controller-DTp1juRz.js +0 -3198
- package/components/color-controller-_ZwyhvaU.cjs +0 -18
- package/components/color-loupe-CaA_Lfkk.cjs +0 -56
- package/components/directive-helpers-Cm6gitnu.js +0 -62
- package/components/directive-helpers-DyIRTWwA.cjs +0 -22
- package/components/directive-oAbCiebi.js +0 -44
- package/components/field-group-DkGst3r5.cjs +0 -23
- package/components/field-label-mO1AkUgR.cjs +0 -25
- package/components/flow-D-0MTYCm.js +0 -527
- package/components/flow-DM3dNAKs.cjs +0 -30
- package/components/focus-visible-B0P9aY_G.cjs +0 -18
- package/components/focusable-EbipgXRh.cjs +0 -18
- package/components/if-defined-C9YGdo33.cjs +0 -22
- package/components/if-defined-DOaE2coe.js +0 -27
- package/components/index-A-yOTB_d.js +0 -1490
- package/components/index-BLWuwZXx.cjs +0 -113
- package/components/index-BwxgAdzi.cjs +0 -57
- package/components/index-HjQa8tew.js +0 -1174
- package/components/language-resolution-DJzmyzZq.cjs +0 -18
- package/components/like-anchor-sod1C1fR.cjs +0 -32
- package/components/luzmo-icons-DbwDQtuO.js +0 -229
- package/components/luzmo-icons-DletXGWU.cjs +0 -29
- package/components/mutation-controller-DH7YOCyj.js +0 -52
- package/components/mutation-controller-DkOMCW-c.cjs +0 -22
- package/components/observe-slot-presence-bc9chhsi.cjs +0 -18
- package/components/observe-slot-text-Ceb7SvYT.cjs +0 -18
- package/components/overlay-Cig9r6uU.js +0 -2747
- package/components/overlay-KSKMzzkh.cjs +0 -47
- package/components/picker-DWsBWdPN.cjs +0 -123
- package/components/popover-KFfO0IYL.cjs +0 -30
- package/components/progress-circle-BvRJNuNo.cjs +0 -33
- package/components/query-BL-TJj7K.cjs +0 -22
- package/components/query-D_KR_GUc.js +0 -51
- package/components/query-assigned-elements-DjfhL1cl.js +0 -36
- package/components/query-assigned-elements-DsKsfk7G.cjs +0 -22
- package/components/query-assigned-nodes-BcKWmGzy.cjs +0 -22
- package/components/query-assigned-nodes-C76XVPWY.js +0 -36
- package/components/sized-mixin-CPxE5C96.cjs +0 -18
- package/components/state-D8JEtYqe.cjs +0 -22
- package/components/state-Deh-vKYE.js +0 -29
- package/components/strategies-BACP6MhR.cjs +0 -18
- package/components/streaming-listener-B00MvALi.cjs +0 -18
- package/components/style-map-CeilmSgs.cjs +0 -22
- package/components/style-map-IgqIKvlE.js +0 -53
- package/components/text-field-D5d_Gt0t.cjs +0 -85
- package/components/text-field.module-ColtFhf_.js +0 -21
- package/components/text-field.module-p_VF2tC_.cjs +0 -18
- package/components/unit-input/index.cjs +0 -43
- package/components/unit-input/index.d.ts +0 -7
- package/components/unit-input/index.js +0 -183
- package/components/unit-input/unit-input.d.ts +0 -33
- package/components/when-CDK1Tt5Y.js +0 -28
- package/components/when-CDZyJPvd.cjs +0 -22
|
@@ -1,183 +0,0 @@
|
|
|
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 w, r as k, x as f, n as u } from "../base-WsynuqaS.js";
|
|
19
|
-
import { r as m } from "../state-Deh-vKYE.js";
|
|
20
|
-
import { O as z, b as S, T as V } from "../luzmo-icons-DbwDQtuO.js";
|
|
21
|
-
import { o as N } from "../style-map-IgqIKvlE.js";
|
|
22
|
-
const y = () => {
|
|
23
|
-
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
24
|
-
const s = document.createElement("style");
|
|
25
|
-
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);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
y();
|
|
29
|
-
const R = "*,*:before,*:after{box-sizing:border-box}:host{display:flex;flex:1 1 auto}svg{height:.75em}.unit-input-container{width:100%;position:relative;display:flex;height:1.875rem;box-sizing:border-box;border-radius:var(--luzmo-border-radius)}.unit-input-container input{box-sizing:border-box;min-width:0;width:100%;line-height:1.6rem;color:var(--luzmo-font-color);padding-left:var(--luzmo-spacing-3);padding-right:var(--luzmo-spacing-5);outline:none;border:var(--luzmo-border-width) solid var(--luzmo-border-color);border-radius:var(--luzmo-border-radius);background:transparent;font-weight:400;text-align:right;transition:border .2s ease-in-out}.unit-input-container input:focus{border:var(--luzmo-border-width) solid var(--luzmo-primary);background:var(--luzmo-background-color-hover)}.unit-input-container input:focus~.ticks{border:var(--luzmo-border-width) solid var(--luzmo-primary)}.unit-input-container input:focus~.ticks .tick-up{border-bottom:var(--luzmo-border-width) solid var(--luzmo-primary)}.unit-input-container .unit{position:absolute;box-sizing:border-box;display:flex;align-items:center;justify-content:center;right:1.125rem;color:var(--luzmo-font-color-disabled);padding:0 var(--luzmo-spacing-2);height:100%;cursor:default;-webkit-user-select:none;user-select:none;z-index:2;font-size:80%}.unit-input-container .ticks{position:absolute;display:flex;flex-direction:column;top:0;bottom:0;right:0;width:var(--luzmo-unit-input-tick-width, 1rem);-webkit-user-select:none;user-select:none;z-index:3;border:var(--luzmo-border-width) solid var(--luzmo-border-color);border-top-right-radius:var(--luzmo-border-radius);border-bottom-right-radius:var(--luzmo-border-radius);overflow:hidden;background-color:var(--luzmo-background-color-hover)}.unit-input-container .ticks>div{flex:1 1 auto;display:flex;justify-content:center;align-items:center;overflow:hidden;color:var(--luzmo-font-color);transition:all .2s ease-in-out;cursor:pointer;position:relative}.unit-input-container .ticks>div:hover{color:var(--luzmo-font-color-hard);background:var(--background-color-alt-2)}.unit-input-container .ticks>div.disabled,.unit-input-container .ticks>div.disabled:hover{cursor:not-allowed;color:var(--luzmo-font-color-disabled)!important;background-color:var(--luzmo-background-color)}.unit-input-container .ticks>div.tick-up{border-bottom:var(--luzmo-border-width) solid var(--luzmo-border-color)}.unit-input-container.with-unit input{padding-right:2.25rem}.unit-input-container.has-error input{border-color:var(--luzmo-negative-color, red)!important}.unit-input-container.has-error .ticks{border-color:var(--luzmo-negative-color, red)!important;background-color:var(--luzmo-negative-color, red)!important}.unit-input-container.has-error .tick-up,.unit-input-container.has-error .tick-down{border-color:var(--luzmo-negative-color, red)!important;background-color:var(--luzmo-negative-color, red)!important;color:#fff!important}";
|
|
30
|
-
var E = Object.defineProperty, i = (s, o, e, t) => {
|
|
31
|
-
for (var l = void 0, a = s.length - 1, n; a >= 0; a--)
|
|
32
|
-
(n = s[a]) && (l = n(o, e, l) || l);
|
|
33
|
-
return l && E(o, e, l), l;
|
|
34
|
-
};
|
|
35
|
-
const d = {
|
|
36
|
-
min: -99999999999,
|
|
37
|
-
max: 99999999999,
|
|
38
|
-
step: 1,
|
|
39
|
-
default: 0,
|
|
40
|
-
debounce: 250
|
|
41
|
-
}, p = class p extends w {
|
|
42
|
-
constructor() {
|
|
43
|
-
super(), this.isDecimal = !1, this.disabled = !1, this.readOnly = !1, this.inputWidth = "", this.debounce = d.debounce, this.errors = [], this.setValue = (o) => {
|
|
44
|
-
this.waitForUpdate = !0, this.debounceTimeout && clearTimeout(this.debounceTimeout), this.debounceTimeout = setTimeout(() => {
|
|
45
|
-
this.dispatchEvent(
|
|
46
|
-
new CustomEvent("change", {
|
|
47
|
-
detail: o,
|
|
48
|
-
bubbles: !0,
|
|
49
|
-
composed: !0
|
|
50
|
-
})
|
|
51
|
-
);
|
|
52
|
-
}, this.debounce || 0);
|
|
53
|
-
}, this.setCorrectInitialValues();
|
|
54
|
-
}
|
|
55
|
-
transformToNumber(o, e) {
|
|
56
|
-
let t = o;
|
|
57
|
-
return t = this.isDecimal ? Number.parseFloat(o + "") : Number.parseInt(o + "", 10), t = Number.isNaN(t) ? Number(e) : Number(t), t;
|
|
58
|
-
}
|
|
59
|
-
onInput(o) {
|
|
60
|
-
let e = new RegExp(/[^0-9+-]/g);
|
|
61
|
-
this.isDecimal && (e = new RegExp(/[^0-9.,+-]/g));
|
|
62
|
-
const t = o.target.value.replace(e, "").replaceAll(",", ".");
|
|
63
|
-
o.target.value = t, this.errors = [];
|
|
64
|
-
const l = this.isDecimal ? Number.parseFloat(t + "") : Number.parseInt(t + "", 10);
|
|
65
|
-
Number.isNaN(l) && this.errors.push("Not a number"), l < this.min && this.errors.length === 0 && this.errors.push("Value is lower than minimum"), l > this.max && this.errors.length === 0 && this.errors.push("Value is higher than maximum"), this.errors.length === 0 ? (this.validValue = l, this.value = this.validValue, this.setValue(this.value), this.setErrorStatus(!1)) : this.setErrorStatus(!0);
|
|
66
|
-
}
|
|
67
|
-
setErrorStatus(o) {
|
|
68
|
-
var e, t;
|
|
69
|
-
o ? (e = this.renderRoot.querySelector(".unit-input-container")) == null || e.classList.add("has-error") : (this.errors = [], (t = this.renderRoot.querySelector(".unit-input-container")) == null || t.classList.remove("has-error"));
|
|
70
|
-
}
|
|
71
|
-
setDisabledUpDownStatus() {
|
|
72
|
-
this.value === this.min ? this.renderRoot.querySelector(".tick-down").classList.add("disabled") : this.renderRoot.querySelector(".tick-down").classList.remove("disabled"), this.value === this.max ? this.renderRoot.querySelector(".tick-up").classList.add("disabled") : this.renderRoot.querySelector(".tick-up").classList.remove("disabled");
|
|
73
|
-
}
|
|
74
|
-
createAndSetValidValue(o) {
|
|
75
|
-
let e = this.validValue ? this.transformToNumber(o, this.validValue) : this.transformToNumber(o, this.default);
|
|
76
|
-
this.max < e && (e = this.max), this.min > e && (e = this.min), this.validValue = e, this.value = e;
|
|
77
|
-
}
|
|
78
|
-
setCorrectInitialValues() {
|
|
79
|
-
this.min = this.transformToNumber(this.min, d.min), this.max = this.transformToNumber(this.max, d.max), this.step = Math.abs(this.transformToNumber(this.step, d.step)), this.min > this.max && (this.min = this.max), this.max < this.min + this.step && (this.max = this.min + this.step), this.default = this.transformToNumber(this.default, d.default), this.createAndSetValidValue(this.value);
|
|
80
|
-
}
|
|
81
|
-
onKeydown(o) {
|
|
82
|
-
!this.disabled && (o.key === "ArrowUp" || o.key === "ArrowDown") && this.applyStep(o, o.key === "ArrowUp");
|
|
83
|
-
}
|
|
84
|
-
applyStep(o, e) {
|
|
85
|
-
var t, l, a, n, h, b;
|
|
86
|
-
if (!this.disabled) {
|
|
87
|
-
o.preventDefault();
|
|
88
|
-
const g = ((a = (l = (t = this.validValue.toString()) == null ? void 0 : t.split(".")) == null ? void 0 : l[1]) == null ? void 0 : a.length) ?? 0, v = ((b = (h = (n = this.step.toString()) == null ? void 0 : n.split(".")) == null ? void 0 : h[1]) == null ? void 0 : b.length) ?? 0, x = Math.max(g, v);
|
|
89
|
-
let c = this.validValue + (e ? this.step : -this.step);
|
|
90
|
-
c = Number.parseFloat(c.toFixed(x)), this.createAndSetValidValue(c), this.setErrorStatus(!1), this.renderRoot.querySelector("input").value = this.validValue + "", this.setValue(this.validValue), this.setDisabledUpDownStatus();
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
setPaddingRightOfInput() {
|
|
94
|
-
const o = this.renderRoot.querySelector(".unit"), e = this.renderRoot.querySelector(".ticks"), t = this.unit ? `calc(${o == null ? void 0 : o.offsetWidth}px + ${e == null ? void 0 : e.offsetWidth}px)` : `calc(${e == null ? void 0 : e.offsetWidth}px + var(--luzmo-spacing-3))`;
|
|
95
|
-
this.renderRoot.querySelector("input").style.paddingRight = t;
|
|
96
|
-
}
|
|
97
|
-
updated(o) {
|
|
98
|
-
o.has("value") && (this.setCorrectInitialValues(), this.waitForUpdate ? this.waitForUpdate = !1 : this.renderRoot.querySelector("input").value = this.value + "", this.setPaddingRightOfInput());
|
|
99
|
-
}
|
|
100
|
-
render() {
|
|
101
|
-
return f`
|
|
102
|
-
<div style=${N(this.inputWidth ? { width: this.inputWidth } : {})}>
|
|
103
|
-
<input
|
|
104
|
-
.min=${String(this.min)}
|
|
105
|
-
.max=${String(this.max)}
|
|
106
|
-
@input=${this.onInput}
|
|
107
|
-
@keydown=${this.onKeydown}
|
|
108
|
-
/>
|
|
109
|
-
${this.unit ? f`<div class="unit">${this.unit}</div>` : ""}
|
|
110
|
-
<div class="ticks">
|
|
111
|
-
<div
|
|
112
|
-
class="tick-up"
|
|
113
|
-
@click=${{
|
|
114
|
-
handleEvent: (o) => this.applyStep(o, !0)
|
|
115
|
-
}}
|
|
116
|
-
>
|
|
117
|
-
${z(S)}
|
|
118
|
-
</div>
|
|
119
|
-
|
|
120
|
-
<div
|
|
121
|
-
class="tick-down"
|
|
122
|
-
@click=${{
|
|
123
|
-
handleEvent: (o) => this.applyStep(o, !1)
|
|
124
|
-
}}
|
|
125
|
-
>
|
|
126
|
-
${z(V)}
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
`;
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
p.styles = k(R);
|
|
134
|
-
let r = p;
|
|
135
|
-
i([
|
|
136
|
-
u({ type: Number, reflect: !0, attribute: "value" })
|
|
137
|
-
], r.prototype, "value");
|
|
138
|
-
i([
|
|
139
|
-
u({ type: Number, reflect: !0, attribute: "default" })
|
|
140
|
-
], r.prototype, "default");
|
|
141
|
-
i([
|
|
142
|
-
u({ type: String, reflect: !0, attribute: "placeholder" })
|
|
143
|
-
], r.prototype, "placeholder");
|
|
144
|
-
i([
|
|
145
|
-
u({ type: String, reflect: !0, attribute: "unit" })
|
|
146
|
-
], r.prototype, "unit");
|
|
147
|
-
i([
|
|
148
|
-
u({ type: Number, reflect: !0, attribute: "min" })
|
|
149
|
-
], r.prototype, "min");
|
|
150
|
-
i([
|
|
151
|
-
u({ type: Number, reflect: !0, attribute: "max" })
|
|
152
|
-
], r.prototype, "max");
|
|
153
|
-
i([
|
|
154
|
-
u({ type: Number, reflect: !0, attribute: "step" })
|
|
155
|
-
], r.prototype, "step");
|
|
156
|
-
i([
|
|
157
|
-
u({ type: Boolean, reflect: !0, attribute: "isDecimal" })
|
|
158
|
-
], r.prototype, "isDecimal");
|
|
159
|
-
i([
|
|
160
|
-
u({ type: Boolean, reflect: !0, attribute: "disabled" })
|
|
161
|
-
], r.prototype, "disabled");
|
|
162
|
-
i([
|
|
163
|
-
u({ type: Boolean, reflect: !0, attribute: "readOnly" })
|
|
164
|
-
], r.prototype, "readOnly");
|
|
165
|
-
i([
|
|
166
|
-
u({ type: String, reflect: !0, attribute: "inputWidth" })
|
|
167
|
-
], r.prototype, "inputWidth");
|
|
168
|
-
i([
|
|
169
|
-
u({ type: Number, reflect: !0, attribute: "debounce" })
|
|
170
|
-
], r.prototype, "debounce");
|
|
171
|
-
i([
|
|
172
|
-
m()
|
|
173
|
-
], r.prototype, "errors");
|
|
174
|
-
i([
|
|
175
|
-
m()
|
|
176
|
-
], r.prototype, "validValue");
|
|
177
|
-
i([
|
|
178
|
-
m()
|
|
179
|
-
], r.prototype, "waitForUpdate");
|
|
180
|
-
customElements.get("luzmo-unit-input") || customElements.define("luzmo-unit-input", r);
|
|
181
|
-
export {
|
|
182
|
-
r as LuzmoUnitInput
|
|
183
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { LuzmoElement } from '../../utils/base';
|
|
2
|
-
export declare class LuzmoUnitInput extends LuzmoElement {
|
|
3
|
-
static styles: import("lit").CSSResult;
|
|
4
|
-
value: number;
|
|
5
|
-
default: number;
|
|
6
|
-
placeholder: string;
|
|
7
|
-
unit: string;
|
|
8
|
-
min: number;
|
|
9
|
-
max: number;
|
|
10
|
-
step: number;
|
|
11
|
-
isDecimal: boolean;
|
|
12
|
-
disabled: boolean;
|
|
13
|
-
readOnly: boolean;
|
|
14
|
-
inputWidth: string;
|
|
15
|
-
debounce: number;
|
|
16
|
-
debounceTimeout: any;
|
|
17
|
-
errors: string[];
|
|
18
|
-
validValue: number;
|
|
19
|
-
waitForUpdate: boolean;
|
|
20
|
-
private transformToNumber;
|
|
21
|
-
private onInput;
|
|
22
|
-
private setErrorStatus;
|
|
23
|
-
setDisabledUpDownStatus(): void;
|
|
24
|
-
private createAndSetValidValue;
|
|
25
|
-
private setCorrectInitialValues;
|
|
26
|
-
private onKeydown;
|
|
27
|
-
private applyStep;
|
|
28
|
-
private setValue;
|
|
29
|
-
private setPaddingRightOfInput;
|
|
30
|
-
constructor();
|
|
31
|
-
protected updated(changedProperties: Map<string, any>): void;
|
|
32
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
33
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
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
|
-
/**
|
|
19
|
-
* @license
|
|
20
|
-
* Copyright 2021 Google LLC
|
|
21
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/
|
|
23
|
-
function o(r, n, e) {
|
|
24
|
-
return r ? n(r) : e == null ? void 0 : e(r);
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
o as n
|
|
28
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
"use strict";/**
|
|
19
|
-
* @license
|
|
20
|
-
* Copyright 2021 Google LLC
|
|
21
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/function c(n,u,r){return n?u(n):r==null?void 0:r(n)}exports.n=c;
|