@fiscozen/composables 1.0.3 → 1.1.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.
@@ -1,1460 +1,2183 @@
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
+ current() {
437
+ let n = Object.entries(e).map(([e, t]) => ({
438
+ name: e,
439
+ value: parseInt(t, 10)
440
+ })).sort((e, t) => e.value - t.value), r = n.map(({ name: e, value: t }) => ({
441
+ name: e,
442
+ matches: H(`(min-width: ${t}px)`)
443
+ }));
444
+ return t(() => {
445
+ let e = n[0].name;
446
+ for (let { name: t, matches: n } of r) n.value && (e = t);
447
+ return e;
448
+ });
449
+ }
450
+ };
371
451
  }
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
- });
452
+ //#endregion
453
+ //#region src/composables/useClickOutside.ts
454
+ function W(e, t, n) {
455
+ if (!e) throw Error("A target component has to be provided.");
456
+ if (!t) throw Error("A callback has to be provided.");
457
+ let r = (n) => {
458
+ !e.value || n.target === e.value || n.composedPath().includes(e.value) || typeof t == "function" && t();
459
+ };
460
+ n && x(n, (e, t) => {
461
+ t && t.removeEventListener("click", r), e?.addEventListener("click", r);
462
+ }), u(() => {
463
+ n || document.addEventListener("click", r);
464
+ }), l(() => {
465
+ if (n) {
466
+ n.value?.removeEventListener("click", r);
467
+ return;
468
+ }
469
+ document.removeEventListener("click", r);
470
+ });
392
471
  }
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
- });
472
+ //#endregion
473
+ //#region src/composables/useKeyDown.ts
474
+ function G(e, t) {
475
+ if (!e) throw Error("A target component has to be provided.");
476
+ if (!t || typeof t != "function") throw Error("A callback has to be provided.");
477
+ let n = (e) => {
478
+ t(e);
479
+ };
480
+ u(() => {
481
+ e.value.addEventListener("keydown", n);
482
+ }), l(() => {
483
+ e.value.removeEventListener("keydown", n);
484
+ });
406
485
  }
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
- });
486
+ //#endregion
487
+ //#region src/composables/useKeyUp.ts
488
+ function K(e, t) {
489
+ if (!e || typeof e != "function") throw Error("A callback has to be provided.");
490
+ let n = (t) => {
491
+ e(t);
492
+ };
493
+ u(() => {
494
+ if (!t) {
495
+ document.addEventListener("keyup", n);
496
+ return;
497
+ }
498
+ t.value.addEventListener("keyup", n);
499
+ }), l(() => {
500
+ if (!t) {
501
+ document.removeEventListener("keyup", n);
502
+ return;
503
+ }
504
+ t.value.removeEventListener("keyup", n);
505
+ });
426
506
  }
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
- });
507
+ //#endregion
508
+ //#region src/composables/useCurrency.ts
509
+ var q = (e) => ({
510
+ format: w,
511
+ parse: T
512
+ }), J = {
513
+ global: {
514
+ blue: {
515
+ 50: {
516
+ value: "#eff1ff",
517
+ type: "color"
518
+ },
519
+ 100: {
520
+ value: "#dee2ff",
521
+ type: "color"
522
+ },
523
+ 200: {
524
+ value: "#bdc5ff",
525
+ type: "color"
526
+ },
527
+ 300: {
528
+ value: "#9ca8ff",
529
+ type: "color"
530
+ },
531
+ 400: {
532
+ value: "#7b8bff",
533
+ type: "color"
534
+ },
535
+ 500: {
536
+ value: "#5a6eff",
537
+ type: "color"
538
+ },
539
+ 600: {
540
+ value: "#4858cc",
541
+ type: "color"
542
+ },
543
+ 700: {
544
+ value: "#364299",
545
+ type: "color"
546
+ },
547
+ 800: {
548
+ value: "#242c66",
549
+ type: "color"
550
+ },
551
+ 900: {
552
+ value: "#1b214c",
553
+ type: "color"
554
+ }
555
+ },
556
+ purple: {
557
+ 50: {
558
+ value: "#f8f4ff",
559
+ type: "color"
560
+ },
561
+ 100: {
562
+ value: "#f0e9ff",
563
+ type: "color"
564
+ },
565
+ 200: {
566
+ value: "#e1d3ff",
567
+ type: "color"
568
+ },
569
+ 300: {
570
+ value: "#d2bdff",
571
+ type: "color"
572
+ },
573
+ 400: {
574
+ value: "#c3a7ff",
575
+ type: "color"
576
+ },
577
+ 500: {
578
+ value: "#b491ff",
579
+ type: "color"
580
+ },
581
+ 600: {
582
+ value: "#9074cc",
583
+ type: "color"
584
+ },
585
+ 700: {
586
+ value: "#6c5799",
587
+ type: "color"
588
+ },
589
+ 800: {
590
+ value: "#483a66",
591
+ type: "color"
592
+ },
593
+ 900: {
594
+ value: "#241d33",
595
+ type: "color"
596
+ }
597
+ },
598
+ orange: {
599
+ 50: {
600
+ value: "#fff2ef",
601
+ type: "color"
602
+ },
603
+ 100: {
604
+ value: "#ffe4de",
605
+ type: "color"
606
+ },
607
+ 200: {
608
+ value: "#ffc9bd",
609
+ type: "color"
610
+ },
611
+ 300: {
612
+ value: "#ffae9c",
613
+ type: "color"
614
+ },
615
+ 400: {
616
+ value: "#ff937b",
617
+ type: "color"
618
+ },
619
+ 500: {
620
+ value: "#ff785a",
621
+ type: "color"
622
+ },
623
+ 600: {
624
+ value: "#cc6048",
625
+ type: "color"
626
+ },
627
+ 700: {
628
+ value: "#994836",
629
+ type: "color"
630
+ },
631
+ 800: {
632
+ value: "#663024",
633
+ type: "color"
634
+ },
635
+ 900: {
636
+ value: "#331812",
637
+ type: "color"
638
+ }
639
+ },
640
+ pink: {
641
+ 50: {
642
+ value: "#fff5f5",
643
+ type: "color"
644
+ },
645
+ 100: {
646
+ value: "#ffe0e0",
647
+ type: "color"
648
+ },
649
+ 200: {
650
+ value: "#ffcbcb",
651
+ type: "color"
652
+ },
653
+ 300: {
654
+ value: "#ffc0c0",
655
+ type: "color"
656
+ },
657
+ 400: {
658
+ value: "#ffabab",
659
+ type: "color"
660
+ },
661
+ 500: {
662
+ value: "#ff9696",
663
+ type: "color"
664
+ },
665
+ 600: {
666
+ value: "#cc7878",
667
+ type: "color"
668
+ },
669
+ 700: {
670
+ value: "#995a5a",
671
+ type: "color"
672
+ },
673
+ 800: {
674
+ value: "#663c3c",
675
+ type: "color"
676
+ },
677
+ 900: {
678
+ value: "#331e1e",
679
+ type: "color"
680
+ }
681
+ },
682
+ yellow: {
683
+ 50: {
684
+ value: "#fffbf4",
685
+ type: "color"
686
+ },
687
+ 100: {
688
+ value: "#fff3de",
689
+ type: "color"
690
+ },
691
+ 200: {
692
+ value: "#ffebc8",
693
+ type: "color"
694
+ },
695
+ 300: {
696
+ value: "#ffe7bd",
697
+ type: "color"
698
+ },
699
+ 400: {
700
+ value: "#ffdfa7",
701
+ type: "color"
702
+ },
703
+ 500: {
704
+ value: "#ffd791",
705
+ type: "color"
706
+ },
707
+ 600: {
708
+ value: "#ccac74",
709
+ type: "color"
710
+ },
711
+ 700: {
712
+ value: "#998157",
713
+ type: "color"
714
+ },
715
+ 800: {
716
+ value: "#806c49",
717
+ type: "color"
718
+ },
719
+ 900: {
720
+ value: "#4c402b",
721
+ type: "color"
722
+ }
723
+ },
724
+ semantic: {
725
+ error: {
726
+ 50: {
727
+ value: "#fef3f3",
728
+ type: "color"
729
+ },
730
+ 100: {
731
+ value: "#f8baba",
732
+ type: "color"
733
+ },
734
+ 200: {
735
+ value: "#f04242",
736
+ type: "color"
737
+ },
738
+ 300: {
739
+ value: "#aa2f2f",
740
+ type: "color"
741
+ }
742
+ },
743
+ warning: {
744
+ 50: {
745
+ value: "#fff8f3",
746
+ type: "color"
747
+ },
748
+ 100: {
749
+ value: "#ffdabd",
750
+ type: "color"
751
+ },
752
+ 200: {
753
+ value: "#ffae4f",
754
+ type: "color"
755
+ },
756
+ 300: {
757
+ value: "#b47b38",
758
+ type: "color"
759
+ }
760
+ },
761
+ success: {
762
+ 50: {
763
+ value: "#f2f8f6",
764
+ type: "color"
765
+ },
766
+ 100: {
767
+ value: "#b5d8ce",
768
+ type: "color"
769
+ },
770
+ 200: {
771
+ value: "#0fa88c",
772
+ type: "color"
773
+ },
774
+ 300: {
775
+ value: "#0b7763",
776
+ type: "color"
777
+ }
778
+ },
779
+ info: {
780
+ 50: {
781
+ value: "#f3f7ff",
782
+ type: "color"
783
+ },
784
+ 100: {
785
+ value: "#b4c8e1",
786
+ type: "color"
787
+ },
788
+ 200: {
789
+ value: "#4e9fff",
790
+ type: "color"
791
+ },
792
+ 300: {
793
+ value: "#3770b4",
794
+ type: "color"
795
+ }
796
+ }
797
+ },
798
+ background: {
799
+ "white-smoke": {
800
+ value: "#f7f6f3",
801
+ type: "color"
802
+ },
803
+ seashell: {
804
+ value: "#f8ece7",
805
+ type: "color"
806
+ },
807
+ "pale-purple": {
808
+ value: "#f2e6ff",
809
+ type: "color"
810
+ },
811
+ "alice-blue": {
812
+ value: "#ecf2fc",
813
+ type: "color"
814
+ }
815
+ },
816
+ grey: {
817
+ 100: {
818
+ value: "#e9edf0",
819
+ type: "color"
820
+ },
821
+ 200: {
822
+ value: "#d1dde6",
823
+ type: "color"
824
+ },
825
+ 300: {
826
+ value: "#9da9b2",
827
+ type: "color"
828
+ },
829
+ 400: {
830
+ value: "#6e777e",
831
+ type: "color"
832
+ },
833
+ 500: {
834
+ value: "#596167",
835
+ type: "color"
836
+ }
837
+ },
838
+ core: {
839
+ white: {
840
+ value: "#ffffff",
841
+ type: "color"
842
+ },
843
+ black: {
844
+ value: "#2c282f",
845
+ type: "color"
846
+ }
847
+ },
848
+ "font-sans": {
849
+ "sharp-grotesk": {
850
+ value: "\"Sharp Grotesk\", sans-serif",
851
+ type: "fontFamilies"
852
+ },
853
+ inter: {
854
+ value: "\"Inter\", sans-serif",
855
+ type: "fontFamilies"
856
+ }
857
+ },
858
+ font: {
859
+ light: {
860
+ value: "300",
861
+ type: "fontWeights"
862
+ },
863
+ normal: {
864
+ value: "400",
865
+ type: "fontWeights"
866
+ },
867
+ medium: {
868
+ value: "500",
869
+ type: "fontWeights"
870
+ }
871
+ },
872
+ spacing: {
873
+ 0: {
874
+ value: "0px",
875
+ type: "spacing"
876
+ },
877
+ 1: {
878
+ value: "1px",
879
+ type: "spacing"
880
+ },
881
+ 2: {
882
+ value: "2px",
883
+ type: "spacing"
884
+ },
885
+ 4: {
886
+ value: "4px",
887
+ type: "spacing"
888
+ },
889
+ 6: {
890
+ value: "6px",
891
+ type: "spacing"
892
+ },
893
+ 8: {
894
+ value: "8px",
895
+ type: "spacing"
896
+ },
897
+ 10: {
898
+ value: "10px",
899
+ type: "spacing"
900
+ },
901
+ 12: {
902
+ value: "12px",
903
+ type: "spacing"
904
+ },
905
+ 14: {
906
+ value: "14px",
907
+ type: "spacing"
908
+ },
909
+ 16: {
910
+ value: "16px",
911
+ type: "spacing"
912
+ },
913
+ 20: {
914
+ value: "20px",
915
+ type: "spacing"
916
+ },
917
+ 24: {
918
+ value: "24px",
919
+ type: "spacing"
920
+ },
921
+ 28: {
922
+ value: "28px",
923
+ type: "spacing"
924
+ },
925
+ 32: {
926
+ value: "32px",
927
+ type: "spacing"
928
+ },
929
+ 36: {
930
+ value: "36px",
931
+ type: "spacing"
932
+ },
933
+ 40: {
934
+ value: "40px",
935
+ type: "spacing"
936
+ },
937
+ 44: {
938
+ value: "44px",
939
+ type: "spacing"
940
+ },
941
+ 48: {
942
+ value: "48px",
943
+ type: "spacing"
944
+ },
945
+ 56: {
946
+ value: "56px",
947
+ type: "spacing"
948
+ },
949
+ 64: {
950
+ value: "64px",
951
+ type: "spacing"
952
+ },
953
+ 80: {
954
+ value: "80px",
955
+ type: "spacing"
956
+ },
957
+ 96: {
958
+ value: "96px",
959
+ type: "spacing"
960
+ },
961
+ 112: {
962
+ value: "112px",
963
+ type: "spacing"
964
+ },
965
+ 128: {
966
+ value: "128px",
967
+ type: "spacing"
968
+ },
969
+ 144: {
970
+ value: "144px",
971
+ type: "spacing"
972
+ },
973
+ 160: {
974
+ value: "160px",
975
+ type: "spacing"
976
+ },
977
+ 176: {
978
+ value: "176px",
979
+ type: "spacing"
980
+ },
981
+ 192: {
982
+ value: "192px",
983
+ type: "spacing"
984
+ },
985
+ 208: {
986
+ value: "208px",
987
+ type: "spacing"
988
+ },
989
+ 224: {
990
+ value: "224px",
991
+ type: "spacing"
992
+ },
993
+ 240: {
994
+ value: "240px",
995
+ type: "spacing"
996
+ },
997
+ 256: {
998
+ value: "256px",
999
+ type: "spacing"
1000
+ },
1001
+ 288: {
1002
+ value: "288px",
1003
+ type: "spacing"
1004
+ },
1005
+ 320: {
1006
+ value: "320px",
1007
+ type: "spacing"
1008
+ },
1009
+ 384: {
1010
+ value: "384px",
1011
+ type: "spacing"
1012
+ }
1013
+ },
1014
+ border: {
1015
+ 0: {
1016
+ value: "0px",
1017
+ type: "borderWidth"
1018
+ },
1019
+ 1: {
1020
+ value: "1px",
1021
+ type: "borderWidth"
1022
+ },
1023
+ 2: {
1024
+ value: "2px",
1025
+ type: "borderWidth"
1026
+ },
1027
+ 4: {
1028
+ value: "4px",
1029
+ type: "borderWidth"
1030
+ },
1031
+ 8: {
1032
+ value: "8px",
1033
+ type: "borderWidth"
1034
+ }
1035
+ },
1036
+ rounded: {
1037
+ none: {
1038
+ value: "0px",
1039
+ type: "borderRadius"
1040
+ },
1041
+ sm: {
1042
+ value: "2px",
1043
+ type: "borderRadius"
1044
+ },
1045
+ base: {
1046
+ value: "4px",
1047
+ type: "borderRadius"
1048
+ },
1049
+ md: {
1050
+ value: "6px",
1051
+ type: "borderRadius"
1052
+ },
1053
+ lg: {
1054
+ value: "8px",
1055
+ type: "borderRadius"
1056
+ },
1057
+ xl: {
1058
+ value: "12px",
1059
+ type: "borderRadius"
1060
+ },
1061
+ "2xl": {
1062
+ value: "16px",
1063
+ type: "borderRadius"
1064
+ },
1065
+ "3xl": {
1066
+ value: "24px",
1067
+ type: "borderRadius"
1068
+ },
1069
+ full: {
1070
+ value: "9999px",
1071
+ type: "borderRadius"
1072
+ }
1073
+ },
1074
+ breakpoint: {
1075
+ xs: {
1076
+ value: "376px",
1077
+ type: "sizing"
1078
+ },
1079
+ sm: {
1080
+ value: "640px",
1081
+ type: "sizing"
1082
+ },
1083
+ md: {
1084
+ value: "768px",
1085
+ type: "sizing"
1086
+ },
1087
+ lg: {
1088
+ value: "1024px",
1089
+ type: "sizing"
1090
+ },
1091
+ desktop: {
1092
+ value: "1200px",
1093
+ type: "sizing"
1094
+ },
1095
+ xl: {
1096
+ value: "1280px",
1097
+ type: "sizing"
1098
+ },
1099
+ "2xl": {
1100
+ value: "1440px",
1101
+ type: "sizing"
1102
+ },
1103
+ "3xl": {
1104
+ value: "1536px",
1105
+ type: "sizing"
1106
+ }
1107
+ },
1108
+ shadow: {
1109
+ none: {
1110
+ value: {
1111
+ color: "#000000",
1112
+ type: "dropShadow",
1113
+ x: "0",
1114
+ y: "0",
1115
+ blur: "0",
1116
+ spread: "0"
1117
+ },
1118
+ type: "boxShadow"
1119
+ },
1120
+ sm: {
1121
+ value: {
1122
+ color: "#0000000d",
1123
+ type: "dropShadow",
1124
+ x: "0",
1125
+ y: "1",
1126
+ blur: "2",
1127
+ spread: "0"
1128
+ },
1129
+ type: "boxShadow"
1130
+ },
1131
+ base: {
1132
+ value: [{
1133
+ color: "#0000000f",
1134
+ type: "dropShadow",
1135
+ x: "0",
1136
+ y: "1",
1137
+ blur: "2",
1138
+ spread: "0"
1139
+ }, {
1140
+ color: "#0000001a",
1141
+ type: "dropShadow",
1142
+ x: "0",
1143
+ y: "1",
1144
+ blur: "3",
1145
+ spread: "0"
1146
+ }],
1147
+ type: "boxShadow"
1148
+ },
1149
+ md: {
1150
+ value: [{
1151
+ color: "#0000000f",
1152
+ type: "dropShadow",
1153
+ x: "0",
1154
+ y: "2",
1155
+ blur: "4",
1156
+ spread: "-1"
1157
+ }, {
1158
+ color: "#0000001a",
1159
+ type: "dropShadow",
1160
+ x: "0",
1161
+ y: "4",
1162
+ blur: "6",
1163
+ spread: "-1"
1164
+ }],
1165
+ type: "boxShadow"
1166
+ },
1167
+ lg: {
1168
+ value: [{
1169
+ color: "#0000000d",
1170
+ type: "dropShadow",
1171
+ x: "0",
1172
+ y: "4",
1173
+ blur: "6",
1174
+ spread: "-2"
1175
+ }, {
1176
+ color: "#0000001a",
1177
+ type: "dropShadow",
1178
+ x: "0",
1179
+ y: "10",
1180
+ blur: "15",
1181
+ spread: "-3"
1182
+ }],
1183
+ type: "boxShadow"
1184
+ },
1185
+ xl: {
1186
+ value: [{
1187
+ color: "#0000000a",
1188
+ type: "dropShadow",
1189
+ x: "0",
1190
+ y: "10",
1191
+ blur: "10",
1192
+ spread: "-5"
1193
+ }, {
1194
+ color: "#0000001a",
1195
+ type: "dropShadow",
1196
+ x: "0",
1197
+ y: "20",
1198
+ blur: "25",
1199
+ spread: "-5"
1200
+ }],
1201
+ type: "boxShadow"
1202
+ },
1203
+ "2xl": {
1204
+ value: {
1205
+ color: "#00000040",
1206
+ type: "dropShadow",
1207
+ x: "0",
1208
+ y: "25",
1209
+ blur: "50",
1210
+ spread: "-12"
1211
+ },
1212
+ type: "boxShadow"
1213
+ },
1214
+ inner: {
1215
+ value: {
1216
+ color: "#0000000f",
1217
+ type: "innerShadow",
1218
+ x: "0",
1219
+ y: "2",
1220
+ blur: "4",
1221
+ spread: "0"
1222
+ },
1223
+ type: "boxShadow"
1224
+ }
1225
+ },
1226
+ underline: {
1227
+ value: "underline",
1228
+ type: "textDecoration"
1229
+ },
1230
+ text: {
1231
+ xs: {
1232
+ value: "12px",
1233
+ type: "fontSizes"
1234
+ },
1235
+ sm: {
1236
+ value: "14px",
1237
+ type: "fontSizes"
1238
+ },
1239
+ base: {
1240
+ value: "16px",
1241
+ type: "fontSizes"
1242
+ },
1243
+ lg: {
1244
+ value: "18px",
1245
+ type: "fontSizes"
1246
+ },
1247
+ xl: {
1248
+ value: "20px",
1249
+ type: "fontSizes"
1250
+ },
1251
+ "2xl": {
1252
+ value: "24px",
1253
+ type: "fontSizes"
1254
+ },
1255
+ "3xl": {
1256
+ value: "30px",
1257
+ type: "fontSizes"
1258
+ },
1259
+ "4xl": {
1260
+ value: "36px",
1261
+ type: "fontSizes"
1262
+ },
1263
+ "5xl": {
1264
+ value: "48px",
1265
+ type: "fontSizes"
1266
+ },
1267
+ "6xl": {
1268
+ value: "60px",
1269
+ type: "fontSizes"
1270
+ },
1271
+ "7xl": {
1272
+ value: "72px",
1273
+ type: "fontSizes"
1274
+ },
1275
+ "8xl": {
1276
+ value: "96px",
1277
+ type: "fontSizes"
1278
+ },
1279
+ "9xl": {
1280
+ value: "128px",
1281
+ type: "fontSizes"
1282
+ }
1283
+ },
1284
+ leading: {
1285
+ xs: {
1286
+ value: "16px",
1287
+ type: "lineHeights"
1288
+ },
1289
+ sm: {
1290
+ value: "18px",
1291
+ type: "lineHeights"
1292
+ },
1293
+ base: {
1294
+ value: "20px",
1295
+ type: "lineHeights"
1296
+ },
1297
+ lg: {
1298
+ value: "24px",
1299
+ type: "lineHeights"
1300
+ },
1301
+ xl: {
1302
+ value: "28px",
1303
+ type: "lineHeights"
1304
+ },
1305
+ "2xl": {
1306
+ value: "32px",
1307
+ type: "lineHeights"
1308
+ },
1309
+ "3xl": {
1310
+ value: "36px",
1311
+ type: "lineHeights"
1312
+ },
1313
+ "4xl": {
1314
+ value: "40px",
1315
+ type: "lineHeights"
1316
+ },
1317
+ "5xl": {
1318
+ value: "48px",
1319
+ type: "lineHeights"
1320
+ },
1321
+ "6xl": {
1322
+ value: "60px",
1323
+ type: "lineHeights"
1324
+ },
1325
+ "7xl": {
1326
+ value: "72px",
1327
+ type: "lineHeights"
1328
+ },
1329
+ "8xl": {
1330
+ value: "96px",
1331
+ type: "lineHeights"
1332
+ },
1333
+ "9xl": {
1334
+ value: "128px",
1335
+ type: "lineHeights"
1336
+ }
1337
+ }
1338
+ },
1339
+ alias: {
1340
+ avatar: {
1341
+ initials: {
1342
+ "background-color": {
1343
+ value: "{core.black}",
1344
+ type: "color"
1345
+ },
1346
+ color: {
1347
+ value: "{core.white}",
1348
+ type: "color"
1349
+ },
1350
+ spacing: {
1351
+ value: "{spacing.32}",
1352
+ type: "spacing"
1353
+ },
1354
+ "border-radius": {
1355
+ value: "{rounded.full}",
1356
+ type: "borderRadius"
1357
+ },
1358
+ "font-family": {
1359
+ value: "{font-sans.inter}",
1360
+ type: "fontFamilies"
1361
+ },
1362
+ "font-weight": {
1363
+ value: "{font.normal}",
1364
+ type: "fontWeights"
1365
+ },
1366
+ "font-size": {
1367
+ value: "{text.sm}",
1368
+ type: "fontSizes"
1369
+ },
1370
+ "line-height": {
1371
+ value: "{leading.sm}",
1372
+ type: "lineHeights"
1373
+ }
1374
+ },
1375
+ image: {
1376
+ "border-radius": {
1377
+ value: "{rounded.full}",
1378
+ type: "borderRadius"
1379
+ },
1380
+ sm: {
1381
+ value: "{spacing.16}",
1382
+ type: "spacing"
1383
+ },
1384
+ md: {
1385
+ value: "{spacing.24}",
1386
+ type: "spacing"
1387
+ },
1388
+ lg: {
1389
+ value: "{spacing.32}",
1390
+ type: "spacing"
1391
+ },
1392
+ xl: {
1393
+ value: "{spacing.40}",
1394
+ type: "spacing"
1395
+ }
1396
+ }
1397
+ },
1398
+ "nav-link": {
1399
+ spacing: {
1400
+ value: "{spacing.32}",
1401
+ type: "spacing"
1402
+ },
1403
+ "border-radius": {
1404
+ value: "{rounded.base}",
1405
+ type: "borderRadius"
1406
+ },
1407
+ "font-family": {
1408
+ value: "{font-sans.inter}",
1409
+ type: "fontFamilies"
1410
+ },
1411
+ "font-weight": {
1412
+ value: "{font.medium}",
1413
+ type: "fontWeights"
1414
+ },
1415
+ "line-height": {
1416
+ value: "{leading.sm}",
1417
+ type: "lineHeights"
1418
+ },
1419
+ "font-size": {
1420
+ value: "{text.sm}",
1421
+ type: "fontSizes"
1422
+ },
1423
+ "background-color": {
1424
+ default: {
1425
+ value: "none",
1426
+ type: "color"
1427
+ },
1428
+ hover: {
1429
+ value: "{background.alice-blue}",
1430
+ type: "color"
1431
+ },
1432
+ pressed: {
1433
+ value: "{background.alice-blue}",
1434
+ type: "color"
1435
+ },
1436
+ focus: {
1437
+ value: "{background.alice-blue}",
1438
+ type: "color"
1439
+ },
1440
+ disabled: {
1441
+ value: "none",
1442
+ type: "color"
1443
+ }
1444
+ },
1445
+ color: {
1446
+ default: {
1447
+ value: "{grey.500}",
1448
+ type: "color"
1449
+ },
1450
+ hover: {
1451
+ value: "{blue.500}",
1452
+ type: "color"
1453
+ },
1454
+ pressed: {
1455
+ value: "{blue.500}",
1456
+ type: "color"
1457
+ },
1458
+ focus: {
1459
+ value: "{blue.500}",
1460
+ type: "color"
1461
+ },
1462
+ disabled: {
1463
+ value: "{grey.100}",
1464
+ type: "color"
1465
+ }
1466
+ },
1467
+ border: {
1468
+ default: {
1469
+ value: "none",
1470
+ type: "color"
1471
+ },
1472
+ hover: {
1473
+ value: "none",
1474
+ type: "color"
1475
+ },
1476
+ pressed: {
1477
+ value: "none",
1478
+ type: "color"
1479
+ },
1480
+ focus: {
1481
+ value: "{blue.500}",
1482
+ type: "color"
1483
+ },
1484
+ disabled: {
1485
+ value: "none",
1486
+ type: "color"
1487
+ }
1488
+ },
1489
+ "border-width": {
1490
+ default: {
1491
+ value: "none",
1492
+ type: "borderWidth"
1493
+ },
1494
+ hover: {
1495
+ value: "none",
1496
+ type: "borderWidth"
1497
+ },
1498
+ pressed: {
1499
+ value: "none",
1500
+ type: "borderWidth"
1501
+ },
1502
+ focus: {
1503
+ value: "{border.1}",
1504
+ type: "borderWidth"
1505
+ },
1506
+ disabled: {
1507
+ value: "none",
1508
+ type: "borderWidth"
1509
+ }
1510
+ },
1511
+ "box-shadow": {
1512
+ default: {
1513
+ value: "{shadow.none}",
1514
+ type: "boxShadow"
1515
+ },
1516
+ hover: {
1517
+ value: "{shadow.none}",
1518
+ type: "boxShadow"
1519
+ },
1520
+ pressed: {
1521
+ value: "{shadow.inner}",
1522
+ type: "boxShadow"
1523
+ },
1524
+ focus: {
1525
+ value: "none",
1526
+ type: "boxShadow"
1527
+ },
1528
+ disabled: {
1529
+ value: "none",
1530
+ type: "boxShadow"
1531
+ }
1532
+ }
1533
+ },
1534
+ "icon-button": {
1535
+ button: {
1536
+ sm: {
1537
+ value: "{spacing.28}",
1538
+ type: "spacing"
1539
+ },
1540
+ md: {
1541
+ value: "{spacing.32}",
1542
+ type: "spacing"
1543
+ },
1544
+ lg: {
1545
+ value: "{spacing.40}",
1546
+ type: "spacing"
1547
+ }
1548
+ },
1549
+ icon: {
1550
+ sm: {
1551
+ value: "{spacing.16}",
1552
+ type: "spacing"
1553
+ },
1554
+ md: {
1555
+ value: "{spacing.20}",
1556
+ type: "spacing"
1557
+ }
1558
+ },
1559
+ primary: {
1560
+ "background-color": {
1561
+ default: {
1562
+ value: "{blue.500}",
1563
+ type: "color"
1564
+ },
1565
+ hover: {
1566
+ value: "{blue.600}",
1567
+ type: "color"
1568
+ },
1569
+ pressed: {
1570
+ value: "{blue.600}",
1571
+ type: "color"
1572
+ },
1573
+ focus: {
1574
+ value: "{blue.500}",
1575
+ type: "color"
1576
+ },
1577
+ disabled: {
1578
+ value: "{blue.200}",
1579
+ type: "color"
1580
+ }
1581
+ },
1582
+ color: {
1583
+ default: {
1584
+ value: "{core.white}",
1585
+ type: "color"
1586
+ },
1587
+ hover: {
1588
+ value: "{core.white}",
1589
+ type: "color"
1590
+ },
1591
+ pressed: {
1592
+ value: "{core.white}",
1593
+ type: "color"
1594
+ },
1595
+ focus: {
1596
+ value: "{core.white}",
1597
+ type: "color"
1598
+ },
1599
+ disabled: {
1600
+ value: "{core.white}",
1601
+ type: "color"
1602
+ }
1603
+ },
1604
+ border: {
1605
+ default: {
1606
+ value: "none",
1607
+ type: "color"
1608
+ },
1609
+ hover: {
1610
+ value: "none",
1611
+ type: "color"
1612
+ },
1613
+ pressed: {
1614
+ value: "none",
1615
+ type: "color"
1616
+ },
1617
+ focus: {
1618
+ value: "{blue.600}",
1619
+ type: "color"
1620
+ },
1621
+ disabled: {
1622
+ value: "none",
1623
+ type: "color"
1624
+ }
1625
+ },
1626
+ "border-width": {
1627
+ default: {
1628
+ value: "none",
1629
+ type: "borderWidth"
1630
+ },
1631
+ hover: {
1632
+ value: "none",
1633
+ type: "borderWidth"
1634
+ },
1635
+ pressed: {
1636
+ value: "none",
1637
+ type: "borderWidth"
1638
+ },
1639
+ focus: {
1640
+ value: "{border.1}",
1641
+ type: "borderWidth"
1642
+ },
1643
+ disabled: {
1644
+ value: "none",
1645
+ type: "borderWidth"
1646
+ }
1647
+ }
1648
+ },
1649
+ secondary: {
1650
+ "background-color": {
1651
+ default: {
1652
+ value: "none",
1653
+ type: "color"
1654
+ },
1655
+ hover: {
1656
+ value: "{grey.100}",
1657
+ type: "color"
1658
+ },
1659
+ pressed: {
1660
+ value: "{grey.100}",
1661
+ type: "color"
1662
+ },
1663
+ focus: {
1664
+ value: "none",
1665
+ type: "color"
1666
+ },
1667
+ disabled: {
1668
+ value: "none",
1669
+ type: "color"
1670
+ }
1671
+ },
1672
+ color: {
1673
+ default: {
1674
+ value: "{grey.500}",
1675
+ type: "color"
1676
+ },
1677
+ hover: {
1678
+ value: "{grey.500}",
1679
+ type: "color"
1680
+ },
1681
+ pressed: {
1682
+ value: "{grey.500}",
1683
+ type: "color"
1684
+ },
1685
+ focus: {
1686
+ value: "{grey.500}",
1687
+ type: "color"
1688
+ },
1689
+ disabled: {
1690
+ value: "{grey.100}",
1691
+ type: "color"
1692
+ }
1693
+ },
1694
+ border: {
1695
+ default: {
1696
+ value: "{grey.200}",
1697
+ type: "color"
1698
+ },
1699
+ hover: {
1700
+ value: "{grey.200}",
1701
+ type: "color"
1702
+ },
1703
+ pressed: {
1704
+ value: "{grey.200}",
1705
+ type: "color"
1706
+ },
1707
+ focus: {
1708
+ value: "{blue.600}",
1709
+ type: "color"
1710
+ },
1711
+ disabled: {
1712
+ value: "{grey.100}",
1713
+ type: "color"
1714
+ }
1715
+ },
1716
+ "border-width": {
1717
+ value: "{border.1}",
1718
+ type: "borderWidth"
1719
+ }
1720
+ },
1721
+ notification: {
1722
+ "background-color": {
1723
+ default: {
1724
+ value: "none",
1725
+ type: "color"
1726
+ },
1727
+ hover: {
1728
+ value: "{grey.100}",
1729
+ type: "color"
1730
+ },
1731
+ pressed: {
1732
+ value: "{grey.100}",
1733
+ type: "color"
1734
+ }
1735
+ },
1736
+ color: {
1737
+ default: {
1738
+ value: "{grey.500}",
1739
+ type: "color"
1740
+ },
1741
+ hover: {
1742
+ value: "{grey.500}",
1743
+ type: "color"
1744
+ },
1745
+ pressed: {
1746
+ value: "{grey.500}",
1747
+ type: "color"
1748
+ },
1749
+ focus: {
1750
+ value: "{grey.500}",
1751
+ type: "color"
1752
+ },
1753
+ disabled: {
1754
+ value: "{grey.100}",
1755
+ type: "color"
1756
+ }
1757
+ },
1758
+ border: {
1759
+ default: {
1760
+ value: "{grey.200}",
1761
+ type: "color"
1762
+ },
1763
+ hover: {
1764
+ value: "{grey.200}",
1765
+ type: "color"
1766
+ },
1767
+ pressed: {
1768
+ value: "{grey.200}",
1769
+ type: "color"
1770
+ },
1771
+ focus: {
1772
+ value: "{grey.200}",
1773
+ type: "color"
1774
+ },
1775
+ disabled: {
1776
+ value: "{grey.100}",
1777
+ type: "color"
1778
+ }
1779
+ },
1780
+ "border-width": {
1781
+ value: "{border.1}",
1782
+ type: "borderWidth"
1783
+ }
1784
+ },
1785
+ "notification-badge": {
1786
+ "background-color": {
1787
+ default: {
1788
+ value: "{blue.500}",
1789
+ type: "color"
1790
+ },
1791
+ hover: {
1792
+ value: "{blue.500}",
1793
+ type: "color"
1794
+ },
1795
+ pressed: {
1796
+ value: "{blue.500}",
1797
+ type: "color"
1798
+ },
1799
+ focus: {
1800
+ value: "{blue.500}",
1801
+ type: "color"
1802
+ },
1803
+ disabled: {
1804
+ value: "{grey.200}",
1805
+ type: "color"
1806
+ }
1807
+ },
1808
+ border: {
1809
+ default: {
1810
+ value: "{core.white}",
1811
+ type: "color"
1812
+ },
1813
+ hover: {
1814
+ value: "{core.white}",
1815
+ type: "color"
1816
+ },
1817
+ pressed: {
1818
+ value: "{core.white}",
1819
+ type: "color"
1820
+ },
1821
+ focus: {
1822
+ value: "{core.white}",
1823
+ type: "color"
1824
+ },
1825
+ disabled: {
1826
+ value: "{core.white}",
1827
+ type: "color"
1828
+ }
1829
+ },
1830
+ sm: {
1831
+ value: "{spacing.6}",
1832
+ type: "spacing"
1833
+ },
1834
+ md: {
1835
+ value: "{spacing.8}",
1836
+ type: "spacing"
1837
+ },
1838
+ lg: {
1839
+ value: "{spacing.10}",
1840
+ type: "spacing"
1841
+ },
1842
+ "border-width": {
1843
+ value: "{border.1}",
1844
+ type: "borderWidth"
1845
+ }
1846
+ },
1847
+ invisible: {
1848
+ "background-color": {
1849
+ default: {
1850
+ value: "none",
1851
+ type: "color"
1852
+ },
1853
+ hover: {
1854
+ value: "{grey.100}",
1855
+ type: "color"
1856
+ },
1857
+ pressed: {
1858
+ value: "{grey.100}",
1859
+ type: "color"
1860
+ },
1861
+ focus: {
1862
+ value: "none",
1863
+ type: "color"
1864
+ },
1865
+ disabled: {
1866
+ value: "none",
1867
+ type: "color"
1868
+ }
1869
+ },
1870
+ color: {
1871
+ default: {
1872
+ value: "{grey.500}",
1873
+ type: "color"
1874
+ },
1875
+ hover: {
1876
+ value: "{grey.500}",
1877
+ type: "color"
1878
+ },
1879
+ pressed: {
1880
+ value: "{grey.500}",
1881
+ type: "color"
1882
+ },
1883
+ focus: {
1884
+ value: "{grey.500}",
1885
+ type: "color"
1886
+ },
1887
+ disabled: {
1888
+ value: "{grey.100}",
1889
+ type: "color"
1890
+ }
1891
+ },
1892
+ border: {
1893
+ default: {
1894
+ value: "none",
1895
+ type: "color"
1896
+ },
1897
+ hover: {
1898
+ value: "none",
1899
+ type: "color"
1900
+ },
1901
+ pressed: {
1902
+ value: "none",
1903
+ type: "color"
1904
+ },
1905
+ focus: {
1906
+ value: "{blue.600}",
1907
+ type: "color"
1908
+ },
1909
+ disabled: {
1910
+ value: "{grey.100}",
1911
+ type: "color"
1912
+ }
1913
+ },
1914
+ "border-width": {
1915
+ default: {
1916
+ value: "none",
1917
+ type: "borderWidth"
1918
+ },
1919
+ hover: {
1920
+ value: "none",
1921
+ type: "borderWidth"
1922
+ },
1923
+ pressed: {
1924
+ value: "none",
1925
+ type: "borderWidth"
1926
+ },
1927
+ focus: {
1928
+ value: "{border.1}",
1929
+ type: "borderWidth"
1930
+ },
1931
+ disabled: {
1932
+ value: "{border.1}",
1933
+ type: "borderWidth"
1934
+ }
1935
+ }
1936
+ },
1937
+ "border-radius": {
1938
+ value: "{rounded.base}",
1939
+ type: "borderRadius"
1940
+ },
1941
+ "box-shadow": {
1942
+ default: {
1943
+ value: "{shadow.none}",
1944
+ type: "boxShadow"
1945
+ },
1946
+ hover: {
1947
+ value: "{shadow.none}",
1948
+ type: "boxShadow"
1949
+ },
1950
+ pressed: {
1951
+ value: "{shadow.inner}",
1952
+ type: "boxShadow"
1953
+ },
1954
+ focus: {
1955
+ value: "none",
1956
+ type: "boxShadow"
1957
+ },
1958
+ disabled: {
1959
+ value: "none",
1960
+ type: "boxShadow"
1961
+ }
1962
+ }
1963
+ },
1964
+ breadcrumbs: {
1965
+ color: {
1966
+ "previous-page": {
1967
+ value: "{blue.500}",
1968
+ type: "color"
1969
+ },
1970
+ divider: {
1971
+ value: "{grey.300}",
1972
+ type: "color"
1973
+ },
1974
+ "current-page": {
1975
+ value: "{grey.500}",
1976
+ type: "color"
1977
+ }
1978
+ },
1979
+ "font-family": {
1980
+ value: "{font-sans.inter}",
1981
+ type: "fontFamilies"
1982
+ },
1983
+ "font-weight": {
1984
+ value: "{font.normal}",
1985
+ type: "fontWeights"
1986
+ },
1987
+ "line-height": {
1988
+ value: "{leading.sm}",
1989
+ type: "lineHeights"
1990
+ },
1991
+ "font-size": {
1992
+ value: "{text.sm}",
1993
+ type: "fontSizes"
1994
+ }
1995
+ },
1996
+ "main-content": {
1997
+ sm: {
1998
+ value: "{spacing.32}",
1999
+ type: "spacing"
2000
+ },
2001
+ base: {
2002
+ value: "{spacing.48}",
2003
+ type: "spacing"
2004
+ },
2005
+ lg: {
2006
+ value: "{spacing.64}",
2007
+ type: "spacing"
2008
+ }
2009
+ },
2010
+ "section-content": {
2011
+ none: {
2012
+ value: "{spacing.0}",
2013
+ type: "spacing"
2014
+ },
2015
+ xs: {
2016
+ value: "{spacing.8}",
2017
+ type: "spacing"
2018
+ },
2019
+ sm: {
2020
+ value: "{spacing.16}",
2021
+ type: "spacing"
2022
+ },
2023
+ base: {
2024
+ value: "{spacing.24}",
2025
+ type: "spacing"
2026
+ },
2027
+ lg: {
2028
+ value: "{spacing.32}",
2029
+ type: "spacing"
2030
+ }
2031
+ }
2032
+ },
2033
+ $themes: [],
2034
+ $metadata: { tokenSetOrder: ["global", "alias"] }
2035
+ }, Y = {
2036
+ $schema: "http://json-schema.org/draft-07/schema#",
2037
+ 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'.",
2038
+ safeColorNames: [
2039
+ "blue",
2040
+ "purple",
2041
+ "orange",
2042
+ "pink",
2043
+ "yellow",
2044
+ "grey",
2045
+ "core"
2046
+ ]
2047
+ }, X = {
2048
+ $schema: "http://json-schema.org/draft-07/schema#",
2049
+ 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'.",
2050
+ semanticColorNames: [
2051
+ "error",
2052
+ "warning",
2053
+ "success",
2054
+ "info"
2055
+ ]
2056
+ }, Z = Y.safeColorNames, ee = X.semanticColorNames, Q = {};
2057
+ Z.forEach((e) => {
2058
+ let t = J.global[e];
2059
+ t && Object.keys(t).forEach((n) => {
2060
+ let r = t[n]?.value;
2061
+ r && (Q[e] || (Q[e] = {}), Q[e][n] = r);
2062
+ });
1290
2063
  });
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
- });
2064
+ var $ = J.global.semantic;
2065
+ $ && ee.forEach((e) => {
2066
+ let t = $[e];
2067
+ t && typeof t == "object" && Object.keys(t).forEach((n) => {
2068
+ let r = t[n]?.value;
2069
+ if (r) {
2070
+ let t = `semantic-${e}`;
2071
+ Q[t] || (Q[t] = {}), Q[t][n] = r;
2072
+ }
2073
+ });
1302
2074
  });
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
- }
2075
+ //#endregion
2076
+ //#region ../style/src/constants.ts
2077
+ var te = Object.entries(J.global.breakpoint).reduce((e, [t, n]) => (e[t] = n.value, e), {}), ne = /* @__PURE__ */ o({
2078
+ __name: "FzFloating",
2079
+ props: {
2080
+ isOpen: {
2081
+ type: Boolean,
2082
+ default: !1
2083
+ },
2084
+ position: { default: "auto" },
2085
+ container: {},
2086
+ contentClass: {},
2087
+ openerClass: {},
2088
+ overrideContentClass: { type: Boolean },
2089
+ overrideOpener: {},
2090
+ teleport: {
2091
+ type: Boolean,
2092
+ default: !1
2093
+ },
2094
+ useViewport: { type: Boolean }
2095
+ },
2096
+ emits: ["fzfloating:setPosition"],
2097
+ setup(o, { expose: s, emit: d }) {
2098
+ 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 = {
2099
+ position: p.position,
2100
+ element: { domRef: w },
2101
+ container: { domRef: g(p.container || document.body) },
2102
+ opener: { domRef: g(null) },
2103
+ useViewport: p.useViewport,
2104
+ callback(...e) {
2105
+ C("fzfloating:setPosition", ...e);
2106
+ }
2107
+ }, N = _(M);
2108
+ E.opener && (M.opener = { domRef: T });
2109
+ let P = V(N), F = () => {
2110
+ O || !k || (O = !0, requestAnimationFrame(() => {
2111
+ k && p.isOpen && P.setPosition(), O = !1;
2112
+ }));
2113
+ };
2114
+ u(() => {
2115
+ k = !0;
2116
+ });
2117
+ let I = () => {
2118
+ F();
2119
+ }, L = () => {
2120
+ F();
2121
+ }, R = () => {
2122
+ window.addEventListener("scroll", I, !0), window.addEventListener("resize", L), w.value && !A && (A = new ResizeObserver(() => {
2123
+ F();
2124
+ }), A.observe(w.value)), T.value && !j && (j = new ResizeObserver(() => {
2125
+ F();
2126
+ }), j.observe(T.value));
2127
+ }, z = () => {
2128
+ window.removeEventListener("scroll", I, !0), window.removeEventListener("resize", L), A &&= (A.disconnect(), null), j &&= (j.disconnect(), null);
2129
+ };
2130
+ x(() => p.position, () => F()), x(() => p.isOpen, (e) => {
2131
+ if (!e || !w.value || !k) {
2132
+ z();
2133
+ return;
2134
+ }
2135
+ R();
2136
+ let t = T.value?.getBoundingClientRect();
2137
+ 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();
2138
+ }), x(() => p.overrideOpener, (e) => {
2139
+ e && N.opener && N.opener.value && (N.opener.value = { domRef: e });
2140
+ }), l(() => {
2141
+ k = !1, z();
2142
+ });
2143
+ 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 : [
2144
+ "bg-core-white fixed",
2145
+ U.value,
2146
+ p.contentClass
2147
+ ]);
2148
+ return s({ setPosition: P.setPosition }), (t, s) => (f(), i("div", null, [
2149
+ h(t.$slots, "opener-start"),
2150
+ a("div", {
2151
+ ref_key: "opener",
2152
+ ref: T,
2153
+ class: "inline-flex w-full sm:w-auto"
2154
+ }, [h(t.$slots, "opener", {
2155
+ isOpen: o.isOpen,
2156
+ floating: v(P)
2157
+ })], 512),
2158
+ h(t.$slots, "opener-end"),
2159
+ o.teleport ? r("", !0) : S((f(), i("div", {
2160
+ key: 0,
2161
+ ref_key: "content",
2162
+ ref: w,
2163
+ class: c(["fz__floating__content w-full sm:w-auto", W.value])
2164
+ }, [h(t.$slots, "default", {
2165
+ isOpen: o.isOpen,
2166
+ floating: v(P)
2167
+ })], 2)), [[b, t.$slots.default && (!t.$slots.opener || t.$slots.opener && o.isOpen)]]),
2168
+ o.teleport ? (f(), n(e, {
2169
+ key: 1,
2170
+ to: "body"
2171
+ }, [S(a("div", {
2172
+ ref_key: "content",
2173
+ ref: w,
2174
+ class: c(["fz__floating__content", W.value])
2175
+ }, [h(t.$slots, "default", {
2176
+ isOpen: o.isOpen,
2177
+ floating: v(P)
2178
+ })], 2), [[b, t.$slots.default && (!t.$slots.opener || t.$slots.opener && o.isOpen)]])])) : r("", !0)
2179
+ ]));
2180
+ }
1443
2181
  });
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
- };
2182
+ //#endregion
2183
+ 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 };