@telefonica/mistica 14.4.1 → 14.5.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/button.css-mistica.js +1 -1
- package/dist/button.css.d.ts +1 -1
- package/dist/card.d.ts +19 -0
- package/dist/card.js +247 -149
- package/dist/carousel.js +116 -115
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -0
- package/dist/list.css-mistica.js +9 -8
- package/dist/list.css.d.ts +1 -0
- package/dist/list.d.ts +1 -0
- package/dist/list.js +126 -89
- package/dist/package-version.js +1 -1
- package/dist/progress-bar.css-mistica.js +5 -3
- package/dist/progress-bar.css.d.ts +2 -0
- package/dist/progress-bar.d.ts +1 -0
- package/dist/progress-bar.js +12 -6
- package/dist-es/button.css-mistica.js +1 -1
- package/dist-es/card.js +300 -203
- package/dist-es/carousel.js +164 -163
- package/dist-es/index.js +1703 -1703
- package/dist-es/list.css-mistica.js +2 -2
- package/dist-es/list.js +191 -154
- package/dist-es/package-version.js +1 -1
- package/dist-es/progress-bar.css-mistica.js +2 -2
- package/dist-es/progress-bar.js +13 -12
- package/dist-es/style.css +1 -1
- package/package.json +2 -2
package/dist/list.js
CHANGED
|
@@ -9,10 +9,10 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
BoxedRow: ()=>
|
|
13
|
-
BoxedRowList: ()=>
|
|
14
|
-
Row: ()=>
|
|
15
|
-
RowList: ()=>
|
|
12
|
+
BoxedRow: ()=>Ye,
|
|
13
|
+
BoxedRowList: ()=>qe,
|
|
14
|
+
Row: ()=>Fe,
|
|
15
|
+
RowList: ()=>Oe
|
|
16
16
|
});
|
|
17
17
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
18
18
|
const _classnames = /*#__PURE__*/ _interopRequireDefault(require("classnames"));
|
|
@@ -156,7 +156,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
156
156
|
}
|
|
157
157
|
return target;
|
|
158
158
|
}
|
|
159
|
-
const
|
|
159
|
+
const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
160
160
|
centerY: r
|
|
161
161
|
}) : r ? /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
162
162
|
style: {
|
|
@@ -165,22 +165,22 @@ const K = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
165
165
|
height: "100%"
|
|
166
166
|
},
|
|
167
167
|
children: e
|
|
168
|
-
}) : e,
|
|
169
|
-
let { withChevron: e , headline: r , title: i , titleLinesMax:
|
|
168
|
+
}) : e, ve = (param)=>{
|
|
169
|
+
let { withChevron: e , headline: r , title: i , titleLinesMax: a , subtitle: l , subtitleLinesMax: v , description: s , descriptionLinesMax: B , asset: b , type: I = "basic" , badge: L , right: T , extra: V , labelId: m , disabled: u } = param;
|
|
170
170
|
const h = (0, _themeVariantContextJs.useIsInverseVariant)(), n = [
|
|
171
171
|
r,
|
|
172
172
|
i,
|
|
173
|
-
a,
|
|
174
173
|
l,
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
s,
|
|
175
|
+
V
|
|
176
|
+
].filter(Boolean).length === 1, S = ()=>L ? /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
177
177
|
paddingLeft: 16,
|
|
178
178
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
179
179
|
className: (0, _classnames.default)(_listCssMisticaJs.center, _listCssMisticaJs.badge, {
|
|
180
180
|
[_listCssMisticaJs.disabled]: u
|
|
181
181
|
}),
|
|
182
|
-
children:
|
|
183
|
-
value:
|
|
182
|
+
children: L === !0 ? /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_badgeJs.default, {}) : /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_badgeJs.default, {
|
|
183
|
+
value: L
|
|
184
184
|
})
|
|
185
185
|
})
|
|
186
186
|
}) : null;
|
|
@@ -220,30 +220,30 @@ const K = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
220
220
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_textJs.Text3, {
|
|
221
221
|
regular: !0,
|
|
222
222
|
color: _skinContractCssMisticaJs.vars.colors.textPrimary,
|
|
223
|
-
truncate:
|
|
223
|
+
truncate: a,
|
|
224
224
|
id: m,
|
|
225
225
|
children: i
|
|
226
226
|
}),
|
|
227
|
-
|
|
227
|
+
l && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_textJs.Text2, {
|
|
228
228
|
regular: !0,
|
|
229
229
|
color: _skinContractCssMisticaJs.vars.colors.textSecondary,
|
|
230
230
|
truncate: v,
|
|
231
|
-
children:
|
|
231
|
+
children: l
|
|
232
232
|
}),
|
|
233
|
-
|
|
233
|
+
s && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_textJs.Text2, {
|
|
234
234
|
regular: !0,
|
|
235
235
|
color: _skinContractCssMisticaJs.vars.colors.textSecondary,
|
|
236
|
-
truncate:
|
|
237
|
-
children:
|
|
236
|
+
truncate: B,
|
|
237
|
+
children: s
|
|
238
238
|
}),
|
|
239
|
-
|
|
239
|
+
V
|
|
240
240
|
]
|
|
241
241
|
})
|
|
242
242
|
]
|
|
243
243
|
})
|
|
244
244
|
}),
|
|
245
|
-
|
|
246
|
-
|
|
245
|
+
S(),
|
|
246
|
+
I === "chevron" && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
247
247
|
paddingLeft: 16,
|
|
248
248
|
className: (0, _classnames.default)(_listCssMisticaJs.center, {
|
|
249
249
|
[_listCssMisticaJs.disabled]: u
|
|
@@ -253,17 +253,17 @@ const K = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
253
253
|
direction: "right"
|
|
254
254
|
})
|
|
255
255
|
}),
|
|
256
|
-
|
|
256
|
+
I === "control" && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
257
257
|
className: _listCssMisticaJs.right,
|
|
258
|
-
children:
|
|
258
|
+
children: _(T, n)
|
|
259
259
|
}),
|
|
260
|
-
|
|
260
|
+
I === "custom" && /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_jsxRuntimeJs.Fragment, {
|
|
261
261
|
children: [
|
|
262
262
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
263
263
|
className: (0, _classnames.default)(_listCssMisticaJs.right, {
|
|
264
264
|
[_listCssMisticaJs.disabled]: u
|
|
265
265
|
}),
|
|
266
|
-
children:
|
|
266
|
+
children: _(T, n)
|
|
267
267
|
}),
|
|
268
268
|
e && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
269
269
|
paddingLeft: 4,
|
|
@@ -279,53 +279,53 @@ const K = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
279
279
|
})
|
|
280
280
|
]
|
|
281
281
|
});
|
|
282
|
-
},
|
|
282
|
+
}, be = (param)=>{
|
|
283
283
|
let { value: e , defaultValue: r , onChange: i } = param;
|
|
284
|
-
const
|
|
285
|
-
|
|
284
|
+
const a = e !== void 0, [l, v] = _react.useState(!!r), s = ()=>{
|
|
285
|
+
a || v(!l), i && i(a ? !e : !l);
|
|
286
286
|
};
|
|
287
|
-
return
|
|
287
|
+
return a ? [
|
|
288
288
|
!!e,
|
|
289
|
-
|
|
289
|
+
s
|
|
290
290
|
] : [
|
|
291
|
-
|
|
292
|
-
|
|
291
|
+
l,
|
|
292
|
+
s
|
|
293
293
|
];
|
|
294
|
-
},
|
|
295
|
-
const i = (0, _hooksJs.useAriaId)(),
|
|
296
|
-
let { type:
|
|
297
|
-
return (0, _jsxRuntimeJs.jsx)(
|
|
298
|
-
asset:
|
|
294
|
+
}, xe = (e)=>"switch" in e, we = (e)=>"checkbox" in e, Ce = (e)=>"radioValue" in e, p = /*#__PURE__*/ _react.forwardRef((e, r)=>{
|
|
295
|
+
const i = (0, _hooksJs.useAriaId)(), a = (0, _themeVariantContextJs.useIsInverseVariant)(), { asset: l , headline: v , title: s , titleLinesMax: B , subtitle: b , subtitleLinesMax: I , description: L , descriptionLinesMax: T , badge: V , role: m , extra: u , dataAttributes: h } = e, j = (0, _radioButtonJs.useRadioContext)(), n = e.disabled || e.radioValue !== void 0 && j.disabled, [S, W] = be(e.switch || e.checkbox || {}), x = (param)=>/* @__PURE__ */ {
|
|
296
|
+
let { type: c , right: f , labelId: E } = param;
|
|
297
|
+
return (0, _jsxRuntimeJs.jsx)(ve, {
|
|
298
|
+
asset: l,
|
|
299
299
|
headline: v,
|
|
300
|
-
title:
|
|
300
|
+
title: s,
|
|
301
301
|
subtitle: b,
|
|
302
|
-
description:
|
|
303
|
-
badge:
|
|
304
|
-
titleLinesMax:
|
|
305
|
-
subtitleLinesMax:
|
|
302
|
+
description: L,
|
|
303
|
+
badge: V,
|
|
304
|
+
titleLinesMax: B,
|
|
305
|
+
subtitleLinesMax: I,
|
|
306
306
|
descriptionLinesMax: T,
|
|
307
|
-
type:
|
|
307
|
+
type: c,
|
|
308
308
|
right: f,
|
|
309
309
|
extra: u,
|
|
310
310
|
labelId: E,
|
|
311
311
|
disabled: n,
|
|
312
312
|
withChevron: !!e.onPress || !!e.href || !!e.to
|
|
313
313
|
});
|
|
314
|
-
},
|
|
314
|
+
}, M = (c)=>{
|
|
315
315
|
let f = "chevron";
|
|
316
|
-
return
|
|
316
|
+
return c.right === null && (f = "basic"), c.right && (f = "custom"), /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
317
317
|
paddingX: 16,
|
|
318
318
|
ref: r,
|
|
319
|
-
children:
|
|
319
|
+
children: x({
|
|
320
320
|
type: f,
|
|
321
|
-
right:
|
|
321
|
+
right: c.right
|
|
322
322
|
})
|
|
323
323
|
});
|
|
324
324
|
};
|
|
325
|
-
if (e.onPress && !
|
|
325
|
+
if (e.onPress && !xe(e) && !we(e) && !Ce(e)) return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_touchableJs.BaseTouchable, {
|
|
326
326
|
ref: r,
|
|
327
327
|
className: (0, _classnames.default)(_listCssMisticaJs.rowContent, {
|
|
328
|
-
[_listCssMisticaJs.hoverBackground]: !(n ||
|
|
328
|
+
[_listCssMisticaJs.hoverBackground]: !(n || a),
|
|
329
329
|
[_listCssMisticaJs.pointer]: !n
|
|
330
330
|
}),
|
|
331
331
|
trackingEvent: e.trackingEvent,
|
|
@@ -333,11 +333,11 @@ const K = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
333
333
|
role: m,
|
|
334
334
|
dataAttributes: h,
|
|
335
335
|
disabled: n,
|
|
336
|
-
children:
|
|
336
|
+
children: M(e)
|
|
337
337
|
});
|
|
338
338
|
if (e.to) return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_touchableJs.BaseTouchable, {
|
|
339
339
|
className: (0, _classnames.default)(_listCssMisticaJs.rowContent, {
|
|
340
|
-
[_listCssMisticaJs.hoverBackground]: !(n ||
|
|
340
|
+
[_listCssMisticaJs.hoverBackground]: !(n || a),
|
|
341
341
|
[_listCssMisticaJs.pointer]: !n
|
|
342
342
|
}),
|
|
343
343
|
trackingEvent: e.trackingEvent,
|
|
@@ -346,11 +346,11 @@ const K = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
346
346
|
role: m,
|
|
347
347
|
dataAttributes: h,
|
|
348
348
|
disabled: n,
|
|
349
|
-
children:
|
|
349
|
+
children: M(e)
|
|
350
350
|
});
|
|
351
351
|
if (e.href) return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_touchableJs.BaseTouchable, {
|
|
352
352
|
className: (0, _classnames.default)(_listCssMisticaJs.rowContent, {
|
|
353
|
-
[_listCssMisticaJs.hoverBackground]: !(n ||
|
|
353
|
+
[_listCssMisticaJs.hoverBackground]: !(n || a),
|
|
354
354
|
[_listCssMisticaJs.pointer]: !n
|
|
355
355
|
}),
|
|
356
356
|
trackingEvent: e.trackingEvent,
|
|
@@ -359,9 +359,9 @@ const K = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
359
359
|
role: m,
|
|
360
360
|
dataAttributes: h,
|
|
361
361
|
disabled: n,
|
|
362
|
-
children:
|
|
362
|
+
children: M(e)
|
|
363
363
|
});
|
|
364
|
-
const F = (
|
|
364
|
+
const F = (c)=>{
|
|
365
365
|
var E, O, Y, q;
|
|
366
366
|
const f = (q = (Y = (E = e.switch) == null ? void 0 : E.name) != null ? Y : (O = e.checkbox) == null ? void 0 : O.name) != null ? q : i;
|
|
367
367
|
return e.onPress ? /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)("div", {
|
|
@@ -372,52 +372,55 @@ const K = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
372
372
|
onPress: e.onPress,
|
|
373
373
|
role: m,
|
|
374
374
|
className: (0, _classnames.default)(_listCssMisticaJs.dualActionLeft, {
|
|
375
|
-
[_listCssMisticaJs.hoverBackground]: !(n ||
|
|
375
|
+
[_listCssMisticaJs.hoverBackground]: !(n || a)
|
|
376
376
|
}),
|
|
377
|
-
children:
|
|
377
|
+
children: x({
|
|
378
378
|
type: "basic",
|
|
379
379
|
labelId: i
|
|
380
380
|
})
|
|
381
381
|
}),
|
|
382
|
+
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
383
|
+
className: _listCssMisticaJs.dualActionDivider
|
|
384
|
+
}),
|
|
382
385
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_touchableJs.BaseTouchable, {
|
|
383
386
|
disabled: n,
|
|
384
387
|
className: _listCssMisticaJs.dualActionRight,
|
|
385
388
|
onPress: W,
|
|
386
389
|
dataAttributes: h,
|
|
387
|
-
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(
|
|
390
|
+
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(c, {
|
|
388
391
|
disabled: n,
|
|
389
392
|
name: f,
|
|
390
|
-
checked:
|
|
393
|
+
checked: S,
|
|
391
394
|
"aria-labelledby": i,
|
|
392
395
|
render: (param)=>{
|
|
393
|
-
let { controlElement:
|
|
394
|
-
return
|
|
396
|
+
let { controlElement: D } = param;
|
|
397
|
+
return D;
|
|
395
398
|
}
|
|
396
399
|
})
|
|
397
400
|
})
|
|
398
401
|
]
|
|
399
402
|
}) : /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
400
403
|
className: (0, _classnames.default)(_listCssMisticaJs.rowContent, {
|
|
401
|
-
[_listCssMisticaJs.hoverBackground]: !(n ||
|
|
404
|
+
[_listCssMisticaJs.hoverBackground]: !(n || a),
|
|
402
405
|
[_listCssMisticaJs.pointer]: !n
|
|
403
406
|
}),
|
|
404
|
-
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(
|
|
407
|
+
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(c, {
|
|
405
408
|
disabled: n,
|
|
406
409
|
dataAttributes: h,
|
|
407
410
|
name: f,
|
|
408
|
-
checked:
|
|
411
|
+
checked: S,
|
|
409
412
|
onChange: W,
|
|
410
413
|
render: (param)=>/* @__PURE__ */ {
|
|
411
|
-
let { controlElement:
|
|
414
|
+
let { controlElement: D , labelId: ee } = param;
|
|
412
415
|
return (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
413
416
|
paddingX: 16,
|
|
414
417
|
role: m,
|
|
415
|
-
children:
|
|
416
|
-
labelId:
|
|
418
|
+
children: x({
|
|
419
|
+
labelId: ee,
|
|
417
420
|
type: "control",
|
|
418
421
|
right: ()=>/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_stackJs.default, {
|
|
419
422
|
space: "around",
|
|
420
|
-
children:
|
|
423
|
+
children: D
|
|
421
424
|
})
|
|
422
425
|
})
|
|
423
426
|
});
|
|
@@ -425,9 +428,43 @@ const K = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
425
428
|
})
|
|
426
429
|
});
|
|
427
430
|
};
|
|
428
|
-
return e.switch ? F(_switchComponentJs.default) : e.checkbox ? F(_checkboxJs.default) : e.radioValue ? /* @__PURE__ */ (0, _jsxRuntimeJs.
|
|
431
|
+
return e.switch ? F(_switchComponentJs.default) : e.checkbox ? F(_checkboxJs.default) : e.radioValue ? e.onPress ? /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)("div", {
|
|
432
|
+
className: _listCssMisticaJs.dualActionContainer,
|
|
433
|
+
children: [
|
|
434
|
+
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_touchableJs.BaseTouchable, {
|
|
435
|
+
disabled: n,
|
|
436
|
+
onPress: e.onPress,
|
|
437
|
+
role: m,
|
|
438
|
+
className: (0, _classnames.default)(_listCssMisticaJs.dualActionLeft, {
|
|
439
|
+
[_listCssMisticaJs.hoverBackground]: !(n || a)
|
|
440
|
+
}),
|
|
441
|
+
children: x({
|
|
442
|
+
type: "basic",
|
|
443
|
+
labelId: i
|
|
444
|
+
})
|
|
445
|
+
}),
|
|
446
|
+
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
447
|
+
className: _listCssMisticaJs.dualActionDivider
|
|
448
|
+
}),
|
|
449
|
+
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_radioButtonJs.default, {
|
|
450
|
+
dataAttributes: h,
|
|
451
|
+
value: e.radioValue,
|
|
452
|
+
"aria-labelledby": i,
|
|
453
|
+
render: (param)=>/* @__PURE__ */ {
|
|
454
|
+
let { controlElement: c } = param;
|
|
455
|
+
return (0, _jsxRuntimeJs.jsx)(_stackJs.default, {
|
|
456
|
+
space: "around",
|
|
457
|
+
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
458
|
+
paddingX: 16,
|
|
459
|
+
children: c
|
|
460
|
+
})
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
})
|
|
464
|
+
]
|
|
465
|
+
}) : /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
429
466
|
className: (0, _classnames.default)(_listCssMisticaJs.rowContent, {
|
|
430
|
-
[_listCssMisticaJs.hoverBackground]: !(n ||
|
|
467
|
+
[_listCssMisticaJs.hoverBackground]: !(n || a),
|
|
431
468
|
[_listCssMisticaJs.pointer]: !n
|
|
432
469
|
}),
|
|
433
470
|
role: m,
|
|
@@ -437,15 +474,15 @@ const K = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
437
474
|
value: e.radioValue,
|
|
438
475
|
"aria-labelledby": i,
|
|
439
476
|
render: (param)=>/* @__PURE__ */ {
|
|
440
|
-
let { controlElement:
|
|
477
|
+
let { controlElement: c } = param;
|
|
441
478
|
return (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
442
479
|
paddingX: 16,
|
|
443
|
-
children:
|
|
480
|
+
children: x({
|
|
444
481
|
labelId: i,
|
|
445
482
|
type: "control",
|
|
446
483
|
right: ()=>/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_stackJs.default, {
|
|
447
484
|
space: "around",
|
|
448
|
-
children:
|
|
485
|
+
children: c
|
|
449
486
|
})
|
|
450
487
|
})
|
|
451
488
|
});
|
|
@@ -455,41 +492,41 @@ const K = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
455
492
|
paddingX: 16,
|
|
456
493
|
className: _listCssMisticaJs.rowContent,
|
|
457
494
|
role: m,
|
|
458
|
-
children: e.right ?
|
|
495
|
+
children: e.right ? x({
|
|
459
496
|
type: "custom",
|
|
460
497
|
right: e.right
|
|
461
|
-
}) :
|
|
498
|
+
}) : x({
|
|
462
499
|
type: "basic"
|
|
463
500
|
})
|
|
464
501
|
});
|
|
465
|
-
}),
|
|
502
|
+
}), Fe = /*#__PURE__*/ _react.forwardRef((_param, i)=>/* @__PURE__ */ {
|
|
466
503
|
var { dataAttributes: e } = _param, r = _objectWithoutProperties(_param, [
|
|
467
504
|
"dataAttributes"
|
|
468
505
|
]);
|
|
469
|
-
return (0, _jsxRuntimeJs.jsx)(
|
|
506
|
+
return (0, _jsxRuntimeJs.jsx)(p, _objectSpreadProps(_objectSpread({}, r), {
|
|
470
507
|
ref: i,
|
|
471
508
|
dataAttributes: _objectSpread({
|
|
472
509
|
"component-name": "Row"
|
|
473
510
|
}, e)
|
|
474
511
|
}));
|
|
475
|
-
}),
|
|
476
|
-
let { children: e , ariaLabelledby: r , role: i , dataAttributes:
|
|
477
|
-
const v = _react.Children.count(e) - 1,
|
|
512
|
+
}), Oe = (param)=>{
|
|
513
|
+
let { children: e , ariaLabelledby: r , role: i , dataAttributes: a , noLastDivider: l } = param;
|
|
514
|
+
const v = _react.Children.count(e) - 1, s = !l;
|
|
478
515
|
return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", _objectSpreadProps(_objectSpread({
|
|
479
516
|
role: i,
|
|
480
517
|
"aria-labelledby": r
|
|
481
|
-
}, (0, _domJs.getPrefixedDataAttributes)(
|
|
482
|
-
children: _react.Children.toArray(e).filter(Boolean).map((
|
|
518
|
+
}, (0, _domJs.getPrefixedDataAttributes)(a, "RowList")), {
|
|
519
|
+
children: _react.Children.toArray(e).filter(Boolean).map((B, b)=>/* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_react.Fragment, {
|
|
483
520
|
children: [
|
|
484
|
-
|
|
485
|
-
(b < v ||
|
|
521
|
+
B,
|
|
522
|
+
(b < v || s) && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
486
523
|
paddingX: 16,
|
|
487
524
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_dividerJs.default, {})
|
|
488
525
|
})
|
|
489
526
|
]
|
|
490
527
|
}, b))
|
|
491
528
|
}));
|
|
492
|
-
},
|
|
529
|
+
}, Ye = /*#__PURE__*/ _react.forwardRef((_param, i)=>/* @__PURE__ */ {
|
|
493
530
|
var { dataAttributes: e } = _param, r = _objectWithoutProperties(_param, [
|
|
494
531
|
"dataAttributes"
|
|
495
532
|
]);
|
|
@@ -499,17 +536,17 @@ const K = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
499
536
|
dataAttributes: _objectSpread({
|
|
500
537
|
"component-name": "BoxedRow"
|
|
501
538
|
}, e),
|
|
502
|
-
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(
|
|
539
|
+
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(p, _objectSpread({}, r))
|
|
503
540
|
});
|
|
504
|
-
}),
|
|
505
|
-
let { children: e , ariaLabelledby: r , role: i , dataAttributes:
|
|
541
|
+
}), qe = (param)=>/* @__PURE__ */ {
|
|
542
|
+
let { children: e , ariaLabelledby: r , role: i , dataAttributes: a } = param;
|
|
506
543
|
return (0, _jsxRuntimeJs.jsx)(_stackJs.default, {
|
|
507
544
|
space: 16,
|
|
508
545
|
role: i,
|
|
509
546
|
"aria-labelledby": r,
|
|
510
547
|
dataAttributes: _objectSpread({
|
|
511
548
|
"component-name": "BoxedRowList"
|
|
512
|
-
},
|
|
549
|
+
}, a),
|
|
513
550
|
children: e
|
|
514
551
|
});
|
|
515
552
|
};
|
package/dist/package-version.js
CHANGED
|
@@ -9,9 +9,11 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
bar: ()=>
|
|
13
|
-
barBackground: ()=>
|
|
12
|
+
bar: ()=>a,
|
|
13
|
+
barBackground: ()=>n,
|
|
14
|
+
inverse: ()=>y,
|
|
15
|
+
normal: ()=>f
|
|
14
16
|
});
|
|
15
17
|
require("./sprinkles.css.ts.vanilla.js");
|
|
16
18
|
require("./progress-bar.css.ts.vanilla.js");
|
|
17
|
-
var
|
|
19
|
+
var a = "_1y2v1nf85 _1y2v1nf9i", n = "_1y2v1nf9i _1y2v1nf88 _1y2v1nf3m", y = "j0y7r95", f = "j0y7r94";
|
package/dist/progress-bar.d.ts
CHANGED
package/dist/progress-bar.js
CHANGED
|
@@ -4,13 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()=>
|
|
7
|
+
get: ()=>N
|
|
8
8
|
});
|
|
9
9
|
const _hooksJs = require("./hooks.js");
|
|
10
10
|
const _skinContractCssMisticaJs = require("./skins/skin-contract.css-mistica.js");
|
|
11
11
|
const _progressBarCssMisticaJs = require("./progress-bar.css-mistica.js");
|
|
12
12
|
const _domJs = require("./utils/dom.js");
|
|
13
|
+
const _classnames = /*#__PURE__*/ _interopRequireDefault(require("classnames"));
|
|
13
14
|
const _jsxRuntimeJs = require("./_virtual/jsx-runtime.js");
|
|
15
|
+
function _interopRequireDefault(obj) {
|
|
16
|
+
return obj && obj.__esModule ? obj : {
|
|
17
|
+
default: obj
|
|
18
|
+
};
|
|
19
|
+
}
|
|
14
20
|
function _defineProperty(obj, key, value) {
|
|
15
21
|
if (key in obj) {
|
|
16
22
|
Object.defineProperty(obj, key, {
|
|
@@ -63,19 +69,19 @@ function _objectSpreadProps(target, source) {
|
|
|
63
69
|
}
|
|
64
70
|
return target;
|
|
65
71
|
}
|
|
66
|
-
const
|
|
67
|
-
let { progressPercent: r , color: a , "aria-label":
|
|
68
|
-
const { texts:
|
|
72
|
+
const N = (param)=>{
|
|
73
|
+
let { progressPercent: r , color: a , "aria-label": t , "aria-labelledby": e , dataAttributes: l , reverse: o = !1 } = param;
|
|
74
|
+
const { texts: i } = (0, _hooksJs.useTheme)(), m = i.loading, n = e ? void 0 : t || m;
|
|
69
75
|
return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", _objectSpreadProps(_objectSpread({}, (0, _domJs.getPrefixedDataAttributes)(l, "ProgressBar")), {
|
|
70
76
|
className: _progressBarCssMisticaJs.barBackground,
|
|
71
77
|
role: "progressbar",
|
|
72
78
|
"aria-valuenow": r,
|
|
73
79
|
"aria-valuemin": 0,
|
|
74
80
|
"aria-valuemax": 100,
|
|
75
|
-
"aria-label":
|
|
81
|
+
"aria-label": n,
|
|
76
82
|
"aria-labelledby": e,
|
|
77
83
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
78
|
-
className: _progressBarCssMisticaJs.bar,
|
|
84
|
+
className: (0, _classnames.default)(_progressBarCssMisticaJs.bar, o ? _progressBarCssMisticaJs.inverse : _progressBarCssMisticaJs.normal),
|
|
79
85
|
style: {
|
|
80
86
|
maxWidth: `${r}%`,
|
|
81
87
|
backgroundColor: a != null ? a : _skinContractCssMisticaJs.vars.colors.controlActivated
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./sprinkles.css.ts.vanilla.js";
|
|
2
2
|
import "./button.css.ts.vanilla.js";
|
|
3
|
-
var _ =
|
|
3
|
+
var _ = 104, r = 8, y = 24, f = 20, a = 16, b = 20, p = 14.5, i = 10.5, o = "rrbrpnk", e = "rrbrpni _1y2v1nf20", t = {
|
|
4
4
|
primary: "rrbrpno rrbrpn2 _1y2v1nf65 _1y2v1nf6j _1y2v1nf6x _1y2v1nf7b _1y2v1nf5m _1y2v1nf5d _1y2v1nf7q _1y2v1nf9j _1y2v1nf9o _1y2v1nf1t _1y2v1nf3a",
|
|
5
5
|
secondary: "rrbrpnp rrbrpn2 _1y2v1nf65 _1y2v1nf6j _1y2v1nf6x _1y2v1nf7b _1y2v1nf5m _1y2v1nf5d _1y2v1nf7q _1y2v1nf9j _1y2v1nf9o _1y2v1nf1x _1y2v1nf5c",
|
|
6
6
|
danger: "rrbrpnq rrbrpn2 _1y2v1nf65 _1y2v1nf6j _1y2v1nf6x _1y2v1nf7b _1y2v1nf5m _1y2v1nf5d _1y2v1nf7q _1y2v1nf9j _1y2v1nf9o _1y2v1nf1s _1y2v1nf34"
|