@fiscozen/composables 1.0.3 → 1.0.4

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.
@@ -1,1460 +1,2165 @@
1
- import { ref as g, reactive as Y, onUnmounted as Q, nextTick as J, onMounted as E, computed as W, watch as B, onBeforeUnmount as $, defineComponent as Z, useSlots as _, toRef as j, toRefs as ee, createElementBlock as V, openBlock as M, renderSlot as C, createElementVNode as D, withDirectives as T, createCommentVNode as U, createBlock as te, unref as P, normalizeClass as q, vShow as G, Teleport as oe } from "vue";
2
- const le = (e, t) => {
3
- if (!isFinite(e) || t < 0) return e;
4
- if (t === 0) return Math.trunc(e);
5
- const o = String(e);
6
- if (o.includes("e") || o.includes("E")) {
7
- const n = Math.pow(10, t);
8
- return Math.trunc(e * n) / n;
9
- }
10
- const l = o.indexOf(".");
11
- return l === -1 || o.length - l - 1 <= t ? e : Number(o.slice(0, l + t + 1));
12
- }, ne = (e, {
13
- minimumFractionDigits: t = 0,
14
- maximumFractionDigits: o = 2,
15
- roundDecimals: l = !0,
16
- useGrouping: n = !0
17
- } = {}) => e == null || isNaN(e) || !isFinite(e) ? "" : (l ? e : le(e, o)).toLocaleString("it-IT", {
18
- minimumFractionDigits: t,
19
- maximumFractionDigits: o,
20
- useGrouping: n
21
- }), re = (e) => {
22
- if (!e || typeof e != "string")
23
- return NaN;
24
- let t = e.trim();
25
- return t.includes(",") && (t = t.replace(/\./g, ""), t = t.replace(",", ".")), parseFloat(t);
26
- }, ze = (e, t) => {
27
- let o = t;
28
- const l = t % e, n = t >= 0 ? e : -e;
29
- return l !== 0 && (o = Math.abs(l) >= e / 2 ? t + n - l : t - l), o;
30
- }, Ee = (e, t, o) => Math.max(e, Math.min(t, o)), z = new DOMRect(0, 0, window.innerWidth, window.innerHeight), b = (e, t, o, l, n) => {
31
- let r = n ? "bottom" : "right", p = n ? "bottom-start" : "right-start";
32
- z.width = window.innerWidth, z.height = window.innerHeight, z.x = 0, z.y = 0;
33
- const y = e ? e.getBoundingClientRect() : z, v = t.getBoundingClientRect(), d = o.getBoundingClientRect(), h = (d.left - y.left - v.width) / y.width, x = (y.right - d.right - v.width) / y.width, c = (d.top - y.top - v.height) / y.height, i = (y.bottom - d.bottom - v.height) / y.height;
34
- let s = [
35
- {
36
- key: "right",
37
- space: x
38
- },
39
- {
40
- key: "top",
41
- space: c
42
- },
43
- {
44
- key: "bottom",
45
- space: i
46
- },
47
- {
48
- key: "left",
49
- space: h
50
- }
51
- ].sort((u, f) => f.space - u.space);
52
- if (n && (s = s.filter((u) => u.key === "top" || u.key === "bottom")), r = s[0].key, !l) {
53
- const u = (v.height - d.height) / 2;
54
- switch (r) {
55
- case "right":
56
- case "left":
57
- y.top > d.top - u && (l = "end"), y.bottom < d.top - u && (l = "start");
58
- break;
59
- }
60
- }
61
- return p = l ? `${r}-${l}` : r, p;
62
- }, ae = (e, t, o, l) => ({
63
- x: t.x + e.width * o / 100,
64
- y: t.y + e.height * l / 100
65
- }), F = (e) => typeof e == "string" ? document.querySelector(e) : e, ie = (e) => ({
66
- left: parseFloat(e.marginLeft),
67
- right: parseFloat(e.marginRight),
68
- top: parseFloat(e.marginTop),
69
- bottom: parseFloat(e.marginBottom)
70
- }), se = {
71
- // Bottom positions - content below opener
72
- bottom: (e, t) => ({
73
- position: {
74
- x: e.left - t.left + e.width / 2,
75
- y: e.bottom
76
- },
77
- transform: { x: -50, y: 0 }
78
- }),
79
- "bottom-start": (e, t) => ({
80
- position: {
81
- x: e.left - t.left,
82
- y: e.bottom
83
- },
84
- transform: { x: 0, y: 0 }
85
- }),
86
- "bottom-end": (e, t) => ({
87
- position: {
88
- x: e.right + t.right,
89
- y: e.bottom
90
- },
91
- transform: { x: -100, y: 0 }
92
- }),
93
- // Top positions - content above opener
94
- top: (e, t) => ({
95
- position: {
96
- x: e.left - t.left + e.width / 2,
97
- y: e.top - t.bottom
98
- },
99
- transform: { x: -50, y: -100 }
100
- }),
101
- "top-start": (e, t) => ({
102
- position: {
103
- x: e.left - t.left,
104
- y: e.top - t.bottom
105
- },
106
- transform: { x: 0, y: -100 }
107
- }),
108
- "top-end": (e, t) => ({
109
- position: {
110
- x: e.right + t.right,
111
- y: e.top - t.bottom
112
- },
113
- transform: { x: -100, y: -100 }
114
- }),
115
- // Left positions - content to left of opener
116
- left: (e, t) => ({
117
- position: {
118
- x: e.left - t.right,
119
- y: e.top - t.top + e.height / 2
120
- },
121
- transform: { x: -100, y: -50 }
122
- }),
123
- "left-start": (e, t) => ({
124
- position: {
125
- x: e.left - t.right,
126
- y: e.top - t.top
127
- },
128
- transform: { x: -100, y: 0 }
129
- }),
130
- "left-end": (e, t) => ({
131
- position: {
132
- x: e.left - t.right,
133
- y: e.bottom + t.bottom
134
- },
135
- transform: { x: -100, y: -100 }
136
- }),
137
- // Right positions - content to right of opener
138
- right: (e, t) => ({
139
- position: {
140
- x: e.right + t.left,
141
- y: e.top - t.top + e.height / 2
142
- },
143
- transform: { x: 0, y: -50 }
144
- }),
145
- "right-start": (e, t) => ({
146
- position: {
147
- x: e.right + t.left,
148
- y: e.top - t.top
149
- },
150
- transform: { x: 0, y: 0 }
151
- }),
152
- "right-end": (e, t) => ({
153
- position: {
154
- x: e.right + t.left,
155
- y: e.bottom + t.bottom
156
- },
157
- transform: { x: 0, y: -100 }
158
- })
159
- }, pe = (e, t, o) => {
160
- const l = se[e];
161
- return l ? l(t, o) : { position: { x: 0, y: 0 }, transform: { x: 0, y: 0 } };
162
- }, ue = {
163
- bottom: (e, t) => ({
164
- position: {
165
- x: e.left + e.width / 2,
166
- y: e.bottom - t.height
167
- },
168
- transform: { x: -50, y: 0 }
169
- }),
170
- "bottom-start": (e, t) => ({
171
- position: {
172
- x: e.left,
173
- y: e.bottom - t.height
174
- },
175
- transform: { x: 0, y: 0 }
176
- }),
177
- "bottom-end": (e, t) => ({
178
- position: {
179
- x: e.right - t.width,
180
- y: e.bottom - t.height
181
- },
182
- transform: { x: 0, y: 0 }
183
- }),
184
- top: (e) => ({
185
- position: {
186
- x: e.left + e.width / 2,
187
- y: e.top
188
- },
189
- transform: { x: -50, y: 0 }
190
- }),
191
- "top-start": (e) => ({
192
- position: {
193
- x: e.left,
194
- y: e.top
195
- },
196
- transform: { x: 0, y: 0 }
197
- }),
198
- "top-end": (e, t) => ({
199
- position: {
200
- x: e.right - t.width,
201
- y: e.top
202
- },
203
- transform: { x: 0, y: 0 }
204
- }),
205
- left: (e, t) => ({
206
- position: {
207
- x: e.left,
208
- y: e.top + (e.height - t.height) / 2
209
- },
210
- transform: { x: 0, y: 0 }
211
- }),
212
- "left-start": (e) => ({
213
- position: {
214
- x: e.left,
215
- y: e.top
216
- },
217
- transform: { x: 0, y: 0 }
218
- }),
219
- "left-end": (e, t) => ({
220
- position: {
221
- x: e.left,
222
- y: e.bottom - t.height
223
- },
224
- transform: { x: 0, y: 0 }
225
- }),
226
- right: (e, t) => ({
227
- position: {
228
- x: e.right - t.width,
229
- y: e.top + (e.height - t.height) / 2
230
- },
231
- transform: { x: 0, y: 0 }
232
- }),
233
- "right-start": (e, t) => ({
234
- position: {
235
- x: e.right - t.width,
236
- y: e.top
237
- },
238
- transform: { x: 0, y: 0 }
239
- }),
240
- "right-end": (e, t) => ({
241
- position: {
242
- x: e.right - t.width,
243
- y: e.bottom - t.height
244
- },
245
- transform: { x: 0, y: 0 }
246
- })
247
- }, ce = (e, t, o) => {
248
- const l = ue[e];
249
- return l ? l(t, o) : { position: { x: 0, y: 0 }, transform: { x: 0, y: 0 } };
250
- }, fe = (e, t, o, l) => {
251
- const n = { ...e }, r = { ...l };
252
- if (e.x < o.left && (n.x = o.left, r.x = 0), e.x + t.width > o.right) {
253
- const p = o.right - t.width;
254
- p > 0 && (n.x = p), r.x = 0;
255
- }
256
- if (e.y < o.top && (n.y = o.top, r.y = 0), e.y + t.height > o.bottom) {
257
- const p = o.bottom - t.height;
258
- p > 0 && (n.y = p), r.y = 0;
259
- }
260
- return { position: n, transform: r };
261
- }, ye = (e, t, o, l, n) => {
262
- const r = n ? null : t;
263
- switch (e) {
264
- case "auto":
265
- return b(r, o, l);
266
- case "auto-vertical":
267
- return b(r, o, l, void 0, !0);
268
- case "auto-start":
269
- return b(r, o, l, "start");
270
- case "auto-vertical-start":
271
- return b(r, o, l, "start", !0);
272
- case "auto-end":
273
- return b(r, o, l, "end");
274
- case "auto-vertical-end":
275
- return b(r, o, l, "end", !0);
276
- default:
277
- return "bottom-start";
278
- }
279
- }, de = (e) => e.startsWith("auto"), ve = (e) => {
280
- const t = g("auto"), o = g(), l = g(), n = g(), r = g(), p = Y({ position: { x: 0, y: 0 } }), y = {
281
- root: null,
282
- rootMargin: "0px",
283
- threshold: 1,
284
- ...e.element.value.intersectionOptions
285
- }, v = g(new IntersectionObserver(() => {
286
- }, y)), d = () => {
287
- var u, f;
288
- const c = F(e.element.value.domRef.value);
289
- if (!c)
290
- return null;
291
- const i = (u = e.container) != null && u.value ? F(e.container.value.domRef.value) ?? document.body : document.body, s = (f = e.opener) != null && f.value ? F(e.opener.value.domRef.value) : null;
292
- return { element: c, container: i, opener: s };
293
- }, h = (c) => {
294
- var i;
295
- return {
296
- element: c.element.getBoundingClientRect(),
297
- container: c.container.getBoundingClientRect(),
298
- opener: ((i = c.opener) == null ? void 0 : i.getBoundingClientRect()) ?? null
299
- };
300
- }, x = (c = !1) => J(() => {
301
- var O, R, L;
302
- o.value = ((O = e.position) == null ? void 0 : O.value) ?? "auto";
303
- const i = d();
304
- if (!i) return;
305
- Object.assign(i.element.style, {
306
- position: "fixed",
307
- top: "0px",
308
- left: "0px"
309
- });
310
- const s = h(i);
311
- l.value = s.element, n.value = s.opener ?? void 0, r.value = s.container, v.value.observe(i.element), v.value.observe(i.container), de(o.value) && i.opener && (o.value = ye(
312
- o.value,
313
- i.container,
314
- i.element,
315
- i.opener,
316
- ((R = e.useViewport) == null ? void 0 : R.value) ?? !1
317
- ));
318
- const u = ie(window.getComputedStyle(i.element)), f = i.opener && s.opener ? pe(o.value, s.opener, u) : ce(o.value, s.container, s.element), k = ae(
319
- s.element,
320
- f.position,
321
- f.transform.x,
322
- f.transform.y
323
- ), S = fe(
324
- k,
325
- s.element,
326
- s.container,
327
- f.transform
328
- );
329
- p.position.x = S.position.x, p.position.y = S.position.y, Object.assign(i.element.style, {
330
- top: `${p.position.y}px`,
331
- left: `${p.position.x}px`,
332
- position: "fixed",
333
- display: "flex"
334
- }), l.value = i.element.getBoundingClientRect(), (L = e.callback) != null && L.value && !c && e.callback.value(l, n, r, t, o);
335
- });
336
- return Q(() => {
337
- v.value.disconnect();
338
- }), {
339
- float: p,
340
- rect: l,
341
- setPosition: x,
342
- position: t,
343
- actualPosition: o,
344
- openerRect: n,
345
- containerRect: r
346
- };
1
+ import { Teleport as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, defineComponent as o, nextTick as s, normalizeClass as c, onBeforeUnmount as l, onMounted as u, onUnmounted as d, openBlock as f, reactive as p, ref as m, renderSlot as h, toRef as g, toRefs as _, unref as v, useSlots as y, vShow as b, watch as x, withDirectives as S } from "vue";
2
+ //#region src/utils/number/index.ts
3
+ var C = (e, t) => {
4
+ if (!isFinite(e) || t < 0) return e;
5
+ if (t === 0) return Math.trunc(e);
6
+ let n = String(e);
7
+ if (n.includes("e") || n.includes("E")) {
8
+ let n = 10 ** t;
9
+ return Math.trunc(e * n) / n;
10
+ }
11
+ let r = n.indexOf(".");
12
+ return r === -1 || n.length - r - 1 <= t ? e : Number(n.slice(0, r + t + 1));
13
+ }, w = (e, { minimumFractionDigits: t = 0, maximumFractionDigits: n = 2, roundDecimals: r = !0, useGrouping: i = !0 } = {}) => e == null || isNaN(e) || !isFinite(e) ? "" : (r ? e : C(e, n)).toLocaleString("it-IT", {
14
+ minimumFractionDigits: t,
15
+ maximumFractionDigits: n,
16
+ useGrouping: i
17
+ }), T = (e) => {
18
+ if (!e || typeof e != "string") return NaN;
19
+ let t = e.trim();
20
+ return t.includes(",") && (t = t.replace(/\./g, ""), t = t.replace(",", ".")), parseFloat(t);
21
+ }, E = (e, t) => {
22
+ let n = t, r = t % e, i = t >= 0 ? e : -e;
23
+ return r !== 0 && (n = Math.abs(r) >= e / 2 ? t + i - r : t - r), n;
24
+ }, D = (e, t, n) => Math.max(e, Math.min(t, n)), O = new DOMRect(0, 0, window.innerWidth, window.innerHeight), k = (e, t, n, r, i) => {
25
+ let a = i ? "bottom" : "right", o = i ? "bottom-start" : "right-start";
26
+ O.width = window.innerWidth, O.height = window.innerHeight, O.x = 0, O.y = 0;
27
+ let s = e ? e.getBoundingClientRect() : O, c = t.getBoundingClientRect(), l = n.getBoundingClientRect(), u = (l.left - s.left - c.width) / s.width, d = (s.right - l.right - c.width) / s.width, f = (l.top - s.top - c.height) / s.height, p = (s.bottom - l.bottom - c.height) / s.height, m = [
28
+ {
29
+ key: "right",
30
+ space: d
31
+ },
32
+ {
33
+ key: "top",
34
+ space: f
35
+ },
36
+ {
37
+ key: "bottom",
38
+ space: p
39
+ },
40
+ {
41
+ key: "left",
42
+ space: u
43
+ }
44
+ ].sort((e, t) => t.space - e.space);
45
+ if (i && (m = m.filter((e) => e.key === "top" || e.key === "bottom")), a = m[0].key, !r) {
46
+ let e = (c.height - l.height) / 2;
47
+ switch (a) {
48
+ case "right":
49
+ case "left":
50
+ s.top > l.top - e && (r = "end"), s.bottom < l.top - e && (r = "start");
51
+ break;
52
+ default: break;
53
+ }
54
+ }
55
+ return o = r ? `${a}-${r}` : a, o;
56
+ }, A = (e, t, n, r) => ({
57
+ x: t.x + e.width * n / 100,
58
+ y: t.y + e.height * r / 100
59
+ }), j = (e) => typeof e == "string" ? document.querySelector(e) : e, M = (e) => ({
60
+ left: parseFloat(e.marginLeft),
61
+ right: parseFloat(e.marginRight),
62
+ top: parseFloat(e.marginTop),
63
+ bottom: parseFloat(e.marginBottom)
64
+ }), N = (e) => e !== null && (e.width > 0 || e.height > 0), P = {
65
+ bottom: (e, t) => ({
66
+ position: {
67
+ x: e.left - t.left + e.width / 2,
68
+ y: e.bottom
69
+ },
70
+ transform: {
71
+ x: -50,
72
+ y: 0
73
+ }
74
+ }),
75
+ "bottom-start": (e, t) => ({
76
+ position: {
77
+ x: e.left - t.left,
78
+ y: e.bottom
79
+ },
80
+ transform: {
81
+ x: 0,
82
+ y: 0
83
+ }
84
+ }),
85
+ "bottom-end": (e, t) => ({
86
+ position: {
87
+ x: e.right + t.right,
88
+ y: e.bottom
89
+ },
90
+ transform: {
91
+ x: -100,
92
+ y: 0
93
+ }
94
+ }),
95
+ top: (e, t) => ({
96
+ position: {
97
+ x: e.left - t.left + e.width / 2,
98
+ y: e.top - t.bottom
99
+ },
100
+ transform: {
101
+ x: -50,
102
+ y: -100
103
+ }
104
+ }),
105
+ "top-start": (e, t) => ({
106
+ position: {
107
+ x: e.left - t.left,
108
+ y: e.top - t.bottom
109
+ },
110
+ transform: {
111
+ x: 0,
112
+ y: -100
113
+ }
114
+ }),
115
+ "top-end": (e, t) => ({
116
+ position: {
117
+ x: e.right + t.right,
118
+ y: e.top - t.bottom
119
+ },
120
+ transform: {
121
+ x: -100,
122
+ y: -100
123
+ }
124
+ }),
125
+ left: (e, t) => ({
126
+ position: {
127
+ x: e.left - t.right,
128
+ y: e.top - t.top + e.height / 2
129
+ },
130
+ transform: {
131
+ x: -100,
132
+ y: -50
133
+ }
134
+ }),
135
+ "left-start": (e, t) => ({
136
+ position: {
137
+ x: e.left - t.right,
138
+ y: e.top - t.top
139
+ },
140
+ transform: {
141
+ x: -100,
142
+ y: 0
143
+ }
144
+ }),
145
+ "left-end": (e, t) => ({
146
+ position: {
147
+ x: e.left - t.right,
148
+ y: e.bottom + t.bottom
149
+ },
150
+ transform: {
151
+ x: -100,
152
+ y: -100
153
+ }
154
+ }),
155
+ right: (e, t) => ({
156
+ position: {
157
+ x: e.right + t.left,
158
+ y: e.top - t.top + e.height / 2
159
+ },
160
+ transform: {
161
+ x: 0,
162
+ y: -50
163
+ }
164
+ }),
165
+ "right-start": (e, t) => ({
166
+ position: {
167
+ x: e.right + t.left,
168
+ y: e.top - t.top
169
+ },
170
+ transform: {
171
+ x: 0,
172
+ y: 0
173
+ }
174
+ }),
175
+ "right-end": (e, t) => ({
176
+ position: {
177
+ x: e.right + t.left,
178
+ y: e.bottom + t.bottom
179
+ },
180
+ transform: {
181
+ x: 0,
182
+ y: -100
183
+ }
184
+ })
185
+ }, F = (e, t, n) => {
186
+ let r = P[e];
187
+ return r ? r(t, n) : {
188
+ position: {
189
+ x: 0,
190
+ y: 0
191
+ },
192
+ transform: {
193
+ x: 0,
194
+ y: 0
195
+ }
196
+ };
197
+ }, I = {
198
+ bottom: (e, t) => ({
199
+ position: {
200
+ x: e.left + e.width / 2,
201
+ y: e.bottom - t.height
202
+ },
203
+ transform: {
204
+ x: -50,
205
+ y: 0
206
+ }
207
+ }),
208
+ "bottom-start": (e, t) => ({
209
+ position: {
210
+ x: e.left,
211
+ y: e.bottom - t.height
212
+ },
213
+ transform: {
214
+ x: 0,
215
+ y: 0
216
+ }
217
+ }),
218
+ "bottom-end": (e, t) => ({
219
+ position: {
220
+ x: e.right - t.width,
221
+ y: e.bottom - t.height
222
+ },
223
+ transform: {
224
+ x: 0,
225
+ y: 0
226
+ }
227
+ }),
228
+ top: (e) => ({
229
+ position: {
230
+ x: e.left + e.width / 2,
231
+ y: e.top
232
+ },
233
+ transform: {
234
+ x: -50,
235
+ y: 0
236
+ }
237
+ }),
238
+ "top-start": (e) => ({
239
+ position: {
240
+ x: e.left,
241
+ y: e.top
242
+ },
243
+ transform: {
244
+ x: 0,
245
+ y: 0
246
+ }
247
+ }),
248
+ "top-end": (e, t) => ({
249
+ position: {
250
+ x: e.right - t.width,
251
+ y: e.top
252
+ },
253
+ transform: {
254
+ x: 0,
255
+ y: 0
256
+ }
257
+ }),
258
+ left: (e, t) => ({
259
+ position: {
260
+ x: e.left,
261
+ y: e.top + (e.height - t.height) / 2
262
+ },
263
+ transform: {
264
+ x: 0,
265
+ y: 0
266
+ }
267
+ }),
268
+ "left-start": (e) => ({
269
+ position: {
270
+ x: e.left,
271
+ y: e.top
272
+ },
273
+ transform: {
274
+ x: 0,
275
+ y: 0
276
+ }
277
+ }),
278
+ "left-end": (e, t) => ({
279
+ position: {
280
+ x: e.left,
281
+ y: e.bottom - t.height
282
+ },
283
+ transform: {
284
+ x: 0,
285
+ y: 0
286
+ }
287
+ }),
288
+ right: (e, t) => ({
289
+ position: {
290
+ x: e.right - t.width,
291
+ y: e.top + (e.height - t.height) / 2
292
+ },
293
+ transform: {
294
+ x: 0,
295
+ y: 0
296
+ }
297
+ }),
298
+ "right-start": (e, t) => ({
299
+ position: {
300
+ x: e.right - t.width,
301
+ y: e.top
302
+ },
303
+ transform: {
304
+ x: 0,
305
+ y: 0
306
+ }
307
+ }),
308
+ "right-end": (e, t) => ({
309
+ position: {
310
+ x: e.right - t.width,
311
+ y: e.bottom - t.height
312
+ },
313
+ transform: {
314
+ x: 0,
315
+ y: 0
316
+ }
317
+ })
318
+ }, L = (e, t, n) => {
319
+ let r = I[e];
320
+ return r ? r(t, n) : {
321
+ position: {
322
+ x: 0,
323
+ y: 0
324
+ },
325
+ transform: {
326
+ x: 0,
327
+ y: 0
328
+ }
329
+ };
330
+ }, R = (e, t, n, r) => {
331
+ let i = { ...e }, a = { ...r };
332
+ if (e.x < n.left && (i.x = n.left, a.x = 0), e.x + t.width > n.right) {
333
+ let e = n.right - t.width;
334
+ e > 0 && (i.x = e), a.x = 0;
335
+ }
336
+ if (e.y < n.top && (i.y = n.top, a.y = 0), e.y + t.height > n.bottom) {
337
+ let e = n.bottom - t.height;
338
+ e > 0 && (i.y = e), a.y = 0;
339
+ }
340
+ return {
341
+ position: i,
342
+ transform: a
343
+ };
344
+ }, z = (e, t, n, r, i) => {
345
+ let a = i ? null : t;
346
+ switch (e) {
347
+ case "auto": return k(a, n, r);
348
+ case "auto-vertical": return k(a, n, r, void 0, !0);
349
+ case "auto-start": return k(a, n, r, "start");
350
+ case "auto-vertical-start": return k(a, n, r, "start", !0);
351
+ case "auto-end": return k(a, n, r, "end");
352
+ case "auto-vertical-end": return k(a, n, r, "end", !0);
353
+ default: return "bottom-start";
354
+ }
355
+ }, B = (e) => e.startsWith("auto"), V = (e) => {
356
+ let t = m("auto"), n = m(), r = m(), i = m(), a = m(), o = p({ position: {
357
+ x: 0,
358
+ y: 0
359
+ } }), c = {
360
+ root: null,
361
+ rootMargin: "0px",
362
+ threshold: 1,
363
+ ...e.element.value.intersectionOptions
364
+ }, l = m(new IntersectionObserver(() => {}, c)), u = () => {
365
+ let t = j(e.element.value.domRef.value);
366
+ return t ? {
367
+ element: t,
368
+ container: e.container?.value ? j(e.container.value.domRef.value) ?? document.body : document.body,
369
+ opener: e.opener?.value ? j(e.opener.value.domRef.value) : null
370
+ } : null;
371
+ }, f = (e) => ({
372
+ element: e.element.getBoundingClientRect(),
373
+ container: e.container.getBoundingClientRect(),
374
+ opener: e.opener?.getBoundingClientRect() ?? null
375
+ });
376
+ return d(() => {
377
+ l.value.disconnect();
378
+ }), {
379
+ float: o,
380
+ rect: r,
381
+ setPosition: (c = !1) => s(() => {
382
+ n.value = e.position?.value ?? "auto";
383
+ let s = u();
384
+ if (!s) return;
385
+ Object.assign(s.element.style, {
386
+ position: "fixed",
387
+ top: "0px",
388
+ left: "0px"
389
+ });
390
+ let d = f(s);
391
+ if (r.value = d.element, i.value = d.opener ?? void 0, a.value = d.container, s.opener && !N(d.opener)) {
392
+ s.element.style.display = "none";
393
+ return;
394
+ }
395
+ l.value.observe(s.element), l.value.observe(s.container), B(n.value) && s.opener && (n.value = z(n.value, s.container, s.element, s.opener, e.useViewport?.value ?? !1));
396
+ let p = M(window.getComputedStyle(s.element)), m = s.opener && d.opener ? F(n.value, d.opener, p) : L(n.value, d.container, d.element), h = R(A(d.element, m.position, m.transform.x, m.transform.y), d.element, d.container, m.transform);
397
+ o.position.x = h.position.x, o.position.y = h.position.y, Object.assign(s.element.style, {
398
+ top: `${o.position.y}px`,
399
+ left: `${o.position.x}px`,
400
+ position: "fixed",
401
+ display: "flex"
402
+ }), r.value = s.element.getBoundingClientRect(), e.callback?.value && !c && e.callback.value(r, i, a, t, n);
403
+ }),
404
+ position: t,
405
+ actualPosition: n,
406
+ openerRect: i,
407
+ containerRect: a
408
+ };
347
409
  };
348
- function N(e) {
349
- const t = window.matchMedia(e), o = g(t.matches);
350
- function l(n) {
351
- o.value = n.matches;
352
- }
353
- return E(() => {
354
- t.addEventListener("change", l);
355
- }), Q(() => {
356
- t.removeEventListener("change", l);
357
- }), W(() => o.value);
410
+ //#endregion
411
+ //#region src/composables/useMediaQuery.ts
412
+ function H(e) {
413
+ let n = window.matchMedia(e), r = m(n.matches);
414
+ function i(e) {
415
+ r.value = e.matches;
416
+ }
417
+ return u(() => {
418
+ n.addEventListener("change", i);
419
+ }), d(() => {
420
+ n.removeEventListener("change", i);
421
+ }), t(() => r.value);
358
422
  }
359
- function ke(e) {
360
- return {
361
- isGreater(t) {
362
- return N(`(min-width: ${e[t]})`);
363
- },
364
- isSmaller(t) {
365
- return N(`(max-width: ${e[t]})`);
366
- },
367
- isInBetween(t, o) {
368
- return N(`(min-width: ${e[t]}) and (max-width: ${e[o]})`);
369
- }
370
- };
423
+ //#endregion
424
+ //#region src/composables/useBreakpoints.ts
425
+ function U(e) {
426
+ return {
427
+ isGreater(t) {
428
+ return H(`(min-width: ${e[t]})`);
429
+ },
430
+ isSmaller(t) {
431
+ return H(`(max-width: ${e[t]})`);
432
+ },
433
+ isInBetween(t, n) {
434
+ return H(`(min-width: ${e[t]}) and (max-width: ${e[n]})`);
435
+ }
436
+ };
371
437
  }
372
- function Oe(e, t, o) {
373
- if (!e)
374
- throw new Error("A target component has to be provided.");
375
- if (!t)
376
- throw new Error("A callback has to be provided.");
377
- const l = (n) => {
378
- !e.value || n.target === e.value || n.composedPath().includes(e.value) || typeof t == "function" && t();
379
- };
380
- o && B(o, (n, r) => {
381
- r && r.removeEventListener("click", l), n == null || n.addEventListener("click", l);
382
- }), E(() => {
383
- o || document.addEventListener("click", l);
384
- }), $(() => {
385
- var n;
386
- if (o) {
387
- (n = o.value) == null || n.removeEventListener("click", l);
388
- return;
389
- }
390
- document.removeEventListener("click", l);
391
- });
438
+ //#endregion
439
+ //#region src/composables/useClickOutside.ts
440
+ function W(e, t, n) {
441
+ if (!e) throw Error("A target component has to be provided.");
442
+ if (!t) throw Error("A callback has to be provided.");
443
+ let r = (n) => {
444
+ !e.value || n.target === e.value || n.composedPath().includes(e.value) || typeof t == "function" && t();
445
+ };
446
+ n && x(n, (e, t) => {
447
+ t && t.removeEventListener("click", r), e?.addEventListener("click", r);
448
+ }), u(() => {
449
+ n || document.addEventListener("click", r);
450
+ }), l(() => {
451
+ if (n) {
452
+ n.value?.removeEventListener("click", r);
453
+ return;
454
+ }
455
+ document.removeEventListener("click", r);
456
+ });
392
457
  }
393
- function Le(e, t) {
394
- if (!e)
395
- throw new Error("A target component has to be provided.");
396
- if (!t || typeof t != "function")
397
- throw new Error("A callback has to be provided.");
398
- const o = (l) => {
399
- t(l);
400
- };
401
- E(() => {
402
- e.value.addEventListener("keydown", o);
403
- }), $(() => {
404
- e.value.removeEventListener("keydown", o);
405
- });
458
+ //#endregion
459
+ //#region src/composables/useKeyDown.ts
460
+ function G(e, t) {
461
+ if (!e) throw Error("A target component has to be provided.");
462
+ if (!t || typeof t != "function") throw Error("A callback has to be provided.");
463
+ let n = (e) => {
464
+ t(e);
465
+ };
466
+ u(() => {
467
+ e.value.addEventListener("keydown", n);
468
+ }), l(() => {
469
+ e.value.removeEventListener("keydown", n);
470
+ });
406
471
  }
407
- function Be(e, t) {
408
- if (!e || typeof e != "function")
409
- throw new Error("A callback has to be provided.");
410
- const o = (l) => {
411
- e(l);
412
- };
413
- E(() => {
414
- if (!t) {
415
- document.addEventListener("keyup", o);
416
- return;
417
- }
418
- t.value.addEventListener("keyup", o);
419
- }), $(() => {
420
- if (!t) {
421
- document.removeEventListener("keyup", o);
422
- return;
423
- }
424
- t.value.removeEventListener("keyup", o);
425
- });
472
+ //#endregion
473
+ //#region src/composables/useKeyUp.ts
474
+ function K(e, t) {
475
+ if (!e || typeof e != "function") throw Error("A callback has to be provided.");
476
+ let n = (t) => {
477
+ e(t);
478
+ };
479
+ u(() => {
480
+ if (!t) {
481
+ document.addEventListener("keyup", n);
482
+ return;
483
+ }
484
+ t.value.addEventListener("keyup", n);
485
+ }), l(() => {
486
+ if (!t) {
487
+ document.removeEventListener("keyup", n);
488
+ return;
489
+ }
490
+ t.value.removeEventListener("keyup", n);
491
+ });
426
492
  }
427
- const Ne = (e) => ({
428
- format: ne,
429
- parse: re
430
- }), xe = {
431
- blue: {
432
- 50: {
433
- value: "#eff1ff",
434
- type: "color"
435
- },
436
- 100: {
437
- value: "#dee2ff",
438
- type: "color"
439
- },
440
- 200: {
441
- value: "#bdc5ff",
442
- type: "color"
443
- },
444
- 300: {
445
- value: "#9ca8ff",
446
- type: "color"
447
- },
448
- 400: {
449
- value: "#7b8bff",
450
- type: "color"
451
- },
452
- 500: {
453
- value: "#5a6eff",
454
- type: "color"
455
- },
456
- 600: {
457
- value: "#4858cc",
458
- type: "color"
459
- },
460
- 700: {
461
- value: "#364299",
462
- type: "color"
463
- },
464
- 800: {
465
- value: "#242c66",
466
- type: "color"
467
- },
468
- 900: {
469
- value: "#1b214c",
470
- type: "color"
471
- }
472
- },
473
- purple: {
474
- 50: {
475
- value: "#f8f4ff",
476
- type: "color"
477
- },
478
- 100: {
479
- value: "#f0e9ff",
480
- type: "color"
481
- },
482
- 200: {
483
- value: "#e1d3ff",
484
- type: "color"
485
- },
486
- 300: {
487
- value: "#d2bdff",
488
- type: "color"
489
- },
490
- 400: {
491
- value: "#c3a7ff",
492
- type: "color"
493
- },
494
- 500: {
495
- value: "#b491ff",
496
- type: "color"
497
- },
498
- 600: {
499
- value: "#9074cc",
500
- type: "color"
501
- },
502
- 700: {
503
- value: "#6c5799",
504
- type: "color"
505
- },
506
- 800: {
507
- value: "#483a66",
508
- type: "color"
509
- },
510
- 900: {
511
- value: "#241d33",
512
- type: "color"
513
- }
514
- },
515
- orange: {
516
- 50: {
517
- value: "#fff2ef",
518
- type: "color"
519
- },
520
- 100: {
521
- value: "#ffe4de",
522
- type: "color"
523
- },
524
- 200: {
525
- value: "#ffc9bd",
526
- type: "color"
527
- },
528
- 300: {
529
- value: "#ffae9c",
530
- type: "color"
531
- },
532
- 400: {
533
- value: "#ff937b",
534
- type: "color"
535
- },
536
- 500: {
537
- value: "#ff785a",
538
- type: "color"
539
- },
540
- 600: {
541
- value: "#cc6048",
542
- type: "color"
543
- },
544
- 700: {
545
- value: "#994836",
546
- type: "color"
547
- },
548
- 800: {
549
- value: "#663024",
550
- type: "color"
551
- },
552
- 900: {
553
- value: "#331812",
554
- type: "color"
555
- }
556
- },
557
- pink: {
558
- 50: {
559
- value: "#fff5f5",
560
- type: "color"
561
- },
562
- 100: {
563
- value: "#ffe0e0",
564
- type: "color"
565
- },
566
- 200: {
567
- value: "#ffcbcb",
568
- type: "color"
569
- },
570
- 300: {
571
- value: "#ffc0c0",
572
- type: "color"
573
- },
574
- 400: {
575
- value: "#ffabab",
576
- type: "color"
577
- },
578
- 500: {
579
- value: "#ff9696",
580
- type: "color"
581
- },
582
- 600: {
583
- value: "#cc7878",
584
- type: "color"
585
- },
586
- 700: {
587
- value: "#995a5a",
588
- type: "color"
589
- },
590
- 800: {
591
- value: "#663c3c",
592
- type: "color"
593
- },
594
- 900: {
595
- value: "#331e1e",
596
- type: "color"
597
- }
598
- },
599
- yellow: {
600
- 50: {
601
- value: "#fffbf4",
602
- type: "color"
603
- },
604
- 100: {
605
- value: "#fff3de",
606
- type: "color"
607
- },
608
- 200: {
609
- value: "#ffebc8",
610
- type: "color"
611
- },
612
- 300: {
613
- value: "#ffe7bd",
614
- type: "color"
615
- },
616
- 400: {
617
- value: "#ffdfa7",
618
- type: "color"
619
- },
620
- 500: {
621
- value: "#ffd791",
622
- type: "color"
623
- },
624
- 600: {
625
- value: "#ccac74",
626
- type: "color"
627
- },
628
- 700: {
629
- value: "#998157",
630
- type: "color"
631
- },
632
- 800: {
633
- value: "#806c49",
634
- type: "color"
635
- },
636
- 900: {
637
- value: "#4c402b",
638
- type: "color"
639
- }
640
- },
641
- semantic: {
642
- error: {
643
- 50: {
644
- value: "#fef3f3",
645
- type: "color"
646
- },
647
- 100: {
648
- value: "#f8baba",
649
- type: "color"
650
- },
651
- 200: {
652
- value: "#f04242",
653
- type: "color"
654
- },
655
- 300: {
656
- value: "#aa2f2f",
657
- type: "color"
658
- }
659
- },
660
- warning: {
661
- 50: {
662
- value: "#fff8f3",
663
- type: "color"
664
- },
665
- 100: {
666
- value: "#ffdabd",
667
- type: "color"
668
- },
669
- 200: {
670
- value: "#ffae4f",
671
- type: "color"
672
- },
673
- 300: {
674
- value: "#b47b38",
675
- type: "color"
676
- }
677
- },
678
- success: {
679
- 50: {
680
- value: "#f2f8f6",
681
- type: "color"
682
- },
683
- 100: {
684
- value: "#b5d8ce",
685
- type: "color"
686
- },
687
- 200: {
688
- value: "#0fa88c",
689
- type: "color"
690
- },
691
- 300: {
692
- value: "#0b7763",
693
- type: "color"
694
- }
695
- },
696
- info: {
697
- 50: {
698
- value: "#f3f7ff",
699
- type: "color"
700
- },
701
- 100: {
702
- value: "#b4c8e1",
703
- type: "color"
704
- },
705
- 200: {
706
- value: "#4e9fff",
707
- type: "color"
708
- },
709
- 300: {
710
- value: "#3770b4",
711
- type: "color"
712
- }
713
- }
714
- },
715
- background: {
716
- "white-smoke": {
717
- value: "#f7f6f3",
718
- type: "color"
719
- },
720
- seashell: {
721
- value: "#f8ece7",
722
- type: "color"
723
- },
724
- "pale-purple": {
725
- value: "#f2e6ff",
726
- type: "color"
727
- },
728
- "alice-blue": {
729
- value: "#ecf2fc",
730
- type: "color"
731
- }
732
- },
733
- grey: {
734
- 100: {
735
- value: "#e9edf0",
736
- type: "color"
737
- },
738
- 200: {
739
- value: "#d1dde6",
740
- type: "color"
741
- },
742
- 300: {
743
- value: "#9da9b2",
744
- type: "color"
745
- },
746
- 400: {
747
- value: "#6e777e",
748
- type: "color"
749
- },
750
- 500: {
751
- value: "#596167",
752
- type: "color"
753
- }
754
- },
755
- core: {
756
- white: {
757
- value: "#ffffff",
758
- type: "color"
759
- },
760
- black: {
761
- value: "#2c282f",
762
- type: "color"
763
- }
764
- },
765
- "font-sans": {
766
- "sharp-grotesk": {
767
- value: '"Sharp Grotesk", sans-serif',
768
- type: "fontFamilies"
769
- },
770
- inter: {
771
- value: '"Inter", sans-serif',
772
- type: "fontFamilies"
773
- }
774
- },
775
- font: {
776
- light: {
777
- value: "300",
778
- type: "fontWeights"
779
- },
780
- normal: {
781
- value: "400",
782
- type: "fontWeights"
783
- },
784
- medium: {
785
- value: "500",
786
- type: "fontWeights"
787
- }
788
- },
789
- spacing: {
790
- 0: {
791
- value: "0px",
792
- type: "spacing"
793
- },
794
- 1: {
795
- value: "1px",
796
- type: "spacing"
797
- },
798
- 2: {
799
- value: "2px",
800
- type: "spacing"
801
- },
802
- 4: {
803
- value: "4px",
804
- type: "spacing"
805
- },
806
- 6: {
807
- value: "6px",
808
- type: "spacing"
809
- },
810
- 8: {
811
- value: "8px",
812
- type: "spacing"
813
- },
814
- 10: {
815
- value: "10px",
816
- type: "spacing"
817
- },
818
- 12: {
819
- value: "12px",
820
- type: "spacing"
821
- },
822
- 14: {
823
- value: "14px",
824
- type: "spacing"
825
- },
826
- 16: {
827
- value: "16px",
828
- type: "spacing"
829
- },
830
- 20: {
831
- value: "20px",
832
- type: "spacing"
833
- },
834
- 24: {
835
- value: "24px",
836
- type: "spacing"
837
- },
838
- 28: {
839
- value: "28px",
840
- type: "spacing"
841
- },
842
- 32: {
843
- value: "32px",
844
- type: "spacing"
845
- },
846
- 36: {
847
- value: "36px",
848
- type: "spacing"
849
- },
850
- 40: {
851
- value: "40px",
852
- type: "spacing"
853
- },
854
- 44: {
855
- value: "44px",
856
- type: "spacing"
857
- },
858
- 48: {
859
- value: "48px",
860
- type: "spacing"
861
- },
862
- 56: {
863
- value: "56px",
864
- type: "spacing"
865
- },
866
- 64: {
867
- value: "64px",
868
- type: "spacing"
869
- },
870
- 80: {
871
- value: "80px",
872
- type: "spacing"
873
- },
874
- 96: {
875
- value: "96px",
876
- type: "spacing"
877
- },
878
- 112: {
879
- value: "112px",
880
- type: "spacing"
881
- },
882
- 128: {
883
- value: "128px",
884
- type: "spacing"
885
- },
886
- 144: {
887
- value: "144px",
888
- type: "spacing"
889
- },
890
- 160: {
891
- value: "160px",
892
- type: "spacing"
893
- },
894
- 176: {
895
- value: "176px",
896
- type: "spacing"
897
- },
898
- 192: {
899
- value: "192px",
900
- type: "spacing"
901
- },
902
- 208: {
903
- value: "208px",
904
- type: "spacing"
905
- },
906
- 224: {
907
- value: "224px",
908
- type: "spacing"
909
- },
910
- 240: {
911
- value: "240px",
912
- type: "spacing"
913
- },
914
- 256: {
915
- value: "256px",
916
- type: "spacing"
917
- },
918
- 288: {
919
- value: "288px",
920
- type: "spacing"
921
- },
922
- 320: {
923
- value: "320px",
924
- type: "spacing"
925
- },
926
- 384: {
927
- value: "384px",
928
- type: "spacing"
929
- }
930
- },
931
- border: {
932
- 0: {
933
- value: "0px",
934
- type: "borderWidth"
935
- },
936
- 1: {
937
- value: "1px",
938
- type: "borderWidth"
939
- },
940
- 2: {
941
- value: "2px",
942
- type: "borderWidth"
943
- },
944
- 4: {
945
- value: "4px",
946
- type: "borderWidth"
947
- },
948
- 8: {
949
- value: "8px",
950
- type: "borderWidth"
951
- }
952
- },
953
- rounded: {
954
- none: {
955
- value: "0px",
956
- type: "borderRadius"
957
- },
958
- sm: {
959
- value: "2px",
960
- type: "borderRadius"
961
- },
962
- base: {
963
- value: "4px",
964
- type: "borderRadius"
965
- },
966
- md: {
967
- value: "6px",
968
- type: "borderRadius"
969
- },
970
- lg: {
971
- value: "8px",
972
- type: "borderRadius"
973
- },
974
- xl: {
975
- value: "12px",
976
- type: "borderRadius"
977
- },
978
- "2xl": {
979
- value: "16px",
980
- type: "borderRadius"
981
- },
982
- "3xl": {
983
- value: "24px",
984
- type: "borderRadius"
985
- },
986
- full: {
987
- value: "9999px",
988
- type: "borderRadius"
989
- }
990
- },
991
- breakpoint: {
992
- xs: {
993
- value: "376px",
994
- type: "sizing"
995
- },
996
- sm: {
997
- value: "640px",
998
- type: "sizing"
999
- },
1000
- md: {
1001
- value: "768px",
1002
- type: "sizing"
1003
- },
1004
- lg: {
1005
- value: "1024px",
1006
- type: "sizing"
1007
- },
1008
- xl: {
1009
- value: "1280px",
1010
- type: "sizing"
1011
- },
1012
- "2xl": {
1013
- value: "1440px",
1014
- type: "sizing"
1015
- },
1016
- "3xl": {
1017
- value: "1536px",
1018
- type: "sizing"
1019
- }
1020
- },
1021
- shadow: {
1022
- none: {
1023
- value: {
1024
- color: "#000000",
1025
- type: "dropShadow",
1026
- x: "0",
1027
- y: "0",
1028
- blur: "0",
1029
- spread: "0"
1030
- },
1031
- type: "boxShadow"
1032
- },
1033
- sm: {
1034
- value: {
1035
- color: "#0000000d",
1036
- type: "dropShadow",
1037
- x: "0",
1038
- y: "1",
1039
- blur: "2",
1040
- spread: "0"
1041
- },
1042
- type: "boxShadow"
1043
- },
1044
- base: {
1045
- value: [
1046
- {
1047
- color: "#0000000f",
1048
- type: "dropShadow",
1049
- x: "0",
1050
- y: "1",
1051
- blur: "2",
1052
- spread: "0"
1053
- },
1054
- {
1055
- color: "#0000001a",
1056
- type: "dropShadow",
1057
- x: "0",
1058
- y: "1",
1059
- blur: "3",
1060
- spread: "0"
1061
- }
1062
- ],
1063
- type: "boxShadow"
1064
- },
1065
- md: {
1066
- value: [
1067
- {
1068
- color: "#0000000f",
1069
- type: "dropShadow",
1070
- x: "0",
1071
- y: "2",
1072
- blur: "4",
1073
- spread: "-1"
1074
- },
1075
- {
1076
- color: "#0000001a",
1077
- type: "dropShadow",
1078
- x: "0",
1079
- y: "4",
1080
- blur: "6",
1081
- spread: "-1"
1082
- }
1083
- ],
1084
- type: "boxShadow"
1085
- },
1086
- lg: {
1087
- value: [
1088
- {
1089
- color: "#0000000d",
1090
- type: "dropShadow",
1091
- x: "0",
1092
- y: "4",
1093
- blur: "6",
1094
- spread: "-2"
1095
- },
1096
- {
1097
- color: "#0000001a",
1098
- type: "dropShadow",
1099
- x: "0",
1100
- y: "10",
1101
- blur: "15",
1102
- spread: "-3"
1103
- }
1104
- ],
1105
- type: "boxShadow"
1106
- },
1107
- xl: {
1108
- value: [
1109
- {
1110
- color: "#0000000a",
1111
- type: "dropShadow",
1112
- x: "0",
1113
- y: "10",
1114
- blur: "10",
1115
- spread: "-5"
1116
- },
1117
- {
1118
- color: "#0000001a",
1119
- type: "dropShadow",
1120
- x: "0",
1121
- y: "20",
1122
- blur: "25",
1123
- spread: "-5"
1124
- }
1125
- ],
1126
- type: "boxShadow"
1127
- },
1128
- "2xl": {
1129
- value: {
1130
- color: "#00000040",
1131
- type: "dropShadow",
1132
- x: "0",
1133
- y: "25",
1134
- blur: "50",
1135
- spread: "-12"
1136
- },
1137
- type: "boxShadow"
1138
- },
1139
- inner: {
1140
- value: {
1141
- color: "#0000000f",
1142
- type: "innerShadow",
1143
- x: "0",
1144
- y: "2",
1145
- blur: "4",
1146
- spread: "0"
1147
- },
1148
- type: "boxShadow"
1149
- }
1150
- },
1151
- underline: {
1152
- value: "underline",
1153
- type: "textDecoration"
1154
- },
1155
- text: {
1156
- xs: {
1157
- value: "12px",
1158
- type: "fontSizes"
1159
- },
1160
- sm: {
1161
- value: "14px",
1162
- type: "fontSizes"
1163
- },
1164
- base: {
1165
- value: "16px",
1166
- type: "fontSizes"
1167
- },
1168
- lg: {
1169
- value: "18px",
1170
- type: "fontSizes"
1171
- },
1172
- xl: {
1173
- value: "20px",
1174
- type: "fontSizes"
1175
- },
1176
- "2xl": {
1177
- value: "24px",
1178
- type: "fontSizes"
1179
- },
1180
- "3xl": {
1181
- value: "30px",
1182
- type: "fontSizes"
1183
- },
1184
- "4xl": {
1185
- value: "36px",
1186
- type: "fontSizes"
1187
- },
1188
- "5xl": {
1189
- value: "48px",
1190
- type: "fontSizes"
1191
- },
1192
- "6xl": {
1193
- value: "60px",
1194
- type: "fontSizes"
1195
- },
1196
- "7xl": {
1197
- value: "72px",
1198
- type: "fontSizes"
1199
- },
1200
- "8xl": {
1201
- value: "96px",
1202
- type: "fontSizes"
1203
- },
1204
- "9xl": {
1205
- value: "128px",
1206
- type: "fontSizes"
1207
- }
1208
- },
1209
- leading: {
1210
- xs: {
1211
- value: "16px",
1212
- type: "lineHeights"
1213
- },
1214
- sm: {
1215
- value: "18px",
1216
- type: "lineHeights"
1217
- },
1218
- base: {
1219
- value: "20px",
1220
- type: "lineHeights"
1221
- },
1222
- lg: {
1223
- value: "24px",
1224
- type: "lineHeights"
1225
- },
1226
- xl: {
1227
- value: "28px",
1228
- type: "lineHeights"
1229
- },
1230
- "2xl": {
1231
- value: "32px",
1232
- type: "lineHeights"
1233
- },
1234
- "3xl": {
1235
- value: "36px",
1236
- type: "lineHeights"
1237
- },
1238
- "4xl": {
1239
- value: "40px",
1240
- type: "lineHeights"
1241
- },
1242
- "5xl": {
1243
- value: "48px",
1244
- type: "lineHeights"
1245
- },
1246
- "6xl": {
1247
- value: "60px",
1248
- type: "lineHeights"
1249
- },
1250
- "7xl": {
1251
- value: "72px",
1252
- type: "lineHeights"
1253
- },
1254
- "8xl": {
1255
- value: "96px",
1256
- type: "lineHeights"
1257
- },
1258
- "9xl": {
1259
- value: "128px",
1260
- type: "lineHeights"
1261
- }
1262
- }
1263
- }, H = {
1264
- global: xe
1265
- }, he = [
1266
- "blue",
1267
- "purple",
1268
- "orange",
1269
- "pink",
1270
- "yellow",
1271
- "grey",
1272
- "core"
1273
- ], ge = {
1274
- safeColorNames: he
1275
- }, me = [
1276
- "error",
1277
- "warning",
1278
- "success",
1279
- "info"
1280
- ], be = {
1281
- semanticColorNames: me
1282
- }, we = ge.safeColorNames, Se = be.semanticColorNames, w = {};
1283
- we.forEach((e) => {
1284
- const t = H.global[e];
1285
- t && Object.keys(t).forEach((o) => {
1286
- var n;
1287
- const l = (n = t[o]) == null ? void 0 : n.value;
1288
- l && (w[e] || (w[e] = {}), w[e][o] = l);
1289
- });
493
+ //#endregion
494
+ //#region src/composables/useCurrency.ts
495
+ var q = (e) => ({
496
+ format: w,
497
+ parse: T
498
+ }), J = {
499
+ global: {
500
+ blue: {
501
+ 50: {
502
+ value: "#eff1ff",
503
+ type: "color"
504
+ },
505
+ 100: {
506
+ value: "#dee2ff",
507
+ type: "color"
508
+ },
509
+ 200: {
510
+ value: "#bdc5ff",
511
+ type: "color"
512
+ },
513
+ 300: {
514
+ value: "#9ca8ff",
515
+ type: "color"
516
+ },
517
+ 400: {
518
+ value: "#7b8bff",
519
+ type: "color"
520
+ },
521
+ 500: {
522
+ value: "#5a6eff",
523
+ type: "color"
524
+ },
525
+ 600: {
526
+ value: "#4858cc",
527
+ type: "color"
528
+ },
529
+ 700: {
530
+ value: "#364299",
531
+ type: "color"
532
+ },
533
+ 800: {
534
+ value: "#242c66",
535
+ type: "color"
536
+ },
537
+ 900: {
538
+ value: "#1b214c",
539
+ type: "color"
540
+ }
541
+ },
542
+ purple: {
543
+ 50: {
544
+ value: "#f8f4ff",
545
+ type: "color"
546
+ },
547
+ 100: {
548
+ value: "#f0e9ff",
549
+ type: "color"
550
+ },
551
+ 200: {
552
+ value: "#e1d3ff",
553
+ type: "color"
554
+ },
555
+ 300: {
556
+ value: "#d2bdff",
557
+ type: "color"
558
+ },
559
+ 400: {
560
+ value: "#c3a7ff",
561
+ type: "color"
562
+ },
563
+ 500: {
564
+ value: "#b491ff",
565
+ type: "color"
566
+ },
567
+ 600: {
568
+ value: "#9074cc",
569
+ type: "color"
570
+ },
571
+ 700: {
572
+ value: "#6c5799",
573
+ type: "color"
574
+ },
575
+ 800: {
576
+ value: "#483a66",
577
+ type: "color"
578
+ },
579
+ 900: {
580
+ value: "#241d33",
581
+ type: "color"
582
+ }
583
+ },
584
+ orange: {
585
+ 50: {
586
+ value: "#fff2ef",
587
+ type: "color"
588
+ },
589
+ 100: {
590
+ value: "#ffe4de",
591
+ type: "color"
592
+ },
593
+ 200: {
594
+ value: "#ffc9bd",
595
+ type: "color"
596
+ },
597
+ 300: {
598
+ value: "#ffae9c",
599
+ type: "color"
600
+ },
601
+ 400: {
602
+ value: "#ff937b",
603
+ type: "color"
604
+ },
605
+ 500: {
606
+ value: "#ff785a",
607
+ type: "color"
608
+ },
609
+ 600: {
610
+ value: "#cc6048",
611
+ type: "color"
612
+ },
613
+ 700: {
614
+ value: "#994836",
615
+ type: "color"
616
+ },
617
+ 800: {
618
+ value: "#663024",
619
+ type: "color"
620
+ },
621
+ 900: {
622
+ value: "#331812",
623
+ type: "color"
624
+ }
625
+ },
626
+ pink: {
627
+ 50: {
628
+ value: "#fff5f5",
629
+ type: "color"
630
+ },
631
+ 100: {
632
+ value: "#ffe0e0",
633
+ type: "color"
634
+ },
635
+ 200: {
636
+ value: "#ffcbcb",
637
+ type: "color"
638
+ },
639
+ 300: {
640
+ value: "#ffc0c0",
641
+ type: "color"
642
+ },
643
+ 400: {
644
+ value: "#ffabab",
645
+ type: "color"
646
+ },
647
+ 500: {
648
+ value: "#ff9696",
649
+ type: "color"
650
+ },
651
+ 600: {
652
+ value: "#cc7878",
653
+ type: "color"
654
+ },
655
+ 700: {
656
+ value: "#995a5a",
657
+ type: "color"
658
+ },
659
+ 800: {
660
+ value: "#663c3c",
661
+ type: "color"
662
+ },
663
+ 900: {
664
+ value: "#331e1e",
665
+ type: "color"
666
+ }
667
+ },
668
+ yellow: {
669
+ 50: {
670
+ value: "#fffbf4",
671
+ type: "color"
672
+ },
673
+ 100: {
674
+ value: "#fff3de",
675
+ type: "color"
676
+ },
677
+ 200: {
678
+ value: "#ffebc8",
679
+ type: "color"
680
+ },
681
+ 300: {
682
+ value: "#ffe7bd",
683
+ type: "color"
684
+ },
685
+ 400: {
686
+ value: "#ffdfa7",
687
+ type: "color"
688
+ },
689
+ 500: {
690
+ value: "#ffd791",
691
+ type: "color"
692
+ },
693
+ 600: {
694
+ value: "#ccac74",
695
+ type: "color"
696
+ },
697
+ 700: {
698
+ value: "#998157",
699
+ type: "color"
700
+ },
701
+ 800: {
702
+ value: "#806c49",
703
+ type: "color"
704
+ },
705
+ 900: {
706
+ value: "#4c402b",
707
+ type: "color"
708
+ }
709
+ },
710
+ semantic: {
711
+ error: {
712
+ 50: {
713
+ value: "#fef3f3",
714
+ type: "color"
715
+ },
716
+ 100: {
717
+ value: "#f8baba",
718
+ type: "color"
719
+ },
720
+ 200: {
721
+ value: "#f04242",
722
+ type: "color"
723
+ },
724
+ 300: {
725
+ value: "#aa2f2f",
726
+ type: "color"
727
+ }
728
+ },
729
+ warning: {
730
+ 50: {
731
+ value: "#fff8f3",
732
+ type: "color"
733
+ },
734
+ 100: {
735
+ value: "#ffdabd",
736
+ type: "color"
737
+ },
738
+ 200: {
739
+ value: "#ffae4f",
740
+ type: "color"
741
+ },
742
+ 300: {
743
+ value: "#b47b38",
744
+ type: "color"
745
+ }
746
+ },
747
+ success: {
748
+ 50: {
749
+ value: "#f2f8f6",
750
+ type: "color"
751
+ },
752
+ 100: {
753
+ value: "#b5d8ce",
754
+ type: "color"
755
+ },
756
+ 200: {
757
+ value: "#0fa88c",
758
+ type: "color"
759
+ },
760
+ 300: {
761
+ value: "#0b7763",
762
+ type: "color"
763
+ }
764
+ },
765
+ info: {
766
+ 50: {
767
+ value: "#f3f7ff",
768
+ type: "color"
769
+ },
770
+ 100: {
771
+ value: "#b4c8e1",
772
+ type: "color"
773
+ },
774
+ 200: {
775
+ value: "#4e9fff",
776
+ type: "color"
777
+ },
778
+ 300: {
779
+ value: "#3770b4",
780
+ type: "color"
781
+ }
782
+ }
783
+ },
784
+ background: {
785
+ "white-smoke": {
786
+ value: "#f7f6f3",
787
+ type: "color"
788
+ },
789
+ seashell: {
790
+ value: "#f8ece7",
791
+ type: "color"
792
+ },
793
+ "pale-purple": {
794
+ value: "#f2e6ff",
795
+ type: "color"
796
+ },
797
+ "alice-blue": {
798
+ value: "#ecf2fc",
799
+ type: "color"
800
+ }
801
+ },
802
+ grey: {
803
+ 100: {
804
+ value: "#e9edf0",
805
+ type: "color"
806
+ },
807
+ 200: {
808
+ value: "#d1dde6",
809
+ type: "color"
810
+ },
811
+ 300: {
812
+ value: "#9da9b2",
813
+ type: "color"
814
+ },
815
+ 400: {
816
+ value: "#6e777e",
817
+ type: "color"
818
+ },
819
+ 500: {
820
+ value: "#596167",
821
+ type: "color"
822
+ }
823
+ },
824
+ core: {
825
+ white: {
826
+ value: "#ffffff",
827
+ type: "color"
828
+ },
829
+ black: {
830
+ value: "#2c282f",
831
+ type: "color"
832
+ }
833
+ },
834
+ "font-sans": {
835
+ "sharp-grotesk": {
836
+ value: "\"Sharp Grotesk\", sans-serif",
837
+ type: "fontFamilies"
838
+ },
839
+ inter: {
840
+ value: "\"Inter\", sans-serif",
841
+ type: "fontFamilies"
842
+ }
843
+ },
844
+ font: {
845
+ light: {
846
+ value: "300",
847
+ type: "fontWeights"
848
+ },
849
+ normal: {
850
+ value: "400",
851
+ type: "fontWeights"
852
+ },
853
+ medium: {
854
+ value: "500",
855
+ type: "fontWeights"
856
+ }
857
+ },
858
+ spacing: {
859
+ 0: {
860
+ value: "0px",
861
+ type: "spacing"
862
+ },
863
+ 1: {
864
+ value: "1px",
865
+ type: "spacing"
866
+ },
867
+ 2: {
868
+ value: "2px",
869
+ type: "spacing"
870
+ },
871
+ 4: {
872
+ value: "4px",
873
+ type: "spacing"
874
+ },
875
+ 6: {
876
+ value: "6px",
877
+ type: "spacing"
878
+ },
879
+ 8: {
880
+ value: "8px",
881
+ type: "spacing"
882
+ },
883
+ 10: {
884
+ value: "10px",
885
+ type: "spacing"
886
+ },
887
+ 12: {
888
+ value: "12px",
889
+ type: "spacing"
890
+ },
891
+ 14: {
892
+ value: "14px",
893
+ type: "spacing"
894
+ },
895
+ 16: {
896
+ value: "16px",
897
+ type: "spacing"
898
+ },
899
+ 20: {
900
+ value: "20px",
901
+ type: "spacing"
902
+ },
903
+ 24: {
904
+ value: "24px",
905
+ type: "spacing"
906
+ },
907
+ 28: {
908
+ value: "28px",
909
+ type: "spacing"
910
+ },
911
+ 32: {
912
+ value: "32px",
913
+ type: "spacing"
914
+ },
915
+ 36: {
916
+ value: "36px",
917
+ type: "spacing"
918
+ },
919
+ 40: {
920
+ value: "40px",
921
+ type: "spacing"
922
+ },
923
+ 44: {
924
+ value: "44px",
925
+ type: "spacing"
926
+ },
927
+ 48: {
928
+ value: "48px",
929
+ type: "spacing"
930
+ },
931
+ 56: {
932
+ value: "56px",
933
+ type: "spacing"
934
+ },
935
+ 64: {
936
+ value: "64px",
937
+ type: "spacing"
938
+ },
939
+ 80: {
940
+ value: "80px",
941
+ type: "spacing"
942
+ },
943
+ 96: {
944
+ value: "96px",
945
+ type: "spacing"
946
+ },
947
+ 112: {
948
+ value: "112px",
949
+ type: "spacing"
950
+ },
951
+ 128: {
952
+ value: "128px",
953
+ type: "spacing"
954
+ },
955
+ 144: {
956
+ value: "144px",
957
+ type: "spacing"
958
+ },
959
+ 160: {
960
+ value: "160px",
961
+ type: "spacing"
962
+ },
963
+ 176: {
964
+ value: "176px",
965
+ type: "spacing"
966
+ },
967
+ 192: {
968
+ value: "192px",
969
+ type: "spacing"
970
+ },
971
+ 208: {
972
+ value: "208px",
973
+ type: "spacing"
974
+ },
975
+ 224: {
976
+ value: "224px",
977
+ type: "spacing"
978
+ },
979
+ 240: {
980
+ value: "240px",
981
+ type: "spacing"
982
+ },
983
+ 256: {
984
+ value: "256px",
985
+ type: "spacing"
986
+ },
987
+ 288: {
988
+ value: "288px",
989
+ type: "spacing"
990
+ },
991
+ 320: {
992
+ value: "320px",
993
+ type: "spacing"
994
+ },
995
+ 384: {
996
+ value: "384px",
997
+ type: "spacing"
998
+ }
999
+ },
1000
+ border: {
1001
+ 0: {
1002
+ value: "0px",
1003
+ type: "borderWidth"
1004
+ },
1005
+ 1: {
1006
+ value: "1px",
1007
+ type: "borderWidth"
1008
+ },
1009
+ 2: {
1010
+ value: "2px",
1011
+ type: "borderWidth"
1012
+ },
1013
+ 4: {
1014
+ value: "4px",
1015
+ type: "borderWidth"
1016
+ },
1017
+ 8: {
1018
+ value: "8px",
1019
+ type: "borderWidth"
1020
+ }
1021
+ },
1022
+ rounded: {
1023
+ none: {
1024
+ value: "0px",
1025
+ type: "borderRadius"
1026
+ },
1027
+ sm: {
1028
+ value: "2px",
1029
+ type: "borderRadius"
1030
+ },
1031
+ base: {
1032
+ value: "4px",
1033
+ type: "borderRadius"
1034
+ },
1035
+ md: {
1036
+ value: "6px",
1037
+ type: "borderRadius"
1038
+ },
1039
+ lg: {
1040
+ value: "8px",
1041
+ type: "borderRadius"
1042
+ },
1043
+ xl: {
1044
+ value: "12px",
1045
+ type: "borderRadius"
1046
+ },
1047
+ "2xl": {
1048
+ value: "16px",
1049
+ type: "borderRadius"
1050
+ },
1051
+ "3xl": {
1052
+ value: "24px",
1053
+ type: "borderRadius"
1054
+ },
1055
+ full: {
1056
+ value: "9999px",
1057
+ type: "borderRadius"
1058
+ }
1059
+ },
1060
+ breakpoint: {
1061
+ xs: {
1062
+ value: "376px",
1063
+ type: "sizing"
1064
+ },
1065
+ sm: {
1066
+ value: "640px",
1067
+ type: "sizing"
1068
+ },
1069
+ md: {
1070
+ value: "768px",
1071
+ type: "sizing"
1072
+ },
1073
+ lg: {
1074
+ value: "1024px",
1075
+ type: "sizing"
1076
+ },
1077
+ xl: {
1078
+ value: "1280px",
1079
+ type: "sizing"
1080
+ },
1081
+ "2xl": {
1082
+ value: "1440px",
1083
+ type: "sizing"
1084
+ },
1085
+ "3xl": {
1086
+ value: "1536px",
1087
+ type: "sizing"
1088
+ }
1089
+ },
1090
+ shadow: {
1091
+ none: {
1092
+ value: {
1093
+ color: "#000000",
1094
+ type: "dropShadow",
1095
+ x: "0",
1096
+ y: "0",
1097
+ blur: "0",
1098
+ spread: "0"
1099
+ },
1100
+ type: "boxShadow"
1101
+ },
1102
+ sm: {
1103
+ value: {
1104
+ color: "#0000000d",
1105
+ type: "dropShadow",
1106
+ x: "0",
1107
+ y: "1",
1108
+ blur: "2",
1109
+ spread: "0"
1110
+ },
1111
+ type: "boxShadow"
1112
+ },
1113
+ base: {
1114
+ value: [{
1115
+ color: "#0000000f",
1116
+ type: "dropShadow",
1117
+ x: "0",
1118
+ y: "1",
1119
+ blur: "2",
1120
+ spread: "0"
1121
+ }, {
1122
+ color: "#0000001a",
1123
+ type: "dropShadow",
1124
+ x: "0",
1125
+ y: "1",
1126
+ blur: "3",
1127
+ spread: "0"
1128
+ }],
1129
+ type: "boxShadow"
1130
+ },
1131
+ md: {
1132
+ value: [{
1133
+ color: "#0000000f",
1134
+ type: "dropShadow",
1135
+ x: "0",
1136
+ y: "2",
1137
+ blur: "4",
1138
+ spread: "-1"
1139
+ }, {
1140
+ color: "#0000001a",
1141
+ type: "dropShadow",
1142
+ x: "0",
1143
+ y: "4",
1144
+ blur: "6",
1145
+ spread: "-1"
1146
+ }],
1147
+ type: "boxShadow"
1148
+ },
1149
+ lg: {
1150
+ value: [{
1151
+ color: "#0000000d",
1152
+ type: "dropShadow",
1153
+ x: "0",
1154
+ y: "4",
1155
+ blur: "6",
1156
+ spread: "-2"
1157
+ }, {
1158
+ color: "#0000001a",
1159
+ type: "dropShadow",
1160
+ x: "0",
1161
+ y: "10",
1162
+ blur: "15",
1163
+ spread: "-3"
1164
+ }],
1165
+ type: "boxShadow"
1166
+ },
1167
+ xl: {
1168
+ value: [{
1169
+ color: "#0000000a",
1170
+ type: "dropShadow",
1171
+ x: "0",
1172
+ y: "10",
1173
+ blur: "10",
1174
+ spread: "-5"
1175
+ }, {
1176
+ color: "#0000001a",
1177
+ type: "dropShadow",
1178
+ x: "0",
1179
+ y: "20",
1180
+ blur: "25",
1181
+ spread: "-5"
1182
+ }],
1183
+ type: "boxShadow"
1184
+ },
1185
+ "2xl": {
1186
+ value: {
1187
+ color: "#00000040",
1188
+ type: "dropShadow",
1189
+ x: "0",
1190
+ y: "25",
1191
+ blur: "50",
1192
+ spread: "-12"
1193
+ },
1194
+ type: "boxShadow"
1195
+ },
1196
+ inner: {
1197
+ value: {
1198
+ color: "#0000000f",
1199
+ type: "innerShadow",
1200
+ x: "0",
1201
+ y: "2",
1202
+ blur: "4",
1203
+ spread: "0"
1204
+ },
1205
+ type: "boxShadow"
1206
+ }
1207
+ },
1208
+ underline: {
1209
+ value: "underline",
1210
+ type: "textDecoration"
1211
+ },
1212
+ text: {
1213
+ xs: {
1214
+ value: "12px",
1215
+ type: "fontSizes"
1216
+ },
1217
+ sm: {
1218
+ value: "14px",
1219
+ type: "fontSizes"
1220
+ },
1221
+ base: {
1222
+ value: "16px",
1223
+ type: "fontSizes"
1224
+ },
1225
+ lg: {
1226
+ value: "18px",
1227
+ type: "fontSizes"
1228
+ },
1229
+ xl: {
1230
+ value: "20px",
1231
+ type: "fontSizes"
1232
+ },
1233
+ "2xl": {
1234
+ value: "24px",
1235
+ type: "fontSizes"
1236
+ },
1237
+ "3xl": {
1238
+ value: "30px",
1239
+ type: "fontSizes"
1240
+ },
1241
+ "4xl": {
1242
+ value: "36px",
1243
+ type: "fontSizes"
1244
+ },
1245
+ "5xl": {
1246
+ value: "48px",
1247
+ type: "fontSizes"
1248
+ },
1249
+ "6xl": {
1250
+ value: "60px",
1251
+ type: "fontSizes"
1252
+ },
1253
+ "7xl": {
1254
+ value: "72px",
1255
+ type: "fontSizes"
1256
+ },
1257
+ "8xl": {
1258
+ value: "96px",
1259
+ type: "fontSizes"
1260
+ },
1261
+ "9xl": {
1262
+ value: "128px",
1263
+ type: "fontSizes"
1264
+ }
1265
+ },
1266
+ leading: {
1267
+ xs: {
1268
+ value: "16px",
1269
+ type: "lineHeights"
1270
+ },
1271
+ sm: {
1272
+ value: "18px",
1273
+ type: "lineHeights"
1274
+ },
1275
+ base: {
1276
+ value: "20px",
1277
+ type: "lineHeights"
1278
+ },
1279
+ lg: {
1280
+ value: "24px",
1281
+ type: "lineHeights"
1282
+ },
1283
+ xl: {
1284
+ value: "28px",
1285
+ type: "lineHeights"
1286
+ },
1287
+ "2xl": {
1288
+ value: "32px",
1289
+ type: "lineHeights"
1290
+ },
1291
+ "3xl": {
1292
+ value: "36px",
1293
+ type: "lineHeights"
1294
+ },
1295
+ "4xl": {
1296
+ value: "40px",
1297
+ type: "lineHeights"
1298
+ },
1299
+ "5xl": {
1300
+ value: "48px",
1301
+ type: "lineHeights"
1302
+ },
1303
+ "6xl": {
1304
+ value: "60px",
1305
+ type: "lineHeights"
1306
+ },
1307
+ "7xl": {
1308
+ value: "72px",
1309
+ type: "lineHeights"
1310
+ },
1311
+ "8xl": {
1312
+ value: "96px",
1313
+ type: "lineHeights"
1314
+ },
1315
+ "9xl": {
1316
+ value: "128px",
1317
+ type: "lineHeights"
1318
+ }
1319
+ }
1320
+ },
1321
+ alias: {
1322
+ avatar: {
1323
+ initials: {
1324
+ "background-color": {
1325
+ value: "{core.black}",
1326
+ type: "color"
1327
+ },
1328
+ color: {
1329
+ value: "{core.white}",
1330
+ type: "color"
1331
+ },
1332
+ spacing: {
1333
+ value: "{spacing.32}",
1334
+ type: "spacing"
1335
+ },
1336
+ "border-radius": {
1337
+ value: "{rounded.full}",
1338
+ type: "borderRadius"
1339
+ },
1340
+ "font-family": {
1341
+ value: "{font-sans.inter}",
1342
+ type: "fontFamilies"
1343
+ },
1344
+ "font-weight": {
1345
+ value: "{font.normal}",
1346
+ type: "fontWeights"
1347
+ },
1348
+ "font-size": {
1349
+ value: "{text.sm}",
1350
+ type: "fontSizes"
1351
+ },
1352
+ "line-height": {
1353
+ value: "{leading.sm}",
1354
+ type: "lineHeights"
1355
+ }
1356
+ },
1357
+ image: {
1358
+ "border-radius": {
1359
+ value: "{rounded.full}",
1360
+ type: "borderRadius"
1361
+ },
1362
+ sm: {
1363
+ value: "{spacing.16}",
1364
+ type: "spacing"
1365
+ },
1366
+ md: {
1367
+ value: "{spacing.24}",
1368
+ type: "spacing"
1369
+ },
1370
+ lg: {
1371
+ value: "{spacing.32}",
1372
+ type: "spacing"
1373
+ },
1374
+ xl: {
1375
+ value: "{spacing.40}",
1376
+ type: "spacing"
1377
+ }
1378
+ }
1379
+ },
1380
+ "nav-link": {
1381
+ spacing: {
1382
+ value: "{spacing.32}",
1383
+ type: "spacing"
1384
+ },
1385
+ "border-radius": {
1386
+ value: "{rounded.base}",
1387
+ type: "borderRadius"
1388
+ },
1389
+ "font-family": {
1390
+ value: "{font-sans.inter}",
1391
+ type: "fontFamilies"
1392
+ },
1393
+ "font-weight": {
1394
+ value: "{font.medium}",
1395
+ type: "fontWeights"
1396
+ },
1397
+ "line-height": {
1398
+ value: "{leading.sm}",
1399
+ type: "lineHeights"
1400
+ },
1401
+ "font-size": {
1402
+ value: "{text.sm}",
1403
+ type: "fontSizes"
1404
+ },
1405
+ "background-color": {
1406
+ default: {
1407
+ value: "none",
1408
+ type: "color"
1409
+ },
1410
+ hover: {
1411
+ value: "{background.alice-blue}",
1412
+ type: "color"
1413
+ },
1414
+ pressed: {
1415
+ value: "{background.alice-blue}",
1416
+ type: "color"
1417
+ },
1418
+ focus: {
1419
+ value: "{background.alice-blue}",
1420
+ type: "color"
1421
+ },
1422
+ disabled: {
1423
+ value: "none",
1424
+ type: "color"
1425
+ }
1426
+ },
1427
+ color: {
1428
+ default: {
1429
+ value: "{grey.500}",
1430
+ type: "color"
1431
+ },
1432
+ hover: {
1433
+ value: "{blue.500}",
1434
+ type: "color"
1435
+ },
1436
+ pressed: {
1437
+ value: "{blue.500}",
1438
+ type: "color"
1439
+ },
1440
+ focus: {
1441
+ value: "{blue.500}",
1442
+ type: "color"
1443
+ },
1444
+ disabled: {
1445
+ value: "{grey.100}",
1446
+ type: "color"
1447
+ }
1448
+ },
1449
+ border: {
1450
+ default: {
1451
+ value: "none",
1452
+ type: "color"
1453
+ },
1454
+ hover: {
1455
+ value: "none",
1456
+ type: "color"
1457
+ },
1458
+ pressed: {
1459
+ value: "none",
1460
+ type: "color"
1461
+ },
1462
+ focus: {
1463
+ value: "{blue.500}",
1464
+ type: "color"
1465
+ },
1466
+ disabled: {
1467
+ value: "none",
1468
+ type: "color"
1469
+ }
1470
+ },
1471
+ "border-width": {
1472
+ default: {
1473
+ value: "none",
1474
+ type: "borderWidth"
1475
+ },
1476
+ hover: {
1477
+ value: "none",
1478
+ type: "borderWidth"
1479
+ },
1480
+ pressed: {
1481
+ value: "none",
1482
+ type: "borderWidth"
1483
+ },
1484
+ focus: {
1485
+ value: "{border.1}",
1486
+ type: "borderWidth"
1487
+ },
1488
+ disabled: {
1489
+ value: "none",
1490
+ type: "borderWidth"
1491
+ }
1492
+ },
1493
+ "box-shadow": {
1494
+ default: {
1495
+ value: "{shadow.none}",
1496
+ type: "boxShadow"
1497
+ },
1498
+ hover: {
1499
+ value: "{shadow.none}",
1500
+ type: "boxShadow"
1501
+ },
1502
+ pressed: {
1503
+ value: "{shadow.inner}",
1504
+ type: "boxShadow"
1505
+ },
1506
+ focus: {
1507
+ value: "none",
1508
+ type: "boxShadow"
1509
+ },
1510
+ disabled: {
1511
+ value: "none",
1512
+ type: "boxShadow"
1513
+ }
1514
+ }
1515
+ },
1516
+ "icon-button": {
1517
+ button: {
1518
+ sm: {
1519
+ value: "{spacing.28}",
1520
+ type: "spacing"
1521
+ },
1522
+ md: {
1523
+ value: "{spacing.32}",
1524
+ type: "spacing"
1525
+ },
1526
+ lg: {
1527
+ value: "{spacing.40}",
1528
+ type: "spacing"
1529
+ }
1530
+ },
1531
+ icon: {
1532
+ sm: {
1533
+ value: "{spacing.16}",
1534
+ type: "spacing"
1535
+ },
1536
+ md: {
1537
+ value: "{spacing.20}",
1538
+ type: "spacing"
1539
+ }
1540
+ },
1541
+ primary: {
1542
+ "background-color": {
1543
+ default: {
1544
+ value: "{blue.500}",
1545
+ type: "color"
1546
+ },
1547
+ hover: {
1548
+ value: "{blue.600}",
1549
+ type: "color"
1550
+ },
1551
+ pressed: {
1552
+ value: "{blue.600}",
1553
+ type: "color"
1554
+ },
1555
+ focus: {
1556
+ value: "{blue.500}",
1557
+ type: "color"
1558
+ },
1559
+ disabled: {
1560
+ value: "{blue.200}",
1561
+ type: "color"
1562
+ }
1563
+ },
1564
+ color: {
1565
+ default: {
1566
+ value: "{core.white}",
1567
+ type: "color"
1568
+ },
1569
+ hover: {
1570
+ value: "{core.white}",
1571
+ type: "color"
1572
+ },
1573
+ pressed: {
1574
+ value: "{core.white}",
1575
+ type: "color"
1576
+ },
1577
+ focus: {
1578
+ value: "{core.white}",
1579
+ type: "color"
1580
+ },
1581
+ disabled: {
1582
+ value: "{core.white}",
1583
+ type: "color"
1584
+ }
1585
+ },
1586
+ border: {
1587
+ default: {
1588
+ value: "none",
1589
+ type: "color"
1590
+ },
1591
+ hover: {
1592
+ value: "none",
1593
+ type: "color"
1594
+ },
1595
+ pressed: {
1596
+ value: "none",
1597
+ type: "color"
1598
+ },
1599
+ focus: {
1600
+ value: "{blue.600}",
1601
+ type: "color"
1602
+ },
1603
+ disabled: {
1604
+ value: "none",
1605
+ type: "color"
1606
+ }
1607
+ },
1608
+ "border-width": {
1609
+ default: {
1610
+ value: "none",
1611
+ type: "borderWidth"
1612
+ },
1613
+ hover: {
1614
+ value: "none",
1615
+ type: "borderWidth"
1616
+ },
1617
+ pressed: {
1618
+ value: "none",
1619
+ type: "borderWidth"
1620
+ },
1621
+ focus: {
1622
+ value: "{border.1}",
1623
+ type: "borderWidth"
1624
+ },
1625
+ disabled: {
1626
+ value: "none",
1627
+ type: "borderWidth"
1628
+ }
1629
+ }
1630
+ },
1631
+ secondary: {
1632
+ "background-color": {
1633
+ default: {
1634
+ value: "none",
1635
+ type: "color"
1636
+ },
1637
+ hover: {
1638
+ value: "{grey.100}",
1639
+ type: "color"
1640
+ },
1641
+ pressed: {
1642
+ value: "{grey.100}",
1643
+ type: "color"
1644
+ },
1645
+ focus: {
1646
+ value: "none",
1647
+ type: "color"
1648
+ },
1649
+ disabled: {
1650
+ value: "none",
1651
+ type: "color"
1652
+ }
1653
+ },
1654
+ color: {
1655
+ default: {
1656
+ value: "{grey.500}",
1657
+ type: "color"
1658
+ },
1659
+ hover: {
1660
+ value: "{grey.500}",
1661
+ type: "color"
1662
+ },
1663
+ pressed: {
1664
+ value: "{grey.500}",
1665
+ type: "color"
1666
+ },
1667
+ focus: {
1668
+ value: "{grey.500}",
1669
+ type: "color"
1670
+ },
1671
+ disabled: {
1672
+ value: "{grey.100}",
1673
+ type: "color"
1674
+ }
1675
+ },
1676
+ border: {
1677
+ default: {
1678
+ value: "{grey.200}",
1679
+ type: "color"
1680
+ },
1681
+ hover: {
1682
+ value: "{grey.200}",
1683
+ type: "color"
1684
+ },
1685
+ pressed: {
1686
+ value: "{grey.200}",
1687
+ type: "color"
1688
+ },
1689
+ focus: {
1690
+ value: "{blue.600}",
1691
+ type: "color"
1692
+ },
1693
+ disabled: {
1694
+ value: "{grey.100}",
1695
+ type: "color"
1696
+ }
1697
+ },
1698
+ "border-width": {
1699
+ value: "{border.1}",
1700
+ type: "borderWidth"
1701
+ }
1702
+ },
1703
+ notification: {
1704
+ "background-color": {
1705
+ default: {
1706
+ value: "none",
1707
+ type: "color"
1708
+ },
1709
+ hover: {
1710
+ value: "{grey.100}",
1711
+ type: "color"
1712
+ },
1713
+ pressed: {
1714
+ value: "{grey.100}",
1715
+ type: "color"
1716
+ }
1717
+ },
1718
+ color: {
1719
+ default: {
1720
+ value: "{grey.500}",
1721
+ type: "color"
1722
+ },
1723
+ hover: {
1724
+ value: "{grey.500}",
1725
+ type: "color"
1726
+ },
1727
+ pressed: {
1728
+ value: "{grey.500}",
1729
+ type: "color"
1730
+ },
1731
+ focus: {
1732
+ value: "{grey.500}",
1733
+ type: "color"
1734
+ },
1735
+ disabled: {
1736
+ value: "{grey.100}",
1737
+ type: "color"
1738
+ }
1739
+ },
1740
+ border: {
1741
+ default: {
1742
+ value: "{grey.200}",
1743
+ type: "color"
1744
+ },
1745
+ hover: {
1746
+ value: "{grey.200}",
1747
+ type: "color"
1748
+ },
1749
+ pressed: {
1750
+ value: "{grey.200}",
1751
+ type: "color"
1752
+ },
1753
+ focus: {
1754
+ value: "{grey.200}",
1755
+ type: "color"
1756
+ },
1757
+ disabled: {
1758
+ value: "{grey.100}",
1759
+ type: "color"
1760
+ }
1761
+ },
1762
+ "border-width": {
1763
+ value: "{border.1}",
1764
+ type: "borderWidth"
1765
+ }
1766
+ },
1767
+ "notification-badge": {
1768
+ "background-color": {
1769
+ default: {
1770
+ value: "{blue.500}",
1771
+ type: "color"
1772
+ },
1773
+ hover: {
1774
+ value: "{blue.500}",
1775
+ type: "color"
1776
+ },
1777
+ pressed: {
1778
+ value: "{blue.500}",
1779
+ type: "color"
1780
+ },
1781
+ focus: {
1782
+ value: "{blue.500}",
1783
+ type: "color"
1784
+ },
1785
+ disabled: {
1786
+ value: "{grey.200}",
1787
+ type: "color"
1788
+ }
1789
+ },
1790
+ border: {
1791
+ default: {
1792
+ value: "{core.white}",
1793
+ type: "color"
1794
+ },
1795
+ hover: {
1796
+ value: "{core.white}",
1797
+ type: "color"
1798
+ },
1799
+ pressed: {
1800
+ value: "{core.white}",
1801
+ type: "color"
1802
+ },
1803
+ focus: {
1804
+ value: "{core.white}",
1805
+ type: "color"
1806
+ },
1807
+ disabled: {
1808
+ value: "{core.white}",
1809
+ type: "color"
1810
+ }
1811
+ },
1812
+ sm: {
1813
+ value: "{spacing.6}",
1814
+ type: "spacing"
1815
+ },
1816
+ md: {
1817
+ value: "{spacing.8}",
1818
+ type: "spacing"
1819
+ },
1820
+ lg: {
1821
+ value: "{spacing.10}",
1822
+ type: "spacing"
1823
+ },
1824
+ "border-width": {
1825
+ value: "{border.1}",
1826
+ type: "borderWidth"
1827
+ }
1828
+ },
1829
+ invisible: {
1830
+ "background-color": {
1831
+ default: {
1832
+ value: "none",
1833
+ type: "color"
1834
+ },
1835
+ hover: {
1836
+ value: "{grey.100}",
1837
+ type: "color"
1838
+ },
1839
+ pressed: {
1840
+ value: "{grey.100}",
1841
+ type: "color"
1842
+ },
1843
+ focus: {
1844
+ value: "none",
1845
+ type: "color"
1846
+ },
1847
+ disabled: {
1848
+ value: "none",
1849
+ type: "color"
1850
+ }
1851
+ },
1852
+ color: {
1853
+ default: {
1854
+ value: "{grey.500}",
1855
+ type: "color"
1856
+ },
1857
+ hover: {
1858
+ value: "{grey.500}",
1859
+ type: "color"
1860
+ },
1861
+ pressed: {
1862
+ value: "{grey.500}",
1863
+ type: "color"
1864
+ },
1865
+ focus: {
1866
+ value: "{grey.500}",
1867
+ type: "color"
1868
+ },
1869
+ disabled: {
1870
+ value: "{grey.100}",
1871
+ type: "color"
1872
+ }
1873
+ },
1874
+ border: {
1875
+ default: {
1876
+ value: "none",
1877
+ type: "color"
1878
+ },
1879
+ hover: {
1880
+ value: "none",
1881
+ type: "color"
1882
+ },
1883
+ pressed: {
1884
+ value: "none",
1885
+ type: "color"
1886
+ },
1887
+ focus: {
1888
+ value: "{blue.600}",
1889
+ type: "color"
1890
+ },
1891
+ disabled: {
1892
+ value: "{grey.100}",
1893
+ type: "color"
1894
+ }
1895
+ },
1896
+ "border-width": {
1897
+ default: {
1898
+ value: "none",
1899
+ type: "borderWidth"
1900
+ },
1901
+ hover: {
1902
+ value: "none",
1903
+ type: "borderWidth"
1904
+ },
1905
+ pressed: {
1906
+ value: "none",
1907
+ type: "borderWidth"
1908
+ },
1909
+ focus: {
1910
+ value: "{border.1}",
1911
+ type: "borderWidth"
1912
+ },
1913
+ disabled: {
1914
+ value: "{border.1}",
1915
+ type: "borderWidth"
1916
+ }
1917
+ }
1918
+ },
1919
+ "border-radius": {
1920
+ value: "{rounded.base}",
1921
+ type: "borderRadius"
1922
+ },
1923
+ "box-shadow": {
1924
+ default: {
1925
+ value: "{shadow.none}",
1926
+ type: "boxShadow"
1927
+ },
1928
+ hover: {
1929
+ value: "{shadow.none}",
1930
+ type: "boxShadow"
1931
+ },
1932
+ pressed: {
1933
+ value: "{shadow.inner}",
1934
+ type: "boxShadow"
1935
+ },
1936
+ focus: {
1937
+ value: "none",
1938
+ type: "boxShadow"
1939
+ },
1940
+ disabled: {
1941
+ value: "none",
1942
+ type: "boxShadow"
1943
+ }
1944
+ }
1945
+ },
1946
+ breadcrumbs: {
1947
+ color: {
1948
+ "previous-page": {
1949
+ value: "{blue.500}",
1950
+ type: "color"
1951
+ },
1952
+ divider: {
1953
+ value: "{grey.300}",
1954
+ type: "color"
1955
+ },
1956
+ "current-page": {
1957
+ value: "{grey.500}",
1958
+ type: "color"
1959
+ }
1960
+ },
1961
+ "font-family": {
1962
+ value: "{font-sans.inter}",
1963
+ type: "fontFamilies"
1964
+ },
1965
+ "font-weight": {
1966
+ value: "{font.normal}",
1967
+ type: "fontWeights"
1968
+ },
1969
+ "line-height": {
1970
+ value: "{leading.sm}",
1971
+ type: "lineHeights"
1972
+ },
1973
+ "font-size": {
1974
+ value: "{text.sm}",
1975
+ type: "fontSizes"
1976
+ }
1977
+ },
1978
+ "main-content": {
1979
+ sm: {
1980
+ value: "{spacing.32}",
1981
+ type: "spacing"
1982
+ },
1983
+ base: {
1984
+ value: "{spacing.48}",
1985
+ type: "spacing"
1986
+ },
1987
+ lg: {
1988
+ value: "{spacing.64}",
1989
+ type: "spacing"
1990
+ }
1991
+ },
1992
+ "section-content": {
1993
+ none: {
1994
+ value: "{spacing.0}",
1995
+ type: "spacing"
1996
+ },
1997
+ xs: {
1998
+ value: "{spacing.8}",
1999
+ type: "spacing"
2000
+ },
2001
+ sm: {
2002
+ value: "{spacing.16}",
2003
+ type: "spacing"
2004
+ },
2005
+ base: {
2006
+ value: "{spacing.24}",
2007
+ type: "spacing"
2008
+ },
2009
+ lg: {
2010
+ value: "{spacing.32}",
2011
+ type: "spacing"
2012
+ }
2013
+ }
2014
+ },
2015
+ $themes: [],
2016
+ $metadata: { tokenSetOrder: ["global", "alias"] }
2017
+ }, Y = {
2018
+ $schema: "http://json-schema.org/draft-07/schema#",
2019
+ description: "Lista dei colori da includere nella safelist di Tailwind. Per aggiungere un nuovo colore, aggiungi il suo nome qui e rigenera il build con 'pnpm run build'.",
2020
+ safeColorNames: [
2021
+ "blue",
2022
+ "purple",
2023
+ "orange",
2024
+ "pink",
2025
+ "yellow",
2026
+ "grey",
2027
+ "core"
2028
+ ]
2029
+ }, X = {
2030
+ $schema: "http://json-schema.org/draft-07/schema#",
2031
+ description: "Lista dei colori semantici da includere nella safelist di Tailwind. Per aggiungere un nuovo colore semantico, aggiungi il suo nome qui e rigenera il build con 'pnpm run build'.",
2032
+ semanticColorNames: [
2033
+ "error",
2034
+ "warning",
2035
+ "success",
2036
+ "info"
2037
+ ]
2038
+ }, Z = Y.safeColorNames, ee = X.semanticColorNames, Q = {};
2039
+ Z.forEach((e) => {
2040
+ let t = J.global[e];
2041
+ t && Object.keys(t).forEach((n) => {
2042
+ let r = t[n]?.value;
2043
+ r && (Q[e] || (Q[e] = {}), Q[e][n] = r);
2044
+ });
1290
2045
  });
1291
- const K = H.global.semantic;
1292
- K && Se.forEach((e) => {
1293
- const t = K[e];
1294
- t && typeof t == "object" && Object.keys(t).forEach((o) => {
1295
- var n;
1296
- const l = (n = t[o]) == null ? void 0 : n.value;
1297
- if (l) {
1298
- const r = `semantic-${e}`;
1299
- w[r] || (w[r] = {}), w[r][o] = l;
1300
- }
1301
- });
2046
+ var $ = J.global.semantic;
2047
+ $ && ee.forEach((e) => {
2048
+ let t = $[e];
2049
+ t && typeof t == "object" && Object.keys(t).forEach((n) => {
2050
+ let r = t[n]?.value;
2051
+ if (r) {
2052
+ let t = `semantic-${e}`;
2053
+ Q[t] || (Q[t] = {}), Q[t][n] = r;
2054
+ }
2055
+ });
1302
2056
  });
1303
- const Re = Object.entries(H.global.breakpoint).reduce(
1304
- (e, [t, o]) => (e[t] = o.value, e),
1305
- {}
1306
- ), $e = /* @__PURE__ */ Z({
1307
- __name: "FzFloating",
1308
- props: {
1309
- isOpen: { type: Boolean, default: !1 },
1310
- position: { default: "auto" },
1311
- container: {},
1312
- contentClass: {},
1313
- openerClass: {},
1314
- overrideContentClass: { type: Boolean },
1315
- overrideOpener: {},
1316
- teleport: { type: Boolean, default: !1 },
1317
- useViewport: { type: Boolean }
1318
- },
1319
- emits: ["fzfloating:setPosition"],
1320
- setup(e, { expose: t, emit: o }) {
1321
- const l = e, n = o, r = g(null), p = g(null), y = _(), v = N(`(max-width: ${Re.xs})`);
1322
- let d = !1, h = !1, x = null, c = null;
1323
- const i = {
1324
- position: l.position,
1325
- element: {
1326
- // @ts-ignore
1327
- domRef: r
1328
- },
1329
- container: {
1330
- // @ts-ignore
1331
- domRef: j(l.container || document.body)
1332
- },
1333
- opener: {
1334
- domRef: j(null)
1335
- },
1336
- useViewport: l.useViewport,
1337
- callback(...a) {
1338
- n("fzfloating:setPosition", ...a);
1339
- }
1340
- }, s = ee(i);
1341
- y.opener && (i.opener = {
1342
- // @ts-ignore
1343
- domRef: p
1344
- });
1345
- const u = ve(s), f = () => {
1346
- d || !h || (d = !0, requestAnimationFrame(() => {
1347
- h && l.isOpen && u.setPosition(), d = !1;
1348
- }));
1349
- };
1350
- E(() => {
1351
- h = !0;
1352
- });
1353
- const k = () => {
1354
- f();
1355
- }, S = () => {
1356
- f();
1357
- }, O = () => {
1358
- window.addEventListener("scroll", k, !0), window.addEventListener("resize", S), r.value && !x && (x = new ResizeObserver(() => {
1359
- f();
1360
- }), x.observe(r.value)), p.value && !c && (c = new ResizeObserver(() => {
1361
- f();
1362
- }), c.observe(p.value));
1363
- }, R = () => {
1364
- window.removeEventListener("scroll", k, !0), window.removeEventListener("resize", S), x && (x.disconnect(), x = null), c && (c.disconnect(), c = null);
1365
- };
1366
- B(
1367
- () => l.position,
1368
- () => f()
1369
- ), B(
1370
- () => l.isOpen,
1371
- (a) => {
1372
- var I;
1373
- if (!a || !r.value || !h) {
1374
- R();
1375
- return;
1376
- }
1377
- O();
1378
- const m = (I = p.value) == null ? void 0 : I.getBoundingClientRect();
1379
- r.value.style.position = "fixed", r.value.style.top = "0px", r.value.style.left = "0px", r.value.style.transform = "none", r.value.style.width = v.value ? (m == null ? void 0 : m.width) + "px" : "auto", u.setPosition();
1380
- }
1381
- ), B(
1382
- () => l.overrideOpener,
1383
- (a) => {
1384
- a && s.opener && s.opener.value && (s.opener.value = {
1385
- domRef: a
1386
- });
1387
- }
1388
- ), $(() => {
1389
- h = !1, R();
1390
- });
1391
- const L = (a) => a.startsWith("bottom") ? "mt-4" : a.startsWith("top") ? "mb-4" : a.startsWith("left") ? "mr-4" : a.startsWith("right") ? "ml-4" : "mt-4", X = W(() => {
1392
- var m;
1393
- const a = ((m = u.actualPosition) == null ? void 0 : m.value) ?? l.position;
1394
- return L(a);
1395
- }), A = W(() => l.overrideContentClass ? l.contentClass : ["bg-core-white fixed", X.value, l.contentClass]);
1396
- return t({
1397
- setPosition: u.setPosition
1398
- }), (a, m) => (M(), V("div", null, [
1399
- C(a.$slots, "opener-start"),
1400
- D("div", {
1401
- ref_key: "opener",
1402
- ref: p,
1403
- class: "inline-flex w-full sm:w-auto"
1404
- }, [
1405
- C(a.$slots, "opener", {
1406
- isOpen: e.isOpen,
1407
- floating: P(u)
1408
- })
1409
- ], 512),
1410
- C(a.$slots, "opener-end"),
1411
- e.teleport ? U("", !0) : T((M(), V("div", {
1412
- key: 0,
1413
- ref_key: "content",
1414
- ref: r,
1415
- class: q(["fz__floating__content w-full sm:w-auto", A.value])
1416
- }, [
1417
- C(a.$slots, "default", {
1418
- isOpen: e.isOpen,
1419
- floating: P(u)
1420
- })
1421
- ], 2)), [
1422
- [G, a.$slots.default && (!a.$slots.opener || a.$slots.opener && e.isOpen)]
1423
- ]),
1424
- e.teleport ? (M(), te(oe, {
1425
- key: 1,
1426
- to: "body"
1427
- }, [
1428
- T(D("div", {
1429
- ref_key: "content",
1430
- ref: r,
1431
- class: q(["fz__floating__content", A.value])
1432
- }, [
1433
- C(a.$slots, "default", {
1434
- isOpen: e.isOpen,
1435
- floating: P(u)
1436
- })
1437
- ], 2), [
1438
- [G, a.$slots.default && (!a.$slots.opener || a.$slots.opener && e.isOpen)]
1439
- ])
1440
- ])) : U("", !0)
1441
- ]));
1442
- }
2057
+ //#endregion
2058
+ //#region ../style/src/constants.ts
2059
+ var te = Object.entries(J.global.breakpoint).reduce((e, [t, n]) => (e[t] = n.value, e), {}), ne = /* @__PURE__ */ o({
2060
+ __name: "FzFloating",
2061
+ props: {
2062
+ isOpen: {
2063
+ type: Boolean,
2064
+ default: !1
2065
+ },
2066
+ position: { default: "auto" },
2067
+ container: {},
2068
+ contentClass: {},
2069
+ openerClass: {},
2070
+ overrideContentClass: { type: Boolean },
2071
+ overrideOpener: {},
2072
+ teleport: {
2073
+ type: Boolean,
2074
+ default: !1
2075
+ },
2076
+ useViewport: { type: Boolean }
2077
+ },
2078
+ emits: ["fzfloating:setPosition"],
2079
+ setup(o, { expose: s, emit: d }) {
2080
+ let p = o, C = d, w = m(null), T = m(null), E = y(), D = H(`(max-width: ${te.xs})`), O = !1, k = !1, A = null, j = null, M = {
2081
+ position: p.position,
2082
+ element: { domRef: w },
2083
+ container: { domRef: g(p.container || document.body) },
2084
+ opener: { domRef: g(null) },
2085
+ useViewport: p.useViewport,
2086
+ callback(...e) {
2087
+ C("fzfloating:setPosition", ...e);
2088
+ }
2089
+ }, N = _(M);
2090
+ E.opener && (M.opener = { domRef: T });
2091
+ let P = V(N), F = () => {
2092
+ O || !k || (O = !0, requestAnimationFrame(() => {
2093
+ k && p.isOpen && P.setPosition(), O = !1;
2094
+ }));
2095
+ };
2096
+ u(() => {
2097
+ k = !0;
2098
+ });
2099
+ let I = () => {
2100
+ F();
2101
+ }, L = () => {
2102
+ F();
2103
+ }, R = () => {
2104
+ window.addEventListener("scroll", I, !0), window.addEventListener("resize", L), w.value && !A && (A = new ResizeObserver(() => {
2105
+ F();
2106
+ }), A.observe(w.value)), T.value && !j && (j = new ResizeObserver(() => {
2107
+ F();
2108
+ }), j.observe(T.value));
2109
+ }, z = () => {
2110
+ window.removeEventListener("scroll", I, !0), window.removeEventListener("resize", L), A &&= (A.disconnect(), null), j &&= (j.disconnect(), null);
2111
+ };
2112
+ x(() => p.position, () => F()), x(() => p.isOpen, (e) => {
2113
+ if (!e || !w.value || !k) {
2114
+ z();
2115
+ return;
2116
+ }
2117
+ R();
2118
+ let t = T.value?.getBoundingClientRect();
2119
+ w.value.style.position = "fixed", w.value.style.top = "0px", w.value.style.left = "0px", w.value.style.transform = "none", w.value.style.width = D.value ? t?.width + "px" : "auto", P.setPosition();
2120
+ }), x(() => p.overrideOpener, (e) => {
2121
+ e && N.opener && N.opener.value && (N.opener.value = { domRef: e });
2122
+ }), l(() => {
2123
+ k = !1, z();
2124
+ });
2125
+ let B = (e) => e.startsWith("bottom") ? "mt-4" : e.startsWith("top") ? "mb-4" : e.startsWith("left") ? "mr-4" : e.startsWith("right") ? "ml-4" : "mt-4", U = t(() => B(P.actualPosition?.value ?? p.position)), W = t(() => p.overrideContentClass ? p.contentClass : [
2126
+ "bg-core-white fixed",
2127
+ U.value,
2128
+ p.contentClass
2129
+ ]);
2130
+ return s({ setPosition: P.setPosition }), (t, s) => (f(), i("div", null, [
2131
+ h(t.$slots, "opener-start"),
2132
+ a("div", {
2133
+ ref_key: "opener",
2134
+ ref: T,
2135
+ class: "inline-flex w-full sm:w-auto"
2136
+ }, [h(t.$slots, "opener", {
2137
+ isOpen: o.isOpen,
2138
+ floating: v(P)
2139
+ })], 512),
2140
+ h(t.$slots, "opener-end"),
2141
+ o.teleport ? r("", !0) : S((f(), i("div", {
2142
+ key: 0,
2143
+ ref_key: "content",
2144
+ ref: w,
2145
+ class: c(["fz__floating__content w-full sm:w-auto", W.value])
2146
+ }, [h(t.$slots, "default", {
2147
+ isOpen: o.isOpen,
2148
+ floating: v(P)
2149
+ })], 2)), [[b, t.$slots.default && (!t.$slots.opener || t.$slots.opener && o.isOpen)]]),
2150
+ o.teleport ? (f(), n(e, {
2151
+ key: 1,
2152
+ to: "body"
2153
+ }, [S(a("div", {
2154
+ ref_key: "content",
2155
+ ref: w,
2156
+ class: c(["fz__floating__content", W.value])
2157
+ }, [h(t.$slots, "default", {
2158
+ isOpen: o.isOpen,
2159
+ floating: v(P)
2160
+ })], 2), [[b, t.$slots.default && (!t.$slots.opener || t.$slots.opener && o.isOpen)]])])) : r("", !0)
2161
+ ]));
2162
+ }
1443
2163
  });
1444
- export {
1445
- $e as FzFloating,
1446
- ae as calcRealPos,
1447
- Ee as clamp,
1448
- ne as format,
1449
- b as getHighestAvailableSpacePos,
1450
- re as parse,
1451
- ze as roundTo,
1452
- le as truncateDecimals,
1453
- ke as useBreakpoints,
1454
- Oe as useClickOutside,
1455
- Ne as useCurrency,
1456
- ve as useFloating,
1457
- Le as useKeyDown,
1458
- Be as useKeyUp,
1459
- N as useMediaQuery
1460
- };
2164
+ //#endregion
2165
+ export { ne as FzFloating, A as calcRealPos, D as clamp, w as format, k as getHighestAvailableSpacePos, T as parse, E as roundTo, C as truncateDecimals, U as useBreakpoints, W as useClickOutside, q as useCurrency, V as useFloating, G as useKeyDown, K as useKeyUp, H as useMediaQuery };