@telefonica/mistica 14.8.0 → 14.10.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/chip.css-mistica.js +10 -9
- package/dist/chip.css.d.ts +1 -0
- package/dist/chip.d.ts +21 -2
- package/dist/chip.js +38 -25
- 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/chip.css-mistica.js +6 -6
- package/dist-es/chip.js +57 -44
- 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
|
@@ -113,7 +113,7 @@ const d = (_param)=>{
|
|
|
113
113
|
}, i), {
|
|
114
114
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("path", {
|
|
115
115
|
fill: a,
|
|
116
|
-
d: "
|
|
116
|
+
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"
|
|
117
117
|
})
|
|
118
118
|
})) : /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("svg", _objectSpreadProps(_objectSpread({
|
|
119
119
|
width: e,
|
|
@@ -123,7 +123,7 @@ const d = (_param)=>{
|
|
|
123
123
|
}, i), {
|
|
124
124
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("path", {
|
|
125
125
|
fill: a,
|
|
126
|
-
d: "
|
|
126
|
+
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"
|
|
127
127
|
})
|
|
128
128
|
}));
|
|
129
129
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
noScrollbar: ()=>m,
|
|
13
|
+
scroll: ()=>v
|
|
14
|
+
});
|
|
15
|
+
require("./sprinkles.css.ts.vanilla.js");
|
|
16
|
+
require("./responsive-layout.css.ts.vanilla.js");
|
|
17
|
+
require("./horizontal-scroll.css.ts.vanilla.js");
|
|
18
|
+
var m = "_1gl3gmv2", v = "_1gl3gmv1 _1y2v1nf5q";
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>n
|
|
8
|
+
});
|
|
9
|
+
const _classnames = /*#__PURE__*/ _interopRequireDefault(require("classnames"));
|
|
10
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
11
|
+
const _horizontalScrollCssMisticaJs = require("./horizontal-scroll.css-mistica.js");
|
|
12
|
+
const _jsxRuntimeJs = require("./_virtual/jsx-runtime.js");
|
|
13
|
+
function _interopRequireDefault(obj) {
|
|
14
|
+
return obj && obj.__esModule ? obj : {
|
|
15
|
+
default: obj
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
19
|
+
if (typeof WeakMap !== "function") return null;
|
|
20
|
+
var cacheBabelInterop = new WeakMap();
|
|
21
|
+
var cacheNodeInterop = new WeakMap();
|
|
22
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
23
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
24
|
+
})(nodeInterop);
|
|
25
|
+
}
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
27
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
28
|
+
return obj;
|
|
29
|
+
}
|
|
30
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
31
|
+
return {
|
|
32
|
+
default: obj
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
36
|
+
if (cache && cache.has(obj)) {
|
|
37
|
+
return cache.get(obj);
|
|
38
|
+
}
|
|
39
|
+
var newObj = {};
|
|
40
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
41
|
+
for(var key in obj){
|
|
42
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
43
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
44
|
+
if (desc && (desc.get || desc.set)) {
|
|
45
|
+
Object.defineProperty(newObj, key, desc);
|
|
46
|
+
} else {
|
|
47
|
+
newObj[key] = obj[key];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
newObj.default = obj;
|
|
52
|
+
if (cache) {
|
|
53
|
+
cache.set(obj, newObj);
|
|
54
|
+
}
|
|
55
|
+
return newObj;
|
|
56
|
+
}
|
|
57
|
+
const n = /*#__PURE__*/ _react.forwardRef((param, a)=>/* @__PURE__ */ {
|
|
58
|
+
let { children: r , noScrollbar: o } = param;
|
|
59
|
+
return (0, _jsxRuntimeJs.jsx)("div", {
|
|
60
|
+
className: (0, _classnames.default)(_horizontalScrollCssMisticaJs.scroll, {
|
|
61
|
+
[_horizontalScrollCssMisticaJs.noScrollbar]: o
|
|
62
|
+
}),
|
|
63
|
+
ref: a,
|
|
64
|
+
children: r
|
|
65
|
+
});
|
|
66
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export { default as RadioButton, RadioGroup } from './radio-button';
|
|
|
47
47
|
export { default as NegativeBox } from './negative-box';
|
|
48
48
|
export { default as Tabs } from './tabs';
|
|
49
49
|
export { default as Inline } from './inline';
|
|
50
|
+
export { default as HorizontalScroll } from './horizontal-scroll';
|
|
50
51
|
export { default as HighlightedCard } from './highlighted-card';
|
|
51
52
|
export { default as Stepper } from './stepper';
|
|
52
53
|
export { default as ProgressBar } from './progress-bar';
|
|
@@ -89,6 +90,7 @@ export { default as PasswordField } from './password-field';
|
|
|
89
90
|
export { default as DoubleField } from './double-field';
|
|
90
91
|
export { default as IbanField } from './iban-field';
|
|
91
92
|
export { useForm, useFieldProps } from './form-context';
|
|
93
|
+
export type { FormValues } from './form';
|
|
92
94
|
export { default as IconInfo } from './icons/icon-info';
|
|
93
95
|
export { default as IconChevron } from './icons/icon-chevron';
|
|
94
96
|
export { default as IconError } from './icons/icon-error';
|
package/dist/index.js
CHANGED
|
@@ -57,6 +57,7 @@ _export(exports, {
|
|
|
57
57
|
HeaderLayout: ()=>_headerJs.HeaderLayout,
|
|
58
58
|
Hero: ()=>_heroJs.default,
|
|
59
59
|
HighlightedCard: ()=>_highlightedCardJs.default,
|
|
60
|
+
HorizontalScroll: ()=>_horizontalScrollJs.default,
|
|
60
61
|
IbanField: ()=>_ibanFieldJs.default,
|
|
61
62
|
Icon2GFilled: ()=>_icon2GFilledJs.default,
|
|
62
63
|
Icon2GRegular: ()=>_icon2GRegularJs.default,
|
|
@@ -1882,6 +1883,7 @@ const _radioButtonJs = /*#__PURE__*/ _interopRequireWildcard(require("./radio-bu
|
|
|
1882
1883
|
const _negativeBoxJs = /*#__PURE__*/ _interopRequireDefault(require("./negative-box.js"));
|
|
1883
1884
|
const _tabsJs = /*#__PURE__*/ _interopRequireDefault(require("./tabs.js"));
|
|
1884
1885
|
const _inlineJs = /*#__PURE__*/ _interopRequireDefault(require("./inline.js"));
|
|
1886
|
+
const _horizontalScrollJs = /*#__PURE__*/ _interopRequireDefault(require("./horizontal-scroll.js"));
|
|
1885
1887
|
const _highlightedCardJs = /*#__PURE__*/ _interopRequireDefault(require("./highlighted-card.js"));
|
|
1886
1888
|
const _stepperJs = /*#__PURE__*/ _interopRequireDefault(require("./stepper.js"));
|
|
1887
1889
|
const _progressBarJs = /*#__PURE__*/ _interopRequireDefault(require("./progress-bar.js"));
|
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);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./sprinkles.css.ts.vanilla.js";
|
|
2
2
|
import "./chip.css.ts.vanilla.js";
|
|
3
|
-
var
|
|
4
|
-
light: "
|
|
5
|
-
dark: "
|
|
6
|
-
},
|
|
3
|
+
var c = "_1y2v1nf6d _1y2v1nf6r _1y2v1nf75 _1y2v1nf7j _1y2v1nf9o _1y2v1nf5k", t = {
|
|
4
|
+
light: "cc7htnb cc7htn9",
|
|
5
|
+
dark: "cc7htnc cc7htn9"
|
|
6
|
+
}, f = {
|
|
7
7
|
default: "cc7htn1 _1y2v1nf5r _1y2v1nf5z _1y2v1nf65 _1y2v1nf9n _1y2v1nf2u _1y2v1nf1s",
|
|
8
8
|
overAlternative: "cc7htn1 _1y2v1nf5r _1y2v1nf5z _1y2v1nf65 _1y2v1nf9n _1y2v1nf2x _1y2v1nf1s",
|
|
9
9
|
active: "cc7htn8 cc7htn2 cc7htn1 _1y2v1nf5r _1y2v1nf5z _1y2v1nf65 _1y2v1nf9n _1y2v1nf12 _1y2v1nf59"
|
|
10
|
-
},
|
|
11
|
-
export {
|
|
10
|
+
}, y = "cc7htnd", _ = "cc7htne";
|
|
11
|
+
export { c as button, t as chipInteractiveVariants, f as chipVariants, y as icon, _ as iconActive };
|