@telefonica/mistica 16.30.1 → 16.32.0

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 (281) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/accordion.css-mistica.js +6 -6
  3. package/dist/align.css-mistica.js +1 -1
  4. package/dist/avatar.css-mistica.js +2 -2
  5. package/dist/badge.css-mistica.js +1 -1
  6. package/dist/box.css-mistica.js +13 -13
  7. package/dist/box.js +5 -5
  8. package/dist/boxed.css-mistica.js +25 -25
  9. package/dist/button-group.css-mistica.js +1 -1
  10. package/dist/button-group.js +2 -2
  11. package/dist/button-layout.css-mistica.js +13 -13
  12. package/dist/button.css-mistica.js +16 -16
  13. package/dist/button.d.ts +4 -0
  14. package/dist/button.js +10 -6
  15. package/dist/callout.css-mistica.js +5 -5
  16. package/dist/card.css-mistica.js +3 -3
  17. package/dist/card.d.ts +22 -0
  18. package/dist/card.js +491 -424
  19. package/dist/carousel.css-mistica.js +99 -44
  20. package/dist/carousel.css.d.ts +35 -16
  21. package/dist/carousel.d.ts +43 -5
  22. package/dist/carousel.js +570 -384
  23. package/dist/checkbox.css-mistica.js +7 -7
  24. package/dist/checkbox.js +2 -2
  25. package/dist/chip.css-mistica.js +12 -12
  26. package/dist/circle.css-mistica.js +1 -1
  27. package/dist/community/advanced-data-card.css-mistica.js +6 -6
  28. package/dist/community/advanced-data-card.js +4 -4
  29. package/dist/community/blocks.css-mistica.js +3 -3
  30. package/dist/community/example-component.css-mistica.js +1 -1
  31. package/dist/counter.css-mistica.js +1 -1
  32. package/dist/counter.js +8 -8
  33. package/dist/cover-hero.css-mistica.js +14 -15
  34. package/dist/credit-card-number-field.css-mistica.js +3 -3
  35. package/dist/date-field.css-mistica.js +1 -1
  36. package/dist/date-time-picker.css-mistica.js +1 -1
  37. package/dist/dialog-context.js +32 -27
  38. package/dist/dialog.css-mistica.js +4 -4
  39. package/dist/dialog.d.ts +1 -0
  40. package/dist/dialog.js +14 -14
  41. package/dist/divider.css-mistica.js +2 -2
  42. package/dist/double-field.css-mistica.js +2 -2
  43. package/dist/drawer.css-mistica.js +1 -1
  44. package/dist/drawer.d.ts +5 -0
  45. package/dist/empty-state-card.css-mistica.js +1 -1
  46. package/dist/empty-state.css-mistica.js +7 -7
  47. package/dist/fade-in.css-mistica.js +1 -1
  48. package/dist/feedback.css-mistica.js +1 -1
  49. package/dist/fixed-footer-layout.css-mistica.js +4 -4
  50. package/dist/fixed-footer-layout.js +5 -5
  51. package/dist/form.css-mistica.js +1 -1
  52. package/dist/form.js +5 -5
  53. package/dist/grid-layout.css-mistica.js +5 -5
  54. package/dist/grid.css-mistica.js +124 -124
  55. package/dist/grid.js +9 -9
  56. package/dist/header.css-mistica.js +1 -1
  57. package/dist/hero.css-mistica.js +2 -2
  58. package/dist/highlighted-card.css-mistica.js +4 -4
  59. package/dist/horizontal-scroll.css-mistica.js +3 -3
  60. package/dist/horizontal-scroll.js +2 -2
  61. package/dist/icon-button.css-mistica.js +42 -42
  62. package/dist/icon-button.js +43 -47
  63. package/dist/icons/icon-chevron.css-mistica.js +2 -2
  64. package/dist/icons/icon-error.css-mistica.js +1 -1
  65. package/dist/image.css-mistica.js +3 -3
  66. package/dist/image.js +5 -5
  67. package/dist/index.d.ts +1 -1
  68. package/dist/index.js +6 -0
  69. package/dist/inline.css-mistica.js +13 -13
  70. package/dist/list.css-mistica.js +1 -1
  71. package/dist/list.d.ts +10 -5
  72. package/dist/list.js +79 -76
  73. package/dist/loading-bar.css-mistica.js +1 -1
  74. package/dist/loading-bar.js +2 -2
  75. package/dist/loading-screen.css-mistica.js +5 -5
  76. package/dist/loading-screen.js +3 -3
  77. package/dist/logo.css-mistica.js +6 -6
  78. package/dist/maybe-dismissable.css-mistica.js +1 -1
  79. package/dist/menu.css-mistica.js +12 -12
  80. package/dist/menu.js +7 -7
  81. package/dist/mosaic.css-mistica.js +2 -2
  82. package/dist/mosaic.d.ts +2 -1
  83. package/dist/mosaic.js +33 -32
  84. package/dist/navigation-bar.css-mistica.js +16 -16
  85. package/dist/navigation-breadcrumbs.css-mistica.js +1 -1
  86. package/dist/package-version.js +1 -1
  87. package/dist/pin-field.css-mistica.js +1 -1
  88. package/dist/pin-field.js +2 -2
  89. package/dist/popover.css-mistica.js +1 -1
  90. package/dist/progress-bar.css-mistica.js +5 -5
  91. package/dist/progress-bar.js +2 -2
  92. package/dist/radio-button.css-mistica.js +14 -14
  93. package/dist/radio-button.d.ts +1 -0
  94. package/dist/radio-button.js +72 -61
  95. package/dist/rating.css-mistica.js +3 -3
  96. package/dist/rating.js +8 -8
  97. package/dist/responsive-layout.css-mistica.js +6 -6
  98. package/dist/responsive-layout.js +6 -6
  99. package/dist/screen-reader-only.css-mistica.js +1 -1
  100. package/dist/select.css-mistica.js +15 -15
  101. package/dist/select.js +9 -9
  102. package/dist/sheet-action-row.css-mistica.js +1 -1
  103. package/dist/sheet-common.css-mistica.js +1 -1
  104. package/dist/sheet-info.css-mistica.js +2 -2
  105. package/dist/sheet-root.js +42 -38
  106. package/dist/skeletons.css-mistica.js +4 -4
  107. package/dist/skins/skin-contract.css-mistica.js +354 -354
  108. package/dist/slider.css-mistica.js +10 -10
  109. package/dist/slider.js +9 -9
  110. package/dist/snackbar.css-mistica.js +4 -4
  111. package/dist/spinner.css-mistica.js +1 -1
  112. package/dist/stack.css-mistica.js +7 -7
  113. package/dist/stacking-group.css-mistica.js +1 -1
  114. package/dist/stepper.css-mistica.js +12 -9
  115. package/dist/stepper.css.d.ts +1 -0
  116. package/dist/stepper.d.ts +4 -2
  117. package/dist/stepper.js +54 -39
  118. package/dist/switch-component.css-mistica.js +26 -26
  119. package/dist/table.css-mistica.js +8 -8
  120. package/dist/table.js +8 -8
  121. package/dist/tabs.css-mistica.js +12 -12
  122. package/dist/tabs.d.ts +15 -1
  123. package/dist/tabs.js +154 -81
  124. package/dist/tag.css-mistica.js +1 -1
  125. package/dist/text-field-base.css-mistica.js +1 -1
  126. package/dist/text-field-base.js +126 -115
  127. package/dist/text-field-components.css-mistica.js +6 -6
  128. package/dist/text-field-components.js +2 -2
  129. package/dist/text-link.css-mistica.js +5 -5
  130. package/dist/text-tokens.d.ts +12 -0
  131. package/dist/text-tokens.js +154 -106
  132. package/dist/text.css-mistica.js +9 -9
  133. package/dist/text.js +7 -7
  134. package/dist/theme-context.css-mistica.js +398 -398
  135. package/dist/timeline.css-mistica.js +10 -10
  136. package/dist/timer.css-mistica.js +6 -6
  137. package/dist/tooltip.css-mistica.js +1 -1
  138. package/dist/touchable.css-mistica.js +1 -1
  139. package/dist/touchable.d.ts +5 -2
  140. package/dist/touchable.js +53 -53
  141. package/dist/utils/aspect-ratio-support.css-mistica.js +3 -3
  142. package/dist/utils/aspect-ratio-support.js +3 -3
  143. package/dist/video.css-mistica.js +2 -2
  144. package/dist/video.js +2 -2
  145. package/dist/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +3 -3
  146. package/dist-es/accordion.css-mistica.js +6 -6
  147. package/dist-es/align.css-mistica.js +1 -1
  148. package/dist-es/avatar.css-mistica.js +2 -2
  149. package/dist-es/badge.css-mistica.js +1 -1
  150. package/dist-es/box.css-mistica.js +13 -13
  151. package/dist-es/box.js +9 -9
  152. package/dist-es/boxed.css-mistica.js +24 -24
  153. package/dist-es/button-group.css-mistica.js +1 -1
  154. package/dist-es/button-group.js +4 -4
  155. package/dist-es/button-layout.css-mistica.js +13 -13
  156. package/dist-es/button.css-mistica.js +16 -16
  157. package/dist-es/button.js +14 -10
  158. package/dist-es/callout.css-mistica.js +5 -5
  159. package/dist-es/callout.js +5 -5
  160. package/dist-es/card.css-mistica.js +3 -3
  161. package/dist-es/card.js +627 -559
  162. package/dist-es/carousel.css-mistica.js +9 -8
  163. package/dist-es/carousel.js +587 -407
  164. package/dist-es/checkbox.css-mistica.js +7 -7
  165. package/dist-es/checkbox.js +6 -6
  166. package/dist-es/chip.css-mistica.js +12 -12
  167. package/dist-es/circle.css-mistica.js +1 -1
  168. package/dist-es/community/advanced-data-card.css-mistica.js +6 -6
  169. package/dist-es/community/advanced-data-card.js +11 -11
  170. package/dist-es/community/blocks.css-mistica.js +2 -2
  171. package/dist-es/community/example-component.css-mistica.js +1 -1
  172. package/dist-es/counter.css-mistica.js +1 -1
  173. package/dist-es/counter.js +8 -8
  174. package/dist-es/cover-hero.css-mistica.js +4 -5
  175. package/dist-es/credit-card-number-field.css-mistica.js +3 -3
  176. package/dist-es/date-field.css-mistica.js +1 -1
  177. package/dist-es/date-time-picker.css-mistica.js +1 -1
  178. package/dist-es/dialog-context.js +33 -28
  179. package/dist-es/dialog.css-mistica.js +4 -4
  180. package/dist-es/dialog.js +31 -31
  181. package/dist-es/divider.css-mistica.js +2 -2
  182. package/dist-es/double-field.css-mistica.js +2 -2
  183. package/dist-es/drawer.css-mistica.js +1 -1
  184. package/dist-es/empty-state-card.css-mistica.js +1 -1
  185. package/dist-es/empty-state.css-mistica.js +6 -6
  186. package/dist-es/empty-state.js +7 -7
  187. package/dist-es/fade-in.css-mistica.js +1 -1
  188. package/dist-es/feedback.css-mistica.js +1 -1
  189. package/dist-es/fixed-footer-layout.css-mistica.js +4 -4
  190. package/dist-es/fixed-footer-layout.js +5 -5
  191. package/dist-es/form.css-mistica.js +1 -1
  192. package/dist-es/form.js +5 -5
  193. package/dist-es/grid-layout.css-mistica.js +4 -4
  194. package/dist-es/grid.css-mistica.js +124 -124
  195. package/dist-es/grid.js +10 -10
  196. package/dist-es/header.css-mistica.js +1 -1
  197. package/dist-es/hero.css-mistica.js +2 -2
  198. package/dist-es/highlighted-card.css-mistica.js +4 -4
  199. package/dist-es/horizontal-scroll.css-mistica.js +2 -2
  200. package/dist-es/horizontal-scroll.js +2 -2
  201. package/dist-es/icon-button.css-mistica.js +42 -42
  202. package/dist-es/icon-button.js +52 -56
  203. package/dist-es/icons/icon-chevron.css-mistica.js +2 -2
  204. package/dist-es/icons/icon-error.css-mistica.js +1 -1
  205. package/dist-es/image.css-mistica.js +3 -3
  206. package/dist-es/image.js +5 -5
  207. package/dist-es/index.js +1843 -1843
  208. package/dist-es/inline.css-mistica.js +11 -11
  209. package/dist-es/list.css-mistica.js +1 -1
  210. package/dist-es/list.js +108 -105
  211. package/dist-es/loading-bar.css-mistica.js +1 -1
  212. package/dist-es/loading-bar.js +6 -6
  213. package/dist-es/loading-screen.css-mistica.js +5 -5
  214. package/dist-es/loading-screen.js +8 -8
  215. package/dist-es/logo.css-mistica.js +6 -6
  216. package/dist-es/maybe-dismissable.css-mistica.js +1 -1
  217. package/dist-es/menu.css-mistica.js +12 -12
  218. package/dist-es/menu.js +7 -7
  219. package/dist-es/mosaic.css-mistica.js +2 -2
  220. package/dist-es/mosaic.js +47 -46
  221. package/dist-es/navigation-bar.css-mistica.js +16 -16
  222. package/dist-es/navigation-breadcrumbs.css-mistica.js +1 -1
  223. package/dist-es/package-version.js +1 -1
  224. package/dist-es/pin-field.css-mistica.js +1 -1
  225. package/dist-es/pin-field.js +8 -8
  226. package/dist-es/popover.css-mistica.js +1 -1
  227. package/dist-es/progress-bar.css-mistica.js +5 -5
  228. package/dist-es/progress-bar.js +10 -10
  229. package/dist-es/radio-button.css-mistica.js +14 -14
  230. package/dist-es/radio-button.js +98 -88
  231. package/dist-es/rating.css-mistica.js +3 -3
  232. package/dist-es/rating.js +12 -12
  233. package/dist-es/responsive-layout.css-mistica.js +6 -6
  234. package/dist-es/responsive-layout.js +15 -15
  235. package/dist-es/screen-reader-only.css-mistica.js +1 -1
  236. package/dist-es/select.css-mistica.js +15 -15
  237. package/dist-es/select.js +15 -15
  238. package/dist-es/sheet-action-row.css-mistica.js +1 -1
  239. package/dist-es/sheet-common.css-mistica.js +1 -1
  240. package/dist-es/sheet-common.js +6 -6
  241. package/dist-es/sheet-info.css-mistica.js +2 -2
  242. package/dist-es/sheet-root.js +44 -40
  243. package/dist-es/skeletons.css-mistica.js +4 -4
  244. package/dist-es/skins/skin-contract.css-mistica.js +354 -354
  245. package/dist-es/slider.css-mistica.js +10 -10
  246. package/dist-es/slider.js +9 -9
  247. package/dist-es/snackbar.css-mistica.js +4 -4
  248. package/dist-es/spinner.css-mistica.js +1 -1
  249. package/dist-es/stack.css-mistica.js +6 -6
  250. package/dist-es/stacking-group.css-mistica.js +1 -1
  251. package/dist-es/stepper.css-mistica.js +3 -3
  252. package/dist-es/stepper.js +76 -60
  253. package/dist-es/style.css +1 -1
  254. package/dist-es/switch-component.css-mistica.js +26 -26
  255. package/dist-es/table.css-mistica.js +8 -8
  256. package/dist-es/table.js +12 -12
  257. package/dist-es/tabs.css-mistica.js +12 -12
  258. package/dist-es/tabs.js +166 -93
  259. package/dist-es/tag.css-mistica.js +1 -1
  260. package/dist-es/tag.js +8 -8
  261. package/dist-es/text-field-base.css-mistica.js +1 -1
  262. package/dist-es/text-field-base.js +153 -141
  263. package/dist-es/text-field-components.css-mistica.js +5 -5
  264. package/dist-es/text-field-components.js +4 -4
  265. package/dist-es/text-link.css-mistica.js +5 -5
  266. package/dist-es/text-tokens.js +87 -57
  267. package/dist-es/text.css-mistica.js +8 -8
  268. package/dist-es/text.js +6 -6
  269. package/dist-es/theme-context.css-mistica.js +396 -396
  270. package/dist-es/timeline.css-mistica.js +10 -10
  271. package/dist-es/timeline.js +4 -4
  272. package/dist-es/timer.css-mistica.js +6 -6
  273. package/dist-es/tooltip.css-mistica.js +1 -1
  274. package/dist-es/touchable.css-mistica.js +1 -1
  275. package/dist-es/touchable.js +67 -67
  276. package/dist-es/utils/aspect-ratio-support.css-mistica.js +3 -3
  277. package/dist-es/utils/aspect-ratio-support.js +10 -10
  278. package/dist-es/video.css-mistica.js +2 -2
  279. package/dist-es/video.js +5 -5
  280. package/dist-es/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +2 -2
  281. package/package.json +1 -1
@@ -78,160 +78,170 @@ function _object_without_properties_loose(source, excluded) {
78
78
  }
79
79
  return target;
80
80
  }
81
- import { jsx as n, jsxs as A } from "react/jsx-runtime";
82
- import * as i from "react";
83
- import { UP as B, LEFT as q, DOWN as E, RIGHT as O, SPACE as T } from "./utils/keys.js";
84
- import { useControlProps as w } from "./form-context.js";
85
- import { combineRefs as G } from "./utils/common.js";
86
- import { Text3 as P } from "./text.js";
87
- import $ from "./inline.js";
88
- import j from "classnames";
89
- import { useTheme as F } from "./hooks.js";
90
- import { getPrefixedDataAttributes as N } from "./utils/dom.js";
91
- import { inverseOuterCircleVariants as K, outerCircleVariants as H, disabled as D, inverseInnerCircleVariant as U, innerCircleVariant as W, radioButtonContainerDisabled as z, radioButton as J } from "./radio-button.css-mistica.js";
92
- import { useIsInverseVariant as L } from "./theme-variant-context.js";
93
- const S = /*#__PURE__*/ i.createContext({
81
+ import { jsx as i, jsxs as F } from "react/jsx-runtime";
82
+ import * as r from "react";
83
+ import { UP as O, LEFT as T, DOWN as w, RIGHT as G, SPACE as $ } from "./utils/keys.js";
84
+ import { useControlProps as j } from "./form-context.js";
85
+ import { combineRefs as K } from "./utils/common.js";
86
+ import { Text3 as A } from "./text.js";
87
+ import H from "./inline.js";
88
+ import U from "classnames";
89
+ import { useTheme as W } from "./hooks.js";
90
+ import { getPrefixedDataAttributes as E } from "./utils/dom.js";
91
+ import { inverseOuterCircleVariants as z, outerCircleVariants as J, disabled as B, inverseInnerCircleVariant as L, innerCircleVariant as M, radioButtonContainerDisabled as Q, radioButton as X } from "./radio-button.css-mistica.js";
92
+ import { useIsInverseVariant as Y } from "./theme-variant-context.js";
93
+ const q = /*#__PURE__*/ r.createContext({
94
+ id: "",
94
95
  disabled: !1,
95
96
  selectedValue: null,
96
97
  focusableValue: null,
97
98
  select: ()=>{},
98
99
  selectNext: ()=>{},
99
100
  selectPrev: ()=>{}
100
- }), M = ()=>i.useContext(S), Q = (_param)=>{
101
- var { value: e, id: d, dataAttributes: x, "aria-labelledby": g, "aria-label": C } = _param, m = _object_without_properties(_param, [
101
+ }), Z = ()=>r.useContext(q), _ = (_param)=>{
102
+ var { value: e, id: s, dataAttributes: R, "aria-labelledby": p, "aria-label": C } = _param, m = _object_without_properties(_param, [
102
103
  "value",
103
104
  "id",
104
105
  "dataAttributes",
105
106
  "aria-labelledby",
106
107
  "aria-label"
107
108
  ]);
108
- const { disabled: o, selectedValue: R, focusableValue: V, select: f, selectNext: p, selectPrev: y } = M(), r = i.useId(), b = g || r, I = i.useRef(null), u = e === R, a = V === e ? 0 : -1, { isIos: t } = F(), h = L(), v = (l)=>{
109
+ const { id: b, disabled: n, selectedValue: h, focusableValue: g, select: u, selectNext: y, selectPrev: V } = Z(), [o, I] = r.useState(!1), k = r.useId(), v = p || k, a = r.useRef(null), t = e === h, { isIos: x } = W(), f = Y(), c = n ? void 0 : g === e || o && !h ? 0 : -1;
110
+ r.useEffect(()=>{
111
+ var D;
112
+ const l = (D = document.getElementById(b)) == null ? void 0 : D.querySelector("[role=radio]");
113
+ I(l === a.current);
114
+ }, [
115
+ b
116
+ ]);
117
+ const d = (l)=>{
109
118
  switch(l.key){
110
- case T:
111
- f(e), l.preventDefault(), l.stopPropagation();
112
- break;
113
- case O:
114
- case E:
115
- p(), l.preventDefault(), l.stopPropagation();
119
+ case $:
120
+ u(e), l.preventDefault(), l.stopPropagation();
116
121
  break;
117
- case q:
118
- case B:
122
+ case G:
123
+ case w:
119
124
  y(), l.preventDefault(), l.stopPropagation();
120
125
  break;
126
+ case T:
127
+ case O:
128
+ V(), l.preventDefault(), l.stopPropagation();
129
+ break;
121
130
  }
122
- }, s = t ? u ? "checkedIos" : "ios" : u ? "checked" : "default", c = u ? "checked" : "default", k = /* @__PURE__ */ n("div", {
123
- className: j(h ? K[s] : H[s], {
124
- [D]: o
131
+ }, P = x ? t ? "checkedIos" : "ios" : t ? "checked" : "default", S = t ? "checked" : "default", N = /* @__PURE__ */ i("div", {
132
+ className: U(f ? z[P] : J[P], {
133
+ [B]: n
125
134
  }),
126
- children: !t && /* @__PURE__ */ n("div", {
127
- className: h ? U[c] : W[c]
135
+ children: !x && /* @__PURE__ */ i("div", {
136
+ className: f ? L[S] : M[S]
128
137
  })
129
138
  });
130
- return(// eslint-disable-next-line jsx-a11y/interactive-supports-focus
131
- /* @__PURE__ */ n("span", _object_spread_props(_object_spread({
132
- ref: I,
133
- id: d,
134
- tabIndex: o ? void 0 : a,
139
+ return /* @__PURE__ */ i("span", _object_spread_props(_object_spread({
140
+ ref: a,
141
+ id: s,
142
+ tabIndex: c,
135
143
  role: "radio",
136
144
  "data-value": e,
137
- "aria-checked": u,
138
- "aria-disabled": o,
145
+ "aria-checked": t,
146
+ "aria-disabled": n,
139
147
  "aria-label": C,
140
- "aria-labelledby": C ? void 0 : b,
148
+ "aria-labelledby": C ? void 0 : v,
141
149
  onClick: (l)=>{
142
- l.stopPropagation(), o || f(e);
150
+ l.stopPropagation(), n || u(e);
143
151
  },
144
- onKeyDown: o ? void 0 : v,
145
- className: o ? z : J
146
- }, N(x, "RadioButton")), {
152
+ onKeyDown: n ? void 0 : d,
153
+ className: n ? Q : X
154
+ }, E(R, "RadioButton")), {
147
155
  children: m.render ? m.render({
148
- controlElement: k,
149
- disabled: !!o,
150
- checked: u,
151
- labelId: b
152
- }) : /* @__PURE__ */ A($, {
156
+ controlElement: N,
157
+ disabled: !!n,
158
+ checked: t,
159
+ labelId: v
160
+ }) : /* @__PURE__ */ F(H, {
153
161
  space: 16,
154
162
  children: [
155
- /* @__PURE__ */ n(P, {
163
+ /* @__PURE__ */ i(A, {
156
164
  regular: !0,
157
165
  as: "div",
158
- children: /* @__PURE__ */ n("div", {
166
+ children: /* @__PURE__ */ i("div", {
159
167
  style: {
160
168
  position: "relative",
161
169
  top: -2
162
170
  },
163
- children: k
171
+ children: N
164
172
  })
165
173
  }),
166
- /* @__PURE__ */ n(P, {
174
+ /* @__PURE__ */ i(A, {
167
175
  regular: !0,
168
176
  as: "div",
169
- id: b,
170
- children: /* @__PURE__ */ n("span", {
171
- className: o ? D : "",
177
+ id: v,
178
+ children: /* @__PURE__ */ i("span", {
179
+ className: n ? B : "",
172
180
  children: m.children
173
181
  })
174
182
  })
175
183
  ]
176
184
  })
177
- })));
178
- }, ie = (e)=>{
185
+ }));
186
+ }, ue = (e)=>{
179
187
  var _ref;
180
- const { value: d, defaultValue: x, onChange: g, focusableRef: C, disabled: m } = w({
188
+ const { value: s, defaultValue: R, onChange: p, focusableRef: C, disabled: m } = j({
181
189
  name: e.name,
182
190
  value: e.value,
183
191
  defaultValue: e.defaultValue,
184
192
  onChange: e.onChange,
185
193
  disabled: e.disabled
186
- }), o = typeof d < "u", [R, V] = i.useState((_ref = d !== null && d !== void 0 ? d : x) !== null && _ref !== void 0 ? _ref : "");
187
- i.useEffect(()=>{
188
- d !== void 0 && V(d);
194
+ }), b = r.useId(), n = typeof s < "u", [h, g] = r.useState((_ref = s !== null && s !== void 0 ? s : R) !== null && _ref !== void 0 ? _ref : "");
195
+ r.useEffect(()=>{
196
+ s !== void 0 && g(s);
189
197
  }, [
190
- d
198
+ s
191
199
  ]);
192
- const f = (a)=>{
193
- o || V(a), g(a);
194
- }, [p, y] = i.useState(null), r = i.useRef(null), b = ()=>{
195
- if (r.current) {
196
- const a = r.current.querySelector("[role=radio][aria-checked=true]"), t = Array.from(r.current.querySelectorAll("[role=radio]"));
200
+ const u = (a)=>{
201
+ n || g(a), p(a);
202
+ }, [y, V] = r.useState(null), o = r.useRef(null), I = ()=>{
203
+ if (o.current) {
204
+ const a = o.current.querySelector("[role=radio][aria-checked=true]"), t = Array.from(o.current.querySelectorAll("[role=radio]"));
197
205
  if (t.length === 0) return;
198
- const v = ((a ? t.indexOf(a) : 0) + 1) % t.length, s = t[v], c = s.dataset.value;
199
- c && (s.focus(), f(c));
206
+ const f = ((a ? t.indexOf(a) : 0) + 1) % t.length, c = t[f], d = c.dataset.value;
207
+ d && (c.focus(), u(d));
200
208
  }
201
- }, I = ()=>{
202
- if (r.current) {
203
- const a = r.current.querySelector("[role=radio][aria-checked=true]"), t = Array.from(r.current.querySelectorAll("[role=radio]"));
209
+ }, k = ()=>{
210
+ if (o.current) {
211
+ const a = o.current.querySelector("[role=radio][aria-checked=true]"), t = Array.from(o.current.querySelectorAll("[role=radio]"));
204
212
  if (t.length === 0) return;
205
- const h = a ? t.indexOf(a) : 0, v = (t.length + h - 1) % t.length, s = t[v], c = s.dataset.value;
206
- c && (s.focus(), f(c));
213
+ const x = a ? t.indexOf(a) : 0, f = (t.length + x - 1) % t.length, c = t[f], d = c.dataset.value;
214
+ d && (c.focus(), u(d));
207
215
  }
208
216
  };
209
- i.useEffect(()=>{
210
- if (r.current) {
211
- const a = r.current.querySelector("[role=radio]");
217
+ r.useEffect(()=>{
218
+ if (o.current) {
219
+ const a = o.current.querySelector("[role=radio]");
212
220
  var _a_dataset_value;
213
- a && y((_a_dataset_value = a.dataset.value) !== null && _a_dataset_value !== void 0 ? _a_dataset_value : null);
221
+ a && V((_a_dataset_value = a.dataset.value) !== null && _a_dataset_value !== void 0 ? _a_dataset_value : null);
214
222
  }
215
223
  }, []);
216
224
  var _ref1;
217
- const u = (_ref1 = R !== null && R !== void 0 ? R : p) !== null && _ref1 !== void 0 ? _ref1 : null;
218
- return /* @__PURE__ */ n("div", _object_spread_props(_object_spread({
219
- ref: G(r, C),
225
+ const v = (_ref1 = h !== null && h !== void 0 ? h : y) !== null && _ref1 !== void 0 ? _ref1 : null;
226
+ return /* @__PURE__ */ i("div", _object_spread_props(_object_spread({
227
+ ref: K(o, C),
228
+ id: b,
220
229
  role: "radiogroup",
221
230
  "aria-label": e["aria-label"],
222
231
  "aria-labelledby": e["aria-label"] ? void 0 : e["aria-labelledby"]
223
- }, N(e.dataAttributes, "RadioGroup")), {
224
- children: /* @__PURE__ */ n(S.Provider, {
232
+ }, E(e.dataAttributes, "RadioGroup")), {
233
+ children: /* @__PURE__ */ i(q.Provider, {
225
234
  value: {
235
+ id: b,
226
236
  disabled: m,
227
- selectedValue: R !== null && R !== void 0 ? R : x,
228
- focusableValue: u,
229
- select: f,
230
- selectNext: b,
231
- selectPrev: I
237
+ selectedValue: h !== null && h !== void 0 ? h : R,
238
+ focusableValue: v,
239
+ select: u,
240
+ selectNext: I,
241
+ selectPrev: k
232
242
  },
233
243
  children: e.children
234
244
  })
235
245
  }));
236
- }, se = Q;
237
- export { ie as RadioGroup, se as default, M as useRadioContext };
246
+ }, fe = _;
247
+ export { ue as RadioGroup, fe as default, Z as useRadioContext };
@@ -1,6 +1,6 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./rating.css.ts.vanilla.css-mistica.js";
3
- var i = "v16_30_1_igrtie3 v16_30_1_1y2v1nfis v16_30_1_1y2v1nfj1 v16_30_1_1y2v1nfj7", r = "v16_30_1_igrtie9", a = "v16_30_1_igrtiea", n = "v16_30_1_igrtie8 v16_30_1_1y2v1nfim", t = "v16_30_1_1y2v1nfim", e = "v16_30_1_igrtie6 v16_30_1_1y2v1nfin", o = "v16_30_1_igrtieb", c = "v16_30_1_igrtiec", f = {
4
- iconSize: "var(--v16_30_1_igrtie0)"
3
+ var _ = "v16_32_igrtie3 v16_32_1y2v1nfis v16_32_1y2v1nfj1 v16_32_1y2v1nfj7", r = "v16_32_igrtie9", a = "v16_32_igrtiea", n = "v16_32_igrtie8 v16_32_1y2v1nfim", t = "v16_32_1y2v1nfim", e = "v16_32_igrtie6 v16_32_1y2v1nfin", o = "v16_32_igrtieb", c = "v16_32_igrtiec", f = {
4
+ iconSize: "var(--v16_32_igrtie0)"
5
5
  };
6
- export { i as IconWrapper, r as disabled, a as firstIcon, n as halfIconActive, t as halfIconContainer, e as halfIconInactive, o as lastIcon, c as touchable, f as vars };
6
+ export { _ as IconWrapper, r as disabled, a as firstIcon, n as halfIconActive, t as halfIconContainer, e as halfIconInactive, o as lastIcon, c as touchable, f as vars };
package/dist-es/rating.js CHANGED
@@ -78,7 +78,7 @@ import fo from "./generated/mistica-icons/icon-face-happy-regular.js";
78
78
  import go from "./generated/mistica-icons/icon-face-super-happy-filled.js";
79
79
  import bo from "./generated/mistica-icons/icon-face-super-happy-regular.js";
80
80
  import { useTheme as ho } from "./hooks.js";
81
- import { ratingVeryBadLabel as Ao, ratingBadLabel as Fo, ratingRegularLabel as Ro, ratingGoodLabel as So, ratingVeryGoodLabel as Lo, ratingQuantitativeLabel as No } from "./text-tokens.js";
81
+ import { ratingVeryBadLabel as Ao, ratingBadLabel as Fo, ratingRegularLabel as Ro, ratingGoodLabel as No, ratingVeryGoodLabel as So, ratingQuantitativeLabel as Lo } from "./text-tokens.js";
82
82
  const To = 32, _o = 16, yo = 5, Eo = {
83
83
  ActiveIcon: q,
84
84
  InactiveIcon: D,
@@ -125,23 +125,23 @@ const To = 32, _o = 16, yo = 5, Eo = {
125
125
  R
126
126
  ];
127
127
  }, H = (param)=>{
128
- let { icons: i = V, count: e = yo, icon: I = Eo, size: a = To, type: n = "quantitative", dataAttributes: p, onChangeValue: A, defaultValue: F, value: R, disabled: l, role: S, valueLabels: O, withHalfValue: Q, "aria-label": f, "aria-labelledby": L } = param;
128
+ let { icons: i = V, count: e = yo, icon: I = Eo, size: a = To, type: n = "quantitative", dataAttributes: p, onChangeValue: A, defaultValue: F, value: R, disabled: l, role: N, valueLabels: O, withHalfValue: Q, "aria-label": f, "aria-labelledby": S } = param;
129
129
  const { texts: v, t: u } = ho(), $ = [
130
130
  v.ratingVeryBadLabel || u(Ao),
131
131
  v.ratingBadLabel || u(Fo),
132
132
  v.ratingRegularLabel || u(Ro),
133
- v.ratingGoodLabel || u(So),
134
- v.ratingVeryGoodLabel || u(Lo)
133
+ v.ratingGoodLabel || u(No),
134
+ v.ratingVeryGoodLabel || u(So)
135
135
  ], B = Array.from({
136
136
  length: e
137
- }, (o, t)=>(v.ratingQuantitativeLabel || u(No)).replace("1$s", String(t + 1)).replace("2$s", String(e))), m = n === "qualitative" ? i : Array.from({
137
+ }, (o, t)=>(v.ratingQuantitativeLabel || u(Lo)).replace("1$s", String(t + 1)).replace("2$s", String(e))), m = n === "qualitative" ? i : Array.from({
138
138
  length: e
139
- }, ()=>I), g = O !== null && O !== void 0 ? O : n === "qualitative" && no(m, V) ? $ : B, b = S === "radiogroup", _ = b ? 16 : a <= 16 ? 2 : a <= 24 ? 4 : 8, y = P(), [N, E] = T.useState(void 0), C = eo(), [s, M] = Go({
139
+ }, ()=>I), g = O !== null && O !== void 0 ? O : n === "qualitative" && no(m, V) ? $ : B, b = N === "radiogroup", _ = b ? 16 : a <= 16 ? 2 : a <= 24 ? 4 : 8, y = P(), [L, E] = T.useState(void 0), C = eo(), [s, M] = Go({
140
140
  value: R,
141
141
  defaultValue: F,
142
142
  iconsCount: m.length,
143
143
  onChangeValue: A
144
- }), j = (o)=>N !== void 0 && !l ? n === "qualitative" && o === N || n === "quantitative" && o <= N ? "active" : "inactive" : n === "qualitative" ? o === s ? "active" : "inactive" : b ? o <= s ? "active" : "inactive" : Q ? o - 0.75 <= s && s < o - 0.25 ? "half" : o - 0.25 <= s ? "active" : "inactive" : o - 0.5 < s ? "active" : "inactive", w = (o, t)=>{
144
+ }), j = (o)=>L !== void 0 && !l ? n === "qualitative" && o === L || n === "quantitative" && o <= L ? "active" : "inactive" : n === "qualitative" ? o === s ? "active" : "inactive" : b ? o <= s ? "active" : "inactive" : Q ? o - 0.75 <= s && s < o - 0.25 ? "half" : o - 0.25 <= s ? "active" : "inactive" : o - 0.5 < s ? "active" : "inactive", w = (o, t)=>{
145
145
  const d = y === "inverse" ? c.colors.inverse : m[t].color, h = y === "inverse" ? c.colors.inverse : b ? c.colors.control : m[0].color;
146
146
  switch(j(t + 1)){
147
147
  case "active":
@@ -207,17 +207,17 @@ const To = 32, _o = 16, yo = 5, Eo = {
207
207
  }
208
208
  }, t) : d;
209
209
  };
210
- return S === "img" ? /* @__PURE__ */ r(U, {
210
+ return N === "img" ? /* @__PURE__ */ r(U, {
211
211
  space: _,
212
212
  dataAttributes: p,
213
- role: S,
214
- "aria-label": f !== null && f !== void 0 ? f : L ? void 0 : `${s} de ${e}`,
215
- "aria-labelledby": f ? void 0 : L,
213
+ role: N,
214
+ "aria-label": f !== null && f !== void 0 ? f : S ? void 0 : `${s} de ${e}`,
215
+ "aria-labelledby": f ? void 0 : S,
216
216
  children: m.map(G)
217
217
  }) : /* @__PURE__ */ r(io, {
218
218
  name: "info-rating",
219
219
  "aria-label": f,
220
- "aria-labelledby": f ? void 0 : L,
220
+ "aria-labelledby": f ? void 0 : S,
221
221
  disabled: l,
222
222
  onChange: (o)=>{
223
223
  M(g.findIndex((t)=>t === o) + 1);
@@ -1,8 +1,8 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./responsive-layout.css.ts.vanilla.css-mistica.js";
3
- var v = 16, e = 40, o = 32, a = {
4
- inverse: "v16_30_1_1y2v1nf4l",
5
- media: "v16_30_1_1y2v1nf8k",
6
- alternative: "v16_30_1_1y2v1nf4q"
7
- }, n = "v16_30_1_17lofg77", t = "v16_30_1_17lofg78", i = "v16_30_1_17lofg7a", f = "v16_30_1_17lofg7g v16_30_1_1y2v1nfjf", l = "v16_30_1_17lofg79", g = "v16_30_1_17lofg73", s = "v16_30_1_17lofg72", M = "v16_30_1_17lofg75", p = "v16_30_1_17lofg74", C = "v16_30_1_17lofg7e", D = "v16_30_1_17lofg76";
8
- export { v as MOBILE_SIDE_MARGIN, e as SMALL_DESKTOP_SIDE_MARGIN, o as TABLET_SIDE_MARGIN, a as backgroundVariant, n as desktopContainer, t as forcedMarginDesktopContainer, i as forcedMarginMobileContainer, f as fullWidth, l as mobileContainer, g as resetContainerDesktop, s as resetContainerMobile, M as resetDesktop, p as resetMobile, C as responsiveLayout, D as responsiveLayoutContainer };
3
+ var _ = 16, e = 40, o = 32, a = {
4
+ inverse: "v16_32_1y2v1nf4l",
5
+ media: "v16_32_1y2v1nf8k",
6
+ alternative: "v16_32_1y2v1nf4q"
7
+ }, n = "v16_32_17lofg77", t = "v16_32_17lofg78", i = "v16_32_17lofg7a", f = "v16_32_17lofg7g v16_32_1y2v1nfjf", l = "v16_32_17lofg79", g = "v16_32_17lofg73", s = "v16_32_17lofg72", M = "v16_32_17lofg75", p = "v16_32_17lofg74", C = "v16_32_17lofg7e", D = "v16_32_17lofg76";
8
+ export { _ as MOBILE_SIDE_MARGIN, e as SMALL_DESKTOP_SIDE_MARGIN, o as TABLET_SIDE_MARGIN, a as backgroundVariant, n as desktopContainer, t as forcedMarginDesktopContainer, i as forcedMarginMobileContainer, f as fullWidth, l as mobileContainer, g as resetContainerDesktop, s as resetContainerMobile, M as resetDesktop, p as resetMobile, C as responsiveLayout, D as responsiveLayoutContainer };
@@ -79,27 +79,27 @@ function _object_without_properties_loose(source, excluded) {
79
79
  return target;
80
80
  }
81
81
  import { jsx as t } from "react/jsx-runtime";
82
- import o from "classnames";
82
+ import s from "classnames";
83
83
  import { getPrefixedDataAttributes as f } from "./utils/dom.js";
84
- import { backgroundVariant as v, desktopContainer as p, forcedMarginDesktopContainer as y, mobileContainer as h, forcedMarginMobileContainer as C, responsiveLayoutContainer as L, fullWidth as b, responsiveLayout as R, resetContainerMobile as V, resetContainerDesktop as g, resetMobile as M, resetDesktop as N } from "./responsive-layout.css-mistica.js";
84
+ import { backgroundVariant as v, desktopContainer as p, forcedMarginDesktopContainer as y, mobileContainer as h, forcedMarginMobileContainer as C, responsiveLayoutContainer as L, fullWidth as b, responsiveLayout as N, resetContainerMobile as R, resetContainerDesktop as V, resetMobile as g, resetDesktop as M } from "./responsive-layout.css-mistica.js";
85
85
  import { useThemeVariant as x, ThemeVariant as D } from "./theme-variant-context.js";
86
86
  const k = (param)=>{
87
- let { children: a, isInverse: e = !1, variant: r, backgroundColor: s, className: d, fullWidth: i, dataAttributes: m, shouldExpandWhenNested: l = !1, innerDivClassName: c } = param;
88
- const u = x(), n = r || e && "inverse" || void 0;
87
+ let { children: a, isInverse: e = !1, variant: r, backgroundColor: n, className: d, fullWidth: i, dataAttributes: m, shouldExpandWhenNested: l = !1, innerDivClassName: c } = param;
88
+ const u = x(), o = r || e && "inverse" || void 0;
89
89
  return /* @__PURE__ */ t(D, {
90
- variant: n !== null && n !== void 0 ? n : u,
90
+ variant: o !== null && o !== void 0 ? o : u,
91
91
  children: /* @__PURE__ */ t("div", _object_spread_props(_object_spread({
92
- className: o(d, n && n !== "default" && v[n], ...i ? [] : [
92
+ className: s(d, o && o !== "default" && v[o], ...i ? [] : [
93
93
  l ? p : y,
94
94
  l === !0 ? h : C,
95
95
  L
96
96
  ]),
97
- style: s ? {
98
- background: s
97
+ style: n ? {
98
+ background: n
99
99
  } : void 0
100
100
  }, f(m)), {
101
101
  children: /* @__PURE__ */ t("div", {
102
- className: o(i ? b : R, c),
102
+ className: s(i ? b : N, c),
103
103
  children: a
104
104
  })
105
105
  }))
@@ -115,14 +115,14 @@ const k = (param)=>{
115
115
  }, q = (param)=>{
116
116
  let { children: a, skipMobile: e = !1, skipDesktop: r = !1 } = param;
117
117
  return /* @__PURE__ */ t("div", {
118
- className: o({
119
- [V]: !e,
120
- [g]: !r
118
+ className: s({
119
+ [R]: !e,
120
+ [V]: !r
121
121
  }),
122
122
  children: /* @__PURE__ */ t("div", {
123
- className: o({
124
- [M]: !e,
125
- [N]: !r
123
+ className: s({
124
+ [g]: !e,
125
+ [M]: !r
126
126
  }),
127
127
  children: a
128
128
  })
@@ -1,4 +1,4 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./screen-reader-only.css.ts.vanilla.css-mistica.js";
3
- var n = "v16_30_1_gwdgwo1 v16_30_1_1y2v1nf8l v16_30_1_1y2v1nf9u v16_30_1_1y2v1nfb3 v16_30_1_1y2v1nfcc v16_30_1_1y2v1nfin v16_30_1_1y2v1nflu v16_30_1_1y2v1nfla";
3
+ var n = "v16_32_gwdgwo1 v16_32_1y2v1nf8l v16_32_1y2v1nf9u v16_32_1y2v1nfb3 v16_32_1y2v1nfcc v16_32_1y2v1nfin v16_32_1y2v1nflu v16_32_1y2v1nfla";
4
4
  export { n as screenReaderOnly };
@@ -2,23 +2,23 @@ import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./icon-button.css.ts.vanilla.css-mistica.js";
3
3
  import "./text-field-base.css.ts.vanilla.css-mistica.js";
4
4
  import "./select.css.ts.vanilla.css-mistica.js";
5
- var f = "v16_30_1_1sqpivvo v16_30_1_1y2v1nfin", y = "v16_30_1_1sqpivvp", a = "v16_30_1_1sqpivvr v16_30_1_1y2v1nfbi v16_30_1_1y2v1nfcr v16_30_1_1y2v1nf8u v16_30_1_1y2v1nfa3 v16_30_1_1y2v1nf2c v16_30_1_1y2v1nfis v16_30_1_1y2v1nfj7 v16_30_1_1y2v1nflt", s = "v16_30_1_1y2v1nf4q", r = {
6
- show: "v16_30_1_1sqpivv7",
7
- hide: "v16_30_1_1sqpivv8"
8
- }, t = "v16_30_1_1sqpivv6 v16_30_1_1y2v1nf8l v16_30_1_1y2v1nf9u v16_30_1_1y2v1nfb3 v16_30_1_1y2v1nfcc v16_30_1_1y2v1nfio v16_30_1_1y2v1nflj v16_30_1_1y2v1nf4c", p = {
9
- default: "v16_30_1_1sqpivvd v16_30_1_1sqpivvc v16_30_1_1y2v1nfim v16_30_1_1y2v1nflt",
10
- fullWidth: "v16_30_1_1sqpivve v16_30_1_1sqpivvc v16_30_1_1y2v1nfim v16_30_1_1y2v1nflt"
5
+ var f = "v16_32_1sqpivvo v16_32_1y2v1nfin", y = "v16_32_1sqpivvp", a = "v16_32_1sqpivvr v16_32_1y2v1nfbi v16_32_1y2v1nfcr v16_32_1y2v1nf8u v16_32_1y2v1nfa3 v16_32_1y2v1nf2c v16_32_1y2v1nfis v16_32_1y2v1nfj7 v16_32_1y2v1nflt", s = "v16_32_1y2v1nf4q", r = {
6
+ show: "v16_32_1sqpivv7",
7
+ hide: "v16_32_1sqpivv8"
8
+ }, t = "v16_32_1sqpivv6 v16_32_1y2v1nf8l v16_32_1y2v1nf9u v16_32_1y2v1nfb3 v16_32_1y2v1nfcc v16_32_1y2v1nfio v16_32_1y2v1nflj v16_32_1y2v1nf4c", p = {
9
+ default: "v16_32_1sqpivvd v16_32_1sqpivvc v16_32_1y2v1nfim v16_32_1y2v1nflt",
10
+ fullWidth: "v16_32_1sqpivve v16_32_1sqpivvc v16_32_1y2v1nfim v16_32_1y2v1nflt"
11
11
  }, l = {
12
- default: "v16_30_1_1sqpivvl v16_30_1_1sqpivvk v16_30_1_1y2v1nfin v16_30_1_1y2v1nflu v16_30_1_1y2v1nfl7 v16_30_1_1y2v1nf2c",
13
- disabled: "v16_30_1_1sqpivvm v16_30_1_1sqpivvk v16_30_1_1y2v1nfin v16_30_1_1y2v1nflu v16_30_1_1y2v1nfl7 v16_30_1_1y2v1nf2c"
12
+ default: "v16_32_1sqpivvl v16_32_1sqpivvk v16_32_1y2v1nfin v16_32_1y2v1nflu v16_32_1y2v1nfl7 v16_32_1y2v1nf2c",
13
+ disabled: "v16_32_1sqpivvm v16_32_1sqpivvk v16_32_1y2v1nfin v16_32_1y2v1nflu v16_32_1y2v1nfl7 v16_32_1y2v1nf2c"
14
14
  }, e = {
15
- default: "v16_30_1_1sqpivvh v16_30_1_1sqpivvg v16_30_1_1y2v1nf8l v16_30_1_1y2v1nf9u v16_30_1_1y2v1nfla v16_30_1_1y2v1nflu v16_30_1_1y2v1nf2c v16_30_1_1y2v1nf8k v16_30_1_1y2v1nfjf",
16
- disabled: "v16_30_1_1sqpivvi v16_30_1_1sqpivvg v16_30_1_1y2v1nf8l v16_30_1_1y2v1nf9u v16_30_1_1y2v1nfla v16_30_1_1y2v1nflu v16_30_1_1y2v1nf2c v16_30_1_1y2v1nf8k v16_30_1_1y2v1nfjf"
15
+ default: "v16_32_1sqpivvh v16_32_1sqpivvg v16_32_1y2v1nf8l v16_32_1y2v1nf9u v16_32_1y2v1nfla v16_32_1y2v1nflu v16_32_1y2v1nf2c v16_32_1y2v1nf8k v16_32_1y2v1nfjf v16_32_1y2v1nflj",
16
+ disabled: "v16_32_1sqpivvi v16_32_1sqpivvg v16_32_1y2v1nf8l v16_32_1y2v1nf9u v16_32_1y2v1nfla v16_32_1y2v1nflu v16_32_1y2v1nf2c v16_32_1y2v1nf8k v16_32_1y2v1nfjf v16_32_1y2v1nflj"
17
17
  }, q = {
18
- top: "var(--v16_30_1_1sqpivv0)",
19
- left: "var(--v16_30_1_1sqpivv1)",
20
- transformOrigin: "var(--v16_30_1_1sqpivv2)",
21
- minWidth: "var(--v16_30_1_1sqpivv3)",
22
- maxHeight: "var(--v16_30_1_1sqpivv4)"
18
+ top: "var(--v16_32_1sqpivv0)",
19
+ left: "var(--v16_32_1sqpivv1)",
20
+ transformOrigin: "var(--v16_32_1sqpivv2)",
21
+ minWidth: "var(--v16_32_1sqpivv3)",
22
+ maxHeight: "var(--v16_32_1sqpivv4)"
23
23
  };
24
24
  export { f as arrowDown, y as iconContainer, a as menuItem, s as menuItemSelected, r as optionsAnimationsVariants, t as optionsContainer, p as selectContainerVariants, l as selectTextVariants, e as selectVariants, q as vars };
package/dist-es/select.js CHANGED
@@ -64,7 +64,7 @@ import je from "./overlay.js";
64
64
  import { isAndroid as Ke, isIos as Ue } from "./utils/platform.js";
65
65
  import { cancelEvent as m } from "./utils/dom.js";
66
66
  import { Text3 as Xe } from "./text.js";
67
- import { selectVariants as Je, arrowDown as Qe, iconContainer as ce, selectContainerVariants as Ye, selectTextVariants as et, vars as N, optionsContainer as tt, optionsAnimationsVariants as ae, menuItem as nt, menuItemSelected as rt } from "./select.css-mistica.js";
67
+ import { selectVariants as Je, arrowDown as Qe, iconContainer as ce, selectContainerVariants as Ye, selectTextVariants as et, vars as b, optionsContainer as tt, optionsAnimationsVariants as ae, menuItem as nt, menuItemSelected as rt } from "./select.css-mistica.js";
68
68
  import { inputWithLabel as le, inputWithoutLabel as ue } from "./text-field-base.css-mistica.js";
69
69
  import { Portal as ot } from "./portal.js";
70
70
  import { pxToRem as st, applyCssVars as it } from "./utils/css.js";
@@ -73,8 +73,8 @@ import { vars as de } from "./skins/skin-contract.css-mistica.js";
73
73
  const at = (param)=>{
74
74
  let { id: fe, label: u, helperText: pe, value: me, defaultValue: he, onChangeValue: C, name: i, fullWidth: M, options: d, optional: P, showOptionalLabel: Se, disabled: ve, error: ge, onBlur: D, autoFocus: z = !1, native: Te, dataAttributes: j } = param;
75
75
  var re;
76
- const h = n.useRef(null), f = n.useRef(null), S = n.useRef(null), v = n.useRef(null), R = n.useRef(/* @__PURE__ */ new Map()), [Ie, we] = n.useState(!0), [g, Ee] = n.useState(he), [H, K] = n.useState(!1), [U, X] = n.useState(!1), [J, O] = n.useState(!1), [a, F] = n.useState({}), [T, W] = n.useState(), G = n.useRef(null), xe = n.useId(), L = fe || xe, { rawValues: Oe, setRawValue: Z, setValue: $, formStatus: ye, formErrors: Q, setFormError: be, register: B } = He(), { platformOverrides: Y } = Fe(), Ne = Te || process.env.NODE_ENV === "test" && !process.env.SSR_TEST || Ke(Y) || Ue(Y), I = ve || ye === "sending", A = ge || !!Q[i], ee = Q[i] || pe, l = me !== null && me !== void 0 ? me : Oe[i], te = (e)=>{
77
- C == null || C(e), be({
76
+ const h = n.useRef(null), f = n.useRef(null), S = n.useRef(null), v = n.useRef(null), R = n.useRef(/* @__PURE__ */ new Map()), [Ie, we] = n.useState(!0), [g, Ee] = n.useState(he), [H, K] = n.useState(!1), [U, X] = n.useState(!1), [J, O] = n.useState(!1), [a, F] = n.useState({}), [T, W] = n.useState(), G = n.useRef(null), xe = n.useId(), L = fe || xe, { rawValues: Oe, setRawValue: Z, setValue: $, formStatus: ye, formErrors: Q, setFormError: Ne, register: B } = He(), { platformOverrides: Y } = Fe(), be = Te || process.env.NODE_ENV === "test" && !process.env.SSR_TEST || Ke(Y) || Ue(Y), I = ve || ye === "sending", A = ge || !!Q[i], ee = Q[i] || pe, l = me !== null && me !== void 0 ? me : Oe[i], te = (e)=>{
77
+ C == null || C(e), Ne({
78
78
  name: i,
79
79
  error: ""
80
80
  }), Z({
@@ -87,9 +87,9 @@ const at = (param)=>{
87
87
  }, w = (e)=>{
88
88
  if (e) {
89
89
  if (S != null && S.current) {
90
- const s = S.current.getBoundingClientRect(), p = s.top, x = s.width, y = s.left, Ce = s.height, b = p + Ce, V = Math.min(d.length, 8) * 48 + 16;
91
- if (b + V + 12 > window.innerHeight) {
92
- const Me = window.innerHeight - b;
90
+ const s = S.current.getBoundingClientRect(), p = s.top, x = s.width, y = s.left, Ce = s.height, N = p + Ce, V = Math.min(d.length, 8) * 48 + 16;
91
+ if (N + V + 12 > window.innerHeight) {
92
+ const Me = window.innerHeight - N;
93
93
  if (p > Me) {
94
94
  const Pe = p - V;
95
95
  F({
@@ -101,14 +101,14 @@ const at = (param)=>{
101
101
  });
102
102
  } else F({
103
103
  minWidth: x,
104
- top: b,
104
+ top: N,
105
105
  left: y,
106
- maxHeight: window.innerHeight - b - 12,
106
+ maxHeight: window.innerHeight - N - 12,
107
107
  transformOrigin: "center top"
108
108
  });
109
109
  } else F({
110
110
  minWidth: x,
111
- top: b,
111
+ top: N,
112
112
  left: y,
113
113
  maxHeight: V,
114
114
  transformOrigin: "center top"
@@ -228,7 +228,7 @@ const at = (param)=>{
228
228
  var _a_transformOrigin;
229
229
  return /* @__PURE__ */ r(ct, {
230
230
  variant: "default",
231
- children: Ne || Ie ? /* @__PURE__ */ _($e, {
231
+ children: be || Ie ? /* @__PURE__ */ _($e, {
232
232
  disabled: I,
233
233
  helperText: /* @__PURE__ */ r(Be, {
234
234
  error: A,
@@ -372,11 +372,11 @@ const at = (param)=>{
372
372
  children: /* @__PURE__ */ r(ot, {
373
373
  children: /* @__PURE__ */ r("ul", {
374
374
  style: it({
375
- [N.top]: a.top ? `${a.top}px` : "",
376
- [N.left]: a.left ? `${a.left}px` : "",
377
- [N.maxHeight]: a.maxHeight ? `${a.maxHeight}px` : "",
378
- [N.minWidth]: a.minWidth ? `${a.minWidth}px` : "",
379
- [N.transformOrigin]: (_a_transformOrigin = a.transformOrigin) !== null && _a_transformOrigin !== void 0 ? _a_transformOrigin : ""
375
+ [b.top]: a.top ? `${a.top}px` : "",
376
+ [b.left]: a.left ? `${a.left}px` : "",
377
+ [b.maxHeight]: a.maxHeight ? `${a.maxHeight}px` : "",
378
+ [b.minWidth]: a.minWidth ? `${a.minWidth}px` : "",
379
+ [b.transformOrigin]: (_a_transformOrigin = a.transformOrigin) !== null && _a_transformOrigin !== void 0 ? _a_transformOrigin : ""
380
380
  }),
381
381
  onPointerDown: m,
382
382
  className: k(tt, U ? ae.show : ae.hide),
@@ -1,4 +1,4 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./sheet-action-row.css.ts.vanilla.css-mistica.js";
3
- var n = "v16_30_1_4k81wx1 v16_30_1_1y2v1nf90 v16_30_1_1y2v1nfa9 v16_30_1_1y2v1nfbi v16_30_1_1y2v1nfcr v16_30_1_1y2v1nfis v16_30_1_1y2v1nfl5 v16_30_1_1y2v1nfj7";
3
+ var n = "v16_32_4k81wx1 v16_32_1y2v1nf90 v16_32_1y2v1nfa9 v16_32_1y2v1nfbi v16_32_1y2v1nfcr v16_32_1y2v1nfis v16_32_1y2v1nfl5 v16_32_1y2v1nfj7";
4
4
  export { n as sheetActionRow };
@@ -1,4 +1,4 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./sheet-common.css.ts.vanilla.css-mistica.js";
3
- var n = "v16_30_1_pidemf6 v16_30_1_1y2v1nf4b", f = "v16_30_1_pidemf4 v16_30_1_1y2v1nfio v16_30_1_1y2v1nfmf v16_30_1_1y2v1nfmu v16_30_1_1y2v1nfn9", y = "v16_30_1_pidemf9 v16_30_1_1y2v1nf99 v16_30_1_1y2v1nfis v16_30_1_1y2v1nfiy", e = "v16_30_1_pidemfu", i = "v16_30_1_1y2v1nflz v16_30_1_1y2v1nfje v16_30_1_1y2v1nfis v16_30_1_1y2v1nfiy", a = "v16_30_1_pidemfp", r = "v16_30_1_pidemf7", m = "v16_30_1_1y2v1nf5m v16_30_1_1y2v1nfjf v16_30_1_1y2v1nfjw v16_30_1_1y2v1nfld", t = "v16_30_1_pidemfe v16_30_1_1y2v1nfir", o = "v16_30_1_1y2v1nfjo v16_30_1_1y2v1nfjz", d = "v16_30_1_pidemfj v16_30_1_1y2v1nf96 v16_30_1_1y2v1nfaf v16_30_1_1y2v1nfbo v16_30_1_1y2v1nfcx v16_30_1_1y2v1nfin v16_30_1_1y2v1nfm0 v16_30_1_1y2v1nfmu", p = "v16_30_1_pidemfo v16_30_1_1y2v1nfio v16_30_1_1y2v1nf4n v16_30_1_1y2v1nfm0 v16_30_1_1y2v1nfmf v16_30_1_1y2v1nfmu v16_30_1_1y2v1nfn9", l = "v16_30_1_pidemfc v16_30_1_1y2v1nf8u v16_30_1_1y2v1nfa3 v16_30_1_1y2v1nfin v16_30_1_1y2v1nfm0 v16_30_1_1y2v1nfk9 v16_30_1_1y2v1nfjf v16_30_1_1y2v1nfis v16_30_1_1y2v1nfj1", s = "v16_30_1_pidemft v16_30_1_1y2v1nfiq v16_30_1_1y2v1nfn9 v16_30_1_1y2v1nf4b", h = "v16_30_1_pidemfr v16_30_1_1y2v1nfiq v16_30_1_1y2v1nfm0 v16_30_1_1y2v1nf4b", u = 400;
3
+ var n = "v16_32_pidemf6 v16_32_1y2v1nf4b", f = "v16_32_pidemf4 v16_32_1y2v1nfio v16_32_1y2v1nfmf v16_32_1y2v1nfmu v16_32_1y2v1nfn9", y = "v16_32_pidemf9 v16_32_1y2v1nf99 v16_32_1y2v1nfis v16_32_1y2v1nfiy", e = "v16_32_pidemfu", i = "v16_32_1y2v1nflz v16_32_1y2v1nfje v16_32_1y2v1nfis v16_32_1y2v1nfiy", a = "v16_32_pidemfp", r = "v16_32_pidemf7", m = "v16_32_1y2v1nf5m v16_32_1y2v1nfjf v16_32_1y2v1nfjw v16_32_1y2v1nfld", t = "v16_32_pidemfe v16_32_1y2v1nfir", o = "v16_32_1y2v1nfjo v16_32_1y2v1nfjz", d = "v16_32_pidemfj v16_32_1y2v1nf96 v16_32_1y2v1nfaf v16_32_1y2v1nfbo v16_32_1y2v1nfcx v16_32_1y2v1nfin v16_32_1y2v1nfm0 v16_32_1y2v1nfmu", p = "v16_32_pidemfo v16_32_1y2v1nfio v16_32_1y2v1nf4n v16_32_1y2v1nfm0 v16_32_1y2v1nfmf v16_32_1y2v1nfmu v16_32_1y2v1nfn9", l = "v16_32_pidemfc v16_32_1y2v1nf8u v16_32_1y2v1nfa3 v16_32_1y2v1nfin v16_32_1y2v1nfm0 v16_32_1y2v1nfk9 v16_32_1y2v1nfjf v16_32_1y2v1nfis v16_32_1y2v1nfj1", s = "v16_32_pidemft v16_32_1y2v1nfiq v16_32_1y2v1nfn9 v16_32_1y2v1nf4b", h = "v16_32_pidemfr v16_32_1y2v1nfiq v16_32_1y2v1nfm0 v16_32_1y2v1nf4b", u = 400;
4
4
  export { n as Sheet, f as SheetContainer, y as SheetContent, e as bodyContent, i as children, a as closingOverlay, r as closingSheet, m as handleBar, t as handleContainer, o as handleTouchable, d as modalCloseButton, p as overlay, l as sheetTopDraggingArea, s as stickyButtons, h as stickyTitle, u as transitionDuration };
@@ -88,9 +88,9 @@ import { useSetModalStateEffect as U } from "./modal-context-provider.js";
88
88
  import { Portal as Z } from "./portal.js";
89
89
  import { Text5 as ee, Text3 as te, Text2 as y } from "./text.js";
90
90
  import { vars as I } from "./skins/skin-contract.css-mistica.js";
91
- import B from "./stack.js";
91
+ import N from "./stack.js";
92
92
  import T from "./box.js";
93
- import N from "./divider.js";
93
+ import B from "./divider.js";
94
94
  import { getPrefixedDataAttributes as re, getScrollableParentElement as ne } from "./utils/dom.js";
95
95
  import oe from "./generated/mistica-icons/icon-close-regular.js";
96
96
  import { InternalIconButton as se } from "./icon-button.js";
@@ -299,7 +299,7 @@ const me = process.env.NODE_ENV === "test" ? 0 : x, k = (n)=>"touches" in n ? n.
299
299
  desktop: 40
300
300
  }
301
301
  }),
302
- c && /* @__PURE__ */ e(N, {})
302
+ c && /* @__PURE__ */ e(B, {})
303
303
  ]
304
304
  }),
305
305
  /* @__PURE__ */ e("div", {
@@ -310,10 +310,10 @@ const me = process.env.NODE_ENV === "test" ? 0 : x, k = (n)=>"touches" in n ? n.
310
310
  mobile: 0
311
311
  },
312
312
  paddingX: R,
313
- children: /* @__PURE__ */ p(B, {
313
+ children: /* @__PURE__ */ p(N, {
314
314
  space: 8,
315
315
  children: [
316
- o || s ? /* @__PURE__ */ p(B, {
316
+ o || s ? /* @__PURE__ */ p(N, {
317
317
  space: {
318
318
  mobile: 8,
319
319
  desktop: 16
@@ -351,7 +351,7 @@ const me = process.env.NODE_ENV === "test" ? 0 : x, k = (n)=>"touches" in n ? n.
351
351
  h && /* @__PURE__ */ p("div", {
352
352
  className: K,
353
353
  children: [
354
- i && /* @__PURE__ */ e(N, {}),
354
+ i && /* @__PURE__ */ e(B, {}),
355
355
  /* @__PURE__ */ e(T, {
356
356
  paddingY: {
357
357
  mobile: 16,
@@ -1,3 +1,3 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
- var v = "v16_30_1_1y2v1nfis v16_30_1_1y2v1nfj7 v16_30_1_1y2v1nfk4", n = "v16_30_1_1y2v1nfjw v16_30_1_1y2v1nfis", f = "v16_30_1_1y2v1nf90 v16_30_1_1y2v1nfa9 v16_30_1_1y2v1nfis v16_30_1_1y2v1nfj7 v16_30_1_1y2v1nfl5";
3
- export { v as infoItemIcon, n as infoItemIconContainer, f as itemContainer };
2
+ var _ = "v16_32_1y2v1nfis v16_32_1y2v1nfj7 v16_32_1y2v1nfk4", n = "v16_32_1y2v1nfjw v16_32_1y2v1nfis", f = "v16_32_1y2v1nf90 v16_32_1y2v1nfa9 v16_32_1y2v1nfis v16_32_1y2v1nfj7 v16_32_1y2v1nfl5";
3
+ export { _ as infoItemIcon, n as infoItemIconContainer, f as itemContainer };