@fiscozen/composables 1.0.2 → 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,1453 +1,2165 @@
1
- import { ref as g, reactive as Y, onUnmounted as Q, nextTick as J, onMounted as k, computed as F, watch as B, onBeforeUnmount as N, defineComponent as Z, useSlots as _, toRef as I, toRefs as ee, createElementBlock as j, openBlock as M, renderSlot as C, createElementVNode as V, 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
- const o = Math.pow(10, t);
4
- return Math.trunc(e * o) / o;
5
- }, ne = (e, {
6
- minimumFractionDigits: t = 0,
7
- maximumFractionDigits: o = 2,
8
- roundDecimals: l = !0,
9
- useGrouping: r = !0
10
- } = {}) => e == null || isNaN(e) || !isFinite(e) ? "" : (l ? e : le(e, o)).toLocaleString("it-IT", {
11
- minimumFractionDigits: t,
12
- maximumFractionDigits: o,
13
- useGrouping: r
14
- }), re = (e) => {
15
- if (!e || typeof e != "string")
16
- return NaN;
17
- let t = e.trim();
18
- return t.includes(",") && (t = t.replace(/\./g, ""), t = t.replace(",", ".")), parseFloat(t);
19
- }, ze = (e, t) => {
20
- let o = t;
21
- const l = t % e, r = t >= 0 ? e : -e;
22
- return l !== 0 && (o = Math.abs(l) >= e / 2 ? t + r - l : t - l), o;
23
- }, ke = (e, t, o) => Math.max(e, Math.min(t, o)), z = new DOMRect(0, 0, window.innerWidth, window.innerHeight), b = (e, t, o, l, r) => {
24
- let n = r ? "bottom" : "right", p = r ? "bottom-start" : "right-start";
25
- z.width = window.innerWidth, z.height = window.innerHeight, z.x = 0, z.y = 0;
26
- const y = e ? e.getBoundingClientRect() : z, d = t.getBoundingClientRect(), v = o.getBoundingClientRect(), h = (v.left - y.left - d.width) / y.width, x = (y.right - v.right - d.width) / y.width, c = (v.top - y.top - d.height) / y.height, i = (y.bottom - v.bottom - d.height) / y.height;
27
- let s = [
28
- {
29
- key: "right",
30
- space: x
31
- },
32
- {
33
- key: "top",
34
- space: c
35
- },
36
- {
37
- key: "bottom",
38
- space: i
39
- },
40
- {
41
- key: "left",
42
- space: h
43
- }
44
- ].sort((u, f) => f.space - u.space);
45
- if (r && (s = s.filter((u) => u.key === "top" || u.key === "bottom")), n = s[0].key, !l) {
46
- const u = (d.height - v.height) / 2;
47
- switch (n) {
48
- case "right":
49
- case "left":
50
- y.top > v.top - u && (l = "end"), y.bottom < v.top - u && (l = "start");
51
- break;
52
- }
53
- }
54
- return p = l ? `${n}-${l}` : n, p;
55
- }, ae = (e, t, o, l) => ({
56
- x: t.x + e.width * o / 100,
57
- y: t.y + e.height * l / 100
58
- }), W = (e) => typeof e == "string" ? document.querySelector(e) : e, ie = (e) => ({
59
- left: parseFloat(e.marginLeft),
60
- right: parseFloat(e.marginRight),
61
- top: parseFloat(e.marginTop),
62
- bottom: parseFloat(e.marginBottom)
63
- }), se = {
64
- // Bottom positions - content below opener
65
- bottom: (e, t) => ({
66
- position: {
67
- x: e.left - t.left + e.width / 2,
68
- y: e.bottom
69
- },
70
- transform: { x: -50, y: 0 }
71
- }),
72
- "bottom-start": (e, t) => ({
73
- position: {
74
- x: e.left - t.left,
75
- y: e.bottom
76
- },
77
- transform: { x: 0, y: 0 }
78
- }),
79
- "bottom-end": (e, t) => ({
80
- position: {
81
- x: e.right + t.right,
82
- y: e.bottom
83
- },
84
- transform: { x: -100, y: 0 }
85
- }),
86
- // Top positions - content above opener
87
- top: (e, t) => ({
88
- position: {
89
- x: e.left - t.left + e.width / 2,
90
- y: e.top - t.bottom
91
- },
92
- transform: { x: -50, y: -100 }
93
- }),
94
- "top-start": (e, t) => ({
95
- position: {
96
- x: e.left - t.left,
97
- y: e.top - t.bottom
98
- },
99
- transform: { x: 0, y: -100 }
100
- }),
101
- "top-end": (e, t) => ({
102
- position: {
103
- x: e.right + t.right,
104
- y: e.top - t.bottom
105
- },
106
- transform: { x: -100, y: -100 }
107
- }),
108
- // Left positions - content to left of opener
109
- left: (e, t) => ({
110
- position: {
111
- x: e.left - t.right,
112
- y: e.top - t.top + e.height / 2
113
- },
114
- transform: { x: -100, y: -50 }
115
- }),
116
- "left-start": (e, t) => ({
117
- position: {
118
- x: e.left - t.right,
119
- y: e.top - t.top
120
- },
121
- transform: { x: -100, y: 0 }
122
- }),
123
- "left-end": (e, t) => ({
124
- position: {
125
- x: e.left - t.right,
126
- y: e.bottom + t.bottom
127
- },
128
- transform: { x: -100, y: -100 }
129
- }),
130
- // Right positions - content to right of opener
131
- right: (e, t) => ({
132
- position: {
133
- x: e.right + t.left,
134
- y: e.top - t.top + e.height / 2
135
- },
136
- transform: { x: 0, y: -50 }
137
- }),
138
- "right-start": (e, t) => ({
139
- position: {
140
- x: e.right + t.left,
141
- y: e.top - t.top
142
- },
143
- transform: { x: 0, y: 0 }
144
- }),
145
- "right-end": (e, t) => ({
146
- position: {
147
- x: e.right + t.left,
148
- y: e.bottom + t.bottom
149
- },
150
- transform: { x: 0, y: -100 }
151
- })
152
- }, pe = (e, t, o) => {
153
- const l = se[e];
154
- return l ? l(t, o) : { position: { x: 0, y: 0 }, transform: { x: 0, y: 0 } };
155
- }, ue = {
156
- bottom: (e, t) => ({
157
- position: {
158
- x: e.left + e.width / 2,
159
- y: e.bottom - t.height
160
- },
161
- transform: { x: -50, y: 0 }
162
- }),
163
- "bottom-start": (e, t) => ({
164
- position: {
165
- x: e.left,
166
- y: e.bottom - t.height
167
- },
168
- transform: { x: 0, y: 0 }
169
- }),
170
- "bottom-end": (e, t) => ({
171
- position: {
172
- x: e.right - t.width,
173
- y: e.bottom - t.height
174
- },
175
- transform: { x: 0, y: 0 }
176
- }),
177
- top: (e) => ({
178
- position: {
179
- x: e.left + e.width / 2,
180
- y: e.top
181
- },
182
- transform: { x: -50, y: 0 }
183
- }),
184
- "top-start": (e) => ({
185
- position: {
186
- x: e.left,
187
- y: e.top
188
- },
189
- transform: { x: 0, y: 0 }
190
- }),
191
- "top-end": (e, t) => ({
192
- position: {
193
- x: e.right - t.width,
194
- y: e.top
195
- },
196
- transform: { x: 0, y: 0 }
197
- }),
198
- left: (e, t) => ({
199
- position: {
200
- x: e.left,
201
- y: e.top + (e.height - t.height) / 2
202
- },
203
- transform: { x: 0, y: 0 }
204
- }),
205
- "left-start": (e) => ({
206
- position: {
207
- x: e.left,
208
- y: e.top
209
- },
210
- transform: { x: 0, y: 0 }
211
- }),
212
- "left-end": (e, t) => ({
213
- position: {
214
- x: e.left,
215
- y: e.bottom - t.height
216
- },
217
- transform: { x: 0, y: 0 }
218
- }),
219
- right: (e, t) => ({
220
- position: {
221
- x: e.right - t.width,
222
- y: e.top + (e.height - t.height) / 2
223
- },
224
- transform: { x: 0, y: 0 }
225
- }),
226
- "right-start": (e, t) => ({
227
- position: {
228
- x: e.right - t.width,
229
- y: e.top
230
- },
231
- transform: { x: 0, y: 0 }
232
- }),
233
- "right-end": (e, t) => ({
234
- position: {
235
- x: e.right - t.width,
236
- y: e.bottom - t.height
237
- },
238
- transform: { x: 0, y: 0 }
239
- })
240
- }, ce = (e, t, o) => {
241
- const l = ue[e];
242
- return l ? l(t, o) : { position: { x: 0, y: 0 }, transform: { x: 0, y: 0 } };
243
- }, fe = (e, t, o, l) => {
244
- const r = { ...e }, n = { ...l };
245
- if (e.x < o.left && (r.x = o.left, n.x = 0), e.x + t.width > o.right) {
246
- const p = o.right - t.width;
247
- p > 0 && (r.x = p), n.x = 0;
248
- }
249
- if (e.y < o.top && (r.y = o.top, n.y = 0), e.y + t.height > o.bottom) {
250
- const p = o.bottom - t.height;
251
- p > 0 && (r.y = p), n.y = 0;
252
- }
253
- return { position: r, transform: n };
254
- }, ye = (e, t, o, l, r) => {
255
- const n = r ? null : t;
256
- switch (e) {
257
- case "auto":
258
- return b(n, o, l);
259
- case "auto-vertical":
260
- return b(n, o, l, void 0, !0);
261
- case "auto-start":
262
- return b(n, o, l, "start");
263
- case "auto-vertical-start":
264
- return b(n, o, l, "start", !0);
265
- case "auto-end":
266
- return b(n, o, l, "end");
267
- case "auto-vertical-end":
268
- return b(n, o, l, "end", !0);
269
- default:
270
- return "bottom-start";
271
- }
272
- }, ve = (e) => e.startsWith("auto"), de = (e) => {
273
- const t = g("auto"), o = g(), l = g(), r = g(), n = g(), p = Y({ position: { x: 0, y: 0 } }), y = {
274
- root: null,
275
- rootMargin: "0px",
276
- threshold: 1,
277
- ...e.element.value.intersectionOptions
278
- }, d = g(new IntersectionObserver(() => {
279
- }, y)), v = () => {
280
- var u, f;
281
- const c = W(e.element.value.domRef.value);
282
- if (!c)
283
- return null;
284
- const i = (u = e.container) != null && u.value ? W(e.container.value.domRef.value) ?? document.body : document.body, s = (f = e.opener) != null && f.value ? W(e.opener.value.domRef.value) : null;
285
- return { element: c, container: i, opener: s };
286
- }, h = (c) => {
287
- var i;
288
- return {
289
- element: c.element.getBoundingClientRect(),
290
- container: c.container.getBoundingClientRect(),
291
- opener: ((i = c.opener) == null ? void 0 : i.getBoundingClientRect()) ?? null
292
- };
293
- }, x = (c = !1) => J(() => {
294
- var O, R, L;
295
- o.value = ((O = e.position) == null ? void 0 : O.value) ?? "auto";
296
- const i = v();
297
- if (!i) return;
298
- Object.assign(i.element.style, {
299
- position: "fixed",
300
- top: "0px",
301
- left: "0px"
302
- });
303
- const s = h(i);
304
- l.value = s.element, r.value = s.opener ?? void 0, n.value = s.container, d.value.observe(i.element), d.value.observe(i.container), ve(o.value) && i.opener && (o.value = ye(
305
- o.value,
306
- i.container,
307
- i.element,
308
- i.opener,
309
- ((R = e.useViewport) == null ? void 0 : R.value) ?? !1
310
- ));
311
- 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), E = ae(
312
- s.element,
313
- f.position,
314
- f.transform.x,
315
- f.transform.y
316
- ), S = fe(
317
- E,
318
- s.element,
319
- s.container,
320
- f.transform
321
- );
322
- p.position.x = S.position.x, p.position.y = S.position.y, Object.assign(i.element.style, {
323
- top: `${p.position.y}px`,
324
- left: `${p.position.x}px`,
325
- position: "fixed",
326
- display: "flex"
327
- }), l.value = i.element.getBoundingClientRect(), (L = e.callback) != null && L.value && !c && e.callback.value(l, r, n, t, o);
328
- });
329
- return Q(() => {
330
- d.value.disconnect();
331
- }), {
332
- float: p,
333
- rect: l,
334
- setPosition: x,
335
- position: t,
336
- actualPosition: o,
337
- openerRect: r,
338
- containerRect: n
339
- };
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
+ };
340
409
  };
341
- function $(e) {
342
- const t = window.matchMedia(e), o = g(t.matches);
343
- function l(r) {
344
- o.value = r.matches;
345
- }
346
- return k(() => {
347
- t.addEventListener("change", l);
348
- }), Q(() => {
349
- t.removeEventListener("change", l);
350
- }), F(() => 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);
351
422
  }
352
- function Ee(e) {
353
- return {
354
- isGreater(t) {
355
- return $(`(min-width: ${e[t]})`);
356
- },
357
- isSmaller(t) {
358
- return $(`(max-width: ${e[t]})`);
359
- },
360
- isInBetween(t, o) {
361
- return $(`(min-width: ${e[t]}) and (max-width: ${e[o]})`);
362
- }
363
- };
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
+ };
364
437
  }
365
- function Oe(e, t, o) {
366
- if (!e)
367
- throw new Error("A target component has to be provided.");
368
- if (!t)
369
- throw new Error("A callback has to be provided.");
370
- const l = (r) => {
371
- !e.value || r.target === e.value || r.composedPath().includes(e.value) || typeof t == "function" && t();
372
- };
373
- o && B(o, (r, n) => {
374
- n && n.removeEventListener("click", l), r == null || r.addEventListener("click", l);
375
- }), k(() => {
376
- o || document.addEventListener("click", l);
377
- }), N(() => {
378
- var r;
379
- if (o) {
380
- (r = o.value) == null || r.removeEventListener("click", l);
381
- return;
382
- }
383
- document.removeEventListener("click", l);
384
- });
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
+ });
385
457
  }
386
- function Le(e, t) {
387
- if (!e)
388
- throw new Error("A target component has to be provided.");
389
- if (!t || typeof t != "function")
390
- throw new Error("A callback has to be provided.");
391
- const o = (l) => {
392
- t(l);
393
- };
394
- k(() => {
395
- e.value.addEventListener("keydown", o);
396
- }), N(() => {
397
- e.value.removeEventListener("keydown", o);
398
- });
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
+ });
399
471
  }
400
- function Be(e, t) {
401
- if (!e || typeof e != "function")
402
- throw new Error("A callback has to be provided.");
403
- const o = (l) => {
404
- e(l);
405
- };
406
- k(() => {
407
- if (!t) {
408
- document.addEventListener("keyup", o);
409
- return;
410
- }
411
- t.value.addEventListener("keyup", o);
412
- }), N(() => {
413
- if (!t) {
414
- document.removeEventListener("keyup", o);
415
- return;
416
- }
417
- t.value.removeEventListener("keyup", o);
418
- });
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
+ });
419
492
  }
420
- const $e = (e) => ({
421
- format: ne,
422
- parse: re
423
- }), xe = {
424
- blue: {
425
- 50: {
426
- value: "#eff1ff",
427
- type: "color"
428
- },
429
- 100: {
430
- value: "#dee2ff",
431
- type: "color"
432
- },
433
- 200: {
434
- value: "#bdc5ff",
435
- type: "color"
436
- },
437
- 300: {
438
- value: "#9ca8ff",
439
- type: "color"
440
- },
441
- 400: {
442
- value: "#7b8bff",
443
- type: "color"
444
- },
445
- 500: {
446
- value: "#5a6eff",
447
- type: "color"
448
- },
449
- 600: {
450
- value: "#4858cc",
451
- type: "color"
452
- },
453
- 700: {
454
- value: "#364299",
455
- type: "color"
456
- },
457
- 800: {
458
- value: "#242c66",
459
- type: "color"
460
- },
461
- 900: {
462
- value: "#1b214c",
463
- type: "color"
464
- }
465
- },
466
- purple: {
467
- 50: {
468
- value: "#f8f4ff",
469
- type: "color"
470
- },
471
- 100: {
472
- value: "#f0e9ff",
473
- type: "color"
474
- },
475
- 200: {
476
- value: "#e1d3ff",
477
- type: "color"
478
- },
479
- 300: {
480
- value: "#d2bdff",
481
- type: "color"
482
- },
483
- 400: {
484
- value: "#c3a7ff",
485
- type: "color"
486
- },
487
- 500: {
488
- value: "#b491ff",
489
- type: "color"
490
- },
491
- 600: {
492
- value: "#9074cc",
493
- type: "color"
494
- },
495
- 700: {
496
- value: "#6c5799",
497
- type: "color"
498
- },
499
- 800: {
500
- value: "#483a66",
501
- type: "color"
502
- },
503
- 900: {
504
- value: "#241d33",
505
- type: "color"
506
- }
507
- },
508
- orange: {
509
- 50: {
510
- value: "#fff2ef",
511
- type: "color"
512
- },
513
- 100: {
514
- value: "#ffe4de",
515
- type: "color"
516
- },
517
- 200: {
518
- value: "#ffc9bd",
519
- type: "color"
520
- },
521
- 300: {
522
- value: "#ffae9c",
523
- type: "color"
524
- },
525
- 400: {
526
- value: "#ff937b",
527
- type: "color"
528
- },
529
- 500: {
530
- value: "#ff785a",
531
- type: "color"
532
- },
533
- 600: {
534
- value: "#cc6048",
535
- type: "color"
536
- },
537
- 700: {
538
- value: "#994836",
539
- type: "color"
540
- },
541
- 800: {
542
- value: "#663024",
543
- type: "color"
544
- },
545
- 900: {
546
- value: "#331812",
547
- type: "color"
548
- }
549
- },
550
- pink: {
551
- 50: {
552
- value: "#fff5f5",
553
- type: "color"
554
- },
555
- 100: {
556
- value: "#ffe0e0",
557
- type: "color"
558
- },
559
- 200: {
560
- value: "#ffcbcb",
561
- type: "color"
562
- },
563
- 300: {
564
- value: "#ffc0c0",
565
- type: "color"
566
- },
567
- 400: {
568
- value: "#ffabab",
569
- type: "color"
570
- },
571
- 500: {
572
- value: "#ff9696",
573
- type: "color"
574
- },
575
- 600: {
576
- value: "#cc7878",
577
- type: "color"
578
- },
579
- 700: {
580
- value: "#995a5a",
581
- type: "color"
582
- },
583
- 800: {
584
- value: "#663c3c",
585
- type: "color"
586
- },
587
- 900: {
588
- value: "#331e1e",
589
- type: "color"
590
- }
591
- },
592
- yellow: {
593
- 50: {
594
- value: "#fffbf4",
595
- type: "color"
596
- },
597
- 100: {
598
- value: "#fff3de",
599
- type: "color"
600
- },
601
- 200: {
602
- value: "#ffebc8",
603
- type: "color"
604
- },
605
- 300: {
606
- value: "#ffe7bd",
607
- type: "color"
608
- },
609
- 400: {
610
- value: "#ffdfa7",
611
- type: "color"
612
- },
613
- 500: {
614
- value: "#ffd791",
615
- type: "color"
616
- },
617
- 600: {
618
- value: "#ccac74",
619
- type: "color"
620
- },
621
- 700: {
622
- value: "#998157",
623
- type: "color"
624
- },
625
- 800: {
626
- value: "#806c49",
627
- type: "color"
628
- },
629
- 900: {
630
- value: "#4c402b",
631
- type: "color"
632
- }
633
- },
634
- semantic: {
635
- error: {
636
- 50: {
637
- value: "#fef3f3",
638
- type: "color"
639
- },
640
- 100: {
641
- value: "#f8baba",
642
- type: "color"
643
- },
644
- 200: {
645
- value: "#f04242",
646
- type: "color"
647
- },
648
- 300: {
649
- value: "#aa2f2f",
650
- type: "color"
651
- }
652
- },
653
- warning: {
654
- 50: {
655
- value: "#fff8f3",
656
- type: "color"
657
- },
658
- 100: {
659
- value: "#ffdabd",
660
- type: "color"
661
- },
662
- 200: {
663
- value: "#ffae4f",
664
- type: "color"
665
- },
666
- 300: {
667
- value: "#b47b38",
668
- type: "color"
669
- }
670
- },
671
- success: {
672
- 50: {
673
- value: "#f2f8f6",
674
- type: "color"
675
- },
676
- 100: {
677
- value: "#b5d8ce",
678
- type: "color"
679
- },
680
- 200: {
681
- value: "#0fa88c",
682
- type: "color"
683
- },
684
- 300: {
685
- value: "#0b7763",
686
- type: "color"
687
- }
688
- },
689
- info: {
690
- 50: {
691
- value: "#f3f7ff",
692
- type: "color"
693
- },
694
- 100: {
695
- value: "#b4c8e1",
696
- type: "color"
697
- },
698
- 200: {
699
- value: "#4e9fff",
700
- type: "color"
701
- },
702
- 300: {
703
- value: "#3770b4",
704
- type: "color"
705
- }
706
- }
707
- },
708
- background: {
709
- "white-smoke": {
710
- value: "#f7f6f3",
711
- type: "color"
712
- },
713
- seashell: {
714
- value: "#f8ece7",
715
- type: "color"
716
- },
717
- "pale-purple": {
718
- value: "#f2e6ff",
719
- type: "color"
720
- },
721
- "alice-blue": {
722
- value: "#ecf2fc",
723
- type: "color"
724
- }
725
- },
726
- grey: {
727
- 100: {
728
- value: "#e9edf0",
729
- type: "color"
730
- },
731
- 200: {
732
- value: "#d1dde6",
733
- type: "color"
734
- },
735
- 300: {
736
- value: "#9da9b2",
737
- type: "color"
738
- },
739
- 400: {
740
- value: "#6e777e",
741
- type: "color"
742
- },
743
- 500: {
744
- value: "#596167",
745
- type: "color"
746
- }
747
- },
748
- core: {
749
- white: {
750
- value: "#ffffff",
751
- type: "color"
752
- },
753
- black: {
754
- value: "#2c282f",
755
- type: "color"
756
- }
757
- },
758
- "font-sans": {
759
- "sharp-grotesk": {
760
- value: '"Sharp Grotesk", sans-serif',
761
- type: "fontFamilies"
762
- },
763
- inter: {
764
- value: '"Inter", sans-serif',
765
- type: "fontFamilies"
766
- }
767
- },
768
- font: {
769
- light: {
770
- value: "300",
771
- type: "fontWeights"
772
- },
773
- normal: {
774
- value: "400",
775
- type: "fontWeights"
776
- },
777
- medium: {
778
- value: "500",
779
- type: "fontWeights"
780
- }
781
- },
782
- spacing: {
783
- 0: {
784
- value: "0px",
785
- type: "spacing"
786
- },
787
- 1: {
788
- value: "1px",
789
- type: "spacing"
790
- },
791
- 2: {
792
- value: "2px",
793
- type: "spacing"
794
- },
795
- 4: {
796
- value: "4px",
797
- type: "spacing"
798
- },
799
- 6: {
800
- value: "6px",
801
- type: "spacing"
802
- },
803
- 8: {
804
- value: "8px",
805
- type: "spacing"
806
- },
807
- 10: {
808
- value: "10px",
809
- type: "spacing"
810
- },
811
- 12: {
812
- value: "12px",
813
- type: "spacing"
814
- },
815
- 14: {
816
- value: "14px",
817
- type: "spacing"
818
- },
819
- 16: {
820
- value: "16px",
821
- type: "spacing"
822
- },
823
- 20: {
824
- value: "20px",
825
- type: "spacing"
826
- },
827
- 24: {
828
- value: "24px",
829
- type: "spacing"
830
- },
831
- 28: {
832
- value: "28px",
833
- type: "spacing"
834
- },
835
- 32: {
836
- value: "32px",
837
- type: "spacing"
838
- },
839
- 36: {
840
- value: "36px",
841
- type: "spacing"
842
- },
843
- 40: {
844
- value: "40px",
845
- type: "spacing"
846
- },
847
- 44: {
848
- value: "44px",
849
- type: "spacing"
850
- },
851
- 48: {
852
- value: "48px",
853
- type: "spacing"
854
- },
855
- 56: {
856
- value: "56px",
857
- type: "spacing"
858
- },
859
- 64: {
860
- value: "64px",
861
- type: "spacing"
862
- },
863
- 80: {
864
- value: "80px",
865
- type: "spacing"
866
- },
867
- 96: {
868
- value: "96px",
869
- type: "spacing"
870
- },
871
- 112: {
872
- value: "112px",
873
- type: "spacing"
874
- },
875
- 128: {
876
- value: "128px",
877
- type: "spacing"
878
- },
879
- 144: {
880
- value: "144px",
881
- type: "spacing"
882
- },
883
- 160: {
884
- value: "160px",
885
- type: "spacing"
886
- },
887
- 176: {
888
- value: "176px",
889
- type: "spacing"
890
- },
891
- 192: {
892
- value: "192px",
893
- type: "spacing"
894
- },
895
- 208: {
896
- value: "208px",
897
- type: "spacing"
898
- },
899
- 224: {
900
- value: "224px",
901
- type: "spacing"
902
- },
903
- 240: {
904
- value: "240px",
905
- type: "spacing"
906
- },
907
- 256: {
908
- value: "256px",
909
- type: "spacing"
910
- },
911
- 288: {
912
- value: "288px",
913
- type: "spacing"
914
- },
915
- 320: {
916
- value: "320px",
917
- type: "spacing"
918
- },
919
- 384: {
920
- value: "384px",
921
- type: "spacing"
922
- }
923
- },
924
- border: {
925
- 0: {
926
- value: "0px",
927
- type: "borderWidth"
928
- },
929
- 1: {
930
- value: "1px",
931
- type: "borderWidth"
932
- },
933
- 2: {
934
- value: "2px",
935
- type: "borderWidth"
936
- },
937
- 4: {
938
- value: "4px",
939
- type: "borderWidth"
940
- },
941
- 8: {
942
- value: "8px",
943
- type: "borderWidth"
944
- }
945
- },
946
- rounded: {
947
- none: {
948
- value: "0px",
949
- type: "borderRadius"
950
- },
951
- sm: {
952
- value: "2px",
953
- type: "borderRadius"
954
- },
955
- base: {
956
- value: "4px",
957
- type: "borderRadius"
958
- },
959
- md: {
960
- value: "6px",
961
- type: "borderRadius"
962
- },
963
- lg: {
964
- value: "8px",
965
- type: "borderRadius"
966
- },
967
- xl: {
968
- value: "12px",
969
- type: "borderRadius"
970
- },
971
- "2xl": {
972
- value: "16px",
973
- type: "borderRadius"
974
- },
975
- "3xl": {
976
- value: "24px",
977
- type: "borderRadius"
978
- },
979
- full: {
980
- value: "9999px",
981
- type: "borderRadius"
982
- }
983
- },
984
- breakpoint: {
985
- xs: {
986
- value: "376px",
987
- type: "sizing"
988
- },
989
- sm: {
990
- value: "640px",
991
- type: "sizing"
992
- },
993
- md: {
994
- value: "768px",
995
- type: "sizing"
996
- },
997
- lg: {
998
- value: "1024px",
999
- type: "sizing"
1000
- },
1001
- xl: {
1002
- value: "1280px",
1003
- type: "sizing"
1004
- },
1005
- "2xl": {
1006
- value: "1440px",
1007
- type: "sizing"
1008
- },
1009
- "3xl": {
1010
- value: "1536px",
1011
- type: "sizing"
1012
- }
1013
- },
1014
- shadow: {
1015
- none: {
1016
- value: {
1017
- color: "#000000",
1018
- type: "dropShadow",
1019
- x: "0",
1020
- y: "0",
1021
- blur: "0",
1022
- spread: "0"
1023
- },
1024
- type: "boxShadow"
1025
- },
1026
- sm: {
1027
- value: {
1028
- color: "#0000000d",
1029
- type: "dropShadow",
1030
- x: "0",
1031
- y: "1",
1032
- blur: "2",
1033
- spread: "0"
1034
- },
1035
- type: "boxShadow"
1036
- },
1037
- base: {
1038
- value: [
1039
- {
1040
- color: "#0000000f",
1041
- type: "dropShadow",
1042
- x: "0",
1043
- y: "1",
1044
- blur: "2",
1045
- spread: "0"
1046
- },
1047
- {
1048
- color: "#0000001a",
1049
- type: "dropShadow",
1050
- x: "0",
1051
- y: "1",
1052
- blur: "3",
1053
- spread: "0"
1054
- }
1055
- ],
1056
- type: "boxShadow"
1057
- },
1058
- md: {
1059
- value: [
1060
- {
1061
- color: "#0000000f",
1062
- type: "dropShadow",
1063
- x: "0",
1064
- y: "2",
1065
- blur: "4",
1066
- spread: "-1"
1067
- },
1068
- {
1069
- color: "#0000001a",
1070
- type: "dropShadow",
1071
- x: "0",
1072
- y: "4",
1073
- blur: "6",
1074
- spread: "-1"
1075
- }
1076
- ],
1077
- type: "boxShadow"
1078
- },
1079
- lg: {
1080
- value: [
1081
- {
1082
- color: "#0000000d",
1083
- type: "dropShadow",
1084
- x: "0",
1085
- y: "4",
1086
- blur: "6",
1087
- spread: "-2"
1088
- },
1089
- {
1090
- color: "#0000001a",
1091
- type: "dropShadow",
1092
- x: "0",
1093
- y: "10",
1094
- blur: "15",
1095
- spread: "-3"
1096
- }
1097
- ],
1098
- type: "boxShadow"
1099
- },
1100
- xl: {
1101
- value: [
1102
- {
1103
- color: "#0000000a",
1104
- type: "dropShadow",
1105
- x: "0",
1106
- y: "10",
1107
- blur: "10",
1108
- spread: "-5"
1109
- },
1110
- {
1111
- color: "#0000001a",
1112
- type: "dropShadow",
1113
- x: "0",
1114
- y: "20",
1115
- blur: "25",
1116
- spread: "-5"
1117
- }
1118
- ],
1119
- type: "boxShadow"
1120
- },
1121
- "2xl": {
1122
- value: {
1123
- color: "#00000040",
1124
- type: "dropShadow",
1125
- x: "0",
1126
- y: "25",
1127
- blur: "50",
1128
- spread: "-12"
1129
- },
1130
- type: "boxShadow"
1131
- },
1132
- inner: {
1133
- value: {
1134
- color: "#0000000f",
1135
- type: "innerShadow",
1136
- x: "0",
1137
- y: "2",
1138
- blur: "4",
1139
- spread: "0"
1140
- },
1141
- type: "boxShadow"
1142
- }
1143
- },
1144
- underline: {
1145
- value: "underline",
1146
- type: "textDecoration"
1147
- },
1148
- text: {
1149
- xs: {
1150
- value: "12px",
1151
- type: "fontSizes"
1152
- },
1153
- sm: {
1154
- value: "14px",
1155
- type: "fontSizes"
1156
- },
1157
- base: {
1158
- value: "16px",
1159
- type: "fontSizes"
1160
- },
1161
- lg: {
1162
- value: "18px",
1163
- type: "fontSizes"
1164
- },
1165
- xl: {
1166
- value: "20px",
1167
- type: "fontSizes"
1168
- },
1169
- "2xl": {
1170
- value: "24px",
1171
- type: "fontSizes"
1172
- },
1173
- "3xl": {
1174
- value: "30px",
1175
- type: "fontSizes"
1176
- },
1177
- "4xl": {
1178
- value: "36px",
1179
- type: "fontSizes"
1180
- },
1181
- "5xl": {
1182
- value: "48px",
1183
- type: "fontSizes"
1184
- },
1185
- "6xl": {
1186
- value: "60px",
1187
- type: "fontSizes"
1188
- },
1189
- "7xl": {
1190
- value: "72px",
1191
- type: "fontSizes"
1192
- },
1193
- "8xl": {
1194
- value: "96px",
1195
- type: "fontSizes"
1196
- },
1197
- "9xl": {
1198
- value: "128px",
1199
- type: "fontSizes"
1200
- }
1201
- },
1202
- leading: {
1203
- xs: {
1204
- value: "16px",
1205
- type: "lineHeights"
1206
- },
1207
- sm: {
1208
- value: "18px",
1209
- type: "lineHeights"
1210
- },
1211
- base: {
1212
- value: "20px",
1213
- type: "lineHeights"
1214
- },
1215
- lg: {
1216
- value: "24px",
1217
- type: "lineHeights"
1218
- },
1219
- xl: {
1220
- value: "28px",
1221
- type: "lineHeights"
1222
- },
1223
- "2xl": {
1224
- value: "32px",
1225
- type: "lineHeights"
1226
- },
1227
- "3xl": {
1228
- value: "36px",
1229
- type: "lineHeights"
1230
- },
1231
- "4xl": {
1232
- value: "40px",
1233
- type: "lineHeights"
1234
- },
1235
- "5xl": {
1236
- value: "48px",
1237
- type: "lineHeights"
1238
- },
1239
- "6xl": {
1240
- value: "60px",
1241
- type: "lineHeights"
1242
- },
1243
- "7xl": {
1244
- value: "72px",
1245
- type: "lineHeights"
1246
- },
1247
- "8xl": {
1248
- value: "96px",
1249
- type: "lineHeights"
1250
- },
1251
- "9xl": {
1252
- value: "128px",
1253
- type: "lineHeights"
1254
- }
1255
- }
1256
- }, H = {
1257
- global: xe
1258
- }, he = [
1259
- "blue",
1260
- "purple",
1261
- "orange",
1262
- "pink",
1263
- "yellow",
1264
- "grey",
1265
- "core"
1266
- ], ge = {
1267
- safeColorNames: he
1268
- }, me = [
1269
- "error",
1270
- "warning",
1271
- "success",
1272
- "info"
1273
- ], be = {
1274
- semanticColorNames: me
1275
- }, we = ge.safeColorNames, Se = be.semanticColorNames, w = {};
1276
- we.forEach((e) => {
1277
- const t = H.global[e];
1278
- t && Object.keys(t).forEach((o) => {
1279
- var r;
1280
- const l = (r = t[o]) == null ? void 0 : r.value;
1281
- l && (w[e] || (w[e] = {}), w[e][o] = l);
1282
- });
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
+ });
1283
2045
  });
1284
- const K = H.global.semantic;
1285
- K && Se.forEach((e) => {
1286
- const t = K[e];
1287
- t && typeof t == "object" && Object.keys(t).forEach((o) => {
1288
- var r;
1289
- const l = (r = t[o]) == null ? void 0 : r.value;
1290
- if (l) {
1291
- const n = `semantic-${e}`;
1292
- w[n] || (w[n] = {}), w[n][o] = l;
1293
- }
1294
- });
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
+ });
1295
2056
  });
1296
- const Re = Object.entries(H.global.breakpoint).reduce(
1297
- (e, [t, o]) => (e[t] = o.value, e),
1298
- {}
1299
- ), Ne = /* @__PURE__ */ Z({
1300
- __name: "FzFloating",
1301
- props: {
1302
- isOpen: { type: Boolean, default: !1 },
1303
- position: { default: "auto" },
1304
- container: {},
1305
- contentClass: {},
1306
- openerClass: {},
1307
- overrideContentClass: { type: Boolean },
1308
- overrideOpener: {},
1309
- teleport: { type: Boolean, default: !1 },
1310
- useViewport: { type: Boolean }
1311
- },
1312
- emits: ["fzfloating:setPosition"],
1313
- setup(e, { expose: t, emit: o }) {
1314
- const l = e, r = o, n = g(null), p = g(null), y = _(), d = $(`(max-width: ${Re.xs})`);
1315
- let v = !1, h = !1, x = null, c = null;
1316
- const i = {
1317
- position: l.position,
1318
- element: {
1319
- // @ts-ignore
1320
- domRef: n
1321
- },
1322
- container: {
1323
- // @ts-ignore
1324
- domRef: I(l.container || document.body)
1325
- },
1326
- opener: {
1327
- domRef: I(null)
1328
- },
1329
- useViewport: l.useViewport,
1330
- callback(...a) {
1331
- r("fzfloating:setPosition", ...a);
1332
- }
1333
- }, s = ee(i);
1334
- y.opener && (i.opener = {
1335
- // @ts-ignore
1336
- domRef: p
1337
- });
1338
- const u = de(s), f = () => {
1339
- v || !h || (v = !0, requestAnimationFrame(() => {
1340
- h && l.isOpen && u.setPosition(), v = !1;
1341
- }));
1342
- };
1343
- k(() => {
1344
- h = !0;
1345
- });
1346
- const E = () => {
1347
- f();
1348
- }, S = () => {
1349
- f();
1350
- }, O = () => {
1351
- window.addEventListener("scroll", E, !0), window.addEventListener("resize", S), n.value && !x && (x = new ResizeObserver(() => {
1352
- f();
1353
- }), x.observe(n.value)), p.value && !c && (c = new ResizeObserver(() => {
1354
- f();
1355
- }), c.observe(p.value));
1356
- }, R = () => {
1357
- window.removeEventListener("scroll", E, !0), window.removeEventListener("resize", S), x && (x.disconnect(), x = null), c && (c.disconnect(), c = null);
1358
- };
1359
- B(
1360
- () => l.position,
1361
- () => f()
1362
- ), B(
1363
- () => l.isOpen,
1364
- (a) => {
1365
- var D;
1366
- if (!a || !n.value || !h) {
1367
- R();
1368
- return;
1369
- }
1370
- O();
1371
- const m = (D = p.value) == null ? void 0 : D.getBoundingClientRect();
1372
- n.value.style.position = "fixed", n.value.style.top = "0px", n.value.style.left = "0px", n.value.style.transform = "none", n.value.style.width = d.value ? (m == null ? void 0 : m.width) + "px" : "auto", u.setPosition();
1373
- }
1374
- ), B(
1375
- () => l.overrideOpener,
1376
- (a) => {
1377
- a && s.opener && s.opener.value && (s.opener.value = {
1378
- domRef: a
1379
- });
1380
- }
1381
- ), N(() => {
1382
- h = !1, R();
1383
- });
1384
- 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 = F(() => {
1385
- var m;
1386
- const a = ((m = u.actualPosition) == null ? void 0 : m.value) ?? l.position;
1387
- return L(a);
1388
- }), A = F(() => l.overrideContentClass ? l.contentClass : ["bg-core-white fixed", X.value, l.contentClass]);
1389
- return t({
1390
- setPosition: u.setPosition
1391
- }), (a, m) => (M(), j("div", null, [
1392
- C(a.$slots, "opener-start"),
1393
- V("div", {
1394
- ref_key: "opener",
1395
- ref: p,
1396
- class: "inline-flex w-full sm:w-auto"
1397
- }, [
1398
- C(a.$slots, "opener", {
1399
- isOpen: e.isOpen,
1400
- floating: P(u)
1401
- })
1402
- ], 512),
1403
- C(a.$slots, "opener-end"),
1404
- e.teleport ? U("", !0) : T((M(), j("div", {
1405
- key: 0,
1406
- ref_key: "content",
1407
- ref: n,
1408
- class: q(["fz__floating__content w-full sm:w-auto", A.value])
1409
- }, [
1410
- C(a.$slots, "default", {
1411
- isOpen: e.isOpen,
1412
- floating: P(u)
1413
- })
1414
- ], 2)), [
1415
- [G, a.$slots.default && (!a.$slots.opener || a.$slots.opener && e.isOpen)]
1416
- ]),
1417
- e.teleport ? (M(), te(oe, {
1418
- key: 1,
1419
- to: "body"
1420
- }, [
1421
- T(V("div", {
1422
- ref_key: "content",
1423
- ref: n,
1424
- class: q(["fz__floating__content", A.value])
1425
- }, [
1426
- C(a.$slots, "default", {
1427
- isOpen: e.isOpen,
1428
- floating: P(u)
1429
- })
1430
- ], 2), [
1431
- [G, a.$slots.default && (!a.$slots.opener || a.$slots.opener && e.isOpen)]
1432
- ])
1433
- ])) : U("", !0)
1434
- ]));
1435
- }
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
+ }
1436
2163
  });
1437
- export {
1438
- Ne as FzFloating,
1439
- ae as calcRealPos,
1440
- ke as clamp,
1441
- ne as format,
1442
- b as getHighestAvailableSpacePos,
1443
- re as parse,
1444
- ze as roundTo,
1445
- le as truncateDecimals,
1446
- Ee as useBreakpoints,
1447
- Oe as useClickOutside,
1448
- $e as useCurrency,
1449
- de as useFloating,
1450
- Le as useKeyDown,
1451
- Be as useKeyUp,
1452
- $ as useMediaQuery
1453
- };
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 };