@luzmo/lucero 0.0.3 → 0.0.4
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/lib/accordion/index.cjs +43 -0
- package/lib/accordion/index.js +182 -0
- package/lib/action-bar/index.cjs +39 -0
- package/lib/action-bar/index.js +108 -0
- package/lib/action-button/index.cjs +24 -0
- package/lib/action-button/index.js +162 -0
- package/lib/action-group/index.cjs +18 -0
- package/lib/action-group/index.js +29 -0
- package/lib/action-group-BoIH8s8R.js +259 -0
- package/lib/action-group-D4MxBrq8.cjs +20 -0
- package/lib/action-menu/index.cjs +56 -0
- package/lib/action-menu/index.js +127 -0
- package/lib/async-directive-CV2MII86.cjs +22 -0
- package/lib/async-directive-FGzMycjH.js +82 -0
- package/lib/avatar/index.cjs +24 -0
- package/lib/avatar/index.js +82 -0
- package/lib/base-BCmA9Wxv.cjs +30 -0
- package/lib/base-BjTwmyRF.cjs +22 -0
- package/lib/base-D76d76ww.js +26 -0
- package/lib/base-nYalvNMy.js +390 -0
- package/lib/button/index.cjs +20 -0
- package/lib/button/index.js +128 -0
- package/lib/button-base-B0iB_JTv.cjs +25 -0
- package/lib/button-base-DgtT6sU5.js +143 -0
- package/lib/button-group/index.cjs +18 -0
- package/lib/button-group/index.js +60 -0
- package/lib/checkbox/index.cjs +25 -0
- package/lib/checkbox/index.js +97 -0
- package/lib/checkbox-mixin-DegQlk5C.js +71 -0
- package/lib/checkbox-mixin-H0Hm-VLk.cjs +27 -0
- package/lib/clear-button-Ap5H3UyH.js +54 -0
- package/lib/clear-button-D0djuaLb.cjs +18 -0
- package/lib/close-button-BrfeZvjk.cjs +18 -0
- package/lib/close-button-CGISEF33.js +52 -0
- package/lib/color-Bg3tYsAQ.js +178 -0
- package/lib/color-DphK4hwx.cjs +18 -0
- package/lib/color-area/index.cjs +80 -0
- package/lib/color-area/index.js +373 -0
- package/lib/color-field/index.cjs +23 -0
- package/lib/color-field/index.js +81 -0
- package/lib/color-handle/index.cjs +24 -0
- package/lib/color-handle/index.js +74 -0
- package/lib/color-loupe/index.cjs +18 -0
- package/lib/color-loupe/index.js +29 -0
- package/lib/color-loupe-BICpNqFs.cjs +56 -0
- package/lib/color-loupe-DBEApMDT.js +82 -0
- package/lib/color-menu/index.cjs +86 -0
- package/lib/color-menu/index.js +204 -0
- package/lib/color-picker/index.cjs +48 -0
- package/lib/color-picker/index.js +142 -0
- package/lib/color-slider/index.cjs +57 -0
- package/lib/color-slider/index.js +318 -0
- package/lib/condition-attribute-with-id-DrQYZzFS.cjs +18 -0
- package/lib/condition-attribute-with-id-Dv4lSRbe.js +31 -0
- package/lib/dependency-manger-C5HCkMMB.cjs +18 -0
- package/lib/dependency-manger-CEXvGQUV.js +54 -0
- package/lib/directive-C7oCP5Bh.cjs +22 -0
- package/lib/directive-helpers-BLDZnGQv.js +28 -0
- package/lib/directive-helpers-C2vOfhFx.cjs +22 -0
- package/lib/directive-oAbCiebi.js +44 -0
- package/lib/divider/index.cjs +18 -0
- package/lib/divider/index.js +62 -0
- package/lib/divider.module-CXMNveQc.cjs +18 -0
- package/lib/divider.module-DwOuLGU3.js +21 -0
- package/lib/element-resolution-BvRLGqIU.cjs +18 -0
- package/lib/element-resolution-FCUT-wql.js +91 -0
- package/lib/field-group/index.cjs +18 -0
- package/lib/field-group/index.js +29 -0
- package/lib/field-group-CBWafIUV.js +67 -0
- package/lib/field-group-TUFvhJkk.cjs +23 -0
- package/lib/field-label/index.cjs +18 -0
- package/lib/field-label/index.js +29 -0
- package/lib/field-label-BK_tk8vP.js +107 -0
- package/lib/field-label-BrJaeORz.cjs +25 -0
- package/lib/focus-group-DHeTq18L.js +218 -0
- package/lib/focus-group-DnxZUBhQ.cjs +18 -0
- package/lib/focus-visible-B0P9aY_G.cjs +18 -0
- package/lib/focus-visible-DBlJGoEW.js +74 -0
- package/lib/focusable-DbUg-3Vp.js +153 -0
- package/lib/focusable-Dv_6CFaY.cjs +18 -0
- package/lib/focusable-selectors-B4YgbghQ.js +31 -0
- package/lib/focusable-selectors-BgFlyFcY.cjs +18 -0
- package/lib/icon/index.cjs +18 -0
- package/lib/icon/index.js +89 -0
- package/lib/if-defined-CYpcjGCb.js +27 -0
- package/lib/if-defined-Cv6xanXh.cjs +22 -0
- package/lib/index-C1chwzNp.js +727 -0
- package/lib/index-DCKCHDTt.cjs +18 -0
- package/lib/index-ovT-qVzf.js +928 -0
- package/lib/index-yNcLzjhM.cjs +77 -0
- package/lib/index.cjs +18 -0
- package/lib/index.js +133 -0
- package/lib/infield-button/index.cjs +22 -0
- package/lib/infield-button/index.js +65 -0
- package/lib/label/index.cjs +18 -0
- package/lib/label/index.js +52 -0
- package/lib/legend-position/index.cjs +27 -0
- package/lib/legend-position/index.js +85 -0
- package/lib/like-anchor-K8W0QYwC.cjs +32 -0
- package/lib/like-anchor-cDeGGeHh.js +70 -0
- package/lib/lit-html-B3ugcwD9.js +248 -0
- package/lib/lit-html-p4Oxv2-5.cjs +24 -0
- package/lib/manage-help-text-2mSEy-AD.js +92 -0
- package/lib/manage-help-text-iOk-zmy8.cjs +30 -0
- package/lib/menu/index.cjs +18 -0
- package/lib/menu/index.js +32 -0
- package/lib/multi-language-field/index.cjs +39 -0
- package/lib/multi-language-field/index.js +149 -0
- package/lib/mutation-controller-DH7YOCyj.js +52 -0
- package/lib/mutation-controller-DkOMCW-c.cjs +22 -0
- package/lib/number-field/index.cjs +57 -0
- package/lib/number-field/index.js +736 -0
- package/lib/observe-slot-text-BmsCNJig.cjs +18 -0
- package/lib/observe-slot-text-BoFRF-VI.js +87 -0
- package/lib/overlay/index.cjs +73 -0
- package/lib/overlay/index.js +325 -0
- package/lib/overlay-C7QKFqRc.js +2702 -0
- package/lib/overlay-DScraBAi.cjs +47 -0
- package/lib/pending-state-D5KTK4_1.js +61 -0
- package/lib/pending-state-Dbc2HIM2.cjs +26 -0
- package/lib/picker/index.cjs +18 -0
- package/lib/picker/index.js +32 -0
- package/lib/picker--2OCYWnV.js +657 -0
- package/lib/picker-B9W7Haf4.cjs +127 -0
- package/lib/platform-CQzYNWKq.cjs +18 -0
- package/lib/platform-DQYMG7JI.js +54 -0
- package/lib/popover/index.cjs +18 -0
- package/lib/popover/index.js +29 -0
- package/lib/popover-CVbjhSnx.cjs +30 -0
- package/lib/popover-ZRVxogyp.js +68 -0
- package/lib/progress-circle/index.cjs +18 -0
- package/lib/progress-circle/index.js +29 -0
- package/lib/progress-circle-CiJoS8J7.cjs +33 -0
- package/lib/progress-circle-DpXiqW6a.js +98 -0
- package/lib/query-BL-TJj7K.cjs +22 -0
- package/lib/query-D_KR_GUc.js +51 -0
- package/lib/query-assigned-elements-DjfhL1cl.js +36 -0
- package/lib/query-assigned-elements-DsKsfk7G.cjs +22 -0
- package/lib/query-assigned-nodes-BcKWmGzy.cjs +22 -0
- package/lib/query-assigned-nodes-C76XVPWY.js +36 -0
- package/lib/radio/index.cjs +22 -0
- package/lib/radio/index.js +192 -0
- package/lib/random-id-ByCz1xaq.js +26 -0
- package/lib/random-id-CqvckpWe.cjs +18 -0
- package/lib/roving-tabindex-By_fCy_e.cjs +18 -0
- package/lib/roving-tabindex-DOg4z6ZU.js +66 -0
- package/lib/search/index.cjs +45 -0
- package/lib/search/index.js +132 -0
- package/lib/sized-mixin-BSYHt8nT.cjs +18 -0
- package/lib/sized-mixin-Dl0KoEcV.js +63 -0
- package/lib/slider/index.cjs +18 -0
- package/lib/slider/index.js +1159 -0
- package/lib/slottable-request-event-BfUUt1Mh.cjs +18 -0
- package/lib/slottable-request-event-DggLA4Rx.js +31 -0
- package/lib/state-BAO-13Bs.js +29 -0
- package/lib/state-DReJ3hB6.cjs +22 -0
- package/lib/streaming-listener-Bw4jE33f.cjs +18 -0
- package/lib/streaming-listener-DLo0wkMc.js +125 -0
- package/lib/style-map-BjBGQ_u3.cjs +22 -0
- package/lib/style-map-BqvQDFJt.js +53 -0
- package/lib/swatch/index.cjs +49 -0
- package/lib/swatch/index.js +343 -0
- package/lib/switch/index.cjs +22 -0
- package/lib/switch/index.js +74 -0
- package/lib/tags/index.cjs +32 -0
- package/lib/tags/index.js +174 -0
- package/lib/text-field/index.cjs +21 -0
- package/lib/text-field/index.js +62 -0
- package/lib/text-field-C6Aa7XOb.cjs +85 -0
- package/lib/text-field-DPk332j9.js +315 -0
- package/lib/toast/index.cjs +51 -0
- package/lib/toast/index.js +154 -0
- package/lib/tooltip/index.cjs +45 -0
- package/lib/tooltip/index.js +221 -0
- package/lib/unit-input/index.cjs +43 -0
- package/lib/unit-input/index.js +184 -0
- package/lib/when-CDK1Tt5Y.js +28 -0
- package/lib/when-CDZyJPvd.cjs +22 -0
- package/package.json +2 -2
|
@@ -0,0 +1,98 @@
|
|
|
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 { unsafeCSS as g, html as c } from "lit";
|
|
19
|
+
import { L as f, n as l } from "./base-nYalvNMy.js";
|
|
20
|
+
import { e as d } from "./query-D_KR_GUc.js";
|
|
21
|
+
import { o as p } from "./if-defined-CYpcjGCb.js";
|
|
22
|
+
import { S as b } from "./sized-mixin-Dl0KoEcV.js";
|
|
23
|
+
const z = (s, r) => {
|
|
24
|
+
if (s)
|
|
25
|
+
return null;
|
|
26
|
+
const t = r.assignedNodes().reduce((o, e) => e.textContent ? o + e.textContent : o, "");
|
|
27
|
+
return t ? t.trim() : null;
|
|
28
|
+
}, u = "@media (forced-colors: active){:host{--highcontrast-progress-circle-fill-border-color: Highlight;--highcontrast-progress-circle-fill-border-color-over-background: Highlight}.track{--progress-circle-track-border-style: double}}:host{position:var(--luzmo-progress-circle-position, relative);direction:ltr;display:inline-block;position:relative;transform:translateZ(0)}:host,.track{inline-size:var(--luzmo-progress-circle-size, var(--progress-circle-size, 32px));block-size:var(--luzmo-progress-circle-size, var(--progress-circle-size, 32px))}.track{box-sizing:border-box;border-style:var(--highcontrast-progress-circle-track-border-style, var(--luzmo-progress-circle-track-border-style, var(--progress-circle-track-border-style, solid)));border-width:var(--luzmo-progress-circle-thickness, var(--progress-circle-thickness, 3px));border-radius:var(--luzmo-progress-circle-size, var(--progress-circle-size, 32px));border-color:var(--luzmo-progress-circle-track-border-color, var(--luzmo-border-color))}.fills{inline-size:100%;block-size:100%;position:absolute;inset-block-start:0;inset-inline-start:0}.fill{box-sizing:border-box;inline-size:var(--luzmo-progress-circle-size, var(--progress-circle-size, 32px));block-size:var(--luzmo-progress-circle-size, var(--progress-circle-size, 32px));border-style:solid;border-width:var(--luzmo-progress-circle-thickness, var(--progress-circle-thickness, 3px));border-radius:var(--luzmo-progress-circle-size, var(--progress-circle-size, 32px));border-color:var(--highcontrast-progress-circle-fill-border-color, var(--luzmo-progress-circle-fill-border-color, var(--luzmo-primary)))}:host([static-color=black]) .track{border-color:var(--luzmo-progress-circle-track-border-color-over-background, rgba(0, 0, 0, .25))}:host([static-color=black]) .fill{border-color:var(--highcontrast-progress-circle-fill-border-color-over-background, var(--luzmo-progress-circle-fill-border-color-over-background, rgb(0, 0, 0)))}:host([static-color=white]) .track{border-color:var(--luzmo-progress-circle-track-border-color-over-background, rgba(255, 255, 255, .15))}:host([static-color=white]) .fill{border-color:var(--highcontrast-progress-circle-fill-border-color-over-background, var(--luzmo-progress-circle-fill-border-color-over-background, rgb(255, 255, 255)))}.fill-mask1,.fill-mask2{inline-size:50%;block-size:100%;transform-origin:100%;position:absolute;overflow:hidden;transform:rotate(180deg)}.fill-sub-mask1,.fill-sub-mask2{inline-size:100%;block-size:100%;transform-origin:100%;overflow:hidden;transform:rotate(-180deg)}.fill-mask2{transform:rotate(0)}:host([indeterminate]) .fills{will-change:transform;transform-origin:center;animation:1s cubic-bezier(.25,.78,.48,.89) infinite luzmo-fills-rotate;transform:translateZ(0)}:host([indeterminate]) .fill-sub-mask1{will-change:transform;animation:1s linear infinite luzmo-fill-mask-1;transform:translateZ(0)}:host([indeterminate]) .fill-sub-mask2{will-change:transform;animation:1s linear infinite luzmo-fill-mask-2;transform:translateZ(0)}.fill-submask-2{animation:1s linear infinite luzmo-fill-mask-2}@keyframes luzmo-fill-mask-1{0%{transform:rotate(90deg)}1.69%{transform:rotate(72.3deg)}3.39%{transform:rotate(55.5deg)}5.08%{transform:rotate(40.3deg)}6.78%{transform:rotate(25deg)}8.47%{transform:rotate(10.6deg)}10.17%{transform:rotate(0)}11.86%{transform:rotate(0)}13.56%{transform:rotate(0)}15.25%{transform:rotate(0)}16.95%{transform:rotate(0)}18.64%{transform:rotate(0)}20.34%{transform:rotate(0)}22.03%{transform:rotate(0)}23.73%{transform:rotate(0)}25.42%{transform:rotate(0)}27.12%{transform:rotate(0)}28.81%{transform:rotate(0)}30.51%{transform:rotate(0)}32.2%{transform:rotate(0)}33.9%{transform:rotate(0)}35.59%{transform:rotate(0)}37.29%{transform:rotate(0)}38.98%{transform:rotate(0)}40.68%{transform:rotate(0)}42.37%{transform:rotate(5.3deg)}44.07%{transform:rotate(13.4deg)}45.76%{transform:rotate(20.6deg)}47.46%{transform:rotate(29deg)}49.15%{transform:rotate(36.5deg)}50.85%{transform:rotate(42.6deg)}52.54%{transform:rotate(48.8deg)}54.24%{transform:rotate(54.2deg)}55.93%{transform:rotate(59.4deg)}57.63%{transform:rotate(63.2deg)}59.32%{transform:rotate(67.2deg)}61.02%{transform:rotate(70.8deg)}62.71%{transform:rotate(73.8deg)}64.41%{transform:rotate(76.2deg)}66.1%{transform:rotate(78.7deg)}67.8%{transform:rotate(80.6deg)}69.49%{transform:rotate(82.6deg)}71.19%{transform:rotate(83.7deg)}72.88%{transform:rotate(85deg)}74.58%{transform:rotate(86.3deg)}76.27%{transform:rotate(87deg)}77.97%{transform:rotate(87.7deg)}79.66%{transform:rotate(88.3deg)}81.36%{transform:rotate(88.6deg)}83.05%{transform:rotate(89.2deg)}84.75%{transform:rotate(89.2deg)}86.44%{transform:rotate(89.5deg)}88.14%{transform:rotate(89.9deg)}89.83%{transform:rotate(89.7deg)}91.53%{transform:rotate(90.1deg)}93.22%{transform:rotate(90.2deg)}94.92%{transform:rotate(90.1deg)}96.61%{transform:rotate(90deg)}98.31%{transform:rotate(89.8deg)}to{transform:rotate(90deg)}}@keyframes luzmo-fill-mask-2{0%{transform:rotate(180deg)}1.69%{transform:rotate(180deg)}3.39%{transform:rotate(180deg)}5.08%{transform:rotate(180deg)}6.78%{transform:rotate(180deg)}8.47%{transform:rotate(180deg)}10.17%{transform:rotate(179.2deg)}11.86%{transform:rotate(164deg)}13.56%{transform:rotate(151.8deg)}15.25%{transform:rotate(140.8deg)}16.95%{transform:rotate(130.3deg)}18.64%{transform:rotate(120.4deg)}20.34%{transform:rotate(110.8deg)}22.03%{transform:rotate(101.6deg)}23.73%{transform:rotate(93.5deg)}25.42%{transform:rotate(85.4deg)}27.12%{transform:rotate(78.1deg)}28.81%{transform:rotate(71.2deg)}30.51%{transform:rotate(89.1deg)}32.2%{transform:rotate(105.5deg)}33.9%{transform:rotate(121.3deg)}35.59%{transform:rotate(135.5deg)}37.29%{transform:rotate(148.4deg)}38.98%{transform:rotate(161deg)}40.68%{transform:rotate(173.5deg)}42.37%{transform:rotate(180deg)}44.07%{transform:rotate(180deg)}45.76%{transform:rotate(180deg)}47.46%{transform:rotate(180deg)}49.15%{transform:rotate(180deg)}50.85%{transform:rotate(180deg)}52.54%{transform:rotate(180deg)}54.24%{transform:rotate(180deg)}55.93%{transform:rotate(180deg)}57.63%{transform:rotate(180deg)}59.32%{transform:rotate(180deg)}61.02%{transform:rotate(180deg)}62.71%{transform:rotate(180deg)}64.41%{transform:rotate(180deg)}66.1%{transform:rotate(180deg)}67.8%{transform:rotate(180deg)}69.49%{transform:rotate(180deg)}71.19%{transform:rotate(180deg)}72.88%{transform:rotate(180deg)}74.58%{transform:rotate(180deg)}76.27%{transform:rotate(180deg)}77.97%{transform:rotate(180deg)}79.66%{transform:rotate(180deg)}81.36%{transform:rotate(180deg)}83.05%{transform:rotate(180deg)}84.75%{transform:rotate(180deg)}86.44%{transform:rotate(180deg)}88.14%{transform:rotate(180deg)}89.83%{transform:rotate(180deg)}91.53%{transform:rotate(180deg)}93.22%{transform:rotate(180deg)}94.92%{transform:rotate(180deg)}96.61%{transform:rotate(180deg)}98.31%{transform:rotate(180deg)}to{transform:rotate(180deg)}}@keyframes luzmo-fills-rotate{0%{transform:rotate(-90deg)}to{transform:rotate(270deg)}}:host([size=s]){--progress-circle-size: 16px;--progress-circle-thickness: 2px}:host([size=l]){--progress-circle-size: 48px;--progress-circle-thickness: 3px}:host([size=xl]){--progress-circle-size: 64px;--progress-circle-thickness: 4px}:host{block-size:var(--luzmo-progress-circle-size, var(--parent-element-progress-circle-size));inline-size:var(--luzmo-progress-circle-size, var(--parent-element-progress-circle-size));--progress-circle-size: inherit;--parent-element-progress-circle-size: inherit;--parent-element-progress-circle-size: var(--progress-circle-size, 32px)}:host([size=s]){--parent-element-progress-circle-size: var(--progress-circle-size, 16px)}:host([size=l]){--parent-element-progress-circle-size: var(--progress-circle-size, 48px)}:host([size=xl]){--parent-element-progress-circle-size: var(--progress-circle-size, 64px)}slot{display:none}.track,.fill{block-size:var(--luzmo-progress-circle-size, var(--parent-element-progress-circle-size));border-radius:var(--luzmo-progress-circle-size, var(--parent-element-progress-circle-size));inline-size:var(--luzmo-progress-circle-size, var(--parent-element-progress-circle-size))}:host([indeterminate]) .fills,:host([indeterminate]) .fill-sub-mask1,:host([indeterminate]) .fill-sub-mask2{animation-duration:var(--luzmo-progress-circle-animation-duration, 1s)}";
|
|
29
|
+
var h = Object.defineProperty, a = (s, r, t, o) => {
|
|
30
|
+
for (var e = void 0, n = s.length - 1, m; n >= 0; n--)
|
|
31
|
+
(m = s[n]) && (e = m(r, t, e) || e);
|
|
32
|
+
return e && h(r, t, e), e;
|
|
33
|
+
};
|
|
34
|
+
class i extends b(f, {
|
|
35
|
+
validSizes: ["s", "m", "l", "xl"]
|
|
36
|
+
}) {
|
|
37
|
+
constructor() {
|
|
38
|
+
super(...arguments), this.indeterminate = !1, this.label = "", this.progress = 0;
|
|
39
|
+
}
|
|
40
|
+
static get styles() {
|
|
41
|
+
return [g(u)];
|
|
42
|
+
}
|
|
43
|
+
makeRotation(r) {
|
|
44
|
+
return this.indeterminate ? void 0 : `transform: rotate(${r}deg);`;
|
|
45
|
+
}
|
|
46
|
+
render() {
|
|
47
|
+
const r = [
|
|
48
|
+
this.makeRotation(-180 + 3.6 * Math.min(this.progress, 50)),
|
|
49
|
+
this.makeRotation(-180 + 3.6 * Math.max(this.progress - 50, 0))
|
|
50
|
+
], t = ["mask1", "mask2"];
|
|
51
|
+
return c`
|
|
52
|
+
<slot @slotchange=${this.handleSlotchange}></slot>
|
|
53
|
+
<div class="track"></div>
|
|
54
|
+
<div class="fills">
|
|
55
|
+
${t.map(
|
|
56
|
+
(o, e) => c`
|
|
57
|
+
<div class="fill-${o}">
|
|
58
|
+
<div
|
|
59
|
+
class="fill-sub-${o}"
|
|
60
|
+
style=${p(r[e])}
|
|
61
|
+
>
|
|
62
|
+
<div class="fill"></div>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
`
|
|
66
|
+
)}
|
|
67
|
+
</div>
|
|
68
|
+
`;
|
|
69
|
+
}
|
|
70
|
+
handleSlotchange() {
|
|
71
|
+
const r = z(this.label, this.slotEl);
|
|
72
|
+
r && (this.label = r);
|
|
73
|
+
}
|
|
74
|
+
firstUpdated(r) {
|
|
75
|
+
super.firstUpdated(r), this.hasAttribute("role") || this.setAttribute("role", "progressbar");
|
|
76
|
+
}
|
|
77
|
+
updated(r) {
|
|
78
|
+
super.updated(r), !this.indeterminate && r.has("progress") ? this.setAttribute("aria-valuenow", "" + this.progress) : this.hasAttribute("aria-valuenow") && this.removeAttribute("aria-valuenow"), r.has("label") && (this.label.length > 0 ? this.setAttribute("aria-label", this.label) : r.get("label") === this.getAttribute("aria-label") && this.removeAttribute("aria-label"));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
a([
|
|
82
|
+
l({ type: Boolean, reflect: !0 })
|
|
83
|
+
], i.prototype, "indeterminate");
|
|
84
|
+
a([
|
|
85
|
+
l({ type: String })
|
|
86
|
+
], i.prototype, "label");
|
|
87
|
+
a([
|
|
88
|
+
l({ reflect: !0, attribute: "static-color" })
|
|
89
|
+
], i.prototype, "staticColor");
|
|
90
|
+
a([
|
|
91
|
+
l({ type: Number })
|
|
92
|
+
], i.prototype, "progress");
|
|
93
|
+
a([
|
|
94
|
+
d("slot")
|
|
95
|
+
], i.prototype, "slotEl");
|
|
96
|
+
export {
|
|
97
|
+
i as L
|
|
98
|
+
};
|
|
@@ -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 u=require("./base-BjTwmyRF.cjs");/**
|
|
19
|
+
* @license
|
|
20
|
+
* Copyright 2017 Google LLC
|
|
21
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
+
*/function a(i,l){return(r,s,c)=>{const o=n=>{var e;return((e=n.renderRoot)==null?void 0:e.querySelector(i))??null};if(l){const{get:n,set:e}=typeof s=="object"?r:c??(()=>{const t=Symbol();return{get(){return this[t]},set(h){this[t]=h}}})();return u.e(r,s,{get(){let t=n.call(this);return t===void 0&&(t=o(this),(t!==null||this.hasUpdated)&&e.call(this,t)),t}})}return u.e(r,s,{get(){return o(this)}})}}exports.e=a;
|
|
@@ -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 h=require("lit"),e=require("../base-BCmA9Wxv.cjs"),b=require("../focus-visible-B0P9aY_G.cjs"),v=require("../sized-mixin-BSYHt8nT.cjs"),p=require("../roving-tabindex-By_fCy_e.cjs"),m=require("../query-assigned-nodes-BcKWmGzy.cjs"),f=require("../field-group-TUFvhJkk.cjs"),z='@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 g=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&&g(o,t,r),r};class a extends v.SizedMixin(b.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[h.unsafeCSS(z)]}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 h.html`
|
|
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 x=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&&x(o,t,r),r};class s extends b.FocusVisiblePolyfillMixin(f.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([m.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,192 @@
|
|
|
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 { unsafeCSS as m, html as z } from "lit";
|
|
19
|
+
import { L as v, n as i } from "../base-nYalvNMy.js";
|
|
20
|
+
import { F as h } from "../focus-visible-DBlJGoEW.js";
|
|
21
|
+
import { S as p } from "../sized-mixin-Dl0KoEcV.js";
|
|
22
|
+
import { R as f } from "../roving-tabindex-DOg4z6ZU.js";
|
|
23
|
+
import { n as g } from "../query-assigned-nodes-C76XVPWY.js";
|
|
24
|
+
import { L as x } from "../field-group-CBWafIUV.js";
|
|
25
|
+
const b = () => {
|
|
26
|
+
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
27
|
+
const e = document.createElement("style");
|
|
28
|
+
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);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
b();
|
|
32
|
+
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%)}';
|
|
33
|
+
var y = Object.defineProperty, d = (e, o, t, n) => {
|
|
34
|
+
for (var r = void 0, a = e.length - 1, c; a >= 0; a--)
|
|
35
|
+
(c = e[a]) && (r = c(o, t, r) || r);
|
|
36
|
+
return r && y(o, t, r), r;
|
|
37
|
+
};
|
|
38
|
+
class l extends p(
|
|
39
|
+
h(v),
|
|
40
|
+
{ noDefaultSize: !0 }
|
|
41
|
+
) {
|
|
42
|
+
constructor() {
|
|
43
|
+
super(...arguments), this.autofocus = !1, this.value = "", this.checked = !1, this.disabled = !1, this.emphasized = !1, this.invalid = !1, this.readonly = !1;
|
|
44
|
+
}
|
|
45
|
+
static get styles() {
|
|
46
|
+
return [m(k)];
|
|
47
|
+
}
|
|
48
|
+
click() {
|
|
49
|
+
this.disabled || this.activate();
|
|
50
|
+
}
|
|
51
|
+
manageAutoFocus() {
|
|
52
|
+
this.autofocus && (this.dispatchEvent(
|
|
53
|
+
new KeyboardEvent("keydown", {
|
|
54
|
+
code: "Tab"
|
|
55
|
+
})
|
|
56
|
+
), this.focus());
|
|
57
|
+
}
|
|
58
|
+
activate() {
|
|
59
|
+
this.checked || (this.checked = !0, this.dispatchEvent(
|
|
60
|
+
new Event("change", {
|
|
61
|
+
bubbles: !0,
|
|
62
|
+
composed: !0
|
|
63
|
+
})
|
|
64
|
+
));
|
|
65
|
+
}
|
|
66
|
+
handleKeyup(o) {
|
|
67
|
+
o.code === "Space" && this.activate();
|
|
68
|
+
}
|
|
69
|
+
render() {
|
|
70
|
+
return z`
|
|
71
|
+
<div id="input"></div>
|
|
72
|
+
<span id="button"></span>
|
|
73
|
+
<span id="label" role="presentation"><slot></slot></span>
|
|
74
|
+
`;
|
|
75
|
+
}
|
|
76
|
+
firstUpdated(o) {
|
|
77
|
+
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);
|
|
78
|
+
}
|
|
79
|
+
updated(o) {
|
|
80
|
+
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"));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
d([
|
|
84
|
+
i({ type: Boolean })
|
|
85
|
+
], l.prototype, "autofocus");
|
|
86
|
+
d([
|
|
87
|
+
i({ type: String, reflect: !0 })
|
|
88
|
+
], l.prototype, "value");
|
|
89
|
+
d([
|
|
90
|
+
i({ type: Boolean, reflect: !0 })
|
|
91
|
+
], l.prototype, "checked");
|
|
92
|
+
d([
|
|
93
|
+
i({ type: Boolean, reflect: !0 })
|
|
94
|
+
], l.prototype, "disabled");
|
|
95
|
+
d([
|
|
96
|
+
i({ type: Boolean, reflect: !0 })
|
|
97
|
+
], l.prototype, "emphasized");
|
|
98
|
+
d([
|
|
99
|
+
i({ type: Boolean, reflect: !0 })
|
|
100
|
+
], l.prototype, "invalid");
|
|
101
|
+
d([
|
|
102
|
+
i({ type: Boolean, reflect: !0 })
|
|
103
|
+
], l.prototype, "readonly");
|
|
104
|
+
var w = Object.defineProperty, u = (e, o, t, n) => {
|
|
105
|
+
for (var r = void 0, a = e.length - 1, c; a >= 0; a--)
|
|
106
|
+
(c = e[a]) && (r = c(o, t, r) || r);
|
|
107
|
+
return r && w(o, t, r), r;
|
|
108
|
+
};
|
|
109
|
+
class s extends h(
|
|
110
|
+
x
|
|
111
|
+
) {
|
|
112
|
+
constructor() {
|
|
113
|
+
super(...arguments), this.name = "", this.rovingTabindexController = new f(this, {
|
|
114
|
+
focusInIndex: (o) => o.findIndex(
|
|
115
|
+
(t) => this.selected ? !t.disabled && t.value === this.selected : !t.disabled
|
|
116
|
+
),
|
|
117
|
+
elementEnterAction: (o) => {
|
|
118
|
+
this._setSelected(o.value);
|
|
119
|
+
},
|
|
120
|
+
elements: () => this.buttons,
|
|
121
|
+
isFocusableElement: (o) => !o.disabled
|
|
122
|
+
}), this.selected = "";
|
|
123
|
+
}
|
|
124
|
+
get buttons() {
|
|
125
|
+
return this.defaultNodes.filter(
|
|
126
|
+
(o) => o instanceof l
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
focus() {
|
|
130
|
+
this.rovingTabindexController.focus();
|
|
131
|
+
}
|
|
132
|
+
_setSelected(o) {
|
|
133
|
+
if (o === this.selected)
|
|
134
|
+
return;
|
|
135
|
+
const t = this.selected, n = o ? this.querySelector(`luzmo-radio[value="${o}"]`) : void 0;
|
|
136
|
+
if (this.selected = n ? o : "", !this.dispatchEvent(
|
|
137
|
+
new Event("change", {
|
|
138
|
+
cancelable: !0,
|
|
139
|
+
bubbles: !0,
|
|
140
|
+
composed: !0
|
|
141
|
+
})
|
|
142
|
+
)) {
|
|
143
|
+
this.selected = t;
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
this.validateRadios();
|
|
147
|
+
}
|
|
148
|
+
willUpdate(o) {
|
|
149
|
+
if (!this.hasUpdated) {
|
|
150
|
+
this.setAttribute("role", "radiogroup");
|
|
151
|
+
const t = this.querySelector(
|
|
152
|
+
"luzmo-radio[checked]"
|
|
153
|
+
), n = t ? t.value : "";
|
|
154
|
+
if (this.selected = n || this.selected, this.selected && this.selected !== n) {
|
|
155
|
+
const r = this.querySelector(
|
|
156
|
+
`luzmo-radio[value="${this.selected}"]`
|
|
157
|
+
);
|
|
158
|
+
r && (r.checked = !0);
|
|
159
|
+
}
|
|
160
|
+
this.shadowRoot.addEventListener("change", (r) => {
|
|
161
|
+
r.stopPropagation();
|
|
162
|
+
const a = r.target;
|
|
163
|
+
this._setSelected(a.value);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
o.has("selected") && this.validateRadios();
|
|
167
|
+
}
|
|
168
|
+
async validateRadios() {
|
|
169
|
+
let o = !1;
|
|
170
|
+
this.hasUpdated || await this.updateComplete, this.buttons.map((t) => {
|
|
171
|
+
t.checked = this.selected === t.value, o = o || t.checked;
|
|
172
|
+
}), o || (this.selected = "");
|
|
173
|
+
}
|
|
174
|
+
handleSlotchange() {
|
|
175
|
+
this.rovingTabindexController.clearElementCache();
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
u([
|
|
179
|
+
i({ type: String })
|
|
180
|
+
], s.prototype, "name");
|
|
181
|
+
u([
|
|
182
|
+
g()
|
|
183
|
+
], s.prototype, "defaultNodes");
|
|
184
|
+
u([
|
|
185
|
+
i({ reflect: !0 })
|
|
186
|
+
], s.prototype, "selected");
|
|
187
|
+
customElements.get("luzmo-radio") || customElements.define("luzmo-radio", l);
|
|
188
|
+
customElements.get("luzmo-radio-group") || customElements.define("luzmo-radio-group", s);
|
|
189
|
+
export {
|
|
190
|
+
l as LuzmoRadio,
|
|
191
|
+
s as LuzmoRadioGroup
|
|
192
|
+
};
|
|
@@ -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;
|