@telefonica/mistica 14.8.0 → 14.9.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/circle.d.ts +1 -0
- package/dist/circle.js +9 -6
- package/dist/form.d.ts +1 -1
- package/dist/generated/mistica-icons/icon-chevron-left-light.js +11 -11
- package/dist/generated/mistica-icons/icon-chevron-left-regular.js +11 -11
- package/dist/generated/mistica-icons/icon-chevron-right-light.js +2 -2
- package/dist/generated/mistica-icons/icon-chevron-right-regular.js +2 -2
- package/dist/horizontal-scroll.css-mistica.js +18 -0
- package/dist/horizontal-scroll.css.d.ts +2 -0
- package/dist/horizontal-scroll.css.ts.vanilla.js +9 -0
- package/dist/horizontal-scroll.d.ts +7 -0
- package/dist/horizontal-scroll.js +66 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/list.js +56 -56
- package/dist/package-version.js +1 -1
- package/dist/tabs.js +14 -15
- package/dist-es/circle.js +12 -9
- package/dist-es/generated/mistica-icons/icon-chevron-left-light.js +12 -12
- package/dist-es/generated/mistica-icons/icon-chevron-left-regular.js +11 -11
- package/dist-es/generated/mistica-icons/icon-chevron-right-light.js +2 -2
- package/dist-es/generated/mistica-icons/icon-chevron-right-regular.js +2 -2
- package/dist-es/horizontal-scroll.css-mistica.js +5 -0
- package/dist-es/horizontal-scroll.css.ts.vanilla.js +2 -0
- package/dist-es/horizontal-scroll.js +15 -0
- package/dist-es/index.js +1708 -1707
- package/dist-es/list.js +75 -75
- package/dist-es/package-version.js +1 -1
- package/dist-es/style.css +1 -1
- package/dist-es/tabs.js +22 -23
- package/package.json +1 -1
package/dist/list.js
CHANGED
|
@@ -156,9 +156,9 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
156
156
|
}
|
|
157
157
|
return target;
|
|
158
158
|
}
|
|
159
|
-
const _ = (e,
|
|
160
|
-
centerY:
|
|
161
|
-
}) :
|
|
159
|
+
const _ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
160
|
+
centerY: n
|
|
161
|
+
}) : n ? /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
162
162
|
style: {
|
|
163
163
|
display: "flex",
|
|
164
164
|
alignItems: "center",
|
|
@@ -166,11 +166,11 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
166
166
|
},
|
|
167
167
|
children: e
|
|
168
168
|
}) : e, ve = (param)=>{
|
|
169
|
-
let { withChevron: e , headline:
|
|
170
|
-
const h = (0, _themeVariantContextJs.useIsInverseVariant)(),
|
|
171
|
-
|
|
169
|
+
let { withChevron: e , headline: n , title: i , titleLinesMax: a , subtitle: d , subtitleLinesMax: v , description: s , descriptionLinesMax: B , asset: b , type: I = "basic" , badge: L , right: T , extra: V , labelId: m , disabled: u } = param;
|
|
170
|
+
const h = (0, _themeVariantContextJs.useIsInverseVariant)(), r = [
|
|
171
|
+
n,
|
|
172
172
|
i,
|
|
173
|
-
|
|
173
|
+
d,
|
|
174
174
|
s,
|
|
175
175
|
V
|
|
176
176
|
].filter(Boolean).length === 1, S = ()=>L ? /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
@@ -191,7 +191,7 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
191
191
|
b && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
192
192
|
paddingRight: 16,
|
|
193
193
|
className: (0, _classnames.default)({
|
|
194
|
-
[_listCssMisticaJs.center]:
|
|
194
|
+
[_listCssMisticaJs.center]: r,
|
|
195
195
|
[_listCssMisticaJs.disabled]: u
|
|
196
196
|
}),
|
|
197
197
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
@@ -204,15 +204,15 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
204
204
|
[_listCssMisticaJs.disabled]: u
|
|
205
205
|
}),
|
|
206
206
|
style: {
|
|
207
|
-
justifyContent:
|
|
207
|
+
justifyContent: r ? "center" : "flex-start"
|
|
208
208
|
},
|
|
209
209
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_stackJs.default, {
|
|
210
210
|
space: 4,
|
|
211
211
|
children: [
|
|
212
|
-
|
|
212
|
+
n && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_textJs.Text1, {
|
|
213
213
|
regular: !0,
|
|
214
214
|
color: _skinContractCssMisticaJs.vars.colors.textPrimary,
|
|
215
|
-
children:
|
|
215
|
+
children: n
|
|
216
216
|
}),
|
|
217
217
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_stackJs.default, {
|
|
218
218
|
space: 2,
|
|
@@ -224,11 +224,11 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
224
224
|
id: m,
|
|
225
225
|
children: i
|
|
226
226
|
}),
|
|
227
|
-
|
|
227
|
+
d && /* @__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: d
|
|
232
232
|
}),
|
|
233
233
|
s && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_textJs.Text2, {
|
|
234
234
|
regular: !0,
|
|
@@ -255,7 +255,7 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
255
255
|
}),
|
|
256
256
|
I === "control" && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
257
257
|
className: _listCssMisticaJs.right,
|
|
258
|
-
children: _(T,
|
|
258
|
+
children: _(T, r)
|
|
259
259
|
}),
|
|
260
260
|
I === "custom" && /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_jsxRuntimeJs.Fragment, {
|
|
261
261
|
children: [
|
|
@@ -263,7 +263,7 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
263
263
|
className: (0, _classnames.default)(_listCssMisticaJs.right, {
|
|
264
264
|
[_listCssMisticaJs.disabled]: u
|
|
265
265
|
}),
|
|
266
|
-
children: _(T,
|
|
266
|
+
children: _(T, r)
|
|
267
267
|
}),
|
|
268
268
|
e && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
269
269
|
paddingLeft: 4,
|
|
@@ -280,22 +280,22 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
280
280
|
]
|
|
281
281
|
});
|
|
282
282
|
}, be = (param)=>{
|
|
283
|
-
let { value: e , defaultValue:
|
|
284
|
-
const a = e !== void 0, [
|
|
285
|
-
a || v(!
|
|
283
|
+
let { value: e , defaultValue: n , onChange: i } = param;
|
|
284
|
+
const a = e !== void 0, [d, v] = _react.useState(!!n), s = ()=>{
|
|
285
|
+
a || v(!d), i && i(a ? !e : !d);
|
|
286
286
|
};
|
|
287
287
|
return a ? [
|
|
288
288
|
!!e,
|
|
289
289
|
s
|
|
290
290
|
] : [
|
|
291
|
-
|
|
291
|
+
d,
|
|
292
292
|
s
|
|
293
293
|
];
|
|
294
|
-
}, xe = (e)=>
|
|
295
|
-
const i = (0, _hooksJs.useAriaId)(), a = (0, _themeVariantContextJs.useIsInverseVariant)(), { asset:
|
|
294
|
+
}, xe = (e)=>e.switch !== void 0, we = (e)=>e.checkbox !== void 0, Ce = (e)=>e.radioValue !== void 0, p = /*#__PURE__*/ _react.forwardRef((e, n)=>{
|
|
295
|
+
const i = (0, _hooksJs.useAriaId)(), a = (0, _themeVariantContextJs.useIsInverseVariant)(), { asset: d , 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)(), r = e.disabled || e.radioValue !== void 0 && j.disabled, [S, W] = be(e.switch || e.checkbox || {}), x = (param)=>/* @__PURE__ */ {
|
|
296
296
|
let { type: c , right: f , labelId: E } = param;
|
|
297
297
|
return (0, _jsxRuntimeJs.jsx)(ve, {
|
|
298
|
-
asset:
|
|
298
|
+
asset: d,
|
|
299
299
|
headline: v,
|
|
300
300
|
title: s,
|
|
301
301
|
subtitle: b,
|
|
@@ -308,14 +308,14 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
308
308
|
right: f,
|
|
309
309
|
extra: u,
|
|
310
310
|
labelId: E,
|
|
311
|
-
disabled:
|
|
311
|
+
disabled: r,
|
|
312
312
|
withChevron: !!e.onPress || !!e.href || !!e.to
|
|
313
313
|
});
|
|
314
314
|
}, M = (c)=>{
|
|
315
315
|
let f = "chevron";
|
|
316
316
|
return c.right === null && (f = "basic"), c.right && (f = "custom"), /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
317
317
|
paddingX: 16,
|
|
318
|
-
ref:
|
|
318
|
+
ref: n,
|
|
319
319
|
children: x({
|
|
320
320
|
type: f,
|
|
321
321
|
right: c.right
|
|
@@ -323,42 +323,42 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
323
323
|
});
|
|
324
324
|
};
|
|
325
325
|
if (e.onPress && !xe(e) && !we(e) && !Ce(e)) return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_touchableJs.BaseTouchable, {
|
|
326
|
-
ref:
|
|
326
|
+
ref: n,
|
|
327
327
|
className: (0, _classnames.default)(_listCssMisticaJs.rowContent, {
|
|
328
|
-
[_listCssMisticaJs.hoverBackground]: !(
|
|
329
|
-
[_listCssMisticaJs.pointer]: !
|
|
328
|
+
[_listCssMisticaJs.hoverBackground]: !(r || a),
|
|
329
|
+
[_listCssMisticaJs.pointer]: !r
|
|
330
330
|
}),
|
|
331
331
|
trackingEvent: e.trackingEvent,
|
|
332
332
|
onPress: e.onPress,
|
|
333
333
|
role: m,
|
|
334
334
|
dataAttributes: h,
|
|
335
|
-
disabled:
|
|
335
|
+
disabled: r,
|
|
336
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]: !(
|
|
341
|
-
[_listCssMisticaJs.pointer]: !
|
|
340
|
+
[_listCssMisticaJs.hoverBackground]: !(r || a),
|
|
341
|
+
[_listCssMisticaJs.pointer]: !r
|
|
342
342
|
}),
|
|
343
343
|
trackingEvent: e.trackingEvent,
|
|
344
344
|
to: e.to,
|
|
345
345
|
fullPageOnWebView: e.fullPageOnWebView,
|
|
346
346
|
role: m,
|
|
347
347
|
dataAttributes: h,
|
|
348
|
-
disabled:
|
|
348
|
+
disabled: r,
|
|
349
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]: !(
|
|
354
|
-
[_listCssMisticaJs.pointer]: !
|
|
353
|
+
[_listCssMisticaJs.hoverBackground]: !(r || a),
|
|
354
|
+
[_listCssMisticaJs.pointer]: !r
|
|
355
355
|
}),
|
|
356
356
|
trackingEvent: e.trackingEvent,
|
|
357
357
|
href: e.href,
|
|
358
358
|
newTab: e.newTab,
|
|
359
359
|
role: m,
|
|
360
360
|
dataAttributes: h,
|
|
361
|
-
disabled:
|
|
361
|
+
disabled: r,
|
|
362
362
|
children: M(e)
|
|
363
363
|
});
|
|
364
364
|
const F = (c)=>{
|
|
@@ -368,11 +368,11 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
368
368
|
className: _listCssMisticaJs.dualActionContainer,
|
|
369
369
|
children: [
|
|
370
370
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_touchableJs.BaseTouchable, {
|
|
371
|
-
disabled:
|
|
371
|
+
disabled: r,
|
|
372
372
|
onPress: e.onPress,
|
|
373
373
|
role: m,
|
|
374
374
|
className: (0, _classnames.default)(_listCssMisticaJs.dualActionLeft, {
|
|
375
|
-
[_listCssMisticaJs.hoverBackground]: !(
|
|
375
|
+
[_listCssMisticaJs.hoverBackground]: !(r || a)
|
|
376
376
|
}),
|
|
377
377
|
children: x({
|
|
378
378
|
type: "basic",
|
|
@@ -383,12 +383,12 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
383
383
|
className: _listCssMisticaJs.dualActionDivider
|
|
384
384
|
}),
|
|
385
385
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_touchableJs.BaseTouchable, {
|
|
386
|
-
disabled:
|
|
386
|
+
disabled: r,
|
|
387
387
|
className: _listCssMisticaJs.dualActionRight,
|
|
388
388
|
onPress: W,
|
|
389
389
|
dataAttributes: h,
|
|
390
390
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(c, {
|
|
391
|
-
disabled:
|
|
391
|
+
disabled: r,
|
|
392
392
|
name: f,
|
|
393
393
|
checked: S,
|
|
394
394
|
"aria-labelledby": i,
|
|
@@ -401,11 +401,11 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
401
401
|
]
|
|
402
402
|
}) : /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
403
403
|
className: (0, _classnames.default)(_listCssMisticaJs.rowContent, {
|
|
404
|
-
[_listCssMisticaJs.hoverBackground]: !(
|
|
405
|
-
[_listCssMisticaJs.pointer]: !
|
|
404
|
+
[_listCssMisticaJs.hoverBackground]: !(r || a),
|
|
405
|
+
[_listCssMisticaJs.pointer]: !r
|
|
406
406
|
}),
|
|
407
407
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(c, {
|
|
408
|
-
disabled:
|
|
408
|
+
disabled: r,
|
|
409
409
|
dataAttributes: h,
|
|
410
410
|
name: f,
|
|
411
411
|
checked: S,
|
|
@@ -432,11 +432,11 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
432
432
|
className: _listCssMisticaJs.dualActionContainer,
|
|
433
433
|
children: [
|
|
434
434
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_touchableJs.BaseTouchable, {
|
|
435
|
-
disabled:
|
|
435
|
+
disabled: r,
|
|
436
436
|
onPress: e.onPress,
|
|
437
437
|
role: m,
|
|
438
438
|
className: (0, _classnames.default)(_listCssMisticaJs.dualActionLeft, {
|
|
439
|
-
[_listCssMisticaJs.hoverBackground]: !(
|
|
439
|
+
[_listCssMisticaJs.hoverBackground]: !(r || a)
|
|
440
440
|
}),
|
|
441
441
|
children: x({
|
|
442
442
|
type: "basic",
|
|
@@ -464,11 +464,11 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
464
464
|
]
|
|
465
465
|
}) : /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
466
466
|
className: (0, _classnames.default)(_listCssMisticaJs.rowContent, {
|
|
467
|
-
[_listCssMisticaJs.hoverBackground]: !(
|
|
468
|
-
[_listCssMisticaJs.pointer]: !
|
|
467
|
+
[_listCssMisticaJs.hoverBackground]: !(r || a),
|
|
468
|
+
[_listCssMisticaJs.pointer]: !r
|
|
469
469
|
}),
|
|
470
470
|
role: m,
|
|
471
|
-
ref:
|
|
471
|
+
ref: n,
|
|
472
472
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_radioButtonJs.default, {
|
|
473
473
|
dataAttributes: h,
|
|
474
474
|
value: e.radioValue,
|
|
@@ -500,21 +500,21 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
500
500
|
})
|
|
501
501
|
});
|
|
502
502
|
}), Fe = /*#__PURE__*/ _react.forwardRef((_param, i)=>/* @__PURE__ */ {
|
|
503
|
-
var { dataAttributes: e } = _param,
|
|
503
|
+
var { dataAttributes: e } = _param, n = _objectWithoutProperties(_param, [
|
|
504
504
|
"dataAttributes"
|
|
505
505
|
]);
|
|
506
|
-
return (0, _jsxRuntimeJs.jsx)(p, _objectSpreadProps(_objectSpread({},
|
|
506
|
+
return (0, _jsxRuntimeJs.jsx)(p, _objectSpreadProps(_objectSpread({}, n), {
|
|
507
507
|
ref: i,
|
|
508
508
|
dataAttributes: _objectSpread({
|
|
509
509
|
"component-name": "Row"
|
|
510
510
|
}, e)
|
|
511
511
|
}));
|
|
512
512
|
}), Oe = (param)=>{
|
|
513
|
-
let { children: e , ariaLabelledby:
|
|
514
|
-
const v = _react.Children.count(e) - 1, s = !
|
|
513
|
+
let { children: e , ariaLabelledby: n , role: i , dataAttributes: a , noLastDivider: d } = param;
|
|
514
|
+
const v = _react.Children.count(e) - 1, s = !d;
|
|
515
515
|
return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", _objectSpreadProps(_objectSpread({
|
|
516
516
|
role: i,
|
|
517
|
-
"aria-labelledby":
|
|
517
|
+
"aria-labelledby": n
|
|
518
518
|
}, (0, _domJs.getPrefixedDataAttributes)(a, "RowList")), {
|
|
519
519
|
children: _react.Children.toArray(e).filter(Boolean).map((B, b)=>/* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_react.Fragment, {
|
|
520
520
|
children: [
|
|
@@ -527,23 +527,23 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
527
527
|
}, b))
|
|
528
528
|
}));
|
|
529
529
|
}, Ye = /*#__PURE__*/ _react.forwardRef((_param, i)=>/* @__PURE__ */ {
|
|
530
|
-
var { dataAttributes: e } = _param,
|
|
530
|
+
var { dataAttributes: e } = _param, n = _objectWithoutProperties(_param, [
|
|
531
531
|
"dataAttributes"
|
|
532
532
|
]);
|
|
533
533
|
return (0, _jsxRuntimeJs.jsx)(_boxedJs.Boxed, {
|
|
534
|
-
isInverse:
|
|
534
|
+
isInverse: n.isInverse,
|
|
535
535
|
ref: i,
|
|
536
536
|
dataAttributes: _objectSpread({
|
|
537
537
|
"component-name": "BoxedRow"
|
|
538
538
|
}, e),
|
|
539
|
-
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(p, _objectSpread({},
|
|
539
|
+
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(p, _objectSpread({}, n))
|
|
540
540
|
});
|
|
541
541
|
}), qe = (param)=>/* @__PURE__ */ {
|
|
542
|
-
let { children: e , ariaLabelledby:
|
|
542
|
+
let { children: e , ariaLabelledby: n , role: i , dataAttributes: a } = param;
|
|
543
543
|
return (0, _jsxRuntimeJs.jsx)(_stackJs.default, {
|
|
544
544
|
space: 16,
|
|
545
545
|
role: i,
|
|
546
|
-
"aria-labelledby":
|
|
546
|
+
"aria-labelledby": n,
|
|
547
547
|
dataAttributes: _objectSpread({
|
|
548
548
|
"component-name": "BoxedRowList"
|
|
549
549
|
}, a),
|
package/dist/package-version.js
CHANGED
package/dist/tabs.js
CHANGED
|
@@ -112,8 +112,8 @@ function _objectSpreadProps(target, source) {
|
|
|
112
112
|
}
|
|
113
113
|
return target;
|
|
114
114
|
}
|
|
115
|
-
const f = (0, _platformJs.isRunningAcceptanceTest)() ? 0 : 300, q = (
|
|
116
|
-
switch(
|
|
115
|
+
const f = (0, _platformJs.isRunningAcceptanceTest)() ? 0 : 300, q = (a)=>{
|
|
116
|
+
switch(a){
|
|
117
117
|
case 2:
|
|
118
118
|
return "tabs2";
|
|
119
119
|
case 3:
|
|
@@ -122,17 +122,17 @@ const f = (0, _platformJs.isRunningAcceptanceTest)() ? 0 : 300, q = (r)=>{
|
|
|
122
122
|
return "default";
|
|
123
123
|
}
|
|
124
124
|
}, J = (param)=>{
|
|
125
|
-
let { selectedIndex:
|
|
126
|
-
const
|
|
127
|
-
const e = document.querySelector(`[id='${
|
|
128
|
-
e && n && t &&
|
|
129
|
-
t.style.width = `${n.offsetWidth}px`, t.style.transform = `translate(${n.offsetLeft -
|
|
125
|
+
let { selectedIndex: a , onChange: A , tabs: d , dataAttributes: N } = param;
|
|
126
|
+
const o = (0, _hooksJs.useAriaId)(), { ref: T } = (0, _hooksJs.useElementDimensions)(), u = _react.useRef(null), b = _react.useRef(null), [p, h] = _react.useState(!1), L = (i, l)=>{
|
|
127
|
+
const e = document.querySelector(`[id='${o}'] [data-tabindex="${i}"]`), n = document.querySelector(`[id='${o}'] [data-tabindex="${l}"]`), t = u.current, r = b.current;
|
|
128
|
+
e && n && t && r && (h(!0), t.style.display = "block", t.style.width = `${e.offsetWidth}px`, t.style.transform = `translate(${e.offsetLeft - r.scrollLeft}px, 0)`, Promise.resolve().then(()=>{
|
|
129
|
+
t.style.width = `${n.offsetWidth}px`, t.style.transform = `translate(${n.offsetLeft - r.scrollLeft}px, 0)`, t.style.transition = `transform ${f}ms, width ${f}ms`;
|
|
130
130
|
}), setTimeout(()=>{
|
|
131
131
|
t.style.transition = "", t.style.display = "none", h(!1);
|
|
132
132
|
}, f));
|
|
133
133
|
};
|
|
134
134
|
return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", _objectSpreadProps(_objectSpread({
|
|
135
|
-
id:
|
|
135
|
+
id: o,
|
|
136
136
|
role: "tablist",
|
|
137
137
|
ref: T,
|
|
138
138
|
className: _tabsCssMisticaJs.outerBorder
|
|
@@ -148,22 +148,21 @@ const f = (0, _platformJs.isRunningAcceptanceTest)() ? 0 : 300, q = (r)=>{
|
|
|
148
148
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
149
149
|
className: _tabsCssMisticaJs.tabsContainer,
|
|
150
150
|
children: d.map((param, t)=>{
|
|
151
|
-
let { text:
|
|
152
|
-
const
|
|
151
|
+
let { text: i , trackingEvent: l , icon: e , "aria-controls": n } = param;
|
|
152
|
+
const r = t === a;
|
|
153
153
|
return /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_touchableJs.BaseTouchable, {
|
|
154
154
|
dataAttributes: {
|
|
155
155
|
"component-name": "Tab",
|
|
156
156
|
tabindex: t
|
|
157
157
|
},
|
|
158
|
-
className: (0, _classnames.default)(_tabsCssMisticaJs.tabVariants[q(d.length)],
|
|
159
|
-
disabled: s,
|
|
158
|
+
className: (0, _classnames.default)(_tabsCssMisticaJs.tabVariants[q(d.length)], r ? p ? _tabsCssMisticaJs.tabSelectionVariants.selectedAnimating : _tabsCssMisticaJs.tabSelectionVariants.selected : _tabsCssMisticaJs.tabSelectionVariants.noSelected, e && _tabsCssMisticaJs.tabWithIcon),
|
|
160
159
|
onPress: ()=>{
|
|
161
|
-
!p &&
|
|
160
|
+
!p && a !== t && (A(t), L(a, t));
|
|
162
161
|
},
|
|
163
162
|
trackingEvent: l,
|
|
164
163
|
role: "tab",
|
|
165
164
|
"aria-controls": n,
|
|
166
|
-
"aria-selected":
|
|
165
|
+
"aria-selected": r ? "true" : "false",
|
|
167
166
|
children: [
|
|
168
167
|
e && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
169
168
|
className: _tabsCssMisticaJs.icon,
|
|
@@ -174,7 +173,7 @@ const f = (0, _platformJs.isRunningAcceptanceTest)() ? 0 : 300, q = (r)=>{
|
|
|
174
173
|
color: "inherit",
|
|
175
174
|
wordBreak: !1,
|
|
176
175
|
textAlign: "center",
|
|
177
|
-
children:
|
|
176
|
+
children: i
|
|
178
177
|
})
|
|
179
178
|
]
|
|
180
179
|
}, t);
|
package/dist-es/circle.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { circle as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { circle as c } from "./circle.css-mistica.js";
|
|
2
|
+
import { vars as d } from "./skins/skin-contract.css-mistica.js";
|
|
3
|
+
import { jsx as m } from "./_virtual/jsx-runtime.js";
|
|
4
|
+
const f = (param)=>{
|
|
5
|
+
let { children: e , backgroundColor: s , backgroundImage: o , size: t , border: r = !1 } = param;
|
|
6
|
+
const l = r === !0 ? d.colors.border : r, i = r ? `1px solid ${l}` : void 0;
|
|
7
|
+
return /* @__PURE__ */ m("div", {
|
|
8
|
+
className: c,
|
|
7
9
|
style: {
|
|
8
10
|
width: t,
|
|
9
11
|
height: t,
|
|
10
|
-
backgroundColor:
|
|
11
|
-
backgroundImage:
|
|
12
|
+
backgroundColor: s,
|
|
13
|
+
backgroundImage: o ? `url(${o})` : "none",
|
|
14
|
+
border: i
|
|
12
15
|
},
|
|
13
16
|
children: e
|
|
14
17
|
});
|
|
15
18
|
};
|
|
16
|
-
export {
|
|
19
|
+
export { f as default };
|
|
@@ -77,36 +77,36 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
77
77
|
}
|
|
78
78
|
return target;
|
|
79
79
|
}
|
|
80
|
-
import { useTheme as
|
|
80
|
+
import { useTheme as l } from "../../hooks.js";
|
|
81
81
|
import { useIsInverseVariant as h } from "../../theme-variant-context.js";
|
|
82
82
|
import { vars as n } from "../../skins/skin-contract.css-mistica.js";
|
|
83
83
|
import { jsx as t } from "../../_virtual/jsx-runtime.js";
|
|
84
|
-
const
|
|
85
|
-
var { color: r , size: e = 24 } = _param,
|
|
84
|
+
const v = (_param)=>{
|
|
85
|
+
var { color: r , size: e = 24 } = _param, i = _objectWithoutProperties(_param, [
|
|
86
86
|
"color",
|
|
87
87
|
"size"
|
|
88
88
|
]);
|
|
89
|
-
const o = h(),
|
|
90
|
-
return
|
|
89
|
+
const o = h(), a = r != null ? r : o ? n.colors.inverse : n.colors.neutralHigh, { skinName: s } = l();
|
|
90
|
+
return s.match(/^o2/i) ? /* @__PURE__ */ t("svg", _objectSpreadProps(_objectSpread({
|
|
91
91
|
width: e,
|
|
92
92
|
height: e,
|
|
93
93
|
viewBox: "0 0 24 24",
|
|
94
94
|
role: "presentation"
|
|
95
|
-
},
|
|
95
|
+
}, i), {
|
|
96
96
|
children: /* @__PURE__ */ t("path", {
|
|
97
|
-
fill:
|
|
98
|
-
d: "
|
|
97
|
+
fill: a,
|
|
98
|
+
d: "M14.889 4.117a.368.368 0 00-.538 0l-7.24 7.585a.413.413 0 00-.071.46c.019.05.048.099.088.14l6.008 6.296a.377.377 0 00.55 0 .422.422 0 000-.577l-5.765-6.04 6.968-7.3a.412.412 0 000-.564zM13.866 19.41c0-.326.252-.59.563-.59.312 0 .564.264.564.59 0 .326-.252.59-.564.59a.577.577 0 01-.563-.59z"
|
|
99
99
|
})
|
|
100
100
|
})) : /* @__PURE__ */ t("svg", _objectSpreadProps(_objectSpread({
|
|
101
101
|
width: e,
|
|
102
102
|
height: e,
|
|
103
103
|
viewBox: "0 0 24 24",
|
|
104
104
|
role: "presentation"
|
|
105
|
-
},
|
|
105
|
+
}, i), {
|
|
106
106
|
children: /* @__PURE__ */ t("path", {
|
|
107
|
-
fill:
|
|
108
|
-
d: "
|
|
107
|
+
fill: a,
|
|
108
|
+
d: "M14.387 4a.583.583 0 01.442.198.644.644 0 010 .875l-7.356 6.99 7.318 6.865c.242.23.26.622.038.872a.584.584 0 01-.846.037L6.19 12.525a.645.645 0 01-.025-.886l.025-.025 7.794-7.46A.61.61 0 0114.387 4z"
|
|
109
109
|
})
|
|
110
110
|
}));
|
|
111
111
|
};
|
|
112
|
-
export {
|
|
112
|
+
export { v as default };
|
|
@@ -82,40 +82,40 @@ import { useIsInverseVariant as s } from "../../theme-variant-context.js";
|
|
|
82
82
|
import { vars as n } from "../../skins/skin-contract.css-mistica.js";
|
|
83
83
|
import { jsx as t } from "../../_virtual/jsx-runtime.js";
|
|
84
84
|
const v = (_param)=>{
|
|
85
|
-
var { color: r , size: e = 24 } = _param,
|
|
85
|
+
var { color: r , size: e = 24 } = _param, i = _objectWithoutProperties(_param, [
|
|
86
86
|
"color",
|
|
87
87
|
"size"
|
|
88
88
|
]);
|
|
89
|
-
const o = s(),
|
|
89
|
+
const o = s(), a = r != null ? r : o ? n.colors.inverse : n.colors.neutralHigh, { skinName: l } = h();
|
|
90
90
|
return l.match(/^blau/i) ? /* @__PURE__ */ t("svg", _objectSpreadProps(_objectSpread({
|
|
91
91
|
width: e,
|
|
92
92
|
height: e,
|
|
93
93
|
viewBox: "0 0 24 24",
|
|
94
94
|
role: "presentation"
|
|
95
|
-
},
|
|
95
|
+
}, i), {
|
|
96
96
|
children: /* @__PURE__ */ t("path", {
|
|
97
|
-
fill:
|
|
98
|
-
d: "
|
|
97
|
+
fill: a,
|
|
98
|
+
d: "M14.855 4.16a.535.535 0 010 .77L7.586 12l7.27 7.07a.535.535 0 010 .77.571.571 0 01-.793 0L6 12l8.063-7.84a.571.571 0 01.792 0z"
|
|
99
99
|
})
|
|
100
100
|
})) : l.match(/^o2/i) ? /* @__PURE__ */ t("svg", _objectSpreadProps(_objectSpread({
|
|
101
101
|
width: e,
|
|
102
102
|
height: e,
|
|
103
103
|
viewBox: "0 0 24 24",
|
|
104
104
|
role: "presentation"
|
|
105
|
-
},
|
|
105
|
+
}, i), {
|
|
106
106
|
children: /* @__PURE__ */ t("path", {
|
|
107
|
-
fill:
|
|
108
|
-
d: "
|
|
107
|
+
fill: a,
|
|
108
|
+
d: "M14.8 5.266a.79.79 0 000-1.049.641.641 0 00-.962 0L7.2 11.455A.777.777 0 007 12a.777.777 0 00.2.545l6.638 7.238c.266.29.697.29.963 0a.79.79 0 000-1.05L8.624 12l6.177-6.734z"
|
|
109
109
|
})
|
|
110
110
|
})) : /* @__PURE__ */ t("svg", _objectSpreadProps(_objectSpread({
|
|
111
111
|
width: e,
|
|
112
112
|
height: e,
|
|
113
113
|
viewBox: "0 0 24 24",
|
|
114
114
|
role: "presentation"
|
|
115
|
-
},
|
|
115
|
+
}, i), {
|
|
116
116
|
children: /* @__PURE__ */ t("path", {
|
|
117
|
-
fill:
|
|
118
|
-
d: "
|
|
117
|
+
fill: a,
|
|
118
|
+
d: "M14.161 4.024c.235 0 .46.105.617.285a.928.928 0 01-.048 1.257L8 12.083l6.78 6.541c.343.335.22.9 0 1.108-.28.28-.82.392-1.163.08l-.02-.018-7.323-7.046A.905.905 0 016 12.095a.913.913 0 01.268-.658l7.325-7.176a.803.803 0 01.568-.237z"
|
|
119
119
|
})
|
|
120
120
|
}));
|
|
121
121
|
};
|
|
@@ -95,7 +95,7 @@ const c = (_param)=>{
|
|
|
95
95
|
}, i), {
|
|
96
96
|
children: /* @__PURE__ */ t("path", {
|
|
97
97
|
fill: a,
|
|
98
|
-
d: "
|
|
98
|
+
d: "M9.111 4.117a.368.368 0 01.538 0l7.24 7.585c.118.124.142.31.071.46a.41.41 0 01-.088.14l-6.008 6.296a.377.377 0 01-.55 0 .422.422 0 010-.577l5.765-6.04-6.968-7.3a.412.412 0 010-.564zm1.023 15.293a.577.577 0 00-.563-.59.577.577 0 00-.564.59c0 .326.252.59.564.59a.577.577 0 00.563-.59z"
|
|
99
99
|
})
|
|
100
100
|
})) : /* @__PURE__ */ t("svg", _objectSpreadProps(_objectSpread({
|
|
101
101
|
width: e,
|
|
@@ -105,7 +105,7 @@ const c = (_param)=>{
|
|
|
105
105
|
}, i), {
|
|
106
106
|
children: /* @__PURE__ */ t("path", {
|
|
107
107
|
fill: a,
|
|
108
|
-
d: "
|
|
108
|
+
d: "M9.613 20a.583.583 0 01-.442-.198.644.644 0 010-.875l7.356-6.99-7.318-6.865A.635.635 0 019.17 4.2a.585.585 0 01.846-.037l7.794 7.312a.645.645 0 01.025.886l-.024.025-7.795 7.46a.61.61 0 01-.404.154z"
|
|
109
109
|
})
|
|
110
110
|
}));
|
|
111
111
|
};
|
|
@@ -105,7 +105,7 @@ const d = (_param)=>{
|
|
|
105
105
|
}, i), {
|
|
106
106
|
children: /* @__PURE__ */ t("path", {
|
|
107
107
|
fill: a,
|
|
108
|
-
d: "
|
|
108
|
+
d: "M9.2 18.733a.79.79 0 000 1.05.64.64 0 00.962 0l6.639-7.238A.777.777 0 0017 12a.777.777 0 00-.2-.545l-6.638-7.238a.641.641 0 00-.963 0 .79.79 0 000 1.05L15.376 12l-6.177 6.733z"
|
|
109
109
|
})
|
|
110
110
|
})) : /* @__PURE__ */ t("svg", _objectSpreadProps(_objectSpread({
|
|
111
111
|
width: e,
|
|
@@ -115,7 +115,7 @@ const d = (_param)=>{
|
|
|
115
115
|
}, i), {
|
|
116
116
|
children: /* @__PURE__ */ t("path", {
|
|
117
117
|
fill: a,
|
|
118
|
-
d: "
|
|
118
|
+
d: "M9.839 20a.823.823 0 01-.617-.285.928.928 0 01.048-1.256L16 11.94 9.22 5.4c-.343-.335-.22-.9 0-1.108.28-.28.82-.392 1.163-.08l.02.018 7.323 7.046a.905.905 0 01.274.654.913.913 0 01-.268.658l-7.325 7.175A.803.803 0 019.84 20z"
|
|
119
119
|
})
|
|
120
120
|
}));
|
|
121
121
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import l from "classnames";
|
|
2
|
+
import * as m from "react";
|
|
3
|
+
import { scroll as s, noScrollbar as t } from "./horizontal-scroll.css-mistica.js";
|
|
4
|
+
import { jsx as c } from "./_virtual/jsx-runtime.js";
|
|
5
|
+
const n = /*#__PURE__*/ m.forwardRef((param, a)=>/* @__PURE__ */ {
|
|
6
|
+
let { children: r , noScrollbar: o } = param;
|
|
7
|
+
return c("div", {
|
|
8
|
+
className: l(s, {
|
|
9
|
+
[t]: o
|
|
10
|
+
}),
|
|
11
|
+
ref: a,
|
|
12
|
+
children: r
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
export { n as default };
|