@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.
Files changed (179) hide show
  1. package/lib/accordion/index.cjs +43 -0
  2. package/lib/accordion/index.js +182 -0
  3. package/lib/action-bar/index.cjs +39 -0
  4. package/lib/action-bar/index.js +108 -0
  5. package/lib/action-button/index.cjs +24 -0
  6. package/lib/action-button/index.js +162 -0
  7. package/lib/action-group/index.cjs +18 -0
  8. package/lib/action-group/index.js +29 -0
  9. package/lib/action-group-BoIH8s8R.js +259 -0
  10. package/lib/action-group-D4MxBrq8.cjs +20 -0
  11. package/lib/action-menu/index.cjs +56 -0
  12. package/lib/action-menu/index.js +127 -0
  13. package/lib/async-directive-CV2MII86.cjs +22 -0
  14. package/lib/async-directive-FGzMycjH.js +82 -0
  15. package/lib/avatar/index.cjs +24 -0
  16. package/lib/avatar/index.js +82 -0
  17. package/lib/base-BCmA9Wxv.cjs +30 -0
  18. package/lib/base-BjTwmyRF.cjs +22 -0
  19. package/lib/base-D76d76ww.js +26 -0
  20. package/lib/base-nYalvNMy.js +390 -0
  21. package/lib/button/index.cjs +20 -0
  22. package/lib/button/index.js +128 -0
  23. package/lib/button-base-B0iB_JTv.cjs +25 -0
  24. package/lib/button-base-DgtT6sU5.js +143 -0
  25. package/lib/button-group/index.cjs +18 -0
  26. package/lib/button-group/index.js +60 -0
  27. package/lib/checkbox/index.cjs +25 -0
  28. package/lib/checkbox/index.js +97 -0
  29. package/lib/checkbox-mixin-DegQlk5C.js +71 -0
  30. package/lib/checkbox-mixin-H0Hm-VLk.cjs +27 -0
  31. package/lib/clear-button-Ap5H3UyH.js +54 -0
  32. package/lib/clear-button-D0djuaLb.cjs +18 -0
  33. package/lib/close-button-BrfeZvjk.cjs +18 -0
  34. package/lib/close-button-CGISEF33.js +52 -0
  35. package/lib/color-Bg3tYsAQ.js +178 -0
  36. package/lib/color-DphK4hwx.cjs +18 -0
  37. package/lib/color-area/index.cjs +80 -0
  38. package/lib/color-area/index.js +373 -0
  39. package/lib/color-field/index.cjs +23 -0
  40. package/lib/color-field/index.js +81 -0
  41. package/lib/color-handle/index.cjs +24 -0
  42. package/lib/color-handle/index.js +74 -0
  43. package/lib/color-loupe/index.cjs +18 -0
  44. package/lib/color-loupe/index.js +29 -0
  45. package/lib/color-loupe-BICpNqFs.cjs +56 -0
  46. package/lib/color-loupe-DBEApMDT.js +82 -0
  47. package/lib/color-menu/index.cjs +86 -0
  48. package/lib/color-menu/index.js +204 -0
  49. package/lib/color-picker/index.cjs +48 -0
  50. package/lib/color-picker/index.js +142 -0
  51. package/lib/color-slider/index.cjs +57 -0
  52. package/lib/color-slider/index.js +318 -0
  53. package/lib/condition-attribute-with-id-DrQYZzFS.cjs +18 -0
  54. package/lib/condition-attribute-with-id-Dv4lSRbe.js +31 -0
  55. package/lib/dependency-manger-C5HCkMMB.cjs +18 -0
  56. package/lib/dependency-manger-CEXvGQUV.js +54 -0
  57. package/lib/directive-C7oCP5Bh.cjs +22 -0
  58. package/lib/directive-helpers-BLDZnGQv.js +28 -0
  59. package/lib/directive-helpers-C2vOfhFx.cjs +22 -0
  60. package/lib/directive-oAbCiebi.js +44 -0
  61. package/lib/divider/index.cjs +18 -0
  62. package/lib/divider/index.js +62 -0
  63. package/lib/divider.module-CXMNveQc.cjs +18 -0
  64. package/lib/divider.module-DwOuLGU3.js +21 -0
  65. package/lib/element-resolution-BvRLGqIU.cjs +18 -0
  66. package/lib/element-resolution-FCUT-wql.js +91 -0
  67. package/lib/field-group/index.cjs +18 -0
  68. package/lib/field-group/index.js +29 -0
  69. package/lib/field-group-CBWafIUV.js +67 -0
  70. package/lib/field-group-TUFvhJkk.cjs +23 -0
  71. package/lib/field-label/index.cjs +18 -0
  72. package/lib/field-label/index.js +29 -0
  73. package/lib/field-label-BK_tk8vP.js +107 -0
  74. package/lib/field-label-BrJaeORz.cjs +25 -0
  75. package/lib/focus-group-DHeTq18L.js +218 -0
  76. package/lib/focus-group-DnxZUBhQ.cjs +18 -0
  77. package/lib/focus-visible-B0P9aY_G.cjs +18 -0
  78. package/lib/focus-visible-DBlJGoEW.js +74 -0
  79. package/lib/focusable-DbUg-3Vp.js +153 -0
  80. package/lib/focusable-Dv_6CFaY.cjs +18 -0
  81. package/lib/focusable-selectors-B4YgbghQ.js +31 -0
  82. package/lib/focusable-selectors-BgFlyFcY.cjs +18 -0
  83. package/lib/icon/index.cjs +18 -0
  84. package/lib/icon/index.js +89 -0
  85. package/lib/if-defined-CYpcjGCb.js +27 -0
  86. package/lib/if-defined-Cv6xanXh.cjs +22 -0
  87. package/lib/index-C1chwzNp.js +727 -0
  88. package/lib/index-DCKCHDTt.cjs +18 -0
  89. package/lib/index-ovT-qVzf.js +928 -0
  90. package/lib/index-yNcLzjhM.cjs +77 -0
  91. package/lib/index.cjs +18 -0
  92. package/lib/index.js +133 -0
  93. package/lib/infield-button/index.cjs +22 -0
  94. package/lib/infield-button/index.js +65 -0
  95. package/lib/label/index.cjs +18 -0
  96. package/lib/label/index.js +52 -0
  97. package/lib/legend-position/index.cjs +27 -0
  98. package/lib/legend-position/index.js +85 -0
  99. package/lib/like-anchor-K8W0QYwC.cjs +32 -0
  100. package/lib/like-anchor-cDeGGeHh.js +70 -0
  101. package/lib/lit-html-B3ugcwD9.js +248 -0
  102. package/lib/lit-html-p4Oxv2-5.cjs +24 -0
  103. package/lib/manage-help-text-2mSEy-AD.js +92 -0
  104. package/lib/manage-help-text-iOk-zmy8.cjs +30 -0
  105. package/lib/menu/index.cjs +18 -0
  106. package/lib/menu/index.js +32 -0
  107. package/lib/multi-language-field/index.cjs +39 -0
  108. package/lib/multi-language-field/index.js +149 -0
  109. package/lib/mutation-controller-DH7YOCyj.js +52 -0
  110. package/lib/mutation-controller-DkOMCW-c.cjs +22 -0
  111. package/lib/number-field/index.cjs +57 -0
  112. package/lib/number-field/index.js +736 -0
  113. package/lib/observe-slot-text-BmsCNJig.cjs +18 -0
  114. package/lib/observe-slot-text-BoFRF-VI.js +87 -0
  115. package/lib/overlay/index.cjs +73 -0
  116. package/lib/overlay/index.js +325 -0
  117. package/lib/overlay-C7QKFqRc.js +2702 -0
  118. package/lib/overlay-DScraBAi.cjs +47 -0
  119. package/lib/pending-state-D5KTK4_1.js +61 -0
  120. package/lib/pending-state-Dbc2HIM2.cjs +26 -0
  121. package/lib/picker/index.cjs +18 -0
  122. package/lib/picker/index.js +32 -0
  123. package/lib/picker--2OCYWnV.js +657 -0
  124. package/lib/picker-B9W7Haf4.cjs +127 -0
  125. package/lib/platform-CQzYNWKq.cjs +18 -0
  126. package/lib/platform-DQYMG7JI.js +54 -0
  127. package/lib/popover/index.cjs +18 -0
  128. package/lib/popover/index.js +29 -0
  129. package/lib/popover-CVbjhSnx.cjs +30 -0
  130. package/lib/popover-ZRVxogyp.js +68 -0
  131. package/lib/progress-circle/index.cjs +18 -0
  132. package/lib/progress-circle/index.js +29 -0
  133. package/lib/progress-circle-CiJoS8J7.cjs +33 -0
  134. package/lib/progress-circle-DpXiqW6a.js +98 -0
  135. package/lib/query-BL-TJj7K.cjs +22 -0
  136. package/lib/query-D_KR_GUc.js +51 -0
  137. package/lib/query-assigned-elements-DjfhL1cl.js +36 -0
  138. package/lib/query-assigned-elements-DsKsfk7G.cjs +22 -0
  139. package/lib/query-assigned-nodes-BcKWmGzy.cjs +22 -0
  140. package/lib/query-assigned-nodes-C76XVPWY.js +36 -0
  141. package/lib/radio/index.cjs +22 -0
  142. package/lib/radio/index.js +192 -0
  143. package/lib/random-id-ByCz1xaq.js +26 -0
  144. package/lib/random-id-CqvckpWe.cjs +18 -0
  145. package/lib/roving-tabindex-By_fCy_e.cjs +18 -0
  146. package/lib/roving-tabindex-DOg4z6ZU.js +66 -0
  147. package/lib/search/index.cjs +45 -0
  148. package/lib/search/index.js +132 -0
  149. package/lib/sized-mixin-BSYHt8nT.cjs +18 -0
  150. package/lib/sized-mixin-Dl0KoEcV.js +63 -0
  151. package/lib/slider/index.cjs +18 -0
  152. package/lib/slider/index.js +1159 -0
  153. package/lib/slottable-request-event-BfUUt1Mh.cjs +18 -0
  154. package/lib/slottable-request-event-DggLA4Rx.js +31 -0
  155. package/lib/state-BAO-13Bs.js +29 -0
  156. package/lib/state-DReJ3hB6.cjs +22 -0
  157. package/lib/streaming-listener-Bw4jE33f.cjs +18 -0
  158. package/lib/streaming-listener-DLo0wkMc.js +125 -0
  159. package/lib/style-map-BjBGQ_u3.cjs +22 -0
  160. package/lib/style-map-BqvQDFJt.js +53 -0
  161. package/lib/swatch/index.cjs +49 -0
  162. package/lib/swatch/index.js +343 -0
  163. package/lib/switch/index.cjs +22 -0
  164. package/lib/switch/index.js +74 -0
  165. package/lib/tags/index.cjs +32 -0
  166. package/lib/tags/index.js +174 -0
  167. package/lib/text-field/index.cjs +21 -0
  168. package/lib/text-field/index.js +62 -0
  169. package/lib/text-field-C6Aa7XOb.cjs +85 -0
  170. package/lib/text-field-DPk332j9.js +315 -0
  171. package/lib/toast/index.cjs +51 -0
  172. package/lib/toast/index.js +154 -0
  173. package/lib/tooltip/index.cjs +45 -0
  174. package/lib/tooltip/index.js +221 -0
  175. package/lib/unit-input/index.cjs +43 -0
  176. package/lib/unit-input/index.js +184 -0
  177. package/lib/when-CDK1Tt5Y.js +28 -0
  178. package/lib/when-CDZyJPvd.cjs +22 -0
  179. package/package.json +2 -2
@@ -0,0 +1,29 @@
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 { F as r } from "../field-label-BK_tk8vP.js";
19
+ const l = () => {
20
+ if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
21
+ const o = document.createElement("style");
22
+ o.setAttribute("data-luzmo-vars", ""), o.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(o);
23
+ }
24
+ };
25
+ l();
26
+ customElements.get("luzmo-field-label") || customElements.define("luzmo-field-label", r);
27
+ export {
28
+ r as FieldLabel
29
+ };
@@ -0,0 +1,107 @@
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 b, n as r } from "./base-nYalvNMy.js";
19
+ import { c as g, a as m } from "./condition-attribute-with-id-Dv4lSRbe.js";
20
+ import { r as h } from "./random-id-ByCz1xaq.js";
21
+ import { E as c, e as u } from "./element-resolution-FCUT-wql.js";
22
+ import { S as p } from "./sized-mixin-Dl0KoEcV.js";
23
+ import { unsafeCSS as v, nothing as z, html as d } from "lit";
24
+ import { e as x } from "./query-D_KR_GUc.js";
25
+ const k = ":host{box-sizing:border-box;min-block-size:var(--luzmo-field-label-min-height, var(--field-label-min-height));padding-block:var(--luzmo-field-label-padding-block, var(--luzmo-field-label-top-to-text, var(--field-label-top-to-text)) var(--luzmo-field-label-bottom-to-text, var(--field-label-bottom-to-text)));padding-inline:0;padding-inline:var(--luzmo-field-label-padding-inline, 0);margin-block:0;margin-block:var(--luzmo-field-label-margin-block, var(--luzmo-field-label-margin-block-start, 0) var(--luzmo-field-label-margin-block-end, 0));margin-inline:0;margin-inline:var(--luzmo-field-label-margin-inline, var(--luzmo-field-label-margin-inline-start, 0) var(--luzmo-field-label-margin-inline-end, 0));font-size:var(--luzmo-field-label-font-size, var(--field-label-font-size));font-weight:var(--luzmo-field-label-font-weight, var(--field-label-font-weight));line-height:var(--luzmo-field-label-line-height, var(--field-label-line-height));-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto;color:var(--luzmo-field-label-color, var(--field-label-color));display:block;font-family:var(--luzmo-field-label-font-family, var(--luzmo-font-family))}:host(:lang(ja)),:host(:lang(ko)),:host(:lang(zh)){--luzmo-field-label-line-height: var( --luzmo-field-label-line-height-cjk, var(--field-label-line-height-cjk) )}:host([disabled]),:host([disabled]) .required-icon{--luzmo-field-label-color: var( --highcontrast-field-label-disabled-content-color, var( --luzmo-disabled-content-color, var(--field-label-disabled-content-color) ) )}.required-icon{display:inline-block;margin-block:0;margin-inline:var(--luzmo-field-label-text-to-asterisk, var(--field-label-text-to-asterisk)) 0;vertical-align:initial;vertical-align:var(--luzmo-field-label-asterisk-vertical-align, baseline)}:host([side-aligned=start]),:host([side-aligned=end]){vertical-align:top;margin-block-start:0;margin-block-end:0;margin-inline-end:var(--luzmo-field-label-side-padding-right, var(--field-label-side-padding-right));display:inline-flex;align-items:center;font-size:var(--luzmo-field-label-side-aligned-font-size, var(--field-label-side-aligned-font-size));block-size:var(--luzmo-field-label-side-aligned-height, var(--field-label-side-aligned-height))}:host([side-aligned=end]){text-align:end}@media (forced-colors: active){:host{--highcontrast-field-label-disabled-content-color: GrayText}}:host{--field-label-color: var(--luzmo-font-color);--field-label-font-weight: var(--luzmo-font-weight);--field-label-line-height: var(--luzmo-line-height);--field-label-line-height-cjk: 1.5;--field-label-disabled-content-color: var(--luzmo-font-color-disabled)}:host{--field-label-min-height: var(--luzmo-component-height-xs);--field-label-side-aligned-height: var(--luzmo-component-height);--field-label-top-to-text: calc(var(--luzmo-spacing-2));--field-label-bottom-to-text: var(--luzmo-spacing-2);--field-label-side-aligned-font-size: var(--luzmo-font-size);--field-label-font-size: var(--luzmo-font-size-s);--field-label-side-padding-right: var(--luzmo-spacing-4);--field-label-text-to-asterisk: 0px}:host([size=s]){--field-label-min-height: var(--luzmo-component-height-xxs);--field-label-side-aligned-height: var(--luzmo-component-height-s);--field-label-top-to-text: calc(var(--luzmo-spacing-1));--field-label-bottom-to-text: var(--luzmo-spacing-1);--field-label-side-aligned-font-size: var(--luzmo-font-size-s);--field-label-font-size: var(--luzmo-font-size-xs);--field-label-side-padding-right: var(--luzmo-spacing-3);--field-label-text-to-asterisk: 0px}:host([size=l]){--field-label-min-height: var(--luzmo-component-height-xs);--field-label-side-aligned-height: var(--luzmo-component-height-l);--field-label-top-to-text: var(--luzmo-spacing-3);--field-label-bottom-to-text: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--field-label-side-aligned-font-size: var(--luzmo-font-size-l);--field-label-font-size: var(--luzmo-font-size);--field-label-side-padding-right: var(--luzmo-spacing-4);--field-label-text-to-asterisk: var(--luzmo-spacing-1)}:host([size=xl]){--field-label-min-height: var(--luzmo-component-height-s);--field-label-side-aligned-height: var(--luzmo-component-height-xl);--field-label-top-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--field-label-bottom-to-text: var(--luzmo-spacing-3);--field-label-side-aligned-font-size: var(--luzmo-font-size-xl);--field-label-font-size: var(--luzmo-font-size-l);--field-label-side-padding-right: var(--luzmo-spacing-4);--field-label-text-to-asterisk: var(--luzmo-spacing-1)}label{display:inline-block}";
26
+ var y = Object.defineProperty, o = (s, e, t, l) => {
27
+ for (var i = void 0, a = s.length - 1, f; a >= 0; a--)
28
+ (f = s[a]) && (i = f(e, t, i) || i);
29
+ return i && y(e, t, i), i;
30
+ };
31
+ const w = () => d`
32
+ <div class="icon-container required-icon">*</div>
33
+ `;
34
+ class n extends p(b, {
35
+ noDefaultSize: !0
36
+ }) {
37
+ constructor() {
38
+ super(...arguments), this.disabled = !1, this.id = "", this.for = "", this.required = !1, this.resolvedElement = new c(this);
39
+ }
40
+ static get styles() {
41
+ return [v(k)];
42
+ }
43
+ handleClick(e) {
44
+ if (!this.target || this.disabled || e.defaultPrevented)
45
+ return;
46
+ this.target.focus();
47
+ const t = this.getRootNode(), l = this.target, i = l.getRootNode(), a = i.host;
48
+ i === t && l.forceFocusVisible ? l.forceFocusVisible() : a && a.forceFocusVisible && a.forceFocusVisible();
49
+ }
50
+ applyTargetLabel(e) {
51
+ if (this.target = e || this.target, this.target) {
52
+ const t = this.target.applyFocusElementLabel, l = this.target.focusElement || this.target, i = l.getRootNode();
53
+ t !== void 0 ? t(this.labelText, this) : i === this.getRootNode() ? (e ? g : m)(l, "aria-labelledby", [this.id]) : e ? l.setAttribute("aria-label", this.labelText) : l.removeAttribute("aria-label");
54
+ }
55
+ }
56
+ async manageTarget() {
57
+ this.applyTargetLabel();
58
+ const e = this.resolvedElement.element;
59
+ if (!e) {
60
+ this.target = e;
61
+ return;
62
+ }
63
+ e.localName.search("-") > 0 && await customElements.whenDefined(e.localName), e.updateComplete !== void 0 && await e.updateComplete, this.applyTargetLabel(e);
64
+ }
65
+ get labelText() {
66
+ const e = this.slotEl.assignedNodes({ flatten: !0 });
67
+ return e.length === 0 ? "" : e.map(
68
+ (l) => (l.textContent || /* c8 ignore next */
69
+ "").trim()
70
+ ).join(" ");
71
+ }
72
+ render() {
73
+ return d`
74
+ <label>
75
+ <slot></slot>
76
+ ${this.required ? d` ${w()} ` : z}
77
+ </label>
78
+ `;
79
+ }
80
+ firstUpdated(e) {
81
+ super.firstUpdated(e), this.addEventListener("click", this.handleClick);
82
+ }
83
+ willUpdate(e) {
84
+ this.hasAttribute("id") || this.setAttribute("id", `${this.tagName.toLowerCase()}-${h()}`), e.has("for") && (this.resolvedElement.selector = this.for ? `#${this.for}` : ""), (e.has("id") || e.has(u)) && this.manageTarget();
85
+ }
86
+ }
87
+ o([
88
+ r({ type: Boolean, reflect: !0 })
89
+ ], n.prototype, "disabled");
90
+ o([
91
+ r({ type: String })
92
+ ], n.prototype, "id");
93
+ o([
94
+ r({ type: String })
95
+ ], n.prototype, "for");
96
+ o([
97
+ r({ type: Boolean, reflect: !0 })
98
+ ], n.prototype, "required");
99
+ o([
100
+ x("slot")
101
+ ], n.prototype, "slotEl");
102
+ o([
103
+ r({ type: String, reflect: !0, attribute: "side-aligned" })
104
+ ], n.prototype, "sideAligned");
105
+ export {
106
+ n as F
107
+ };
@@ -0,0 +1,25 @@
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 n=require("./base-BCmA9Wxv.cjs"),b=require("./condition-attribute-with-id-DrQYZzFS.cjs"),h=require("./random-id-CqvckpWe.cjs"),g=require("./element-resolution-BvRLGqIU.cjs"),c=require("./sized-mixin-BSYHt8nT.cjs"),s=require("lit"),m=require("./query-BL-TJj7K.cjs"),u=":host{box-sizing:border-box;min-block-size:var(--luzmo-field-label-min-height, var(--field-label-min-height));padding-block:var(--luzmo-field-label-padding-block, var(--luzmo-field-label-top-to-text, var(--field-label-top-to-text)) var(--luzmo-field-label-bottom-to-text, var(--field-label-bottom-to-text)));padding-inline:0;padding-inline:var(--luzmo-field-label-padding-inline, 0);margin-block:0;margin-block:var(--luzmo-field-label-margin-block, var(--luzmo-field-label-margin-block-start, 0) var(--luzmo-field-label-margin-block-end, 0));margin-inline:0;margin-inline:var(--luzmo-field-label-margin-inline, var(--luzmo-field-label-margin-inline-start, 0) var(--luzmo-field-label-margin-inline-end, 0));font-size:var(--luzmo-field-label-font-size, var(--field-label-font-size));font-weight:var(--luzmo-field-label-font-weight, var(--field-label-font-weight));line-height:var(--luzmo-field-label-line-height, var(--field-label-line-height));-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto;color:var(--luzmo-field-label-color, var(--field-label-color));display:block;font-family:var(--luzmo-field-label-font-family, var(--luzmo-font-family))}:host(:lang(ja)),:host(:lang(ko)),:host(:lang(zh)){--luzmo-field-label-line-height: var( --luzmo-field-label-line-height-cjk, var(--field-label-line-height-cjk) )}:host([disabled]),:host([disabled]) .required-icon{--luzmo-field-label-color: var( --highcontrast-field-label-disabled-content-color, var( --luzmo-disabled-content-color, var(--field-label-disabled-content-color) ) )}.required-icon{display:inline-block;margin-block:0;margin-inline:var(--luzmo-field-label-text-to-asterisk, var(--field-label-text-to-asterisk)) 0;vertical-align:initial;vertical-align:var(--luzmo-field-label-asterisk-vertical-align, baseline)}:host([side-aligned=start]),:host([side-aligned=end]){vertical-align:top;margin-block-start:0;margin-block-end:0;margin-inline-end:var(--luzmo-field-label-side-padding-right, var(--field-label-side-padding-right));display:inline-flex;align-items:center;font-size:var(--luzmo-field-label-side-aligned-font-size, var(--field-label-side-aligned-font-size));block-size:var(--luzmo-field-label-side-aligned-height, var(--field-label-side-aligned-height))}:host([side-aligned=end]){text-align:end}@media (forced-colors: active){:host{--highcontrast-field-label-disabled-content-color: GrayText}}:host{--field-label-color: var(--luzmo-font-color);--field-label-font-weight: var(--luzmo-font-weight);--field-label-line-height: var(--luzmo-line-height);--field-label-line-height-cjk: 1.5;--field-label-disabled-content-color: var(--luzmo-font-color-disabled)}:host{--field-label-min-height: var(--luzmo-component-height-xs);--field-label-side-aligned-height: var(--luzmo-component-height);--field-label-top-to-text: calc(var(--luzmo-spacing-2));--field-label-bottom-to-text: var(--luzmo-spacing-2);--field-label-side-aligned-font-size: var(--luzmo-font-size);--field-label-font-size: var(--luzmo-font-size-s);--field-label-side-padding-right: var(--luzmo-spacing-4);--field-label-text-to-asterisk: 0px}:host([size=s]){--field-label-min-height: var(--luzmo-component-height-xxs);--field-label-side-aligned-height: var(--luzmo-component-height-s);--field-label-top-to-text: calc(var(--luzmo-spacing-1));--field-label-bottom-to-text: var(--luzmo-spacing-1);--field-label-side-aligned-font-size: var(--luzmo-font-size-s);--field-label-font-size: var(--luzmo-font-size-xs);--field-label-side-padding-right: var(--luzmo-spacing-3);--field-label-text-to-asterisk: 0px}:host([size=l]){--field-label-min-height: var(--luzmo-component-height-xs);--field-label-side-aligned-height: var(--luzmo-component-height-l);--field-label-top-to-text: var(--luzmo-spacing-3);--field-label-bottom-to-text: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--field-label-side-aligned-font-size: var(--luzmo-font-size-l);--field-label-font-size: var(--luzmo-font-size);--field-label-side-padding-right: var(--luzmo-spacing-4);--field-label-text-to-asterisk: var(--luzmo-spacing-1)}:host([size=xl]){--field-label-min-height: var(--luzmo-component-height-s);--field-label-side-aligned-height: var(--luzmo-component-height-xl);--field-label-top-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--field-label-bottom-to-text: var(--luzmo-spacing-3);--field-label-side-aligned-font-size: var(--luzmo-font-size-xl);--field-label-font-size: var(--luzmo-font-size-l);--field-label-side-padding-right: var(--luzmo-spacing-4);--field-label-text-to-asterisk: var(--luzmo-spacing-1)}label{display:inline-block}";var z=Object.defineProperty,r=(d,e,t,l)=>{for(var i=void 0,a=d.length-1,f;a>=0;a--)(f=d[a])&&(i=f(e,t,i)||i);return i&&z(e,t,i),i};const v=()=>s.html`
19
+ <div class="icon-container required-icon">*</div>
20
+ `;class o extends c.SizedMixin(n.LuzmoElement,{noDefaultSize:!0}){constructor(){super(...arguments),this.disabled=!1,this.id="",this.for="",this.required=!1,this.resolvedElement=new g.ElementResolutionController(this)}static get styles(){return[s.unsafeCSS(u)]}handleClick(e){if(!this.target||this.disabled||e.defaultPrevented)return;this.target.focus();const t=this.getRootNode(),l=this.target,i=l.getRootNode(),a=i.host;i===t&&l.forceFocusVisible?l.forceFocusVisible():a&&a.forceFocusVisible&&a.forceFocusVisible()}applyTargetLabel(e){if(this.target=e||this.target,this.target){const t=this.target.applyFocusElementLabel,l=this.target.focusElement||this.target,i=l.getRootNode();t!==void 0?t(this.labelText,this):i===this.getRootNode()?(e?b.conditionAttributeWithId:b.conditionAttributeWithoutId)(l,"aria-labelledby",[this.id]):e?l.setAttribute("aria-label",this.labelText):l.removeAttribute("aria-label")}}async manageTarget(){this.applyTargetLabel();const e=this.resolvedElement.element;if(!e){this.target=e;return}e.localName.search("-")>0&&await customElements.whenDefined(e.localName),e.updateComplete!==void 0&&await e.updateComplete,this.applyTargetLabel(e)}get labelText(){const e=this.slotEl.assignedNodes({flatten:!0});return e.length===0?"":e.map(l=>(l.textContent||"").trim()).join(" ")}render(){return s.html`
21
+ <label>
22
+ <slot></slot>
23
+ ${this.required?s.html` ${v()} `:s.nothing}
24
+ </label>
25
+ `}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",this.handleClick)}willUpdate(e){this.hasAttribute("id")||this.setAttribute("id",`${this.tagName.toLowerCase()}-${h.randomID()}`),e.has("for")&&(this.resolvedElement.selector=this.for?`#${this.for}`:""),(e.has("id")||e.has(g.elementResolverUpdatedSymbol))&&this.manageTarget()}}r([n.n({type:Boolean,reflect:!0})],o.prototype,"disabled");r([n.n({type:String})],o.prototype,"id");r([n.n({type:String})],o.prototype,"for");r([n.n({type:Boolean,reflect:!0})],o.prototype,"required");r([m.e("slot")],o.prototype,"slotEl");r([n.n({type:String,reflect:!0,attribute:"side-aligned"})],o.prototype,"sideAligned");exports.FieldLabel=o;
@@ -0,0 +1,218 @@
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 d(o, e, t) {
19
+ return typeof o === e ? () => o : typeof o == "function" ? o : t;
20
+ }
21
+ class m {
22
+ constructor(e, {
23
+ direction: t,
24
+ elementEnterAction: i,
25
+ elements: r,
26
+ focusInIndex: c,
27
+ isFocusableElement: l,
28
+ listenerScope: u
29
+ } = { elements: () => [] }) {
30
+ this._currentIndex = -1, this.prevIndex = -1, this._direction = () => "both", this.directionLength = 5, this.elementEnterAction = (s) => {
31
+ }, this._focused = !1, this._focusInIndex = (s) => 0, this.isFocusableElement = (s) => !0, this._listenerScope = () => this.host, this.offset = 0, this.recentlyConnected = !1, this.handleFocusin = (s) => {
32
+ if (!this.isEventWithinListenerScope(s))
33
+ return;
34
+ const n = s.composedPath();
35
+ let h = -1;
36
+ n.find((a) => (h = this.elements.indexOf(a), h !== -1)), this.prevIndex = this.currentIndex, this.currentIndex = h > -1 ? h : this.currentIndex, this.isRelatedTargetOrContainAnElement(s) && this.hostContainsFocus();
37
+ }, this.handleClick = () => {
38
+ var h;
39
+ const s = this.elements;
40
+ if (s.length === 0)
41
+ return;
42
+ let n = s[this.currentIndex];
43
+ this.currentIndex < 0 || ((!n || !this.isFocusableElement(n)) && (this.setCurrentIndexCircularly(1), n = s[this.currentIndex]), n && this.isFocusableElement(n) && ((h = s[this.prevIndex]) == null || h.setAttribute("tabindex", "-1"), n.setAttribute("tabindex", "0")));
44
+ }, this.handleFocusout = (s) => {
45
+ this.isRelatedTargetOrContainAnElement(s) && this.hostNoLongerContainsFocus();
46
+ }, this.handleKeydown = (s) => {
47
+ if (!this.acceptsEventCode(s.code) || s.defaultPrevented)
48
+ return;
49
+ let n = 0;
50
+ switch (this.prevIndex = this.currentIndex, s.code) {
51
+ case "ArrowRight": {
52
+ n += 1;
53
+ break;
54
+ }
55
+ case "ArrowDown": {
56
+ n += this.direction === "grid" ? this.directionLength : 1;
57
+ break;
58
+ }
59
+ case "ArrowLeft": {
60
+ n -= 1;
61
+ break;
62
+ }
63
+ case "ArrowUp": {
64
+ n -= this.direction === "grid" ? this.directionLength : 1;
65
+ break;
66
+ }
67
+ case "End": {
68
+ this.currentIndex = 0, n -= 1;
69
+ break;
70
+ }
71
+ case "Home": {
72
+ this.currentIndex = this.elements.length - 1, n += 1;
73
+ break;
74
+ }
75
+ }
76
+ s.preventDefault(), this.direction === "grid" && this.currentIndex + n < 0 ? this.currentIndex = 0 : this.direction === "grid" && this.currentIndex + n > this.elements.length - 1 ? this.currentIndex = this.elements.length - 1 : this.setCurrentIndexCircularly(n), this.elementEnterAction(this.elements[this.currentIndex]), this.focus();
77
+ }, this.mutationObserver = new MutationObserver(() => {
78
+ this.handleItemMutation();
79
+ }), this.host = e, this.host.addController(this), this._elements = r, this.isFocusableElement = l || this.isFocusableElement, this._direction = d(
80
+ t,
81
+ "string",
82
+ this._direction
83
+ ), this.elementEnterAction = i || this.elementEnterAction, this._focusInIndex = d(
84
+ c,
85
+ "number",
86
+ this._focusInIndex
87
+ ), this._listenerScope = d(
88
+ u,
89
+ "object",
90
+ this._listenerScope
91
+ );
92
+ }
93
+ get currentIndex() {
94
+ return this._currentIndex === -1 && (this._currentIndex = this.focusInIndex), this._currentIndex - this.offset;
95
+ }
96
+ set currentIndex(e) {
97
+ this._currentIndex = e + this.offset;
98
+ }
99
+ get direction() {
100
+ return this._direction();
101
+ }
102
+ get elements() {
103
+ return this.cachedElements || (this.cachedElements = this._elements()), this.cachedElements;
104
+ }
105
+ set focused(e) {
106
+ e !== this.focused && (this._focused = e);
107
+ }
108
+ get focused() {
109
+ return this._focused;
110
+ }
111
+ get focusInElement() {
112
+ return this.elements[this.focusInIndex];
113
+ }
114
+ get focusInIndex() {
115
+ return this._focusInIndex(this.elements);
116
+ }
117
+ isEventWithinListenerScope(e) {
118
+ return this._listenerScope() === this.host ? !0 : e.composedPath().includes(this._listenerScope());
119
+ }
120
+ /* In handleItemMutation() method the first if condition is checking if the element is not focused or if the element's children's length is not decreasing then it means no element has been deleted and we must return.
121
+ Then we are checking if the deleted element was the focused one before the deletion if so then we need to proceed else we casn return;
122
+ */
123
+ handleItemMutation() {
124
+ if (this._currentIndex === -1 || this.elements.length <= this._elements().length)
125
+ return;
126
+ const e = this.elements[this.currentIndex];
127
+ if (this.clearElementCache(), this.elements.includes(e))
128
+ return;
129
+ const t = this.currentIndex !== this.elements.length, i = t ? 1 : -1;
130
+ t && this.setCurrentIndexCircularly(-1), this.setCurrentIndexCircularly(i), this.focus();
131
+ }
132
+ update({ elements: e } = { elements: () => [] }) {
133
+ this.unmanage(), this._elements = e, this.clearElementCache(), this.manage();
134
+ }
135
+ focus(e) {
136
+ var r;
137
+ const t = this.elements;
138
+ if (t.length === 0)
139
+ return;
140
+ let i = t[this.currentIndex];
141
+ (!i || !this.isFocusableElement(i)) && (this.setCurrentIndexCircularly(1), i = t[this.currentIndex]), i && this.isFocusableElement(i) && ((r = t[this.prevIndex]) == null || r.setAttribute("tabindex", "-1"), i.tabIndex = 0, i.focus(e));
142
+ }
143
+ clearElementCache(e = 0) {
144
+ this.mutationObserver.disconnect(), delete this.cachedElements, this.offset = e, requestAnimationFrame(() => {
145
+ this.elements.forEach((t) => {
146
+ this.mutationObserver.observe(t, {
147
+ attributes: !0
148
+ });
149
+ });
150
+ });
151
+ }
152
+ setCurrentIndexCircularly(e) {
153
+ const { length: t } = this.elements;
154
+ let i = t;
155
+ this.prevIndex = this.currentIndex;
156
+ let r = (t + this.currentIndex + e) % t;
157
+ for (
158
+ ;
159
+ // don't cycle the elements more than once
160
+ i && this.elements[r] && !this.isFocusableElement(this.elements[r]);
161
+ )
162
+ r = (t + r + e) % t, i -= 1;
163
+ this.currentIndex = r;
164
+ }
165
+ hostContainsFocus() {
166
+ this.host.addEventListener("focusout", this.handleFocusout), this.host.addEventListener("keydown", this.handleKeydown), this.focused = !0;
167
+ }
168
+ hostNoLongerContainsFocus() {
169
+ this.host.addEventListener("focusin", this.handleFocusin), this.host.removeEventListener("focusout", this.handleFocusout), this.host.removeEventListener("keydown", this.handleKeydown), this.focused = !1;
170
+ }
171
+ isRelatedTargetOrContainAnElement(e) {
172
+ const t = e.relatedTarget, i = this.elements.includes(t), r = this.elements.some(
173
+ (c) => c.contains(t)
174
+ );
175
+ return !(i || r);
176
+ }
177
+ acceptsEventCode(e) {
178
+ if (e === "End" || e === "Home")
179
+ return !0;
180
+ switch (this.direction) {
181
+ case "horizontal":
182
+ return e === "ArrowLeft" || e === "ArrowRight";
183
+ case "vertical":
184
+ return e === "ArrowUp" || e === "ArrowDown";
185
+ case "both":
186
+ case "grid":
187
+ return e.startsWith("Arrow");
188
+ }
189
+ }
190
+ manage() {
191
+ this.addEventListeners();
192
+ }
193
+ unmanage() {
194
+ this.removeEventListeners();
195
+ }
196
+ addEventListeners() {
197
+ this.host.addEventListener("focusin", this.handleFocusin), this.host.addEventListener("click", this.handleClick);
198
+ }
199
+ removeEventListeners() {
200
+ this.host.removeEventListener("focusin", this.handleFocusin), this.host.removeEventListener("focusout", this.handleFocusout), this.host.removeEventListener("keydown", this.handleKeydown), this.host.removeEventListener("click", this.handleClick);
201
+ }
202
+ hostConnected() {
203
+ this.recentlyConnected = !0, this.addEventListeners();
204
+ }
205
+ hostDisconnected() {
206
+ this.mutationObserver.disconnect(), this.removeEventListeners();
207
+ }
208
+ hostUpdated() {
209
+ this.recentlyConnected && (this.recentlyConnected = !1, this.elements.forEach((e) => {
210
+ this.mutationObserver.observe(e, {
211
+ attributes: !0
212
+ });
213
+ }));
214
+ }
215
+ }
216
+ export {
217
+ m as F
218
+ };
@@ -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 d(o,e,t){return typeof o===e?()=>o:typeof o=="function"?o:t}class m{constructor(e,{direction:t,elementEnterAction:i,elements:r,focusInIndex:c,isFocusableElement:l,listenerScope:u}={elements:()=>[]}){this._currentIndex=-1,this.prevIndex=-1,this._direction=()=>"both",this.directionLength=5,this.elementEnterAction=s=>{},this._focused=!1,this._focusInIndex=s=>0,this.isFocusableElement=s=>!0,this._listenerScope=()=>this.host,this.offset=0,this.recentlyConnected=!1,this.handleFocusin=s=>{if(!this.isEventWithinListenerScope(s))return;const n=s.composedPath();let h=-1;n.find(a=>(h=this.elements.indexOf(a),h!==-1)),this.prevIndex=this.currentIndex,this.currentIndex=h>-1?h:this.currentIndex,this.isRelatedTargetOrContainAnElement(s)&&this.hostContainsFocus()},this.handleClick=()=>{var h;const s=this.elements;if(s.length===0)return;let n=s[this.currentIndex];this.currentIndex<0||((!n||!this.isFocusableElement(n))&&(this.setCurrentIndexCircularly(1),n=s[this.currentIndex]),n&&this.isFocusableElement(n)&&((h=s[this.prevIndex])==null||h.setAttribute("tabindex","-1"),n.setAttribute("tabindex","0")))},this.handleFocusout=s=>{this.isRelatedTargetOrContainAnElement(s)&&this.hostNoLongerContainsFocus()},this.handleKeydown=s=>{if(!this.acceptsEventCode(s.code)||s.defaultPrevented)return;let n=0;switch(this.prevIndex=this.currentIndex,s.code){case"ArrowRight":{n+=1;break}case"ArrowDown":{n+=this.direction==="grid"?this.directionLength:1;break}case"ArrowLeft":{n-=1;break}case"ArrowUp":{n-=this.direction==="grid"?this.directionLength:1;break}case"End":{this.currentIndex=0,n-=1;break}case"Home":{this.currentIndex=this.elements.length-1,n+=1;break}}s.preventDefault(),this.direction==="grid"&&this.currentIndex+n<0?this.currentIndex=0:this.direction==="grid"&&this.currentIndex+n>this.elements.length-1?this.currentIndex=this.elements.length-1:this.setCurrentIndexCircularly(n),this.elementEnterAction(this.elements[this.currentIndex]),this.focus()},this.mutationObserver=new MutationObserver(()=>{this.handleItemMutation()}),this.host=e,this.host.addController(this),this._elements=r,this.isFocusableElement=l||this.isFocusableElement,this._direction=d(t,"string",this._direction),this.elementEnterAction=i||this.elementEnterAction,this._focusInIndex=d(c,"number",this._focusInIndex),this._listenerScope=d(u,"object",this._listenerScope)}get currentIndex(){return this._currentIndex===-1&&(this._currentIndex=this.focusInIndex),this._currentIndex-this.offset}set currentIndex(e){this._currentIndex=e+this.offset}get direction(){return this._direction()}get elements(){return this.cachedElements||(this.cachedElements=this._elements()),this.cachedElements}set focused(e){e!==this.focused&&(this._focused=e)}get focused(){return this._focused}get focusInElement(){return this.elements[this.focusInIndex]}get focusInIndex(){return this._focusInIndex(this.elements)}isEventWithinListenerScope(e){return this._listenerScope()===this.host?!0:e.composedPath().includes(this._listenerScope())}handleItemMutation(){if(this._currentIndex===-1||this.elements.length<=this._elements().length)return;const e=this.elements[this.currentIndex];if(this.clearElementCache(),this.elements.includes(e))return;const t=this.currentIndex!==this.elements.length,i=t?1:-1;t&&this.setCurrentIndexCircularly(-1),this.setCurrentIndexCircularly(i),this.focus()}update({elements:e}={elements:()=>[]}){this.unmanage(),this._elements=e,this.clearElementCache(),this.manage()}focus(e){var r;const t=this.elements;if(t.length===0)return;let i=t[this.currentIndex];(!i||!this.isFocusableElement(i))&&(this.setCurrentIndexCircularly(1),i=t[this.currentIndex]),i&&this.isFocusableElement(i)&&((r=t[this.prevIndex])==null||r.setAttribute("tabindex","-1"),i.tabIndex=0,i.focus(e))}clearElementCache(e=0){this.mutationObserver.disconnect(),delete this.cachedElements,this.offset=e,requestAnimationFrame(()=>{this.elements.forEach(t=>{this.mutationObserver.observe(t,{attributes:!0})})})}setCurrentIndexCircularly(e){const{length:t}=this.elements;let i=t;this.prevIndex=this.currentIndex;let r=(t+this.currentIndex+e)%t;for(;i&&this.elements[r]&&!this.isFocusableElement(this.elements[r]);)r=(t+r+e)%t,i-=1;this.currentIndex=r}hostContainsFocus(){this.host.addEventListener("focusout",this.handleFocusout),this.host.addEventListener("keydown",this.handleKeydown),this.focused=!0}hostNoLongerContainsFocus(){this.host.addEventListener("focusin",this.handleFocusin),this.host.removeEventListener("focusout",this.handleFocusout),this.host.removeEventListener("keydown",this.handleKeydown),this.focused=!1}isRelatedTargetOrContainAnElement(e){const t=e.relatedTarget,i=this.elements.includes(t),r=this.elements.some(c=>c.contains(t));return!(i||r)}acceptsEventCode(e){if(e==="End"||e==="Home")return!0;switch(this.direction){case"horizontal":return e==="ArrowLeft"||e==="ArrowRight";case"vertical":return e==="ArrowUp"||e==="ArrowDown";case"both":case"grid":return e.startsWith("Arrow")}}manage(){this.addEventListeners()}unmanage(){this.removeEventListeners()}addEventListeners(){this.host.addEventListener("focusin",this.handleFocusin),this.host.addEventListener("click",this.handleClick)}removeEventListeners(){this.host.removeEventListener("focusin",this.handleFocusin),this.host.removeEventListener("focusout",this.handleFocusout),this.host.removeEventListener("keydown",this.handleKeydown),this.host.removeEventListener("click",this.handleClick)}hostConnected(){this.recentlyConnected=!0,this.addEventListeners()}hostDisconnected(){this.mutationObserver.disconnect(),this.removeEventListeners()}hostUpdated(){this.recentlyConnected&&(this.recentlyConnected=!1,this.elements.forEach(e=>{this.mutationObserver.observe(e,{attributes:!0})}))}}exports.FocusGroupController=m;
@@ -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";let o=!0;try{document.body.querySelector(":focus-visible")}catch{o=!1,Promise.resolve().then(()=>n)}const u=c=>{var i,s;const r=l=>{if(l.shadowRoot==null||Object.hasOwn(l.dataset,"jsFocusVisible"))return()=>{};if(self.applyFocusVisiblePolyfill)self.applyFocusVisiblePolyfill(l.shadowRoot),l.manageAutoFocus&&l.manageAutoFocus();else{const t=()=>{self.applyFocusVisiblePolyfill&&l.shadowRoot&&self.applyFocusVisiblePolyfill(l.shadowRoot),l.manageAutoFocus&&l.manageAutoFocus()};return self.addEventListener("focus-visible-polyfill-ready",t,{once:!0}),()=>{self.removeEventListener("focus-visible-polyfill-ready",t)}}return()=>{}},e=Symbol("endPolyfillCoordination");class a extends(s=c,i=e,s){constructor(){super(...arguments),this[i]=null}connectedCallback(){super.connectedCallback&&super.connectedCallback(),o||requestAnimationFrame(()=>{this[e]==null&&(this[e]=r(this))})}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),o||requestAnimationFrame(()=>{this[e]!=null&&(this[e](),this[e]=null)})}}return a},n=Object.freeze(Object.defineProperty({__proto__:null,FocusVisiblePolyfillMixin:u},Symbol.toStringTag,{value:"Module"}));exports.FocusVisiblePolyfillMixin=u;
@@ -0,0 +1,74 @@
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
+ let o = !0;
19
+ try {
20
+ document.body.querySelector(":focus-visible");
21
+ } catch {
22
+ o = !1, Promise.resolve().then(() => n);
23
+ }
24
+ const c = (a) => {
25
+ var s, i;
26
+ const r = (l) => {
27
+ if (l.shadowRoot == null || Object.hasOwn(l.dataset, "jsFocusVisible"))
28
+ return () => {
29
+ };
30
+ if (self.applyFocusVisiblePolyfill)
31
+ self.applyFocusVisiblePolyfill(l.shadowRoot), l.manageAutoFocus && l.manageAutoFocus();
32
+ else {
33
+ const t = () => {
34
+ self.applyFocusVisiblePolyfill && l.shadowRoot && self.applyFocusVisiblePolyfill(l.shadowRoot), l.manageAutoFocus && l.manageAutoFocus();
35
+ };
36
+ return self.addEventListener(
37
+ "focus-visible-polyfill-ready",
38
+ t,
39
+ { once: !0 }
40
+ ), () => {
41
+ self.removeEventListener(
42
+ "focus-visible-polyfill-ready",
43
+ t
44
+ );
45
+ };
46
+ }
47
+ return () => {
48
+ };
49
+ }, e = Symbol("endPolyfillCoordination");
50
+ class u extends (i = a, s = e, i) {
51
+ constructor() {
52
+ super(...arguments), this[s] = null;
53
+ }
54
+ // Attempt to coordinate with the polyfill when connected to the
55
+ // document:
56
+ connectedCallback() {
57
+ super.connectedCallback && super.connectedCallback(), o || requestAnimationFrame(() => {
58
+ this[e] == null && (this[e] = r(this));
59
+ });
60
+ }
61
+ disconnectedCallback() {
62
+ super.disconnectedCallback && super.disconnectedCallback(), o || requestAnimationFrame(() => {
63
+ this[e] != null && (this[e](), this[e] = null);
64
+ });
65
+ }
66
+ }
67
+ return u;
68
+ }, n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
69
+ __proto__: null,
70
+ FocusVisiblePolyfillMixin: c
71
+ }, Symbol.toStringTag, { value: "Module" }));
72
+ export {
73
+ c as F
74
+ };