@telefonica/mistica 16.1.1 → 16.3.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.css-mistica.js +12 -9
- package/dist/accordion.css.d.ts +1 -0
- package/dist/accordion.js +36 -39
- package/dist/align.css-mistica.js +12 -0
- package/dist/align.css.d.ts +1 -0
- package/dist/align.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/align.d.ts +12 -0
- package/dist/align.js +79 -0
- package/dist/box.css-mistica.js +41 -0
- package/dist/box.css.d.ts +23 -0
- package/dist/box.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/box.d.ts +4 -0
- package/dist/box.js +39 -31
- package/dist/boxed.css-mistica.js +10 -5
- package/dist/boxed.css.d.ts +3 -0
- package/dist/boxed.js +20 -24
- package/dist/callout.css-mistica.js +12 -4
- package/dist/callout.css.d.ts +1 -0
- package/dist/callout.js +14 -22
- package/dist/card.css-mistica.js +39 -24
- package/dist/card.css.d.ts +5 -0
- package/dist/card.js +236 -270
- package/dist/chip.css-mistica.js +19 -7
- package/dist/chip.css.d.ts +2 -0
- package/dist/chip.js +33 -49
- package/dist/community/advanced-data-card.css-mistica.js +30 -21
- package/dist/community/advanced-data-card.css.d.ts +4 -1
- package/dist/community/advanced-data-card.js +56 -68
- package/dist/empty-state-card.js +12 -11
- package/dist/empty-state.css-mistica.js +11 -8
- package/dist/empty-state.css.d.ts +1 -0
- package/dist/empty-state.js +10 -13
- package/dist/form.css-mistica.js +12 -0
- package/dist/form.css.d.ts +1 -0
- package/dist/form.js +8 -10
- package/dist/grid.css-mistica.js +143 -126
- package/dist/grid.css.d.ts +13 -0
- package/dist/grid.js +35 -38
- package/dist/hero.css-mistica.js +14 -8
- package/dist/hero.css.d.ts +2 -0
- package/dist/hero.js +35 -37
- package/dist/highlighted-card.js +15 -14
- package/dist/image.js +23 -25
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/dist/inline.js +10 -11
- package/dist/list.css-mistica.js +26 -17
- package/dist/list.css.d.ts +3 -0
- package/dist/list.js +120 -122
- package/dist/loading-screen.js +16 -16
- package/dist/logo-blau.d.ts +1 -1
- package/dist/logo-blau.js +10 -10
- package/dist/logo-common.d.ts +1 -0
- package/dist/logo-movistar.d.ts +1 -1
- package/dist/logo-movistar.js +4 -4
- package/dist/logo-o2-new.d.ts +1 -1
- package/dist/logo-o2-new.js +5 -5
- package/dist/logo-o2.d.ts +1 -1
- package/dist/logo-o2.js +5 -5
- package/dist/logo-telefonica.d.ts +1 -1
- package/dist/logo-telefonica.js +4 -4
- package/dist/logo-tu.d.ts +1 -1
- package/dist/logo-tu.js +5 -5
- package/dist/logo-vivo.d.ts +1 -1
- package/dist/logo-vivo.js +7 -7
- package/dist/logo.d.ts +9 -8
- package/dist/logo.js +125 -102
- package/dist/menu.css-mistica.js +9 -9
- package/dist/menu.js +9 -10
- package/dist/navigation-bar.css-mistica.js +23 -20
- package/dist/navigation-bar.css.d.ts +1 -0
- package/dist/navigation-bar.js +30 -37
- package/dist/package-version.js +1 -1
- package/dist/popover.d.ts +1 -0
- package/dist/popover.js +9 -10
- package/dist/sheet-common.js +3 -2
- package/dist/skeleton-base.js +10 -12
- package/dist/skeletons.css-mistica.js +11 -5
- package/dist/skeletons.css.d.ts +1 -0
- package/dist/snackbar.css-mistica.js +20 -14
- package/dist/snackbar.css.d.ts +3 -1
- package/dist/snackbar.js +65 -75
- package/dist/table.js +52 -51
- package/dist/tag.css-mistica.js +15 -4
- package/dist/tag.css.d.ts +2 -0
- package/dist/tag.js +22 -27
- package/dist/text-field-components.css-mistica.js +16 -10
- package/dist/text-field-components.css.d.ts +1 -0
- package/dist/text-field-components.js +32 -35
- package/dist/text-props.d.ts +60 -0
- package/dist/text-props.js +93 -0
- package/dist/text.d.ts +0 -62
- package/dist/text.js +156 -219
- package/dist/timer.js +42 -43
- package/dist/title.js +10 -9
- package/dist/tooltip.d.ts +3 -1
- package/dist/tooltip.js +106 -106
- package/dist/touchable.js +47 -42
- package/dist-es/accordion.css-mistica.js +3 -3
- package/dist-es/accordion.js +58 -61
- package/dist-es/align.css-mistica.js +3 -0
- package/dist-es/align.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/align.js +70 -0
- package/dist-es/box.css-mistica.js +24 -0
- package/dist-es/box.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/box.js +43 -35
- package/dist-es/boxed.css-mistica.js +5 -3
- package/dist-es/boxed.js +28 -32
- package/dist-es/callout.css-mistica.js +7 -2
- package/dist-es/callout.js +44 -52
- package/dist-es/card.css-mistica.js +4 -4
- package/dist-es/card.js +343 -377
- package/dist-es/chip.css-mistica.js +10 -4
- package/dist-es/chip.js +44 -60
- package/dist-es/community/advanced-data-card.css-mistica.js +7 -7
- package/dist-es/community/advanced-data-card.js +94 -106
- package/dist-es/empty-state-card.js +17 -16
- package/dist-es/empty-state.css-mistica.js +3 -3
- package/dist-es/empty-state.js +19 -22
- package/dist-es/form.css-mistica.js +3 -0
- package/dist-es/form.js +12 -14
- package/dist-es/grid.css-mistica.js +123 -112
- package/dist-es/grid.js +38 -41
- package/dist-es/hero.css-mistica.js +2 -2
- package/dist-es/hero.js +75 -77
- package/dist-es/highlighted-card.js +19 -18
- package/dist-es/image.js +28 -30
- package/dist-es/index.js +1844 -1843
- package/dist-es/inline.js +19 -20
- package/dist-es/list.css-mistica.js +2 -2
- package/dist-es/list.js +170 -172
- package/dist-es/loading-screen.js +30 -30
- package/dist-es/logo-blau.js +11 -11
- package/dist-es/logo-movistar.js +5 -5
- package/dist-es/logo-o2-new.js +8 -8
- package/dist-es/logo-o2.js +8 -8
- package/dist-es/logo-telefonica.js +4 -4
- package/dist-es/logo-tu.js +8 -8
- package/dist-es/logo-vivo.js +16 -16
- package/dist-es/logo.js +132 -109
- package/dist-es/menu.css-mistica.js +3 -3
- package/dist-es/menu.js +21 -22
- package/dist-es/navigation-bar.css-mistica.js +11 -11
- package/dist-es/navigation-bar.js +80 -87
- package/dist-es/package-version.js +1 -1
- package/dist-es/popover.js +17 -18
- package/dist-es/sheet-common.js +12 -11
- package/dist-es/skeleton-base.js +15 -17
- package/dist-es/skeletons.css-mistica.js +5 -2
- package/dist-es/snackbar.css-mistica.js +4 -4
- package/dist-es/snackbar.js +93 -103
- package/dist-es/style.css +1 -1
- package/dist-es/table.js +89 -88
- package/dist-es/tag.css-mistica.js +2 -2
- package/dist-es/tag.js +36 -41
- package/dist-es/text-field-components.css-mistica.js +5 -2
- package/dist-es/text-field-components.js +48 -51
- package/dist-es/text-props.js +52 -0
- package/dist-es/text.js +171 -231
- package/dist-es/timer.js +80 -81
- package/dist-es/title.js +14 -13
- package/dist-es/tooltip.js +148 -148
- package/dist-es/touchable.js +55 -50
- package/package.json +3 -3
- package/dist/sprinkles.css-mistica.js +0 -2494
- package/dist-es/sprinkles.css-mistica.js +0 -2485
package/dist-es/timer.js
CHANGED
|
@@ -52,20 +52,19 @@ function _object_spread_props(target, source) {
|
|
|
52
52
|
return target;
|
|
53
53
|
}
|
|
54
54
|
import { jsxs as v, jsx as m } from "react/jsx-runtime";
|
|
55
|
-
import
|
|
56
|
-
import * as
|
|
57
|
-
import ee from "./
|
|
58
|
-
import
|
|
59
|
-
import re from "./inline.js";
|
|
55
|
+
import F from "classnames";
|
|
56
|
+
import * as f from "react";
|
|
57
|
+
import { useTheme as k, useIsomorphicLayoutEffect as ee } from "./hooks.js";
|
|
58
|
+
import te from "./inline.js";
|
|
60
59
|
import q from "./screen-reader-only.js";
|
|
61
|
-
import { Text2 as ne, Text6 as
|
|
62
|
-
import { useThemeVariant as
|
|
63
|
-
import { inlineText as
|
|
64
|
-
import { getPrefixedDataAttributes as
|
|
65
|
-
import { isEqual as
|
|
66
|
-
import { isRunningAcceptanceTest as
|
|
67
|
-
import { timerDaysShortLabel as
|
|
68
|
-
const $ = 24, V = 60, X = 60, C = 1e3, Z = X * C, P = V * Z,
|
|
60
|
+
import { Text2 as ne, Text6 as re } from "./text.js";
|
|
61
|
+
import { useThemeVariant as se, ThemeVariant as ae } from "./theme-variant-context.js";
|
|
62
|
+
import { inlineText as j, timerWrapper as oe, shortLabelText as ie, boxedTimerValueContainer as le, timerDisplayValue as ue, boxedTimerDisplayValue as ce, unitContainer as T } from "./timer.css-mistica.js";
|
|
63
|
+
import { getPrefixedDataAttributes as z } from "./utils/dom.js";
|
|
64
|
+
import { isEqual as de } from "./utils/helpers.js";
|
|
65
|
+
import { isRunningAcceptanceTest as B } from "./utils/platform.js";
|
|
66
|
+
import { timerDaysShortLabel as me, timerHoursShortLabel as he, timerMinutesShortLabel as Le, timerSecondsShortLabel as be, timerDayLongLabel as R, timerHourLongLabel as _, timerMinuteLongLabel as G, timerSecondLongLabel as J, timerDaysLongLabel as O, timerHoursLongLabel as E, timerMinutesLongLabel as K, timerSecondsLongLabel as Q, timerAnd as A, timerDisplayMinutesLabel as x, timerDisplaySecondsLabel as w } from "./text-tokens.js";
|
|
67
|
+
const $ = 24, V = 60, X = 60, C = 1e3, Z = X * C, P = V * Z, ge = $ * P, H = (s, a, o, i)=>{
|
|
69
68
|
a = i === "none" && a === "days" ? "hours" : a, o = i === "none" && o === "days" ? "hours" : o;
|
|
70
69
|
const c = [
|
|
71
70
|
"seconds",
|
|
@@ -91,33 +90,33 @@ const $ = 24, V = 60, X = 60, C = 1e3, Z = X * C, P = V * Z, Se = $ * P, H = (s,
|
|
|
91
90
|
unit: "seconds",
|
|
92
91
|
value: s.seconds
|
|
93
92
|
}
|
|
94
|
-
].filter((c)=>H(c.unit, a, o, i)), Y = (s)=>
|
|
93
|
+
].filter((c)=>H(c.unit, a, o, i)), Y = (s)=>B() ? 0 : Math.max(0, (typeof s == "object" ? s : new Date(s)).valueOf() - Date.now()), U = (param)=>{
|
|
95
94
|
let { endTimestamp: s, labelType: a, minTimeUnit: o, maxTimeUnit: i, onProgress: c } = param;
|
|
96
|
-
const [L, b] =
|
|
97
|
-
|
|
95
|
+
const [L, b] = f.useState(Y(s));
|
|
96
|
+
ee(()=>{
|
|
98
97
|
let u;
|
|
99
98
|
const N = ()=>{
|
|
100
99
|
const I = Y(s);
|
|
101
100
|
b(I), I || clearInterval(u);
|
|
102
101
|
};
|
|
103
|
-
if (!
|
|
102
|
+
if (!B()) return N(), u = setInterval(N, C), ()=>clearInterval(u);
|
|
104
103
|
}, [
|
|
105
104
|
s
|
|
106
105
|
]);
|
|
107
|
-
const e = H("days", o, i, a), t = H("hours", o, i, a), p = H("minutes", o, i, a), l = e ? "days" : t ? "hours" : p ? "minutes" : "seconds", g = Math.floor(L / P) % 24, M = Math.floor(L / Z) % 60, D = Math.floor(L / C) % 60, h = Math.floor(L /
|
|
106
|
+
const e = H("days", o, i, a), t = H("hours", o, i, a), p = H("minutes", o, i, a), l = e ? "days" : t ? "hours" : p ? "minutes" : "seconds", g = Math.floor(L / P) % 24, M = Math.floor(L / Z) % 60, D = Math.floor(L / C) % 60, h = Math.floor(L / ge), S = l === "hours" ? g + h * $ : g, y = l === "minutes" ? M + V * (h * $ + S) : M, n = l === "seconds" ? D + X * (h * $ * V + S * V + y) : D, [r, d] = f.useState(W({
|
|
108
107
|
days: h,
|
|
109
108
|
hours: S,
|
|
110
|
-
minutes:
|
|
111
|
-
seconds:
|
|
109
|
+
minutes: y,
|
|
110
|
+
seconds: n
|
|
112
111
|
}, o, i, a));
|
|
113
|
-
return
|
|
112
|
+
return f.useEffect(()=>{
|
|
114
113
|
const u = W({
|
|
115
114
|
days: h,
|
|
116
115
|
hours: S,
|
|
117
|
-
minutes:
|
|
118
|
-
seconds:
|
|
116
|
+
minutes: y,
|
|
117
|
+
seconds: n
|
|
119
118
|
}, o, i, a);
|
|
120
|
-
if (!
|
|
119
|
+
if (!de(u, r)) {
|
|
121
120
|
d(u);
|
|
122
121
|
const N = {};
|
|
123
122
|
u.forEach((I)=>N[I.unit] = I.value), c == null || c(N);
|
|
@@ -125,27 +124,27 @@ const $ = 24, V = 60, X = 60, C = 1e3, Z = X * C, P = V * Z, Se = $ * P, H = (s,
|
|
|
125
124
|
}, [
|
|
126
125
|
h,
|
|
127
126
|
S,
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
y,
|
|
128
|
+
n,
|
|
130
129
|
a,
|
|
131
130
|
o,
|
|
132
131
|
i,
|
|
133
|
-
|
|
132
|
+
r,
|
|
134
133
|
c
|
|
135
|
-
]),
|
|
136
|
-
},
|
|
134
|
+
]), r;
|
|
135
|
+
}, Re = (param)=>{
|
|
137
136
|
let { endTimestamp: s, labelType: a = "none", minTimeUnit: o, maxTimeUnit: i, onProgress: c, dataAttributes: L, "aria-label": b } = param;
|
|
138
|
-
const { texts: e, t } = k(), p =
|
|
137
|
+
const { texts: e, t } = k(), p = f.useId(), l = U({
|
|
139
138
|
endTimestamp: s,
|
|
140
139
|
labelType: a,
|
|
141
140
|
minTimeUnit: o,
|
|
142
141
|
maxTimeUnit: i,
|
|
143
142
|
onProgress: c
|
|
144
143
|
}), g = {
|
|
145
|
-
days: e.timerDaysShortLabel || t(
|
|
146
|
-
hours: e.timerHoursShortLabel || t(
|
|
147
|
-
minutes: e.timerMinutesShortLabel || t(
|
|
148
|
-
seconds: e.timerSecondsShortLabel || t(
|
|
144
|
+
days: e.timerDaysShortLabel || t(me),
|
|
145
|
+
hours: e.timerHoursShortLabel || t(he),
|
|
146
|
+
minutes: e.timerMinutesShortLabel || t(Le),
|
|
147
|
+
seconds: e.timerSecondsShortLabel || t(be)
|
|
149
148
|
}, M = {
|
|
150
149
|
days: e.timerDayLongLabel || t(R),
|
|
151
150
|
hours: e.timerHourLongLabel || t(_),
|
|
@@ -156,76 +155,76 @@ const $ = 24, V = 60, X = 60, C = 1e3, Z = X * C, P = V * Z, Se = $ * P, H = (s,
|
|
|
156
155
|
hours: e.timerHoursLongLabel || t(E),
|
|
157
156
|
minutes: e.timerMinutesLongLabel || t(K),
|
|
158
157
|
seconds: e.timerSecondsLongLabel || t(Q)
|
|
159
|
-
}, h = (
|
|
160
|
-
const
|
|
158
|
+
}, h = (n)=>{
|
|
159
|
+
const r = Math.max(String(n).length, a === "long" ? 1 : 2);
|
|
161
160
|
return /* @__PURE__ */ m("span", {
|
|
162
|
-
className:
|
|
161
|
+
className: T,
|
|
163
162
|
style: {
|
|
164
|
-
minWidth: `${
|
|
163
|
+
minWidth: `${r}ch`
|
|
165
164
|
},
|
|
166
|
-
children: String(
|
|
165
|
+
children: String(n).padStart(r, "0")
|
|
167
166
|
});
|
|
168
167
|
}, S = ()=>{
|
|
169
168
|
switch(a){
|
|
170
169
|
case "none":
|
|
171
|
-
return l.map((
|
|
170
|
+
return l.map((n, r)=>/* @__PURE__ */ v(f.Fragment, {
|
|
172
171
|
children: [
|
|
173
|
-
|
|
174
|
-
h(
|
|
172
|
+
r > 0 && ":",
|
|
173
|
+
h(n.value)
|
|
175
174
|
]
|
|
176
|
-
},
|
|
175
|
+
}, r));
|
|
177
176
|
case "short":
|
|
178
|
-
return l.map((
|
|
177
|
+
return l.map((n, r)=>/* @__PURE__ */ v(f.Fragment, {
|
|
179
178
|
children: [
|
|
180
|
-
|
|
179
|
+
r > 0 && " ",
|
|
181
180
|
/* @__PURE__ */ v("span", {
|
|
182
|
-
className:
|
|
181
|
+
className: ie,
|
|
183
182
|
children: [
|
|
184
|
-
h(
|
|
185
|
-
` ${g[
|
|
183
|
+
h(n.value),
|
|
184
|
+
` ${g[n.unit]}`
|
|
186
185
|
]
|
|
187
186
|
})
|
|
188
187
|
]
|
|
189
|
-
},
|
|
188
|
+
}, r));
|
|
190
189
|
case "long":
|
|
191
190
|
default:
|
|
192
|
-
return l.map((
|
|
191
|
+
return l.map((n, r)=>/* @__PURE__ */ v(f.Fragment, {
|
|
193
192
|
children: [
|
|
194
|
-
|
|
195
|
-
h(
|
|
196
|
-
` ${
|
|
197
|
-
|
|
198
|
-
|
|
193
|
+
r > 0 && " ",
|
|
194
|
+
h(n.value),
|
|
195
|
+
` ${n.value === 1 ? M[n.unit] : D[n.unit]}`,
|
|
196
|
+
r === l.length - 2 && ` ${e.timerAnd || t(A)}`,
|
|
197
|
+
r < l.length - 2 && ","
|
|
199
198
|
]
|
|
200
|
-
},
|
|
199
|
+
}, r));
|
|
201
200
|
}
|
|
202
|
-
},
|
|
201
|
+
}, y = l.map((n, r)=>`${n.value} ${n.value === 1 ? M[n.unit] : D[n.unit]}${r === l.length - 1 ? "" : r === l.length - 2 ? ` ${e.timerAnd || t(A)} ` : ", "}`).join("");
|
|
203
202
|
return /* @__PURE__ */ v("span", _object_spread_props(_object_spread({
|
|
204
203
|
role: "timer",
|
|
205
204
|
"aria-labelledby": p,
|
|
206
|
-
className:
|
|
205
|
+
className: j,
|
|
207
206
|
style: {
|
|
208
207
|
// try to keep the timer in the same line without wrapping only when label is not long
|
|
209
208
|
display: a !== "long" ? "inline-block" : void 0
|
|
210
209
|
}
|
|
211
|
-
},
|
|
210
|
+
}, z(L, "TextTimer")), {
|
|
212
211
|
children: [
|
|
213
212
|
/* @__PURE__ */ m(q, {
|
|
214
213
|
children: /* @__PURE__ */ m("span", {
|
|
215
214
|
id: p,
|
|
216
|
-
children: b ? `${b}. ${
|
|
215
|
+
children: b ? `${b}. ${y}` : y
|
|
217
216
|
})
|
|
218
217
|
}),
|
|
219
218
|
/* @__PURE__ */ m("span", {
|
|
220
219
|
"aria-hidden": !0,
|
|
221
|
-
className:
|
|
220
|
+
className: j,
|
|
222
221
|
children: S()
|
|
223
222
|
})
|
|
224
223
|
]
|
|
225
224
|
}));
|
|
226
|
-
},
|
|
225
|
+
}, _e = (param)=>{
|
|
227
226
|
let { boxed: s, endTimestamp: a, minTimeUnit: o, maxTimeUnit: i, onProgress: c, dataAttributes: L, "aria-label": b } = param;
|
|
228
|
-
const { texts: e, t } = k(), p =
|
|
227
|
+
const { texts: e, t } = k(), p = f.useId(), l = se(), g = U({
|
|
229
228
|
endTimestamp: a,
|
|
230
229
|
minTimeUnit: o,
|
|
231
230
|
maxTimeUnit: i,
|
|
@@ -233,12 +232,12 @@ const $ = 24, V = 60, X = 60, C = 1e3, Z = X * C, P = V * Z, Se = $ * P, H = (s,
|
|
|
233
232
|
}), M = {
|
|
234
233
|
days: e.timerDayLongLabel || t(R),
|
|
235
234
|
hours: e.timerHourLongLabel || t(_),
|
|
236
|
-
minutes: e.timerDisplayMinutesLabel || t(
|
|
235
|
+
minutes: e.timerDisplayMinutesLabel || t(x),
|
|
237
236
|
seconds: e.timerDisplaySecondsLabel || t(w)
|
|
238
237
|
}, D = {
|
|
239
238
|
days: e.timerDaysLongLabel || t(O),
|
|
240
239
|
hours: e.timerHoursLongLabel || t(E),
|
|
241
|
-
minutes: e.timerDisplayMinutesLabel || t(
|
|
240
|
+
minutes: e.timerDisplayMinutesLabel || t(x),
|
|
242
241
|
seconds: e.timerDisplaySecondsLabel || t(w)
|
|
243
242
|
}, h = {
|
|
244
243
|
days: e.timerDayLongLabel || t(R),
|
|
@@ -250,29 +249,29 @@ const $ = 24, V = 60, X = 60, C = 1e3, Z = X * C, P = V * Z, Se = $ * P, H = (s,
|
|
|
250
249
|
hours: e.timerHoursLongLabel || t(E),
|
|
251
250
|
minutes: e.timerMinutesLongLabel || t(K),
|
|
252
251
|
seconds: e.timerSecondsLongLabel || t(Q)
|
|
253
|
-
},
|
|
252
|
+
}, y = (d)=>{
|
|
254
253
|
const u = Math.max(String(d).length, 2);
|
|
255
|
-
return /* @__PURE__ */ m(
|
|
254
|
+
return /* @__PURE__ */ m(re, {
|
|
256
255
|
children: /* @__PURE__ */ m("div", {
|
|
257
|
-
className:
|
|
256
|
+
className: T,
|
|
258
257
|
style: {
|
|
259
258
|
minWidth: `${u}ch`
|
|
260
259
|
},
|
|
261
260
|
children: String(d).padStart(u, "0")
|
|
262
261
|
})
|
|
263
262
|
});
|
|
264
|
-
},
|
|
265
|
-
className:
|
|
266
|
-
[
|
|
263
|
+
}, n = g.map((d, u)=>`${d.value} ${d.value === 1 ? h[d.unit] : S[d.unit]}${u === g.length - 1 ? "" : u === g.length - 2 ? ` ${e.timerAnd || t(A)} ` : ", "}`).join(""), r = ()=>g.map((d, u)=>/* @__PURE__ */ m("div", {
|
|
264
|
+
className: F({
|
|
265
|
+
[le[l]]: s
|
|
267
266
|
}),
|
|
268
|
-
children: /* @__PURE__ */ m(
|
|
267
|
+
children: /* @__PURE__ */ m(ae, {
|
|
269
268
|
variant: s ? "default" : l,
|
|
270
269
|
children: /* @__PURE__ */ v("div", {
|
|
271
|
-
className:
|
|
272
|
-
[
|
|
270
|
+
className: F(ue, {
|
|
271
|
+
[ce]: s
|
|
273
272
|
}),
|
|
274
273
|
children: [
|
|
275
|
-
|
|
274
|
+
y(d.value),
|
|
276
275
|
/* @__PURE__ */ m(ne, {
|
|
277
276
|
regular: !0,
|
|
278
277
|
children: d.value === 1 ? M[d.unit] : D[d.unit]
|
|
@@ -284,24 +283,24 @@ const $ = 24, V = 60, X = 60, C = 1e3, Z = X * C, P = V * Z, Se = $ * P, H = (s,
|
|
|
284
283
|
return /* @__PURE__ */ v("div", _object_spread_props(_object_spread({
|
|
285
284
|
role: "timer",
|
|
286
285
|
"aria-labelledby": p,
|
|
287
|
-
className:
|
|
288
|
-
},
|
|
286
|
+
className: oe
|
|
287
|
+
}, z(L, "Timer")), {
|
|
289
288
|
children: [
|
|
290
289
|
/* @__PURE__ */ m(q, {
|
|
291
290
|
children: /* @__PURE__ */ m("span", {
|
|
292
291
|
id: p,
|
|
293
|
-
children: b ? `${b}. ${
|
|
292
|
+
children: b ? `${b}. ${n}` : n
|
|
294
293
|
})
|
|
295
294
|
}),
|
|
296
295
|
/* @__PURE__ */ m("div", {
|
|
297
296
|
"aria-hidden": !0,
|
|
298
|
-
children: /* @__PURE__ */ m(
|
|
297
|
+
children: /* @__PURE__ */ m(te, {
|
|
299
298
|
space: s ? 8 : 16,
|
|
300
299
|
wrap: !0,
|
|
301
|
-
children:
|
|
300
|
+
children: r()
|
|
302
301
|
})
|
|
303
302
|
})
|
|
304
303
|
]
|
|
305
304
|
}));
|
|
306
305
|
};
|
|
307
|
-
export {
|
|
306
|
+
export { Re as TextTimer, _e as Timer };
|
package/dist-es/title.js
CHANGED
|
@@ -52,12 +52,13 @@ function _object_spread_props(target, source) {
|
|
|
52
52
|
return target;
|
|
53
53
|
}
|
|
54
54
|
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
55
|
-
import a, { Text1 as p,
|
|
55
|
+
import a, { Text1 as p, Text6 as h, Text2 as d } from "./text.js";
|
|
56
|
+
import { text3 as x } from "./text-props.js";
|
|
56
57
|
import T from "./inline.js";
|
|
57
58
|
import g from "./box.js";
|
|
58
|
-
import { vars as
|
|
59
|
+
import { vars as f } from "./skins/skin-contract.css-mistica.js";
|
|
59
60
|
import { useTheme as l } from "./hooks.js";
|
|
60
|
-
import { getPrefixedDataAttributes as
|
|
61
|
+
import { getPrefixedDataAttributes as u } from "./utils/dom.js";
|
|
61
62
|
const m = (param)=>{
|
|
62
63
|
let { title: e, right: i, dataAttributes: o } = param;
|
|
63
64
|
const { textPresets: r } = l();
|
|
@@ -69,21 +70,21 @@ const m = (param)=>{
|
|
|
69
70
|
e,
|
|
70
71
|
/* @__PURE__ */ t(g, {
|
|
71
72
|
paddingLeft: 16,
|
|
72
|
-
children: /* @__PURE__ */ t(
|
|
73
|
+
children: /* @__PURE__ */ t(d, {
|
|
73
74
|
weight: r.link.weight,
|
|
74
75
|
children: i
|
|
75
76
|
})
|
|
76
77
|
})
|
|
77
78
|
]
|
|
78
|
-
}) : /* @__PURE__ */ t("div", _object_spread_props(_object_spread({},
|
|
79
|
+
}) : /* @__PURE__ */ t("div", _object_spread_props(_object_spread({}, u(o)), {
|
|
79
80
|
children: e
|
|
80
81
|
}));
|
|
81
|
-
},
|
|
82
|
+
}, S = (param)=>{
|
|
82
83
|
let { children: e, as: i = "h3", id: o, right: r, dataAttributes: s } = param;
|
|
83
84
|
const { textPresets: n } = l();
|
|
84
85
|
return /* @__PURE__ */ t(m, {
|
|
85
86
|
title: /* @__PURE__ */ t(p, {
|
|
86
|
-
color:
|
|
87
|
+
color: f.colors.textSecondary,
|
|
87
88
|
transform: "uppercase",
|
|
88
89
|
weight: n.title1.weight,
|
|
89
90
|
as: i,
|
|
@@ -96,14 +97,14 @@ const m = (param)=>{
|
|
|
96
97
|
"component-name": "Title1"
|
|
97
98
|
}, s)
|
|
98
99
|
});
|
|
99
|
-
},
|
|
100
|
+
}, j = (param)=>{
|
|
100
101
|
let { children: e, as: i = "h3", id: o, right: r, dataAttributes: s } = param;
|
|
101
102
|
const { textPresets: n } = l();
|
|
102
103
|
return /* @__PURE__ */ t(m, {
|
|
103
104
|
title: /* @__PURE__ */ t(a, _object_spread_props(_object_spread({
|
|
104
105
|
as: i,
|
|
105
106
|
id: o
|
|
106
|
-
},
|
|
107
|
+
}, x), {
|
|
107
108
|
weight: n.title2.weight,
|
|
108
109
|
children: e
|
|
109
110
|
})),
|
|
@@ -112,7 +113,7 @@ const m = (param)=>{
|
|
|
112
113
|
"component-name": "Title2"
|
|
113
114
|
}, s)
|
|
114
115
|
});
|
|
115
|
-
},
|
|
116
|
+
}, v = (param)=>{
|
|
116
117
|
let { children: e, as: i = "h3", id: o, right: r, dataAttributes: s } = param;
|
|
117
118
|
const { textPresets: n } = l();
|
|
118
119
|
return /* @__PURE__ */ t(m, {
|
|
@@ -131,10 +132,10 @@ const m = (param)=>{
|
|
|
131
132
|
"component-name": "Title3"
|
|
132
133
|
}, s)
|
|
133
134
|
});
|
|
134
|
-
},
|
|
135
|
+
}, y = (param)=>{
|
|
135
136
|
let { children: e, as: i = "h3", id: o, right: r, dataAttributes: s } = param;
|
|
136
137
|
return /* @__PURE__ */ t(m, {
|
|
137
|
-
title: /* @__PURE__ */ t(
|
|
138
|
+
title: /* @__PURE__ */ t(h, {
|
|
138
139
|
as: i,
|
|
139
140
|
id: o,
|
|
140
141
|
children: e
|
|
@@ -145,4 +146,4 @@ const m = (param)=>{
|
|
|
145
146
|
}, s)
|
|
146
147
|
});
|
|
147
148
|
};
|
|
148
|
-
export {
|
|
149
|
+
export { S as Title1, j as Title2, v as Title3, y as Title4 };
|