@telefonica/mistica 14.32.1 → 14.33.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.
@@ -77,37 +77,44 @@ function _object_without_properties_loose(source, excluded) {
77
77
  }
78
78
  return target;
79
79
  }
80
- import { jsx as y } from "react/jsx-runtime";
81
- import * as v from "react";
82
- import { useForm as V, useFieldProps as j } from "./form-context.js";
83
- import { useTheme as D } from "./hooks.js";
84
- import { TextFieldBaseAutosuggest as w } from "./text-field-base.js";
85
- const N = (_param)=>{
86
- var { inputRef: x , defaultValue: p , value: a } = _param, u = _object_without_properties(_param, [
80
+ import { jsx as F } from "react/jsx-runtime";
81
+ import * as Y from "react";
82
+ import { useForm as k, useFieldProps as v } from "./form-context.js";
83
+ import { useTheme as $ } from "./hooks.js";
84
+ import { TextFieldBaseAutosuggest as R } from "./text-field-base.js";
85
+ const j = (_param)=>{
86
+ var { inputRef: g , defaultValue: s , value: l } = _param, u = _object_without_properties(_param, [
87
87
  "inputRef",
88
88
  "defaultValue",
89
89
  "value"
90
90
  ]);
91
- const { texts: f } = D(), s = v.useRef(a || ""), c = (i)=>{
92
- let r = i.replace(/[^\d/]/g, "").replace(/\/+/g, "/");
93
- const [l, m] = r.split("/");
94
- return m && (r = `${l}/${m}`), String(s.current).length >= r.length || (r === "/" ? r = "" : r.length === 1 && parseInt(r) >= 2 ? r = `0${r}/` : r.length === 2 && (r[1] === "/" ? r = `0${r}` : parseInt(l) > 12 || parseInt(l) < 1 ? r = r[0] : r = `${r}/`)), r;
91
+ const { texts: p } = $(), c = Y.useRef(""), i = (r)=>{
92
+ if (r.length === 2 && c.current === "Backspace") return r[0];
93
+ let e = "";
94
+ return [
95
+ ...r
96
+ ].forEach((x)=>{
97
+ e = (e + x).replace(/[^0-9]/g, "").replace(/^([2-9])$/g, "0$1").replace(/^(1{1})([3-9]{1})$/g, "0$1/$2").replace(/^0{1,}/g, "0").replace(/^([0-1]{1}[0-9]{1})([0-9]{1,2}).*/g, "$1/$2");
98
+ }), e.length === 2 ? e + "/" : e;
99
+ }, h = (r)=>{
100
+ c.current = r.key;
95
101
  };
96
- return /* @__PURE__ */ y("input", _object_spread_props(_object_spread({}, u), {
97
- placeholder: f.expirationDatePlaceholder,
102
+ return /* @__PURE__ */ F("input", _object_spread_props(_object_spread({}, u), {
103
+ placeholder: p.expirationDatePlaceholder,
98
104
  type: "text",
99
105
  inputMode: "decimal",
100
106
  maxLength: "5",
101
- onInput: (i)=>{
102
- const r = c(i.currentTarget.value);
103
- s.current = r, i.currentTarget.value = r;
107
+ onKeyDown: h,
108
+ onInput: (r)=>{
109
+ const e = i(r.currentTarget.value);
110
+ r.currentTarget.value = e;
104
111
  },
105
- value: a === void 0 ? void 0 : c(a),
106
- defaultValue: p === void 0 ? void 0 : c(p),
107
- ref: x
112
+ value: l === void 0 ? void 0 : i(l),
113
+ defaultValue: s === void 0 ? void 0 : i(s),
114
+ ref: g
108
115
  }));
109
- }, R = (_param)=>{
110
- var { disabled: x , error: p , helperText: a , name: u , optional: f , validate: s , onChange: c , onChangeValue: i , onBlur: r , value: l , autoComplete: m = "cc-exp" , defaultValue: C } = _param, T = _object_without_properties(_param, [
116
+ }, B = (_param)=>{
117
+ var { disabled: g , error: s , helperText: l , name: u , optional: p , validate: c , onChange: i , onChangeValue: h , onBlur: r , value: e , autoComplete: x = "cc-exp" , defaultValue: D } = _param, T = _object_without_properties(_param, [
111
118
  "disabled",
112
119
  "error",
113
120
  "helperText",
@@ -121,47 +128,47 @@ const N = (_param)=>{
121
128
  "autoComplete",
122
129
  "defaultValue"
123
130
  ]);
124
- const { texts: d } = D(), { setFormError: $ , jumpToNext: M } = V(), g = (e, t)=>{
125
- if (!t) return f ? "" : d.formFieldErrorIsMandatory;
126
- const { month: o , year: n } = e;
127
- if (!o || !n) return d.formCreditCardExpirationError;
128
- const h = /* @__PURE__ */ new Date(), Y = h.getMonth() + 1, I = h.getFullYear();
129
- return n < I || n === I && o < Y ? d.formCreditCardExpirationError : s == null ? void 0 : s(e, t);
130
- }, E = (e)=>{
131
- const [t, o] = String(e).split("/").map((h)=>parseInt(h)), n = Number.isInteger(o) ? 2e3 + o : null;
131
+ const { texts: f } = $(), { setFormError: w , jumpToNext: I } = k(), m = (t, n)=>{
132
+ if (!n) return p ? "" : f.formFieldErrorIsMandatory;
133
+ const { month: a , year: o } = t;
134
+ if (!a || !o) return f.formCreditCardExpirationError;
135
+ const d = /* @__PURE__ */ new Date(), M = d.getMonth() + 1, y = d.getFullYear();
136
+ return o < y || o === y && a < M ? f.formCreditCardExpirationError : c == null ? void 0 : c(t, n);
137
+ }, C = (t)=>{
138
+ const [n, a] = String(t).split("/").map((d)=>parseInt(d)), o = Number.isInteger(a) ? 2e3 + a : null;
132
139
  return {
133
- month: t || null,
134
- year: n,
135
- raw: e
140
+ month: n || null,
141
+ year: o,
142
+ raw: t
136
143
  };
137
- }, F = j({
144
+ }, E = v({
138
145
  name: u,
139
- value: l,
140
- defaultValue: C,
141
- processValue: E,
142
- helperText: a,
143
- optional: f,
144
- error: p,
145
- disabled: x,
146
+ value: e,
147
+ defaultValue: D,
148
+ processValue: C,
149
+ helperText: l,
150
+ optional: p,
151
+ error: s,
152
+ disabled: g,
146
153
  onBlur: r,
147
- validate: g,
148
- onChange: c,
149
- onChangeValue: i
154
+ validate: m,
155
+ onChange: i,
156
+ onChangeValue: h
150
157
  });
151
- return /* @__PURE__ */ y(w, _object_spread_props(_object_spread({}, T, F), {
152
- onChange: (e)=>{
153
- F.onChange(e);
154
- const t = e.currentTarget.value, o = E(t);
155
- if (t.length === 5) {
156
- const n = g == null ? void 0 : g(o, t);
157
- n ? $({
158
+ return /* @__PURE__ */ F(R, _object_spread_props(_object_spread({}, T, E), {
159
+ onChange: (t)=>{
160
+ E.onChange(t);
161
+ const n = t.currentTarget.value, a = C(n);
162
+ if (n.length === 5) {
163
+ const o = m == null ? void 0 : m(a, n);
164
+ o ? w({
158
165
  name: u,
159
- error: n
160
- }) : M(u);
166
+ error: o
167
+ }) : I(u);
161
168
  }
162
169
  },
163
- autoComplete: m,
164
- inputComponent: N
170
+ autoComplete: x,
171
+ inputComponent: j
165
172
  }));
166
- }, L = R;
167
- export { L as default };
173
+ }, A = B;
174
+ export { A as default };
@@ -85,24 +85,25 @@ import { BaseTouchable as s } from "./touchable.js";
85
85
  import { Text as x, Text2 as k } from "./text.js";
86
86
  import { Boxed as C } from "./boxed.js";
87
87
  import I, { useIsDismissable as T } from "./maybe-dismissable.js";
88
- import { container as P, textContainerVariant as y, imageContent as E, touchableContainer as d } from "./highlighted-card.css-mistica.js";
89
- import { vars as H } from "./skins/skin-contract.css-mistica.js";
88
+ import { container as H, textContainerVariant as P, imageContent as y, touchableContainer as m } from "./highlighted-card.css-mistica.js";
89
+ import { vars as E } from "./skins/skin-contract.css-mistica.js";
90
90
  import { useTheme as N } from "./hooks.js";
91
91
  const L = /*#__PURE__*/ h.forwardRef((e, i)=>{
92
92
  var _e_isInverse;
93
- const { title: r , description: a , imageUrl: o , imageFit: l } = e, g = v(), u = (_e_isInverse = e.isInverse) !== null && _e_isInverse !== void 0 ? _e_isInverse : g, m = T(), { textPresets: f } = N(), n = /* @__PURE__ */ c(C, {
93
+ const { title: r , description: a , imageUrl: o , imageFit: l } = e, g = v(), u = (_e_isInverse = e.isInverse) !== null && _e_isInverse !== void 0 ? _e_isInverse : g, d = T(), { textPresets: f } = N(), n = /* @__PURE__ */ c(C, {
94
94
  ref: i,
95
95
  isInverse: u,
96
- className: P,
96
+ className: H,
97
97
  dataAttributes: _object_spread({
98
98
  "component-name": "HighlightedCard"
99
99
  }, e.dataAttributes),
100
100
  width: e.width ? `${e.width}px` : "100%",
101
+ minHeight: "100%",
101
102
  children: [
102
103
  /* @__PURE__ */ c("div", {
103
- role: m ? void 0 : "region",
104
- className: y[o ? "withImage" : "withoutImage"],
105
- "aria-label": m ? void 0 : e["aria-label"],
104
+ role: d ? void 0 : "region",
105
+ className: P[o ? "withImage" : "withoutImage"],
106
+ "aria-label": d ? void 0 : e["aria-label"],
106
107
  children: [
107
108
  /* @__PURE__ */ t(x, {
108
109
  mobileSize: 18,
@@ -119,7 +120,7 @@ const L = /*#__PURE__*/ h.forwardRef((e, i)=>{
119
120
  paddingTop: 8,
120
121
  children: /* @__PURE__ */ t(k, {
121
122
  regular: !0,
122
- color: H.colors.textSecondary,
123
+ color: E.colors.textSecondary,
123
124
  truncate: e.descriptionLinesMax,
124
125
  as: "p",
125
126
  hyphens: "auto",
@@ -140,7 +141,7 @@ const L = /*#__PURE__*/ h.forwardRef((e, i)=>{
140
141
  ]
141
142
  }),
142
143
  o && /* @__PURE__ */ t("div", {
143
- className: E,
144
+ className: y,
144
145
  style: {
145
146
  backgroundImage: `url(${o})`,
146
147
  backgroundRepeat: "no-repeat",
@@ -153,19 +154,19 @@ const L = /*#__PURE__*/ h.forwardRef((e, i)=>{
153
154
  return e.button ? n : e.onPress ? /* @__PURE__ */ t(s, {
154
155
  onPress: e.onPress,
155
156
  trackingEvent: e.trackingEvent,
156
- className: d,
157
+ className: m,
157
158
  children: n
158
159
  }) : e.to ? /* @__PURE__ */ t(s, {
159
160
  to: e.to,
160
161
  trackingEvent: e.trackingEvent,
161
162
  fullPageOnWebView: e.fullPageOnWebView,
162
- className: d,
163
+ className: m,
163
164
  children: n
164
165
  }) : e.href ? /* @__PURE__ */ t(s, {
165
166
  trackingEvent: e.trackingEvent,
166
167
  href: e.href,
167
168
  newTab: e.newTab,
168
- className: d,
169
+ className: m,
169
170
  children: n
170
171
  }) : n;
171
172
  }), R = /*#__PURE__*/ h.forwardRef((_param, r)=>{
package/dist-es/hooks.js CHANGED
@@ -1,73 +1,74 @@
1
1
  import * as n from "react";
2
- import f from "./theme-context.js";
3
- import m from "./screen-size-context.js";
4
- import g from "./aria-id-getter-context.js";
5
- import { listenResize as S } from "./utils/dom.js";
6
- import { isClientSide as h } from "./utils/environment.js";
7
- const y = ()=>{
8
- const t = n.useContext(f);
2
+ import S from "./theme-context.js";
3
+ import y from "./screen-size-context.js";
4
+ import b from "./aria-id-getter-context.js";
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);
9
9
  if (!t) throw Error("To use @telefonica/mistica components you must instantiate <ThemeContextProvider> as their parent.");
10
10
  return t;
11
- }, E = (t)=>{
11
+ };
12
+ let f = "", w = 0, h = 0;
13
+ const z = (t)=>{
12
14
  n.useEffect(()=>{
13
15
  if (t) {
14
- let s = "", e = 0, i = 0;
15
- const r = document.scrollingElement || document.documentElement, c = ()=>{
16
- var u;
16
+ const r = document.scrollingElement || document.documentElement, e = ()=>{
17
+ var s;
17
18
  var _ref, _ref1;
18
- if (i++, !(i > 1) && (e = (_ref = r == null ? void 0 : r.scrollTop) !== null && _ref !== void 0 ? _ref : 0, s = (_ref1 = (u = document.body) == null ? void 0 : u.style.cssText) !== null && _ref1 !== void 0 ? _ref1 : "", document.body)) {
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)) {
19
20
  var _ref2;
20
- const l = window.innerWidth > ((_ref2 = r == null ? void 0 : r.clientWidth) !== null && _ref2 !== void 0 ? _ref2 : window.innerWidth) ? "scroll" : "hidden";
21
- document.body.style.cssText = `overflow:hidden;overflow-y:${l};position:fixed;top:${-e}px;left:0px;right:0px;bottom:0px`;
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
23
  }
23
- }, o = ()=>{
24
- i--, !(i > 0) && (document.body && (document.body.style.cssText = s), r && (r.scrollTop = e));
24
+ }, i = ()=>{
25
+ h--, !(h > 0) && (document.body && (document.body.style.cssText = f), r && (r.scrollTop = w));
25
26
  };
26
- return c(), o;
27
+ return e(), i;
27
28
  }
28
29
  return ()=>{};
29
30
  }, [
30
31
  t
31
32
  ]);
32
- }, H = ()=>n.useContext(m), T = ()=>{
33
- const [t, s] = n.useState(0), [e, i] = n.useState(0), [r, c] = n.useState(null), o = n.useCallback((d)=>{
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)=>{
34
35
  if (!d) {
35
- s(0), i(0);
36
+ r(0), i(0);
36
37
  return;
37
38
  }
38
- const { width: l , height: a } = d[0].contentRect;
39
- s(l), i(a);
40
- }, []), u = n.useCallback((d)=>{
39
+ const { width: m , height: g } = d[0].contentRect;
40
+ r(m), i(g);
41
+ }, []), l = n.useCallback((d)=>{
41
42
  c(d);
42
43
  }, []);
43
44
  return n.useEffect(()=>{
44
- if (!r) {
45
- s(0), i(0);
45
+ if (!s) {
46
+ r(0), i(0);
46
47
  return;
47
48
  }
48
- return S(r, o);
49
+ return W(s, o);
49
50
  }, [
50
- r,
51
+ s,
51
52
  o
52
53
  ]), {
53
54
  width: t,
54
55
  height: e,
55
- ref: u
56
+ ref: l
56
57
  };
57
- }, z = (t)=>{
58
- const { useId: s } = y();
59
- if (s) {
60
- const e = s();
58
+ }, B = (t)=>{
59
+ const { useId: r } = x();
60
+ if (r) {
61
+ const e = r();
61
62
  return t || e;
62
63
  } else {
63
- const e = n.useContext(g);
64
+ const e = n.useContext(b);
64
65
  return n.useRef(t || e()).current;
65
66
  }
66
- }, w = ()=>{
67
- const [t, s] = n.useState(h() ? window.innerHeight : 1200), [e, i] = n.useState(h() ? window.innerWidth : 800), [r, c] = n.useState(h() ? window.screen.availHeight : 1200), [o, u] = n.useState(h() ? window.screen.availWidth : 800);
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);
68
69
  return n.useEffect(()=>{
69
70
  const d = ()=>{
70
- s(window.innerHeight), i(window.innerWidth), c(window.screen.availHeight), u(window.screen.availWidth);
71
+ r(window.innerHeight), i(window.innerWidth), c(window.screen.availHeight), l(window.screen.availWidth);
71
72
  };
72
73
  return window.addEventListener("resize", d), ()=>{
73
74
  window.removeEventListener("resize", d);
@@ -75,30 +76,30 @@ const y = ()=>{
75
76
  }, []), n.useMemo(()=>({
76
77
  height: t,
77
78
  width: e,
78
- screenHeight: r,
79
+ screenHeight: s,
79
80
  screenWidth: o
80
81
  }), [
81
82
  t,
82
83
  e,
83
- r,
84
+ s,
84
85
  o
85
86
  ]);
86
- }, C = ()=>{
87
- const { height: t } = w();
87
+ }, L = ()=>{
88
+ const { height: t } = a();
88
89
  return t;
89
- }, R = ()=>{
90
- const { width: t } = w();
90
+ }, M = ()=>{
91
+ const { width: t } = a();
91
92
  return t;
92
- }, B = ()=>{
93
- const { screenHeight: t } = w();
93
+ }, A = ()=>{
94
+ const { screenHeight: t } = a();
94
95
  return t;
95
- }, L = ()=>h() && window.top !== window.self, M = h() ? n.useLayoutEffect : n.useEffect, A = (t, s, e)=>{
96
- const [i, r] = n.useState(s);
96
+ }, D = ()=>u() && window.top !== window.self, V = u() ? n.useLayoutEffect : n.useEffect, k = (t, r, e)=>{
97
+ const [i, s] = n.useState(r);
97
98
  return n.useEffect(()=>{
98
99
  if (!t.current) return;
99
100
  if (typeof window.IntersectionObserver > "u") return ()=>{};
100
101
  const c = new IntersectionObserver((o)=>{
101
- r(o[0].isIntersecting);
102
+ s(o[0].isIntersecting);
102
103
  }, {
103
104
  root: e == null ? void 0 : e.root,
104
105
  rootMargin: e == null ? void 0 : e.rootMargin,
@@ -114,4 +115,4 @@ const y = ()=>{
114
115
  e == null ? void 0 : e.threshold
115
116
  ]), i;
116
117
  };
117
- export { z as useAriaId, E as useDisableBodyScroll, T as useElementDimensions, A as useIsInViewport, L as useIsWithinIFrame, M as useIsomorphicLayoutEffect, B as useScreenHeight, H as useScreenSize, y as useTheme, C as useWindowHeight, w as useWindowSize, R as useWindowWidth };
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 };
@@ -1,26 +1,27 @@
1
- import { jsx as s, Fragment as m, jsxs as n } from "react/jsx-runtime";
2
- import * as a from "react";
1
+ import { jsx as e, Fragment as m, jsxs as n } from "react/jsx-runtime";
2
+ import * as i from "react";
3
3
  import c from "./generated/mistica-icons/icon-close-regular.js";
4
4
  import { useTheme as b } from "./hooks.js";
5
5
  import u from "./icon-button.js";
6
6
  import { vars as d } from "./skins/skin-contract.css-mistica.js";
7
- import { dismissableContainer as f, dismissableButton as p, dismissableCircleContainer as h } from "./maybe-dismissable.css-mistica.js";
8
- const i = /*#__PURE__*/ a.createContext(!1), I = ()=>a.useContext(i), x = (param)=>{
9
- let { children: e , width: r , onClose: t , "aria-label": o } = param;
7
+ import { dismissableContainer as f, dismissableButton as h, dismissableCircleContainer as p } from "./maybe-dismissable.css-mistica.js";
8
+ const a = /*#__PURE__*/ i.createContext(!1), I = ()=>i.useContext(a), x = (param)=>{
9
+ let { children: s , width: r , onClose: t , "aria-label": o } = param;
10
10
  const { texts: l } = b();
11
11
  return t ? /* @__PURE__ */ n("section", {
12
12
  className: f,
13
13
  "aria-label": o,
14
14
  style: {
15
- width: r || "100%"
15
+ width: r || "100%",
16
+ minHeight: "100%"
16
17
  },
17
18
  children: [
18
- /* @__PURE__ */ s(i.Provider, {
19
+ /* @__PURE__ */ e(a.Provider, {
19
20
  value: !0,
20
- children: e
21
+ children: s
21
22
  }),
22
- /* @__PURE__ */ s(u, {
23
- className: p,
23
+ /* @__PURE__ */ e(u, {
24
+ className: h,
24
25
  onPress: t,
25
26
  "aria-label": l.closeButtonLabel,
26
27
  style: {
@@ -28,16 +29,16 @@ const i = /*#__PURE__*/ a.createContext(!1), I = ()=>a.useContext(i), x = (param
28
29
  width: 48,
29
30
  height: 48
30
31
  },
31
- children: /* @__PURE__ */ s("div", {
32
- className: h,
33
- children: /* @__PURE__ */ s(c, {
32
+ children: /* @__PURE__ */ e("div", {
33
+ className: p,
34
+ children: /* @__PURE__ */ e(c, {
34
35
  color: d.colors.neutralHigh
35
36
  })
36
37
  })
37
38
  })
38
39
  ]
39
- }) : /* @__PURE__ */ s(m, {
40
- children: e
40
+ }) : /* @__PURE__ */ e(m, {
41
+ children: s
41
42
  });
42
43
  }, N = x;
43
44
  export { N as default, I as useIsDismissable };
@@ -1,2 +1,2 @@
1
- const o = "14.32.1";
1
+ const o = "14.33.0";
2
2
  export { o as PACKAGE_VERSION };
@@ -1,7 +1,7 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./responsive-layout.css.ts.vanilla.css-mistica.js";
3
- var e = {
3
+ var o = {
4
4
  inverse: "_1y2v1nf3b",
5
5
  alternative: "_1y2v1nf3g"
6
- }, n = "_17lofg78", r = "_17lofg73", v = "_17lofg7a _1y2v1nfbx", t = "_17lofg74", i = "_17lofg77", f = "_17lofg72 _1y2v1nfbx";
7
- export { e as backgroundVariant, n as expandedResponsiveLayout, r as expandedResponsiveLayoutContainer, v as fullWidth, t as fullwidthContainer, i as responsiveLayout, f as responsiveLayoutContainer };
6
+ }, r = "_17lofg73", e = "_17lofg79 _1y2v1nfbx", v = "_17lofg74", t = "_17lofg77", i = "_17lofg72 _1y2v1nfbx";
7
+ export { o as backgroundVariant, r as expandedResponsiveLayoutContainer, e as fullWidth, v as fullwidthContainer, t as responsiveLayout, i as responsiveLayoutContainer };
@@ -78,34 +78,34 @@ function _object_without_properties_loose(source, excluded) {
78
78
  return target;
79
79
  }
80
80
  import { jsx as t } from "react/jsx-runtime";
81
- import r from "classnames";
82
- import { getPrefixedDataAttributes as v } from "./utils/dom.js";
83
- import { fullwidthContainer as c, responsiveLayoutContainer as l, backgroundVariant as f, expandedResponsiveLayoutContainer as y, fullWidth as L, responsiveLayout as x, expandedResponsiveLayout as R } from "./responsive-layout.css-mistica.js";
84
- import { useThemeVariant as V, ThemeVariant as h } from "./theme-variant-context.js";
85
- const b = (param)=>{
86
- let { children: n , isInverse: o = !1 , variant: d , backgroundColor: s , className: m , fullWidth: e , dataAttributes: p , shouldExpandWhenNested: i = !1 } = param;
87
- const u = V(), a = d || o && "inverse" || void 0;
88
- return /* @__PURE__ */ t(h, {
89
- variant: a !== null && a !== void 0 ? a : u,
81
+ import l from "classnames";
82
+ import { getPrefixedDataAttributes as p } from "./utils/dom.js";
83
+ import { fullwidthContainer as v, responsiveLayoutContainer as c, backgroundVariant as f, expandedResponsiveLayoutContainer as h, fullWidth as y, responsiveLayout as L } from "./responsive-layout.css-mistica.js";
84
+ import { useThemeVariant as x, ThemeVariant as V } from "./theme-variant-context.js";
85
+ const R = (param)=>{
86
+ let { children: a , isInverse: n = !1 , variant: i , backgroundColor: o , className: r , fullWidth: s , dataAttributes: d , shouldExpandWhenNested: u = !1 } = param;
87
+ const m = x(), e = i || n && "inverse" || void 0;
88
+ return /* @__PURE__ */ t(V, {
89
+ variant: e !== null && e !== void 0 ? e : m,
90
90
  children: /* @__PURE__ */ t("div", _object_spread_props(_object_spread({
91
- className: r(e ? c : l, m, a && a !== "default" && f[a], i && !e && y),
92
- style: s ? {
93
- background: s
91
+ className: l(s ? v : c, r, e && e !== "default" && f[e], u && !s && h),
92
+ style: o ? {
93
+ background: o
94
94
  } : void 0
95
- }, v(p)), {
95
+ }, p(d)), {
96
96
  children: /* @__PURE__ */ t("div", {
97
- className: r(e ? L : x, i && !e && R),
98
- children: n
97
+ className: s ? y : L,
98
+ children: a
99
99
  })
100
100
  }))
101
101
  });
102
- }, g = (_param)=>/* @__PURE__ */ {
103
- var { children: n } = _param, o = _object_without_properties(_param, [
102
+ }, N = (_param)=>/* @__PURE__ */ {
103
+ var { children: a } = _param, n = _object_without_properties(_param, [
104
104
  "children"
105
105
  ]);
106
- return t(b, _object_spread_props(_object_spread({}, o), {
106
+ return t(R, _object_spread_props(_object_spread({}, n), {
107
107
  shouldExpandWhenNested: !0,
108
- children: n
108
+ children: a
109
109
  }));
110
- }, w = g;
111
- export { b as InternalResponsiveLayout, w as default };
110
+ }, k = N;
111
+ export { R as InternalResponsiveLayout, k as default };