@telefonica/mistica 16.1.0 → 16.2.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 (148) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/accordion.css-mistica.js +12 -9
  3. package/dist/accordion.css.d.ts +1 -0
  4. package/dist/accordion.js +36 -39
  5. package/dist/align.css-mistica.js +12 -0
  6. package/dist/align.css.d.ts +1 -0
  7. package/dist/align.css.ts.vanilla.css-mistica.js +11 -0
  8. package/dist/align.d.ts +12 -0
  9. package/dist/align.js +79 -0
  10. package/dist/box.css-mistica.js +41 -0
  11. package/dist/box.css.d.ts +23 -0
  12. package/dist/box.css.ts.vanilla.css-mistica.js +11 -0
  13. package/dist/box.d.ts +4 -0
  14. package/dist/box.js +39 -31
  15. package/dist/boxed.css-mistica.js +10 -5
  16. package/dist/boxed.css.d.ts +3 -0
  17. package/dist/boxed.js +20 -24
  18. package/dist/callout.css-mistica.js +12 -4
  19. package/dist/callout.css.d.ts +1 -0
  20. package/dist/callout.js +14 -22
  21. package/dist/card.css-mistica.js +26 -23
  22. package/dist/card.css.d.ts +1 -0
  23. package/dist/card.js +17 -23
  24. package/dist/community/advanced-data-card.css-mistica.js +32 -23
  25. package/dist/community/advanced-data-card.css.d.ts +3 -0
  26. package/dist/community/advanced-data-card.js +46 -55
  27. package/dist/empty-state.css-mistica.js +11 -8
  28. package/dist/empty-state.css.d.ts +1 -0
  29. package/dist/empty-state.js +10 -13
  30. package/dist/form.css-mistica.js +12 -0
  31. package/dist/form.css.d.ts +1 -0
  32. package/dist/form.js +8 -10
  33. package/dist/grid.css-mistica.js +143 -126
  34. package/dist/grid.css.d.ts +13 -0
  35. package/dist/grid.js +35 -38
  36. package/dist/hero.css-mistica.js +14 -8
  37. package/dist/hero.css.d.ts +2 -0
  38. package/dist/hero.js +17 -25
  39. package/dist/image.js +23 -25
  40. package/dist/index.d.ts +1 -0
  41. package/dist/index.js +4 -0
  42. package/dist/inline.js +10 -11
  43. package/dist/list.css-mistica.js +12 -9
  44. package/dist/list.css.d.ts +1 -0
  45. package/dist/list.js +43 -46
  46. package/dist/loading-screen.js +16 -16
  47. package/dist/logo-blau.d.ts +1 -1
  48. package/dist/logo-blau.js +10 -10
  49. package/dist/logo-common.d.ts +1 -0
  50. package/dist/logo-movistar.d.ts +1 -1
  51. package/dist/logo-movistar.js +4 -4
  52. package/dist/logo-o2-new.d.ts +1 -1
  53. package/dist/logo-o2-new.js +5 -5
  54. package/dist/logo-o2.d.ts +1 -1
  55. package/dist/logo-o2.js +5 -5
  56. package/dist/logo-telefonica.d.ts +1 -1
  57. package/dist/logo-telefonica.js +4 -4
  58. package/dist/logo-tu.d.ts +1 -1
  59. package/dist/logo-tu.js +5 -5
  60. package/dist/logo-vivo.d.ts +1 -1
  61. package/dist/logo-vivo.js +7 -7
  62. package/dist/logo.d.ts +9 -8
  63. package/dist/logo.js +125 -102
  64. package/dist/navigation-bar.css-mistica.js +23 -20
  65. package/dist/navigation-bar.css.d.ts +1 -0
  66. package/dist/navigation-bar.js +30 -37
  67. package/dist/package-version.js +1 -1
  68. package/dist/phone-number-field.d.ts +1 -4
  69. package/dist/phone-number-field.js +52 -82
  70. package/dist/popover.d.ts +1 -0
  71. package/dist/popover.js +9 -10
  72. package/dist/sheet-common.css-mistica.js +5 -5
  73. package/dist/skeleton-base.js +10 -12
  74. package/dist/skeletons.css-mistica.js +11 -5
  75. package/dist/skeletons.css.d.ts +1 -0
  76. package/dist/snackbar.css-mistica.js +20 -14
  77. package/dist/snackbar.css.d.ts +3 -1
  78. package/dist/snackbar.js +65 -75
  79. package/dist/tag.css-mistica.js +15 -4
  80. package/dist/tag.css.d.ts +2 -0
  81. package/dist/tag.js +20 -24
  82. package/dist/text-field-base.d.ts +1 -1
  83. package/dist/text-field-components.css-mistica.js +16 -10
  84. package/dist/text-field-components.css.d.ts +1 -0
  85. package/dist/text-field-components.js +32 -35
  86. package/dist/timer.js +42 -43
  87. package/dist/tooltip.d.ts +3 -1
  88. package/dist/tooltip.js +106 -106
  89. package/dist/touchable.js +47 -42
  90. package/dist-es/accordion.css-mistica.js +3 -3
  91. package/dist-es/accordion.js +58 -61
  92. package/dist-es/align.css-mistica.js +3 -0
  93. package/dist-es/align.css.ts.vanilla.css-mistica.js +2 -0
  94. package/dist-es/align.js +70 -0
  95. package/dist-es/box.css-mistica.js +24 -0
  96. package/dist-es/box.css.ts.vanilla.css-mistica.js +2 -0
  97. package/dist-es/box.js +43 -35
  98. package/dist-es/boxed.css-mistica.js +5 -3
  99. package/dist-es/boxed.js +28 -32
  100. package/dist-es/callout.css-mistica.js +7 -2
  101. package/dist-es/callout.js +44 -52
  102. package/dist-es/card.css-mistica.js +4 -4
  103. package/dist-es/card.js +11 -17
  104. package/dist-es/community/advanced-data-card.css-mistica.js +7 -7
  105. package/dist-es/community/advanced-data-card.js +90 -99
  106. package/dist-es/empty-state.css-mistica.js +3 -3
  107. package/dist-es/empty-state.js +19 -22
  108. package/dist-es/form.css-mistica.js +3 -0
  109. package/dist-es/form.js +12 -14
  110. package/dist-es/grid.css-mistica.js +123 -112
  111. package/dist-es/grid.js +38 -41
  112. package/dist-es/hero.css-mistica.js +2 -2
  113. package/dist-es/hero.js +36 -44
  114. package/dist-es/image.js +28 -30
  115. package/dist-es/index.js +1844 -1843
  116. package/dist-es/inline.js +19 -20
  117. package/dist-es/list.css-mistica.js +2 -2
  118. package/dist-es/list.js +75 -78
  119. package/dist-es/loading-screen.js +30 -30
  120. package/dist-es/logo-blau.js +11 -11
  121. package/dist-es/logo-movistar.js +5 -5
  122. package/dist-es/logo-o2-new.js +8 -8
  123. package/dist-es/logo-o2.js +8 -8
  124. package/dist-es/logo-telefonica.js +4 -4
  125. package/dist-es/logo-tu.js +8 -8
  126. package/dist-es/logo-vivo.js +16 -16
  127. package/dist-es/logo.js +132 -109
  128. package/dist-es/navigation-bar.css-mistica.js +11 -11
  129. package/dist-es/navigation-bar.js +80 -87
  130. package/dist-es/package-version.js +1 -1
  131. package/dist-es/phone-number-field.js +59 -89
  132. package/dist-es/popover.js +17 -18
  133. package/dist-es/sheet-common.css-mistica.js +2 -2
  134. package/dist-es/skeleton-base.js +15 -17
  135. package/dist-es/skeletons.css-mistica.js +5 -2
  136. package/dist-es/snackbar.css-mistica.js +4 -4
  137. package/dist-es/snackbar.js +93 -103
  138. package/dist-es/style.css +1 -1
  139. package/dist-es/tag.css-mistica.js +2 -2
  140. package/dist-es/tag.js +34 -38
  141. package/dist-es/text-field-components.css-mistica.js +5 -2
  142. package/dist-es/text-field-components.js +48 -51
  143. package/dist-es/timer.js +80 -81
  144. package/dist-es/tooltip.js +148 -148
  145. package/dist-es/touchable.js +55 -50
  146. package/package.json +1 -1
  147. package/dist/sprinkles.css-mistica.js +0 -2494
  148. package/dist-es/sprinkles.css-mistica.js +0 -2485
@@ -79,40 +79,39 @@ function _object_without_properties_loose(source, excluded) {
79
79
  return target;
80
80
  }
81
81
  import { jsxs as C, jsx as o } from "react/jsx-runtime";
82
- import * as i from "react";
82
+ import * as c from "react";
83
83
  import { Content as N } from "./list.js";
84
84
  import S from "./icons/icon-chevron.js";
85
85
  import A from "./box.js";
86
- import { itemContent as O, touchableBackgroundInverse as T, touchableBackground as w, chevronContainer as y, panelTransitionClasses as D, panelContainer as P, panel as V } from "./accordion.css-mistica.js";
87
- import k from "./stack.js";
88
- import { BaseTouchable as E } from "./touchable.js";
89
- import _ from "classnames";
86
+ import { itemContent as O, touchableBackgroundInverse as T, touchableBackground as w, chevronContainer as y, panelTransitionClasses as D, panelContainer as P, panel as V, accordionItem as E } from "./accordion.css-mistica.js";
87
+ import _ from "./stack.js";
88
+ import { BaseTouchable as k } from "./touchable.js";
89
+ import L from "classnames";
90
90
  import { vars as h } from "./skins/skin-contract.css-mistica.js";
91
91
  import { getPrefixedDataAttributes as R } from "./utils/dom.js";
92
- import L from "./divider.js";
93
- import { Boxed as M } from "./boxed.js";
94
- import { useIsInverseOrMediaVariant as X } from "./theme-variant-context.js";
95
- import { CSSTransition as j } from "react-transition-group";
96
- import { isRunningAcceptanceTest as q } from "./utils/platform.js";
97
- import { sprinkles as z } from "./sprinkles.css-mistica.js";
98
- const v = 400, g = /*#__PURE__*/ i.createContext({
92
+ import M from "./divider.js";
93
+ import { Boxed as X } from "./boxed.js";
94
+ import { useIsInverseOrMediaVariant as j } from "./theme-variant-context.js";
95
+ import { CSSTransition as q } from "react-transition-group";
96
+ import { isRunningAcceptanceTest as z } from "./utils/platform.js";
97
+ const v = 400, g = /*#__PURE__*/ c.createContext({
99
98
  index: [],
100
99
  toggle: ()=>{}
101
- }), F = ()=>i.useContext(g), B = (param)=>{
102
- let { value: t, defaultValue: r, onChange: n, singleOpen: c } = param;
103
- const m = t !== void 0, d = (e)=>e === void 0 ? [] : typeof e == "number" ? [
100
+ }), F = ()=>c.useContext(g), B = (param)=>{
101
+ let { value: t, defaultValue: r, onChange: n, singleOpen: i } = param;
102
+ const m = t !== void 0, s = (e)=>e === void 0 ? [] : typeof e == "number" ? [
104
103
  e
105
- ] : e, [s, a] = i.useState(d(r));
106
- i.useEffect(()=>{
107
- if (s.length > 1 && c) {
104
+ ] : e, [d, a] = c.useState(s(r));
105
+ c.useEffect(()=>{
106
+ if (d.length > 1 && i) {
108
107
  const e = [
109
- ...s
108
+ ...d
110
109
  ];
111
110
  e.splice(1), a(e);
112
111
  }
113
112
  }, [
114
- c,
115
- s
113
+ i,
114
+ d
116
115
  ]);
117
116
  const p = (e, l)=>{
118
117
  if (!l) return [
@@ -122,43 +121,43 @@ const v = 400, g = /*#__PURE__*/ i.createContext({
122
121
  let I = [
123
122
  ...l
124
123
  ];
125
- return u === -1 ? c ? I = [
124
+ return u === -1 ? i ? I = [
126
125
  e
127
126
  ] : I.push(e) : I.splice(u, 1), I;
128
127
  }, f = (e)=>{
129
- if (m || a(p(e, s)), n) {
130
- const l = (m ? d(t) : s).includes(e);
128
+ if (m || a(p(e, d)), n) {
129
+ const l = (m ? s(t) : d).includes(e);
131
130
  n(e, !l);
132
131
  }
133
132
  };
134
133
  return m ? [
135
- d(t),
134
+ s(t),
136
135
  f
137
136
  ] : [
138
- s,
137
+ d,
139
138
  f
140
139
  ];
141
140
  }, H = (t)=>{
142
141
  const r = t == null ? void 0 : t.closest("[data-accordion]");
143
142
  if (r) return Array.from(r.querySelectorAll("[data-accordion-item]")).filter((n)=>n.closest("[data-accordion]") === r).findIndex((n)=>n === t);
144
- }, b = /*#__PURE__*/ i.forwardRef((_param, m)=>{
145
- var { content: t, dataAttributes: r, trackingEvent: n } = _param, c = _object_without_properties(_param, [
143
+ }, b = /*#__PURE__*/ c.forwardRef((_param, m)=>{
144
+ var { content: t, dataAttributes: r, trackingEvent: n } = _param, i = _object_without_properties(_param, [
146
145
  "content",
147
146
  "dataAttributes",
148
147
  "trackingEvent"
149
148
  ]);
150
- const d = i.useRef(null), s = i.useRef(null), { index: a, toggle: p } = F(), f = X(), e = i.useId(), l = i.useId(), [u, I] = i.useState(), x = u !== void 0 && (a == null ? void 0 : a.includes(u));
151
- return i.useEffect(()=>{
152
- I(H(s.current));
149
+ const s = c.useRef(null), d = c.useRef(null), { index: a, toggle: p } = F(), f = j(), e = c.useId(), l = c.useId(), [u, I] = c.useState(), x = u !== void 0 && (a == null ? void 0 : a.includes(u));
150
+ return c.useEffect(()=>{
151
+ I(H(d.current));
153
152
  }, []), /* @__PURE__ */ C("div", _object_spread_props(_object_spread({
154
- ref: s
153
+ ref: d
155
154
  }, R(_object_spread_props(_object_spread({}, r), {
156
155
  "accordion-item": !0
157
156
  }))), {
158
157
  children: [
159
- /* @__PURE__ */ o(E, {
158
+ /* @__PURE__ */ o(k, {
160
159
  ref: m,
161
- className: _(O, f ? T : w),
160
+ className: L(O, f ? T : w),
162
161
  onPress: ()=>{
163
162
  u !== void 0 && p(u);
164
163
  },
@@ -169,7 +168,7 @@ const v = 400, g = /*#__PURE__*/ i.createContext({
169
168
  paddingX: 16,
170
169
  children: /* @__PURE__ */ o(N, _object_spread_props(_object_spread({
171
170
  labelId: e
172
- }, c), {
171
+ }, i), {
173
172
  right: /* @__PURE__ */ o("div", {
174
173
  className: y,
175
174
  children: /* @__PURE__ */ o(S, {
@@ -182,16 +181,16 @@ const v = 400, g = /*#__PURE__*/ i.createContext({
182
181
  }))
183
182
  })
184
183
  }),
185
- /* @__PURE__ */ o(j, {
184
+ /* @__PURE__ */ o(q, {
186
185
  in: x,
187
- timeout: q() ? 0 : v,
188
- nodeRef: d,
186
+ timeout: z() ? 0 : v,
187
+ nodeRef: s,
189
188
  classNames: D,
190
189
  mountOnEnter: !0,
191
190
  unmountOnExit: !0,
192
191
  children: /* @__PURE__ */ o("div", {
193
192
  className: P,
194
- ref: d,
193
+ ref: s,
195
194
  children: /* @__PURE__ */ o("div", {
196
195
  className: V,
197
196
  role: "region",
@@ -207,81 +206,79 @@ const v = 400, g = /*#__PURE__*/ i.createContext({
207
206
  })
208
207
  ]
209
208
  }));
210
- }), se = /*#__PURE__*/ i.forwardRef((_param, c)=>{
209
+ }), ie = /*#__PURE__*/ c.forwardRef((_param, i)=>{
211
210
  var { dataAttributes: t, role: r } = _param, n = _object_without_properties(_param, [
212
211
  "dataAttributes",
213
212
  "role"
214
213
  ]);
215
214
  return /* @__PURE__ */ o("div", {
216
215
  role: r,
217
- className: z({
218
- width: "100%"
219
- }),
216
+ className: E,
220
217
  children: /* @__PURE__ */ o(b, _object_spread_props(_object_spread({}, n), {
221
- ref: c,
218
+ ref: i,
222
219
  dataAttributes: _object_spread({
223
220
  "component-name": "AccordionItem"
224
221
  }, t)
225
222
  }))
226
223
  });
227
224
  }), de = (param)=>{
228
- let { children: t, dataAttributes: r, index: n, defaultIndex: c, onChange: m, singleOpen: d, role: s } = param;
225
+ let { children: t, dataAttributes: r, index: n, defaultIndex: i, onChange: m, singleOpen: s, role: d } = param;
229
226
  const [a, p] = B({
230
227
  value: n,
231
- defaultValue: c,
228
+ defaultValue: i,
232
229
  onChange: m,
233
- singleOpen: d
234
- }), f = i.Children.toArray(t).filter(Boolean), e = f.length - 1;
230
+ singleOpen: s
231
+ }), f = c.Children.toArray(t).filter(Boolean), e = f.length - 1;
235
232
  return /* @__PURE__ */ o(g.Provider, {
236
233
  value: {
237
234
  index: a,
238
235
  toggle: p
239
236
  },
240
237
  children: /* @__PURE__ */ o("div", _object_spread_props(_object_spread({
241
- role: s
238
+ role: d
242
239
  }, R(_object_spread_props(_object_spread({}, r), {
243
240
  accordion: !0
244
241
  }), "Accordion")), {
245
- children: f.map((l, u)=>/* @__PURE__ */ C(i.Fragment, {
242
+ children: f.map((l, u)=>/* @__PURE__ */ C(c.Fragment, {
246
243
  children: [
247
244
  l,
248
245
  u < e && /* @__PURE__ */ o(A, {
249
246
  paddingX: 16,
250
- children: /* @__PURE__ */ o(L, {})
247
+ children: /* @__PURE__ */ o(M, {})
251
248
  })
252
249
  ]
253
250
  }, u))
254
251
  }))
255
252
  });
256
- }, ae = /*#__PURE__*/ i.forwardRef((_param, c)=>{
253
+ }, se = /*#__PURE__*/ c.forwardRef((_param, i)=>{
257
254
  var { dataAttributes: t, isInverse: r } = _param, n = _object_without_properties(_param, [
258
255
  "dataAttributes",
259
256
  "isInverse"
260
257
  ]);
261
- return /* @__PURE__ */ o(M, {
258
+ return /* @__PURE__ */ o(X, {
262
259
  isInverse: r,
263
- ref: c,
260
+ ref: i,
264
261
  dataAttributes: _object_spread({
265
262
  "component-name": "BoxedAccordionItem"
266
263
  }, t),
267
264
  children: /* @__PURE__ */ o(b, _object_spread({}, n))
268
265
  });
269
- }), le = (param)=>{
270
- let { children: t, dataAttributes: r, index: n, defaultIndex: c, onChange: m, singleOpen: d, role: s } = param;
266
+ }), ae = (param)=>{
267
+ let { children: t, dataAttributes: r, index: n, defaultIndex: i, onChange: m, singleOpen: s, role: d } = param;
271
268
  const [a, p] = B({
272
269
  value: n,
273
- defaultValue: c,
270
+ defaultValue: i,
274
271
  onChange: m,
275
- singleOpen: d
272
+ singleOpen: s
276
273
  });
277
274
  return /* @__PURE__ */ o(g.Provider, {
278
275
  value: {
279
276
  index: a,
280
277
  toggle: p
281
278
  },
282
- children: /* @__PURE__ */ o(k, {
279
+ children: /* @__PURE__ */ o(_, {
283
280
  space: 16,
284
- role: s,
281
+ role: d,
285
282
  dataAttributes: _object_spread({
286
283
  "component-name": "BoxedAccordion",
287
284
  accordion: !0
@@ -290,4 +287,4 @@ const v = 400, g = /*#__PURE__*/ i.createContext({
290
287
  })
291
288
  });
292
289
  };
293
- export { de as Accordion, se as AccordionItem, le as BoxedAccordion, ae as BoxedAccordionItem };
290
+ export { de as Accordion, ie as AccordionItem, ae as BoxedAccordion, se as BoxedAccordionItem };
@@ -0,0 +1,3 @@
1
+ import "./align.css.ts.vanilla.css-mistica.js";
2
+ var o = "_1mfs0fk0";
3
+ export { o as container };
@@ -0,0 +1,2 @@
1
+ const a = "";
2
+ export { a as default };
@@ -0,0 +1,70 @@
1
+ function _define_property(obj, key, value) {
2
+ if (key in obj) {
3
+ Object.defineProperty(obj, key, {
4
+ value: value,
5
+ enumerable: true,
6
+ configurable: true,
7
+ writable: true
8
+ });
9
+ } else {
10
+ obj[key] = value;
11
+ }
12
+ return obj;
13
+ }
14
+ function _object_spread(target) {
15
+ for(var i = 1; i < arguments.length; i++){
16
+ var source = arguments[i] != null ? arguments[i] : {};
17
+ var ownKeys = Object.keys(source);
18
+ if (typeof Object.getOwnPropertySymbols === "function") {
19
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
20
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
21
+ }));
22
+ }
23
+ ownKeys.forEach(function(key) {
24
+ _define_property(target, key, source[key]);
25
+ });
26
+ }
27
+ return target;
28
+ }
29
+ function ownKeys(object, enumerableOnly) {
30
+ var keys = Object.keys(object);
31
+ if (Object.getOwnPropertySymbols) {
32
+ var symbols = Object.getOwnPropertySymbols(object);
33
+ if (enumerableOnly) {
34
+ symbols = symbols.filter(function(sym) {
35
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
36
+ });
37
+ }
38
+ keys.push.apply(keys, symbols);
39
+ }
40
+ return keys;
41
+ }
42
+ function _object_spread_props(target, source) {
43
+ source = source != null ? source : {};
44
+ if (Object.getOwnPropertyDescriptors) {
45
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
46
+ } else {
47
+ ownKeys(Object(source)).forEach(function(key) {
48
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
49
+ });
50
+ }
51
+ return target;
52
+ }
53
+ import { jsx as i } from "react/jsx-runtime";
54
+ import { getPrefixedDataAttributes as m } from "./utils/dom.js";
55
+ import { container as n } from "./align.css-mistica.js";
56
+ const l = (param)=>{
57
+ let { x: o = "start", y: e = "start", width: t, height: r, children: s, dataAttributes: a } = param;
58
+ return /* @__PURE__ */ i("div", _object_spread_props(_object_spread({}, m(a, "Align")), {
59
+ className: n,
60
+ style: _object_spread({
61
+ placeItems: `${e} ${o}`
62
+ }, t !== void 0 ? {
63
+ width: t
64
+ } : {}, r !== void 0 ? {
65
+ height: r
66
+ } : {}),
67
+ children: s
68
+ }));
69
+ }, d = l;
70
+ export { d as default };
@@ -0,0 +1,24 @@
1
+ import "./box.css.ts.vanilla.css-mistica.js";
2
+ var a = "_1xgjmkvc", m = {
3
+ paddingTop: {
4
+ desktop: "var(--_1xgjmkv0)",
5
+ tablet: "var(--_1xgjmkv1)",
6
+ mobile: "var(--_1xgjmkv2)"
7
+ },
8
+ paddingBottom: {
9
+ desktop: "var(--_1xgjmkv3)",
10
+ tablet: "var(--_1xgjmkv4)",
11
+ mobile: "var(--_1xgjmkv5)"
12
+ },
13
+ paddingLeft: {
14
+ desktop: "var(--_1xgjmkv6)",
15
+ tablet: "var(--_1xgjmkv7)",
16
+ mobile: "var(--_1xgjmkv8)"
17
+ },
18
+ paddingRight: {
19
+ desktop: "var(--_1xgjmkv9)",
20
+ tablet: "var(--_1xgjmkva)",
21
+ mobile: "var(--_1xgjmkvb)"
22
+ }
23
+ };
24
+ export { a as box, m as vars };
@@ -0,0 +1,2 @@
1
+ const s = "";
2
+ export { s as default };
package/dist-es/box.js CHANGED
@@ -50,42 +50,50 @@ function _object_spread_props(target, source) {
50
50
  }
51
51
  return target;
52
52
  }
53
- import { jsx as v } from "react/jsx-runtime";
54
- import * as z from "react";
55
- import A from "classnames";
56
- import { sprinkles as C } from "./sprinkles.css-mistica.js";
57
- import { getPrefixedDataAttributes as D } from "./utils/dom.js";
58
- const N = /*#__PURE__*/ z.forwardRef((param, n)=>{
59
- let { className: i, children: f, as: x = "div", width: l, padding: a = 0, paddingX: b = a, paddingY: m = a, paddingTop: e = m, paddingBottom: o = m, paddingLeft: r = b, paddingRight: t = b, role: y, id: j, dataAttributes: u, "aria-label": S, "aria-hidden": k } = param;
60
- const p = {
61
- paddingTop: e,
62
- paddingBottom: o,
63
- paddingLeft: r,
64
- paddingRight: t
53
+ import { jsx as D } from "react/jsx-runtime";
54
+ import * as N from "react";
55
+ import S from "classnames";
56
+ import { box as q, vars as l } from "./box.css-mistica.js";
57
+ import { applyCssVars as w } from "./utils/css.js";
58
+ import { getPrefixedDataAttributes as B } from "./utils/dom.js";
59
+ const E = /*#__PURE__*/ N.forwardRef((param, n)=>{
60
+ let { className: p, children: x, as: y = "div", width: m, padding: c = 0, paddingX: f = c, paddingY: i = c, paddingTop: e = i, paddingBottom: o = i, paddingLeft: t = f, paddingRight: r = f, role: k, id: V, dataAttributes: j, "aria-label": u, "aria-hidden": $ } = param;
61
+ const P = typeof e == "object" ? e : {
62
+ mobile: e,
63
+ tablet: e,
64
+ desktop: e
65
+ }, z = typeof o == "object" ? o : {
66
+ mobile: o,
67
+ tablet: o,
68
+ desktop: o
69
+ }, A = typeof t == "object" ? t : {
70
+ mobile: t,
71
+ tablet: t,
72
+ desktop: t
73
+ }, C = typeof r == "object" ? r : {
74
+ mobile: r,
75
+ tablet: r,
76
+ desktop: r
77
+ }, s = (a, b)=>{
78
+ var _b_tablet;
79
+ return w({
80
+ [a.mobile]: `${b.mobile}px`,
81
+ [a.tablet]: `${(_b_tablet = b.tablet) !== null && _b_tablet !== void 0 ? _b_tablet : b.mobile}px`,
82
+ [a.desktop]: `${b.desktop}px`
83
+ });
65
84
  };
66
- let c = {}, s = "";
67
- try {
68
- s = C(p);
69
- } catch (e1) {
70
- c = {
71
- paddingTop: typeof e == "object" ? e.mobile : e,
72
- paddingBottom: typeof o == "object" ? o.mobile : o,
73
- paddingLeft: typeof r == "object" ? r.mobile : r,
74
- paddingRight: typeof t == "object" ? t.mobile : t
75
- };
76
- }
77
- return /* @__PURE__ */ v(x, _object_spread_props(_object_spread({}, D(u)), {
78
- role: y,
79
- "aria-label": S,
80
- "aria-hidden": k,
85
+ return /* @__PURE__ */ D(y, _object_spread_props(_object_spread({}, B(j)), {
86
+ role: k,
87
+ "aria-label": u,
88
+ "aria-hidden": $,
81
89
  ref: n,
82
- className: A(i, s),
83
- style: _object_spread({}, l !== void 0 ? {
84
- width: l,
90
+ className: S(p, q),
91
+ style: _object_spread({}, s(l.paddingTop, P), s(l.paddingBottom, z), s(l.paddingLeft, A), s(l.paddingRight, C), m !== void 0 ? {
92
+ width: m,
85
93
  boxSizing: "border-box"
86
- } : {}, s ? {} : c),
87
- id: j,
88
- children: f
94
+ } : {}),
95
+ id: V,
96
+ children: x
89
97
  }));
90
- }), B = N;
91
- export { B as default };
98
+ }), K = E;
99
+ export { K as default };
@@ -1,6 +1,6 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./boxed.css.ts.vanilla.css-mistica.js";
3
- var e = "_1y2v1nfk1", a = "ihbkeqk", r = "ihbkeqm", b = {
3
+ var e = "_1y2v1nfk1", r = "ihbkeqm", a = "ihbkeqo", b = "_1y2v1nfk2", k = {
4
4
  width: "var(--ihbkeq0)",
5
5
  height: "var(--ihbkeq1)",
6
6
  minHeight: "var(--ihbkeq2)",
@@ -26,6 +26,8 @@ var e = "_1y2v1nfk1", a = "ihbkeqk", r = "ihbkeqm", b = {
26
26
  minHeight: "var(--ihbkeqh)",
27
27
  maxWidth: "var(--ihbkeqi)",
28
28
  minWidth: "var(--ihbkeqj)"
29
- }
29
+ },
30
+ background: "var(--ihbkeqk)",
31
+ borderRadius: "var(--ihbkeql)"
30
32
  };
31
- export { e as boxBorder, a as boxed, r as desktopOnly, b as vars };
33
+ export { e as boxBorder, r as boxed, a as desktopOnly, b as noBorder, k as vars };
package/dist-es/boxed.js CHANGED
@@ -51,51 +51,47 @@ function _object_spread_props(target, source) {
51
51
  }
52
52
  return target;
53
53
  }
54
- import { jsx as a } from "react/jsx-runtime";
54
+ import { jsx as s } from "react/jsx-runtime";
55
55
  import * as f from "react";
56
56
  import R from "classnames";
57
- import { useIsInverseOrMediaVariant as V, ThemeVariant as D } from "./theme-variant-context.js";
58
- import { getPrefixedDataAttributes as I } from "./utils/dom.js";
59
- import { vars as n } from "./skins/skin-contract.css-mistica.js";
60
- import { boxed as W, desktopOnly as $, boxBorder as j, vars as i } from "./boxed.css-mistica.js";
61
- import { sprinkles as l } from "./sprinkles.css-mistica.js";
57
+ import { useIsInverseOrMediaVariant as V, ThemeVariant as w } from "./theme-variant-context.js";
58
+ import { getPrefixedDataAttributes as D } from "./utils/dom.js";
59
+ import { vars as i } from "./skins/skin-contract.css-mistica.js";
60
+ import { vars as o, boxed as I, desktopOnly as W, noBorder as $, boxBorder as j } from "./boxed.css-mistica.js";
62
61
  import { applyCssVars as z } from "./utils/css.js";
63
- const A = (o, r)=>o || r ? l({
64
- border: "none"
65
- }) : j, s = (o)=>typeof o == "number" ? `${o}px` : o !== null && o !== void 0 ? o : "initial", e = (o, r)=>{
62
+ const A = (t, r)=>t || r ? $ : j, a = (t)=>typeof t == "number" ? `${t}px` : t !== null && t !== void 0 ? t : "initial", e = (t, r)=>{
66
63
  if (typeof r == "number" || typeof r == "string" || typeof r > "u") return {
67
- [i[o]]: s(r)
64
+ [o[t]]: a(r)
68
65
  };
69
- const t = {
70
- [i.mobile[o]]: s(r.mobile),
71
- [i.desktop[o]]: s(r.desktop)
66
+ const n = {
67
+ [o.mobile[t]]: a(r.mobile),
68
+ [o.desktop[t]]: a(r.desktop)
72
69
  };
73
- return r.tablet && (t[i.tablet[o]] = s(r.tablet)), t;
74
- }, H = /*#__PURE__*/ f.forwardRef((param, w)=>{
75
- let { children: o, isInverse: r = !1, className: t, role: p, dataAttributes: b, "aria-label": c, "aria-labelledby": y, width: h, maxWidth: x, minWidth: g, height: k, minHeight: u, borderRadius: B = n.borderRadii.container, background: d, desktopOnly: C, variant: O } = param;
70
+ return r.tablet && (n[o.tablet[t]] = a(r.tablet)), n;
71
+ }, H = /*#__PURE__*/ f.forwardRef((param, O)=>{
72
+ let { children: t, isInverse: r = !1, className: n, role: l, dataAttributes: b, "aria-label": c, "aria-labelledby": p, width: y, maxWidth: u, minWidth: x, height: g, minHeight: h, borderRadius: k = i.borderRadii.container, background: d, desktopOnly: B, variant: C } = param;
76
73
  const m = V();
77
- return /* @__PURE__ */ a("div", _object_spread_props(_object_spread({
78
- ref: w,
79
- style: _object_spread_props(_object_spread({}, z(_object_spread({}, e("width", h), e("maxWidth", x), e("minWidth", g), e("height", k), e("minHeight", u)))), {
74
+ return /* @__PURE__ */ s("div", _object_spread_props(_object_spread({
75
+ ref: O,
76
+ style: _object_spread_props(_object_spread({}, z(_object_spread_props(_object_spread({}, e("width", y), e("maxWidth", u), e("minWidth", x), e("height", g), e("minHeight", h)), {
77
+ [o.background]: (d !== null && d !== void 0 ? d : r) ? m ? i.colors.backgroundContainerBrandOverInverse : i.colors.backgroundContainerBrand : i.colors.backgroundContainer,
78
+ [o.borderRadius]: k
79
+ }))), {
80
80
  background: d
81
81
  }),
82
- className: R(t, W, A(m, r), l({
83
- borderRadius: B,
84
- overflow: "hidden",
85
- background: (d !== null && d !== void 0 ? d : r) ? m ? n.colors.backgroundContainerBrandOverInverse : n.colors.backgroundContainerBrand : n.colors.backgroundContainer
86
- }), {
87
- [$]: C
82
+ className: R(n, I, A(m, r), {
83
+ [W]: B
88
84
  }),
89
- role: p,
85
+ role: l,
90
86
  "aria-label": c,
91
- "aria-labelledby": y
92
- }, I(b)), {
93
- children: /* @__PURE__ */ a(D, {
94
- variant: O !== null && O !== void 0 ? O : r ? "inverse" : void 0,
95
- children: o
87
+ "aria-labelledby": p
88
+ }, D(b)), {
89
+ children: /* @__PURE__ */ s(w, {
90
+ variant: C !== null && C !== void 0 ? C : r ? "inverse" : void 0,
91
+ children: t
96
92
  })
97
93
  }));
98
- }), G = /*#__PURE__*/ f.forwardRef((o, r)=>/* @__PURE__ */ a(H, _object_spread_props(_object_spread({}, o), {
94
+ }), G = /*#__PURE__*/ f.forwardRef((t, r)=>/* @__PURE__ */ s(H, _object_spread_props(_object_spread({}, t), {
99
95
  ref: r
100
96
  })));
101
97
  export { G as Boxed, H as InternalBoxed };
@@ -1,5 +1,10 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./icon-button.css.ts.vanilla.css-mistica.js";
3
3
  import "./callout.css.ts.vanilla.css-mistica.js";
4
- var _ = "_14g0jmy5 _1y2v1nfhf _1y2v1nfll", t = "_14g0jmy6", f = "_14g0jmy1 _1y2v1nf7s _1y2v1nf91 _1y2v1nfaa _1y2v1nfbj _1y2v1nfhk _1y2v1nfkb _1y2v1nfkl", o = "_14g0jmy3 _1y2v1nfi6 _1y2v1nfhe";
5
- export { _ as closeButtonContainer, t as closeButtonContainerSize, f as container, o as content };
4
+ var _ = {
5
+ inverse: "_1y2v1nf3q",
6
+ alternative: "_1y2v1nf3q",
7
+ default: "_1y2v1nf3y",
8
+ media: "_1y2v1nf3q"
9
+ }, f = "_14g0jmy5 _1y2v1nfhf _1y2v1nfll", t = "_14g0jmy6", a = "_14g0jmy1 _1y2v1nf7s _1y2v1nf91 _1y2v1nfaa _1y2v1nfbj _1y2v1nfhk _1y2v1nfkb _1y2v1nfkl", e = "_14g0jmy3 _1y2v1nfi6 _1y2v1nfhe";
10
+ export { _ as background, f as closeButtonContainer, t as closeButtonContainerSize, a as container, e as content };