@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.
- package/css/mistica.css +1 -1
- package/dist/card.js +107 -105
- package/dist/community/blocks.d.ts +3 -3
- package/dist/credit-card-expiration-field.js +57 -50
- package/dist/highlighted-card.js +4 -3
- package/dist/hooks.js +53 -52
- package/dist/maybe-dismissable.js +7 -6
- package/dist/package-version.js +1 -1
- package/dist/responsive-layout.css-mistica.js +7 -10
- package/dist/responsive-layout.css.d.ts +0 -1
- package/dist/responsive-layout.js +17 -17
- package/dist/tabs.css-mistica.js +26 -14
- package/dist/tabs.css.d.ts +3 -1
- package/dist/tabs.js +37 -32
- package/dist-es/card.js +103 -101
- package/dist-es/credit-card-expiration-field.js +63 -56
- package/dist-es/highlighted-card.js +13 -12
- package/dist-es/hooks.js +49 -48
- package/dist-es/maybe-dismissable.js +16 -15
- package/dist-es/package-version.js +1 -1
- package/dist-es/responsive-layout.css-mistica.js +3 -3
- package/dist-es/responsive-layout.js +21 -21
- package/dist-es/style.css +1 -1
- package/dist-es/tabs.css-mistica.js +14 -8
- package/dist-es/tabs.js +58 -53
- package/package.json +1 -1
|
@@ -77,37 +77,44 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
77
77
|
}
|
|
78
78
|
return target;
|
|
79
79
|
}
|
|
80
|
-
import { jsx as
|
|
81
|
-
import * as
|
|
82
|
-
import { useForm as
|
|
83
|
-
import { useTheme as
|
|
84
|
-
import { TextFieldBaseAutosuggest as
|
|
85
|
-
const
|
|
86
|
-
var { inputRef:
|
|
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:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
return
|
|
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__ */
|
|
97
|
-
placeholder:
|
|
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
|
-
|
|
102
|
-
|
|
103
|
-
|
|
107
|
+
onKeyDown: h,
|
|
108
|
+
onInput: (r)=>{
|
|
109
|
+
const e = i(r.currentTarget.value);
|
|
110
|
+
r.currentTarget.value = e;
|
|
104
111
|
},
|
|
105
|
-
value:
|
|
106
|
-
defaultValue:
|
|
107
|
-
ref:
|
|
112
|
+
value: l === void 0 ? void 0 : i(l),
|
|
113
|
+
defaultValue: s === void 0 ? void 0 : i(s),
|
|
114
|
+
ref: g
|
|
108
115
|
}));
|
|
109
|
-
},
|
|
110
|
-
var { disabled:
|
|
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:
|
|
125
|
-
if (!
|
|
126
|
-
const { month:
|
|
127
|
-
if (!
|
|
128
|
-
const
|
|
129
|
-
return
|
|
130
|
-
},
|
|
131
|
-
const [
|
|
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:
|
|
134
|
-
year:
|
|
135
|
-
raw:
|
|
140
|
+
month: n || null,
|
|
141
|
+
year: o,
|
|
142
|
+
raw: t
|
|
136
143
|
};
|
|
137
|
-
},
|
|
144
|
+
}, E = v({
|
|
138
145
|
name: u,
|
|
139
|
-
value:
|
|
140
|
-
defaultValue:
|
|
141
|
-
processValue:
|
|
142
|
-
helperText:
|
|
143
|
-
optional:
|
|
144
|
-
error:
|
|
145
|
-
disabled:
|
|
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:
|
|
148
|
-
onChange:
|
|
149
|
-
onChangeValue:
|
|
154
|
+
validate: m,
|
|
155
|
+
onChange: i,
|
|
156
|
+
onChangeValue: h
|
|
150
157
|
});
|
|
151
|
-
return /* @__PURE__ */
|
|
152
|
-
onChange: (
|
|
153
|
-
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
156
|
-
const
|
|
157
|
-
|
|
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:
|
|
160
|
-
}) :
|
|
166
|
+
error: o
|
|
167
|
+
}) : I(u);
|
|
161
168
|
}
|
|
162
169
|
},
|
|
163
|
-
autoComplete:
|
|
164
|
-
inputComponent:
|
|
170
|
+
autoComplete: x,
|
|
171
|
+
inputComponent: j
|
|
165
172
|
}));
|
|
166
|
-
},
|
|
167
|
-
export {
|
|
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
|
|
89
|
-
import { vars as
|
|
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,
|
|
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:
|
|
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:
|
|
104
|
-
className:
|
|
105
|
-
"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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { listenResize as
|
|
6
|
-
import { isClientSide as
|
|
7
|
-
const
|
|
8
|
-
const t = n.useContext(
|
|
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
|
-
}
|
|
11
|
+
};
|
|
12
|
+
let f = "", w = 0, h = 0;
|
|
13
|
+
const z = (t)=>{
|
|
12
14
|
n.useEffect(()=>{
|
|
13
15
|
if (t) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var u;
|
|
16
|
+
const r = document.scrollingElement || document.documentElement, e = ()=>{
|
|
17
|
+
var s;
|
|
17
18
|
var _ref, _ref1;
|
|
18
|
-
if (
|
|
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
|
|
21
|
-
document.body.style.cssText = `overflow:hidden;overflow-y:${
|
|
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
|
-
},
|
|
24
|
-
|
|
24
|
+
}, i = ()=>{
|
|
25
|
+
h--, !(h > 0) && (document.body && (document.body.style.cssText = f), r && (r.scrollTop = w));
|
|
25
26
|
};
|
|
26
|
-
return
|
|
27
|
+
return e(), i;
|
|
27
28
|
}
|
|
28
29
|
return ()=>{};
|
|
29
30
|
}, [
|
|
30
31
|
t
|
|
31
32
|
]);
|
|
32
|
-
},
|
|
33
|
-
const [t,
|
|
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
|
-
|
|
36
|
+
r(0), i(0);
|
|
36
37
|
return;
|
|
37
38
|
}
|
|
38
|
-
const { width:
|
|
39
|
-
|
|
40
|
-
}, []),
|
|
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 (!
|
|
45
|
-
|
|
45
|
+
if (!s) {
|
|
46
|
+
r(0), i(0);
|
|
46
47
|
return;
|
|
47
48
|
}
|
|
48
|
-
return
|
|
49
|
+
return W(s, o);
|
|
49
50
|
}, [
|
|
50
|
-
|
|
51
|
+
s,
|
|
51
52
|
o
|
|
52
53
|
]), {
|
|
53
54
|
width: t,
|
|
54
55
|
height: e,
|
|
55
|
-
ref:
|
|
56
|
+
ref: l
|
|
56
57
|
};
|
|
57
|
-
},
|
|
58
|
-
const { useId:
|
|
59
|
-
if (
|
|
60
|
-
const e =
|
|
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(
|
|
64
|
+
const e = n.useContext(b);
|
|
64
65
|
return n.useRef(t || e()).current;
|
|
65
66
|
}
|
|
66
|
-
},
|
|
67
|
-
const [t,
|
|
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
|
-
|
|
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:
|
|
79
|
+
screenHeight: s,
|
|
79
80
|
screenWidth: o
|
|
80
81
|
}), [
|
|
81
82
|
t,
|
|
82
83
|
e,
|
|
83
|
-
|
|
84
|
+
s,
|
|
84
85
|
o
|
|
85
86
|
]);
|
|
86
|
-
},
|
|
87
|
-
const { height: t } =
|
|
87
|
+
}, L = ()=>{
|
|
88
|
+
const { height: t } = a();
|
|
88
89
|
return t;
|
|
89
|
-
},
|
|
90
|
-
const { width: t } =
|
|
90
|
+
}, M = ()=>{
|
|
91
|
+
const { width: t } = a();
|
|
91
92
|
return t;
|
|
92
|
-
},
|
|
93
|
-
const { screenHeight: t } =
|
|
93
|
+
}, A = ()=>{
|
|
94
|
+
const { screenHeight: t } = a();
|
|
94
95
|
return t;
|
|
95
|
-
},
|
|
96
|
-
const [i,
|
|
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
|
-
|
|
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 {
|
|
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
|
|
2
|
-
import * as
|
|
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
|
|
8
|
-
const
|
|
9
|
-
let { children:
|
|
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__ */
|
|
19
|
+
/* @__PURE__ */ e(a.Provider, {
|
|
19
20
|
value: !0,
|
|
20
|
-
children:
|
|
21
|
+
children: s
|
|
21
22
|
}),
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
className:
|
|
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__ */
|
|
32
|
-
className:
|
|
33
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
40
|
-
children:
|
|
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.
|
|
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
|
|
3
|
+
var o = {
|
|
4
4
|
inverse: "_1y2v1nf3b",
|
|
5
5
|
alternative: "_1y2v1nf3g"
|
|
6
|
-
},
|
|
7
|
-
export {
|
|
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
|
|
82
|
-
import { getPrefixedDataAttributes as
|
|
83
|
-
import { fullwidthContainer as
|
|
84
|
-
import { useThemeVariant as
|
|
85
|
-
const
|
|
86
|
-
let { children:
|
|
87
|
-
const
|
|
88
|
-
return /* @__PURE__ */ t(
|
|
89
|
-
variant:
|
|
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:
|
|
92
|
-
style:
|
|
93
|
-
background:
|
|
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
|
-
},
|
|
95
|
+
}, p(d)), {
|
|
96
96
|
children: /* @__PURE__ */ t("div", {
|
|
97
|
-
className:
|
|
98
|
-
children:
|
|
97
|
+
className: s ? y : L,
|
|
98
|
+
children: a
|
|
99
99
|
})
|
|
100
100
|
}))
|
|
101
101
|
});
|
|
102
|
-
},
|
|
103
|
-
var { children:
|
|
102
|
+
}, N = (_param)=>/* @__PURE__ */ {
|
|
103
|
+
var { children: a } = _param, n = _object_without_properties(_param, [
|
|
104
104
|
"children"
|
|
105
105
|
]);
|
|
106
|
-
return t(
|
|
106
|
+
return t(R, _object_spread_props(_object_spread({}, n), {
|
|
107
107
|
shouldExpandWhenNested: !0,
|
|
108
|
-
children:
|
|
108
|
+
children: a
|
|
109
109
|
}));
|
|
110
|
-
},
|
|
111
|
-
export {
|
|
110
|
+
}, k = N;
|
|
111
|
+
export { R as InternalResponsiveLayout, k as default };
|