@telefonica/mistica 14.28.1 → 14.29.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/accordion.d.ts +3 -0
- package/dist/accordion.js +71 -70
- package/dist/button-layout.css-mistica.js +11 -19
- package/dist/button-layout.css.d.ts +1 -5
- package/dist/button-layout.js +19 -90
- package/dist/button.css-mistica.js +18 -21
- package/dist/counter.css-mistica.js +48 -0
- package/dist/counter.css.d.ts +11 -0
- package/dist/counter.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/counter.d.ts +19 -0
- package/dist/counter.js +240 -0
- package/dist/generated/mistica-icons/icon-add-more-filled.js +1 -1
- package/dist/generated/mistica-icons/icon-add-more-light.js +1 -1
- package/dist/generated/mistica-icons/icon-add-more-regular.js +2 -2
- package/dist/generated/mistica-icons/icon-subtract-filled.d.ts +4 -0
- package/dist/generated/mistica-icons/icon-subtract-light.js +21 -10
- package/dist/generated/mistica-icons/icon-subtract-regular.js +29 -8
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/dist/list.d.ts +3 -0
- package/dist/list.js +92 -92
- package/dist/loading-bar.js +5 -4
- package/dist/menu.js +11 -10
- package/dist/navigation-bar.js +27 -26
- package/dist/package-version.js +1 -1
- package/dist/snackbar.css-mistica.js +16 -13
- package/dist/snackbar.css.d.ts +3 -2
- package/dist/snackbar.d.ts +5 -1
- package/dist/snackbar.js +119 -64
- package/dist/theme.d.ts +6 -0
- package/dist/theme.js +52 -28
- package/dist-es/accordion.js +79 -78
- package/dist-es/button-layout.css-mistica.js +4 -6
- package/dist-es/button-layout.js +27 -98
- package/dist-es/button.css-mistica.js +3 -3
- package/dist-es/counter.css-mistica.js +4 -0
- package/dist-es/counter.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/counter.js +187 -0
- package/dist-es/generated/mistica-icons/icon-add-more-filled.js +1 -1
- package/dist-es/generated/mistica-icons/icon-add-more-light.js +1 -1
- package/dist-es/generated/mistica-icons/icon-add-more-regular.js +2 -2
- package/dist-es/generated/mistica-icons/icon-subtract-light.js +24 -13
- package/dist-es/generated/mistica-icons/icon-subtract-regular.js +33 -12
- package/dist-es/index.js +1765 -1764
- package/dist-es/list.js +125 -125
- package/dist-es/loading-bar.js +12 -11
- package/dist-es/menu.js +9 -8
- package/dist-es/navigation-bar.js +26 -25
- package/dist-es/package-version.js +1 -1
- package/dist-es/snackbar.css-mistica.js +5 -2
- package/dist-es/snackbar.js +140 -85
- package/dist-es/style.css +1 -1
- package/dist-es/theme.js +56 -32
- package/package.json +1 -1
package/dist/list.js
CHANGED
|
@@ -177,21 +177,21 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
177
177
|
},
|
|
178
178
|
children: e
|
|
179
179
|
}) : e, ye = (param)=>{
|
|
180
|
-
let { withChevron: e , headline: n , title: r , titleLinesMax: o , subtitle:
|
|
181
|
-
const
|
|
180
|
+
let { withChevron: e , headline: n , title: r , titleLinesMax: o , subtitle: s , subtitleLinesMax: x , description: d , descriptionLinesMax: W , detail: m , asset: V , type: g = "basic" , badge: A , right: E , extra: X , labelId: l , disabled: v } = param;
|
|
181
|
+
const h = (0, _themevariantcontext.useIsInverseVariant)(), a = [
|
|
182
182
|
n,
|
|
183
183
|
r,
|
|
184
|
+
s,
|
|
184
185
|
d,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
].filter(Boolean).length === 1, f = ()=>T ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
186
|
+
X
|
|
187
|
+
].filter(Boolean).length === 1, f = ()=>A ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
188
188
|
paddingLeft: 16,
|
|
189
189
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
190
190
|
className: (0, _classnames.default)(_listcssmistica.center, _listcssmistica.badge, {
|
|
191
191
|
[_listcssmistica.disabled]: v
|
|
192
192
|
}),
|
|
193
|
-
children:
|
|
194
|
-
value:
|
|
193
|
+
children: A === !0 ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_badge.default, {}) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_badge.default, {
|
|
194
|
+
value: A
|
|
195
195
|
})
|
|
196
196
|
})
|
|
197
197
|
}) : null;
|
|
@@ -199,15 +199,15 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
199
199
|
paddingY: 16,
|
|
200
200
|
className: _listcssmistica.content,
|
|
201
201
|
children: [
|
|
202
|
-
|
|
202
|
+
V && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
203
203
|
paddingRight: 16,
|
|
204
204
|
className: (0, _classnames.default)({
|
|
205
|
-
[_listcssmistica.center]:
|
|
205
|
+
[_listcssmistica.center]: a,
|
|
206
206
|
[_listcssmistica.disabled]: v
|
|
207
207
|
}),
|
|
208
208
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
209
209
|
className: _listcssmistica.asset,
|
|
210
|
-
children:
|
|
210
|
+
children: V
|
|
211
211
|
})
|
|
212
212
|
}),
|
|
213
213
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
@@ -215,7 +215,7 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
215
215
|
[_listcssmistica.disabled]: v
|
|
216
216
|
}),
|
|
217
217
|
style: {
|
|
218
|
-
justifyContent:
|
|
218
|
+
justifyContent: a ? "center" : "flex-start"
|
|
219
219
|
},
|
|
220
220
|
children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_stack.default, {
|
|
221
221
|
space: 4,
|
|
@@ -233,25 +233,25 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
233
233
|
regular: !0,
|
|
234
234
|
color: _skincontractcssmistica.vars.colors.textPrimary,
|
|
235
235
|
truncate: o,
|
|
236
|
-
id:
|
|
236
|
+
id: l,
|
|
237
237
|
hyphens: "auto",
|
|
238
238
|
children: r
|
|
239
239
|
}),
|
|
240
|
-
|
|
240
|
+
s && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
241
241
|
regular: !0,
|
|
242
242
|
color: _skincontractcssmistica.vars.colors.textSecondary,
|
|
243
243
|
truncate: x,
|
|
244
244
|
hyphens: "auto",
|
|
245
|
-
children:
|
|
245
|
+
children: s
|
|
246
246
|
}),
|
|
247
|
-
|
|
247
|
+
d && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
248
248
|
regular: !0,
|
|
249
249
|
color: _skincontractcssmistica.vars.colors.textSecondary,
|
|
250
|
-
truncate:
|
|
250
|
+
truncate: W,
|
|
251
251
|
hyphens: "auto",
|
|
252
|
-
children:
|
|
252
|
+
children: d
|
|
253
253
|
}),
|
|
254
|
-
|
|
254
|
+
X
|
|
255
255
|
]
|
|
256
256
|
})
|
|
257
257
|
]
|
|
@@ -260,11 +260,11 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
260
260
|
f(),
|
|
261
261
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
262
262
|
className: (0, _classnames.default)({
|
|
263
|
-
[_listcssmistica.right]: !!
|
|
264
|
-
[_listcssmistica.rightRestrictedWidth]: !!
|
|
263
|
+
[_listcssmistica.right]: !!m || g !== "basic",
|
|
264
|
+
[_listcssmistica.rightRestrictedWidth]: !!m
|
|
265
265
|
}),
|
|
266
266
|
children: [
|
|
267
|
-
|
|
267
|
+
m && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
268
268
|
className: (0, _classnames.default)(_listcssmistica.center, _listcssmistica.detail, {
|
|
269
269
|
[_listcssmistica.disabled]: v
|
|
270
270
|
}),
|
|
@@ -272,29 +272,29 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
272
272
|
regular: !0,
|
|
273
273
|
color: _skincontractcssmistica.vars.colors.textSecondary,
|
|
274
274
|
hyphens: "auto",
|
|
275
|
-
children:
|
|
275
|
+
children: m
|
|
276
276
|
})
|
|
277
277
|
}),
|
|
278
278
|
g === "control" && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
279
279
|
className: (0, _classnames.default)({
|
|
280
|
-
[_listcssmistica.detailRight]: !!
|
|
280
|
+
[_listcssmistica.detailRight]: !!m
|
|
281
281
|
}),
|
|
282
|
-
children: $(
|
|
282
|
+
children: $(E, a)
|
|
283
283
|
}),
|
|
284
284
|
g === "custom" && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
285
285
|
className: (0, _classnames.default)({
|
|
286
|
-
[_listcssmistica.detailRight]: !!
|
|
286
|
+
[_listcssmistica.detailRight]: !!m,
|
|
287
287
|
[_listcssmistica.disabled]: v
|
|
288
288
|
}),
|
|
289
|
-
children: $(
|
|
289
|
+
children: $(E, a)
|
|
290
290
|
}),
|
|
291
291
|
(g === "chevron" || g === "custom" && e) && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
292
|
-
paddingLeft:
|
|
292
|
+
paddingLeft: m || g === "custom" ? 4 : 0,
|
|
293
293
|
className: (0, _classnames.default)(_listcssmistica.center, {
|
|
294
294
|
[_listcssmistica.disabled]: v
|
|
295
295
|
}),
|
|
296
296
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconchevron.default, {
|
|
297
|
-
color:
|
|
297
|
+
color: h ? _skincontractcssmistica.vars.colors.inverse : _skincontractcssmistica.vars.colors.neutralMedium,
|
|
298
298
|
direction: "right"
|
|
299
299
|
})
|
|
300
300
|
})
|
|
@@ -304,45 +304,45 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
304
304
|
});
|
|
305
305
|
}, Re = (param)=>{
|
|
306
306
|
let { value: e , defaultValue: n , onChange: r } = param;
|
|
307
|
-
const o = e !== void 0, [
|
|
308
|
-
o || x(!
|
|
307
|
+
const o = e !== void 0, [s, x] = _react.useState(!!n), d = ()=>{
|
|
308
|
+
o || x(!s), r && r(o ? !e : !s);
|
|
309
309
|
};
|
|
310
310
|
return o ? [
|
|
311
311
|
!!e,
|
|
312
|
-
|
|
312
|
+
d
|
|
313
313
|
] : [
|
|
314
|
-
|
|
315
|
-
|
|
314
|
+
s,
|
|
315
|
+
d
|
|
316
316
|
];
|
|
317
317
|
}, Ce = (e)=>e.switch !== void 0, Ne = (e)=>e.checkbox !== void 0, ke = (e)=>e.radioValue !== void 0, ee = /*#__PURE__*/ _react.forwardRef((e, n)=>{
|
|
318
|
-
const r = (0, _hooks.useAriaId)(), o = (0, _themevariantcontext.useIsInverseVariant)(), { asset:
|
|
319
|
-
let { type:
|
|
318
|
+
const r = (0, _hooks.useAriaId)(), o = (0, _themevariantcontext.useIsInverseVariant)(), { asset: s , headline: x , title: d , titleLinesMax: W , subtitle: m , subtitleLinesMax: V , description: g , descriptionLinesMax: A , detail: E , badge: X , role: l , extra: v , dataAttributes: h } = e, F = (0, _radiobutton.useRadioContext)(), a = e.disabled || e.radioValue !== void 0 && F.disabled, f = !a && !o, w = !a && o, [Y, q] = Re(e.switch || e.checkbox || {}), y = (param)=>/* @__PURE__ */ {
|
|
319
|
+
let { type: c , right: b , labelId: D } = param;
|
|
320
320
|
return (0, _jsxruntime.jsx)(ye, {
|
|
321
|
-
asset:
|
|
321
|
+
asset: s,
|
|
322
322
|
headline: x,
|
|
323
|
-
title:
|
|
324
|
-
subtitle:
|
|
323
|
+
title: d,
|
|
324
|
+
subtitle: m,
|
|
325
325
|
description: g,
|
|
326
|
-
badge:
|
|
327
|
-
titleLinesMax:
|
|
328
|
-
subtitleLinesMax:
|
|
329
|
-
descriptionLinesMax:
|
|
330
|
-
detail:
|
|
331
|
-
type:
|
|
326
|
+
badge: X,
|
|
327
|
+
titleLinesMax: W,
|
|
328
|
+
subtitleLinesMax: V,
|
|
329
|
+
descriptionLinesMax: A,
|
|
330
|
+
detail: E,
|
|
331
|
+
type: c,
|
|
332
332
|
right: b,
|
|
333
333
|
extra: v,
|
|
334
|
-
labelId:
|
|
335
|
-
disabled:
|
|
334
|
+
labelId: D,
|
|
335
|
+
disabled: a,
|
|
336
336
|
withChevron: !!e.onPress || !!e.href || !!e.to
|
|
337
337
|
});
|
|
338
|
-
}, j = (
|
|
338
|
+
}, j = (c)=>{
|
|
339
339
|
let b = "chevron";
|
|
340
|
-
return
|
|
340
|
+
return c.right === null && (b = "basic"), c.right && (b = "custom"), /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
341
341
|
paddingX: 16,
|
|
342
342
|
ref: n,
|
|
343
343
|
children: y({
|
|
344
344
|
type: b,
|
|
345
|
-
right:
|
|
345
|
+
right: c.right
|
|
346
346
|
})
|
|
347
347
|
});
|
|
348
348
|
};
|
|
@@ -351,55 +351,55 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
351
351
|
className: (0, _classnames.default)(_listcssmistica.rowContent, {
|
|
352
352
|
[_listcssmistica.touchableBackground]: f,
|
|
353
353
|
[_listcssmistica.touchableBackgroundInverse]: w,
|
|
354
|
-
[_listcssmistica.pointer]: !
|
|
354
|
+
[_listcssmistica.pointer]: !a
|
|
355
355
|
}),
|
|
356
356
|
trackingEvent: e.trackingEvent,
|
|
357
357
|
onPress: e.onPress,
|
|
358
|
-
role:
|
|
359
|
-
dataAttributes:
|
|
360
|
-
disabled:
|
|
358
|
+
role: l,
|
|
359
|
+
dataAttributes: h,
|
|
360
|
+
disabled: a,
|
|
361
361
|
children: j(e)
|
|
362
362
|
});
|
|
363
363
|
if (e.to) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, {
|
|
364
364
|
className: (0, _classnames.default)(_listcssmistica.rowContent, {
|
|
365
365
|
[_listcssmistica.touchableBackground]: f,
|
|
366
366
|
[_listcssmistica.touchableBackgroundInverse]: w,
|
|
367
|
-
[_listcssmistica.pointer]: !
|
|
367
|
+
[_listcssmistica.pointer]: !a
|
|
368
368
|
}),
|
|
369
369
|
trackingEvent: e.trackingEvent,
|
|
370
370
|
to: e.to,
|
|
371
371
|
fullPageOnWebView: e.fullPageOnWebView,
|
|
372
|
-
role:
|
|
373
|
-
dataAttributes:
|
|
374
|
-
disabled:
|
|
372
|
+
role: l,
|
|
373
|
+
dataAttributes: h,
|
|
374
|
+
disabled: a,
|
|
375
375
|
children: j(e)
|
|
376
376
|
});
|
|
377
377
|
if (e.href) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, {
|
|
378
378
|
className: (0, _classnames.default)(_listcssmistica.rowContent, {
|
|
379
379
|
[_listcssmistica.touchableBackground]: f,
|
|
380
380
|
[_listcssmistica.touchableBackgroundInverse]: w,
|
|
381
|
-
[_listcssmistica.pointer]: !
|
|
381
|
+
[_listcssmistica.pointer]: !a
|
|
382
382
|
}),
|
|
383
383
|
trackingEvent: e.trackingEvent,
|
|
384
384
|
href: e.href,
|
|
385
385
|
newTab: e.newTab,
|
|
386
|
-
role:
|
|
387
|
-
dataAttributes:
|
|
388
|
-
disabled:
|
|
386
|
+
role: l,
|
|
387
|
+
dataAttributes: h,
|
|
388
|
+
disabled: a,
|
|
389
389
|
children: j(e)
|
|
390
390
|
});
|
|
391
|
-
const z = (
|
|
392
|
-
var
|
|
391
|
+
const z = (c)=>{
|
|
392
|
+
var D, G;
|
|
393
393
|
var _ref, _ref1;
|
|
394
|
-
const b = (_ref1 = (_ref = (
|
|
394
|
+
const b = (_ref1 = (_ref = (D = e.switch) == null ? void 0 : D.name) !== null && _ref !== void 0 ? _ref : (G = e.checkbox) == null ? void 0 : G.name) !== null && _ref1 !== void 0 ? _ref1 : r;
|
|
395
395
|
return e.onPress ? /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
396
396
|
className: _listcssmistica.dualActionContainer,
|
|
397
397
|
children: [
|
|
398
398
|
/* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, {
|
|
399
|
-
dataAttributes:
|
|
400
|
-
disabled:
|
|
399
|
+
dataAttributes: h,
|
|
400
|
+
disabled: a,
|
|
401
401
|
onPress: e.onPress,
|
|
402
|
-
role:
|
|
402
|
+
role: l,
|
|
403
403
|
className: (0, _classnames.default)(_listcssmistica.dualActionLeft, {
|
|
404
404
|
[_listcssmistica.touchableBackground]: f,
|
|
405
405
|
[_listcssmistica.touchableBackgroundInverse]: w
|
|
@@ -412,8 +412,8 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
412
412
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
413
413
|
className: _listcssmistica.dualActionDivider
|
|
414
414
|
}),
|
|
415
|
-
/* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
416
|
-
disabled:
|
|
415
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)(c, {
|
|
416
|
+
disabled: a,
|
|
417
417
|
name: b,
|
|
418
418
|
checked: Y,
|
|
419
419
|
"aria-labelledby": r,
|
|
@@ -431,11 +431,11 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
431
431
|
className: (0, _classnames.default)(_listcssmistica.rowContent, {
|
|
432
432
|
[_listcssmistica.touchableBackground]: f,
|
|
433
433
|
[_listcssmistica.touchableBackgroundInverse]: w,
|
|
434
|
-
[_listcssmistica.pointer]: !
|
|
434
|
+
[_listcssmistica.pointer]: !a
|
|
435
435
|
}),
|
|
436
|
-
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
437
|
-
disabled:
|
|
438
|
-
dataAttributes:
|
|
436
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(c, {
|
|
437
|
+
disabled: a,
|
|
438
|
+
dataAttributes: h,
|
|
439
439
|
name: b,
|
|
440
440
|
checked: Y,
|
|
441
441
|
onChange: q,
|
|
@@ -443,7 +443,7 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
443
443
|
let { controlElement: H , labelId: te } = param;
|
|
444
444
|
return (0, _jsxruntime.jsx)(_box.default, {
|
|
445
445
|
paddingX: 16,
|
|
446
|
-
role:
|
|
446
|
+
role: l,
|
|
447
447
|
children: y({
|
|
448
448
|
labelId: te,
|
|
449
449
|
type: "control",
|
|
@@ -461,9 +461,9 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
461
461
|
className: _listcssmistica.dualActionContainer,
|
|
462
462
|
children: [
|
|
463
463
|
/* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, {
|
|
464
|
-
disabled:
|
|
464
|
+
disabled: a,
|
|
465
465
|
onPress: e.onPress,
|
|
466
|
-
role:
|
|
466
|
+
role: l,
|
|
467
467
|
className: (0, _classnames.default)(_listcssmistica.dualActionLeft, {
|
|
468
468
|
[_listcssmistica.touchableBackground]: f,
|
|
469
469
|
[_listcssmistica.touchableBackgroundInverse]: w
|
|
@@ -477,16 +477,16 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
477
477
|
className: _listcssmistica.dualActionDivider
|
|
478
478
|
}),
|
|
479
479
|
/* @__PURE__ */ (0, _jsxruntime.jsx)(_radiobutton.default, {
|
|
480
|
-
dataAttributes:
|
|
480
|
+
dataAttributes: h,
|
|
481
481
|
value: e.radioValue,
|
|
482
482
|
"aria-labelledby": r,
|
|
483
483
|
render: (param)=>/* @__PURE__ */ {
|
|
484
|
-
let { controlElement:
|
|
484
|
+
let { controlElement: c } = param;
|
|
485
485
|
return (0, _jsxruntime.jsx)(_stack.default, {
|
|
486
486
|
space: "around",
|
|
487
487
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
488
488
|
paddingX: 16,
|
|
489
|
-
children:
|
|
489
|
+
children: c
|
|
490
490
|
})
|
|
491
491
|
});
|
|
492
492
|
}
|
|
@@ -496,16 +496,16 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
496
496
|
className: (0, _classnames.default)(_listcssmistica.rowContent, {
|
|
497
497
|
[_listcssmistica.touchableBackground]: f,
|
|
498
498
|
[_listcssmistica.touchableBackgroundInverse]: w,
|
|
499
|
-
[_listcssmistica.pointer]: !
|
|
499
|
+
[_listcssmistica.pointer]: !a
|
|
500
500
|
}),
|
|
501
|
-
role:
|
|
501
|
+
role: l,
|
|
502
502
|
ref: n,
|
|
503
503
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_radiobutton.default, {
|
|
504
|
-
dataAttributes:
|
|
504
|
+
dataAttributes: h,
|
|
505
505
|
value: e.radioValue,
|
|
506
506
|
"aria-labelledby": r,
|
|
507
507
|
render: (param)=>/* @__PURE__ */ {
|
|
508
|
-
let { controlElement:
|
|
508
|
+
let { controlElement: c } = param;
|
|
509
509
|
return (0, _jsxruntime.jsx)(_box.default, {
|
|
510
510
|
paddingX: 16,
|
|
511
511
|
children: y({
|
|
@@ -513,7 +513,7 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
513
513
|
type: "control",
|
|
514
514
|
right: ()=>/* @__PURE__ */ (0, _jsxruntime.jsx)(_stack.default, {
|
|
515
515
|
space: "around",
|
|
516
|
-
children:
|
|
516
|
+
children: c
|
|
517
517
|
})
|
|
518
518
|
})
|
|
519
519
|
});
|
|
@@ -522,8 +522,8 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
522
522
|
}) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
523
523
|
paddingX: 16,
|
|
524
524
|
className: _listcssmistica.rowContent,
|
|
525
|
-
role:
|
|
526
|
-
dataAttributes:
|
|
525
|
+
role: l,
|
|
526
|
+
dataAttributes: h,
|
|
527
527
|
children: e.right ? y({
|
|
528
528
|
type: "custom",
|
|
529
529
|
right: e.right
|
|
@@ -542,21 +542,21 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
542
542
|
}, e)
|
|
543
543
|
}));
|
|
544
544
|
}), ze = (param)=>{
|
|
545
|
-
let { children: e , ariaLabelledby: n , role: r , dataAttributes: o
|
|
546
|
-
const
|
|
545
|
+
let { children: e , ariaLabelledby: n , role: r , dataAttributes: o } = param;
|
|
546
|
+
const s = _react.Children.count(e) - 1;
|
|
547
547
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({
|
|
548
548
|
role: r,
|
|
549
549
|
"aria-labelledby": n
|
|
550
550
|
}, (0, _dom.getPrefixedDataAttributes)(o, "RowList")), {
|
|
551
|
-
children: _react.Children.toArray(e).filter(Boolean).map((
|
|
551
|
+
children: _react.Children.toArray(e).filter(Boolean).map((x, d)=>/* @__PURE__ */ (0, _jsxruntime.jsxs)(_react.Fragment, {
|
|
552
552
|
children: [
|
|
553
|
-
|
|
554
|
-
|
|
553
|
+
x,
|
|
554
|
+
d < s && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
555
555
|
paddingX: 16,
|
|
556
556
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_divider.default, {})
|
|
557
557
|
})
|
|
558
558
|
]
|
|
559
|
-
},
|
|
559
|
+
}, d))
|
|
560
560
|
}));
|
|
561
561
|
}, Ge = /*#__PURE__*/ _react.forwardRef((_param, r)=>/* @__PURE__ */ {
|
|
562
562
|
var { dataAttributes: e } = _param, n = _object_without_properties(_param, [
|
package/dist/loading-bar.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: function() {
|
|
8
|
-
return
|
|
8
|
+
return B;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -13,6 +13,7 @@ const _reacttransitiongroup = require("react-transition-group");
|
|
|
13
13
|
const _portal = require("./portal.js");
|
|
14
14
|
const _loadingbarcssmistica = require("./loading-bar.css-mistica.js");
|
|
15
15
|
const _dom = require("./utils/dom.js");
|
|
16
|
+
const _platform = require("./utils/platform.js");
|
|
16
17
|
function _define_property(obj, key, value) {
|
|
17
18
|
if (key in obj) {
|
|
18
19
|
Object.defineProperty(obj, key, {
|
|
@@ -65,11 +66,11 @@ function _object_spread_props(target, source) {
|
|
|
65
66
|
}
|
|
66
67
|
return target;
|
|
67
68
|
}
|
|
68
|
-
const
|
|
69
|
+
const x = (param)=>/* @__PURE__ */ {
|
|
69
70
|
let { visible: r , dataAttributes: t } = param;
|
|
70
71
|
return (0, _jsxruntime.jsx)(_reacttransitiongroup.CSSTransition, {
|
|
71
72
|
in: r,
|
|
72
|
-
timeout: _loadingbarcssmistica.TRANSITION_DURATION_MS,
|
|
73
|
+
timeout: (0, _platform.isRunningAcceptanceTest)() ? 0 : _loadingbarcssmistica.TRANSITION_DURATION_MS,
|
|
73
74
|
classNames: {
|
|
74
75
|
enter: _loadingbarcssmistica.enter,
|
|
75
76
|
enterActive: _loadingbarcssmistica.enterActive,
|
|
@@ -91,4 +92,4 @@ const f = (param)=>/* @__PURE__ */ {
|
|
|
91
92
|
}))
|
|
92
93
|
})
|
|
93
94
|
});
|
|
94
|
-
},
|
|
95
|
+
}, B = x;
|
package/dist/menu.js
CHANGED
|
@@ -10,13 +10,13 @@ function _export(target, all) {
|
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
12
|
Menu: function() {
|
|
13
|
-
return
|
|
13
|
+
return Je;
|
|
14
14
|
},
|
|
15
15
|
MenuItem: function() {
|
|
16
|
-
return
|
|
16
|
+
return qe;
|
|
17
17
|
},
|
|
18
18
|
MenuSection: function() {
|
|
19
|
-
return
|
|
19
|
+
return Ve;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -38,6 +38,7 @@ const _divider = /*#__PURE__*/ _interop_require_default(require("./divider.js"))
|
|
|
38
38
|
const _checkbox = /*#__PURE__*/ _interop_require_default(require("./checkbox.js"));
|
|
39
39
|
const _reacttransitiongroup = require("react-transition-group");
|
|
40
40
|
const _common = require("./utils/common.js");
|
|
41
|
+
const _platform = require("./utils/platform.js");
|
|
41
42
|
function _interop_require_default(obj) {
|
|
42
43
|
return obj && obj.__esModule ? obj : {
|
|
43
44
|
default: obj
|
|
@@ -134,18 +135,18 @@ function _object_spread_props(target, source) {
|
|
|
134
135
|
}
|
|
135
136
|
return target;
|
|
136
137
|
}
|
|
137
|
-
const
|
|
138
|
+
const ke = 120, Q = /*#__PURE__*/ _react.createContext({
|
|
138
139
|
focusedItem: null,
|
|
139
140
|
isMenuOpen: !1,
|
|
140
141
|
setFocusedItem: ()=>{},
|
|
141
142
|
closeMenu: ()=>{}
|
|
142
|
-
}),
|
|
143
|
+
}), Ne = ()=>_react.useContext(Q), D = (r)=>r ? Array.from(r.querySelectorAll("[role=menuitem],[role=menuitemcheckbox]")) : [], Re = (r, d)=>{
|
|
143
144
|
if (!d) return null;
|
|
144
145
|
const f = D(r).indexOf(d);
|
|
145
146
|
return f < 0 ? null : f;
|
|
146
|
-
},
|
|
147
|
+
}, qe = (param)=>{
|
|
147
148
|
let { label: r , Icon: d , destructive: f , disabled: u , onPress: E , controlType: s , checked: p } = param;
|
|
148
|
-
const { focusedItem: n , setFocusedItem: v , closeMenu: i , isMenuOpen: k } =
|
|
149
|
+
const { focusedItem: n , setFocusedItem: v , closeMenu: i , isMenuOpen: k } = Ne(), c = _react.useRef(null), h = f ? _skincontractcssmistica.vars.colors.textLinkDanger : _skincontractcssmistica.vars.colors.neutralHigh, x = c == null ? void 0 : c.current, M = (x == null ? void 0 : x.closest("[role=menu]")) || null, m = Re(M, x), l = ()=>s === "checkbox" ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_checkbox.default, {
|
|
149
150
|
ref: c,
|
|
150
151
|
name: r,
|
|
151
152
|
checked: p,
|
|
@@ -227,7 +228,7 @@ const Ee = 120, Q = /*#__PURE__*/ _react.createContext({
|
|
|
227
228
|
onMouseLeave: ()=>v(null),
|
|
228
229
|
children: l()
|
|
229
230
|
});
|
|
230
|
-
},
|
|
231
|
+
}, Ve = (param)=>{
|
|
231
232
|
let { children: r } = param;
|
|
232
233
|
return r ? /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
233
234
|
children: [
|
|
@@ -239,7 +240,7 @@ const Ee = 120, Q = /*#__PURE__*/ _react.createContext({
|
|
|
239
240
|
})
|
|
240
241
|
]
|
|
241
242
|
}) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {});
|
|
242
|
-
}, V = 12, J = 8,
|
|
243
|
+
}, V = 12, J = 8, Je = (param)=>{
|
|
243
244
|
let { renderTarget: r , renderMenu: d , width: f , position: u = "left" , dataAttributes: E } = param;
|
|
244
245
|
const [s, p] = _react.useState(!1), [n, v] = _react.useState(null), [i, k] = _react.useState(null), [c, h] = _react.useState(null), [x, M] = _react.useState(!1), m = _react.useRef(null), [l, N] = _react.useState(null), R = (0, _hooks.useWindowSize)();
|
|
245
246
|
_react.useEffect(()=>{
|
|
@@ -355,7 +356,7 @@ const Ee = 120, Q = /*#__PURE__*/ _react.createContext({
|
|
|
355
356
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_reacttransitiongroup.CSSTransition, {
|
|
356
357
|
in: s,
|
|
357
358
|
nodeRef: m,
|
|
358
|
-
timeout:
|
|
359
|
+
timeout: (0, _platform.isRunningAcceptanceTest)() ? 0 : ke,
|
|
359
360
|
classNames: _menucssmistica.menuTransitionClasses,
|
|
360
361
|
mountOnEnter: !0,
|
|
361
362
|
unmountOnExit: !0,
|