@luzmo/lucero 0.0.3 → 0.0.6
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/accordion-item.d.ts +24 -0
- package/components/accordion/accordion.d.ts +42 -0
- package/components/accordion/index.cjs +43 -0
- package/components/accordion/index.d.ts +10 -0
- package/components/accordion/index.js +181 -0
- package/components/action-bar/action-bar.d.ts +42 -0
- package/components/action-bar/index.cjs +39 -0
- package/components/action-bar/index.d.ts +7 -0
- package/components/action-bar/index.js +107 -0
- package/components/action-button/action-button.d.ts +81 -0
- package/components/action-button/index.cjs +24 -0
- package/components/action-button/index.d.ts +7 -0
- package/components/action-button/index.js +161 -0
- package/components/action-group/action-group.d.ts +50 -0
- package/components/action-group/index.cjs +18 -0
- package/components/action-group/index.d.ts +7 -0
- package/components/action-group/index.js +29 -0
- package/components/action-group-B7oQXv30.js +258 -0
- package/components/action-group-C8YUQzt8.cjs +20 -0
- package/components/action-menu/action-menu.d.ts +40 -0
- package/components/action-menu/index.cjs +56 -0
- package/components/action-menu/index.d.ts +7 -0
- package/components/action-menu/index.js +126 -0
- package/components/async-directive-BhRGSTWB.js +82 -0
- package/components/async-directive-_65ULPLK.cjs +22 -0
- package/components/avatar/avatar.d.ts +31 -0
- package/components/avatar/index.cjs +24 -0
- package/components/avatar/index.d.ts +7 -0
- package/components/avatar/index.js +81 -0
- package/components/base-BjTwmyRF.cjs +22 -0
- package/components/base-CxUap9HL.js +665 -0
- package/components/base-D76d76ww.js +26 -0
- package/components/base-rtxi7uaR.cjs +40 -0
- package/components/button/button-base.d.ts +44 -0
- package/components/button/button.d.ts +59 -0
- package/components/button/clear-button.d.ts +22 -0
- package/components/button/close-button.d.ts +24 -0
- package/components/button/index.cjs +20 -0
- package/components/button/index.d.ts +13 -0
- package/components/button/index.js +127 -0
- package/components/button-base-CgrTYVgq.js +142 -0
- package/components/button-base-DjqSZyn2.cjs +25 -0
- package/components/button-group/button-group.d.ts +19 -0
- package/components/button-group/index.cjs +18 -0
- package/components/button-group/index.d.ts +7 -0
- package/components/button-group/index.js +59 -0
- package/components/checkbox/checkbox-base.d.ts +9 -0
- package/components/checkbox/checkbox-mixin.d.ts +14 -0
- package/components/checkbox/checkbox.d.ts +54 -0
- package/components/checkbox/index.cjs +25 -0
- package/components/checkbox/index.d.ts +7 -0
- package/components/checkbox/index.js +96 -0
- package/components/checkbox-mixin-BRluTF9s.js +70 -0
- package/components/checkbox-mixin-iB-0ivgo.cjs +27 -0
- package/components/clear-button-CyLF5dx_.js +53 -0
- package/components/clear-button-DFXE6MLx.cjs +18 -0
- package/components/close-button-CcD-aVqh.cjs +18 -0
- package/components/close-button-CzpdWCWI.js +51 -0
- package/components/color-Bg3tYsAQ.js +178 -0
- package/components/color-DphK4hwx.cjs +18 -0
- package/components/color-area/color-area.d.ts +67 -0
- package/components/color-area/index.cjs +80 -0
- package/components/color-area/index.d.ts +7 -0
- package/components/color-area/index.js +372 -0
- package/components/color-field/color-field.d.ts +20 -0
- package/components/color-field/index.cjs +23 -0
- package/components/color-field/index.d.ts +7 -0
- package/components/color-field/index.js +80 -0
- package/components/color-handle/color-handle.d.ts +13 -0
- package/components/color-handle/index.cjs +24 -0
- package/components/color-handle/index.d.ts +7 -0
- package/components/color-handle/index.js +73 -0
- package/components/color-loupe/color-loupe.d.ts +7 -0
- package/components/color-loupe/index.cjs +18 -0
- package/components/color-loupe/index.d.ts +7 -0
- package/components/color-loupe/index.js +29 -0
- package/components/color-loupe-BN3k1ACF.cjs +56 -0
- package/components/color-loupe-CD-dhmB1.js +81 -0
- package/components/color-menu/color-menu.d.ts +54 -0
- package/components/color-menu/index.cjs +86 -0
- package/components/color-menu/index.d.ts +7 -0
- package/components/color-menu/index.js +203 -0
- package/components/color-picker/color-picker.d.ts +39 -0
- package/components/color-picker/index.cjs +48 -0
- package/components/color-picker/index.d.ts +7 -0
- package/components/color-picker/index.js +141 -0
- package/components/color-slider/color-slider.d.ts +57 -0
- package/components/color-slider/index.cjs +57 -0
- package/components/color-slider/index.d.ts +7 -0
- package/components/color-slider/index.js +317 -0
- package/components/condition-attribute-with-id-DrQYZzFS.cjs +18 -0
- package/components/condition-attribute-with-id-Dv4lSRbe.js +31 -0
- package/components/dependency-manger-C5HCkMMB.cjs +18 -0
- package/components/dependency-manger-CEXvGQUV.js +54 -0
- package/components/directive-C7oCP5Bh.cjs +22 -0
- package/components/directive-helpers-C3pAxRR3.cjs +22 -0
- package/components/directive-helpers-D0vm0gvF.js +28 -0
- package/components/directive-oAbCiebi.js +44 -0
- package/components/divider/divider.d.ts +24 -0
- package/components/divider/index.cjs +18 -0
- package/components/divider/index.d.ts +7 -0
- package/components/divider/index.js +61 -0
- package/components/divider.module-CXMNveQc.cjs +18 -0
- package/components/divider.module-DwOuLGU3.js +21 -0
- package/components/element-resolution-BvRLGqIU.cjs +18 -0
- package/components/element-resolution-FCUT-wql.js +91 -0
- package/components/field-group/field-group.d.ts +24 -0
- package/components/field-group/index.cjs +18 -0
- package/components/field-group/index.d.ts +7 -0
- package/components/field-group/index.js +29 -0
- package/components/field-group-DAImvhSF.js +66 -0
- package/components/field-group-d5Hkb8UW.cjs +23 -0
- package/components/field-label/field-label.d.ts +50 -0
- package/components/field-label/index.cjs +18 -0
- package/components/field-label/index.d.ts +7 -0
- package/components/field-label/index.js +29 -0
- package/components/field-label-D1zKXSG6.cjs +25 -0
- package/components/field-label-DY9iRmRI.js +106 -0
- package/components/focus-group-DHeTq18L.js +218 -0
- package/components/focus-group-DnxZUBhQ.cjs +18 -0
- package/components/focus-visible-B0P9aY_G.cjs +18 -0
- package/components/focus-visible-DBlJGoEW.js +74 -0
- package/components/focusable-Bze9xE25.js +153 -0
- package/components/focusable-DyyBr-J-.cjs +18 -0
- package/components/focusable-selectors-B4YgbghQ.js +31 -0
- package/components/focusable-selectors-BgFlyFcY.cjs +18 -0
- package/components/icon/icon-base.d.ts +11 -0
- package/components/icon/icon.d.ts +12 -0
- package/components/icon/index.cjs +18 -0
- package/components/icon/index.d.ts +7 -0
- package/components/icon/index.js +88 -0
- package/components/if-defined-C-8FyBSN.cjs +22 -0
- package/components/if-defined-XzWkhMhg.js +27 -0
- package/components/index-C1chwzNp.js +727 -0
- package/components/index-CNtoBntg.cjs +77 -0
- package/components/index-Ci6Jnhu4.js +927 -0
- package/components/index-DCKCHDTt.cjs +18 -0
- package/components/index.cjs +27 -0
- package/components/index.js +207 -0
- package/components/infield-button/index.cjs +22 -0
- package/components/infield-button/index.d.ts +7 -0
- package/components/infield-button/index.js +64 -0
- package/components/infield-button/infield-button.d.ts +25 -0
- package/components/label/index.cjs +18 -0
- package/components/label/index.d.ts +7 -0
- package/components/label/index.js +51 -0
- package/components/label/label.d.ts +7 -0
- package/components/legend-position/index.d.ts +7 -0
- package/components/legend-position/legend-position.d.ts +10 -0
- package/components/like-anchor-DKuw8fJA.cjs +32 -0
- package/components/like-anchor-DnsAwo_O.js +69 -0
- package/components/manage-help-text-B-FXFXgT.js +92 -0
- package/components/manage-help-text-I5aYDAKT.cjs +30 -0
- package/components/menu/index.cjs +18 -0
- package/components/menu/index.d.ts +16 -0
- package/components/menu/index.js +32 -0
- package/components/menu/menu-divider.d.ts +14 -0
- package/components/menu/menu-group.d.ts +17 -0
- package/components/menu/menu-item.d.ts +125 -0
- package/components/menu/menu.d.ts +119 -0
- package/components/multi-language-field/index.cjs +39 -0
- package/components/multi-language-field/index.d.ts +7 -0
- package/components/multi-language-field/index.js +148 -0
- package/components/multi-language-field/multi-language-field.d.ts +41 -0
- package/components/mutation-controller-DH7YOCyj.js +52 -0
- package/components/mutation-controller-DkOMCW-c.cjs +22 -0
- package/components/number-field/index.cjs +57 -0
- package/components/number-field/index.d.ts +7 -0
- package/components/number-field/index.js +735 -0
- package/components/number-field/number-field.d.ts +113 -0
- package/components/observe-slot-text-DeSKIzvP.cjs +18 -0
- package/components/observe-slot-text-DrM71me1.js +87 -0
- package/components/overlay/abstract-overlay.d.ts +72 -0
- package/components/overlay/click-controller.d.ts +14 -0
- package/components/overlay/events.d.ts +23 -0
- package/components/overlay/full-size-plugin.d.ts +12 -0
- package/components/overlay/hover-controller.d.ts +20 -0
- package/components/overlay/index.cjs +73 -0
- package/components/overlay/index.d.ts +22 -0
- package/components/overlay/index.js +342 -0
- package/components/overlay/interaction-controller.d.ts +38 -0
- package/components/overlay/loader.d.ts +4 -0
- package/components/overlay/longpress-controller.d.ts +21 -0
- package/components/overlay/overlay-dialog.d.ts +4 -0
- package/components/overlay/overlay-events.d.ts +11 -0
- package/components/overlay/overlay-no-popover.d.ts +4 -0
- package/components/overlay/overlay-popover.d.ts +4 -0
- package/components/overlay/overlay-stack.d.ts +44 -0
- package/components/overlay/overlay-timer.d.ts +21 -0
- package/components/overlay/overlay-trigger-directive.d.ts +26 -0
- package/components/overlay/overlay-trigger.d.ts +53 -0
- package/components/overlay/overlay-types.d.ts +50 -0
- package/components/overlay/overlay.d.ts +464 -0
- package/components/overlay/placement-controller.d.ts +157 -0
- package/components/overlay/slottable-request-directive.d.ts +17 -0
- package/components/overlay/slottable-request-event.d.ts +12 -0
- package/components/overlay/strategies.d.ts +8 -0
- package/components/overlay/virtual-trigger.d.ts +7 -0
- package/components/overlay-C2Cck0Az.js +2712 -0
- package/components/overlay-dn6Xe_vz.cjs +47 -0
- package/components/pending-state--XOfTjzE.js +61 -0
- package/components/pending-state-BeJ7iP-O.cjs +26 -0
- package/components/picker/desktop-controller.d.ts +7 -0
- package/components/picker/index.cjs +18 -0
- package/components/picker/index.d.ts +7 -0
- package/components/picker/index.js +32 -0
- package/components/picker/interaction-controller.d.ts +43 -0
- package/components/picker/mobile-controller.d.ts +9 -0
- package/components/picker/picker.d.ts +154 -0
- package/components/picker/strategies.d.ts +6 -0
- package/components/picker-8cOc-jjh.cjs +127 -0
- package/components/picker-BZAWrSDk.js +655 -0
- package/components/platform-CQzYNWKq.cjs +18 -0
- package/components/platform-DQYMG7JI.js +54 -0
- package/components/popover/index.cjs +18 -0
- package/components/popover/index.d.ts +7 -0
- package/components/popover/index.js +29 -0
- package/components/popover/popover.d.ts +29 -0
- package/components/popover-CCzs4VH8.cjs +30 -0
- package/components/popover-D0EliN0L.js +67 -0
- package/components/progress-circle/index.cjs +18 -0
- package/components/progress-circle/index.d.ts +7 -0
- package/components/progress-circle/index.js +29 -0
- package/components/progress-circle/progress-circle.d.ts +35 -0
- package/components/progress-circle-DYSSkjlY.cjs +33 -0
- package/components/progress-circle-_-9sAlMM.js +97 -0
- package/components/query-BL-TJj7K.cjs +22 -0
- package/components/query-D_KR_GUc.js +51 -0
- package/components/query-assigned-elements-DjfhL1cl.js +36 -0
- package/components/query-assigned-elements-DsKsfk7G.cjs +22 -0
- package/components/query-assigned-nodes-BcKWmGzy.cjs +22 -0
- package/components/query-assigned-nodes-C76XVPWY.js +36 -0
- package/components/radio/index.cjs +22 -0
- package/components/radio/index.d.ts +10 -0
- package/components/radio/index.js +191 -0
- package/components/radio/radio-group.d.ts +27 -0
- package/components/radio/radio.d.ts +39 -0
- package/components/random-id-ByCz1xaq.js +26 -0
- package/components/random-id-CqvckpWe.cjs +18 -0
- package/components/roving-tabindex-By_fCy_e.cjs +18 -0
- package/components/roving-tabindex-DOg4z6ZU.js +66 -0
- package/components/search/index.cjs +45 -0
- package/components/search/index.d.ts +7 -0
- package/components/search/index.js +131 -0
- package/components/search/search.d.ts +27 -0
- package/components/sized-mixin-BAI6NiE2.cjs +18 -0
- package/components/sized-mixin-DcJTTohI.js +63 -0
- package/components/slider/index.cjs +18 -0
- package/components/slider/index.d.ts +7 -0
- package/components/slider/index.js +1158 -0
- package/components/slider/slider.d.ts +24 -0
- package/components/slottable-request-event-BfUUt1Mh.cjs +18 -0
- package/components/slottable-request-event-DggLA4Rx.js +31 -0
- package/components/state-D8vot9IB.js +29 -0
- package/components/state-WWHLNMRG.cjs +22 -0
- package/components/streaming-listener-BbmNyKWO.js +125 -0
- package/components/streaming-listener-C2A7ZJZP.cjs +18 -0
- package/components/style-map-CoBJRbvu.js +53 -0
- package/components/style-map-DH0jkl7s.cjs +22 -0
- package/components/swatch/index.cjs +49 -0
- package/components/swatch/index.d.ts +10 -0
- package/components/swatch/index.js +342 -0
- package/components/swatch/swatch-group.d.ts +41 -0
- package/components/swatch/swatch.d.ts +40 -0
- package/components/switch/index.cjs +22 -0
- package/components/switch/index.d.ts +7 -0
- package/components/switch/index.js +73 -0
- package/components/switch/switch.d.ts +27 -0
- package/components/tags/index.cjs +32 -0
- package/components/tags/index.d.ts +10 -0
- package/components/tags/index.js +173 -0
- package/components/tags/tag.d.ts +29 -0
- package/components/tags/tags.d.ts +28 -0
- package/components/text-field/help-text-manager.d.ts +19 -0
- package/components/text-field/help-text.d.ts +20 -0
- package/components/text-field/index.cjs +21 -0
- package/components/text-field/index.d.ts +14 -0
- package/components/text-field/index.js +62 -0
- package/components/text-field/manage-help-text.d.ts +13 -0
- package/components/text-field/text-field.d.ts +142 -0
- package/components/text-field-05QNK_Lj.js +313 -0
- package/components/text-field-BU7yxiOR.cjs +85 -0
- package/components/toast/index.cjs +51 -0
- package/components/toast/index.d.ts +7 -0
- package/components/toast/index.js +153 -0
- package/components/toast/toast.d.ts +77 -0
- package/components/tooltip/index.cjs +45 -0
- package/components/tooltip/index.d.ts +8 -0
- package/components/tooltip/index.js +220 -0
- package/components/tooltip/tooltip-directive.d.ts +5 -0
- package/components/tooltip/tooltip.d.ts +55 -0
- package/components/unit-input/index.cjs +43 -0
- package/components/unit-input/index.d.ts +7 -0
- package/components/unit-input/index.js +183 -0
- package/components/unit-input/unit-input.d.ts +33 -0
- package/components/when-CDK1Tt5Y.js +28 -0
- package/components/when-CDZyJPvd.cjs +22 -0
- package/index.d.ts +39 -0
- package/package.json +139 -101
- package/utils/base.d.ts +16 -0
- package/utils/condition-attribute-with-id.d.ts +2 -0
- package/utils/first-focusable-in.d.ts +3 -0
- package/utils/focus-visible.d.ts +29 -0
- package/utils/focusable-selectors.d.ts +2 -0
- package/utils/focusable.d.ts +58 -0
- package/utils/get-css-variable.d.ts +1 -0
- package/utils/get-label-from-slot.d.ts +1 -0
- package/utils/like-anchor.d.ts +23 -0
- package/utils/observe-slot-presence.d.ts +12 -0
- package/utils/observe-slot-text.d.ts +11 -0
- package/utils/platform.d.ts +10 -0
- package/utils/random-id.d.ts +1 -0
- package/utils/reactive-controllers/color.d.ts +54 -0
- package/utils/reactive-controllers/dependency-manger.d.ts +26 -0
- package/utils/reactive-controllers/element-resolution.d.ts +23 -0
- package/utils/reactive-controllers/focus-group.d.ts +62 -0
- package/utils/reactive-controllers/language-resolution.d.ts +11 -0
- package/utils/reactive-controllers/match-media.d.ts +13 -0
- package/utils/reactive-controllers/pending-state.d.ts +41 -0
- package/utils/reactive-controllers/roving-tabindex.d.ts +19 -0
- package/utils/reparent-child.d.ts +4 -0
- package/utils/sized-mixin.d.ts +17 -0
- package/utils/streaming-listener.d.ts +48 -0
|
@@ -0,0 +1,51 @@
|
|
|
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 { e as i } from "./base-D76d76ww.js";
|
|
19
|
+
/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2017 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/
|
|
24
|
+
function d(l, u) {
|
|
25
|
+
return (r, o, c) => {
|
|
26
|
+
const s = (n) => {
|
|
27
|
+
var e;
|
|
28
|
+
return ((e = n.renderRoot) == null ? void 0 : e.querySelector(l)) ?? null;
|
|
29
|
+
};
|
|
30
|
+
if (u) {
|
|
31
|
+
const { get: n, set: e } = typeof o == "object" ? r : c ?? (() => {
|
|
32
|
+
const t = Symbol();
|
|
33
|
+
return { get() {
|
|
34
|
+
return this[t];
|
|
35
|
+
}, set(h) {
|
|
36
|
+
this[t] = h;
|
|
37
|
+
} };
|
|
38
|
+
})();
|
|
39
|
+
return i(r, o, { get() {
|
|
40
|
+
let t = n.call(this);
|
|
41
|
+
return t === void 0 && (t = s(this), (t !== null || this.hasUpdated) && e.call(this, t)), t;
|
|
42
|
+
} });
|
|
43
|
+
}
|
|
44
|
+
return i(r, o, { get() {
|
|
45
|
+
return s(this);
|
|
46
|
+
} });
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
d as e
|
|
51
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
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 { e as u } from "./base-D76d76ww.js";
|
|
19
|
+
/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2021 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/
|
|
24
|
+
function d(t) {
|
|
25
|
+
return (c, i) => {
|
|
26
|
+
const { slot: r, selector: o } = t ?? {}, l = "slot" + (r ? `[name=${r}]` : ":not([name])");
|
|
27
|
+
return u(c, i, { get() {
|
|
28
|
+
var s;
|
|
29
|
+
const e = (s = this.renderRoot) == null ? void 0 : s.querySelector(l), n = (e == null ? void 0 : e.assignedElements(t)) ?? [];
|
|
30
|
+
return o === void 0 ? n : n.filter((m) => m.matches(o));
|
|
31
|
+
} });
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
d as o
|
|
36
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
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";const a=require("./base-BjTwmyRF.cjs");/**
|
|
19
|
+
* @license
|
|
20
|
+
* Copyright 2021 Google LLC
|
|
21
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
+
*/function m(t){return(c,i)=>{const{slot:r,selector:s}=t??{},u="slot"+(r?`[name=${r}]`:":not([name])");return a.e(c,i,{get(){var o;const e=(o=this.renderRoot)==null?void 0:o.querySelector(u),n=(e==null?void 0:e.assignedElements(t))??[];return s===void 0?n:n.filter(l=>l.matches(s))}})}}exports.o=m;
|
|
@@ -0,0 +1,22 @@
|
|
|
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";const c=require("./base-BjTwmyRF.cjs");/**
|
|
19
|
+
* @license
|
|
20
|
+
* Copyright 2017 Google LLC
|
|
21
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
+
*/function i(t){return(s,o)=>{const{slot:n}=t??{},u="slot"+(n?`[name=${n}]`:":not([name])");return c.e(s,o,{get(){var r;const e=(r=this.renderRoot)==null?void 0:r.querySelector(u);return(e==null?void 0:e.assignedNodes(t))??[]}})}}exports.n=i;
|
|
@@ -0,0 +1,36 @@
|
|
|
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 { e as c } from "./base-D76d76ww.js";
|
|
19
|
+
/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2017 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/
|
|
24
|
+
function m(t) {
|
|
25
|
+
return (n, s) => {
|
|
26
|
+
const { slot: o } = t ?? {}, u = "slot" + (o ? `[name=${o}]` : ":not([name])");
|
|
27
|
+
return c(n, s, { get() {
|
|
28
|
+
var r;
|
|
29
|
+
const e = (r = this.renderRoot) == null ? void 0 : r.querySelector(u);
|
|
30
|
+
return (e == null ? void 0 : e.assignedNodes(t)) ?? [];
|
|
31
|
+
} });
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
m as n
|
|
36
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../base-rtxi7uaR.cjs"),h=require("../focus-visible-B0P9aY_G.cjs"),b=require("../sized-mixin-BAI6NiE2.cjs"),v=require("../query-assigned-nodes-BcKWmGzy.cjs"),p=require("../roving-tabindex-By_fCy_e.cjs"),m=require("../field-group-d5Hkb8UW.cjs"),f='@media (forced-colors: active){:host{--highcontrast-radio-neutral-content-color: CanvasText;--highcontrast-radio-neutral-content-color-hover: CanvasText;--highcontrast-radio-neutral-content-color-down: CanvasText;--highcontrast-radio-neutral-content-color-focus: CanvasText;--highcontrast-radio-button-border-color-default: ButtonText;--highcontrast-radio-button-border-color-hover: Highlight;--highcontrast-radio-button-border-color-down: ButtonText;--highcontrast-radio-button-border-color-focus: Highlight;--highcontrast-radio-emphasized-accent-color: ButtonText;--highcontrast-radio-emphasized-accent-color-hover: Highlight;--highcontrast-radio-emphasized-accent-color-down: ButtonText;--highcontrast-radio-emphasized-accent-color-focus: Highlight;--highcontrast-radio-button-checked-border-color-default: Highlight;--highcontrast-radio-button-checked-border-color-hover: Highlight;--highcontrast-radio-button-checked-border-color-down: Highlight;--highcontrast-radio-button-checked-border-color-focus: Highlight;--highcontrast-radio-disabled-content-color: GrayText;--highcontrast-radio-disabled-border-color: GrayText;--highcontrast-radio-focus-indicator-color: CanvasText}#button:after{forced-color-adjust:none}}:host{vertical-align:top;min-block-size:var(--luzmo-radio-height, var(--radio-height));max-inline-size:100%;align-items:flex-start;display:inline-flex;position:relative;font-family:var(--luzmo-radio-font-family, var(--luzmo-font-family))}:host(:active) #button:before{border-color:var(--highcontrast-radio-button-border-color-down, var(--luzmo-radio-button-border-color-down, var(--radio-button-border-color-down)))}:host(:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-down, var(--luzmo-radio-button-checked-border-color-down, var(--radio-button-checked-border-color-down)))}:host(:active) #label{color:var(--highcontrast-radio-neutral-content-color-down, var(--luzmo-radio-neutral-content-color-down, var(--radio-neutral-content-color-down)))}:host(:focus-visible) #button:before{border-color:var(--highcontrast-radio-button-border-color-focus, var(--luzmo-radio-button-border-color-focus, var(--radio-button-border-color-focus)))}:host(:focus-visible) #button:after{border-style:solid;border-color:var(--highcontrast-radio-focus-indicator-color, var(--luzmo-radio-focus-indicator-color, var(--radio-focus-indicator-color)));border-width:var(--luzmo-radio-focus-indicator-width, var(--radio-focus-indicator-width));inline-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);block-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2)}:host(:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-focus, var(--luzmo-radio-button-checked-border-color-focus, var(--radio-button-checked-border-color-focus)))}:host(:focus-visible) #label{color:var(--highcontrast-radio-neutral-content-color-focus, var(--luzmo-radio-neutral-content-color-focus, var(--radio-neutral-content-color-focus)))}:host([readonly]) #input:read-only{cursor:auto}:host([readonly]) #button{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);position:fixed;inset-block-end:100%;inset-inline-end:100%}:host([readonly][checked][disabled]) #input~#label,:host([readonly][disabled]) #input~#label,:host([readonly]) #label{color:var(--highcontrast-radio-neutral-content-color, var(--luzmo-radio-neutral-content-color, var(--radio-neutral-content-color)));margin-inline-start:0}:host([emphasized][checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color, var(--luzmo-radio-emphasized-accent-color, var(--radio-emphasized-accent-color)))}@media (hover: hover){:host(:hover) #button:before{border-color:var(--highcontrast-radio-button-border-color-hover, var(--luzmo-radio-button-border-color-hover, var(--radio-button-border-color-hover)))}:host([checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-hover, var(--luzmo-radio-button-checked-border-color-hover, var(--radio-button-checked-border-color-hover)))}:host(:hover) #label{color:var(--highcontrast-radio-neutral-content-color-hover, var(--luzmo-radio-neutral-content-color-hover, var(--radio-neutral-content-color-hover)))}:host([emphasized][checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-hover, var(--luzmo-radio-emphasized-accent-color-hover, var(--radio-emphasized-accent-color-hover)))}}:host([emphasized]:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-down, var(--luzmo-radio-emphasized-accent-color-down, var(--radio-emphasized-accent-color-down)))}:host([emphasized]:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-focus, var(--luzmo-radio-emphasized-accent-color-focus, var(--radio-emphasized-accent-color-focus)))}:host([checked][disabled]) #input+#button:before,:host([disabled]) #input+#button:before{border-color:var(--highcontrast-radio-disabled-border-color, var(--luzmo-radio-disabled-border-color, var(--radio-disabled-border-color)))}:host([checked][disabled]) #input~#label,:host([disabled]) #input~#label{color:var(--highcontrast-radio-disabled-content-color, var(--luzmo-radio-disabled-content-color, var(--radio-disabled-content-color)))}#input{font-family:inherit;font-size:100%;line-height:var(--luzmo-radio-line-height, var(--radio-line-height));box-sizing:border-box;inline-size:100%;block-size:100%;opacity:0;z-index:1;cursor:pointer;margin:0;padding:0;position:absolute;overflow:visible}:host([disabled]) #input{cursor:default}:host([checked]) #input+#button:before{border-width:calc(var(--radio-button-control-size) / 2 - var(--radio-button-selection-indicator) / 2);border-color:var(--highcontrast-radio-button-checked-border-color-default, var(--luzmo-radio-button-checked-border-color-default, var(--radio-button-checked-border-color-default)))}#input:focus-visible+#button:after{border-width:var(--luzmo-radio-focus-indicator-width, var(--radio-focus-indicator-width));border-color:var(--highcontrast-radio-focus-indicator-color, var(--luzmo-radio-focus-indicator-color, var(--radio-focus-indicator-color)));inline-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);block-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);border-style:solid}#label{text-align:start;font-size:var(--luzmo-radio-font-size, var(--radio-font-size));color:var(--highcontrast-radio-neutral-content-color, var(--luzmo-radio-neutral-content-color, var(--radio-neutral-content-color)));line-height:var(--luzmo-radio-line-height, var(--radio-line-height));transition:color var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-in-out;margin-block-start:var(--radio-label-top-to-text);margin-block-end:var(--radio-label-bottom-to-text);margin-inline-start:var(--luzmo-radio-text-to-control, var(--radio-text-to-control))}#label:lang(ja),#label:lang(ko),#label:lang(zh){line-height:var(--luzmo-radio-line-height-cjk, var(--radio-line-height-cjk))}#button{box-sizing:border-box;inline-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));block-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));flex-grow:0;flex-shrink:0;margin-block-start:var(--luzmo-radio-button-top-to-control, var(--radio-button-top-to-control));position:relative}#button:before{z-index:0;content:"";box-sizing:border-box;inline-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));block-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));background-color:var(--highcontrast-radio-button-background-color, var(--luzmo-radio-button-background-color, var(--radio-button-background-color)));border-width:var(--luzmo-radio-border-width, var(--radio-border-width));border-color:var(--highcontrast-radio-button-border-color-default, var(--luzmo-radio-button-border-color-default, var(--radio-button-border-color-default)));transition:border var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-in-out,box-shadow var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-in-out;border-style:solid;border-radius:50%;display:block;position:absolute}#button:after{content:"";transition:opacity var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-out,margin var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-out;border-radius:50%;display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%) translateY(-50%)}:host:dir(rtl) #button:after,:host([dir=rtl]) #button:after{transform:translate(50%) translateY(-50%)}:host{--radio-button-border-color-default: var(--luzmo-border-color-full);--radio-button-border-color-hover: var(--luzmo-border-color-full-hover);--radio-button-border-color-down: var(--luzmo-border-color-full-hover);--radio-button-border-color-focus: var(--luzmo-border-color-full-hover);--radio-neutral-content-color: var(--luzmo-color-selected-hard);--radio-neutral-content-color-hover: var(--luzmo-color-selected-hard-hover);--radio-neutral-content-color-down: var(--luzmo-color-selected-hard-down);--radio-neutral-content-color-focus: var(--luzmo-color-selected-hard-focus);--radio-button-selection-indicator: var(--luzmo-spacing-2);--radio-focus-indicator-width: var(--luzmo-indicator-width);--radio-focus-indicator-gap: var(--luzmo-indicator-gap);--radio-focus-indicator-color: var(--luzmo-primary);--radio-disabled-content-color: var(--luzmo-color-disabled);--radio-disabled-border-color: var(--luzmo-border-color-disabled);--radio-emphasized-accent-color: var(--luzmo-primary);--radio-emphasized-accent-color-hover: var(--luzmo-primary-hover);--radio-emphasized-accent-color-down: var(--luzmo-primary-down);--radio-emphasized-accent-color-focus: var(--luzmo-primary-focus);--radio-border-width: calc(var(--luzmo-border-width) * 2);--radio-button-background-color: var(--luzmo-background-color);--radio-button-checked-border-color-default: var(--luzmo-color-selected-hard);--radio-button-checked-border-color-hover: var( --luzmo-color-selected-hard-hover );--radio-button-checked-border-color-down: var( --luzmo-color-selected-hard-down );--radio-button-checked-border-color-focus: var( --luzmo-color-selected-hard-focus );--radio-line-height: 1.3;--radio-animation-duration: var(--luzmo-animation-duration);--radio-height: 32px;--radio-button-control-size: 14px;--radio-text-to-control: 10px;--radio-label-top-to-text: 6px;--radio-label-bottom-to-text: 9px;--radio-button-top-to-control: 9px;--radio-font-size: 14px}:host(:lang(ja)),:host(:lang(zh)),:host(:lang(ko)){--radio-line-height-cjk: 1.5}:host{--radio-height: var(--luzmo-component-height);--radio-button-control-size: 14px;--radio-text-to-control: 10px;--radio-label-top-to-text: 7px;--radio-label-bottom-to-text: 9px;--radio-button-top-to-control: 9px;--radio-font-size: 14px}:host([size=s]){--radio-height: var(--luzmo-component-height-s);--radio-button-control-size: var(--luzmo-spacing-4);--radio-text-to-control: 9px;--radio-label-top-to-text: var(--luzmo-spacing-2);--radio-label-bottom-to-text: 5px;--radio-button-top-to-control: 6px;--radio-font-size: var(--luzmo-spacing-4)}:host([size=l]){--radio-height: var(--luzmo-component-height-l);--radio-button-control-size: 16px;--radio-text-to-control: 11px;--radio-label-top-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--radio-label-bottom-to-text: 11px;--radio-button-top-to-control: var(--luzmo-spacing-4);--radio-font-size: 16px}:host([size=xl]){--radio-height: var(--luzmo-component-height-xl);--radio-button-control-size: 18px;--radio-text-to-control: 13px;--radio-label-top-to-text: var(--luzmo-spacing-4);--radio-label-bottom-to-text: 14px;--radio-button-top-to-control: 15px;--radio-font-size: 18px}:host([emphasized]){--radio-button-checked-border-color-default: var(--luzmo-primary);--radio-button-checked-border-color-hover: var(--luzmo-primary-hover);--radio-button-checked-border-color-down: var(--luzmo-primary-down);--radio-button-checked-border-color-focus: var(--luzmo-primary-focus)}:host(:focus){outline:none}:host([disabled]){pointer-events:none}:host([dir=rtl]) #button:after{transform:translate(50%) translateY(-50%)}';var z=Object.defineProperty,n=(d,o,t,l)=>{for(var r=void 0,i=d.length-1,c;i>=0;i--)(c=d[i])&&(r=c(o,t,r)||r);return r&&z(o,t,r),r};class a extends b.SizedMixin(h.FocusVisiblePolyfillMixin(e.LuzmoElement),{noDefaultSize:!0}){constructor(){super(...arguments),this.autofocus=!1,this.value="",this.checked=!1,this.disabled=!1,this.emphasized=!1,this.invalid=!1,this.readonly=!1}static get styles(){return[e.r(f)]}click(){this.disabled||this.activate()}manageAutoFocus(){this.autofocus&&(this.dispatchEvent(new KeyboardEvent("keydown",{code:"Tab"})),this.focus())}activate(){this.checked||(this.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}handleKeyup(o){o.code==="Space"&&this.activate()}render(){return e.x`
|
|
19
|
+
<div id="input"></div>
|
|
20
|
+
<span id="button"></span>
|
|
21
|
+
<span id="label" role="presentation"><slot></slot></span>
|
|
22
|
+
`}firstUpdated(o){super.firstUpdated(o),this.setAttribute("role","radio"),this.hasAttribute("tabindex")||(this.tabIndex=0),this.manageAutoFocus(),this.addEventListener("click",this.activate),this.addEventListener("keyup",this.handleKeyup)}updated(o){super.updated(o),o.has("invalid")&&(this.invalid?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")),o.has("checked")&&(this.checked?this.setAttribute("aria-checked","true"):this.setAttribute("aria-checked","false")),o.has("disabled")&&(this.disabled?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled"))}}n([e.n({type:Boolean})],a.prototype,"autofocus");n([e.n({type:String,reflect:!0})],a.prototype,"value");n([e.n({type:Boolean,reflect:!0})],a.prototype,"checked");n([e.n({type:Boolean,reflect:!0})],a.prototype,"disabled");n([e.n({type:Boolean,reflect:!0})],a.prototype,"emphasized");n([e.n({type:Boolean,reflect:!0})],a.prototype,"invalid");n([e.n({type:Boolean,reflect:!0})],a.prototype,"readonly");var g=Object.defineProperty,u=(d,o,t,l)=>{for(var r=void 0,i=d.length-1,c;i>=0;i--)(c=d[i])&&(r=c(o,t,r)||r);return r&&g(o,t,r),r};class s extends h.FocusVisiblePolyfillMixin(m.LuzmoFieldGroup){constructor(){super(...arguments),this.name="",this.rovingTabindexController=new p.RovingTabindexController(this,{focusInIndex:o=>o.findIndex(t=>this.selected?!t.disabled&&t.value===this.selected:!t.disabled),elementEnterAction:o=>{this._setSelected(o.value)},elements:()=>this.buttons,isFocusableElement:o=>!o.disabled}),this.selected=""}get buttons(){return this.defaultNodes.filter(o=>o instanceof a)}focus(){this.rovingTabindexController.focus()}_setSelected(o){if(o===this.selected)return;const t=this.selected,l=o?this.querySelector(`luzmo-radio[value="${o}"]`):void 0;if(this.selected=l?o:"",!this.dispatchEvent(new Event("change",{cancelable:!0,bubbles:!0,composed:!0}))){this.selected=t;return}this.validateRadios()}willUpdate(o){if(!this.hasUpdated){this.setAttribute("role","radiogroup");const t=this.querySelector("luzmo-radio[checked]"),l=t?t.value:"";if(this.selected=l||this.selected,this.selected&&this.selected!==l){const r=this.querySelector(`luzmo-radio[value="${this.selected}"]`);r&&(r.checked=!0)}this.shadowRoot.addEventListener("change",r=>{r.stopPropagation();const i=r.target;this._setSelected(i.value)})}o.has("selected")&&this.validateRadios()}async validateRadios(){let o=!1;this.hasUpdated||await this.updateComplete,this.buttons.map(t=>{t.checked=this.selected===t.value,o=o||t.checked}),o||(this.selected="")}handleSlotchange(){this.rovingTabindexController.clearElementCache()}}u([e.n({type:String})],s.prototype,"name");u([v.n()],s.prototype,"defaultNodes");u([e.n({reflect:!0})],s.prototype,"selected");customElements.get("luzmo-radio")||customElements.define("luzmo-radio",a);customElements.get("luzmo-radio-group")||customElements.define("luzmo-radio-group",s);exports.LuzmoRadio=a;exports.LuzmoRadioGroup=s;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LuzmoRadio } from './radio';
|
|
2
|
+
import { LuzmoRadioGroup } from './radio-group';
|
|
3
|
+
declare global {
|
|
4
|
+
interface HTMLElementTagNameMap {
|
|
5
|
+
'luzmo-radio': LuzmoRadio;
|
|
6
|
+
'luzmo-radio-group': LuzmoRadioGroup;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export { LuzmoRadio } from './radio';
|
|
10
|
+
export { LuzmoRadioGroup } from './radio-group';
|
|
@@ -0,0 +1,191 @@
|
|
|
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 { L as m, r as z, x as v, n as i } from "../base-CxUap9HL.js";
|
|
19
|
+
import { F as h } from "../focus-visible-DBlJGoEW.js";
|
|
20
|
+
import { S as p } from "../sized-mixin-DcJTTohI.js";
|
|
21
|
+
import { n as f } from "../query-assigned-nodes-C76XVPWY.js";
|
|
22
|
+
import { R as g } from "../roving-tabindex-DOg4z6ZU.js";
|
|
23
|
+
import { L as x } from "../field-group-DAImvhSF.js";
|
|
24
|
+
const b = () => {
|
|
25
|
+
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
26
|
+
const e = document.createElement("style");
|
|
27
|
+
e.setAttribute("data-luzmo-vars", ""), e.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-color-disabled);--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-color-negative: #ca221c;--luzmo-color-negative-hover: #b3241f;--luzmo-color-negative-down: #9f231f;--luzmo-color-negative-focus: #b3241f;--luzmo-color-negative-rgb: 202, 34, 28;--luzmo-color-positive: rgb(20, 150, 101);--luzmo-color-positive-hover: rgb(17, 128, 86);--luzmo-color-positive-down: rgb(16, 105, 71);--luzmo-color-positive-focus: rgb(17, 128, 86);--luzmo-color-positive-rgb: 20, 150, 101;--luzmo-color-selected: rgb(110, 110, 110);--luzmo-color-selected-hover: rgb(70, 70, 70);--luzmo-color-selected-down: rgb(40, 40, 40);--luzmo-color-selected-focus: rgb(70, 70, 70);--luzmo-color-selected-hard: #1e1e1e;--luzmo-color-selected-hard-hover: rgb(0, 0, 0);--luzmo-color-selected-hard-down: rgb(0, 0, 0);--luzmo-color-selected-hard-focus: rgb(0, 0, 0);--luzmo-color-informative: #1a77e9;--luzmo-color-informative-rgb: 26, 119, 233;--luzmo-color-disabled: #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(e);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
b();
|
|
31
|
+
const k = '@media (forced-colors: active){:host{--highcontrast-radio-neutral-content-color: CanvasText;--highcontrast-radio-neutral-content-color-hover: CanvasText;--highcontrast-radio-neutral-content-color-down: CanvasText;--highcontrast-radio-neutral-content-color-focus: CanvasText;--highcontrast-radio-button-border-color-default: ButtonText;--highcontrast-radio-button-border-color-hover: Highlight;--highcontrast-radio-button-border-color-down: ButtonText;--highcontrast-radio-button-border-color-focus: Highlight;--highcontrast-radio-emphasized-accent-color: ButtonText;--highcontrast-radio-emphasized-accent-color-hover: Highlight;--highcontrast-radio-emphasized-accent-color-down: ButtonText;--highcontrast-radio-emphasized-accent-color-focus: Highlight;--highcontrast-radio-button-checked-border-color-default: Highlight;--highcontrast-radio-button-checked-border-color-hover: Highlight;--highcontrast-radio-button-checked-border-color-down: Highlight;--highcontrast-radio-button-checked-border-color-focus: Highlight;--highcontrast-radio-disabled-content-color: GrayText;--highcontrast-radio-disabled-border-color: GrayText;--highcontrast-radio-focus-indicator-color: CanvasText}#button:after{forced-color-adjust:none}}:host{vertical-align:top;min-block-size:var(--luzmo-radio-height, var(--radio-height));max-inline-size:100%;align-items:flex-start;display:inline-flex;position:relative;font-family:var(--luzmo-radio-font-family, var(--luzmo-font-family))}:host(:active) #button:before{border-color:var(--highcontrast-radio-button-border-color-down, var(--luzmo-radio-button-border-color-down, var(--radio-button-border-color-down)))}:host(:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-down, var(--luzmo-radio-button-checked-border-color-down, var(--radio-button-checked-border-color-down)))}:host(:active) #label{color:var(--highcontrast-radio-neutral-content-color-down, var(--luzmo-radio-neutral-content-color-down, var(--radio-neutral-content-color-down)))}:host(:focus-visible) #button:before{border-color:var(--highcontrast-radio-button-border-color-focus, var(--luzmo-radio-button-border-color-focus, var(--radio-button-border-color-focus)))}:host(:focus-visible) #button:after{border-style:solid;border-color:var(--highcontrast-radio-focus-indicator-color, var(--luzmo-radio-focus-indicator-color, var(--radio-focus-indicator-color)));border-width:var(--luzmo-radio-focus-indicator-width, var(--radio-focus-indicator-width));inline-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);block-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2)}:host(:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-focus, var(--luzmo-radio-button-checked-border-color-focus, var(--radio-button-checked-border-color-focus)))}:host(:focus-visible) #label{color:var(--highcontrast-radio-neutral-content-color-focus, var(--luzmo-radio-neutral-content-color-focus, var(--radio-neutral-content-color-focus)))}:host([readonly]) #input:read-only{cursor:auto}:host([readonly]) #button{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);position:fixed;inset-block-end:100%;inset-inline-end:100%}:host([readonly][checked][disabled]) #input~#label,:host([readonly][disabled]) #input~#label,:host([readonly]) #label{color:var(--highcontrast-radio-neutral-content-color, var(--luzmo-radio-neutral-content-color, var(--radio-neutral-content-color)));margin-inline-start:0}:host([emphasized][checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color, var(--luzmo-radio-emphasized-accent-color, var(--radio-emphasized-accent-color)))}@media (hover: hover){:host(:hover) #button:before{border-color:var(--highcontrast-radio-button-border-color-hover, var(--luzmo-radio-button-border-color-hover, var(--radio-button-border-color-hover)))}:host([checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-hover, var(--luzmo-radio-button-checked-border-color-hover, var(--radio-button-checked-border-color-hover)))}:host(:hover) #label{color:var(--highcontrast-radio-neutral-content-color-hover, var(--luzmo-radio-neutral-content-color-hover, var(--radio-neutral-content-color-hover)))}:host([emphasized][checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-hover, var(--luzmo-radio-emphasized-accent-color-hover, var(--radio-emphasized-accent-color-hover)))}}:host([emphasized]:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-down, var(--luzmo-radio-emphasized-accent-color-down, var(--radio-emphasized-accent-color-down)))}:host([emphasized]:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-focus, var(--luzmo-radio-emphasized-accent-color-focus, var(--radio-emphasized-accent-color-focus)))}:host([checked][disabled]) #input+#button:before,:host([disabled]) #input+#button:before{border-color:var(--highcontrast-radio-disabled-border-color, var(--luzmo-radio-disabled-border-color, var(--radio-disabled-border-color)))}:host([checked][disabled]) #input~#label,:host([disabled]) #input~#label{color:var(--highcontrast-radio-disabled-content-color, var(--luzmo-radio-disabled-content-color, var(--radio-disabled-content-color)))}#input{font-family:inherit;font-size:100%;line-height:var(--luzmo-radio-line-height, var(--radio-line-height));box-sizing:border-box;inline-size:100%;block-size:100%;opacity:0;z-index:1;cursor:pointer;margin:0;padding:0;position:absolute;overflow:visible}:host([disabled]) #input{cursor:default}:host([checked]) #input+#button:before{border-width:calc(var(--radio-button-control-size) / 2 - var(--radio-button-selection-indicator) / 2);border-color:var(--highcontrast-radio-button-checked-border-color-default, var(--luzmo-radio-button-checked-border-color-default, var(--radio-button-checked-border-color-default)))}#input:focus-visible+#button:after{border-width:var(--luzmo-radio-focus-indicator-width, var(--radio-focus-indicator-width));border-color:var(--highcontrast-radio-focus-indicator-color, var(--luzmo-radio-focus-indicator-color, var(--radio-focus-indicator-color)));inline-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);block-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);border-style:solid}#label{text-align:start;font-size:var(--luzmo-radio-font-size, var(--radio-font-size));color:var(--highcontrast-radio-neutral-content-color, var(--luzmo-radio-neutral-content-color, var(--radio-neutral-content-color)));line-height:var(--luzmo-radio-line-height, var(--radio-line-height));transition:color var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-in-out;margin-block-start:var(--radio-label-top-to-text);margin-block-end:var(--radio-label-bottom-to-text);margin-inline-start:var(--luzmo-radio-text-to-control, var(--radio-text-to-control))}#label:lang(ja),#label:lang(ko),#label:lang(zh){line-height:var(--luzmo-radio-line-height-cjk, var(--radio-line-height-cjk))}#button{box-sizing:border-box;inline-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));block-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));flex-grow:0;flex-shrink:0;margin-block-start:var(--luzmo-radio-button-top-to-control, var(--radio-button-top-to-control));position:relative}#button:before{z-index:0;content:"";box-sizing:border-box;inline-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));block-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));background-color:var(--highcontrast-radio-button-background-color, var(--luzmo-radio-button-background-color, var(--radio-button-background-color)));border-width:var(--luzmo-radio-border-width, var(--radio-border-width));border-color:var(--highcontrast-radio-button-border-color-default, var(--luzmo-radio-button-border-color-default, var(--radio-button-border-color-default)));transition:border var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-in-out,box-shadow var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-in-out;border-style:solid;border-radius:50%;display:block;position:absolute}#button:after{content:"";transition:opacity var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-out,margin var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-out;border-radius:50%;display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%) translateY(-50%)}:host:dir(rtl) #button:after,:host([dir=rtl]) #button:after{transform:translate(50%) translateY(-50%)}:host{--radio-button-border-color-default: var(--luzmo-border-color-full);--radio-button-border-color-hover: var(--luzmo-border-color-full-hover);--radio-button-border-color-down: var(--luzmo-border-color-full-hover);--radio-button-border-color-focus: var(--luzmo-border-color-full-hover);--radio-neutral-content-color: var(--luzmo-color-selected-hard);--radio-neutral-content-color-hover: var(--luzmo-color-selected-hard-hover);--radio-neutral-content-color-down: var(--luzmo-color-selected-hard-down);--radio-neutral-content-color-focus: var(--luzmo-color-selected-hard-focus);--radio-button-selection-indicator: var(--luzmo-spacing-2);--radio-focus-indicator-width: var(--luzmo-indicator-width);--radio-focus-indicator-gap: var(--luzmo-indicator-gap);--radio-focus-indicator-color: var(--luzmo-primary);--radio-disabled-content-color: var(--luzmo-color-disabled);--radio-disabled-border-color: var(--luzmo-border-color-disabled);--radio-emphasized-accent-color: var(--luzmo-primary);--radio-emphasized-accent-color-hover: var(--luzmo-primary-hover);--radio-emphasized-accent-color-down: var(--luzmo-primary-down);--radio-emphasized-accent-color-focus: var(--luzmo-primary-focus);--radio-border-width: calc(var(--luzmo-border-width) * 2);--radio-button-background-color: var(--luzmo-background-color);--radio-button-checked-border-color-default: var(--luzmo-color-selected-hard);--radio-button-checked-border-color-hover: var( --luzmo-color-selected-hard-hover );--radio-button-checked-border-color-down: var( --luzmo-color-selected-hard-down );--radio-button-checked-border-color-focus: var( --luzmo-color-selected-hard-focus );--radio-line-height: 1.3;--radio-animation-duration: var(--luzmo-animation-duration);--radio-height: 32px;--radio-button-control-size: 14px;--radio-text-to-control: 10px;--radio-label-top-to-text: 6px;--radio-label-bottom-to-text: 9px;--radio-button-top-to-control: 9px;--radio-font-size: 14px}:host(:lang(ja)),:host(:lang(zh)),:host(:lang(ko)){--radio-line-height-cjk: 1.5}:host{--radio-height: var(--luzmo-component-height);--radio-button-control-size: 14px;--radio-text-to-control: 10px;--radio-label-top-to-text: 7px;--radio-label-bottom-to-text: 9px;--radio-button-top-to-control: 9px;--radio-font-size: 14px}:host([size=s]){--radio-height: var(--luzmo-component-height-s);--radio-button-control-size: var(--luzmo-spacing-4);--radio-text-to-control: 9px;--radio-label-top-to-text: var(--luzmo-spacing-2);--radio-label-bottom-to-text: 5px;--radio-button-top-to-control: 6px;--radio-font-size: var(--luzmo-spacing-4)}:host([size=l]){--radio-height: var(--luzmo-component-height-l);--radio-button-control-size: 16px;--radio-text-to-control: 11px;--radio-label-top-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--radio-label-bottom-to-text: 11px;--radio-button-top-to-control: var(--luzmo-spacing-4);--radio-font-size: 16px}:host([size=xl]){--radio-height: var(--luzmo-component-height-xl);--radio-button-control-size: 18px;--radio-text-to-control: 13px;--radio-label-top-to-text: var(--luzmo-spacing-4);--radio-label-bottom-to-text: 14px;--radio-button-top-to-control: 15px;--radio-font-size: 18px}:host([emphasized]){--radio-button-checked-border-color-default: var(--luzmo-primary);--radio-button-checked-border-color-hover: var(--luzmo-primary-hover);--radio-button-checked-border-color-down: var(--luzmo-primary-down);--radio-button-checked-border-color-focus: var(--luzmo-primary-focus)}:host(:focus){outline:none}:host([disabled]){pointer-events:none}:host([dir=rtl]) #button:after{transform:translate(50%) translateY(-50%)}';
|
|
32
|
+
var y = Object.defineProperty, d = (e, o, t, n) => {
|
|
33
|
+
for (var r = void 0, a = e.length - 1, c; a >= 0; a--)
|
|
34
|
+
(c = e[a]) && (r = c(o, t, r) || r);
|
|
35
|
+
return r && y(o, t, r), r;
|
|
36
|
+
};
|
|
37
|
+
class l extends p(
|
|
38
|
+
h(m),
|
|
39
|
+
{ noDefaultSize: !0 }
|
|
40
|
+
) {
|
|
41
|
+
constructor() {
|
|
42
|
+
super(...arguments), this.autofocus = !1, this.value = "", this.checked = !1, this.disabled = !1, this.emphasized = !1, this.invalid = !1, this.readonly = !1;
|
|
43
|
+
}
|
|
44
|
+
static get styles() {
|
|
45
|
+
return [z(k)];
|
|
46
|
+
}
|
|
47
|
+
click() {
|
|
48
|
+
this.disabled || this.activate();
|
|
49
|
+
}
|
|
50
|
+
manageAutoFocus() {
|
|
51
|
+
this.autofocus && (this.dispatchEvent(
|
|
52
|
+
new KeyboardEvent("keydown", {
|
|
53
|
+
code: "Tab"
|
|
54
|
+
})
|
|
55
|
+
), this.focus());
|
|
56
|
+
}
|
|
57
|
+
activate() {
|
|
58
|
+
this.checked || (this.checked = !0, this.dispatchEvent(
|
|
59
|
+
new Event("change", {
|
|
60
|
+
bubbles: !0,
|
|
61
|
+
composed: !0
|
|
62
|
+
})
|
|
63
|
+
));
|
|
64
|
+
}
|
|
65
|
+
handleKeyup(o) {
|
|
66
|
+
o.code === "Space" && this.activate();
|
|
67
|
+
}
|
|
68
|
+
render() {
|
|
69
|
+
return v`
|
|
70
|
+
<div id="input"></div>
|
|
71
|
+
<span id="button"></span>
|
|
72
|
+
<span id="label" role="presentation"><slot></slot></span>
|
|
73
|
+
`;
|
|
74
|
+
}
|
|
75
|
+
firstUpdated(o) {
|
|
76
|
+
super.firstUpdated(o), this.setAttribute("role", "radio"), this.hasAttribute("tabindex") || (this.tabIndex = 0), this.manageAutoFocus(), this.addEventListener("click", this.activate), this.addEventListener("keyup", this.handleKeyup);
|
|
77
|
+
}
|
|
78
|
+
updated(o) {
|
|
79
|
+
super.updated(o), o.has("invalid") && (this.invalid ? this.setAttribute("aria-invalid", "true") : this.removeAttribute("aria-invalid")), o.has("checked") && (this.checked ? this.setAttribute("aria-checked", "true") : this.setAttribute("aria-checked", "false")), o.has("disabled") && (this.disabled ? this.setAttribute("aria-disabled", "true") : this.removeAttribute("aria-disabled"));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
d([
|
|
83
|
+
i({ type: Boolean })
|
|
84
|
+
], l.prototype, "autofocus");
|
|
85
|
+
d([
|
|
86
|
+
i({ type: String, reflect: !0 })
|
|
87
|
+
], l.prototype, "value");
|
|
88
|
+
d([
|
|
89
|
+
i({ type: Boolean, reflect: !0 })
|
|
90
|
+
], l.prototype, "checked");
|
|
91
|
+
d([
|
|
92
|
+
i({ type: Boolean, reflect: !0 })
|
|
93
|
+
], l.prototype, "disabled");
|
|
94
|
+
d([
|
|
95
|
+
i({ type: Boolean, reflect: !0 })
|
|
96
|
+
], l.prototype, "emphasized");
|
|
97
|
+
d([
|
|
98
|
+
i({ type: Boolean, reflect: !0 })
|
|
99
|
+
], l.prototype, "invalid");
|
|
100
|
+
d([
|
|
101
|
+
i({ type: Boolean, reflect: !0 })
|
|
102
|
+
], l.prototype, "readonly");
|
|
103
|
+
var w = Object.defineProperty, u = (e, o, t, n) => {
|
|
104
|
+
for (var r = void 0, a = e.length - 1, c; a >= 0; a--)
|
|
105
|
+
(c = e[a]) && (r = c(o, t, r) || r);
|
|
106
|
+
return r && w(o, t, r), r;
|
|
107
|
+
};
|
|
108
|
+
class s extends h(
|
|
109
|
+
x
|
|
110
|
+
) {
|
|
111
|
+
constructor() {
|
|
112
|
+
super(...arguments), this.name = "", this.rovingTabindexController = new g(this, {
|
|
113
|
+
focusInIndex: (o) => o.findIndex(
|
|
114
|
+
(t) => this.selected ? !t.disabled && t.value === this.selected : !t.disabled
|
|
115
|
+
),
|
|
116
|
+
elementEnterAction: (o) => {
|
|
117
|
+
this._setSelected(o.value);
|
|
118
|
+
},
|
|
119
|
+
elements: () => this.buttons,
|
|
120
|
+
isFocusableElement: (o) => !o.disabled
|
|
121
|
+
}), this.selected = "";
|
|
122
|
+
}
|
|
123
|
+
get buttons() {
|
|
124
|
+
return this.defaultNodes.filter(
|
|
125
|
+
(o) => o instanceof l
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
focus() {
|
|
129
|
+
this.rovingTabindexController.focus();
|
|
130
|
+
}
|
|
131
|
+
_setSelected(o) {
|
|
132
|
+
if (o === this.selected)
|
|
133
|
+
return;
|
|
134
|
+
const t = this.selected, n = o ? this.querySelector(`luzmo-radio[value="${o}"]`) : void 0;
|
|
135
|
+
if (this.selected = n ? o : "", !this.dispatchEvent(
|
|
136
|
+
new Event("change", {
|
|
137
|
+
cancelable: !0,
|
|
138
|
+
bubbles: !0,
|
|
139
|
+
composed: !0
|
|
140
|
+
})
|
|
141
|
+
)) {
|
|
142
|
+
this.selected = t;
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
this.validateRadios();
|
|
146
|
+
}
|
|
147
|
+
willUpdate(o) {
|
|
148
|
+
if (!this.hasUpdated) {
|
|
149
|
+
this.setAttribute("role", "radiogroup");
|
|
150
|
+
const t = this.querySelector(
|
|
151
|
+
"luzmo-radio[checked]"
|
|
152
|
+
), n = t ? t.value : "";
|
|
153
|
+
if (this.selected = n || this.selected, this.selected && this.selected !== n) {
|
|
154
|
+
const r = this.querySelector(
|
|
155
|
+
`luzmo-radio[value="${this.selected}"]`
|
|
156
|
+
);
|
|
157
|
+
r && (r.checked = !0);
|
|
158
|
+
}
|
|
159
|
+
this.shadowRoot.addEventListener("change", (r) => {
|
|
160
|
+
r.stopPropagation();
|
|
161
|
+
const a = r.target;
|
|
162
|
+
this._setSelected(a.value);
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
o.has("selected") && this.validateRadios();
|
|
166
|
+
}
|
|
167
|
+
async validateRadios() {
|
|
168
|
+
let o = !1;
|
|
169
|
+
this.hasUpdated || await this.updateComplete, this.buttons.map((t) => {
|
|
170
|
+
t.checked = this.selected === t.value, o = o || t.checked;
|
|
171
|
+
}), o || (this.selected = "");
|
|
172
|
+
}
|
|
173
|
+
handleSlotchange() {
|
|
174
|
+
this.rovingTabindexController.clearElementCache();
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
u([
|
|
178
|
+
i({ type: String })
|
|
179
|
+
], s.prototype, "name");
|
|
180
|
+
u([
|
|
181
|
+
f()
|
|
182
|
+
], s.prototype, "defaultNodes");
|
|
183
|
+
u([
|
|
184
|
+
i({ reflect: !0 })
|
|
185
|
+
], s.prototype, "selected");
|
|
186
|
+
customElements.get("luzmo-radio") || customElements.define("luzmo-radio", l);
|
|
187
|
+
customElements.get("luzmo-radio-group") || customElements.define("luzmo-radio-group", s);
|
|
188
|
+
export {
|
|
189
|
+
l as LuzmoRadio,
|
|
190
|
+
s as LuzmoRadioGroup
|
|
191
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
|
+
import { RovingTabindexController } from '../../utils/reactive-controllers/roving-tabindex';
|
|
3
|
+
import { LuzmoFieldGroup } from './../field-group/field-group';
|
|
4
|
+
import { LuzmoRadio } from './radio';
|
|
5
|
+
declare const LuzmoRadioGroup_base: typeof LuzmoFieldGroup;
|
|
6
|
+
/**
|
|
7
|
+
* @element luzmo-radio-group
|
|
8
|
+
*
|
|
9
|
+
* @slot - The `luzmo-radio` elements to display/manage in the group.
|
|
10
|
+
* @slot help-text - default or non-negative help text to associate to your form element
|
|
11
|
+
* @slot negative-help-text - negative help text to associate to your form element when `invalid`
|
|
12
|
+
*
|
|
13
|
+
* @fires change - An alteration to the value of the element has been committed by the user.
|
|
14
|
+
*/
|
|
15
|
+
export declare class LuzmoRadioGroup extends LuzmoRadioGroup_base {
|
|
16
|
+
name: string;
|
|
17
|
+
defaultNodes: Node[];
|
|
18
|
+
get buttons(): LuzmoRadio[];
|
|
19
|
+
rovingTabindexController: RovingTabindexController<LuzmoRadio>;
|
|
20
|
+
focus(): void;
|
|
21
|
+
private _setSelected;
|
|
22
|
+
selected: string;
|
|
23
|
+
protected willUpdate(changes: PropertyValues<this>): void;
|
|
24
|
+
private validateRadios;
|
|
25
|
+
protected handleSlotchange(): void;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
|
|
2
|
+
import { LuzmoElement } from '../../utils/base';
|
|
3
|
+
declare const LuzmoRadio_base: typeof LuzmoElement & {
|
|
4
|
+
new (...args: any[]): import("../../utils/sized-mixin").SizedElementInterface;
|
|
5
|
+
prototype: import("../../utils/sized-mixin").SizedElementInterface;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* @element luzmo-radio
|
|
9
|
+
*
|
|
10
|
+
* @slot - text label of the Radio button
|
|
11
|
+
* @attr invalid - Uses the invalid style
|
|
12
|
+
* @attr disabled - Uses the disabled style
|
|
13
|
+
* @attr checked - Represents when the input is checked
|
|
14
|
+
* @attr value - Identifies this radio button within its radio group
|
|
15
|
+
*
|
|
16
|
+
* @fires change - When the input is interacted with and its state is changed
|
|
17
|
+
*/
|
|
18
|
+
export declare class LuzmoRadio extends LuzmoRadio_base {
|
|
19
|
+
static get styles(): CSSResultArray;
|
|
20
|
+
/**
|
|
21
|
+
* When this control is rendered, focus it automatically
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
autofocus: boolean;
|
|
25
|
+
value: string;
|
|
26
|
+
checked: boolean;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
emphasized: boolean;
|
|
29
|
+
invalid: boolean;
|
|
30
|
+
readonly: boolean;
|
|
31
|
+
click(): void;
|
|
32
|
+
protected manageAutoFocus(): void;
|
|
33
|
+
protected activate(): void;
|
|
34
|
+
protected handleKeyup(event: KeyboardEvent): void;
|
|
35
|
+
protected render(): TemplateResult;
|
|
36
|
+
protected firstUpdated(changes: PropertyValues): void;
|
|
37
|
+
protected updated(changes: PropertyValues): void;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
function n() {
|
|
19
|
+
return Array.from(
|
|
20
|
+
crypto.getRandomValues(new Uint8Array(4)),
|
|
21
|
+
(r) => `0${(r & 255).toString(16)}`.slice(-2)
|
|
22
|
+
).join("");
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
n as r
|
|
26
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
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";function n(){return Array.from(crypto.getRandomValues(new Uint8Array(4)),r=>`0${(r&255).toString(16)}`.slice(-2)).join("")}exports.randomID=n;
|
|
@@ -0,0 +1,18 @@
|
|
|
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";const i=require("./focus-group-DnxZUBhQ.cjs");class d extends i.FocusGroupController{constructor(){super(...arguments),this.managed=!0,this.manageIndexesAnimationFrame=0}set focused(e){e!==this.focused&&(super.focused=e,this.manageTabindexes())}get focused(){return super.focused}clearElementCache(e=0){cancelAnimationFrame(this.manageIndexesAnimationFrame),super.clearElementCache(e),this.managed&&(this.manageIndexesAnimationFrame=requestAnimationFrame(()=>this.manageTabindexes()))}manageTabindexes(){this.focused?this.updateTabindexes(()=>({tabIndex:-1})):this.updateTabindexes(e=>({removeTabIndex:e.contains(this.focusInElement)&&e!==this.focusInElement,tabIndex:e===this.focusInElement?0:-1}))}updateTabindexes(e){this.elements.forEach(a=>{const{tabIndex:t,removeTabIndex:s}=e(a);if(!s){this.focused?a!==this.elements[this.currentIndex]&&(a.tabIndex=t):a.tabIndex=t;return}a.removeAttribute("tabindex");const n=a;n.requestUpdate&&n.requestUpdate()})}manage(){this.managed=!0,this.manageTabindexes(),super.manage()}unmanage(){this.managed=!1,this.updateTabindexes(()=>({tabIndex:0})),super.unmanage()}hostUpdated(){super.hostUpdated(),this.host.hasUpdated||this.manageTabindexes()}}exports.RovingTabindexController=d;
|