@telefonica/mistica 14.28.1 → 14.30.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/card.d.ts +17 -7
- package/dist/card.js +275 -267
- package/dist/community/advanced-data-card.d.ts +1 -1
- 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 +2 -1
- package/dist/index.js +7 -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/card.js +343 -338
- 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-es/list.js
CHANGED
|
@@ -79,22 +79,22 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
79
79
|
}
|
|
80
80
|
import { jsx as t, jsxs as k } from "react/jsx-runtime";
|
|
81
81
|
import * as P from "react";
|
|
82
|
-
import
|
|
83
|
-
import { BaseTouchable as
|
|
82
|
+
import i from "classnames";
|
|
83
|
+
import { BaseTouchable as T } from "./touchable.js";
|
|
84
84
|
import { Text1 as ne, Text3 as re, Text2 as O } from "./text.js";
|
|
85
|
-
import
|
|
85
|
+
import u from "./box.js";
|
|
86
86
|
import L from "./stack.js";
|
|
87
87
|
import J from "./badge.js";
|
|
88
|
-
import { useAriaId as
|
|
88
|
+
import { useAriaId as ae } from "./hooks.js";
|
|
89
89
|
import { useIsInverseVariant as p } from "./theme-variant-context.js";
|
|
90
|
-
import
|
|
90
|
+
import ie from "./icons/icon-chevron.js";
|
|
91
91
|
import oe from "./switch-component.js";
|
|
92
92
|
import K, { useRadioContext as ce } from "./radio-button.js";
|
|
93
93
|
import se from "./checkbox.js";
|
|
94
94
|
import { Boxed as de } from "./boxed.js";
|
|
95
95
|
import le from "./divider.js";
|
|
96
96
|
import { getPrefixedDataAttributes as he } from "./utils/dom.js";
|
|
97
|
-
import { rowContent as B, touchableBackground as R, touchableBackgroundInverse as C, pointer as
|
|
97
|
+
import { rowContent as B, touchableBackground as R, touchableBackgroundInverse as C, pointer as S, dualActionContainer as Q, dualActionLeft as U, dualActionDivider as Z, content as ue, center as M, disabled as I, asset as me, rowBody as fe, right as ge, rightRestrictedWidth as ve, detail as be, detailRight as _, dualActionRight as xe, badge as we } from "./list.css-mistica.js";
|
|
98
98
|
import { vars as N } from "./skins/skin-contract.css-mistica.js";
|
|
99
99
|
const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
100
100
|
centerY: n
|
|
@@ -106,45 +106,45 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
106
106
|
},
|
|
107
107
|
children: e
|
|
108
108
|
}) : e, ye = (param)=>{
|
|
109
|
-
let { withChevron: e , headline: n , title: r , titleLinesMax: o , subtitle:
|
|
110
|
-
const
|
|
109
|
+
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;
|
|
110
|
+
const h = p(), a = [
|
|
111
111
|
n,
|
|
112
112
|
r,
|
|
113
|
+
s,
|
|
113
114
|
d,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
].filter(Boolean).length === 1, f = ()=>T ? /* @__PURE__ */ t(m, {
|
|
115
|
+
X
|
|
116
|
+
].filter(Boolean).length === 1, f = ()=>A ? /* @__PURE__ */ t(u, {
|
|
117
117
|
paddingLeft: 16,
|
|
118
118
|
children: /* @__PURE__ */ t("div", {
|
|
119
|
-
className:
|
|
119
|
+
className: i(M, we, {
|
|
120
120
|
[I]: v
|
|
121
121
|
}),
|
|
122
|
-
children:
|
|
123
|
-
value:
|
|
122
|
+
children: A === !0 ? /* @__PURE__ */ t(J, {}) : /* @__PURE__ */ t(J, {
|
|
123
|
+
value: A
|
|
124
124
|
})
|
|
125
125
|
})
|
|
126
126
|
}) : null;
|
|
127
|
-
return /* @__PURE__ */ k(
|
|
127
|
+
return /* @__PURE__ */ k(u, {
|
|
128
128
|
paddingY: 16,
|
|
129
129
|
className: ue,
|
|
130
130
|
children: [
|
|
131
|
-
|
|
131
|
+
V && /* @__PURE__ */ t(u, {
|
|
132
132
|
paddingRight: 16,
|
|
133
|
-
className:
|
|
134
|
-
[
|
|
133
|
+
className: i({
|
|
134
|
+
[M]: a,
|
|
135
135
|
[I]: v
|
|
136
136
|
}),
|
|
137
137
|
children: /* @__PURE__ */ t("div", {
|
|
138
138
|
className: me,
|
|
139
|
-
children:
|
|
139
|
+
children: V
|
|
140
140
|
})
|
|
141
141
|
}),
|
|
142
142
|
/* @__PURE__ */ t("div", {
|
|
143
|
-
className:
|
|
143
|
+
className: i(fe, {
|
|
144
144
|
[I]: v
|
|
145
145
|
}),
|
|
146
146
|
style: {
|
|
147
|
-
justifyContent:
|
|
147
|
+
justifyContent: a ? "center" : "flex-start"
|
|
148
148
|
},
|
|
149
149
|
children: /* @__PURE__ */ k(L, {
|
|
150
150
|
space: 4,
|
|
@@ -162,25 +162,25 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
162
162
|
regular: !0,
|
|
163
163
|
color: N.colors.textPrimary,
|
|
164
164
|
truncate: o,
|
|
165
|
-
id:
|
|
165
|
+
id: l,
|
|
166
166
|
hyphens: "auto",
|
|
167
167
|
children: r
|
|
168
168
|
}),
|
|
169
|
-
|
|
169
|
+
s && /* @__PURE__ */ t(O, {
|
|
170
170
|
regular: !0,
|
|
171
171
|
color: N.colors.textSecondary,
|
|
172
172
|
truncate: x,
|
|
173
173
|
hyphens: "auto",
|
|
174
|
-
children:
|
|
174
|
+
children: s
|
|
175
175
|
}),
|
|
176
|
-
|
|
176
|
+
d && /* @__PURE__ */ t(O, {
|
|
177
177
|
regular: !0,
|
|
178
178
|
color: N.colors.textSecondary,
|
|
179
|
-
truncate:
|
|
179
|
+
truncate: W,
|
|
180
180
|
hyphens: "auto",
|
|
181
|
-
children:
|
|
181
|
+
children: d
|
|
182
182
|
}),
|
|
183
|
-
|
|
183
|
+
X
|
|
184
184
|
]
|
|
185
185
|
})
|
|
186
186
|
]
|
|
@@ -188,42 +188,42 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
188
188
|
}),
|
|
189
189
|
f(),
|
|
190
190
|
/* @__PURE__ */ k("div", {
|
|
191
|
-
className:
|
|
192
|
-
[ge]: !!
|
|
193
|
-
[ve]: !!
|
|
191
|
+
className: i({
|
|
192
|
+
[ge]: !!m || g !== "basic",
|
|
193
|
+
[ve]: !!m
|
|
194
194
|
}),
|
|
195
195
|
children: [
|
|
196
|
-
|
|
197
|
-
className:
|
|
196
|
+
m && /* @__PURE__ */ t("div", {
|
|
197
|
+
className: i(M, be, {
|
|
198
198
|
[I]: v
|
|
199
199
|
}),
|
|
200
200
|
children: /* @__PURE__ */ t(O, {
|
|
201
201
|
regular: !0,
|
|
202
202
|
color: N.colors.textSecondary,
|
|
203
203
|
hyphens: "auto",
|
|
204
|
-
children:
|
|
204
|
+
children: m
|
|
205
205
|
})
|
|
206
206
|
}),
|
|
207
207
|
g === "control" && /* @__PURE__ */ t("div", {
|
|
208
|
-
className:
|
|
209
|
-
[_]: !!
|
|
208
|
+
className: i({
|
|
209
|
+
[_]: !!m
|
|
210
210
|
}),
|
|
211
|
-
children: $(
|
|
211
|
+
children: $(E, a)
|
|
212
212
|
}),
|
|
213
213
|
g === "custom" && /* @__PURE__ */ t("div", {
|
|
214
|
-
className:
|
|
215
|
-
[_]: !!
|
|
214
|
+
className: i({
|
|
215
|
+
[_]: !!m,
|
|
216
216
|
[I]: v
|
|
217
217
|
}),
|
|
218
|
-
children: $(
|
|
218
|
+
children: $(E, a)
|
|
219
219
|
}),
|
|
220
|
-
(g === "chevron" || g === "custom" && e) && /* @__PURE__ */ t(
|
|
221
|
-
paddingLeft:
|
|
222
|
-
className:
|
|
220
|
+
(g === "chevron" || g === "custom" && e) && /* @__PURE__ */ t(u, {
|
|
221
|
+
paddingLeft: m || g === "custom" ? 4 : 0,
|
|
222
|
+
className: i(M, {
|
|
223
223
|
[I]: v
|
|
224
224
|
}),
|
|
225
|
-
children: /* @__PURE__ */ t(
|
|
226
|
-
color:
|
|
225
|
+
children: /* @__PURE__ */ t(ie, {
|
|
226
|
+
color: h ? N.colors.inverse : N.colors.neutralMedium,
|
|
227
227
|
direction: "right"
|
|
228
228
|
})
|
|
229
229
|
})
|
|
@@ -233,103 +233,103 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
233
233
|
});
|
|
234
234
|
}, Re = (param)=>{
|
|
235
235
|
let { value: e , defaultValue: n , onChange: r } = param;
|
|
236
|
-
const o = e !== void 0, [
|
|
237
|
-
o || x(!
|
|
236
|
+
const o = e !== void 0, [s, x] = P.useState(!!n), d = ()=>{
|
|
237
|
+
o || x(!s), r && r(o ? !e : !s);
|
|
238
238
|
};
|
|
239
239
|
return o ? [
|
|
240
240
|
!!e,
|
|
241
|
-
|
|
241
|
+
d
|
|
242
242
|
] : [
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
s,
|
|
244
|
+
d
|
|
245
245
|
];
|
|
246
246
|
}, Ce = (e)=>e.switch !== void 0, Ne = (e)=>e.checkbox !== void 0, ke = (e)=>e.radioValue !== void 0, ee = /*#__PURE__*/ P.forwardRef((e, n)=>{
|
|
247
|
-
const r =
|
|
248
|
-
let { type:
|
|
247
|
+
const r = ae(), o = p(), { 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 = ce(), 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__ */ {
|
|
248
|
+
let { type: c , right: b , labelId: D } = param;
|
|
249
249
|
return t(ye, {
|
|
250
|
-
asset:
|
|
250
|
+
asset: s,
|
|
251
251
|
headline: x,
|
|
252
|
-
title:
|
|
253
|
-
subtitle:
|
|
252
|
+
title: d,
|
|
253
|
+
subtitle: m,
|
|
254
254
|
description: g,
|
|
255
|
-
badge:
|
|
256
|
-
titleLinesMax:
|
|
257
|
-
subtitleLinesMax:
|
|
258
|
-
descriptionLinesMax:
|
|
259
|
-
detail:
|
|
260
|
-
type:
|
|
255
|
+
badge: X,
|
|
256
|
+
titleLinesMax: W,
|
|
257
|
+
subtitleLinesMax: V,
|
|
258
|
+
descriptionLinesMax: A,
|
|
259
|
+
detail: E,
|
|
260
|
+
type: c,
|
|
261
261
|
right: b,
|
|
262
262
|
extra: v,
|
|
263
|
-
labelId:
|
|
264
|
-
disabled:
|
|
263
|
+
labelId: D,
|
|
264
|
+
disabled: a,
|
|
265
265
|
withChevron: !!e.onPress || !!e.href || !!e.to
|
|
266
266
|
});
|
|
267
|
-
}, j = (
|
|
267
|
+
}, j = (c)=>{
|
|
268
268
|
let b = "chevron";
|
|
269
|
-
return
|
|
269
|
+
return c.right === null && (b = "basic"), c.right && (b = "custom"), /* @__PURE__ */ t(u, {
|
|
270
270
|
paddingX: 16,
|
|
271
271
|
ref: n,
|
|
272
272
|
children: y({
|
|
273
273
|
type: b,
|
|
274
|
-
right:
|
|
274
|
+
right: c.right
|
|
275
275
|
})
|
|
276
276
|
});
|
|
277
277
|
};
|
|
278
|
-
if (e.onPress && !Ce(e) && !Ne(e) && !ke(e)) return /* @__PURE__ */ t(
|
|
278
|
+
if (e.onPress && !Ce(e) && !Ne(e) && !ke(e)) return /* @__PURE__ */ t(T, {
|
|
279
279
|
ref: n,
|
|
280
|
-
className:
|
|
280
|
+
className: i(B, {
|
|
281
281
|
[R]: f,
|
|
282
282
|
[C]: w,
|
|
283
|
-
[
|
|
283
|
+
[S]: !a
|
|
284
284
|
}),
|
|
285
285
|
trackingEvent: e.trackingEvent,
|
|
286
286
|
onPress: e.onPress,
|
|
287
|
-
role:
|
|
288
|
-
dataAttributes:
|
|
289
|
-
disabled:
|
|
287
|
+
role: l,
|
|
288
|
+
dataAttributes: h,
|
|
289
|
+
disabled: a,
|
|
290
290
|
children: j(e)
|
|
291
291
|
});
|
|
292
|
-
if (e.to) return /* @__PURE__ */ t(
|
|
293
|
-
className:
|
|
292
|
+
if (e.to) return /* @__PURE__ */ t(T, {
|
|
293
|
+
className: i(B, {
|
|
294
294
|
[R]: f,
|
|
295
295
|
[C]: w,
|
|
296
|
-
[
|
|
296
|
+
[S]: !a
|
|
297
297
|
}),
|
|
298
298
|
trackingEvent: e.trackingEvent,
|
|
299
299
|
to: e.to,
|
|
300
300
|
fullPageOnWebView: e.fullPageOnWebView,
|
|
301
|
-
role:
|
|
302
|
-
dataAttributes:
|
|
303
|
-
disabled:
|
|
301
|
+
role: l,
|
|
302
|
+
dataAttributes: h,
|
|
303
|
+
disabled: a,
|
|
304
304
|
children: j(e)
|
|
305
305
|
});
|
|
306
|
-
if (e.href) return /* @__PURE__ */ t(
|
|
307
|
-
className:
|
|
306
|
+
if (e.href) return /* @__PURE__ */ t(T, {
|
|
307
|
+
className: i(B, {
|
|
308
308
|
[R]: f,
|
|
309
309
|
[C]: w,
|
|
310
|
-
[
|
|
310
|
+
[S]: !a
|
|
311
311
|
}),
|
|
312
312
|
trackingEvent: e.trackingEvent,
|
|
313
313
|
href: e.href,
|
|
314
314
|
newTab: e.newTab,
|
|
315
|
-
role:
|
|
316
|
-
dataAttributes:
|
|
317
|
-
disabled:
|
|
315
|
+
role: l,
|
|
316
|
+
dataAttributes: h,
|
|
317
|
+
disabled: a,
|
|
318
318
|
children: j(e)
|
|
319
319
|
});
|
|
320
|
-
const z = (
|
|
321
|
-
var
|
|
320
|
+
const z = (c)=>{
|
|
321
|
+
var D, G;
|
|
322
322
|
var _ref, _ref1;
|
|
323
|
-
const b = (_ref1 = (_ref = (
|
|
323
|
+
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;
|
|
324
324
|
return e.onPress ? /* @__PURE__ */ k("div", {
|
|
325
325
|
className: Q,
|
|
326
326
|
children: [
|
|
327
|
-
/* @__PURE__ */ t(
|
|
328
|
-
dataAttributes:
|
|
329
|
-
disabled:
|
|
327
|
+
/* @__PURE__ */ t(T, {
|
|
328
|
+
dataAttributes: h,
|
|
329
|
+
disabled: a,
|
|
330
330
|
onPress: e.onPress,
|
|
331
|
-
role:
|
|
332
|
-
className:
|
|
331
|
+
role: l,
|
|
332
|
+
className: i(U, {
|
|
333
333
|
[R]: f,
|
|
334
334
|
[C]: w
|
|
335
335
|
}),
|
|
@@ -341,8 +341,8 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
341
341
|
/* @__PURE__ */ t("div", {
|
|
342
342
|
className: Z
|
|
343
343
|
}),
|
|
344
|
-
/* @__PURE__ */ t(
|
|
345
|
-
disabled:
|
|
344
|
+
/* @__PURE__ */ t(c, {
|
|
345
|
+
disabled: a,
|
|
346
346
|
name: b,
|
|
347
347
|
checked: Y,
|
|
348
348
|
"aria-labelledby": r,
|
|
@@ -357,22 +357,22 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
357
357
|
})
|
|
358
358
|
]
|
|
359
359
|
}) : /* @__PURE__ */ t("div", {
|
|
360
|
-
className:
|
|
360
|
+
className: i(B, {
|
|
361
361
|
[R]: f,
|
|
362
362
|
[C]: w,
|
|
363
|
-
[
|
|
363
|
+
[S]: !a
|
|
364
364
|
}),
|
|
365
|
-
children: /* @__PURE__ */ t(
|
|
366
|
-
disabled:
|
|
367
|
-
dataAttributes:
|
|
365
|
+
children: /* @__PURE__ */ t(c, {
|
|
366
|
+
disabled: a,
|
|
367
|
+
dataAttributes: h,
|
|
368
368
|
name: b,
|
|
369
369
|
checked: Y,
|
|
370
370
|
onChange: q,
|
|
371
371
|
render: (param)=>/* @__PURE__ */ {
|
|
372
372
|
let { controlElement: H , labelId: te } = param;
|
|
373
|
-
return t(
|
|
373
|
+
return t(u, {
|
|
374
374
|
paddingX: 16,
|
|
375
|
-
role:
|
|
375
|
+
role: l,
|
|
376
376
|
children: y({
|
|
377
377
|
labelId: te,
|
|
378
378
|
type: "control",
|
|
@@ -389,11 +389,11 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
389
389
|
return e.switch ? z(oe) : e.checkbox ? z(se) : e.radioValue ? e.onPress ? /* @__PURE__ */ k("div", {
|
|
390
390
|
className: Q,
|
|
391
391
|
children: [
|
|
392
|
-
/* @__PURE__ */ t(
|
|
393
|
-
disabled:
|
|
392
|
+
/* @__PURE__ */ t(T, {
|
|
393
|
+
disabled: a,
|
|
394
394
|
onPress: e.onPress,
|
|
395
|
-
role:
|
|
396
|
-
className:
|
|
395
|
+
role: l,
|
|
396
|
+
className: i(U, {
|
|
397
397
|
[R]: f,
|
|
398
398
|
[C]: w
|
|
399
399
|
}),
|
|
@@ -406,53 +406,53 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
406
406
|
className: Z
|
|
407
407
|
}),
|
|
408
408
|
/* @__PURE__ */ t(K, {
|
|
409
|
-
dataAttributes:
|
|
409
|
+
dataAttributes: h,
|
|
410
410
|
value: e.radioValue,
|
|
411
411
|
"aria-labelledby": r,
|
|
412
412
|
render: (param)=>/* @__PURE__ */ {
|
|
413
|
-
let { controlElement:
|
|
413
|
+
let { controlElement: c } = param;
|
|
414
414
|
return t(L, {
|
|
415
415
|
space: "around",
|
|
416
|
-
children: /* @__PURE__ */ t(
|
|
416
|
+
children: /* @__PURE__ */ t(u, {
|
|
417
417
|
paddingX: 16,
|
|
418
|
-
children:
|
|
418
|
+
children: c
|
|
419
419
|
})
|
|
420
420
|
});
|
|
421
421
|
}
|
|
422
422
|
})
|
|
423
423
|
]
|
|
424
424
|
}) : /* @__PURE__ */ t("div", {
|
|
425
|
-
className:
|
|
425
|
+
className: i(B, {
|
|
426
426
|
[R]: f,
|
|
427
427
|
[C]: w,
|
|
428
|
-
[
|
|
428
|
+
[S]: !a
|
|
429
429
|
}),
|
|
430
|
-
role:
|
|
430
|
+
role: l,
|
|
431
431
|
ref: n,
|
|
432
432
|
children: /* @__PURE__ */ t(K, {
|
|
433
|
-
dataAttributes:
|
|
433
|
+
dataAttributes: h,
|
|
434
434
|
value: e.radioValue,
|
|
435
435
|
"aria-labelledby": r,
|
|
436
436
|
render: (param)=>/* @__PURE__ */ {
|
|
437
|
-
let { controlElement:
|
|
438
|
-
return t(
|
|
437
|
+
let { controlElement: c } = param;
|
|
438
|
+
return t(u, {
|
|
439
439
|
paddingX: 16,
|
|
440
440
|
children: y({
|
|
441
441
|
labelId: r,
|
|
442
442
|
type: "control",
|
|
443
443
|
right: ()=>/* @__PURE__ */ t(L, {
|
|
444
444
|
space: "around",
|
|
445
|
-
children:
|
|
445
|
+
children: c
|
|
446
446
|
})
|
|
447
447
|
})
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
450
|
})
|
|
451
|
-
}) : /* @__PURE__ */ t(
|
|
451
|
+
}) : /* @__PURE__ */ t(u, {
|
|
452
452
|
paddingX: 16,
|
|
453
453
|
className: B,
|
|
454
|
-
role:
|
|
455
|
-
dataAttributes:
|
|
454
|
+
role: l,
|
|
455
|
+
dataAttributes: h,
|
|
456
456
|
children: e.right ? y({
|
|
457
457
|
type: "custom",
|
|
458
458
|
right: e.right
|
|
@@ -471,21 +471,21 @@ const $ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
|
|
|
471
471
|
}, e)
|
|
472
472
|
}));
|
|
473
473
|
}), ze = (param)=>{
|
|
474
|
-
let { children: e , ariaLabelledby: n , role: r , dataAttributes: o
|
|
475
|
-
const
|
|
474
|
+
let { children: e , ariaLabelledby: n , role: r , dataAttributes: o } = param;
|
|
475
|
+
const s = P.Children.count(e) - 1;
|
|
476
476
|
return /* @__PURE__ */ t("div", _object_spread_props(_object_spread({
|
|
477
477
|
role: r,
|
|
478
478
|
"aria-labelledby": n
|
|
479
479
|
}, he(o, "RowList")), {
|
|
480
|
-
children: P.Children.toArray(e).filter(Boolean).map((
|
|
480
|
+
children: P.Children.toArray(e).filter(Boolean).map((x, d)=>/* @__PURE__ */ k(P.Fragment, {
|
|
481
481
|
children: [
|
|
482
|
-
|
|
483
|
-
|
|
482
|
+
x,
|
|
483
|
+
d < s && /* @__PURE__ */ t(u, {
|
|
484
484
|
paddingX: 16,
|
|
485
485
|
children: /* @__PURE__ */ t(le, {})
|
|
486
486
|
})
|
|
487
487
|
]
|
|
488
|
-
},
|
|
488
|
+
}, d))
|
|
489
489
|
}));
|
|
490
490
|
}, Ge = /*#__PURE__*/ P.forwardRef((_param, r)=>/* @__PURE__ */ {
|
|
491
491
|
var { dataAttributes: e } = _param, n = _object_without_properties(_param, [
|
package/dist-es/loading-bar.js
CHANGED
|
@@ -52,34 +52,35 @@ function _object_spread_props(target, source) {
|
|
|
52
52
|
}
|
|
53
53
|
import { jsx as e } from "react/jsx-runtime";
|
|
54
54
|
import { CSSTransition as i } from "react-transition-group";
|
|
55
|
-
import { Portal as
|
|
56
|
-
import { TRANSITION_DURATION_MS as
|
|
57
|
-
import { getPrefixedDataAttributes as
|
|
58
|
-
|
|
55
|
+
import { Portal as n } from "./portal.js";
|
|
56
|
+
import { TRANSITION_DURATION_MS as o, enter as a, enterActive as s, exit as m, exitActive as c, portal as d, progressContainer as l, progress as p, innerProgress as f } from "./loading-bar.css-mistica.js";
|
|
57
|
+
import { getPrefixedDataAttributes as g } from "./utils/dom.js";
|
|
58
|
+
import { isRunningAcceptanceTest as u } from "./utils/platform.js";
|
|
59
|
+
const x = (param)=>/* @__PURE__ */ {
|
|
59
60
|
let { visible: r , dataAttributes: t } = param;
|
|
60
61
|
return e(i, {
|
|
61
62
|
in: r,
|
|
62
|
-
timeout:
|
|
63
|
+
timeout: u() ? 0 : o,
|
|
63
64
|
classNames: {
|
|
64
|
-
enter:
|
|
65
|
+
enter: a,
|
|
65
66
|
enterActive: s,
|
|
66
67
|
exit: m,
|
|
67
68
|
exitActive: c
|
|
68
69
|
},
|
|
69
70
|
unmountOnExit: !0,
|
|
70
|
-
children: /* @__PURE__ */ e(
|
|
71
|
+
children: /* @__PURE__ */ e(n, {
|
|
71
72
|
className: d,
|
|
72
73
|
children: /* @__PURE__ */ e("div", _object_spread_props(_object_spread({
|
|
73
74
|
className: l
|
|
74
|
-
},
|
|
75
|
+
}, g(t, "LoadingBar")), {
|
|
75
76
|
children: /* @__PURE__ */ e("div", {
|
|
76
77
|
className: p,
|
|
77
78
|
children: /* @__PURE__ */ e("div", {
|
|
78
|
-
className:
|
|
79
|
+
className: f
|
|
79
80
|
})
|
|
80
81
|
})
|
|
81
82
|
}))
|
|
82
83
|
})
|
|
83
84
|
});
|
|
84
|
-
},
|
|
85
|
-
export {
|
|
85
|
+
}, B = x;
|
|
86
|
+
export { B as default };
|
package/dist-es/menu.js
CHANGED
|
@@ -69,18 +69,19 @@ import Oe from "./divider.js";
|
|
|
69
69
|
import Te from "./checkbox.js";
|
|
70
70
|
import { CSSTransition as Se } from "react-transition-group";
|
|
71
71
|
import { combineRefs as Ce } from "./utils/common.js";
|
|
72
|
-
|
|
72
|
+
import { isRunningAcceptanceTest as Ee } from "./utils/platform.js";
|
|
73
|
+
const ke = 120, Q = /*#__PURE__*/ o.createContext({
|
|
73
74
|
focusedItem: null,
|
|
74
75
|
isMenuOpen: !1,
|
|
75
76
|
setFocusedItem: ()=>{},
|
|
76
77
|
closeMenu: ()=>{}
|
|
77
|
-
}),
|
|
78
|
+
}), Ne = ()=>o.useContext(Q), D = (r)=>r ? Array.from(r.querySelectorAll("[role=menuitem],[role=menuitemcheckbox]")) : [], Re = (r, d)=>{
|
|
78
79
|
if (!d) return null;
|
|
79
80
|
const f = D(r).indexOf(d);
|
|
80
81
|
return f < 0 ? null : f;
|
|
81
|
-
},
|
|
82
|
+
}, qe = (param)=>{
|
|
82
83
|
let { label: r , Icon: d , destructive: f , disabled: u , onPress: E , controlType: s , checked: p } = param;
|
|
83
|
-
const { focusedItem: n , setFocusedItem: v , closeMenu: i , isMenuOpen: k } =
|
|
84
|
+
const { focusedItem: n , setFocusedItem: v , closeMenu: i , isMenuOpen: k } = Ne(), c = o.useRef(null), h = f ? q.colors.textLinkDanger : q.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__ */ e(Te, {
|
|
84
85
|
ref: c,
|
|
85
86
|
name: r,
|
|
86
87
|
checked: p,
|
|
@@ -162,7 +163,7 @@ const Ee = 120, Q = /*#__PURE__*/ o.createContext({
|
|
|
162
163
|
onMouseLeave: ()=>v(null),
|
|
163
164
|
children: l()
|
|
164
165
|
});
|
|
165
|
-
},
|
|
166
|
+
}, Ve = (param)=>{
|
|
166
167
|
let { children: r } = param;
|
|
167
168
|
return r ? /* @__PURE__ */ C(U, {
|
|
168
169
|
children: [
|
|
@@ -174,7 +175,7 @@ const Ee = 120, Q = /*#__PURE__*/ o.createContext({
|
|
|
174
175
|
})
|
|
175
176
|
]
|
|
176
177
|
}) : /* @__PURE__ */ e(U, {});
|
|
177
|
-
}, V = 12, J = 8,
|
|
178
|
+
}, V = 12, J = 8, Je = (param)=>{
|
|
178
179
|
let { renderTarget: r , renderMenu: d , width: f , position: u = "left" , dataAttributes: E } = param;
|
|
179
180
|
const [s, p] = o.useState(!1), [n, v] = o.useState(null), [i, k] = o.useState(null), [c, h] = o.useState(null), [x, M] = o.useState(!1), m = o.useRef(null), [l, N] = o.useState(null), R = xe();
|
|
180
181
|
o.useEffect(()=>{
|
|
@@ -290,7 +291,7 @@ const Ee = 120, Q = /*#__PURE__*/ o.createContext({
|
|
|
290
291
|
children: /* @__PURE__ */ e(Se, {
|
|
291
292
|
in: s,
|
|
292
293
|
nodeRef: m,
|
|
293
|
-
timeout: Ee,
|
|
294
|
+
timeout: Ee() ? 0 : ke,
|
|
294
295
|
classNames: he,
|
|
295
296
|
mountOnEnter: !0,
|
|
296
297
|
unmountOnExit: !0,
|
|
@@ -331,4 +332,4 @@ const Ee = 120, Q = /*#__PURE__*/ o.createContext({
|
|
|
331
332
|
]
|
|
332
333
|
}));
|
|
333
334
|
};
|
|
334
|
-
export {
|
|
335
|
+
export { Je as Menu, qe as MenuItem, Ve as MenuSection };
|