@telefonica/mistica 16.4.0 → 16.6.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/css/vivo-new.css +11 -11
- package/dist/accordion.css-mistica.js +16 -13
- package/dist/accordion.css.d.ts +1 -0
- package/dist/accordion.d.ts +4 -0
- package/dist/accordion.js +110 -93
- package/dist/callout.js +27 -15
- package/dist/card.css-mistica.js +5 -5
- package/dist/card.d.ts +9 -1
- package/dist/card.js +611 -475
- package/dist/community/advanced-data-card.css-mistica.js +14 -11
- package/dist/community/advanced-data-card.css.d.ts +1 -0
- package/dist/community/advanced-data-card.d.ts +1 -1
- package/dist/community/advanced-data-card.js +172 -85
- package/dist/cover-hero.css-mistica.js +14 -11
- package/dist/cover-hero.css.d.ts +1 -0
- package/dist/cover-hero.d.ts +1 -0
- package/dist/cover-hero.js +101 -59
- package/dist/empty-state.js +24 -15
- package/dist/header.css-mistica.js +6 -3
- package/dist/header.css.d.ts +1 -0
- package/dist/header.d.ts +3 -2
- package/dist/header.js +148 -79
- package/dist/hero.css-mistica.js +11 -8
- package/dist/hero.css.d.ts +1 -0
- package/dist/hero.d.ts +2 -1
- package/dist/hero.js +102 -68
- package/dist/highlighted-card.js +32 -23
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/dist/maybe-dismissable.js +8 -5
- package/dist/meter.d.ts +23 -0
- package/dist/meter.js +400 -0
- package/dist/mosaic.d.ts +6 -2
- package/dist/mosaic.js +50 -48
- package/dist/navigation-bar.css-mistica.js +96 -37
- package/dist/navigation-bar.css.d.ts +27 -1
- package/dist/navigation-bar.d.ts +65 -30
- package/dist/navigation-bar.js +818 -193
- package/dist/package-version.js +1 -1
- package/dist/sheet-common.css-mistica.js +16 -10
- package/dist/sheet-common.css.d.ts +3 -1
- package/dist/sheet-common.js +78 -70
- package/dist/sheet-info.css-mistica.js +15 -4
- package/dist/sheet-info.css.d.ts +2 -0
- package/dist/sheet-info.d.ts +3 -0
- package/dist/sheet-info.js +61 -43
- package/dist/sheet-native.js +59 -48
- package/dist/sheet-types.d.ts +6 -1
- package/dist/sheet-web.js +6 -4
- package/dist/skins/blau.js +94 -94
- package/dist/skins/movistar.js +94 -94
- package/dist/skins/o2-new.js +94 -94
- package/dist/skins/o2.js +94 -94
- package/dist/skins/telefonica.js +94 -94
- package/dist/skins/tu.js +94 -94
- package/dist/skins/vivo-new.js +98 -98
- package/dist/skins/vivo.js +94 -94
- package/dist/text-tokens.d.ts +14 -0
- package/dist/text-tokens.js +134 -102
- package/dist/theme-context-provider.js +60 -50
- package/dist/theme.d.ts +3 -2
- package/dist/theme.js +20 -17
- package/dist/utils/headings.d.ts +2 -0
- package/dist/utils/headings.js +11 -0
- package/dist/utils/types.d.ts +1 -0
- package/dist-es/accordion.css-mistica.js +7 -7
- package/dist-es/accordion.js +140 -123
- package/dist-es/callout.js +55 -43
- package/dist-es/card.css-mistica.js +2 -2
- package/dist-es/card.js +721 -588
- package/dist-es/community/advanced-data-card.css-mistica.js +3 -3
- package/dist-es/community/advanced-data-card.js +217 -130
- package/dist-es/cover-hero.css-mistica.js +3 -3
- package/dist-es/cover-hero.js +132 -90
- package/dist-es/empty-state.js +40 -31
- package/dist-es/header.css-mistica.js +2 -2
- package/dist-es/header.js +174 -104
- package/dist-es/hero.css-mistica.js +2 -2
- package/dist-es/hero.js +150 -115
- package/dist-es/highlighted-card.js +36 -27
- package/dist-es/index.js +1839 -1838
- package/dist-es/maybe-dismissable.js +17 -14
- package/dist-es/meter.js +346 -0
- package/dist-es/mosaic.js +73 -71
- package/dist-es/navigation-bar.css-mistica.js +14 -15
- package/dist-es/navigation-bar.js +864 -240
- package/dist-es/package-version.js +1 -1
- package/dist-es/sheet-common.css-mistica.js +2 -2
- package/dist-es/sheet-common.js +124 -116
- package/dist-es/sheet-info.css-mistica.js +2 -2
- package/dist-es/sheet-info.js +74 -56
- package/dist-es/sheet-native.js +59 -48
- package/dist-es/sheet-web.js +10 -8
- package/dist-es/skins/blau.js +94 -94
- package/dist-es/skins/movistar.js +94 -94
- package/dist-es/skins/o2-new.js +94 -94
- package/dist-es/skins/o2.js +94 -94
- package/dist-es/skins/telefonica.js +94 -94
- package/dist-es/skins/tu.js +94 -94
- package/dist-es/skins/vivo-new.js +98 -98
- package/dist-es/skins/vivo.js +94 -94
- package/dist-es/style.css +1 -1
- package/dist-es/text-tokens.js +72 -52
- package/dist-es/theme-context-provider.js +88 -78
- package/dist-es/theme.js +20 -20
- package/dist-es/utils/headings.js +2 -0
- package/package.json +2 -1
|
@@ -1,33 +1,36 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as t, Fragment as c, jsxs as u } from "react/jsx-runtime";
|
|
3
3
|
import * as o from "react";
|
|
4
4
|
import b from "./generated/mistica-icons/icon-close-regular.js";
|
|
5
5
|
import { useTheme as f } from "./hooks.js";
|
|
6
|
-
import { IconButton as
|
|
7
|
-
import { dismissableContainer as
|
|
6
|
+
import { IconButton as d } from "./icon-button.js";
|
|
7
|
+
import { dismissableContainer as p, dismissableButton as x } from "./maybe-dismissable.css-mistica.js";
|
|
8
8
|
import { ThemeVariant as h } from "./theme-variant-context.js";
|
|
9
9
|
import { closeButtonLabel as B } from "./text-tokens.js";
|
|
10
10
|
const a = /*#__PURE__*/ o.createContext(!1), M = ()=>o.useContext(a), C = (param)=>{
|
|
11
|
-
let { children:
|
|
11
|
+
let { children: e, width: r, onClose: s, "aria-label": i, variant: m } = param;
|
|
12
12
|
const { texts: l, t: n } = f();
|
|
13
|
-
return
|
|
14
|
-
className:
|
|
13
|
+
return s ? /* @__PURE__ */ u("section", {
|
|
14
|
+
className: p,
|
|
15
15
|
"aria-label": i,
|
|
16
16
|
style: {
|
|
17
17
|
width: r || "100%",
|
|
18
18
|
minHeight: "100%"
|
|
19
19
|
},
|
|
20
20
|
children: [
|
|
21
|
-
/* @__PURE__ */
|
|
21
|
+
/* @__PURE__ */ t(a.Provider, {
|
|
22
22
|
value: !0,
|
|
23
|
-
children:
|
|
23
|
+
children: e
|
|
24
24
|
}),
|
|
25
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ t(h, {
|
|
26
26
|
variant: m,
|
|
27
|
-
children: /* @__PURE__ */
|
|
27
|
+
children: /* @__PURE__ */ t("div", {
|
|
28
28
|
className: x,
|
|
29
|
-
children: /* @__PURE__ */
|
|
30
|
-
|
|
29
|
+
children: /* @__PURE__ */ t(d, {
|
|
30
|
+
dataAttributes: {
|
|
31
|
+
testid: "closeButton"
|
|
32
|
+
},
|
|
33
|
+
onPress: s,
|
|
31
34
|
"aria-label": l.closeButtonLabel || n(B),
|
|
32
35
|
small: !0,
|
|
33
36
|
Icon: b
|
|
@@ -35,8 +38,8 @@ const a = /*#__PURE__*/ o.createContext(!1), M = ()=>o.useContext(a), C = (param
|
|
|
35
38
|
})
|
|
36
39
|
})
|
|
37
40
|
]
|
|
38
|
-
}) : /* @__PURE__ */
|
|
39
|
-
children:
|
|
41
|
+
}) : /* @__PURE__ */ t(c, {
|
|
42
|
+
children: e
|
|
40
43
|
});
|
|
41
44
|
}, N = C;
|
|
42
45
|
export { N as default, M as useIsDismissable };
|
package/dist-es/meter.js
ADDED
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function _define_property(obj, key, value) {
|
|
3
|
+
if (key in obj) {
|
|
4
|
+
Object.defineProperty(obj, key, {
|
|
5
|
+
value: value,
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true
|
|
9
|
+
});
|
|
10
|
+
} else {
|
|
11
|
+
obj[key] = value;
|
|
12
|
+
}
|
|
13
|
+
return obj;
|
|
14
|
+
}
|
|
15
|
+
function _object_spread(target) {
|
|
16
|
+
for(var i = 1; i < arguments.length; i++){
|
|
17
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
18
|
+
var ownKeys = Object.keys(source);
|
|
19
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
20
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
21
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
ownKeys.forEach(function(key) {
|
|
25
|
+
_define_property(target, key, source[key]);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return target;
|
|
29
|
+
}
|
|
30
|
+
function ownKeys(object, enumerableOnly) {
|
|
31
|
+
var keys = Object.keys(object);
|
|
32
|
+
if (Object.getOwnPropertySymbols) {
|
|
33
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
34
|
+
if (enumerableOnly) {
|
|
35
|
+
symbols = symbols.filter(function(sym) {
|
|
36
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
keys.push.apply(keys, symbols);
|
|
40
|
+
}
|
|
41
|
+
return keys;
|
|
42
|
+
}
|
|
43
|
+
function _object_spread_props(target, source) {
|
|
44
|
+
source = source != null ? source : {};
|
|
45
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
46
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
47
|
+
} else {
|
|
48
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
49
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return target;
|
|
53
|
+
}
|
|
54
|
+
import { jsx as o, jsxs as E, Fragment as ut } from "react/jsx-runtime";
|
|
55
|
+
import * as m from "react";
|
|
56
|
+
import { createElement as Et } from "react";
|
|
57
|
+
import { vars as a } from "./skins/skin-contract.css-mistica.js";
|
|
58
|
+
import Mt from "cubic-bezier";
|
|
59
|
+
import { getPrefixedDataAttributes as bt } from "./utils/dom.js";
|
|
60
|
+
import { useThemeVariant as Tt } from "./theme-variant-context.js";
|
|
61
|
+
import { useTheme as vt, useElementDimensions as Rt } from "./hooks.js";
|
|
62
|
+
import { meterTotalLabel as St, meterSectionLabel as Lt } from "./text-tokens.js";
|
|
63
|
+
import { isRunningAcceptanceTest as _t } from "./utils/platform.js";
|
|
64
|
+
const A = 100, J = A / 2, ft = A / 2, Q = 6, wt = 2, gt = 200, tt = 1e3, Nt = 1e3 / 60 / tt / 4, Ct = 100, D = 1e-4, R = "linear", Ot = "angular", r = "circular", pt = [
|
|
65
|
+
a.colors.controlActivated,
|
|
66
|
+
a.colors.warning,
|
|
67
|
+
a.colors.success,
|
|
68
|
+
a.colors.highlight,
|
|
69
|
+
a.colors.promo
|
|
70
|
+
], Ft = [
|
|
71
|
+
a.colors.controlActivatedInverse,
|
|
72
|
+
a.colors.warning,
|
|
73
|
+
a.colors.success,
|
|
74
|
+
a.colors.highlight,
|
|
75
|
+
a.colors.promo
|
|
76
|
+
], Ut = Mt(0.75, 0, 0.27, 1, Nt), W = (t, n, $)=>Math.min(Math.max(t, n), $), kt = (t, n, $, M)=>{
|
|
77
|
+
var O;
|
|
78
|
+
const s = [];
|
|
79
|
+
let b = 0, S = 0;
|
|
80
|
+
for(let h = 0; h < t.length; h++){
|
|
81
|
+
b += t[h], S += n[h];
|
|
82
|
+
const G = gt * (M ? h : t.length - 1 - h), V = W(($ - G) / tt, 0, 1), Z = W(Ut(V), 0, 1), X = ((O = s.at(-1)) == null ? void 0 : O.end) || 0, u = W(b + (S - b) * Z, 0, 1 - D);
|
|
83
|
+
s.push({
|
|
84
|
+
start: X,
|
|
85
|
+
end: u
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
return s;
|
|
89
|
+
}, C = (param)=>{
|
|
90
|
+
let { x1: t, y1: n, x2: $, y2: M, radius: s, clockwise: b = 1, largeArchFlag: S = 0 } = param;
|
|
91
|
+
return s ? `M ${t} ${n} A ${s} ${s} 0 ${+S} ${+b} ${$} ${M}` : `M ${t} ${n} L ${$} ${M}`;
|
|
92
|
+
}, Dt = (param)=>{
|
|
93
|
+
let { type: t = Ot, width: n = "100%", colors: $, values: M, reverse: s = !1, dataAttributes: b, "aria-hidden": S = !1, "aria-label": O, "aria-labelledby": h } = param;
|
|
94
|
+
const { borderRadii: G, t: V } = vt(), { ref: Z, width: X } = Rt(), u = parseInt(G.bar) !== 0, et = Tt(), q = et === "media", rt = et === "inverse", nt = $ || (rt || q ? Ft : pt), [p, ot] = m.useState(typeof n == "number" ? n : 0), z = p === 0 ? 1 : A / p, at = u ? Q / 2 : 0, Y = at * z, i = Q * z, c = t === R ? 0 : J - i / 2, T = wt * z, H = m.useId(), st = `marker-current-${H}`, it = `marker-start-${H}`, ct = `mask-last-segment-${H}`, lt = `mask-bar-track-${H}`, dt = m.useMemo(()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches !== !0 && !_t(), []), L = t === R ? A - Y * 2 : t === r ? Math.PI * 2 : Math.PI, l = t === R ? T / A : T / c / L, xt = t === R ? Q : t === r ? p : p / 2 + at, K = t === R ? i : t === r ? A : J + Y, At = q ? a.colors.inverse : rt ? a.colors.barTrackInverse : a.colors.barTrack, f = m.useMemo(()=>M.map((e)=>e / Ct), [
|
|
95
|
+
M
|
|
96
|
+
]), P = m.useRef(Array.from({
|
|
97
|
+
length: f.length
|
|
98
|
+
}, ()=>s ? 1 : 0)), [_, $t] = m.useState(()=>f.map(()=>({
|
|
99
|
+
start: 0,
|
|
100
|
+
end: 0
|
|
101
|
+
})));
|
|
102
|
+
let v = -1, B = -1;
|
|
103
|
+
for(let e = 0; e < _.length; e++)_[e].end - _[e].start > D && (v < 0 && (v = e), B = e);
|
|
104
|
+
const d = _.at(-1);
|
|
105
|
+
m.useEffect(()=>{
|
|
106
|
+
ot(typeof n == "number" ? n : X);
|
|
107
|
+
}, [
|
|
108
|
+
n,
|
|
109
|
+
X
|
|
110
|
+
]), m.useEffect(()=>{
|
|
111
|
+
let e;
|
|
112
|
+
const I = performance.now(), w = I + tt + gt * (f.length - 1);
|
|
113
|
+
let N = [];
|
|
114
|
+
const U = ()=>{
|
|
115
|
+
const x = performance.now();
|
|
116
|
+
N = kt(P.current, f, x - I, s), dt && x < w ? e = requestAnimationFrame(U) : (N = kt(P.current, f, w - I, s), P.current = f), $t(N);
|
|
117
|
+
};
|
|
118
|
+
return U(), ()=>{
|
|
119
|
+
cancelAnimationFrame(e), P.current = N.map((x)=>x.end - x.start);
|
|
120
|
+
};
|
|
121
|
+
}, [
|
|
122
|
+
c,
|
|
123
|
+
f,
|
|
124
|
+
t,
|
|
125
|
+
s,
|
|
126
|
+
dt
|
|
127
|
+
]);
|
|
128
|
+
const k = m.useCallback((e)=>t === R ? Y + L * e : J - c * Math.cos(e * L), [
|
|
129
|
+
Y,
|
|
130
|
+
L,
|
|
131
|
+
c,
|
|
132
|
+
t
|
|
133
|
+
]), g = m.useCallback((e)=>t === R ? i / 2 : ft - c * Math.sin(e * L), [
|
|
134
|
+
L,
|
|
135
|
+
c,
|
|
136
|
+
i,
|
|
137
|
+
t
|
|
138
|
+
]), F = (e)=>nt[e % nt.length], mt = Math.round(((d == null ? void 0 : d.end) || 0) * 100), ht = V(St, f.length, mt) + " " + f.map((e, I)=>`${V(Lt, I + 1, Math.round(e * 100))}`).join(". ");
|
|
139
|
+
return /* @__PURE__ */ o("div", _object_spread_props(_object_spread({
|
|
140
|
+
ref: Z,
|
|
141
|
+
style: {
|
|
142
|
+
width: n
|
|
143
|
+
},
|
|
144
|
+
role: "meter",
|
|
145
|
+
"aria-label": O || (h ? void 0 : ht),
|
|
146
|
+
"aria-labelledby": h,
|
|
147
|
+
"aria-valuenow": mt,
|
|
148
|
+
"aria-valuemin": 0,
|
|
149
|
+
"aria-valuemax": 100,
|
|
150
|
+
"aria-live": "polite",
|
|
151
|
+
"aria-valuetext": ht,
|
|
152
|
+
"aria-hidden": S
|
|
153
|
+
}, bt(b, "Meter")), {
|
|
154
|
+
children: /* @__PURE__ */ E("svg", {
|
|
155
|
+
viewBox: `0 0 ${A} ${K}`,
|
|
156
|
+
style: {
|
|
157
|
+
width: p,
|
|
158
|
+
height: xt,
|
|
159
|
+
display: "block",
|
|
160
|
+
transform: `rotate(${t === r ? "90deg" : 0})`
|
|
161
|
+
},
|
|
162
|
+
"aria-hidden": "true",
|
|
163
|
+
children: [
|
|
164
|
+
/* @__PURE__ */ E("defs", {
|
|
165
|
+
children: [
|
|
166
|
+
u && /* @__PURE__ */ E(ut, {
|
|
167
|
+
children: [
|
|
168
|
+
/* @__PURE__ */ E("marker", {
|
|
169
|
+
id: st,
|
|
170
|
+
viewBox: "0 0 10 10",
|
|
171
|
+
markerWidth: 1,
|
|
172
|
+
markerHeight: 1,
|
|
173
|
+
orient: "auto",
|
|
174
|
+
refX: 5,
|
|
175
|
+
refY: 5,
|
|
176
|
+
children: [
|
|
177
|
+
/* @__PURE__ */ o("rect", {
|
|
178
|
+
x: 4,
|
|
179
|
+
y: 0,
|
|
180
|
+
width: 2,
|
|
181
|
+
height: 10,
|
|
182
|
+
fill: F(B)
|
|
183
|
+
}),
|
|
184
|
+
/* @__PURE__ */ o("path", {
|
|
185
|
+
d: C({
|
|
186
|
+
x1: 5,
|
|
187
|
+
y1: 0,
|
|
188
|
+
x2: 5,
|
|
189
|
+
y2: 10,
|
|
190
|
+
radius: 5
|
|
191
|
+
}),
|
|
192
|
+
fill: F(B)
|
|
193
|
+
})
|
|
194
|
+
]
|
|
195
|
+
}),
|
|
196
|
+
/* @__PURE__ */ E("marker", {
|
|
197
|
+
id: it,
|
|
198
|
+
viewBox: "0 0 10 10",
|
|
199
|
+
markerWidth: 1,
|
|
200
|
+
markerHeight: 1,
|
|
201
|
+
orient: "auto",
|
|
202
|
+
refX: 5,
|
|
203
|
+
refY: 5,
|
|
204
|
+
children: [
|
|
205
|
+
/* @__PURE__ */ o("rect", {
|
|
206
|
+
x: 4,
|
|
207
|
+
y: 0,
|
|
208
|
+
width: 2,
|
|
209
|
+
height: 10,
|
|
210
|
+
fill: F(v)
|
|
211
|
+
}),
|
|
212
|
+
/* @__PURE__ */ o("path", {
|
|
213
|
+
d: C({
|
|
214
|
+
x1: 5,
|
|
215
|
+
y1: 0,
|
|
216
|
+
x2: 5,
|
|
217
|
+
y2: 10,
|
|
218
|
+
radius: 5,
|
|
219
|
+
clockwise: 0
|
|
220
|
+
}),
|
|
221
|
+
fill: F(v)
|
|
222
|
+
})
|
|
223
|
+
]
|
|
224
|
+
})
|
|
225
|
+
]
|
|
226
|
+
}),
|
|
227
|
+
/* @__PURE__ */ E("mask", {
|
|
228
|
+
id: lt,
|
|
229
|
+
maskUnits: "userSpaceOnUse",
|
|
230
|
+
children: [
|
|
231
|
+
/* @__PURE__ */ o("rect", {
|
|
232
|
+
x: 0,
|
|
233
|
+
y: 0,
|
|
234
|
+
width: A,
|
|
235
|
+
height: K,
|
|
236
|
+
fill: "white"
|
|
237
|
+
}),
|
|
238
|
+
v >= 0 && d && /* @__PURE__ */ E(ut, {
|
|
239
|
+
children: [
|
|
240
|
+
/* @__PURE__ */ o("path", {
|
|
241
|
+
stroke: "black",
|
|
242
|
+
fill: "none",
|
|
243
|
+
strokeWidth: i + T * 2,
|
|
244
|
+
strokeLinecap: t === r || !u ? "butt" : "round",
|
|
245
|
+
d: C({
|
|
246
|
+
x1: k(0),
|
|
247
|
+
y1: g(0),
|
|
248
|
+
x2: k(W(d.end + (u ? 0 : l), 0, 1 - D)),
|
|
249
|
+
y2: g(W(d.end + (u ? 0 : l), 0, 1 - D)),
|
|
250
|
+
radius: c,
|
|
251
|
+
largeArchFlag: t === r ? d.end >= 0.5 : 0
|
|
252
|
+
})
|
|
253
|
+
}),
|
|
254
|
+
t === r && u && // the circular type has butt line caps, so we need to add a circle to the end
|
|
255
|
+
/* @__PURE__ */ o("circle", {
|
|
256
|
+
cx: k(d.end),
|
|
257
|
+
cy: g(d.end),
|
|
258
|
+
r: i / 2 + T,
|
|
259
|
+
fill: "black"
|
|
260
|
+
}),
|
|
261
|
+
t === r && d.end <= 0.5 && // small patch to remove the circular mask when the last segment is too near to the start
|
|
262
|
+
/* @__PURE__ */ o("rect", {
|
|
263
|
+
x: 0,
|
|
264
|
+
y: ft + T,
|
|
265
|
+
width: i + T * 2,
|
|
266
|
+
height: i / 2 + T,
|
|
267
|
+
fill: "white"
|
|
268
|
+
})
|
|
269
|
+
]
|
|
270
|
+
})
|
|
271
|
+
]
|
|
272
|
+
}),
|
|
273
|
+
t === r && /* @__PURE__ */ E("mask", {
|
|
274
|
+
id: ct,
|
|
275
|
+
maskUnits: "userSpaceOnUse",
|
|
276
|
+
children: [
|
|
277
|
+
/* @__PURE__ */ o("rect", {
|
|
278
|
+
x: 0,
|
|
279
|
+
y: 0,
|
|
280
|
+
width: A,
|
|
281
|
+
height: K,
|
|
282
|
+
fill: "white"
|
|
283
|
+
}),
|
|
284
|
+
/* @__PURE__ */ o("path", {
|
|
285
|
+
stroke: "black",
|
|
286
|
+
strokeWidth: i,
|
|
287
|
+
fill: "none",
|
|
288
|
+
d: C({
|
|
289
|
+
x1: k(1 - l),
|
|
290
|
+
y1: g(1 - l),
|
|
291
|
+
x2: k(1),
|
|
292
|
+
y2: g(1),
|
|
293
|
+
radius: c
|
|
294
|
+
})
|
|
295
|
+
})
|
|
296
|
+
]
|
|
297
|
+
})
|
|
298
|
+
]
|
|
299
|
+
}),
|
|
300
|
+
/* @__PURE__ */ o("path", {
|
|
301
|
+
stroke: At,
|
|
302
|
+
opacity: q ? 0.5 : 1,
|
|
303
|
+
fill: "none",
|
|
304
|
+
strokeWidth: i,
|
|
305
|
+
strokeLinecap: t === r || !u ? "butt" : "round",
|
|
306
|
+
d: C({
|
|
307
|
+
x1: k(0),
|
|
308
|
+
y1: g(0),
|
|
309
|
+
x2: k(1 - (t === r ? l : 0)),
|
|
310
|
+
y2: g(1 - (t === r ? l : 0)),
|
|
311
|
+
largeArchFlag: 1,
|
|
312
|
+
radius: c
|
|
313
|
+
}),
|
|
314
|
+
mask: `url("#${lt}")`
|
|
315
|
+
}),
|
|
316
|
+
v >= 0 && [
|
|
317
|
+
..._
|
|
318
|
+
].reverse().map((e, I)=>{
|
|
319
|
+
const w = _.length - 1 - I, N = F(w), U = w === v, x = w === B, j = U || e.end - e.start < l ? e.start : e.start + l / 2, y = x || e.end - e.start < l ? e.end : e.end - l / 2;
|
|
320
|
+
if (y - j < D) return null;
|
|
321
|
+
const It = U && t !== r;
|
|
322
|
+
return /* @__PURE__ */ o("path", {
|
|
323
|
+
stroke: N,
|
|
324
|
+
fill: "none",
|
|
325
|
+
strokeWidth: i,
|
|
326
|
+
strokeLinecap: "butt",
|
|
327
|
+
markerEnd: x ? `url(#${st})` : void 0,
|
|
328
|
+
markerStart: It ? `url(#${it})` : void 0,
|
|
329
|
+
mask: x && t === r ? `url("#${ct}")` : void 0,
|
|
330
|
+
d: C({
|
|
331
|
+
x1: k(j),
|
|
332
|
+
y1: g(j),
|
|
333
|
+
x2: k(y),
|
|
334
|
+
y2: g(y),
|
|
335
|
+
largeArchFlag: t === r ? y - j >= 0.5 : 0,
|
|
336
|
+
radius: c
|
|
337
|
+
})
|
|
338
|
+
}, I);
|
|
339
|
+
})
|
|
340
|
+
]
|
|
341
|
+
})
|
|
342
|
+
}));
|
|
343
|
+
}, Wt = (t)=>/* @__PURE__ */ /*#__PURE__*/ Et(Dt, _object_spread_props(_object_spread({}, t), {
|
|
344
|
+
key: `${t.type},${t.values.length},${t.reverse}`
|
|
345
|
+
})), Zt = Wt;
|
|
346
|
+
export { Zt as default };
|
package/dist-es/mosaic.js
CHANGED
|
@@ -50,62 +50,64 @@ function _object_spread_props(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import { jsx as
|
|
53
|
+
import { jsx as r, jsxs as g, Fragment as v } from "react/jsx-runtime";
|
|
54
54
|
import { Grid as i, GridItem as e } from "./grid.js";
|
|
55
|
-
import { Carousel as
|
|
56
|
-
import { singleItemRowContainer as m, squareContainer as
|
|
57
|
-
const
|
|
55
|
+
import { Carousel as w } from "./carousel.js";
|
|
56
|
+
import { singleItemRowContainer as m, squareContainer as f, fourItemsContainer as q } from "./mosaic.css-mistica.js";
|
|
57
|
+
const u = {
|
|
58
58
|
mobile: 8,
|
|
59
59
|
desktop: 16
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
}, t = (n, o)=>typeof n == "function" ? n({
|
|
61
|
+
gridMode: o
|
|
62
|
+
}) : n, C = (param)=>{
|
|
63
|
+
let { items: n, isEven: o } = param;
|
|
64
|
+
return /* @__PURE__ */ r("div", {
|
|
65
|
+
className: n.length === 1 ? m : f,
|
|
66
|
+
children: /* @__PURE__ */ r(i, {
|
|
67
|
+
gap: u,
|
|
66
68
|
rows: 2,
|
|
67
69
|
columns: 2,
|
|
68
70
|
height: "100%",
|
|
69
|
-
children: n.length === 3 ? /* @__PURE__ */ g(
|
|
71
|
+
children: n.length === 3 ? /* @__PURE__ */ g(v, {
|
|
70
72
|
children: [
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
columnSpan:
|
|
73
|
-
children: n[0]
|
|
73
|
+
/* @__PURE__ */ r(e, {
|
|
74
|
+
columnSpan: o ? 2 : void 0,
|
|
75
|
+
children: t(n[0], o ? "horizontal" : "square")
|
|
74
76
|
}),
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
children: n[1]
|
|
77
|
+
/* @__PURE__ */ r(e, {
|
|
78
|
+
children: t(n[1], "square")
|
|
77
79
|
}),
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
columnSpan:
|
|
80
|
-
children: n[2]
|
|
80
|
+
/* @__PURE__ */ r(e, {
|
|
81
|
+
columnSpan: o ? void 0 : 2,
|
|
82
|
+
children: t(n[2], o ? "square" : "horizontal")
|
|
81
83
|
})
|
|
82
84
|
]
|
|
83
|
-
}) : n.map((a,
|
|
85
|
+
}) : n.map((a, s)=>/* @__PURE__ */ r(e, {
|
|
84
86
|
columnSpan: n.length === 4 ? void 0 : 2,
|
|
85
87
|
rowSpan: n.length === 1 ? 2 : void 0,
|
|
86
|
-
children: a
|
|
87
|
-
},
|
|
88
|
+
children: t(a, n.length === 4 ? "square" : "horizontal")
|
|
89
|
+
}, s))
|
|
88
90
|
})
|
|
89
91
|
});
|
|
90
|
-
},
|
|
91
|
-
let { items: n, withBullets:
|
|
92
|
-
const c = n.length,
|
|
93
|
-
length:
|
|
92
|
+
}, G = (param)=>{
|
|
93
|
+
let { items: n, withBullets: o, free: a, dataAttributes: s } = param;
|
|
94
|
+
const c = n.length, l = c < 5 ? Math.min(c, 1) : Math.floor((c + 1) / 3), h = Array.from({
|
|
95
|
+
length: l
|
|
94
96
|
}, ()=>[]);
|
|
95
|
-
return n.forEach((
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
}), /* @__PURE__ */
|
|
99
|
-
dataAttributes: _object_spread_props(_object_spread({},
|
|
97
|
+
return n.forEach((d, p)=>{
|
|
98
|
+
const M = Math.min(l - 1, Math.floor(p / 3));
|
|
99
|
+
h[M].push(d);
|
|
100
|
+
}), /* @__PURE__ */ r(w, {
|
|
101
|
+
dataAttributes: _object_spread_props(_object_spread({}, s), {
|
|
100
102
|
"component-name": "HorizontalMosaic"
|
|
101
103
|
}),
|
|
102
|
-
items:
|
|
103
|
-
children: /* @__PURE__ */
|
|
104
|
-
items:
|
|
104
|
+
items: h.map((d, p)=>/* @__PURE__ */ r(i, {
|
|
105
|
+
children: /* @__PURE__ */ r(C, {
|
|
106
|
+
items: d,
|
|
105
107
|
isEven: p % 2 === 0
|
|
106
108
|
}, p)
|
|
107
109
|
})),
|
|
108
|
-
withBullets:
|
|
110
|
+
withBullets: o,
|
|
109
111
|
free: a
|
|
110
112
|
});
|
|
111
113
|
}, S = (param)=>{
|
|
@@ -113,77 +115,77 @@ const d = {
|
|
|
113
115
|
switch(n.length){
|
|
114
116
|
case 1:
|
|
115
117
|
case 2:
|
|
116
|
-
return /* @__PURE__ */
|
|
118
|
+
return /* @__PURE__ */ r("div", {
|
|
117
119
|
className: m,
|
|
118
|
-
children: /* @__PURE__ */
|
|
119
|
-
gap:
|
|
120
|
+
children: /* @__PURE__ */ r(i, {
|
|
121
|
+
gap: u,
|
|
120
122
|
columns: 2,
|
|
121
123
|
height: "100%",
|
|
122
|
-
children: n.map((
|
|
124
|
+
children: n.map((o, a)=>/* @__PURE__ */ r(e, {
|
|
123
125
|
columnSpan: n.length === 2 ? void 0 : 2,
|
|
124
|
-
children:
|
|
126
|
+
children: t(o, n.length === 2 ? "square" : "horizontal")
|
|
125
127
|
}, a))
|
|
126
128
|
})
|
|
127
129
|
});
|
|
128
130
|
case 3:
|
|
129
|
-
return /* @__PURE__ */
|
|
130
|
-
className:
|
|
131
|
-
children: /* @__PURE__ */
|
|
132
|
-
gap:
|
|
131
|
+
return /* @__PURE__ */ r("div", {
|
|
132
|
+
className: f,
|
|
133
|
+
children: /* @__PURE__ */ r(i, {
|
|
134
|
+
gap: u,
|
|
133
135
|
columns: 2,
|
|
134
136
|
flow: "column",
|
|
135
137
|
height: "100%",
|
|
136
|
-
children: n.map((
|
|
138
|
+
children: n.map((o, a)=>/* @__PURE__ */ r(e, {
|
|
137
139
|
rowSpan: a === 0 ? 2 : void 0,
|
|
138
|
-
children:
|
|
140
|
+
children: t(o, a === 0 ? "vertical" : "square")
|
|
139
141
|
}, a))
|
|
140
142
|
})
|
|
141
143
|
});
|
|
142
144
|
case 4:
|
|
143
145
|
default:
|
|
144
|
-
return /* @__PURE__ */
|
|
145
|
-
className:
|
|
146
|
+
return /* @__PURE__ */ r("div", {
|
|
147
|
+
className: q,
|
|
146
148
|
children: /* @__PURE__ */ g(i, {
|
|
147
|
-
gap:
|
|
149
|
+
gap: u,
|
|
148
150
|
rows: 3,
|
|
149
151
|
columns: 2,
|
|
150
152
|
height: "100%",
|
|
151
153
|
children: [
|
|
152
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ r(e, {
|
|
153
155
|
rowSpan: 2,
|
|
154
|
-
children: n[0]
|
|
156
|
+
children: t(n[0], "vertical")
|
|
155
157
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
children: n[1]
|
|
158
|
+
/* @__PURE__ */ r(e, {
|
|
159
|
+
children: t(n[1], "square")
|
|
158
160
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ r(e, {
|
|
160
162
|
rowSpan: 2,
|
|
161
|
-
children: n[3]
|
|
163
|
+
children: t(n[3], "vertical")
|
|
162
164
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
children: n[2]
|
|
165
|
+
/* @__PURE__ */ r(e, {
|
|
166
|
+
children: t(n[2], "square")
|
|
165
167
|
})
|
|
166
168
|
]
|
|
167
169
|
})
|
|
168
170
|
});
|
|
169
171
|
}
|
|
170
|
-
},
|
|
171
|
-
let { items: n, dataAttributes:
|
|
172
|
-
const a = n.length,
|
|
173
|
-
length:
|
|
172
|
+
}, N = (param)=>{
|
|
173
|
+
let { items: n, dataAttributes: o } = param;
|
|
174
|
+
const a = n.length, s = Math.ceil(a / 4), c = Array.from({
|
|
175
|
+
length: s
|
|
174
176
|
}, ()=>[]);
|
|
175
|
-
return n.forEach((
|
|
176
|
-
const
|
|
177
|
-
c[
|
|
178
|
-
}), /* @__PURE__ */
|
|
177
|
+
return n.forEach((l, h)=>{
|
|
178
|
+
const d = Math.floor(h / 4);
|
|
179
|
+
c[d].push(l);
|
|
180
|
+
}), /* @__PURE__ */ r(i, {
|
|
179
181
|
rows: 1,
|
|
180
|
-
gap:
|
|
181
|
-
dataAttributes: _object_spread_props(_object_spread({},
|
|
182
|
+
gap: u,
|
|
183
|
+
dataAttributes: _object_spread_props(_object_spread({}, o), {
|
|
182
184
|
"component-name": "VerticalMosaic"
|
|
183
185
|
}),
|
|
184
|
-
children: c.map((
|
|
185
|
-
items:
|
|
186
|
-
},
|
|
186
|
+
children: c.map((l, h)=>/* @__PURE__ */ r(S, {
|
|
187
|
+
items: l
|
|
188
|
+
}, h))
|
|
187
189
|
});
|
|
188
190
|
};
|
|
189
|
-
export {
|
|
191
|
+
export { G as HorizontalMosaic, N as VerticalMosaic };
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import "./sprinkles.css.ts.vanilla.css-mistica.js";
|
|
2
2
|
import "./navigation-bar.css.ts.vanilla.css-mistica.js";
|
|
3
|
-
var y = "_1vcy5dz1 _1y2v1nfhi _1y2v1nfik _1y2v1nfj0",
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}, a = "_1vcy5dzn", d = "_1vcy5dz5 _1vcy5dz3 _1y2v1nfhj", c = "_1vcy5dz4 _1vcy5dz3 _1y2v1nfhj", i = "_1vcy5dz7 _1vcy5dz3 _1y2v1nfhj", f = "_1vcy5dz6 _1vcy5dz3 _1y2v1nfhj", o = "_1vcy5dz18", t = "_1vcy5dz10 _1y2v1nfho _1y2v1nfhx", z = "_1vcy5dzy", h = {
|
|
3
|
+
var _ = 300, y = 400, e = 184, r = "_1vcy5dz1 _1y2v1nfhi _1y2v1nfik _1y2v1nfj0", a = "_1y2v1nfhk _1y2v1nfl6 _1y2v1nfla _1y2v1nflp _1y2v1nfm4 _1y2v1nf3r", f = "_1vcy5dz1f", i = "_1y2v1nfis _1y2v1nfhi", t = "_1vcy5dz1j _1y2v1nfku _1y2v1nfib _1y2v1nfis _1y2v1nfhj _1y2v1nfkv", o = {
|
|
4
|
+
enter: "_1vcy5dz16",
|
|
5
|
+
enterActive: "_1vcy5dz17",
|
|
6
|
+
exit: "_1vcy5dz18",
|
|
7
|
+
exitActive: "_1vcy5dz19"
|
|
8
|
+
}, d = "_1vcy5dz1z _1y2v1nf88 _1y2v1nf9h _1y2v1nfhi", c = "_1vcy5dz1v _1y2v1nf3s _1y2v1nfhj _1y2v1nfla _1y2v1nflp", z = "_1vcy5dz21", h = "_1vcy5dz1t _1y2v1nfhk _1y2v1nfla _1y2v1nflp", p = "_1vcy5dz20", u = "_1vcy5dzf", s = "_1vcy5dzg", k = "_1vcy5dzn _1y2v1nf7h _1y2v1nf8q _1y2v1nf9z _1y2v1nfb8 _1y2v1nfk6 _1y2v1nf7g", M = "_1vcy5dzl _1y2v1nfhj _1y2v1nfkv _1y2v1nfm4 _1y2v1nfho _1y2v1nfi3", l = "_1vcy5dzi _1y2v1nfhi _1y2v1nfho", g = "_1y2v1nfhi", b = "_1y2v1nfhj _1y2v1nfla _1y2v1nflp", C = "_1vcy5dzx", S = "_1vcy5dz1x _1y2v1nfak _1y2v1nfbt _1y2v1nf88 _1y2v1nf9h _1y2v1nf3s _1y2v1nfhk _1y2v1nfku", A = "_1vcy5dz5 _1vcy5dz3 _1y2v1nfhj", j = "_1vcy5dz4 _1vcy5dz3 _1y2v1nfhj", B = "_1vcy5dz7 _1vcy5dz3 _1y2v1nfhj", N = "_1vcy5dz6 _1vcy5dz3 _1y2v1nfhj", m = "_1vcy5dz1o", x = "_1vcy5dz1e _1y2v1nfho _1y2v1nfhx", I = "_1vcy5dz1c _1y2v1nfho _1y2v1nfia", O = "_1vcy5dz1q _1y2v1nfib", T = {
|
|
10
9
|
default: "_1vcy5dzc _1vcy5dzb _1y2v1nfho _1y2v1nfi3 _1y2v1nfib",
|
|
11
10
|
noBorder: "_1vcy5dzd _1vcy5dzb _1y2v1nfho _1y2v1nfi3 _1y2v1nfib",
|
|
12
11
|
menuOpen: "_1vcy5dze _1vcy5dzb _1y2v1nfho _1y2v1nfi3 _1y2v1nfib"
|
|
13
|
-
},
|
|
14
|
-
default: "
|
|
15
|
-
inverse: "
|
|
16
|
-
},
|
|
17
|
-
default: "
|
|
18
|
-
inverse: "
|
|
19
|
-
},
|
|
20
|
-
export { y as burgerIconContainer,
|
|
12
|
+
}, E = "_1y2v1nf7h _1y2v1nf8q _1y2v1nf9z _1y2v1nfb8 _1y2v1nfk6 _1y2v1nf7g", R = "_1vcy5dzv _1y2v1nfi3 _1y2v1nfib _1y2v1nfho", U = "_1vcy5dzz _1y2v1nfho _1y2v1nfi3 _1y2v1nfhy", W = "_1vcy5dz11 _1vcy5dzz _1y2v1nfho _1y2v1nfi3 _1y2v1nfhy _1y2v1nfia", D = "_1vcy5dzp _1y2v1nfa8 _1y2v1nfbh _1y2v1nfj7 _1y2v1nfho _1y2v1nfi3 _1y2v1nfk6 _1y2v1nf7g _1y2v1nfhi", q = {
|
|
13
|
+
default: "_1vcy5dzq",
|
|
14
|
+
inverse: "_1vcy5dzr"
|
|
15
|
+
}, F = "_1y2v1nfj7 _1vcy5dz12", H = "_1vcy5dz15 _1vcy5dz12", L = {
|
|
16
|
+
default: "_1vcy5dzs",
|
|
17
|
+
inverse: "_1vcy5dzt"
|
|
18
|
+
}, w = "_1vcy5dz9 _1y2v1nfhk _1y2v1nfkv _1y2v1nfla _1y2v1nflp";
|
|
19
|
+
export { _ as BURGER_MENU_ANIMATION_DURATION_MS, y as DESKTOP_MENU_ANIMATION_DURATION_MS, e as DESKTOP_SMALL_MENU_WIDTH, r as burgerIconContainer, a as burgerMenu, f as burgerMenuButton, i as burgerMenuContainer, t as burgerMenuContentContainer, o as burgerMenuTransition, d as desktopMenu, c as desktopMenuBackgroundContainer, z as desktopMenuColumnItem, h as desktopMenuContainer, p as desktopMenuContentFadeIn, u as desktopMenuFirstSection, s as desktopMenuLastSection, k as desktopMenuSectionArrow, M as desktopMenuSectionArrowContainer, l as desktopMenuSectionContainer, g as desktopMenuSectionWithArrowWrapper, b as desktopMenuWrapper, C as desktopOnly, S as desktopSmallMenuContainer, A as iconCloseHidden, j as iconCloseOpen, B as iconMenuHidden, N as iconMenuOpen, m as lineHeightFix, x as logoContainer, I as mainNavBarSectionsContainer, O as mainNavigationBarContentWrapper, T as navbarBorderColorVariants, E as navigationBarAction, R as navigationBarContent, U as navigationBarContentRight, W as navigationBarContentRightExpanded, D as section, q as selectedSectionVariantes, F as spacer, H as spacerLarge, L as textWrapperVariants, w as topFixed };
|