@telefonica/mistica 14.34.0 → 14.35.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 (156) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/avatar.css-mistica.js +1 -1
  3. package/dist/button.css-mistica.js +7 -7
  4. package/dist/callout.css-mistica.js +1 -1
  5. package/dist/callout.js +17 -12
  6. package/dist/card.js +277 -244
  7. package/dist/carousel.css-mistica.js +5 -5
  8. package/dist/carousel.js +54 -52
  9. package/dist/checkbox.js +18 -18
  10. package/dist/community/advanced-data-card.css-mistica.js +3 -3
  11. package/dist/community/advanced-data-card.js +57 -50
  12. package/dist/community/blocks.js +42 -35
  13. package/dist/counter.css-mistica.js +1 -1
  14. package/dist/cvv-field.js +1 -1
  15. package/dist/dialog.css-mistica.js +3 -3
  16. package/dist/dialog.js +2 -2
  17. package/dist/hero.js +34 -30
  18. package/dist/hooks.d.ts +12 -1
  19. package/dist/hooks.js +85 -48
  20. package/dist/image.css-mistica.js +7 -2
  21. package/dist/image.css.d.ts +3 -0
  22. package/dist/image.d.ts +1 -7
  23. package/dist/image.js +55 -66
  24. package/dist/list.css-mistica.js +1 -1
  25. package/dist/list.js +80 -75
  26. package/dist/loading-bar.css-mistica.js +6 -6
  27. package/dist/maybe-dismissable.css-mistica.js +1 -1
  28. package/dist/menu.js +32 -32
  29. package/dist/navigation-bar.css-mistica.js +10 -10
  30. package/dist/overlay.js +10 -10
  31. package/dist/package-version.js +1 -1
  32. package/dist/pin-field.css-mistica.js +3 -3
  33. package/dist/popover.css-mistica.js +4 -4
  34. package/dist/radio-button.css-mistica.js +5 -5
  35. package/dist/radio-button.js +7 -7
  36. package/dist/screen-reader-only.css-mistica.js +1 -1
  37. package/dist/select.css-mistica.js +7 -7
  38. package/dist/select.js +65 -53
  39. package/dist/sheet.css-mistica.js +8 -8
  40. package/dist/skeletons.d.ts +9 -1
  41. package/dist/skeletons.js +3 -0
  42. package/dist/skins/blau.js +2 -1
  43. package/dist/skins/defaults.js +2 -1
  44. package/dist/skins/movistar-legacy.js +2 -1
  45. package/dist/skins/movistar.js +2 -1
  46. package/dist/skins/o2.js +2 -1
  47. package/dist/skins/skin-contract.css-mistica.js +2 -1
  48. package/dist/skins/skin-contract.css.d.ts +1 -0
  49. package/dist/skins/telefonica.js +2 -1
  50. package/dist/skins/types/index.d.ts +1 -0
  51. package/dist/skins/vivo-new.js +2 -1
  52. package/dist/skins/vivo.js +2 -1
  53. package/dist/slider.css-mistica.js +19 -19
  54. package/dist/slider.css.d.ts +8 -8
  55. package/dist/slider.d.ts +28 -8
  56. package/dist/slider.js +226 -106
  57. package/dist/snackbar.css-mistica.js +5 -5
  58. package/dist/sprinkles.css-mistica.js +71 -68
  59. package/dist/stacking-group.js +31 -24
  60. package/dist/stepper.css-mistica.js +3 -3
  61. package/dist/switch-component.css-mistica.js +17 -17
  62. package/dist/switch-component.js +12 -12
  63. package/dist/tab-focus.js +12 -12
  64. package/dist/tabs.css-mistica.js +1 -1
  65. package/dist/text-field-base.css-mistica.js +1 -1
  66. package/dist/text-field-components.css-mistica.js +7 -7
  67. package/dist/text-link.css-mistica.js +3 -3
  68. package/dist/theme-context-provider.js +39 -36
  69. package/dist/tooltip-context-provider.d.ts +14 -0
  70. package/dist/tooltip-context-provider.js +90 -0
  71. package/dist/tooltip.css-mistica.js +25 -54
  72. package/dist/tooltip.css.d.ts +19 -26
  73. package/dist/tooltip.d.ts +15 -1
  74. package/dist/tooltip.js +255 -207
  75. package/dist/touchable.css-mistica.js +1 -1
  76. package/dist/touchable.js +8 -8
  77. package/dist/utils/aspect-ratio-support.css-mistica.js +2 -2
  78. package/dist/utils/environment.d.ts +1 -0
  79. package/dist/utils/environment.js +4 -1
  80. package/dist/utils/keys.d.ts +8 -0
  81. package/dist/utils/{key-codes.js → keys.js} +6 -6
  82. package/dist/video.css-mistica.js +1 -1
  83. package/dist/video.js +33 -31
  84. package/dist-es/avatar.css-mistica.js +1 -1
  85. package/dist-es/button.css-mistica.js +7 -7
  86. package/dist-es/callout.css-mistica.js +1 -1
  87. package/dist-es/callout.js +33 -28
  88. package/dist-es/card.js +416 -383
  89. package/dist-es/carousel.css-mistica.js +2 -2
  90. package/dist-es/carousel.js +84 -82
  91. package/dist-es/checkbox.js +18 -18
  92. package/dist-es/community/advanced-data-card.css-mistica.js +2 -2
  93. package/dist-es/community/advanced-data-card.js +83 -76
  94. package/dist-es/community/blocks.js +77 -70
  95. package/dist-es/counter.css-mistica.js +1 -1
  96. package/dist-es/cvv-field.js +1 -1
  97. package/dist-es/dialog.css-mistica.js +3 -3
  98. package/dist-es/dialog.js +2 -2
  99. package/dist-es/hero.js +69 -65
  100. package/dist-es/hooks.js +83 -49
  101. package/dist-es/image.css-mistica.js +4 -2
  102. package/dist-es/image.js +74 -79
  103. package/dist-es/list.css-mistica.js +1 -1
  104. package/dist-es/list.js +116 -111
  105. package/dist-es/loading-bar.css-mistica.js +2 -2
  106. package/dist-es/maybe-dismissable.css-mistica.js +1 -1
  107. package/dist-es/menu.js +41 -41
  108. package/dist-es/navigation-bar.css-mistica.js +6 -6
  109. package/dist-es/overlay.js +14 -14
  110. package/dist-es/package-version.js +1 -1
  111. package/dist-es/pin-field.css-mistica.js +2 -2
  112. package/dist-es/popover.css-mistica.js +2 -2
  113. package/dist-es/radio-button.css-mistica.js +4 -4
  114. package/dist-es/radio-button.js +2 -2
  115. package/dist-es/screen-reader-only.css-mistica.js +1 -1
  116. package/dist-es/select.css-mistica.js +7 -7
  117. package/dist-es/select.js +89 -77
  118. package/dist-es/sheet.css-mistica.js +2 -2
  119. package/dist-es/skeletons.js +1 -1
  120. package/dist-es/skins/blau.js +2 -1
  121. package/dist-es/skins/defaults.js +2 -1
  122. package/dist-es/skins/movistar-legacy.js +2 -1
  123. package/dist-es/skins/movistar.js +2 -1
  124. package/dist-es/skins/o2.js +2 -1
  125. package/dist-es/skins/skin-contract.css-mistica.js +2 -1
  126. package/dist-es/skins/telefonica.js +2 -1
  127. package/dist-es/skins/vivo-new.js +2 -1
  128. package/dist-es/skins/vivo.js +2 -1
  129. package/dist-es/slider.css-mistica.js +2 -8
  130. package/dist-es/slider.js +231 -111
  131. package/dist-es/snackbar.css-mistica.js +4 -4
  132. package/dist-es/sprinkles.css-mistica.js +71 -68
  133. package/dist-es/stacking-group.js +37 -30
  134. package/dist-es/stepper.css-mistica.js +2 -2
  135. package/dist-es/style.css +1 -1
  136. package/dist-es/switch-component.css-mistica.js +13 -13
  137. package/dist-es/switch-component.js +14 -14
  138. package/dist-es/tab-focus.js +14 -14
  139. package/dist-es/tabs.css-mistica.js +1 -1
  140. package/dist-es/text-field-base.css-mistica.js +1 -1
  141. package/dist-es/text-field-components.css-mistica.js +2 -2
  142. package/dist-es/text-link.css-mistica.js +3 -3
  143. package/dist-es/theme-context-provider.js +53 -50
  144. package/dist-es/tooltip-context-provider.js +29 -0
  145. package/dist-es/tooltip.css-mistica.js +16 -9
  146. package/dist-es/tooltip.js +264 -216
  147. package/dist-es/touchable.css-mistica.js +1 -1
  148. package/dist-es/touchable.js +8 -8
  149. package/dist-es/utils/aspect-ratio-support.css-mistica.js +2 -2
  150. package/dist-es/utils/environment.js +2 -2
  151. package/dist-es/utils/keys.js +2 -0
  152. package/dist-es/video.css-mistica.js +1 -1
  153. package/dist-es/video.js +41 -39
  154. package/package.json +1 -1
  155. package/dist/utils/key-codes.d.ts +0 -8
  156. package/dist-es/utils/key-codes.js +0 -2
@@ -1,7 +1,7 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./dialog.css.ts.vanilla.css-mistica.js";
3
- var _ = "_3dl29lb", f = "_3dl29l6", y = "_3dl29ll _1y2v1nf6o", a = "_3dl29lj _1y2v1nfbw _1y2v1nfda", l = "_3dl29lm", d = "_3dl29l8 _1y2v1nf6i _1y2v1nf7r _1y2v1nf90 _1y2v1nfa9 _1y2v1nfb5 _1y2v1nfeg _1y2v1nffa", o = "_3dl29la _1y2v1nf32 _1y2v1nfe1", r = "_3dl29l5 _1y2v1nfb6 _1y2v1nfba _1y2v1nfbj _1y2v1nfbp _1y2v1nfbg _1y2v1nfeg _1y2v1nffa _1y2v1nffp _1y2v1nfev _1y2v1nf3d", t = {
3
+ var _ = "_3dl29lb", f = "_3dl29l6", y = "_3dl29ll _1y2v1nf6o", a = "_3dl29lj _1y2v1nfbw _1y2v1nfda", l = "_3dl29lm", d = "_3dl29l8 _1y2v1nf6i _1y2v1nf7r _1y2v1nf90 _1y2v1nfa9 _1y2v1nfb5 _1y2v1nfeh _1y2v1nffb", o = "_3dl29la _1y2v1nf32 _1y2v1nfe1", r = "_3dl29l5 _1y2v1nfb6 _1y2v1nfba _1y2v1nfbj _1y2v1nfbp _1y2v1nfbg _1y2v1nfeh _1y2v1nffb _1y2v1nffq _1y2v1nfew _1y2v1nf3d", t = {
4
4
  dialog: "_3dl29ld _1y2v1nfba _1y2v1nfbg _1y2v1nfbm _1y2v1nf96 _1y2v1nfaf _1y2v1nf6u _1y2v1nf7x",
5
5
  default: "_3dl29ld _1y2v1nfba _1y2v1nfbg _1y2v1nfbm _1y2v1nf6o _1y2v1nf7x _1y2v1nf96 _1y2v1nfaf"
6
- }, e = "_3dl29l3 _1y2v1nfb4";
7
- export { _ as closedModalContent, f as closedOpactityLayer, y as dialogActions, a as dialogContent, l as iconContainer, d as modalCloseButtonContainer, o as modalContent, r as modalOpacityLayer, t as variants, e as wrapper };
6
+ }, b = "_3dl29l3 _1y2v1nfb4";
7
+ export { _ as closedModalContent, f as closedOpactityLayer, y as dialogActions, a as dialogContent, l as iconContainer, d as modalCloseButtonContainer, o as modalContent, r as modalOpacityLayer, t as variants, b as wrapper };
package/dist-es/dialog.js CHANGED
@@ -91,7 +91,7 @@ import V from "./theme-context.js";
91
91
  import { useTheme as N } from "./hooks.js";
92
92
  import j from "./button-layout.js";
93
93
  import { Text5 as K, Text4 as T, Text3 as _ } from "./text.js";
94
- import { ESC as z } from "./utils/key-codes.js";
94
+ import { ESC as z } from "./utils/keys.js";
95
95
  import B from "./box.js";
96
96
  import { isRunningAcceptanceTest as U } from "./utils/platform.js";
97
97
  import { useSetModalStateEffect as q } from "./modal-context-provider.js";
@@ -242,7 +242,7 @@ const y = (e)=>process.env.NODE_ENV !== "test" && !U(e), ae = (e)=>{
242
242
  u,
243
243
  e.showClose
244
244
  ]), m = s.useCallback((f)=>{
245
- f.keyCode === z && (u(), f.stopPropagation(), f.preventDefault());
245
+ f.key === z && (u(), f.stopPropagation(), f.preventDefault());
246
246
  }, [
247
247
  u
248
248
  ]), x = s.useCallback(()=>{
package/dist-es/hero.js CHANGED
@@ -78,49 +78,49 @@ function _object_without_properties_loose(source, excluded) {
78
78
  }
79
79
  return target;
80
80
  }
81
- import { jsx as r, jsxs as s } from "react/jsx-runtime";
81
+ import { jsx as r, jsxs as c } from "react/jsx-runtime";
82
82
  import * as I from "react";
83
- import f from "classnames";
83
+ import h from "classnames";
84
84
  import { useScreenSize as T } from "./hooks.js";
85
- import { MediaBorderRadiusProvider as v } from "./image.js";
86
85
  import { Text3 as y, Text8 as D } from "./text.js";
87
86
  import O from "./grid-layout.js";
88
- import l from "./box.js";
87
+ import s from "./box.js";
89
88
  import x from "./stack.js";
90
89
  import j from "./button-group.js";
91
- import { vars as c } from "./skins/skin-contract.css-mistica.js";
92
- import { container as h, containerMobile as G, containerDesktop as b, layout as L, actions as A, vars as S } from "./hero.css-mistica.js";
93
- import { useIsInsideSlideshowContext as V } from "./carousel.js";
94
- import { getPrefixedDataAttributes as B } from "./utils/dom.js";
95
- import { sprinkles as H } from "./sprinkles.css-mistica.js";
96
- import { ThemeVariant as Y } from "./theme-variant-context.js";
97
- import { applyCssVars as C } from "./utils/css.js";
90
+ import { vars as n } from "./skins/skin-contract.css-mistica.js";
91
+ import { container as u, containerMobile as G, containerDesktop as b, layout as L, actions as $, vars as B } from "./hero.css-mistica.js";
92
+ import { vars as S } from "./image.css-mistica.js";
93
+ import { useIsInsideSlideshowContext as A } from "./carousel.js";
94
+ import { getPrefixedDataAttributes as C } from "./utils/dom.js";
95
+ import { sprinkles as k } from "./sprinkles.css-mistica.js";
96
+ import { ThemeVariant as V } from "./theme-variant-context.js";
97
+ import { applyCssVars as p } from "./utils/css.js";
98
98
  const N = (param)=>/* @__PURE__ */ {
99
99
  let { children: e, isInverse: o } = param;
100
- return r(Y, {
100
+ return r(V, {
101
101
  isInverse: o,
102
102
  children: /* @__PURE__ */ r("div", {
103
103
  className: L,
104
104
  children: e
105
105
  })
106
106
  });
107
- }, u = (param)=>/* @__PURE__ */ {
108
- let { headline: e, title: o, pretitle: a, description: t, descriptionLinesMax: d, extra: n, button: i, secondaryButton: p, buttonLink: m } = param;
109
- return s("section", {
110
- className: H({
107
+ }, g = (param)=>/* @__PURE__ */ {
108
+ let { headline: e, title: o, pretitle: a, description: t, descriptionLinesMax: d, extra: i, button: l, secondaryButton: f, buttonLink: m } = param;
109
+ return c("section", {
110
+ className: k({
111
111
  height: "100%",
112
112
  display: "flex",
113
113
  justifyContent: "space-between",
114
114
  flexDirection: "column"
115
115
  }),
116
116
  children: [
117
- /* @__PURE__ */ s("div", {
117
+ /* @__PURE__ */ c("div", {
118
118
  children: [
119
- /* @__PURE__ */ s(x, {
119
+ /* @__PURE__ */ c(x, {
120
120
  space: 16,
121
121
  children: [
122
122
  e && e,
123
- /* @__PURE__ */ s(x, {
123
+ /* @__PURE__ */ c(x, {
124
124
  space: 8,
125
125
  children: [
126
126
  a && /* @__PURE__ */ r(y, {
@@ -137,110 +137,114 @@ const N = (param)=>/* @__PURE__ */ {
137
137
  t && /* @__PURE__ */ r(y, {
138
138
  as: "p",
139
139
  regular: !0,
140
- color: c.colors.textSecondary,
140
+ color: n.colors.textSecondary,
141
141
  truncate: d,
142
142
  children: t
143
143
  })
144
144
  ]
145
145
  }),
146
- n && /* @__PURE__ */ r("div", {
147
- children: n
146
+ i && /* @__PURE__ */ r("div", {
147
+ children: i
148
148
  })
149
149
  ]
150
150
  }),
151
- (i || m) && /* @__PURE__ */ r("div", {
152
- className: A,
151
+ (l || m) && /* @__PURE__ */ r("div", {
152
+ className: $,
153
153
  children: /* @__PURE__ */ r(j, {
154
- primaryButton: i,
155
- secondaryButton: p,
154
+ primaryButton: l,
155
+ secondaryButton: f,
156
156
  link: m
157
157
  })
158
158
  })
159
159
  ]
160
160
  });
161
- }, k = {
162
- default: c.colors.background,
163
- alternative: c.colors.backgroundAlternative,
164
- brand: c.colors.backgroundBrand,
165
- "brand-secondary": c.colors.backgroundBrandSecondary
166
- }, $ = /*#__PURE__*/ I.forwardRef((_param, i)=>{
167
- var { height: e, background: o = "default", media: a, desktopMediaPosition: t = "left", dataAttributes: d } = _param, n = _object_without_properties(_param, [
161
+ }, R = {
162
+ default: n.colors.background,
163
+ alternative: n.colors.backgroundAlternative,
164
+ brand: n.colors.backgroundBrand,
165
+ "brand-secondary": n.colors.backgroundBrandSecondary
166
+ }, Y = /*#__PURE__*/ I.forwardRef((_param, l)=>{
167
+ var { height: e, background: o = "default", media: a, desktopMediaPosition: t = "left", dataAttributes: d } = _param, i = _object_without_properties(_param, [
168
168
  "height",
169
169
  "background",
170
170
  "media",
171
171
  "desktopMediaPosition",
172
172
  "dataAttributes"
173
173
  ]);
174
- const { isTabletOrSmaller: p } = T(), m = V(), g = o === "brand" || o === "brand-secondary";
175
- if (p) return /* @__PURE__ */ r(v, {
176
- value: !1,
177
- children: /* @__PURE__ */ s("div", _object_spread_props(_object_spread({}, B(_object_spread({
174
+ const { isTabletOrSmaller: f } = T(), m = A(), v = o === "brand" || o === "brand-secondary";
175
+ if (f) return /* @__PURE__ */ r("div", {
176
+ style: p({
177
+ [S.mediaBorderRadius]: "0px"
178
+ }),
179
+ children: /* @__PURE__ */ c("div", _object_spread_props(_object_spread({}, C(_object_spread({
178
180
  "component-name": "Hero"
179
181
  }, d))), {
180
- ref: i,
182
+ ref: l,
181
183
  style: _object_spread({
182
- backgroundColor: k[o]
184
+ backgroundColor: R[o]
183
185
  }, e === "100vh" ? {
184
186
  maxHeight: "-webkit-fill-available"
185
- } : {}, C({
186
- [S.height]: e !== null && e !== void 0 ? e : "100%"
187
+ } : {}, p({
188
+ [B.height]: e !== null && e !== void 0 ? e : "100%"
187
189
  })),
188
- className: f(h, G),
190
+ className: h(u, G),
189
191
  children: [
190
192
  a,
191
193
  /* @__PURE__ */ r(N, {
192
- isInverse: g,
193
- children: /* @__PURE__ */ r(l, {
194
+ isInverse: v,
195
+ children: /* @__PURE__ */ r(s, {
194
196
  paddingTop: 24,
195
197
  paddingBottom: m ? 48 : 24,
196
- children: /* @__PURE__ */ r(u, _object_spread({}, n))
198
+ children: /* @__PURE__ */ r(g, _object_spread({}, i))
197
199
  })
198
200
  })
199
201
  ]
200
202
  }))
201
203
  });
202
- const w = t === "left" ? a : /* @__PURE__ */ r(l, {
204
+ const H = t === "left" ? a : /* @__PURE__ */ r(s, {
203
205
  paddingRight: 24,
204
- children: /* @__PURE__ */ r(u, _object_spread({}, n))
205
- }), R = t === "right" ? a : /* @__PURE__ */ r(l, {
206
+ children: /* @__PURE__ */ r(g, _object_spread({}, i))
207
+ }), w = t === "right" ? a : /* @__PURE__ */ r(s, {
206
208
  paddingLeft: 24,
207
- children: /* @__PURE__ */ r(u, _object_spread({}, n))
209
+ children: /* @__PURE__ */ r(g, _object_spread({}, i))
208
210
  });
209
- return /* @__PURE__ */ r(v, {
210
- value: !0,
211
- children: /* @__PURE__ */ r("div", _object_spread_props(_object_spread({}, B(_object_spread({
211
+ return /* @__PURE__ */ r("div", {
212
+ style: p({
213
+ [S.mediaBorderRadius]: n.borderRadii.container
214
+ }),
215
+ children: /* @__PURE__ */ r("div", _object_spread_props(_object_spread({}, C(_object_spread({
212
216
  "component-name": "Hero"
213
217
  }, d))), {
214
- ref: i,
218
+ ref: l,
215
219
  style: _object_spread({
216
- backgroundColor: k[o]
220
+ backgroundColor: R[o]
217
221
  }, e === "100vh" ? {
218
222
  maxHeight: "-webkit-fill-available"
219
- } : {}, C({
220
- [S.height]: e !== null && e !== void 0 ? e : "100%"
223
+ } : {}, p({
224
+ [B.height]: e !== null && e !== void 0 ? e : "100%"
221
225
  })),
222
- className: H({
226
+ className: k({
223
227
  height: "100%",
224
228
  display: "flex",
225
229
  alignItems: "center"
226
230
  }),
227
231
  children: /* @__PURE__ */ r(N, {
228
- isInverse: g,
232
+ isInverse: v,
229
233
  children: /* @__PURE__ */ r(O, {
230
234
  template: "6+6",
231
- left: /* @__PURE__ */ r(l, {
235
+ left: /* @__PURE__ */ r(s, {
232
236
  paddingY: 56,
233
- className: f(h, b),
234
- children: w
237
+ className: h(u, b),
238
+ children: H
235
239
  }),
236
- right: /* @__PURE__ */ r(l, {
240
+ right: /* @__PURE__ */ r(s, {
237
241
  paddingY: 56,
238
- className: f(h, b),
239
- children: R
242
+ className: h(u, b),
243
+ children: w
240
244
  })
241
245
  })
242
246
  })
243
247
  }))
244
248
  });
245
- }), or = $;
249
+ }), or = Y;
246
250
  export { or as default };
package/dist-es/hooks.js CHANGED
@@ -1,28 +1,29 @@
1
- import * as n from "react";
1
+ import * as r from "react";
2
2
  import S from "./theme-context.js";
3
- import y from "./screen-size-context.js";
4
- import b from "./aria-id-getter-context.js";
3
+ import b from "./screen-size-context.js";
4
+ import y from "./aria-id-getter-context.js";
5
5
  import { listenResize as W } from "./utils/dom.js";
6
- import { isClientSide as u } from "./utils/environment.js";
7
- const x = ()=>{
8
- const t = n.useContext(S);
6
+ import { isClientSide as h } from "./utils/environment.js";
7
+ import { isEqual as x } from "./utils/helpers.js";
8
+ const v = ()=>{
9
+ const t = r.useContext(S);
9
10
  if (!t) throw Error("To use @telefonica/mistica components you must instantiate <ThemeContextProvider> as their parent.");
10
11
  return t;
11
12
  };
12
- let f = "", w = 0, h = 0;
13
- const z = (t)=>{
14
- n.useEffect(()=>{
13
+ let f = "", a = 0, l = 0;
14
+ const A = (t)=>{
15
+ r.useEffect(()=>{
15
16
  if (t) {
16
- const r = document.scrollingElement || document.documentElement, e = ()=>{
17
+ const n = document.scrollingElement || document.documentElement, e = ()=>{
17
18
  var s;
18
19
  var _ref, _ref1;
19
- if (h++, !(h > 1) && (w = (_ref = r == null ? void 0 : r.scrollTop) !== null && _ref !== void 0 ? _ref : 0, f = (_ref1 = (s = document.body) == null ? void 0 : s.style.cssText) !== null && _ref1 !== void 0 ? _ref1 : "", document.body)) {
20
+ if (l++, !(l > 1) && (a = (_ref = n == null ? void 0 : n.scrollTop) !== null && _ref !== void 0 ? _ref : 0, f = (_ref1 = (s = document.body) == null ? void 0 : s.style.cssText) !== null && _ref1 !== void 0 ? _ref1 : "", document.body)) {
20
21
  var _ref2;
21
- const o = window.innerWidth > ((_ref2 = r == null ? void 0 : r.clientWidth) !== null && _ref2 !== void 0 ? _ref2 : window.innerWidth) ? "scroll" : "hidden";
22
- document.body.style.cssText = `overflow:hidden;overflow-y:${o};position:fixed;top:${-w}px;left:0px;right:0px;bottom:0px`;
22
+ const o = window.innerWidth > ((_ref2 = n == null ? void 0 : n.clientWidth) !== null && _ref2 !== void 0 ? _ref2 : window.innerWidth) ? "scroll" : "hidden";
23
+ document.body.style.cssText = `overflow:hidden;overflow-y:${o};position:fixed;top:${-a}px;left:0px;right:0px;bottom:0px`;
23
24
  }
24
25
  }, i = ()=>{
25
- h--, !(h > 0) && (document.body && (document.body.style.cssText = f), r && (r.scrollTop = w));
26
+ l--, !(l > 0) && (document.body && (document.body.style.cssText = f), n && (n.scrollTop = a));
26
27
  };
27
28
  return e(), i;
28
29
  }
@@ -30,20 +31,20 @@ const z = (t)=>{
30
31
  }, [
31
32
  t
32
33
  ]);
33
- }, C = ()=>n.useContext(y), R = ()=>{
34
- const [t, r] = n.useState(0), [e, i] = n.useState(0), [s, c] = n.useState(null), o = n.useCallback((d)=>{
35
- if (!d) {
36
- r(0), i(0);
34
+ }, L = ()=>r.useContext(b), M = ()=>{
35
+ const [t, n] = r.useState(0), [e, i] = r.useState(0), [s, c] = r.useState(null), o = r.useCallback((u)=>{
36
+ if (!u) {
37
+ n(0), i(0);
37
38
  return;
38
39
  }
39
- const { width: m, height: g } = d[0].contentRect;
40
- r(m), i(g);
41
- }, []), l = n.useCallback((d)=>{
42
- c(d);
40
+ const { width: m, height: g } = u[0].contentRect;
41
+ n(m), i(g);
42
+ }, []), d = r.useCallback((u)=>{
43
+ c(u);
43
44
  }, []);
44
- return n.useEffect(()=>{
45
+ return r.useEffect(()=>{
45
46
  if (!s) {
46
- r(0), i(0);
47
+ n(0), i(0);
47
48
  return;
48
49
  }
49
50
  return W(s, o);
@@ -53,27 +54,27 @@ const z = (t)=>{
53
54
  ]), {
54
55
  width: t,
55
56
  height: e,
56
- ref: l
57
+ ref: d
57
58
  };
58
- }, B = (t)=>{
59
- const { useId: r } = x();
60
- if (r) {
61
- const e = r();
59
+ }, q = (t)=>{
60
+ const { useId: n } = v();
61
+ if (n) {
62
+ const e = n();
62
63
  return t || e;
63
64
  } else {
64
- const e = n.useContext(b);
65
- return n.useRef(t || e()).current;
65
+ const e = r.useContext(y);
66
+ return r.useRef(t || e()).current;
66
67
  }
67
- }, a = ()=>{
68
- const [t, r] = n.useState(u() ? window.innerHeight : 1200), [e, i] = n.useState(u() ? window.innerWidth : 800), [s, c] = n.useState(u() ? window.screen.availHeight : 1200), [o, l] = n.useState(u() ? window.screen.availWidth : 800);
69
- return n.useEffect(()=>{
70
- const d = ()=>{
71
- r(window.innerHeight), i(window.innerWidth), c(window.screen.availHeight), l(window.screen.availWidth);
68
+ }, w = ()=>{
69
+ const [t, n] = r.useState(h() ? window.innerHeight : 1200), [e, i] = r.useState(h() ? window.innerWidth : 800), [s, c] = r.useState(h() ? window.screen.availHeight : 1200), [o, d] = r.useState(h() ? window.screen.availWidth : 800);
70
+ return r.useEffect(()=>{
71
+ const u = ()=>{
72
+ n(window.innerHeight), i(window.innerWidth), c(window.screen.availHeight), d(window.screen.availWidth);
72
73
  };
73
- return window.addEventListener("resize", d), ()=>{
74
- window.removeEventListener("resize", d);
74
+ return window.addEventListener("resize", u), ()=>{
75
+ window.removeEventListener("resize", u);
75
76
  };
76
- }, []), n.useMemo(()=>({
77
+ }, []), r.useMemo(()=>({
77
78
  height: t,
78
79
  width: e,
79
80
  screenHeight: s,
@@ -84,18 +85,18 @@ const z = (t)=>{
84
85
  s,
85
86
  o
86
87
  ]);
87
- }, L = ()=>{
88
- const { height: t } = a();
88
+ }, D = ()=>{
89
+ const { height: t } = w();
89
90
  return t;
90
- }, M = ()=>{
91
- const { width: t } = a();
91
+ }, F = ()=>{
92
+ const { width: t } = w();
92
93
  return t;
93
- }, A = ()=>{
94
- const { screenHeight: t } = a();
94
+ }, V = ()=>{
95
+ const { screenHeight: t } = w();
95
96
  return t;
96
- }, D = ()=>u() && window.top !== window.self, V = u() ? n.useLayoutEffect : n.useEffect, k = (t, r, e)=>{
97
- const [i, s] = n.useState(r);
98
- return n.useEffect(()=>{
97
+ }, k = ()=>h() && window.top !== window.self, $ = h() ? r.useLayoutEffect : r.useEffect, E = (t, n, e)=>{
98
+ const [i, s] = r.useState(n);
99
+ return r.useEffect(()=>{
99
100
  if (!t.current) return;
100
101
  if (typeof window.IntersectionObserver > "u") return ()=>{};
101
102
  const c = new IntersectionObserver((o)=>{
@@ -114,5 +115,38 @@ const z = (t)=>{
114
115
  e == null ? void 0 : e.rootMargin,
115
116
  e == null ? void 0 : e.threshold
116
117
  ]), i;
118
+ }, I = (t)=>{
119
+ const { top: n, right: e, bottom: i, left: s, width: c, height: o, x: d, y: u } = t.getBoundingClientRect();
120
+ return {
121
+ top: n,
122
+ right: e,
123
+ bottom: i,
124
+ left: s,
125
+ width: c,
126
+ height: o,
127
+ x: d,
128
+ y: u
129
+ };
130
+ }, G = function(t) {
131
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
132
+ const [i, s] = r.useState(), c = E(t, !1);
133
+ return r.useEffect(()=>{
134
+ let o;
135
+ const d = ()=>{
136
+ if (t.current && (c || e)) {
137
+ const u = I(t.current);
138
+ x(i, u) || s(u), n && (o = requestAnimationFrame(d));
139
+ } else s(void 0);
140
+ };
141
+ return o = requestAnimationFrame(d), ()=>{
142
+ cancelAnimationFrame(o);
143
+ };
144
+ }, [
145
+ t,
146
+ i,
147
+ c,
148
+ n,
149
+ e
150
+ ]), i;
117
151
  };
118
- export { B as useAriaId, z as useDisableBodyScroll, R as useElementDimensions, k as useIsInViewport, D as useIsWithinIFrame, V as useIsomorphicLayoutEffect, A as useScreenHeight, C as useScreenSize, x as useTheme, L as useWindowHeight, a as useWindowSize, M as useWindowWidth };
152
+ export { q as useAriaId, G as useBoundingRect, A as useDisableBodyScroll, M as useElementDimensions, E as useIsInViewport, k as useIsWithinIFrame, $ as useIsomorphicLayoutEffect, V as useScreenHeight, L as useScreenSize, v as useTheme, D as useWindowHeight, w as useWindowSize, F as useWindowWidth };
@@ -1,4 +1,6 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./image.css.ts.vanilla.css-mistica.js";
3
- var f = 300, n = "_17tt25r1 _1y2v1nfeg _1y2v1nfev _1y2v1nfbc _1y2v1nfbx _1y2v1nfce _1y2v1nfg4 _1y2v1nfdp _1y2v1nfdq";
4
- export { f as FADE_IN_DURATION_MS, n as image };
3
+ var r = 300, f = "_17tt25r2 _1y2v1nfeh _1y2v1nfew _1y2v1nfbc _1y2v1nfbx _1y2v1nfce _1y2v1nfg5 _1y2v1nfdp _1y2v1nfdq _1y2v1nfe1", n = {
4
+ mediaBorderRadius: "var(--_17tt25r0)"
5
+ };
6
+ export { r as FADE_IN_DURATION_MS, f as image, n as vars };