@telefonica/mistica 16.2.0 → 16.3.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 +33 -21
- package/dist/card.css.d.ts +4 -0
- package/dist/card.js +235 -263
- package/dist/chip.css-mistica.js +19 -7
- package/dist/chip.css.d.ts +2 -0
- package/dist/chip.js +33 -49
- package/dist/community/advanced-data-card.css-mistica.js +24 -24
- package/dist/community/advanced-data-card.css.d.ts +1 -1
- package/dist/community/advanced-data-card.js +45 -48
- package/dist/empty-state-card.js +12 -11
- package/dist/hero.js +25 -19
- package/dist/highlighted-card.js +15 -14
- package/dist/list.css-mistica.js +21 -15
- package/dist/list.css.d.ts +2 -0
- package/dist/list.js +97 -96
- package/dist/menu.css-mistica.js +9 -9
- package/dist/menu.js +9 -10
- package/dist/package-version.js +1 -1
- package/dist/sheet-common.js +3 -2
- package/dist/table.js +52 -51
- package/dist/tag.css-mistica.js +1 -1
- package/dist/tag.js +9 -10
- package/dist/text-props.d.ts +60 -0
- package/dist/text-props.js +93 -0
- package/dist/text.d.ts +0 -62
- package/dist/text.js +156 -219
- package/dist/title.js +10 -9
- package/dist-es/card.css-mistica.js +4 -4
- package/dist-es/card.js +343 -371
- package/dist-es/chip.css-mistica.js +10 -4
- package/dist-es/chip.js +44 -60
- package/dist-es/community/advanced-data-card.css-mistica.js +7 -7
- package/dist-es/community/advanced-data-card.js +74 -77
- package/dist-es/empty-state-card.js +17 -16
- package/dist-es/hero.js +53 -47
- package/dist-es/highlighted-card.js +19 -18
- package/dist-es/list.css-mistica.js +2 -2
- package/dist-es/list.js +141 -140
- package/dist-es/menu.css-mistica.js +3 -3
- package/dist-es/menu.js +21 -22
- package/dist-es/package-version.js +1 -1
- package/dist-es/sheet-common.js +12 -11
- package/dist-es/style.css +1 -1
- package/dist-es/table.js +89 -88
- package/dist-es/tag.css-mistica.js +1 -1
- package/dist-es/tag.js +14 -15
- package/dist-es/text-props.js +52 -0
- package/dist-es/text.js +171 -231
- package/dist-es/title.js +14 -13
- package/package.json +3 -3
package/dist/list.js
CHANGED
|
@@ -11,19 +11,19 @@ function _export(target, all) {
|
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
13
|
BoxedRow: function() {
|
|
14
|
-
return
|
|
14
|
+
return ft;
|
|
15
15
|
},
|
|
16
16
|
BoxedRowList: function() {
|
|
17
|
-
return
|
|
17
|
+
return bt;
|
|
18
18
|
},
|
|
19
19
|
Content: function() {
|
|
20
|
-
return
|
|
20
|
+
return ze;
|
|
21
21
|
},
|
|
22
22
|
Row: function() {
|
|
23
|
-
return
|
|
23
|
+
return ut;
|
|
24
24
|
},
|
|
25
25
|
RowList: function() {
|
|
26
|
-
return
|
|
26
|
+
return mt;
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -172,7 +172,7 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
172
172
|
}
|
|
173
173
|
return target;
|
|
174
174
|
}
|
|
175
|
-
const
|
|
175
|
+
const qe = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
176
176
|
centerY: a
|
|
177
177
|
}) : a ? /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
178
178
|
style: {
|
|
@@ -183,25 +183,23 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
183
183
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
184
184
|
children: e
|
|
185
185
|
})
|
|
186
|
-
}) : e,
|
|
187
|
-
let { withChevron: e, headline: a, headlineRef: r, extraRef:
|
|
186
|
+
}) : e, ze = (param)=>{
|
|
187
|
+
let { withChevron: e, headline: a, headlineRef: r, extraRef: o, title: d, titleAs: x, titleLinesMax: g, subtitle: v, subtitleLinesMax: D, description: w, descriptionLinesMax: M, detail: u, asset: E, danger: T, badge: N, right: y, rightRef: f, extra: L, labelId: O, disabled: c, control: k } = param;
|
|
188
188
|
const A = (0, _themevariantcontext.useIsInverseOrMediaVariant)(), S = [
|
|
189
189
|
a,
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
d,
|
|
191
|
+
v,
|
|
192
192
|
w,
|
|
193
193
|
L
|
|
194
194
|
].filter(Boolean).length === 1;
|
|
195
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsxs)(
|
|
196
|
-
paddingY: 16,
|
|
195
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
197
196
|
className: _listcssmistica.content,
|
|
198
|
-
id:
|
|
197
|
+
id: O,
|
|
199
198
|
children: [
|
|
200
|
-
E && /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
201
|
-
|
|
202
|
-
className: (0, _classnames.default)({
|
|
199
|
+
E && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
200
|
+
className: (0, _classnames.default)(_listcssmistica.assetContainer, {
|
|
203
201
|
[_listcssmistica.center]: S,
|
|
204
|
-
[_listcssmistica.disabled]:
|
|
202
|
+
[_listcssmistica.disabled]: c
|
|
205
203
|
}),
|
|
206
204
|
"aria-hidden": !0,
|
|
207
205
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
@@ -215,7 +213,7 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
215
213
|
}),
|
|
216
214
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
217
215
|
className: (0, _classnames.default)(_listcssmistica.rowBody, {
|
|
218
|
-
[_listcssmistica.disabled]:
|
|
216
|
+
[_listcssmistica.disabled]: c
|
|
219
217
|
}),
|
|
220
218
|
style: {
|
|
221
219
|
justifyContent: S ? "center" : "flex-start"
|
|
@@ -226,8 +224,8 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
226
224
|
color: T ? _skincontractcssmistica.vars.colors.textError : _skincontractcssmistica.vars.colors.textPrimary,
|
|
227
225
|
truncate: g,
|
|
228
226
|
hyphens: "auto",
|
|
229
|
-
as:
|
|
230
|
-
children:
|
|
227
|
+
as: x,
|
|
228
|
+
children: d
|
|
231
229
|
}),
|
|
232
230
|
a && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
233
231
|
ref: r,
|
|
@@ -242,14 +240,14 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
242
240
|
children: a
|
|
243
241
|
})
|
|
244
242
|
}),
|
|
245
|
-
|
|
243
|
+
v && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
246
244
|
paddingTop: 2,
|
|
247
245
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
248
246
|
regular: !0,
|
|
249
247
|
color: _skincontractcssmistica.vars.colors.textPrimary,
|
|
250
|
-
truncate:
|
|
248
|
+
truncate: D,
|
|
251
249
|
hyphens: "auto",
|
|
252
|
-
children:
|
|
250
|
+
children: v
|
|
253
251
|
})
|
|
254
252
|
}),
|
|
255
253
|
w && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
@@ -257,13 +255,13 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
257
255
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
258
256
|
regular: !0,
|
|
259
257
|
color: _skincontractcssmistica.vars.colors.textSecondary,
|
|
260
|
-
truncate:
|
|
258
|
+
truncate: M,
|
|
261
259
|
hyphens: "auto",
|
|
262
260
|
children: w
|
|
263
261
|
})
|
|
264
262
|
}),
|
|
265
263
|
L && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
266
|
-
ref:
|
|
264
|
+
ref: o,
|
|
267
265
|
paddingTop: 2,
|
|
268
266
|
children: L
|
|
269
267
|
})
|
|
@@ -273,49 +271,53 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
273
271
|
paddingLeft: 16,
|
|
274
272
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
275
273
|
className: (0, _classnames.default)(_listcssmistica.badge, {
|
|
276
|
-
[_listcssmistica.disabled]:
|
|
274
|
+
[_listcssmistica.disabled]: c
|
|
277
275
|
}),
|
|
278
276
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_badge.default, {
|
|
279
277
|
value: N === !0 ? void 0 : N
|
|
280
278
|
})
|
|
281
279
|
})
|
|
282
280
|
}),
|
|
283
|
-
(
|
|
281
|
+
(u || y || e || k) && /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
284
282
|
className: (0, _classnames.default)(_listcssmistica.rightContent, {
|
|
285
|
-
[_listcssmistica.rightRestrictedWidth]: !!
|
|
283
|
+
[_listcssmistica.rightRestrictedWidth]: !!u
|
|
286
284
|
}),
|
|
287
285
|
children: [
|
|
288
|
-
|
|
286
|
+
u && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
289
287
|
className: (0, _classnames.default)(_listcssmistica.detail, {
|
|
290
|
-
[_listcssmistica.disabled]:
|
|
288
|
+
[_listcssmistica.disabled]: c
|
|
291
289
|
}),
|
|
292
290
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
293
291
|
regular: !0,
|
|
294
292
|
color: _skincontractcssmistica.vars.colors.textSecondary,
|
|
295
293
|
hyphens: "auto",
|
|
296
|
-
children:
|
|
294
|
+
children: u
|
|
297
295
|
})
|
|
298
296
|
}),
|
|
299
297
|
y && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
300
298
|
className: (0, _classnames.default)({
|
|
301
|
-
[_listcssmistica.detailRight]: !!
|
|
302
|
-
[_listcssmistica.disabled]:
|
|
299
|
+
[_listcssmistica.detailRight]: !!u,
|
|
300
|
+
[_listcssmistica.disabled]: c
|
|
303
301
|
}),
|
|
304
302
|
ref: f,
|
|
305
|
-
children:
|
|
303
|
+
children: qe(y, S)
|
|
306
304
|
}),
|
|
307
|
-
e && /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
308
|
-
|
|
305
|
+
e && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
306
|
+
style: {
|
|
307
|
+
paddingLeft: u || y ? 4 : 0
|
|
308
|
+
},
|
|
309
309
|
className: (0, _classnames.default)(_listcssmistica.center, {
|
|
310
|
-
[_listcssmistica.disabled]:
|
|
310
|
+
[_listcssmistica.disabled]: c
|
|
311
311
|
}),
|
|
312
312
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconchevron.default, {
|
|
313
313
|
color: A ? _skincontractcssmistica.vars.colors.inverse : _skincontractcssmistica.vars.colors.neutralMedium,
|
|
314
314
|
direction: "right"
|
|
315
315
|
})
|
|
316
316
|
}),
|
|
317
|
-
k && /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
318
|
-
|
|
317
|
+
k && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
318
|
+
style: {
|
|
319
|
+
paddingLeft: u || y ? 8 : 0
|
|
320
|
+
},
|
|
319
321
|
className: _listcssmistica.center,
|
|
320
322
|
children: k
|
|
321
323
|
})
|
|
@@ -323,31 +325,31 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
323
325
|
})
|
|
324
326
|
]
|
|
325
327
|
});
|
|
326
|
-
},
|
|
328
|
+
}, Ge = (param)=>{
|
|
327
329
|
let { value: e, defaultValue: a, onChange: r } = param;
|
|
328
|
-
const
|
|
330
|
+
const o = e !== void 0, [d, x] = _react.useState(!!a);
|
|
329
331
|
return [
|
|
330
|
-
|
|
332
|
+
o ? !!e : d,
|
|
331
333
|
()=>{
|
|
332
|
-
|
|
334
|
+
o || x(!d), r == null || r(o ? !e : !d);
|
|
333
335
|
}
|
|
334
336
|
];
|
|
335
|
-
},
|
|
337
|
+
}, Je = (e)=>[
|
|
336
338
|
"switch",
|
|
337
339
|
"checkbox",
|
|
338
340
|
"radioValue",
|
|
339
341
|
"iconButton"
|
|
340
342
|
].some((a)=>e[a] !== void 0), le = /*#__PURE__*/ _react.forwardRef((e, a)=>{
|
|
341
343
|
var p, ee;
|
|
342
|
-
const r = _react.useId(),
|
|
344
|
+
const r = _react.useId(), o = (0, _themevariantcontext.useIsInverseOrMediaVariant)(), { asset: d, headline: x, title: g, titleAs: v, titleLinesMax: D, subtitle: w, subtitleLinesMax: M, description: u, descriptionLinesMax: E, detail: T, danger: N, badge: y, role: f, extra: L, withChevron: O, dataAttributes: c, right: k, "aria-label": A } = e, [U, S] = _react.useState(""), [de, ce] = _react.useState(""), [se, he] = _react.useState(""), ue = [
|
|
343
345
|
g,
|
|
344
|
-
|
|
346
|
+
U,
|
|
345
347
|
w,
|
|
346
|
-
|
|
348
|
+
u,
|
|
347
349
|
de,
|
|
348
350
|
T,
|
|
349
351
|
se
|
|
350
|
-
].filter(Boolean).join(" "), B = A !== null && A !== void 0 ? A : e.href || e.to ? ue : void 0, me = (0, _radiobutton.useRadioContext)(), b = e.disabled || e.radioValue !== void 0 && me.disabled,
|
|
352
|
+
].filter(Boolean).join(" "), B = A !== null && A !== void 0 ? A : e.href || e.to ? ue : void 0, me = (0, _radiobutton.useRadioContext)(), b = e.disabled || e.radioValue !== void 0 && me.disabled, W = !b && !o, j = !b && o, Y = Je(e), V = !!e.onPress || !!e.href || !!e.to, fe = Y ? !1 : O !== null && O !== void 0 ? O : V, Z = {
|
|
351
353
|
href: e.href,
|
|
352
354
|
newTab: e.newTab,
|
|
353
355
|
loadOnTop: e.loadOnTop,
|
|
@@ -357,19 +359,19 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
357
359
|
onNavigate: e.onNavigate,
|
|
358
360
|
onPress: e.onPress,
|
|
359
361
|
trackingEvent: e.trackingEvent
|
|
360
|
-
}, [_, $] =
|
|
361
|
-
asset:
|
|
362
|
-
headline:
|
|
362
|
+
}, [_, $] = Ge(e.switch || e.checkbox || {}), R = (n)=>/* @__PURE__ */ (0, _jsxruntime.jsx)(ze, {
|
|
363
|
+
asset: d,
|
|
364
|
+
headline: x,
|
|
363
365
|
headlineRef: (i)=>{
|
|
364
366
|
i && S(i.textContent || "");
|
|
365
367
|
},
|
|
366
368
|
title: g,
|
|
367
|
-
titleAs:
|
|
369
|
+
titleAs: v,
|
|
368
370
|
subtitle: w,
|
|
369
|
-
description:
|
|
371
|
+
description: u,
|
|
370
372
|
badge: y,
|
|
371
|
-
titleLinesMax:
|
|
372
|
-
subtitleLinesMax:
|
|
373
|
+
titleLinesMax: D,
|
|
374
|
+
subtitleLinesMax: M,
|
|
373
375
|
descriptionLinesMax: E,
|
|
374
376
|
detail: T,
|
|
375
377
|
danger: N,
|
|
@@ -386,16 +388,16 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
386
388
|
disabled: b,
|
|
387
389
|
withChevron: fe
|
|
388
390
|
});
|
|
389
|
-
if (V && !
|
|
391
|
+
if (V && !Y) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
|
|
390
392
|
ref: a,
|
|
391
393
|
className: (0, _classnames.default)(_listcssmistica.rowContent, {
|
|
392
|
-
[_listcssmistica.touchableBackground]:
|
|
393
|
-
[_listcssmistica.touchableBackgroundInverse]:
|
|
394
|
+
[_listcssmistica.touchableBackground]: W,
|
|
395
|
+
[_listcssmistica.touchableBackgroundInverse]: j,
|
|
394
396
|
[_listcssmistica.pointer]: !b
|
|
395
397
|
})
|
|
396
398
|
}, Z), {
|
|
397
399
|
role: f,
|
|
398
|
-
dataAttributes:
|
|
400
|
+
dataAttributes: c,
|
|
399
401
|
disabled: b,
|
|
400
402
|
"aria-label": B,
|
|
401
403
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
@@ -404,18 +406,18 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
404
406
|
children: R()
|
|
405
407
|
})
|
|
406
408
|
}));
|
|
407
|
-
const
|
|
409
|
+
const H = (n)=>/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", _object_spread_props(_object_spread({
|
|
408
410
|
className: _listcssmistica.dualActionContainer,
|
|
409
411
|
ref: a
|
|
410
|
-
}, (0, _dom.getPrefixedDataAttributes)(
|
|
412
|
+
}, (0, _dom.getPrefixedDataAttributes)(c)), {
|
|
411
413
|
children: [
|
|
412
414
|
/* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
|
|
413
415
|
disabled: b
|
|
414
416
|
}, Z), {
|
|
415
417
|
role: f,
|
|
416
418
|
className: (0, _classnames.default)(_listcssmistica.dualActionLeft, {
|
|
417
|
-
[_listcssmistica.touchableBackground]:
|
|
418
|
-
[_listcssmistica.touchableBackgroundInverse]:
|
|
419
|
+
[_listcssmistica.touchableBackground]: W,
|
|
420
|
+
[_listcssmistica.touchableBackgroundInverse]: j
|
|
419
421
|
}),
|
|
420
422
|
"aria-label": B,
|
|
421
423
|
children: R({
|
|
@@ -427,20 +429,20 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
427
429
|
}),
|
|
428
430
|
n
|
|
429
431
|
]
|
|
430
|
-
})),
|
|
432
|
+
})), F = (n, i)=>/* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({
|
|
431
433
|
className: (0, _classnames.default)(_listcssmistica.rowContent, {
|
|
432
|
-
[_listcssmistica.touchableBackground]:
|
|
433
|
-
[_listcssmistica.touchableBackgroundInverse]:
|
|
434
|
+
[_listcssmistica.touchableBackground]: W && i,
|
|
435
|
+
[_listcssmistica.touchableBackgroundInverse]: j && i,
|
|
434
436
|
[_listcssmistica.pointer]: !b && i
|
|
435
437
|
}),
|
|
436
438
|
ref: a
|
|
437
|
-
}, (0, _dom.getPrefixedDataAttributes)(
|
|
439
|
+
}, (0, _dom.getPrefixedDataAttributes)(c)), {
|
|
438
440
|
children: n
|
|
439
441
|
}));
|
|
440
442
|
if (e.switch || e.checkbox) {
|
|
441
443
|
var _ref, _ref1;
|
|
442
444
|
const n = e.switch ? _switchcomponent.default : _checkbox.default, i = (_ref1 = (_ref = (p = e.switch) == null ? void 0 : p.name) !== null && _ref !== void 0 ? _ref : (ee = e.checkbox) == null ? void 0 : ee.name) !== null && _ref1 !== void 0 ? _ref1 : r;
|
|
443
|
-
return V ?
|
|
445
|
+
return V ? H(/* @__PURE__ */ (0, _jsxruntime.jsx)(n, {
|
|
444
446
|
disabled: b,
|
|
445
447
|
name: i,
|
|
446
448
|
checked: _,
|
|
@@ -448,13 +450,13 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
448
450
|
"aria-labelledby": r,
|
|
449
451
|
onChange: $,
|
|
450
452
|
render: (param)=>{
|
|
451
|
-
let { controlElement:
|
|
453
|
+
let { controlElement: q } = param;
|
|
452
454
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
453
455
|
className: _listcssmistica.dualActionRight,
|
|
454
|
-
children:
|
|
456
|
+
children: q
|
|
455
457
|
});
|
|
456
458
|
}
|
|
457
|
-
})) :
|
|
459
|
+
})) : F(/* @__PURE__ */ (0, _jsxruntime.jsx)(n, {
|
|
458
460
|
disabled: b,
|
|
459
461
|
name: i,
|
|
460
462
|
checked: _,
|
|
@@ -462,7 +464,7 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
462
464
|
"aria-labelledby": r,
|
|
463
465
|
onChange: $,
|
|
464
466
|
render: (param)=>{
|
|
465
|
-
let { controlElement:
|
|
467
|
+
let { controlElement: q, labelId: be } = param;
|
|
466
468
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
467
469
|
paddingX: 16,
|
|
468
470
|
role: f,
|
|
@@ -470,14 +472,14 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
470
472
|
labelId: be,
|
|
471
473
|
control: /* @__PURE__ */ (0, _jsxruntime.jsx)(_stack.default, {
|
|
472
474
|
space: "around",
|
|
473
|
-
children:
|
|
475
|
+
children: q
|
|
474
476
|
})
|
|
475
477
|
})
|
|
476
478
|
});
|
|
477
479
|
}
|
|
478
480
|
}), !0);
|
|
479
481
|
}
|
|
480
|
-
return e.radioValue ? V ?
|
|
482
|
+
return e.radioValue ? V ? H(/* @__PURE__ */ (0, _jsxruntime.jsx)(_radiobutton.default, {
|
|
481
483
|
value: e.radioValue,
|
|
482
484
|
"aria-label": B,
|
|
483
485
|
"aria-labelledby": r,
|
|
@@ -491,7 +493,7 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
491
493
|
})
|
|
492
494
|
});
|
|
493
495
|
}
|
|
494
|
-
})) :
|
|
496
|
+
})) : F(/* @__PURE__ */ (0, _jsxruntime.jsx)(_radiobutton.default, {
|
|
495
497
|
value: e.radioValue,
|
|
496
498
|
"aria-label": B,
|
|
497
499
|
"aria-labelledby": r,
|
|
@@ -509,7 +511,7 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
509
511
|
})
|
|
510
512
|
});
|
|
511
513
|
}
|
|
512
|
-
}), !0) : e.iconButton ? V ?
|
|
514
|
+
}), !0) : e.iconButton ? V ? H(/* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
513
515
|
padding: 16,
|
|
514
516
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_stack.default, {
|
|
515
517
|
space: "around",
|
|
@@ -519,7 +521,7 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
519
521
|
disabled: e.disabled
|
|
520
522
|
}))
|
|
521
523
|
})
|
|
522
|
-
})) :
|
|
524
|
+
})) : F(/* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
523
525
|
paddingX: 16,
|
|
524
526
|
children: R({
|
|
525
527
|
labelId: r,
|
|
@@ -534,15 +536,14 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
534
536
|
}))
|
|
535
537
|
})
|
|
536
538
|
})
|
|
537
|
-
})) : /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
dataAttributes: s,
|
|
539
|
+
})) : /* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({
|
|
540
|
+
className: (0, _classnames.default)(_listcssmistica.rowContent, _listcssmistica.rowContentPadding),
|
|
541
|
+
role: f
|
|
542
|
+
}, (0, _dom.getPrefixedDataAttributes)(c)), {
|
|
542
543
|
ref: a,
|
|
543
544
|
children: R()
|
|
544
|
-
});
|
|
545
|
-
}),
|
|
545
|
+
}));
|
|
546
|
+
}), ut = /*#__PURE__*/ _react.forwardRef((_param, o)=>{
|
|
546
547
|
var { dataAttributes: e, role: a = "listitem" } = _param, r = _object_without_properties(_param, [
|
|
547
548
|
"dataAttributes",
|
|
548
549
|
"role"
|
|
@@ -551,30 +552,30 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
551
552
|
role: a,
|
|
552
553
|
className: _listcssmistica.row,
|
|
553
554
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(le, _object_spread_props(_object_spread({}, r), {
|
|
554
|
-
ref:
|
|
555
|
+
ref: o,
|
|
555
556
|
dataAttributes: _object_spread({
|
|
556
557
|
"component-name": "Row"
|
|
557
558
|
}, e)
|
|
558
559
|
}))
|
|
559
560
|
});
|
|
560
|
-
}),
|
|
561
|
-
let { children: e, ariaLabelledby: a, role: r = "list", dataAttributes:
|
|
562
|
-
const
|
|
561
|
+
}), mt = (param)=>{
|
|
562
|
+
let { children: e, ariaLabelledby: a, role: r = "list", dataAttributes: o } = param;
|
|
563
|
+
const d = _react.Children.toArray(e).filter(Boolean), x = d.length - 1;
|
|
563
564
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({
|
|
564
565
|
role: r,
|
|
565
566
|
"aria-labelledby": a
|
|
566
|
-
}, (0, _dom.getPrefixedDataAttributes)(
|
|
567
|
-
children:
|
|
567
|
+
}, (0, _dom.getPrefixedDataAttributes)(o, "RowList")), {
|
|
568
|
+
children: d.map((g, v)=>/* @__PURE__ */ (0, _jsxruntime.jsxs)(_react.Fragment, {
|
|
568
569
|
children: [
|
|
569
570
|
g,
|
|
570
|
-
|
|
571
|
+
v < x && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
571
572
|
paddingX: 16,
|
|
572
573
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_divider.default, {})
|
|
573
574
|
})
|
|
574
575
|
]
|
|
575
|
-
},
|
|
576
|
+
}, v))
|
|
576
577
|
}));
|
|
577
|
-
},
|
|
578
|
+
}, ft = /*#__PURE__*/ _react.forwardRef((_param, r)=>{
|
|
578
579
|
var { dataAttributes: e } = _param, a = _object_without_properties(_param, [
|
|
579
580
|
"dataAttributes"
|
|
580
581
|
]);
|
|
@@ -586,15 +587,15 @@ const He = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
586
587
|
}, e),
|
|
587
588
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(le, _object_spread({}, a))
|
|
588
589
|
});
|
|
589
|
-
}),
|
|
590
|
-
let { children: e, ariaLabelledby: a, role: r = "list", dataAttributes:
|
|
590
|
+
}), bt = (param)=>{
|
|
591
|
+
let { children: e, ariaLabelledby: a, role: r = "list", dataAttributes: o } = param;
|
|
591
592
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_stack.default, {
|
|
592
593
|
space: 16,
|
|
593
594
|
role: r,
|
|
594
595
|
"aria-labelledby": a,
|
|
595
596
|
dataAttributes: _object_spread({
|
|
596
597
|
"component-name": "BoxedRowList"
|
|
597
|
-
},
|
|
598
|
+
}, o),
|
|
598
599
|
children: e
|
|
599
600
|
});
|
|
600
601
|
};
|
package/dist/menu.css-mistica.js
CHANGED
|
@@ -10,22 +10,22 @@ function _export(target, all) {
|
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
12
|
iconContainer: function() {
|
|
13
|
-
return
|
|
13
|
+
return e;
|
|
14
14
|
},
|
|
15
15
|
itemContent: function() {
|
|
16
|
-
return
|
|
16
|
+
return n;
|
|
17
17
|
},
|
|
18
18
|
menuContainer: function() {
|
|
19
|
-
return
|
|
19
|
+
return r;
|
|
20
20
|
},
|
|
21
21
|
menuItem: function() {
|
|
22
|
-
return
|
|
22
|
+
return _;
|
|
23
23
|
},
|
|
24
24
|
menuItemDisabled: function() {
|
|
25
|
-
return
|
|
25
|
+
return a;
|
|
26
26
|
},
|
|
27
27
|
menuItemEnabled: function() {
|
|
28
|
-
return
|
|
28
|
+
return t;
|
|
29
29
|
},
|
|
30
30
|
menuItemHovered: function() {
|
|
31
31
|
return u;
|
|
@@ -37,17 +37,17 @@ _export(exports, {
|
|
|
37
37
|
return m;
|
|
38
38
|
},
|
|
39
39
|
vars: function() {
|
|
40
|
-
return
|
|
40
|
+
return f;
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
require("./sprinkles.css.ts.vanilla.css-mistica.js");
|
|
44
44
|
require("./menu.css.ts.vanilla.css-mistica.js");
|
|
45
|
-
var
|
|
45
|
+
var e = "_2k0k3uk", n = "_2k0k3uj", r = "_2k0k3u8 _1y2v1nf7m _1y2v1nf8v _1y2v1nfa4 _1y2v1nfbd _1y2v1nf3q _1y2v1nfkd _1y2v1nfhk _1y2v1nfhq _1y2v1nfhf", _ = "_2k0k3ud", a = "_2k0k3ug", t = "_2k0k3uf", u = "_2k0k3ue", i = "_2k0k3ui _1y2v1nf7m _1y2v1nf8v", m = {
|
|
46
46
|
enter: "_2k0k3u9",
|
|
47
47
|
enterActive: "_2k0k3ua",
|
|
48
48
|
exit: "_2k0k3ub",
|
|
49
49
|
exitActive: "_2k0k3uc"
|
|
50
|
-
},
|
|
50
|
+
}, f = {
|
|
51
51
|
top: "var(--_2k0k3u0)",
|
|
52
52
|
bottom: "var(--_2k0k3u1)",
|
|
53
53
|
left: "var(--_2k0k3u2)",
|
package/dist/menu.js
CHANGED
|
@@ -143,9 +143,9 @@ const ke = 120, Q = /*#__PURE__*/ _react.createContext({
|
|
|
143
143
|
isMenuOpen: !1,
|
|
144
144
|
setFocusedItem: ()=>{},
|
|
145
145
|
closeMenu: ()=>{}
|
|
146
|
-
}), Ne = ()=>_react.useContext(Q),
|
|
146
|
+
}), Ne = ()=>_react.useContext(Q), y = (r)=>r ? Array.from(r.querySelectorAll("[role=menuitem],[role=menuitemcheckbox]")) : [], Re = (r, f)=>{
|
|
147
147
|
if (!f) return null;
|
|
148
|
-
const d =
|
|
148
|
+
const d = y(r).indexOf(f);
|
|
149
149
|
return d < 0 ? null : d;
|
|
150
150
|
}, qe = (param)=>{
|
|
151
151
|
let { label: r, Icon: f, destructive: d, disabled: u, onPress: C, controlType: s, checked: p } = param;
|
|
@@ -236,8 +236,7 @@ const ke = 120, Q = /*#__PURE__*/ _react.createContext({
|
|
|
236
236
|
return r ? /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
237
237
|
children: [
|
|
238
238
|
r,
|
|
239
|
-
/* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
240
|
-
paddingY: 8,
|
|
239
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
241
240
|
className: _menucssmistica.menuSectionDivider,
|
|
242
241
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_divider.default, {})
|
|
243
242
|
})
|
|
@@ -249,20 +248,20 @@ const ke = 120, Q = /*#__PURE__*/ _react.createContext({
|
|
|
249
248
|
_react.useEffect(()=>{
|
|
250
249
|
const a = n == null ? void 0 : n.getBoundingClientRect();
|
|
251
250
|
if (!i || !a || !s) return;
|
|
252
|
-
const { top: t, right: O, left: g, bottom: A } = a, T = i.scrollHeight, I = u === "left" ? g : void 0, F = u === "right" ? R.width - O : void 0, L = t - J, $ = A + J,
|
|
251
|
+
const { top: t, right: O, left: g, bottom: A } = a, T = i.scrollHeight, I = u === "left" ? g : void 0, F = u === "right" ? R.width - O : void 0, L = t - J, $ = A + J, D = R.height - $ - V, H = L - V, B = D > T, z = H > T, te = B || !z && D > H;
|
|
253
252
|
N(te ? {
|
|
254
253
|
left: I,
|
|
255
254
|
right: F,
|
|
256
255
|
top: `${$}px`,
|
|
257
256
|
bottom: "auto",
|
|
258
|
-
maxHeight: B ? void 0 :
|
|
257
|
+
maxHeight: B ? void 0 : D,
|
|
259
258
|
transformOrigin: "center top"
|
|
260
259
|
} : {
|
|
261
260
|
left: I,
|
|
262
261
|
right: F,
|
|
263
262
|
top: "auto",
|
|
264
263
|
bottom: `${R.height - L}px`,
|
|
265
|
-
maxHeight: z ? void 0 :
|
|
264
|
+
maxHeight: z ? void 0 : H,
|
|
266
265
|
transformOrigin: "center bottom"
|
|
267
266
|
});
|
|
268
267
|
}, [
|
|
@@ -286,13 +285,13 @@ const ke = 120, Q = /*#__PURE__*/ _react.createContext({
|
|
|
286
285
|
className: _menucssmistica.menuContainer,
|
|
287
286
|
close: ()=>p(!1)
|
|
288
287
|
}, w = _react.useCallback(()=>{
|
|
289
|
-
const t =
|
|
288
|
+
const t = y(i).findIndex((O)=>!O.getAttribute("aria-disabled"));
|
|
290
289
|
h(t < 0 ? null : t);
|
|
291
290
|
}, [
|
|
292
291
|
i
|
|
293
292
|
]), _ = _react.useCallback((a)=>{
|
|
294
293
|
var T;
|
|
295
|
-
const t =
|
|
294
|
+
const t = y(i);
|
|
296
295
|
a && t.reverse();
|
|
297
296
|
const O = c === null ? -1 : a ? t.length - 1 - c : c;
|
|
298
297
|
let g = t.findIndex((I, F)=>!I.getAttribute("aria-disabled") && F > O);
|
|
@@ -326,7 +325,7 @@ const ke = 120, Q = /*#__PURE__*/ _react.createContext({
|
|
|
326
325
|
break;
|
|
327
326
|
case _keys.SPACE:
|
|
328
327
|
case _keys.ENTER:
|
|
329
|
-
(0, _dom.cancelEvent)(t), c !== null &&
|
|
328
|
+
(0, _dom.cancelEvent)(t), c !== null && y(i)[c].click();
|
|
330
329
|
break;
|
|
331
330
|
case _keys.TAB:
|
|
332
331
|
(0, _dom.cancelEvent)(t);
|
package/dist/package-version.js
CHANGED
package/dist/sheet-common.js
CHANGED
|
@@ -11,7 +11,7 @@ function _export(target, all) {
|
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
13
|
SheetBody: function() {
|
|
14
|
-
return
|
|
14
|
+
return we;
|
|
15
15
|
},
|
|
16
16
|
default: function() {
|
|
17
17
|
return Ae;
|
|
@@ -284,6 +284,7 @@ const ce = process.env.NODE_ENV === "test" ? 0 : _sheetcommoncssmistica.transiti
|
|
|
284
284
|
style: {
|
|
285
285
|
paddingBottom: _css.safeAreaInsetBottom
|
|
286
286
|
},
|
|
287
|
+
tabIndex: -1,
|
|
287
288
|
children: [
|
|
288
289
|
typeof o == "function" ? o({
|
|
289
290
|
closeModal: s,
|
|
@@ -313,7 +314,7 @@ const ce = process.env.NODE_ENV === "test" ? 0 : _sheetcommoncssmistica.transiti
|
|
|
313
314
|
mobile: _responsivelayoutcssmistica.MOBILE_SIDE_MARGIN,
|
|
314
315
|
tablet: _responsivelayoutcssmistica.TABLET_SIDE_MARGIN,
|
|
315
316
|
desktop: _responsivelayoutcssmistica.SMALL_DESKTOP_SIDE_MARGIN
|
|
316
|
-
},
|
|
317
|
+
}, we = (param)=>{
|
|
317
318
|
let { title: n, subtitle: o, description: i, modalTitleId: l, button: m, secondaryButton: v, link: r, children: c } = param;
|
|
318
319
|
const d = _react.useRef(null), a = _react.useRef(null), f = _react.useRef(null);
|
|
319
320
|
_react.useEffect(()=>{
|