@telefonica/mistica 14.2.0 → 14.4.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.css-mistica.js +3 -3
- package/dist/card.d.ts +8 -6
- package/dist/card.js +208 -179
- package/dist/date-time-picker.js +14 -14
- package/dist/empty-state-card.js +24 -20
- package/dist/header.d.ts +1 -0
- package/dist/header.js +94 -86
- package/dist/highlighted-card.js +18 -12
- package/dist/icon-button.js +8 -6
- package/dist/inline.css-mistica.js +7 -6
- package/dist/inline.css.d.ts +1 -0
- package/dist/inline.d.ts +2 -1
- package/dist/inline.js +8 -8
- package/dist/package-version.js +1 -1
- package/dist/popover.js +11 -11
- package/dist/text-link.js +5 -4
- package/dist/touchable.d.ts +1 -0
- package/dist/touchable.js +31 -27
- package/dist-es/card.css-mistica.js +2 -2
- package/dist-es/card.js +268 -239
- package/dist-es/date-time-picker.js +17 -17
- package/dist-es/empty-state-card.js +42 -38
- package/dist-es/header.js +115 -107
- package/dist-es/highlighted-card.js +35 -29
- package/dist-es/icon-button.js +24 -22
- package/dist-es/inline.css-mistica.js +6 -6
- package/dist-es/inline.js +16 -16
- package/dist-es/package-version.js +1 -1
- package/dist-es/popover.js +34 -34
- package/dist-es/style.css +1 -1
- package/dist-es/text-link.js +15 -14
- package/dist-es/touchable.js +44 -40
- package/package.json +1 -1
package/dist/date-time-picker.js
CHANGED
|
@@ -141,8 +141,8 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
141
141
|
}
|
|
142
142
|
return target;
|
|
143
143
|
}
|
|
144
|
-
const
|
|
145
|
-
Promise.resolve(/* webpackChunkName: "moment-locale" */ `moment/locale/${
|
|
144
|
+
const g = navigator.language.toLocaleLowerCase().split("-")[0];
|
|
145
|
+
Promise.resolve(/* webpackChunkName: "moment-locale" */ `moment/locale/${g}`).then((p)=>/*#__PURE__*/ _interopRequireWildcard(require(p))).finally(()=>{});
|
|
146
146
|
const Q = (_param)=>{
|
|
147
147
|
var { withTime: s , mode: l , isValidDate: y , optional: u } = _param, t = _objectWithoutProperties(_param, [
|
|
148
148
|
"withTime",
|
|
@@ -150,15 +150,15 @@ const Q = (_param)=>{
|
|
|
150
150
|
"isValidDate",
|
|
151
151
|
"optional"
|
|
152
152
|
]);
|
|
153
|
-
const [m, x] = _react.useState(!1), { texts: b } = (0, _hooksJs.useTheme)(), n = _react.useRef(null), { height: k , ref: v } = (0, _hooksJs.useElementDimensions)(),
|
|
153
|
+
const [m, x] = _react.useState(!1), { texts: b } = (0, _hooksJs.useTheme)(), n = _react.useRef(null), { height: k , ref: v } = (0, _hooksJs.useElementDimensions)(), i = (e)=>{
|
|
154
154
|
t.disabled || x(e);
|
|
155
155
|
}, w = ()=>{
|
|
156
156
|
var p;
|
|
157
|
-
const { top: e = 0 , bottom: o = 0 , left:
|
|
157
|
+
const { top: e = 0 , bottom: o = 0 , left: a = 0 } = ((p = n.current) == null ? void 0 : p.getBoundingClientRect()) || {}, P = 260 + o < window.innerHeight;
|
|
158
158
|
return {
|
|
159
159
|
width: _textFieldComponentsCssMisticaJs.DEFAULT_WIDTH,
|
|
160
160
|
top: P ? o : e - k,
|
|
161
|
-
left:
|
|
161
|
+
left: a,
|
|
162
162
|
position: "absolute",
|
|
163
163
|
borderRadius: 8,
|
|
164
164
|
overflow: "hidden",
|
|
@@ -169,21 +169,21 @@ const Q = (_param)=>{
|
|
|
169
169
|
const e = (o = n.current) == null ? void 0 : o.value;
|
|
170
170
|
return e ? new Date(e) : void 0;
|
|
171
171
|
}, C = (e)=>s ? e.format("yyyy-MM-DD HH:mm") : l === "year-month" ? e.format("yyyy-MM") : e.format("yyyy-MM-DD"), f = (e)=>{
|
|
172
|
-
var
|
|
172
|
+
var a;
|
|
173
173
|
const o = typeof e == "string" ? e : C(e);
|
|
174
|
-
n.current && (n.current.focus(), (
|
|
174
|
+
n.current && (n.current.focus(), (a = t.onChange) == null || a.call(t, (0, _domJs.createChangeEvent)(n.current, o)));
|
|
175
175
|
}, D = ()=>c() && u ? /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_iconButtonJs.default, {
|
|
176
176
|
"aria-label": b.clearButton,
|
|
177
177
|
size: 32,
|
|
178
|
-
onPress: (
|
|
179
|
-
|
|
178
|
+
onPress: ()=>{
|
|
179
|
+
f("");
|
|
180
180
|
},
|
|
181
181
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_iconCloseRegularJs.default, {})
|
|
182
182
|
}) : /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_iconButtonJs.default, {
|
|
183
183
|
disabled: t.disabled,
|
|
184
184
|
"aria-label": "",
|
|
185
185
|
size: 32,
|
|
186
|
-
onPress: ()=>
|
|
186
|
+
onPress: ()=>i(!m),
|
|
187
187
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_iconCalendarRegularJs.default, {})
|
|
188
188
|
});
|
|
189
189
|
return /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_jsxRuntimeJs.Fragment, {
|
|
@@ -202,14 +202,14 @@ const Q = (_param)=>{
|
|
|
202
202
|
(o = t == null ? void 0 : t.inputRef) == null || o.call(t, e), n.current = e;
|
|
203
203
|
},
|
|
204
204
|
readOnly: !0,
|
|
205
|
-
onKeyDown: ()=>
|
|
205
|
+
onKeyDown: ()=>i(!0),
|
|
206
206
|
onClick: ()=>{
|
|
207
|
-
|
|
207
|
+
i(!0);
|
|
208
208
|
}
|
|
209
209
|
})),
|
|
210
210
|
m && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_overlayJs.default, {
|
|
211
211
|
onPress: (e)=>{
|
|
212
|
-
(0, _domJs.cancelEvent)(e),
|
|
212
|
+
(0, _domJs.cancelEvent)(e), i(!1);
|
|
213
213
|
},
|
|
214
214
|
disableScroll: !0,
|
|
215
215
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
@@ -221,7 +221,7 @@ const Q = (_param)=>{
|
|
|
221
221
|
dateFormat: l === "year-month" ? "YYYY-MM" : void 0,
|
|
222
222
|
timeFormat: s ? "HH:mm" : !1,
|
|
223
223
|
initialValue: c(),
|
|
224
|
-
locale:
|
|
224
|
+
locale: g,
|
|
225
225
|
input: !1,
|
|
226
226
|
onChange: f,
|
|
227
227
|
isValidDate: y
|
package/dist/empty-state-card.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()=>
|
|
7
|
+
get: ()=>V
|
|
8
8
|
});
|
|
9
9
|
const _boxJs = /*#__PURE__*/ _interopRequireDefault(require("./box.js"));
|
|
10
10
|
const _boxedJs = require("./boxed.js");
|
|
@@ -20,50 +20,54 @@ function _interopRequireDefault(obj) {
|
|
|
20
20
|
default: obj
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
let { title: n , description:
|
|
25
|
-
var
|
|
26
|
-
const { isTabletOrSmaller:
|
|
27
|
-
let
|
|
28
|
-
return
|
|
23
|
+
const V = (param)=>{
|
|
24
|
+
let { title: n , description: h , button: r , secondaryButton: o , buttonLink: t , icon: a , imageUrl: l , "aria-label": f , dataAttributes: x } = param;
|
|
25
|
+
var m;
|
|
26
|
+
const { isTabletOrSmaller: s } = (0, _hooksJs.useScreenSize)(), { textPresets: S } = (0, _hooksJs.useTheme)();
|
|
27
|
+
let i;
|
|
28
|
+
return l && (i = /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("img", {
|
|
29
29
|
className: _emptyStateCardCssMisticaJs.image,
|
|
30
30
|
alt: "",
|
|
31
|
-
src:
|
|
32
|
-
})), process.env.NODE_ENV !== "production" &&
|
|
31
|
+
src: l
|
|
32
|
+
})), process.env.NODE_ENV !== "production" && r && !((m = r == null ? void 0 : r.props) != null && m.small) && console.error("button property in EmptyStateCard must be a a small Button. Set small prop to true"), /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxedJs.Boxed, {
|
|
33
33
|
dataAttributes: x,
|
|
34
34
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
35
|
-
paddingY:
|
|
36
|
-
paddingX:
|
|
35
|
+
paddingY: s ? 24 : 40,
|
|
36
|
+
paddingX: s ? 16 : 40,
|
|
37
37
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("section", {
|
|
38
38
|
className: _emptyStateCardCssMisticaJs.container,
|
|
39
|
-
"aria-label":
|
|
39
|
+
"aria-label": f,
|
|
40
40
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_stackJs.default, {
|
|
41
41
|
space: 16,
|
|
42
42
|
children: [
|
|
43
|
-
|
|
43
|
+
i != null ? i : a && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
44
44
|
className: _emptyStateCardCssMisticaJs.iconContainer,
|
|
45
|
-
children:
|
|
45
|
+
children: a
|
|
46
46
|
}),
|
|
47
47
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
48
48
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_stackJs.default, {
|
|
49
49
|
space: 8,
|
|
50
50
|
children: [
|
|
51
|
-
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_textJs.
|
|
52
|
-
|
|
51
|
+
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_textJs.Text, {
|
|
52
|
+
mobileSize: 18,
|
|
53
|
+
mobileLineHeight: "24px",
|
|
54
|
+
desktopSize: 20,
|
|
55
|
+
desktopLineHeight: "28px",
|
|
56
|
+
weight: S.cardTitle.weight,
|
|
53
57
|
children: n
|
|
54
58
|
}),
|
|
55
59
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_textJs.Text2, {
|
|
56
60
|
regular: !0,
|
|
57
61
|
color: _skinContractCssMisticaJs.vars.colors.textSecondary,
|
|
58
|
-
children:
|
|
62
|
+
children: h
|
|
59
63
|
})
|
|
60
64
|
]
|
|
61
65
|
})
|
|
62
66
|
}),
|
|
63
|
-
(
|
|
64
|
-
primaryButton:
|
|
67
|
+
(r || o || t) && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_buttonGroupJs.default, {
|
|
68
|
+
primaryButton: r,
|
|
65
69
|
secondaryButton: o,
|
|
66
|
-
link:
|
|
70
|
+
link: t
|
|
67
71
|
})
|
|
68
72
|
]
|
|
69
73
|
})
|
package/dist/header.d.ts
CHANGED
package/dist/header.js
CHANGED
|
@@ -9,10 +9,10 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
Header: ()=>
|
|
13
|
-
HeaderLayout: ()=>
|
|
14
|
-
MainSectionHeader: ()=>
|
|
15
|
-
MainSectionHeaderLayout: ()=>
|
|
12
|
+
Header: ()=>N,
|
|
13
|
+
HeaderLayout: ()=>U,
|
|
14
|
+
MainSectionHeader: ()=>Q,
|
|
15
|
+
MainSectionHeaderLayout: ()=>W
|
|
16
16
|
});
|
|
17
17
|
const _boxJs = /*#__PURE__*/ _interopRequireDefault(require("./box.js"));
|
|
18
18
|
const _stackJs = /*#__PURE__*/ _interopRequireDefault(require("./stack.js"));
|
|
@@ -109,33 +109,33 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
109
109
|
}
|
|
110
110
|
return target;
|
|
111
111
|
}
|
|
112
|
-
const
|
|
113
|
-
let { pretitle:
|
|
114
|
-
const { isTabletOrSmaller: L } = (0, _hooksJs.useScreenSize)(), O = (0, _themeVariantContextJs.useIsInverseVariant)(),
|
|
115
|
-
if (typeof
|
|
112
|
+
const N = (param)=>{
|
|
113
|
+
let { pretitle: l , title: e , description: t , dataAttributes: i , preamount: c , amount: m , button: h , subtitle: a , isErrorAmount: s , secondaryButton: y } = param;
|
|
114
|
+
const { isTabletOrSmaller: L } = (0, _hooksJs.useScreenSize)(), O = (0, _themeVariantContextJs.useIsInverseVariant)(), u = (g, S)=>{
|
|
115
|
+
if (typeof g == "string") return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_textJs.Text3, _objectSpreadProps(_objectSpread({
|
|
116
116
|
regular: !0
|
|
117
|
-
},
|
|
118
|
-
children:
|
|
117
|
+
}, S), {
|
|
118
|
+
children: g
|
|
119
119
|
}));
|
|
120
|
-
const { text:
|
|
120
|
+
const { text: G } = g, k = _objectWithoutProperties(g, [
|
|
121
121
|
"text"
|
|
122
122
|
]);
|
|
123
123
|
return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_textJs.Text3, _objectSpreadProps(_objectSpread({
|
|
124
124
|
regular: !0
|
|
125
|
-
},
|
|
126
|
-
children:
|
|
125
|
+
}, S, k), {
|
|
126
|
+
children: g.text
|
|
127
127
|
}));
|
|
128
128
|
};
|
|
129
129
|
return /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_stackJs.default, {
|
|
130
130
|
space: L ? 24 : 32,
|
|
131
|
-
dataAttributes:
|
|
131
|
+
dataAttributes: i,
|
|
132
132
|
children: [
|
|
133
|
-
(e ||
|
|
133
|
+
(e || l || t) && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
134
134
|
paddingRight: 16,
|
|
135
135
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_stackJs.default, {
|
|
136
136
|
space: 8,
|
|
137
137
|
children: [
|
|
138
|
-
|
|
138
|
+
l && u(l, {
|
|
139
139
|
color: _skinContractCssMisticaJs.vars.colors.textPrimary
|
|
140
140
|
}),
|
|
141
141
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_textJs.Text6, {
|
|
@@ -143,121 +143,129 @@ const J = (param)=>{
|
|
|
143
143
|
"aria-level": 2,
|
|
144
144
|
children: e
|
|
145
145
|
}),
|
|
146
|
-
|
|
146
|
+
t && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_textJs.Text3, {
|
|
147
147
|
regular: !0,
|
|
148
148
|
color: _skinContractCssMisticaJs.vars.colors.textSecondary,
|
|
149
|
-
children:
|
|
149
|
+
children: t
|
|
150
150
|
})
|
|
151
151
|
]
|
|
152
152
|
})
|
|
153
153
|
}),
|
|
154
|
-
(c ||
|
|
154
|
+
(c || m || h || a) && /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_stackJs.default, {
|
|
155
155
|
space: 16,
|
|
156
156
|
children: [
|
|
157
|
-
(c ||
|
|
157
|
+
(c || m) && /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_stackJs.default, {
|
|
158
158
|
space: 8,
|
|
159
159
|
children: [
|
|
160
|
-
c &&
|
|
160
|
+
c && u(c, {
|
|
161
161
|
color: _skinContractCssMisticaJs.vars.colors.textPrimary
|
|
162
162
|
}),
|
|
163
163
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_textJs.Text8, {
|
|
164
|
-
color:
|
|
165
|
-
children:
|
|
164
|
+
color: s && !O ? _skinContractCssMisticaJs.vars.colors.highlight : _skinContractCssMisticaJs.vars.colors.textPrimary,
|
|
165
|
+
children: m
|
|
166
166
|
})
|
|
167
167
|
]
|
|
168
168
|
}),
|
|
169
|
-
(
|
|
170
|
-
primaryButton:
|
|
171
|
-
secondaryButton:
|
|
169
|
+
(h || y) && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_buttonGroupJs.default, {
|
|
170
|
+
primaryButton: h,
|
|
171
|
+
secondaryButton: y
|
|
172
172
|
}),
|
|
173
|
-
|
|
173
|
+
a && u(a, {})
|
|
174
174
|
]
|
|
175
175
|
})
|
|
176
176
|
]
|
|
177
177
|
});
|
|
178
|
-
},
|
|
179
|
-
let { title:
|
|
180
|
-
const { isTabletOrSmaller:
|
|
178
|
+
}, Q = (param)=>{
|
|
179
|
+
let { title: l , description: e , button: t } = param;
|
|
180
|
+
const { isTabletOrSmaller: i } = (0, _hooksJs.useScreenSize)();
|
|
181
181
|
return /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_stackJs.default, {
|
|
182
182
|
space: 32,
|
|
183
183
|
children: [
|
|
184
184
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_stackJs.default, {
|
|
185
|
-
space:
|
|
185
|
+
space: i ? 12 : 16,
|
|
186
186
|
children: [
|
|
187
|
-
|
|
187
|
+
l && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_textJs.Text7, {
|
|
188
188
|
role: "heading",
|
|
189
189
|
"aria-level": 1,
|
|
190
|
-
children:
|
|
190
|
+
children: l
|
|
191
191
|
}),
|
|
192
192
|
e && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_textJs.Text6, {
|
|
193
193
|
children: e
|
|
194
194
|
})
|
|
195
195
|
]
|
|
196
196
|
}),
|
|
197
|
-
|
|
197
|
+
t
|
|
198
198
|
]
|
|
199
199
|
});
|
|
200
|
-
},
|
|
201
|
-
let { isInverse:
|
|
202
|
-
const { isTabletOrSmaller: a } = (0, _hooksJs.useScreenSize)();
|
|
203
|
-
return /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(
|
|
204
|
-
isInverse: i,
|
|
205
|
-
dataAttributes: _objectSpread({
|
|
206
|
-
"component-name": "HeaderLayout"
|
|
207
|
-
}, s),
|
|
200
|
+
}, U = (param)=>{
|
|
201
|
+
let { isInverse: l = !0 , breadcrumbs: e , header: t , extra: i , sideBySideExtraOnDesktop: c = !1 , dataAttributes: m , bleed: h = !1 } = param;
|
|
202
|
+
const { isTabletOrSmaller: a } = (0, _hooksJs.useScreenSize)(), s = h && l;
|
|
203
|
+
return /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_jsxRuntimeJs.Fragment, {
|
|
208
204
|
children: [
|
|
209
|
-
/* @__PURE__ */ (0, _jsxRuntimeJs.
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
paddingTop: e ? 16 : 48,
|
|
222
|
-
paddingBottom: 48,
|
|
223
|
-
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_gridLayoutJs.default, {
|
|
224
|
-
template: "6+6",
|
|
225
|
-
left: /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_stackJs.default, {
|
|
226
|
-
space: 32,
|
|
227
|
-
children: [
|
|
228
|
-
e,
|
|
229
|
-
o
|
|
230
|
-
]
|
|
231
|
-
}),
|
|
232
|
-
right: n
|
|
233
|
-
})
|
|
234
|
-
}) : /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
235
|
-
paddingTop: e ? 16 : 48,
|
|
236
|
-
paddingBottom: 48,
|
|
237
|
-
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_stackJs.default, {
|
|
238
|
-
space: a ? 24 : 32,
|
|
239
|
-
children: [
|
|
240
|
-
/* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_stackJs.default, {
|
|
241
|
-
space: 32,
|
|
205
|
+
/* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_responsiveLayoutJs.default, {
|
|
206
|
+
isInverse: l,
|
|
207
|
+
dataAttributes: _objectSpread({
|
|
208
|
+
"component-name": "HeaderLayout"
|
|
209
|
+
}, m),
|
|
210
|
+
children: [
|
|
211
|
+
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_overscrollColorContextJs.default, {}),
|
|
212
|
+
a ? /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
213
|
+
paddingTop: t ? 32 : 0,
|
|
214
|
+
paddingBottom: 24,
|
|
215
|
+
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_stackJs.default, {
|
|
216
|
+
space: 24,
|
|
242
217
|
children: [
|
|
243
|
-
|
|
244
|
-
|
|
218
|
+
t,
|
|
219
|
+
!s && i
|
|
245
220
|
]
|
|
246
|
-
})
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
221
|
+
})
|
|
222
|
+
}) : c ? /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
223
|
+
paddingTop: e ? 16 : 48,
|
|
224
|
+
paddingBottom: 48,
|
|
225
|
+
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_gridLayoutJs.default, {
|
|
226
|
+
template: "6+6",
|
|
227
|
+
left: /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_stackJs.default, {
|
|
228
|
+
space: 32,
|
|
229
|
+
children: [
|
|
230
|
+
e,
|
|
231
|
+
t
|
|
232
|
+
]
|
|
233
|
+
}),
|
|
234
|
+
right: i
|
|
235
|
+
})
|
|
236
|
+
}) : /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
237
|
+
paddingTop: e ? 16 : 48,
|
|
238
|
+
paddingBottom: s ? 32 : 48,
|
|
239
|
+
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_stackJs.default, {
|
|
240
|
+
space: a ? 24 : 32,
|
|
241
|
+
children: [
|
|
242
|
+
/* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_stackJs.default, {
|
|
243
|
+
space: 32,
|
|
244
|
+
children: [
|
|
245
|
+
e,
|
|
246
|
+
t
|
|
247
|
+
]
|
|
248
|
+
}),
|
|
249
|
+
!s && i
|
|
250
|
+
]
|
|
251
|
+
})
|
|
252
|
+
})
|
|
253
|
+
]
|
|
254
|
+
}),
|
|
255
|
+
s && i && (a || !c) && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_responsiveLayoutJs.default, {
|
|
256
|
+
backgroundColor: `linear-gradient(to bottom, ${_skinContractCssMisticaJs.vars.colors.backgroundBrand} 40px, ${_skinContractCssMisticaJs.vars.colors.background} 0%)`,
|
|
257
|
+
children: i
|
|
250
258
|
})
|
|
251
259
|
]
|
|
252
260
|
});
|
|
253
|
-
},
|
|
254
|
-
let { isInverse:
|
|
255
|
-
const { isTabletOrSmaller:
|
|
261
|
+
}, W = (param)=>{
|
|
262
|
+
let { isInverse: l = !0 , children: e } = param;
|
|
263
|
+
const { isTabletOrSmaller: t } = (0, _hooksJs.useScreenSize)();
|
|
256
264
|
return /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_responsiveLayoutJs.default, {
|
|
257
|
-
isInverse:
|
|
265
|
+
isInverse: l,
|
|
258
266
|
children: [
|
|
259
267
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_overscrollColorContextJs.default, {}),
|
|
260
|
-
|
|
268
|
+
t ? /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
261
269
|
paddingTop: 12,
|
|
262
270
|
paddingBottom: 24,
|
|
263
271
|
children: e
|
package/dist/highlighted-card.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()=>
|
|
7
|
+
get: ()=>W
|
|
8
8
|
});
|
|
9
9
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
10
10
|
const _themeVariantContextJs = require("./theme-variant-context.js");
|
|
@@ -15,6 +15,7 @@ const _boxedJs = require("./boxed.js");
|
|
|
15
15
|
const _maybeDismissableJs = /*#__PURE__*/ _interopRequireWildcard(require("./maybe-dismissable.js"));
|
|
16
16
|
const _highlightedCardCssMisticaJs = require("./highlighted-card.css-mistica.js");
|
|
17
17
|
const _skinContractCssMisticaJs = require("./skins/skin-contract.css-mistica.js");
|
|
18
|
+
const _hooksJs = require("./hooks.js");
|
|
18
19
|
const _jsxRuntimeJs = require("./_virtual/jsx-runtime.js");
|
|
19
20
|
function _interopRequireDefault(obj) {
|
|
20
21
|
return obj && obj.__esModule ? obj : {
|
|
@@ -139,11 +140,11 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
139
140
|
}
|
|
140
141
|
return target;
|
|
141
142
|
}
|
|
142
|
-
const
|
|
143
|
+
const S = /*#__PURE__*/ _react.forwardRef((e, i)=>{
|
|
143
144
|
var h;
|
|
144
|
-
const { title: a , description: r , imageUrl: o , imageFit: l } = e,
|
|
145
|
+
const { title: a , description: r , imageUrl: o , imageFit: l } = e, u = (0, _themeVariantContextJs.useIsInverseVariant)(), f = (h = e.isInverse) != null ? h : u, d = (0, _maybeDismissableJs.useIsDismissable)(), { textPresets: b } = (0, _hooksJs.useTheme)(), n = /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_boxedJs.Boxed, {
|
|
145
146
|
ref: i,
|
|
146
|
-
isInverse:
|
|
147
|
+
isInverse: f,
|
|
147
148
|
className: _highlightedCardCssMisticaJs.container,
|
|
148
149
|
dataAttributes: _objectSpread({
|
|
149
150
|
"component-name": "HighlightedCard"
|
|
@@ -151,14 +152,18 @@ const V = /*#__PURE__*/ _react.forwardRef((e, i)=>{
|
|
|
151
152
|
width: e.width ? `${e.width}px` : "100%",
|
|
152
153
|
children: [
|
|
153
154
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)("div", {
|
|
154
|
-
role:
|
|
155
|
+
role: d ? void 0 : "region",
|
|
155
156
|
className: _highlightedCardCssMisticaJs.textContainerVariant[o ? "withImage" : "withoutImage"],
|
|
156
|
-
"aria-label":
|
|
157
|
+
"aria-label": d ? void 0 : e["aria-label"],
|
|
157
158
|
children: [
|
|
158
|
-
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_textJs.
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_textJs.Text, {
|
|
160
|
+
mobileSize: 18,
|
|
161
|
+
mobileLineHeight: "24px",
|
|
162
|
+
desktopSize: 20,
|
|
163
|
+
desktopLineHeight: "28px",
|
|
161
164
|
truncate: e.titleLinesMax,
|
|
165
|
+
weight: b.cardTitle.weight,
|
|
166
|
+
as: "h3",
|
|
162
167
|
children: a
|
|
163
168
|
}),
|
|
164
169
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
@@ -187,7 +192,8 @@ const V = /*#__PURE__*/ _react.forwardRef((e, i)=>{
|
|
|
187
192
|
o && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
188
193
|
className: _highlightedCardCssMisticaJs.imageContent,
|
|
189
194
|
style: {
|
|
190
|
-
|
|
195
|
+
backgroundImage: `url(${o})`,
|
|
196
|
+
backgroundRepeat: "no-repeat",
|
|
191
197
|
backgroundSize: l === "fit" ? "contain" : "cover",
|
|
192
198
|
backgroundPosition: l === "fit" ? "bottom right" : `center ${l === "fill-center" ? "center" : "right"}`
|
|
193
199
|
}
|
|
@@ -212,7 +218,7 @@ const V = /*#__PURE__*/ _react.forwardRef((e, i)=>{
|
|
|
212
218
|
className: _highlightedCardCssMisticaJs.touchableContainer,
|
|
213
219
|
children: n
|
|
214
220
|
}) : n;
|
|
215
|
-
}),
|
|
221
|
+
}), W = /*#__PURE__*/ _react.forwardRef((_param, a)=>{
|
|
216
222
|
var { "aria-label": e } = _param, i = _objectWithoutProperties(_param, [
|
|
217
223
|
"aria-label"
|
|
218
224
|
]);
|
|
@@ -221,7 +227,7 @@ const V = /*#__PURE__*/ _react.forwardRef((e, i)=>{
|
|
|
221
227
|
onClose: i.onClose,
|
|
222
228
|
"aria-label": r,
|
|
223
229
|
width: i.width,
|
|
224
|
-
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(
|
|
230
|
+
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(S, _objectSpreadProps(_objectSpread({}, i), {
|
|
225
231
|
"aria-label": r,
|
|
226
232
|
ref: a
|
|
227
233
|
}))
|
package/dist/icon-button.js
CHANGED
|
@@ -113,14 +113,14 @@ function _objectSpreadProps(target, source) {
|
|
|
113
113
|
}
|
|
114
114
|
return target;
|
|
115
115
|
}
|
|
116
|
-
const
|
|
116
|
+
const d = 24, b = (e, a, t, n, l)=>{
|
|
117
117
|
const m = n ? `${n}px ${n}px` : "100% 100%";
|
|
118
118
|
return {
|
|
119
119
|
padding: 0,
|
|
120
120
|
backgroundColor: t,
|
|
121
121
|
backgroundImage: e ? `url(${e})` : "initial",
|
|
122
122
|
backgroundSize: m,
|
|
123
|
-
cursor:
|
|
123
|
+
cursor: l ? "default" : "pointer",
|
|
124
124
|
height: a,
|
|
125
125
|
width: a
|
|
126
126
|
};
|
|
@@ -147,7 +147,9 @@ const s = 24, b = (e, a, t, n, c)=>{
|
|
|
147
147
|
"aria-label": e["aria-label"],
|
|
148
148
|
children: !a && _react.Children.only(t)
|
|
149
149
|
})) : e.onPress ? /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_touchableJs.BaseTouchable, _objectSpreadProps(_objectSpread({}, n), {
|
|
150
|
-
onPress:
|
|
150
|
+
onPress: (l)=>{
|
|
151
|
+
l.stopPropagation(), e.onPress(l);
|
|
152
|
+
},
|
|
151
153
|
"aria-label": e["aria-label"],
|
|
152
154
|
children: !a && _react.Children.only(t)
|
|
153
155
|
})) : /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_touchableJs.BaseTouchable, _objectSpreadProps(_objectSpread({}, n), {
|
|
@@ -155,13 +157,13 @@ const s = 24, b = (e, a, t, n, c)=>{
|
|
|
155
157
|
children: !a && _react.Children.only(t)
|
|
156
158
|
}));
|
|
157
159
|
}, I = (e)=>{
|
|
158
|
-
const { icon: a , backgroundColor: t = "transparent" , iconSize: n , size:
|
|
160
|
+
const { icon: a , backgroundColor: t = "transparent" , iconSize: n , size: l = d } = e;
|
|
159
161
|
return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(u, _objectSpreadProps(_objectSpread({}, e), {
|
|
160
162
|
className: (0, _classnames.default)(_iconButtonCssMisticaJs.base, e.className),
|
|
161
|
-
style: _objectSpread({}, b(a,
|
|
163
|
+
style: _objectSpread({}, b(a, l, t, n, e.disabled), e.style)
|
|
162
164
|
}));
|
|
163
165
|
}, w = (e)=>{
|
|
164
|
-
const { size: a =
|
|
166
|
+
const { size: a = d , disabled: t } = e;
|
|
165
167
|
return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(u, _objectSpreadProps(_objectSpread({}, e), {
|
|
166
168
|
className: (0, _classnames.default)(_iconButtonCssMisticaJs.base, e.className),
|
|
167
169
|
style: {
|
|
@@ -12,13 +12,14 @@ _export(exports, {
|
|
|
12
12
|
fullWidth: ()=>v,
|
|
13
13
|
justifyVariants: ()=>n,
|
|
14
14
|
noFullWidth: ()=>a,
|
|
15
|
-
vars: ()=>f
|
|
15
|
+
vars: ()=>f,
|
|
16
|
+
wrap: ()=>r
|
|
16
17
|
});
|
|
17
18
|
require("./inline.css.ts.vanilla.js");
|
|
18
19
|
var v = "kkfbnv2 kkfbnv1", n = {
|
|
19
|
-
between: "
|
|
20
|
-
around: "
|
|
21
|
-
evenly: "
|
|
22
|
-
}, a = "
|
|
20
|
+
between: "kkfbnv5",
|
|
21
|
+
around: "kkfbnv6",
|
|
22
|
+
evenly: "kkfbnv7"
|
|
23
|
+
}, a = "kkfbnv4 kkfbnv1", f = {
|
|
23
24
|
space: "var(--kkfbnv0)"
|
|
24
|
-
};
|
|
25
|
+
}, r = "kkfbnv3 kkfbnv1";
|
package/dist/inline.css.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ export declare const vars: {
|
|
|
3
3
|
};
|
|
4
4
|
export declare const inline: string;
|
|
5
5
|
export declare const fullWidth: string;
|
|
6
|
+
export declare const wrap: string;
|
|
6
7
|
export declare const noFullWidth: string;
|
|
7
8
|
export declare const justifyVariants: Record<"between" | "around" | "evenly", string>;
|
package/dist/inline.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { DataAttributes } from './utils/types';
|
|
3
3
|
type Props = {
|
|
4
|
-
space: 0 | 2 | 4 | 8 | 12 | 16 | 24 | 32 | 40 | 48 | 56 | 64 | 'between' | 'around' | 'evenly';
|
|
4
|
+
space: -16 | -12 | -8 | -4 | -2 | 0 | 2 | 4 | 8 | 12 | 16 | 24 | 32 | 40 | 48 | 56 | 64 | 'between' | 'around' | 'evenly';
|
|
5
5
|
alignItems?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
className?: string;
|
|
@@ -9,6 +9,7 @@ type Props = {
|
|
|
9
9
|
'aria-labelledby'?: string;
|
|
10
10
|
fullWidth?: boolean;
|
|
11
11
|
dataAttributes?: DataAttributes;
|
|
12
|
+
wrap?: boolean;
|
|
12
13
|
};
|
|
13
14
|
declare const Inline: React.FC<Props>;
|
|
14
15
|
export default Inline;
|