@luzmo/lucero 1.0.1-alpha.20 → 1.0.1-alpha.22

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 (206) hide show
  1. package/components/accordion/index.cjs +6 -6
  2. package/components/accordion/index.js +8 -7
  3. package/components/action-bar/index.cjs +4 -4
  4. package/components/action-bar/index.js +10 -8
  5. package/components/action-button/index.cjs +3 -3
  6. package/components/action-button/index.js +5 -4
  7. package/components/action-group/index.cjs +1 -1
  8. package/components/action-group/index.js +1 -1
  9. package/components/action-group-D6rV7sfq.cjs +20 -0
  10. package/components/{action-group-C9dsPJg-.js → action-group-DS7x8jfJ.js} +10 -9
  11. package/components/action-menu/index.cjs +9 -9
  12. package/components/action-menu/index.js +9 -9
  13. package/components/{async-directive-BwIAw5tB.js → async-directive-CDQoI4mS.js} +18 -19
  14. package/components/async-directive-CddlkYlZ.cjs +22 -0
  15. package/components/avatar/index.cjs +3 -3
  16. package/components/avatar/index.js +6 -6
  17. package/components/base-5nDSSNeT.cjs +18 -0
  18. package/components/base-CdYjmV_8.js +96 -0
  19. package/components/button/button-base.d.ts +16 -0
  20. package/components/button/button.d.ts +37 -1
  21. package/components/button/index.cjs +2 -2
  22. package/components/button/index.js +15 -11
  23. package/components/{button-base-B8bWcklV.js → button-base-BGAqeDTT.js} +21 -6
  24. package/components/button-base-CShsEDFM.cjs +25 -0
  25. package/components/button-group/index.cjs +1 -1
  26. package/components/button-group/index.js +10 -8
  27. package/components/calendar/index.cjs +96 -1
  28. package/components/calendar/index.js +538 -6
  29. package/components/checkbox/index.cjs +4 -4
  30. package/components/checkbox/index.js +6 -4
  31. package/components/{checkbox-mixin-BOTvuPEu.js → checkbox-mixin-DUbGDm7f.js} +9 -9
  32. package/components/{checkbox-mixin-BVPpXtsq.cjs → checkbox-mixin-DhN8CIXY.cjs} +3 -3
  33. package/components/clear-button-BWJrTbkk.cjs +18 -0
  34. package/components/{clear-button-DzZ5ulBW.js → clear-button-CMhq1QsA.js} +14 -13
  35. package/components/{close-button-CuQdsez5.js → close-button-BiJwFZyW.js} +13 -12
  36. package/components/close-button-DrMdfzPW.cjs +18 -0
  37. package/components/color-area/index.cjs +5 -5
  38. package/components/color-area/index.js +10 -9
  39. package/components/color-controller-7sNUf7SP.js +386 -0
  40. package/components/color-controller-ChN-A9Ft.cjs +18 -0
  41. package/components/color-field/index.cjs +2 -2
  42. package/components/color-field/index.js +4 -3
  43. package/components/color-handle/index.cjs +2 -2
  44. package/components/color-handle/index.js +7 -5
  45. package/components/color-loupe/index.cjs +1 -1
  46. package/components/color-loupe/index.js +1 -1
  47. package/components/color-loupe-CIEFp7ln.cjs +56 -0
  48. package/components/{color-loupe-DmQe3SpP.js → color-loupe-CLPX6xVb.js} +6 -4
  49. package/components/color-menu/index.cjs +7 -7
  50. package/components/color-menu/index.js +7 -7
  51. package/components/color-palette/index.cjs +1 -1
  52. package/components/color-palette/index.js +4 -3
  53. package/components/color-palette-group/index.cjs +3 -3
  54. package/components/color-palette-group/index.js +33 -32
  55. package/components/color-picker/index.cjs +4 -4
  56. package/components/color-picker/index.js +11 -11
  57. package/components/color-slider/index.cjs +40 -1
  58. package/components/color-slider/index.js +452 -6
  59. package/components/date-time-picker/index.cjs +16 -16
  60. package/components/date-time-picker/index.js +103 -104
  61. package/components/directive-DrvvqO47.cjs +32 -0
  62. package/components/directive-OK_Jd_xx.js +314 -0
  63. package/components/divider/index.cjs +1 -1
  64. package/components/divider/index.js +10 -8
  65. package/components/field-group/index.cjs +1 -1
  66. package/components/field-group/index.js +1 -1
  67. package/components/field-group-BYHNJmv0.cjs +23 -0
  68. package/components/{field-group-D4B0IOdA.js → field-group-CHmw159R.js} +7 -5
  69. package/components/field-label/index.cjs +1 -1
  70. package/components/field-label/index.js +1 -1
  71. package/components/{field-label-DxmPiC5p.js → field-label-Cy3xMWZ-.js} +9 -8
  72. package/components/field-label-DZoeqJJX.cjs +25 -0
  73. package/components/{focusable-C5JjRZmT.js → focusable-BjvsvVam.js} +2 -1
  74. package/components/focusable-CbVKgGfS.cjs +18 -0
  75. package/components/icon/index.cjs +1 -1
  76. package/components/icon/index.js +20 -18
  77. package/components/index.cjs +1 -1
  78. package/components/index.js +18 -18
  79. package/components/infield-button/index.cjs +2 -2
  80. package/components/infield-button/index.js +4 -3
  81. package/components/label/index.cjs +1 -1
  82. package/components/label/index.js +6 -4
  83. package/components/like-anchor-B2EqJPdw.cjs +32 -0
  84. package/components/{like-anchor-DCFJN0LV.js → like-anchor-CgqCU210.js} +23 -22
  85. package/components/{manage-help-text-DNqdEkTA.cjs → manage-help-text-Bat9yGvF.cjs} +3 -3
  86. package/components/{manage-help-text-CHfMLzSa.js → manage-help-text-C9sCHK3R.js} +8 -8
  87. package/components/menu/index.cjs +16 -16
  88. package/components/menu/index.js +15 -16
  89. package/components/multi-language-field/index.cjs +2 -2
  90. package/components/multi-language-field/index.js +8 -6
  91. package/components/number-field/index.cjs +6 -6
  92. package/components/number-field/index.js +34 -35
  93. package/components/observe-slot-text-ByPG1Lqw.cjs +18 -0
  94. package/components/{observe-slot-text-C3moTjwy.js → observe-slot-text-CugmOzNZ.js} +20 -21
  95. package/components/options/index.cjs +27 -55
  96. package/components/options/index.js +210 -800
  97. package/components/overlay/index.cjs +6 -6
  98. package/components/overlay/index.js +9 -9
  99. package/components/overlay-DpWon1Rp.js +1736 -0
  100. package/components/overlay-nUwFClQq.cjs +47 -0
  101. package/components/{pending-state-bJr-nEJl.cjs → pending-state-DQctFHI8.cjs} +2 -2
  102. package/components/{pending-state-B2wWssTo.js → pending-state-Dx1u3EXA.js} +2 -2
  103. package/components/picker/index.cjs +1 -1
  104. package/components/picker/index.js +2 -2
  105. package/components/{picker-BsQJBF9j.js → picker-Cm6_didQ.js} +19 -20
  106. package/components/picker-DxYgh4LR.cjs +123 -0
  107. package/components/picker-button/index.cjs +4 -4
  108. package/components/picker-button/index.js +6 -5
  109. package/components/{platform-BiXhwqk3.cjs → platform-BJnOJJag.cjs} +1 -1
  110. package/components/{platform-BM-uMWpX.js → platform-CqwNrovd.js} +12 -12
  111. package/components/popover/index.cjs +1 -1
  112. package/components/popover/index.js +1 -1
  113. package/components/popover-lcZnODPK.cjs +30 -0
  114. package/components/{popover-iD8f5Jkp.js → popover-ucIgjbQs.js} +8 -7
  115. package/components/progress-circle/index.cjs +1 -1
  116. package/components/progress-circle/index.js +1 -1
  117. package/components/{progress-circle-USIIU1up.js → progress-circle-D5J0ZwY0.js} +8 -7
  118. package/components/progress-circle-DgMbqrzG.cjs +33 -0
  119. package/components/radio/index.cjs +2 -2
  120. package/components/radio/index.js +10 -9
  121. package/components/search/index.cjs +6 -6
  122. package/components/search/index.js +5 -5
  123. package/components/select/index.cjs +43 -43
  124. package/components/select/index.js +33 -33
  125. package/components/{directive-C7oCP5Bh.cjs → sized-mixin-DcvJLFeo.cjs} +1 -5
  126. package/components/{sized-mixin-CJbBHWRQ.js → sized-mixin-cJbo3PKR.js} +5 -5
  127. package/components/slider/index.cjs +1 -1
  128. package/components/slider/index.js +48 -1101
  129. package/components/{streaming-listener-BQ68fKMa.js → streaming-listener-BgU36S1Z.js} +3 -3
  130. package/components/streaming-listener-CfUtuELp.cjs +18 -0
  131. package/components/swatch/index.cjs +5 -5
  132. package/components/swatch/index.js +11 -10
  133. package/components/switch/index.cjs +2 -2
  134. package/components/switch/index.js +5 -4
  135. package/components/tabs/index.cjs +31 -23
  136. package/components/tabs/index.js +497 -230
  137. package/components/tags/index.cjs +4 -4
  138. package/components/tags/index.js +13 -12
  139. package/components/text-field/index.cjs +3 -3
  140. package/components/text-field/index.js +12 -10
  141. package/components/{text-field-C2n3rzCK.js → text-field-BTEpwGFu.js} +73 -99
  142. package/components/text-field-JMrsh-zo.cjs +81 -0
  143. package/components/toast/index.cjs +11 -11
  144. package/components/toast/index.js +9 -7
  145. package/components/tooltip/index.cjs +4 -4
  146. package/components/tooltip/index.js +8 -7
  147. package/components/unit-input/index.cjs +6 -6
  148. package/components/unit-input/index.js +27 -26
  149. package/components/utils.cjs +1 -1
  150. package/components/utils.js +5 -5
  151. package/custom-elements.json +1 -1
  152. package/package.json +62 -1
  153. package/components/NumberFormatter-DewVDY5w.cjs +0 -18
  154. package/components/NumberFormatter-DgOUVrge.js +0 -136
  155. package/components/NumberParser-Dik4a0h-.cjs +0 -18
  156. package/components/NumberParser-ci9J5EKv.js +0 -173
  157. package/components/action-group-C54IxNZk.cjs +0 -20
  158. package/components/async-directive-DLz6JB0v.cjs +0 -22
  159. package/components/base-BjTwmyRF.cjs +0 -22
  160. package/components/base-CFWO09N1.js +0 -684
  161. package/components/base-Cy0MQrPT.cjs +0 -40
  162. package/components/base-D76d76ww.js +0 -26
  163. package/components/button-base-tf95Lyl4.cjs +0 -25
  164. package/components/class-map-CGfNk3Ee.js +0 -51
  165. package/components/class-map-D-Y-hsN5.cjs +0 -22
  166. package/components/clear-button-CuPbWwZY.cjs +0 -18
  167. package/components/close-button-BTo4yrFR.cjs +0 -18
  168. package/components/color-controller-B0uX6Zso.js +0 -3230
  169. package/components/color-controller-CoUL5f9K.cjs +0 -18
  170. package/components/color-loupe-CrM2DVY3.cjs +0 -56
  171. package/components/directive-helpers-D4KMv2dC.js +0 -62
  172. package/components/directive-helpers-t-TVum7J.cjs +0 -22
  173. package/components/directive-oAbCiebi.js +0 -44
  174. package/components/field-group-5WQMBOk4.cjs +0 -23
  175. package/components/field-label-Dz9kisdW.cjs +0 -25
  176. package/components/flow-D-0MTYCm.js +0 -527
  177. package/components/flow-DM3dNAKs.cjs +0 -30
  178. package/components/focusable-B_KwfEec.cjs +0 -18
  179. package/components/if-defined-DULpqYwi.js +0 -27
  180. package/components/if-defined-DaXWqfzc.cjs +0 -22
  181. package/components/index-CNK8wHXu.cjs +0 -57
  182. package/components/index-Cf6G4q52.js +0 -1490
  183. package/components/index-D3ICqC7S.js +0 -1174
  184. package/components/index-hqVbNKYy.cjs +0 -113
  185. package/components/like-anchor-Bu3pXbjT.cjs +0 -32
  186. package/components/luzmo-icons-CiSek5iM.js +0 -229
  187. package/components/luzmo-icons-CtA-TJPd.cjs +0 -29
  188. package/components/observe-slot-text-D2VAEFSd.cjs +0 -18
  189. package/components/overlay-B3ajDLLq.cjs +0 -47
  190. package/components/overlay-CUKs69yr.js +0 -2745
  191. package/components/picker-X96xmLAw.cjs +0 -123
  192. package/components/popover-fwJeZHMQ.cjs +0 -30
  193. package/components/progress-circle-DZxaMe8L.cjs +0 -33
  194. package/components/query-BL-TJj7K.cjs +0 -22
  195. package/components/query-D_KR_GUc.js +0 -51
  196. package/components/query-assigned-elements-DjfhL1cl.js +0 -36
  197. package/components/query-assigned-elements-DsKsfk7G.cjs +0 -22
  198. package/components/query-assigned-nodes-BcKWmGzy.cjs +0 -22
  199. package/components/query-assigned-nodes-C76XVPWY.js +0 -36
  200. package/components/sized-mixin-WPHH0a_D.cjs +0 -18
  201. package/components/state-DwIwYPvt.js +0 -29
  202. package/components/state-vf0PJN3_.cjs +0 -22
  203. package/components/streaming-listener-DeGQYM-9.cjs +0 -18
  204. package/components/style-map-Bnhf_mVZ.js +0 -53
  205. package/components/style-map-DuMd5xlY.cjs +0 -22
  206. package/components/text-field-BkFPYo7S.cjs +0 -85
@@ -1,173 +0,0 @@
1
- /*! * Lucero - The design system for Luzmo.
2
- *
3
- * Copyright © 2025 Luzmo
4
- * All rights reserved.
5
- * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
- * This license allows users with a current active Luzmo account to use Lucero.
7
- * This license terminates automatically if a user no longer has an active Luzmo account.
8
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
- *
10
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
- * SOFTWARE.
17
- * */
18
- import { $ as M } from "./NumberFormatter-DgOUVrge.js";
19
- const V = new RegExp("^.*\\(.*\\).*$"), A = [
20
- "latn",
21
- "arab",
22
- "hanidec",
23
- "deva",
24
- "beng"
25
- ];
26
- class C {
27
- /**
28
- * Parses the given string to a number. Returns NaN if a valid number could not be parsed.
29
- */
30
- parse(i) {
31
- return g(this.locale, this.options, i).parse(i);
32
- }
33
- /**
34
- * Returns whether the given string could potentially be a valid number. This should be used to
35
- * validate user input as the user types. If a `minValue` or `maxValue` is provided, the validity
36
- * of the minus/plus sign characters can be checked.
37
- */
38
- isValidPartialNumber(i, e, t) {
39
- return g(this.locale, this.options, i).isValidPartialNumber(i, e, t);
40
- }
41
- /**
42
- * Returns a numbering system for which the given string is valid in the current locale.
43
- * If no numbering system could be detected, the default numbering system for the current
44
- * locale is returned.
45
- */
46
- getNumberingSystem(i) {
47
- return g(this.locale, this.options, i).options.numberingSystem;
48
- }
49
- constructor(i, e = {}) {
50
- this.locale = i, this.options = e;
51
- }
52
- }
53
- const y = /* @__PURE__ */ new Map();
54
- function g(r, i, e) {
55
- let t = $(r, i);
56
- if (!r.includes("-nu-") && !t.isValidPartialNumber(e)) {
57
- for (let n of A) if (n !== t.options.numberingSystem) {
58
- let l = $(r + (r.includes("-u-") ? "-nu-" : "-u-nu-") + n, i);
59
- if (l.isValidPartialNumber(e)) return l;
60
- }
61
- }
62
- return t;
63
- }
64
- function $(r, i) {
65
- let e = r + (i ? Object.entries(i).sort((n, l) => n[0] < l[0] ? -1 : 1).join() : ""), t = y.get(e);
66
- return t || (t = new j(r, i), y.set(e, t)), t;
67
- }
68
- class j {
69
- parse(i) {
70
- let e = this.sanitize(i);
71
- if (this.symbols.group && (e = c(e, this.symbols.group, "")), this.symbols.decimal && (e = e.replace(this.symbols.decimal, ".")), this.symbols.minusSign && (e = e.replace(this.symbols.minusSign, "-")), e = e.replace(this.symbols.numeral, this.symbols.index), this.options.style === "percent") {
72
- let o = e.indexOf("-");
73
- e = e.replace("-", "");
74
- let a = e.indexOf(".");
75
- a === -1 && (a = e.length), e = e.replace(".", ""), a - 2 === 0 ? e = `0.${e}` : a - 2 === -1 ? e = `0.0${e}` : a - 2 === -2 ? e = "0.00" : e = `${e.slice(0, a - 2)}.${e.slice(a - 2)}`, o > -1 && (e = `-${e}`);
76
- }
77
- let t = e ? +e : NaN;
78
- if (isNaN(t)) return NaN;
79
- if (this.options.style === "percent") {
80
- var n, l;
81
- let o = {
82
- ...this.options,
83
- style: "decimal",
84
- minimumFractionDigits: Math.min(((n = this.options.minimumFractionDigits) !== null && n !== void 0 ? n : 0) + 2, 20),
85
- maximumFractionDigits: Math.min(((l = this.options.maximumFractionDigits) !== null && l !== void 0 ? l : 0) + 2, 20)
86
- };
87
- return new C(this.locale, o).parse(new M(this.locale, o).format(t));
88
- }
89
- return this.options.currencySign === "accounting" && V.test(i) && (t = -1 * t), t;
90
- }
91
- sanitize(i) {
92
- return i = i.replace(this.symbols.literals, ""), this.symbols.minusSign && (i = i.replace("-", this.symbols.minusSign)), this.options.numberingSystem === "arab" && (this.symbols.decimal && (i = i.replace(",", this.symbols.decimal), i = i.replace("،", this.symbols.decimal)), this.symbols.group && (i = c(i, ".", this.symbols.group))), this.options.locale === "fr-FR" && this.symbols.group && (i = c(i, " ", this.symbols.group), i = c(i, /\u00A0/g, this.symbols.group)), i;
93
- }
94
- isValidPartialNumber(i, e = -1 / 0, t = 1 / 0) {
95
- return i = this.sanitize(i), this.symbols.minusSign && i.startsWith(this.symbols.minusSign) && e < 0 ? i = i.slice(this.symbols.minusSign.length) : this.symbols.plusSign && i.startsWith(this.symbols.plusSign) && t > 0 && (i = i.slice(this.symbols.plusSign.length)), this.symbols.group && i.startsWith(this.symbols.group) || this.symbols.decimal && i.indexOf(this.symbols.decimal) > -1 && this.options.maximumFractionDigits === 0 ? !1 : (this.symbols.group && (i = c(i, this.symbols.group, "")), i = i.replace(this.symbols.numeral, ""), this.symbols.decimal && (i = i.replace(this.symbols.decimal, "")), i.length === 0);
96
- }
97
- constructor(i, e = {}) {
98
- this.locale = i, this.formatter = new Intl.NumberFormat(i, e), this.options = this.formatter.resolvedOptions(), this.symbols = W(i, this.formatter, this.options, e);
99
- var t, n;
100
- this.options.style === "percent" && (((t = this.options.minimumFractionDigits) !== null && t !== void 0 ? t : 0) > 18 || ((n = this.options.maximumFractionDigits) !== null && n !== void 0 ? n : 0) > 18) && console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.");
101
- }
102
- }
103
- const S = /* @__PURE__ */ new Set([
104
- "decimal",
105
- "fraction",
106
- "integer",
107
- "minusSign",
108
- "plusSign",
109
- "group"
110
- ]), T = [
111
- 0,
112
- 4,
113
- 2,
114
- 1,
115
- 11,
116
- 20,
117
- 3,
118
- 7,
119
- 100,
120
- 21,
121
- 0.1,
122
- 1.1
123
- ];
124
- function W(r, i, e, t) {
125
- var n, l, o, a;
126
- let u = new Intl.NumberFormat(r, {
127
- ...e,
128
- // Resets so we get the full range of symbols
129
- minimumSignificantDigits: 1,
130
- maximumSignificantDigits: 21,
131
- roundingIncrement: 1,
132
- roundingPriority: "auto",
133
- roundingMode: "halfExpand"
134
- }), d = u.formatToParts(-10000.111), N = u.formatToParts(10000.111), x = T.map((s) => u.formatToParts(s));
135
- var p;
136
- let w = (p = (n = d.find((s) => s.type === "minusSign")) === null || n === void 0 ? void 0 : n.value) !== null && p !== void 0 ? p : "-", h = (l = N.find((s) => s.type === "plusSign")) === null || l === void 0 ? void 0 : l.value;
137
- !h && ((t == null ? void 0 : t.signDisplay) === "exceptZero" || (t == null ? void 0 : t.signDisplay) === "always") && (h = "+");
138
- let F = (o = new Intl.NumberFormat(r, {
139
- ...e,
140
- minimumFractionDigits: 2,
141
- maximumFractionDigits: 2
142
- }).formatToParts(1e-3).find((s) => s.type === "decimal")) === null || o === void 0 ? void 0 : o.value, D = (a = d.find((s) => s.type === "group")) === null || a === void 0 ? void 0 : a.value, I = d.filter((s) => !S.has(s.type)).map((s) => P(s.value)), E = x.flatMap((s) => s.filter((m) => !S.has(m.type)).map((m) => P(m.value))), f = [
143
- .../* @__PURE__ */ new Set([
144
- ...I,
145
- ...E
146
- ])
147
- ].sort((s, m) => m.length - s.length), R = f.length === 0 ? new RegExp("[\\p{White_Space}]", "gu") : new RegExp(`${f.join("|")}|[\\p{White_Space}]`, "gu"), b = [
148
- ...new Intl.NumberFormat(e.locale, {
149
- useGrouping: !1
150
- }).format(9876543210)
151
- ].reverse(), _ = new Map(b.map((s, m) => [
152
- s,
153
- m
154
- ])), v = new RegExp(`[${b.join("")}]`, "g");
155
- return {
156
- minusSign: w,
157
- plusSign: h,
158
- decimal: F,
159
- group: D,
160
- literals: R,
161
- numeral: v,
162
- index: (s) => String(_.get(s))
163
- };
164
- }
165
- function c(r, i, e) {
166
- return r.replaceAll ? r.replaceAll(i, e) : r.split(i).join(e);
167
- }
168
- function P(r) {
169
- return r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
170
- }
171
- export {
172
- C as $
173
- };
@@ -1,20 +0,0 @@
1
- /*! * Lucero - The design system for Luzmo.
2
- *
3
- * Copyright © 2025 Luzmo
4
- * All rights reserved.
5
- * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
- * This license allows users with a current active Luzmo account to use Lucero.
7
- * This license terminates automatically if a user no longer has an active Luzmo account.
8
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
- *
10
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
- * SOFTWARE.
17
- * */
18
- "use strict";const s=require("./base-Cy0MQrPT.cjs"),d=require("./mutation-controller-DkOMCW-c.cjs"),p=require("./query-BL-TJj7K.cjs"),g=require("./roving-tabindex-By_fCy_e.cjs"),b=require("./sized-mixin-WPHH0a_D.cjs"),h=":host{gap:var(--luzmo-action-group-horizontal-spacing-regular, var(--action-group-horizontal-spacing-regular));flex-wrap:wrap;display:flex}::slotted(*){flex-shrink:0}::slotted(:focus-visible){z-index:3}:host(:not([vertical]):not([compact])) ::slotted(*){flex-shrink:0}:host([vertical]){gap:var(--luzmo-action-group-vertical-spacing-regular, var(--action-group-vertical-spacing-regular));flex-direction:column;display:inline-flex}:host([compact]){gap:var(--luzmo-action-group-gap-size-compact, var(--action-group-gap-size-compact))}:host([compact]:not([quiet])){flex-wrap:nowrap}:host([compact]:not([quiet])) ::slotted(*){border-radius:var(--luzmo-action-group-border-radius-reset, var(--action-group-border-radius-reset));z-index:0;position:relative}:host([compact]:not([quiet])) ::slotted(:first-child){--luzmo-actionbutton-focus-indicator-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) 0px 0px var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-start-start-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-end-start-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));margin-inline-start:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset))}:host([compact]:not([quiet])) ::slotted(:not(:first-child)){--luzmo-actionbutton-focus-indicator-border-radius: 0px;margin-inline-start:var(--luzmo-action-group-horizontal-spacing-compact, var(--action-group-horizontal-spacing-compact));margin-inline-end:var(--luzmo-action-group-horizontal-spacing-compact, var(--action-group-horizontal-spacing-compact))}:host([compact]:not([quiet])) ::slotted(:last-child){--luzmo-actionbutton-focus-indicator-border-radius: 0px var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0px;border-start-end-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-end-end-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));margin-inline-start:var(--luzmo-action-group-horizontal-spacing-compact, var(--action-group-horizontal-spacing-compact));margin-inline-end:var(--luzmo-action-group-border-radius-reset, var(--action-group-border-radius-reset))}:host([compact]:not([quiet])) ::slotted([selected]){z-index:1}@media (hover: hover){:host([compact]:not([quiet])) ::slotted(:hover){z-index:2}}:host([compact]:not([quiet])) ::slotted(:focus-visible){z-index:3}:host([compact]:not([quiet])[vertical]){gap:var(--luzmo-action-group-gap-size-compact, var(--action-group-gap-size-compact))}:host([compact][vertical]:not([quiet])) ::slotted(*){border-radius:var(--luzmo-action-group-border-radius-reset, var(--action-group-border-radius-reset))}:host([compact][vertical]:not([quiet])) ::slotted(:first-child){--luzmo-actionbutton-focus-indicator-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0px 0px;border-start-start-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-start-end-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));margin-block-start:var(--luzmo-action-group-vertical-spacing-compact, var(--action-group-vertical-spacing-compact));margin-block-end:var(--luzmo-action-group-vertical-spacing-compact, var(--action-group-vertical-spacing-compact));margin-inline-end:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset))}:host([compact][vertical]:not([quiet])) ::slotted(:not(:first-child)){margin-block-start:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset));margin-block-end:var(--luzmo-action-group-vertical-spacing-compact, var(--action-group-vertical-spacing-compact));margin-inline-start:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset));margin-inline-end:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset))}:host([compact][vertical]:not([quiet])) ::slotted(:last-child){--luzmo-actionbutton-focus-indicator-border-radius: 0px 0px var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-end-end-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));border-end-start-radius:var(--luzmo-action-group-border-radius, var(--action-group-border-radius));margin-block-start:var(--luzmo-action-group-vertical-spacing-compact, var(--action-group-vertical-spacing-compact));margin-block-end:var(--luzmo-action-group-button-spacing-reset, var(--action-group-button-spacing-reset))}:host([justified]) ::slotted(*){flex:1}:host{--action-group-gap-size-compact: 0px;--action-group-horizontal-spacing-compact: -1px;--action-group-vertical-spacing-compact: -1px;--action-group-button-spacing-reset: 0px;--action-group-border-radius-reset: 0px;--action-group-border-radius: var(--luzmo-border-radius);--action-group-horizontal-spacing-regular: var(--luzmo-spacing-3);--action-group-vertical-spacing-regular: var(--luzmo-spacing-3)}:host([size=xs]),:host([size=s]){--action-group-horizontal-spacing-regular: var(--luzmo-spacing-2);--action-group-vertical-spacing-regular: var(--luzmo-spacing-2)}:host,:host([size=l]),:host([size=xl]){--action-group-horizontal-spacing-regular: var(--luzmo-spacing-3);--action-group-vertical-spacing-regular: var(--luzmo-spacing-3)}:host([dir][compact][vertical]) ::slotted(:nth-child(n)){margin-right:0;margin-left:0}:host([justified]) ::slotted(:not([role])),:host([vertical]) ::slotted(:not([role])){display:flex;flex-direction:column;align-items:stretch}:host([compact]:not([quiet])) ::slotted(:not([role])){--overriden-border-radius: 0;--luzmo-action-button-border-radius: var(--overriden-border-radius)}:host([compact][vertical]:not([quiet])) ::slotted(:not([role]):first-child){--overriden-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0 0}:host([compact][vertical]:not([quiet])) ::slotted(:not([role]):last-child){--overriden-border-radius: 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([dir=ltr][compact]:not([quiet],[vertical])) ::slotted(:not([role]):first-child){--overriden-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([dir=rtl][compact]:not([quiet],[vertical])) ::slotted(:not([role]):first-child){--overriden-border-radius: 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0}:host([dir=ltr][compact]:not([quiet],[vertical])) ::slotted(:not([role]):last-child){--overriden-border-radius: 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0}:host([dir=rtl][compact]:not([quiet],[vertical])) ::slotted(:not([role]):last-child){--overriden-border-radius: var( --luzmo-action-group-border-radius, var(--action-group-border-radius) ) 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([compact]:not([quiet])) ::slotted(*){--luzmo-action-button-focus-ring-border-radius: 0}:host([compact][vertical]:not([quiet])) ::slotted(:first-child){--luzmo-action-button-focus-ring-border-radius: var(--luzmo-border-radius) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0 0}:host([compact][vertical]:not([quiet])) ::slotted(:last-child){--luzmo-action-button-focus-ring-border-radius: 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([dir=ltr][compact]:not([quiet],[vertical])) ::slotted(:first-child){--luzmo-action-button-focus-ring-border-radius: var(--luzmo-border-radius) 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}:host([dir=rtl][compact]:not([quiet],[vertical])) ::slotted(:first-child){--luzmo-action-button-focus-ring-border-radius: 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0}:host([dir=ltr][compact]:not([quiet],[vertical])) ::slotted(:last-child){--luzmo-action-button-focus-ring-border-radius: 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) var(--luzmo-action-group-border-radius, var(--action-group-border-radius)) 0}:host([dir=rtl][compact]:not([quiet],[vertical])) ::slotted(:last-child){--luzmo-action-button-focus-ring-border-radius: var(--luzmo-border-radius) 0 0 var(--luzmo-action-group-border-radius, var(--action-group-border-radius))}";var m=Object.defineProperty,v=Object.getOwnPropertyDescriptor,c=(n,t,r,e)=>{for(var o=e>1?void 0:e?v(t,r):t,a=n.length-1,i;a>=0;a--)(i=n[a])&&(o=(e?i(t,r,o):i(o))||o);return e&&o&&m(t,r,o),o};const l=[];class u extends b.SizedMixin(s.LuzmoElement,{validSizes:["xs","s","m","l","xl"],noDefaultSize:!0}){constructor(){super(),this._buttons=[],this._buttonSelector="luzmo-action-button, luzmo-action-menu",this.rovingTabindexController=new g.RovingTabindexController(this,{focusInIndex:t=>{let r=-1;const e=t.findIndex((o,a)=>(!t[r]&&!o.disabled&&(r=a),o.selected&&!o.disabled));return t[e]?e:r},elements:()=>this.buttons,isFocusableElement:t=>!t.disabled}),this.compact=!1,this.emphasized=!1,this.justified=!1,this.label="",this.quiet=!1,this.vertical=!1,this._selected=l,this.hasManaged=!1,this.manageButtons=()=>{if(!this.slotElement)return;const r=this.slotElement.assignedElements({flatten:!0}).reduce((e,o)=>{if(o.matches(this._buttonSelector))e.push(o);else{const a=[...o.querySelectorAll(`:scope > ${this._buttonSelector}`)];e.push(...a)}return e},[]);if(this.buttons=r,this.selects||!this.hasManaged){const e=[];this.buttons.forEach(o=>{o.selected&&e.push(o.value)}),this.setSelected([...this.selected,...e])}this.manageChildren(),this.manageSelects(),this.hasManaged=!0},new d.s(this,{config:{childList:!0,subtree:!0},callback:()=>{this.manageButtons()},skipInitial:!0})}static get styles(){return[s.r(h)]}set buttons(t){t!==this.buttons&&(this._buttons=t,this.rovingTabindexController.clearElementCache())}get buttons(){return this._buttons}set selected(t){this.requestUpdate("selected",this._selected),this._selected=t,this.updateComplete.then(()=>{this.applySelects(),this.manageChildren()})}get selected(){return this._selected}dispatchChange(t){this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0,cancelable:!0}))||(this.setSelected(t),this.buttons.map(e=>{e.selected=this.selected.includes(e.value)}))}setSelected(t,r){if(t===this.selected)return;const e=this.selected;this.requestUpdate("selected",e),this._selected=t,r&&this.dispatchChange(e)}focus(t){this.rovingTabindexController.focus(t)}deselectSelectedButtons(){this.buttons.forEach(t=>{t.selected&&(t.selected=!1,t.tabIndex=-1,t.setAttribute(this.selects?"aria-checked":"aria-pressed","false"))})}handleActionButtonChange(t){t.stopPropagation(),t.preventDefault()}handleClick(t){const r=t.target;if(r.value!==void 0)switch(this.selects){case"single":{this.deselectSelectedButtons(),r.selected=!0,r.tabIndex=0,r.setAttribute("aria-checked","true"),this.setSelected([r.value],!0);break}case"multiple":{const e=[...this.selected];r.selected=!r.selected,r.setAttribute("aria-checked",r.selected?"true":"false"),r.selected?e.push(r.value):e.splice(this.selected.indexOf(r.value),1),this.setSelected(e,!0),this.buttons.forEach(o=>{o.tabIndex=-1}),r.tabIndex=0;break}}}async applySelects(){await this.manageSelects(!0)}async manageSelects(t){if(this.buttons.length===0)return;const r=this.buttons;switch(this.selects){case"single":{this.setAttribute("role","radiogroup");const e=[],o=r.map(async i=>{await i.updateComplete,i.setAttribute("role","radio"),i.setAttribute("aria-checked",i.selected?"true":"false"),i.selected&&e.push(i)});if(t)break;await Promise.all(o);const a=e.map(i=>i.value);this.setSelected(a||l);break}case"multiple":{this.getAttribute("role")==="radiogroup"&&this.removeAttribute("role");const e=[],o=r.map(async i=>{await i.updateComplete,i.setAttribute("role","checkbox"),i.setAttribute("aria-checked",i.selected?"true":"false"),i.selected&&e.push(i.value)});if(t)break;await Promise.all(o);const a=e.length>0?e:l;this.setSelected(a);break}default:if(this.selected.length>0){const e=[],o=r.map(async a=>{await a.updateComplete,a.setAttribute("role","button"),a.selected?(a.setAttribute("aria-pressed","true"),e.push(a)):a.removeAttribute("aria-pressed")});if(t)break;await Promise.all(o),this.setSelected(e.map(a=>a.value))}else{this.buttons.forEach(e=>{e.setAttribute("role","button")});break}}this.hasAttribute("role")||this.setAttribute("role","toolbar")}render(){return s.x`
19
- <slot role="presentation" @slotchange=${this.manageButtons}></slot>
20
- `}firstUpdated(t){super.firstUpdated(t),this.addEventListener("click",this.handleClick)}updated(t){super.updated(t),t.has("selects")&&(this.manageSelects(),this.manageChildren(),this.selects?this.renderRoot.addEventListener("change",this.handleActionButtonChange):this.renderRoot.removeEventListener("change",this.handleActionButtonChange)),(t.has("quiet")||t.has("emphasized")||t.has("size")||t.has("staticColor"))&&this.manageChildren(t),t.has("label")&&(this.label||t.get("label")!==void 0)&&(this.label.length>0?this.setAttribute("aria-label",this.label):this.removeAttribute("aria-label"))}manageChildren(t){this.buttons.forEach(r=>{(this.quiet||t!=null&&t.get("quiet"))&&(r.quiet=this.quiet),(this.emphasized||t!=null&&t.get("emphasized"))&&(r.emphasized=this.emphasized),(this.staticColor||t!=null&&t.get("staticColor"))&&(r.staticColor=this.staticColor),(this.selects||!this.hasManaged)&&(r.selected=this.selected.includes(r.value)),this.size&&(this.size!=="m"||(t==null?void 0:t.get("size"))!==void 0)&&(r.size=this.size)})}}c([s.n({type:Boolean,reflect:!0})],u.prototype,"compact",2);c([s.n({type:Boolean,reflect:!0})],u.prototype,"emphasized",2);c([s.n({type:Boolean,reflect:!0})],u.prototype,"justified",2);c([s.n({type:String})],u.prototype,"label",2);c([s.n({type:Boolean,reflect:!0})],u.prototype,"quiet",2);c([s.n({type:String})],u.prototype,"selects",2);c([s.n({reflect:!0,attribute:"static-color"})],u.prototype,"staticColor",2);c([s.n({type:Boolean,reflect:!0})],u.prototype,"vertical",2);c([s.n({type:Array})],u.prototype,"selected",1);c([p.e("slot")],u.prototype,"slotElement",2);exports.LuzmoActionGroup=u;
@@ -1,22 +0,0 @@
1
- /*! * Lucero - The design system for Luzmo.
2
- *
3
- * Copyright © 2025 Luzmo
4
- * All rights reserved.
5
- * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
- * This license allows users with a current active Luzmo account to use Lucero.
7
- * This license terminates automatically if a user no longer has an active Luzmo account.
8
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
- *
10
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
- * SOFTWARE.
17
- * */
18
- "use strict";const $=require("./directive-helpers-t-TVum7J.cjs"),c=require("./directive-C7oCP5Bh.cjs");/**
19
- * @license
20
- * Copyright 2017 Google LLC
21
- * SPDX-License-Identifier: BSD-3-Clause
22
- */const r=(t,e)=>{var i;const s=t._$AN;if(s===void 0)return!1;for(const n of s)(i=n._$AO)==null||i.call(n,e,!1),r(n,e);return!0},h=t=>{let e,s;do{if((e=t._$AM)===void 0)break;s=e._$AN,s.delete(t),t=e}while((s==null?void 0:s.size)===0)},_=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(s===void 0)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),f(e)}};function A(t){this._$AN!==void 0?(h(this),this._$AM=t,_(this)):this._$AM=t}function d(t,e=!1,s=0){const i=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(e)if(Array.isArray(i))for(let o=s;o<i.length;o++)r(i[o],!1),h(i[o]);else i!=null&&(r(i,!1),h(i));else r(this,t)}const f=t=>{t.type==c.t.CHILD&&(t._$AP??(t._$AP=d),t._$AQ??(t._$AQ=A))};class l extends c.i{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,s,i){super._$AT(e,s,i),_(this),this.isConnected=e._$AU}_$AO(e,s=!0){var i,n;e!==this.isConnected&&(this.isConnected=e,e?(i=this.reconnected)==null||i.call(this):(n=this.disconnected)==null||n.call(this)),s&&(r(this,e),h(this))}setValue(e){if($.f(this._$Ct))this._$Ct._$AI(e,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=e,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}exports.f=l;
@@ -1,22 +0,0 @@
1
- /*! * Lucero - The design system for Luzmo.
2
- *
3
- * Copyright © 2025 Luzmo
4
- * All rights reserved.
5
- * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
- * This license allows users with a current active Luzmo account to use Lucero.
7
- * This license terminates automatically if a user no longer has an active Luzmo account.
8
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
- *
10
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
- * SOFTWARE.
17
- * */
18
- "use strict";/**
19
- * @license
20
- * Copyright 2017 Google LLC
21
- * SPDX-License-Identifier: BSD-3-Clause
22
- */const o=(r,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(r,t,e),e);exports.e=o;