@fiscozen/checkbox 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/clover.xml +1031 -0
- package/coverage/coverage-final.json +7 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +131 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/coverage/src/FzCheckbox.vue.html +1489 -0
- package/coverage/src/FzCheckboxGroup.vue.html +682 -0
- package/coverage/src/common.ts.html +157 -0
- package/coverage/src/components/ErrorAlert.vue.html +268 -0
- package/coverage/src/components/FzCheckboxGroupOption.vue.html +652 -0
- package/coverage/src/components/index.html +131 -0
- package/coverage/src/index.html +161 -0
- package/coverage/src/utils.ts.html +265 -0
- package/dist/checkbox.js +534 -527
- package/dist/checkbox.umd.cjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +6 -6
- package/src/__tests__/FzCheckboxCard.spec.ts +2 -1
- package/src/__tests__/__snapshots__/FzCheckbox.spec.ts.snap +12 -45
- package/src/__tests__/__snapshots__/FzCheckboxCard.spec.ts.snap +1 -4
- package/src/__tests__/__snapshots__/FzCheckboxGroup.spec.ts.snap +15 -57
- package/src/components/ErrorAlert.vue +4 -4
- package/tsconfig.tsbuildinfo +1 -1
package/dist/checkbox.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { FzIcon as
|
|
1
|
+
import { ref as A, reactive as Ce, onUnmounted as le, nextTick as ke, onMounted as te, computed as r, defineComponent as T, useSlots as Z, toRef as ce, toRefs as ze, watch as N, onBeforeUnmount as $e, createElementBlock as z, openBlock as p, renderSlot as $, createElementVNode as B, withDirectives as _, createCommentVNode as k, createBlock as E, unref as y, normalizeClass as h, vShow as de, Teleport as Se, createTextVNode as j, toDisplayString as q, createVNode as U, mergeProps as ae, resolveDynamicComponent as Be, withCtx as F, resolveComponent as Ee, resolveDirective as Ie, withModifiers as Oe, mergeModels as J, useModel as oe, shallowRef as Re, vModelCheckbox as Ae, Fragment as re, createSlots as Fe, renderList as me, provide as Ne, inject as Te } from "vue";
|
|
2
|
+
import { FzIcon as H } from "@fiscozen/icons";
|
|
3
3
|
function be(e) {
|
|
4
|
-
const t = Date.now() - 16e11,
|
|
5
|
-
return `${e}-${t}-${
|
|
4
|
+
const t = Date.now() - 16e11, a = Math.random().toString(36).slice(2, 7);
|
|
5
|
+
return `${e}-${t}-${a}`;
|
|
6
6
|
}
|
|
7
7
|
function ie() {
|
|
8
8
|
return be("fz-checkbox");
|
|
@@ -10,14 +10,14 @@ function ie() {
|
|
|
10
10
|
function Le() {
|
|
11
11
|
return be("fz-checkbox-group");
|
|
12
12
|
}
|
|
13
|
-
const
|
|
14
|
-
let l =
|
|
15
|
-
|
|
16
|
-
const f = e ? e.getBoundingClientRect() :
|
|
13
|
+
const Q = new DOMRect(0, 0, window.innerWidth, window.innerHeight), G = (e, t, a, o, s) => {
|
|
14
|
+
let l = s ? "bottom" : "right", u = s ? "bottom-start" : "right-start";
|
|
15
|
+
Q.width = window.innerWidth, Q.height = window.innerHeight, Q.x = 0, Q.y = 0;
|
|
16
|
+
const f = e ? e.getBoundingClientRect() : Q, v = t.getBoundingClientRect(), x = a.getBoundingClientRect(), b = (x.left - f.left - v.width) / f.width, i = (f.right - x.right - v.width) / f.width, d = (x.top - f.top - v.height) / f.height, c = (f.bottom - x.bottom - v.height) / f.height;
|
|
17
17
|
let n = [
|
|
18
18
|
{
|
|
19
19
|
key: "right",
|
|
20
|
-
space:
|
|
20
|
+
space: i
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
key: "top",
|
|
@@ -29,28 +29,28 @@ const G = new DOMRect(0, 0, window.innerWidth, window.innerHeight), U = (e, t, o
|
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
key: "left",
|
|
32
|
-
space:
|
|
32
|
+
space: b
|
|
33
33
|
}
|
|
34
|
-
].sort((
|
|
35
|
-
if (
|
|
36
|
-
const
|
|
34
|
+
].sort((m, g) => g.space - m.space);
|
|
35
|
+
if (s && (n = n.filter((m) => m.key === "top" || m.key === "bottom")), l = n[0].key, !o) {
|
|
36
|
+
const m = (v.height - x.height) / 2;
|
|
37
37
|
switch (l) {
|
|
38
38
|
case "right":
|
|
39
39
|
case "left":
|
|
40
|
-
f.top > x.top -
|
|
40
|
+
f.top > x.top - m && (o = "end"), f.bottom < x.top - m && (o = "start");
|
|
41
41
|
break;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
return u =
|
|
45
|
-
}, Ve = (e, t,
|
|
46
|
-
x: t.x + e.width *
|
|
47
|
-
y: t.y + e.height *
|
|
44
|
+
return u = o ? `${l}-${o}` : l, u;
|
|
45
|
+
}, Ve = (e, t, a, o) => ({
|
|
46
|
+
x: t.x + e.width * a / 100,
|
|
47
|
+
y: t.y + e.height * o / 100
|
|
48
48
|
}), ne = (e) => typeof e == "string" ? document.querySelector(e) : e, De = (e) => ({
|
|
49
49
|
left: parseFloat(e.marginLeft),
|
|
50
50
|
right: parseFloat(e.marginRight),
|
|
51
51
|
top: parseFloat(e.marginTop),
|
|
52
52
|
bottom: parseFloat(e.marginBottom)
|
|
53
|
-
}),
|
|
53
|
+
}), Pe = {
|
|
54
54
|
// Bottom positions - content below opener
|
|
55
55
|
bottom: (e, t) => ({
|
|
56
56
|
position: {
|
|
@@ -139,9 +139,9 @@ const G = new DOMRect(0, 0, window.innerWidth, window.innerHeight), U = (e, t, o
|
|
|
139
139
|
},
|
|
140
140
|
transform: { x: 0, y: -100 }
|
|
141
141
|
})
|
|
142
|
-
},
|
|
143
|
-
const
|
|
144
|
-
return
|
|
142
|
+
}, Me = (e, t, a) => {
|
|
143
|
+
const o = Pe[e];
|
|
144
|
+
return o ? o(t, a) : { position: { x: 0, y: 0 }, transform: { x: 0, y: 0 } };
|
|
145
145
|
}, qe = {
|
|
146
146
|
bottom: (e, t) => ({
|
|
147
147
|
position: {
|
|
@@ -227,62 +227,62 @@ const G = new DOMRect(0, 0, window.innerWidth, window.innerHeight), U = (e, t, o
|
|
|
227
227
|
},
|
|
228
228
|
transform: { x: 0, y: 0 }
|
|
229
229
|
})
|
|
230
|
-
}, He = (e, t,
|
|
231
|
-
const
|
|
232
|
-
return
|
|
233
|
-
}, je = (e, t,
|
|
234
|
-
const
|
|
235
|
-
if (e.x <
|
|
236
|
-
const u =
|
|
237
|
-
u > 0 && (
|
|
230
|
+
}, He = (e, t, a) => {
|
|
231
|
+
const o = qe[e];
|
|
232
|
+
return o ? o(t, a) : { position: { x: 0, y: 0 }, transform: { x: 0, y: 0 } };
|
|
233
|
+
}, je = (e, t, a, o) => {
|
|
234
|
+
const s = { ...e }, l = { ...o };
|
|
235
|
+
if (e.x < a.left && (s.x = a.left, l.x = 0), e.x + t.width > a.right) {
|
|
236
|
+
const u = a.right - t.width;
|
|
237
|
+
u > 0 && (s.x = u), l.x = 0;
|
|
238
238
|
}
|
|
239
|
-
if (e.y <
|
|
240
|
-
const u =
|
|
241
|
-
u > 0 && (
|
|
239
|
+
if (e.y < a.top && (s.y = a.top, l.y = 0), e.y + t.height > a.bottom) {
|
|
240
|
+
const u = a.bottom - t.height;
|
|
241
|
+
u > 0 && (s.y = u), l.y = 0;
|
|
242
242
|
}
|
|
243
|
-
return { position:
|
|
244
|
-
}, Ue = (e, t,
|
|
245
|
-
const l =
|
|
243
|
+
return { position: s, transform: l };
|
|
244
|
+
}, Ue = (e, t, a, o, s) => {
|
|
245
|
+
const l = s ? null : t;
|
|
246
246
|
switch (e) {
|
|
247
247
|
case "auto":
|
|
248
|
-
return
|
|
248
|
+
return G(l, a, o);
|
|
249
249
|
case "auto-vertical":
|
|
250
|
-
return
|
|
250
|
+
return G(l, a, o, void 0, !0);
|
|
251
251
|
case "auto-start":
|
|
252
|
-
return
|
|
252
|
+
return G(l, a, o, "start");
|
|
253
253
|
case "auto-vertical-start":
|
|
254
|
-
return
|
|
254
|
+
return G(l, a, o, "start", !0);
|
|
255
255
|
case "auto-end":
|
|
256
|
-
return
|
|
256
|
+
return G(l, a, o, "end");
|
|
257
257
|
case "auto-vertical-end":
|
|
258
|
-
return
|
|
258
|
+
return G(l, a, o, "end", !0);
|
|
259
259
|
default:
|
|
260
260
|
return "bottom-start";
|
|
261
261
|
}
|
|
262
262
|
}, We = (e) => e.startsWith("auto"), Ke = (e) => {
|
|
263
|
-
const t =
|
|
263
|
+
const t = A("auto"), a = A(), o = A(), s = A(), l = A(), u = Ce({ position: { x: 0, y: 0 } }), f = {
|
|
264
264
|
root: null,
|
|
265
265
|
rootMargin: "0px",
|
|
266
266
|
threshold: 1,
|
|
267
267
|
...e.element.value.intersectionOptions
|
|
268
|
-
},
|
|
268
|
+
}, v = A(new IntersectionObserver(() => {
|
|
269
269
|
}, f)), x = () => {
|
|
270
|
-
var
|
|
270
|
+
var m, g;
|
|
271
271
|
const d = ne(e.element.value.domRef.value);
|
|
272
272
|
if (!d)
|
|
273
273
|
return null;
|
|
274
|
-
const c = (
|
|
274
|
+
const c = (m = e.container) != null && m.value ? ne(e.container.value.domRef.value) ?? document.body : document.body, n = (g = e.opener) != null && g.value ? ne(e.opener.value.domRef.value) : null;
|
|
275
275
|
return { element: d, container: c, opener: n };
|
|
276
|
-
},
|
|
276
|
+
}, b = (d) => {
|
|
277
277
|
var c;
|
|
278
278
|
return {
|
|
279
279
|
element: d.element.getBoundingClientRect(),
|
|
280
280
|
container: d.container.getBoundingClientRect(),
|
|
281
281
|
opener: ((c = d.opener) == null ? void 0 : c.getBoundingClientRect()) ?? null
|
|
282
282
|
};
|
|
283
|
-
},
|
|
284
|
-
var O,
|
|
285
|
-
|
|
283
|
+
}, i = (d = !1) => ke(() => {
|
|
284
|
+
var O, D, P;
|
|
285
|
+
a.value = ((O = e.position) == null ? void 0 : O.value) ?? "auto";
|
|
286
286
|
const c = x();
|
|
287
287
|
if (!c) return;
|
|
288
288
|
Object.assign(c.element.style, {
|
|
@@ -290,54 +290,54 @@ const G = new DOMRect(0, 0, window.innerWidth, window.innerHeight), U = (e, t, o
|
|
|
290
290
|
top: "0px",
|
|
291
291
|
left: "0px"
|
|
292
292
|
});
|
|
293
|
-
const n =
|
|
294
|
-
|
|
295
|
-
|
|
293
|
+
const n = b(c);
|
|
294
|
+
o.value = n.element, s.value = n.opener ?? void 0, l.value = n.container, v.value.observe(c.element), v.value.observe(c.container), We(a.value) && c.opener && (a.value = Ue(
|
|
295
|
+
a.value,
|
|
296
296
|
c.container,
|
|
297
297
|
c.element,
|
|
298
298
|
c.opener,
|
|
299
|
-
((
|
|
299
|
+
((D = e.useViewport) == null ? void 0 : D.value) ?? !1
|
|
300
300
|
));
|
|
301
|
-
const
|
|
301
|
+
const m = De(window.getComputedStyle(c.element)), g = c.opener && n.opener ? Me(a.value, n.opener, m) : He(a.value, n.container, n.element), I = Ve(
|
|
302
302
|
n.element,
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
),
|
|
307
|
-
|
|
303
|
+
g.position,
|
|
304
|
+
g.transform.x,
|
|
305
|
+
g.transform.y
|
|
306
|
+
), S = je(
|
|
307
|
+
I,
|
|
308
308
|
n.element,
|
|
309
309
|
n.container,
|
|
310
|
-
|
|
310
|
+
g.transform
|
|
311
311
|
);
|
|
312
|
-
u.position.x =
|
|
312
|
+
u.position.x = S.position.x, u.position.y = S.position.y, Object.assign(c.element.style, {
|
|
313
313
|
top: `${u.position.y}px`,
|
|
314
314
|
left: `${u.position.x}px`,
|
|
315
315
|
position: "fixed",
|
|
316
316
|
display: "flex"
|
|
317
|
-
}),
|
|
317
|
+
}), o.value = c.element.getBoundingClientRect(), (P = e.callback) != null && P.value && !d && e.callback.value(o, s, l, t, a);
|
|
318
318
|
});
|
|
319
319
|
return le(() => {
|
|
320
|
-
|
|
320
|
+
v.value.disconnect();
|
|
321
321
|
}), {
|
|
322
322
|
float: u,
|
|
323
|
-
rect:
|
|
324
|
-
setPosition:
|
|
323
|
+
rect: o,
|
|
324
|
+
setPosition: i,
|
|
325
325
|
position: t,
|
|
326
|
-
actualPosition:
|
|
327
|
-
openerRect:
|
|
326
|
+
actualPosition: a,
|
|
327
|
+
openerRect: s,
|
|
328
328
|
containerRect: l
|
|
329
329
|
};
|
|
330
330
|
};
|
|
331
331
|
function Ge(e) {
|
|
332
|
-
const t = window.matchMedia(e),
|
|
333
|
-
function
|
|
334
|
-
|
|
332
|
+
const t = window.matchMedia(e), a = A(t.matches);
|
|
333
|
+
function o(s) {
|
|
334
|
+
a.value = s.matches;
|
|
335
335
|
}
|
|
336
|
-
return
|
|
337
|
-
t.addEventListener("change",
|
|
336
|
+
return te(() => {
|
|
337
|
+
t.addEventListener("change", o);
|
|
338
338
|
}), le(() => {
|
|
339
|
-
t.removeEventListener("change",
|
|
340
|
-
}),
|
|
339
|
+
t.removeEventListener("change", o);
|
|
340
|
+
}), r(() => a.value);
|
|
341
341
|
}
|
|
342
342
|
const Xe = {
|
|
343
343
|
blue: {
|
|
@@ -1191,31 +1191,31 @@ const Xe = {
|
|
|
1191
1191
|
"info"
|
|
1192
1192
|
], Ze = {
|
|
1193
1193
|
semanticColorNames: Je
|
|
1194
|
-
}, _e = Qe.safeColorNames, et = Ze.semanticColorNames,
|
|
1194
|
+
}, _e = Qe.safeColorNames, et = Ze.semanticColorNames, X = {};
|
|
1195
1195
|
_e.forEach((e) => {
|
|
1196
1196
|
const t = se.global[e];
|
|
1197
|
-
t && Object.keys(t).forEach((
|
|
1198
|
-
var
|
|
1199
|
-
const
|
|
1200
|
-
|
|
1197
|
+
t && Object.keys(t).forEach((a) => {
|
|
1198
|
+
var s;
|
|
1199
|
+
const o = (s = t[a]) == null ? void 0 : s.value;
|
|
1200
|
+
o && (X[e] || (X[e] = {}), X[e][a] = o);
|
|
1201
1201
|
});
|
|
1202
1202
|
});
|
|
1203
1203
|
const fe = se.global.semantic;
|
|
1204
1204
|
fe && et.forEach((e) => {
|
|
1205
1205
|
const t = fe[e];
|
|
1206
|
-
t && typeof t == "object" && Object.keys(t).forEach((
|
|
1207
|
-
var
|
|
1208
|
-
const
|
|
1209
|
-
if (
|
|
1206
|
+
t && typeof t == "object" && Object.keys(t).forEach((a) => {
|
|
1207
|
+
var s;
|
|
1208
|
+
const o = (s = t[a]) == null ? void 0 : s.value;
|
|
1209
|
+
if (o) {
|
|
1210
1210
|
const l = `semantic-${e}`;
|
|
1211
|
-
|
|
1211
|
+
X[l] || (X[l] = {}), X[l][a] = o;
|
|
1212
1212
|
}
|
|
1213
1213
|
});
|
|
1214
1214
|
});
|
|
1215
1215
|
const tt = Object.entries(se.global.breakpoint).reduce(
|
|
1216
|
-
(e, [t,
|
|
1216
|
+
(e, [t, a]) => (e[t] = a.value, e),
|
|
1217
1217
|
{}
|
|
1218
|
-
),
|
|
1218
|
+
), at = /* @__PURE__ */ T({
|
|
1219
1219
|
__name: "FzFloating",
|
|
1220
1220
|
props: {
|
|
1221
1221
|
isOpen: { type: Boolean, default: !1 },
|
|
@@ -1229,135 +1229,135 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1229
1229
|
useViewport: { type: Boolean }
|
|
1230
1230
|
},
|
|
1231
1231
|
emits: ["fzfloating:setPosition"],
|
|
1232
|
-
setup(e, { expose: t, emit:
|
|
1233
|
-
const
|
|
1234
|
-
let x = !1,
|
|
1232
|
+
setup(e, { expose: t, emit: a }) {
|
|
1233
|
+
const o = e, s = a, l = A(null), u = A(null), f = Z(), v = Ge(`(max-width: ${tt.xs})`);
|
|
1234
|
+
let x = !1, b = !1, i = null, d = null;
|
|
1235
1235
|
const c = {
|
|
1236
|
-
position:
|
|
1236
|
+
position: o.position,
|
|
1237
1237
|
element: {
|
|
1238
1238
|
// @ts-ignore
|
|
1239
1239
|
domRef: l
|
|
1240
1240
|
},
|
|
1241
1241
|
container: {
|
|
1242
1242
|
// @ts-ignore
|
|
1243
|
-
domRef: ce(
|
|
1243
|
+
domRef: ce(o.container || document.body)
|
|
1244
1244
|
},
|
|
1245
1245
|
opener: {
|
|
1246
1246
|
domRef: ce(null)
|
|
1247
1247
|
},
|
|
1248
|
-
useViewport:
|
|
1248
|
+
useViewport: o.useViewport,
|
|
1249
1249
|
callback(...w) {
|
|
1250
|
-
|
|
1250
|
+
s("fzfloating:setPosition", ...w);
|
|
1251
1251
|
}
|
|
1252
1252
|
}, n = ze(c);
|
|
1253
1253
|
f.opener && (c.opener = {
|
|
1254
1254
|
// @ts-ignore
|
|
1255
1255
|
domRef: u
|
|
1256
1256
|
});
|
|
1257
|
-
const
|
|
1258
|
-
x || !
|
|
1259
|
-
|
|
1257
|
+
const m = Ke(n), g = () => {
|
|
1258
|
+
x || !b || (x = !0, requestAnimationFrame(() => {
|
|
1259
|
+
b && o.isOpen && m.setPosition(), x = !1;
|
|
1260
1260
|
}));
|
|
1261
1261
|
};
|
|
1262
|
-
|
|
1263
|
-
|
|
1262
|
+
te(() => {
|
|
1263
|
+
b = !0;
|
|
1264
1264
|
});
|
|
1265
|
-
const
|
|
1266
|
-
|
|
1267
|
-
},
|
|
1268
|
-
|
|
1265
|
+
const I = () => {
|
|
1266
|
+
g();
|
|
1267
|
+
}, S = () => {
|
|
1268
|
+
g();
|
|
1269
1269
|
}, O = () => {
|
|
1270
|
-
window.addEventListener("scroll",
|
|
1271
|
-
|
|
1272
|
-
}),
|
|
1273
|
-
|
|
1270
|
+
window.addEventListener("scroll", I, !0), window.addEventListener("resize", S), l.value && !i && (i = new ResizeObserver(() => {
|
|
1271
|
+
g();
|
|
1272
|
+
}), i.observe(l.value)), u.value && !d && (d = new ResizeObserver(() => {
|
|
1273
|
+
g();
|
|
1274
1274
|
}), d.observe(u.value));
|
|
1275
|
-
},
|
|
1276
|
-
window.removeEventListener("scroll",
|
|
1275
|
+
}, D = () => {
|
|
1276
|
+
window.removeEventListener("scroll", I, !0), window.removeEventListener("resize", S), i && (i.disconnect(), i = null), d && (d.disconnect(), d = null);
|
|
1277
1277
|
};
|
|
1278
|
-
|
|
1279
|
-
() =>
|
|
1280
|
-
() =>
|
|
1281
|
-
),
|
|
1282
|
-
() =>
|
|
1278
|
+
N(
|
|
1279
|
+
() => o.position,
|
|
1280
|
+
() => g()
|
|
1281
|
+
), N(
|
|
1282
|
+
() => o.isOpen,
|
|
1283
1283
|
(w) => {
|
|
1284
|
-
var
|
|
1285
|
-
if (!w || !l.value || !
|
|
1286
|
-
|
|
1284
|
+
var W;
|
|
1285
|
+
if (!w || !l.value || !b) {
|
|
1286
|
+
D();
|
|
1287
1287
|
return;
|
|
1288
1288
|
}
|
|
1289
1289
|
O();
|
|
1290
|
-
const
|
|
1291
|
-
l.value.style.position = "fixed", l.value.style.top = "0px", l.value.style.left = "0px", l.value.style.transform = "none", l.value.style.width =
|
|
1290
|
+
const L = (W = u.value) == null ? void 0 : W.getBoundingClientRect();
|
|
1291
|
+
l.value.style.position = "fixed", l.value.style.top = "0px", l.value.style.left = "0px", l.value.style.transform = "none", l.value.style.width = v.value ? (L == null ? void 0 : L.width) + "px" : "auto", m.setPosition();
|
|
1292
1292
|
}
|
|
1293
|
-
),
|
|
1294
|
-
() =>
|
|
1293
|
+
), N(
|
|
1294
|
+
() => o.overrideOpener,
|
|
1295
1295
|
(w) => {
|
|
1296
1296
|
w && n.opener && n.opener.value && (n.opener.value = {
|
|
1297
1297
|
domRef: w
|
|
1298
1298
|
});
|
|
1299
1299
|
}
|
|
1300
1300
|
), $e(() => {
|
|
1301
|
-
|
|
1301
|
+
b = !1, D();
|
|
1302
1302
|
});
|
|
1303
|
-
const
|
|
1304
|
-
var
|
|
1305
|
-
const w = ((
|
|
1306
|
-
return
|
|
1307
|
-
}),
|
|
1303
|
+
const P = (w) => w.startsWith("bottom") ? "mt-4" : w.startsWith("top") ? "mb-4" : w.startsWith("left") ? "mr-4" : w.startsWith("right") ? "ml-4" : "mt-4", M = r(() => {
|
|
1304
|
+
var L;
|
|
1305
|
+
const w = ((L = m.actualPosition) == null ? void 0 : L.value) ?? o.position;
|
|
1306
|
+
return P(w);
|
|
1307
|
+
}), R = r(() => o.overrideContentClass ? o.contentClass : ["bg-core-white fixed", M.value, o.contentClass]);
|
|
1308
1308
|
return t({
|
|
1309
|
-
setPosition:
|
|
1310
|
-
}), (w,
|
|
1309
|
+
setPosition: m.setPosition
|
|
1310
|
+
}), (w, L) => (p(), z("div", null, [
|
|
1311
1311
|
$(w.$slots, "opener-start"),
|
|
1312
|
-
|
|
1312
|
+
B("div", {
|
|
1313
1313
|
ref_key: "opener",
|
|
1314
1314
|
ref: u,
|
|
1315
1315
|
class: "inline-flex w-full sm:w-auto"
|
|
1316
1316
|
}, [
|
|
1317
1317
|
$(w.$slots, "opener", {
|
|
1318
1318
|
isOpen: e.isOpen,
|
|
1319
|
-
floating:
|
|
1319
|
+
floating: y(m)
|
|
1320
1320
|
})
|
|
1321
1321
|
], 512),
|
|
1322
1322
|
$(w.$slots, "opener-end"),
|
|
1323
|
-
e.teleport ?
|
|
1323
|
+
e.teleport ? k("", !0) : _((p(), z("div", {
|
|
1324
1324
|
key: 0,
|
|
1325
1325
|
ref_key: "content",
|
|
1326
1326
|
ref: l,
|
|
1327
|
-
class:
|
|
1327
|
+
class: h(["fz__floating__content w-full sm:w-auto", R.value])
|
|
1328
1328
|
}, [
|
|
1329
1329
|
$(w.$slots, "default", {
|
|
1330
1330
|
isOpen: e.isOpen,
|
|
1331
|
-
floating:
|
|
1331
|
+
floating: y(m)
|
|
1332
1332
|
})
|
|
1333
1333
|
], 2)), [
|
|
1334
1334
|
[de, w.$slots.default && (!w.$slots.opener || w.$slots.opener && e.isOpen)]
|
|
1335
1335
|
]),
|
|
1336
|
-
e.teleport ? (p(),
|
|
1336
|
+
e.teleport ? (p(), E(Se, {
|
|
1337
1337
|
key: 1,
|
|
1338
1338
|
to: "body"
|
|
1339
1339
|
}, [
|
|
1340
|
-
|
|
1340
|
+
_(B("div", {
|
|
1341
1341
|
ref_key: "content",
|
|
1342
1342
|
ref: l,
|
|
1343
|
-
class:
|
|
1343
|
+
class: h(["fz__floating__content", R.value])
|
|
1344
1344
|
}, [
|
|
1345
1345
|
$(w.$slots, "default", {
|
|
1346
1346
|
isOpen: e.isOpen,
|
|
1347
|
-
floating:
|
|
1347
|
+
floating: y(m)
|
|
1348
1348
|
})
|
|
1349
1349
|
], 2), [
|
|
1350
1350
|
[de, w.$slots.default && (!w.$slots.opener || w.$slots.opener && e.isOpen)]
|
|
1351
1351
|
])
|
|
1352
|
-
])) :
|
|
1352
|
+
])) : k("", !0)
|
|
1353
1353
|
]));
|
|
1354
1354
|
}
|
|
1355
|
-
}),
|
|
1355
|
+
}), ee = {
|
|
1356
1356
|
xs: "backoffice",
|
|
1357
1357
|
sm: "backoffice",
|
|
1358
1358
|
md: "backoffice",
|
|
1359
1359
|
lg: "frontoffice"
|
|
1360
|
-
},
|
|
1360
|
+
}, ot = ["disabled", "aria-disabled"], ue = /* @__PURE__ */ T({
|
|
1361
1361
|
__name: "FzButton",
|
|
1362
1362
|
props: {
|
|
1363
1363
|
label: {},
|
|
@@ -1373,32 +1373,32 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1373
1373
|
overrideContainerClass: { type: Boolean }
|
|
1374
1374
|
},
|
|
1375
1375
|
setup(e) {
|
|
1376
|
-
const t = e,
|
|
1377
|
-
|
|
1378
|
-
|
|
1376
|
+
const t = e, a = Z();
|
|
1377
|
+
N(() => t.tooltip, (i) => {
|
|
1378
|
+
i && console.warn(
|
|
1379
1379
|
'[FzButton] The "tooltip" prop is deprecated and will be removed in a future version. Please use the FzTooltip component to wrap your button instead.'
|
|
1380
1380
|
);
|
|
1381
|
-
}, { immediate: !0 }),
|
|
1382
|
-
if (
|
|
1383
|
-
const d =
|
|
1381
|
+
}, { immediate: !0 }), N(() => t.size, (i) => {
|
|
1382
|
+
if (i !== void 0) {
|
|
1383
|
+
const d = ee[i];
|
|
1384
1384
|
t.environment && t.environment !== d ? console.warn(
|
|
1385
|
-
`[FzButton] Both "size" and "environment" props are provided. "environment=${t.environment}" will be used and "size=${
|
|
1385
|
+
`[FzButton] Both "size" and "environment" props are provided. "environment=${t.environment}" will be used and "size=${i}" will be ignored. Please remove the deprecated "size" prop.`
|
|
1386
1386
|
) : console.warn(
|
|
1387
|
-
`[FzButton] The "size" prop is deprecated and will be removed in a future version. Please use environment="${d}" instead of size="${
|
|
1387
|
+
`[FzButton] The "size" prop is deprecated and will be removed in a future version. Please use environment="${d}" instead of size="${i}".`
|
|
1388
1388
|
);
|
|
1389
1389
|
}
|
|
1390
1390
|
}, { immediate: !0 });
|
|
1391
|
-
const
|
|
1391
|
+
const o = r(() => !t.disabled), s = r(() => {
|
|
1392
1392
|
switch (t.variant) {
|
|
1393
1393
|
case "secondary":
|
|
1394
1394
|
return {
|
|
1395
1395
|
"bg-core-white": !0,
|
|
1396
1396
|
"text-grey-500": !0,
|
|
1397
1397
|
"!border-grey-200": !0,
|
|
1398
|
-
"hover:bg-grey-100":
|
|
1399
|
-
"hover:!border-grey-200":
|
|
1400
|
-
"focus:bg-core-white":
|
|
1401
|
-
"focus:!border-blue-600":
|
|
1398
|
+
"hover:bg-grey-100": o.value,
|
|
1399
|
+
"hover:!border-grey-200": o.value,
|
|
1400
|
+
"focus:bg-core-white": o.value,
|
|
1401
|
+
"focus:!border-blue-600": o.value,
|
|
1402
1402
|
"disabled:bg-grey-50": !0,
|
|
1403
1403
|
"disabled:text-grey-200": !0,
|
|
1404
1404
|
"disabled:!border-grey-200": !0
|
|
@@ -1408,10 +1408,10 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1408
1408
|
"bg-transparent": !0,
|
|
1409
1409
|
"text-grey-500": !0,
|
|
1410
1410
|
"!border-transparent": !0,
|
|
1411
|
-
"hover:bg-grey-100":
|
|
1412
|
-
"hover:!border-grey-100":
|
|
1413
|
-
"focus:bg-transparent":
|
|
1414
|
-
"focus:!border-blue-600":
|
|
1411
|
+
"hover:bg-grey-100": o.value,
|
|
1412
|
+
"hover:!border-grey-100": o.value,
|
|
1413
|
+
"focus:bg-transparent": o.value,
|
|
1414
|
+
"focus:!border-blue-600": o.value,
|
|
1415
1415
|
"disabled:bg-grey-50": !0,
|
|
1416
1416
|
"disabled:text-grey-200": !0,
|
|
1417
1417
|
"disabled:!border-grey-200": !0
|
|
@@ -1420,18 +1420,18 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1420
1420
|
return {
|
|
1421
1421
|
"bg-semantic-error-200": !0,
|
|
1422
1422
|
"text-core-white": !0,
|
|
1423
|
-
"hover:bg-semantic-error-300":
|
|
1424
|
-
"focus:bg-semantic-error-200":
|
|
1425
|
-
"focus:!border-semantic-error-300":
|
|
1423
|
+
"hover:bg-semantic-error-300": o.value,
|
|
1424
|
+
"focus:bg-semantic-error-200": o.value,
|
|
1425
|
+
"focus:!border-semantic-error-300": o.value,
|
|
1426
1426
|
"disabled:bg-semantic-error-100": !0
|
|
1427
1427
|
};
|
|
1428
1428
|
case "success":
|
|
1429
1429
|
return {
|
|
1430
1430
|
"bg-semantic-success-200": !0,
|
|
1431
1431
|
"text-core-white": !0,
|
|
1432
|
-
"hover:bg-semantic-success-300":
|
|
1433
|
-
"focus:bg-semantic-success-200":
|
|
1434
|
-
"focus:!border-semantic-success-300":
|
|
1432
|
+
"hover:bg-semantic-success-300": o.value,
|
|
1433
|
+
"focus:bg-semantic-success-200": o.value,
|
|
1434
|
+
"focus:!border-semantic-success-300": o.value,
|
|
1435
1435
|
"disabled:bg-semantic-success-100": !0
|
|
1436
1436
|
};
|
|
1437
1437
|
case "primary":
|
|
@@ -1439,15 +1439,15 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1439
1439
|
return {
|
|
1440
1440
|
"bg-blue-500": !0,
|
|
1441
1441
|
"text-core-white": !0,
|
|
1442
|
-
"hover:bg-blue-600":
|
|
1443
|
-
"focus:bg-blue-500":
|
|
1444
|
-
"focus:!border-blue-600":
|
|
1442
|
+
"hover:bg-blue-600": o.value,
|
|
1443
|
+
"focus:bg-blue-500": o.value,
|
|
1444
|
+
"focus:!border-blue-600": o.value,
|
|
1445
1445
|
"disabled:bg-blue-200": !0
|
|
1446
1446
|
};
|
|
1447
1447
|
}
|
|
1448
|
-
}), l =
|
|
1449
|
-
const
|
|
1450
|
-
return
|
|
1448
|
+
}), l = r(() => t.environment ? t.environment : t.size ? ee[t.size] : "frontoffice"), u = r(() => {
|
|
1449
|
+
const i = !!(t.label || a.default), d = !!t.iconName, c = t.overrideContainerClass && d;
|
|
1450
|
+
return i && d || c;
|
|
1451
1451
|
}), f = [
|
|
1452
1452
|
"relative",
|
|
1453
1453
|
"rounded",
|
|
@@ -1461,62 +1461,62 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1461
1461
|
"border-1",
|
|
1462
1462
|
"border-transparent",
|
|
1463
1463
|
"gap-8"
|
|
1464
|
-
],
|
|
1465
|
-
const
|
|
1464
|
+
], v = ["flex", "items-center", "justify-items-center"], x = r(() => {
|
|
1465
|
+
const i = l.value;
|
|
1466
1466
|
return {
|
|
1467
1467
|
// Height classes (explicit for PurgeCSS detection)
|
|
1468
|
-
"h-32":
|
|
1469
|
-
"h-44":
|
|
1468
|
+
"h-32": i === "backoffice",
|
|
1469
|
+
"h-44": i === "frontoffice",
|
|
1470
1470
|
// Padding classes (same for both environments)
|
|
1471
1471
|
"px-12": !0,
|
|
1472
1472
|
// Min-width classes (same for both environments)
|
|
1473
1473
|
"min-w-96": !0,
|
|
1474
|
-
...
|
|
1474
|
+
...s.value
|
|
1475
1475
|
};
|
|
1476
|
-
}),
|
|
1477
|
-
return (
|
|
1476
|
+
}), b = r(() => t.overrideContainerClass ? t.containerClass : ["truncate", "font-normal", "!text-[16px]", "!leading-[20px]", t.containerClass]);
|
|
1477
|
+
return (i, d) => (p(), z("button", {
|
|
1478
1478
|
type: "button",
|
|
1479
1479
|
disabled: e.disabled,
|
|
1480
1480
|
"aria-disabled": e.disabled ? "true" : "false",
|
|
1481
|
-
class:
|
|
1481
|
+
class: h([f, x.value])
|
|
1482
1482
|
}, [
|
|
1483
|
-
|
|
1483
|
+
y(a).before || u.value && e.iconPosition === "before" ? (p(), z("div", {
|
|
1484
1484
|
key: 0,
|
|
1485
|
-
class:
|
|
1485
|
+
class: h(v)
|
|
1486
1486
|
}, [
|
|
1487
|
-
$(
|
|
1488
|
-
e.iconName ? (p(),
|
|
1487
|
+
$(i.$slots, "before", {}, () => [
|
|
1488
|
+
e.iconName ? (p(), E(y(H), {
|
|
1489
1489
|
key: 0,
|
|
1490
1490
|
name: e.iconName,
|
|
1491
1491
|
size: "md",
|
|
1492
1492
|
variant: e.iconVariant
|
|
1493
|
-
}, null, 8, ["name", "variant"])) :
|
|
1493
|
+
}, null, 8, ["name", "variant"])) : k("", !0)
|
|
1494
1494
|
])
|
|
1495
|
-
])) :
|
|
1496
|
-
e.label ||
|
|
1495
|
+
])) : k("", !0),
|
|
1496
|
+
e.label || y(a).default ? (p(), z("div", {
|
|
1497
1497
|
key: 1,
|
|
1498
|
-
class:
|
|
1498
|
+
class: h(b.value)
|
|
1499
1499
|
}, [
|
|
1500
|
-
$(
|
|
1501
|
-
q(
|
|
1500
|
+
$(i.$slots, "default", {}, () => [
|
|
1501
|
+
j(q(e.label), 1)
|
|
1502
1502
|
])
|
|
1503
|
-
], 2)) :
|
|
1504
|
-
|
|
1503
|
+
], 2)) : k("", !0),
|
|
1504
|
+
y(a).after || u.value && e.iconPosition === "after" ? (p(), z("div", {
|
|
1505
1505
|
key: 2,
|
|
1506
|
-
class:
|
|
1506
|
+
class: h(v)
|
|
1507
1507
|
}, [
|
|
1508
|
-
$(
|
|
1509
|
-
e.iconName ? (p(),
|
|
1508
|
+
$(i.$slots, "after", {}, () => [
|
|
1509
|
+
e.iconName ? (p(), E(y(H), {
|
|
1510
1510
|
key: 0,
|
|
1511
1511
|
name: e.iconName,
|
|
1512
1512
|
size: "md",
|
|
1513
1513
|
variant: e.iconVariant
|
|
1514
|
-
}, null, 8, ["name", "variant"])) :
|
|
1514
|
+
}, null, 8, ["name", "variant"])) : k("", !0)
|
|
1515
1515
|
])
|
|
1516
|
-
])) :
|
|
1517
|
-
], 10,
|
|
1516
|
+
])) : k("", !0)
|
|
1517
|
+
], 10, ot));
|
|
1518
1518
|
}
|
|
1519
|
-
}), nt = /* @__PURE__ */
|
|
1519
|
+
}), nt = /* @__PURE__ */ T({
|
|
1520
1520
|
inheritAttrs: !1,
|
|
1521
1521
|
__name: "FzIconButton",
|
|
1522
1522
|
props: {
|
|
@@ -1533,28 +1533,28 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1533
1533
|
},
|
|
1534
1534
|
setup(e) {
|
|
1535
1535
|
const t = e;
|
|
1536
|
-
|
|
1536
|
+
N(() => t.tooltip, (l) => {
|
|
1537
1537
|
l && console.warn(
|
|
1538
1538
|
'[FzIconButton] The "tooltip" prop is deprecated and will be removed in a future version. Please use the FzTooltip component to wrap your button instead.'
|
|
1539
1539
|
);
|
|
1540
|
-
}, { immediate: !0 }),
|
|
1540
|
+
}, { immediate: !0 }), N(() => t.size, (l) => {
|
|
1541
1541
|
if (l !== void 0) {
|
|
1542
|
-
const u =
|
|
1542
|
+
const u = ee[l];
|
|
1543
1543
|
t.environment && t.environment !== u ? console.warn(
|
|
1544
1544
|
`[FzIconButton] Both "size" and "environment" props are provided. "environment=${t.environment}" will be used and "size=${l}" will be ignored. Please remove the deprecated "size" prop.`
|
|
1545
1545
|
) : console.warn(
|
|
1546
1546
|
`[FzIconButton] The "size" prop is deprecated and will be removed in a future version. Please use environment="${u}" instead of size="${l}".`
|
|
1547
1547
|
);
|
|
1548
1548
|
}
|
|
1549
|
-
}, { immediate: !0 }),
|
|
1549
|
+
}, { immediate: !0 }), N(() => t.iconSize, (l) => {
|
|
1550
1550
|
l !== void 0 && console.warn(
|
|
1551
1551
|
'[FzIconButton] The "iconSize" prop is deprecated and will be removed in a future version. Icon size has now a fixed dimension. Please remove the "iconSize" prop from your code.'
|
|
1552
1552
|
);
|
|
1553
1553
|
}, { immediate: !0 });
|
|
1554
|
-
const
|
|
1554
|
+
const a = r(() => t.environment ? t.environment : t.size ? ee[t.size] : "frontoffice"), o = r(() => {
|
|
1555
1555
|
const l = t.ariaLabel || "";
|
|
1556
1556
|
return t.hasNotification ? `${l}, hai delle notifiche` : l;
|
|
1557
|
-
}),
|
|
1557
|
+
}), s = r(() => {
|
|
1558
1558
|
const l = {
|
|
1559
1559
|
"rounded-full": !0,
|
|
1560
1560
|
"w-8": !0,
|
|
@@ -1578,13 +1578,13 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1578
1578
|
};
|
|
1579
1579
|
});
|
|
1580
1580
|
return (l, u) => (p(), z("span", {
|
|
1581
|
-
class:
|
|
1581
|
+
class: h(["fz-icon-button-wrapper", "relative", { "fz-icon-button-wrapper--backoffice": a.value === "backoffice", "fz-icon-button-wrapper--frontoffice": a.value === "frontoffice" }])
|
|
1582
1582
|
}, [
|
|
1583
|
-
|
|
1583
|
+
U(ue, ae(l.$attrs, {
|
|
1584
1584
|
disabled: t.disabled,
|
|
1585
|
-
environment:
|
|
1585
|
+
environment: a.value,
|
|
1586
1586
|
variant: t.variant,
|
|
1587
|
-
"aria-label":
|
|
1587
|
+
"aria-label": o.value,
|
|
1588
1588
|
"icon-name": t.iconName,
|
|
1589
1589
|
"icon-variant": t.iconVariant,
|
|
1590
1590
|
"icon-position": "before",
|
|
@@ -1592,17 +1592,17 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1592
1592
|
}), null, 16, ["disabled", "environment", "variant", "aria-label", "icon-name", "icon-variant"]),
|
|
1593
1593
|
t.hasNotification ? (p(), z("div", {
|
|
1594
1594
|
key: 0,
|
|
1595
|
-
class:
|
|
1595
|
+
class: h(s.value),
|
|
1596
1596
|
"aria-hidden": "true"
|
|
1597
|
-
}, null, 2)) :
|
|
1597
|
+
}, null, 2)) : k("", !0)
|
|
1598
1598
|
], 2));
|
|
1599
1599
|
}
|
|
1600
|
-
}),
|
|
1601
|
-
const
|
|
1602
|
-
for (const [
|
|
1603
|
-
o
|
|
1604
|
-
return
|
|
1605
|
-
}, ye = /* @__PURE__ */
|
|
1600
|
+
}), Y = (e, t) => {
|
|
1601
|
+
const a = e.__vccOpts || e;
|
|
1602
|
+
for (const [o, s] of t)
|
|
1603
|
+
a[o] = s;
|
|
1604
|
+
return a;
|
|
1605
|
+
}, ye = /* @__PURE__ */ Y(nt, [["__scopeId", "data-v-b4be112d"]]), lt = /* @__PURE__ */ T({
|
|
1606
1606
|
__name: "FzContainer",
|
|
1607
1607
|
props: {
|
|
1608
1608
|
main: { type: Boolean, default: !1 },
|
|
@@ -1613,18 +1613,18 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1613
1613
|
layout: {}
|
|
1614
1614
|
},
|
|
1615
1615
|
setup(e) {
|
|
1616
|
-
const t = e,
|
|
1616
|
+
const t = e, a = r(() => t.alignItems ?? (t.horizontal ? "center" : "stretch"));
|
|
1617
1617
|
if (!t.horizontal && "layout" in t) {
|
|
1618
|
-
const
|
|
1619
|
-
|
|
1620
|
-
`[FzContainer] The "layout" prop only works when horizontal is true. Current horizontal: ${t.horizontal}, layout: "${
|
|
1618
|
+
const s = t.layout;
|
|
1619
|
+
s && s !== "default" && console.error(
|
|
1620
|
+
`[FzContainer] The "layout" prop only works when horizontal is true. Current horizontal: ${t.horizontal}, layout: "${s}".`
|
|
1621
1621
|
);
|
|
1622
1622
|
}
|
|
1623
|
-
const
|
|
1624
|
-
const
|
|
1623
|
+
const o = r(() => {
|
|
1624
|
+
const s = t.main ? "main-content" : "section-content", u = [
|
|
1625
1625
|
t.horizontal ? "fz-container--horizontal" : "fz-container--vertical",
|
|
1626
|
-
`gap-${
|
|
1627
|
-
`align-items-${
|
|
1626
|
+
`gap-${s}-${t.gap}`,
|
|
1627
|
+
`align-items-${a.value}`
|
|
1628
1628
|
];
|
|
1629
1629
|
if (t.horizontal) {
|
|
1630
1630
|
const f = ("layout" in t ? t.layout : void 0) || "default";
|
|
@@ -1632,16 +1632,16 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1632
1632
|
}
|
|
1633
1633
|
return u;
|
|
1634
1634
|
});
|
|
1635
|
-
return (
|
|
1636
|
-
class:
|
|
1635
|
+
return (s, l) => (p(), E(Be(t.tag), {
|
|
1636
|
+
class: h(["fz-container", o.value])
|
|
1637
1637
|
}, {
|
|
1638
1638
|
default: F(() => [
|
|
1639
|
-
$(
|
|
1639
|
+
$(s.$slots, "default", {}, void 0, !0)
|
|
1640
1640
|
]),
|
|
1641
1641
|
_: 3
|
|
1642
1642
|
}, 8, ["class"]));
|
|
1643
1643
|
}
|
|
1644
|
-
}), pe = /* @__PURE__ */
|
|
1644
|
+
}), pe = /* @__PURE__ */ Y(lt, [["__scopeId", "data-v-8c40daeb"]]), rt = ["aria-disabled"], it = ["href", "target", "rel"], he = /* @__PURE__ */ T({
|
|
1645
1645
|
__name: "FzLink",
|
|
1646
1646
|
props: {
|
|
1647
1647
|
type: { default: "default" },
|
|
@@ -1655,7 +1655,7 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1655
1655
|
},
|
|
1656
1656
|
setup(e) {
|
|
1657
1657
|
const t = e;
|
|
1658
|
-
|
|
1658
|
+
N(
|
|
1659
1659
|
() => t.size === "xs",
|
|
1660
1660
|
(n) => {
|
|
1661
1661
|
n && console.warn(
|
|
@@ -1663,7 +1663,7 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1663
1663
|
);
|
|
1664
1664
|
},
|
|
1665
1665
|
{ immediate: !0 }
|
|
1666
|
-
),
|
|
1666
|
+
), N(
|
|
1667
1667
|
() => t.size === "lg",
|
|
1668
1668
|
(n) => {
|
|
1669
1669
|
n && console.warn(
|
|
@@ -1672,17 +1672,17 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1672
1672
|
},
|
|
1673
1673
|
{ immediate: !0 }
|
|
1674
1674
|
);
|
|
1675
|
-
const
|
|
1675
|
+
const a = r(() => t.size === "xs" ? "sm" : t.size === "lg" ? "md" : t.size), o = r(() => [
|
|
1676
1676
|
"border-1 border-transparent inline-block",
|
|
1677
1677
|
{
|
|
1678
|
-
"text-sm leading-xs":
|
|
1679
|
-
"text-base leading-base":
|
|
1678
|
+
"text-sm leading-xs": a.value === "sm",
|
|
1679
|
+
"text-base leading-base": a.value === "md",
|
|
1680
1680
|
underline: t.linkStyle === "underline"
|
|
1681
1681
|
}
|
|
1682
|
-
]),
|
|
1683
|
-
const n = [...
|
|
1682
|
+
]), s = (n) => n.type === "default" && n.linkStyle === "underline", l = (n) => n.type === "default" && n.linkStyle !== "underline", u = (n) => n.type === "danger" && n.linkStyle === "underline", f = (n) => n.type === "danger" && n.linkStyle !== "underline", v = (n) => n.type === "default" && n.disabled, x = (n) => n.type === "danger" && n.disabled, b = r(() => {
|
|
1683
|
+
const n = [...o.value, "focus:outline-none", "focus:border-solid", "focus:no-underline"];
|
|
1684
1684
|
switch (!0) {
|
|
1685
|
-
case
|
|
1685
|
+
case s(t):
|
|
1686
1686
|
n.push("text-blue-500", "hover:text-blue-600", "focus:text-blue-600", "focus:border-blue-600");
|
|
1687
1687
|
break;
|
|
1688
1688
|
case l(t):
|
|
@@ -1696,10 +1696,10 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1696
1696
|
break;
|
|
1697
1697
|
}
|
|
1698
1698
|
return n;
|
|
1699
|
-
}),
|
|
1700
|
-
const n = [...
|
|
1699
|
+
}), i = r(() => {
|
|
1700
|
+
const n = [...o.value, "cursor-not-allowed"];
|
|
1701
1701
|
switch (!0) {
|
|
1702
|
-
case
|
|
1702
|
+
case v(t):
|
|
1703
1703
|
n.push("text-blue-200");
|
|
1704
1704
|
break;
|
|
1705
1705
|
case x(t):
|
|
@@ -1707,15 +1707,15 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1707
1707
|
break;
|
|
1708
1708
|
}
|
|
1709
1709
|
return n;
|
|
1710
|
-
}), d =
|
|
1710
|
+
}), d = r(() => t.external ? t.to : ""), c = r(() => {
|
|
1711
1711
|
if (t.external && t.target === "_blank")
|
|
1712
1712
|
return "noopener noreferrer";
|
|
1713
1713
|
});
|
|
1714
|
-
return (n,
|
|
1715
|
-
const
|
|
1714
|
+
return (n, m) => {
|
|
1715
|
+
const g = Ee("router-link");
|
|
1716
1716
|
return e.disabled ? (p(), z("span", {
|
|
1717
1717
|
key: 0,
|
|
1718
|
-
class:
|
|
1718
|
+
class: h(i.value),
|
|
1719
1719
|
"aria-disabled": e.disabled ? "true" : "false",
|
|
1720
1720
|
role: "link",
|
|
1721
1721
|
"aria-label": "Link disabled"
|
|
@@ -1724,16 +1724,16 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1724
1724
|
], 10, rt)) : e.external ? (p(), z("a", {
|
|
1725
1725
|
key: 1,
|
|
1726
1726
|
href: d.value,
|
|
1727
|
-
class:
|
|
1727
|
+
class: h(b.value),
|
|
1728
1728
|
target: e.target,
|
|
1729
1729
|
rel: c.value
|
|
1730
1730
|
}, [
|
|
1731
1731
|
$(n.$slots, "default")
|
|
1732
|
-
], 10, it)) : (p(),
|
|
1732
|
+
], 10, it)) : (p(), E(g, {
|
|
1733
1733
|
key: 2,
|
|
1734
1734
|
to: e.to,
|
|
1735
1735
|
replace: e.replace,
|
|
1736
|
-
class:
|
|
1736
|
+
class: h(b.value),
|
|
1737
1737
|
target: e.target
|
|
1738
1738
|
}, {
|
|
1739
1739
|
default: F(() => [
|
|
@@ -1743,7 +1743,7 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1743
1743
|
}, 8, ["to", "replace", "class", "target"]));
|
|
1744
1744
|
};
|
|
1745
1745
|
}
|
|
1746
|
-
}), st = ["aria-label", "aria-describedby", "tabindex"], ut = ["aria-hidden"], ct = 100, dt = "text-core-white max-w-[200px] p-8 text-sm leading-[16px] flex flex-row items-start justify-center", ft = /* @__PURE__ */
|
|
1746
|
+
}), st = ["aria-label", "aria-describedby", "tabindex"], ut = ["aria-hidden"], ct = 100, dt = "text-core-white max-w-[200px] p-8 text-sm leading-[16px] flex flex-row items-start justify-center", ft = /* @__PURE__ */ T({
|
|
1747
1747
|
__name: "FzTooltip",
|
|
1748
1748
|
props: {
|
|
1749
1749
|
position: { default: "auto" },
|
|
@@ -1755,116 +1755,116 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1755
1755
|
_forceOpenForDesignReview: { type: Boolean, default: !1 }
|
|
1756
1756
|
},
|
|
1757
1757
|
setup(e) {
|
|
1758
|
-
const t = e,
|
|
1759
|
-
function
|
|
1760
|
-
const
|
|
1761
|
-
return
|
|
1758
|
+
const t = e, a = Z(), o = [ue, ye, he];
|
|
1759
|
+
function s(C) {
|
|
1760
|
+
const V = C.type;
|
|
1761
|
+
return o.includes(V);
|
|
1762
1762
|
}
|
|
1763
|
-
function l(
|
|
1764
|
-
if (
|
|
1763
|
+
function l(C) {
|
|
1764
|
+
if (s(C))
|
|
1765
1765
|
return !0;
|
|
1766
|
-
if (typeof
|
|
1767
|
-
const
|
|
1768
|
-
if (Array.isArray(
|
|
1769
|
-
return
|
|
1766
|
+
if (typeof C.type == "symbol") {
|
|
1767
|
+
const V = C.children;
|
|
1768
|
+
if (Array.isArray(V))
|
|
1769
|
+
return V.some((K) => typeof K == "object" && K !== null && "type" in K ? l(K) : !1);
|
|
1770
1770
|
}
|
|
1771
1771
|
return !1;
|
|
1772
1772
|
}
|
|
1773
|
-
const u =
|
|
1774
|
-
if (!
|
|
1775
|
-
const
|
|
1776
|
-
return
|
|
1773
|
+
const u = r(() => {
|
|
1774
|
+
if (!a.default) return !1;
|
|
1775
|
+
const C = a.default();
|
|
1776
|
+
return C.length === 0 ? !1 : C.some((V) => l(V));
|
|
1777
1777
|
}), f = {
|
|
1778
1778
|
neutral: { icon: "", bgClass: "!bg-core-black" },
|
|
1779
1779
|
informative: { icon: "circle-info", bgClass: "bg-semantic-info-200" },
|
|
1780
1780
|
alert: { icon: "triangle-exclamation", bgClass: "bg-semantic-warning-200" },
|
|
1781
1781
|
error: { icon: "circle-exclamation", bgClass: "bg-semantic-error-200" },
|
|
1782
1782
|
positive: { icon: "circle-check", bgClass: "bg-semantic-success-200" }
|
|
1783
|
-
},
|
|
1784
|
-
var
|
|
1785
|
-
return ((
|
|
1786
|
-
}), x =
|
|
1787
|
-
var
|
|
1788
|
-
const
|
|
1789
|
-
return
|
|
1790
|
-
}),
|
|
1791
|
-
function
|
|
1792
|
-
(t.text ||
|
|
1783
|
+
}, v = r(() => {
|
|
1784
|
+
var C;
|
|
1785
|
+
return ((C = f[t.status]) == null ? void 0 : C.icon) || "";
|
|
1786
|
+
}), x = r(() => {
|
|
1787
|
+
var V;
|
|
1788
|
+
const C = (V = f[t.status]) == null ? void 0 : V.bgClass;
|
|
1789
|
+
return C ? { [C]: !0 } : {};
|
|
1790
|
+
}), b = `tooltip-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`, i = A(!1), d = A(!1), c = A(!1), n = A(null), m = r(() => t.withIcon && t.status !== "neutral"), g = r(() => i.value ? b : void 0), I = r(() => typeof t.interactive == "boolean" ? t.interactive ? void 0 : 0 : u.value ? void 0 : 0);
|
|
1791
|
+
function S() {
|
|
1792
|
+
(t.text || a.text) && (i.value = !0);
|
|
1793
1793
|
}
|
|
1794
1794
|
function O() {
|
|
1795
|
-
t._forceOpenForDesignReview || (
|
|
1795
|
+
t._forceOpenForDesignReview || (i.value = !1);
|
|
1796
1796
|
}
|
|
1797
|
-
function
|
|
1798
|
-
n.value && (clearTimeout(n.value), n.value = null),
|
|
1797
|
+
function D() {
|
|
1798
|
+
n.value && (clearTimeout(n.value), n.value = null), S();
|
|
1799
1799
|
}
|
|
1800
|
-
function
|
|
1800
|
+
function P() {
|
|
1801
1801
|
n.value && (clearTimeout(n.value), n.value = null), n.value = setTimeout(() => {
|
|
1802
1802
|
!d.value && !c.value && O();
|
|
1803
1803
|
}, ct);
|
|
1804
1804
|
}
|
|
1805
|
-
function
|
|
1805
|
+
function M() {
|
|
1806
1806
|
d.value = !0, n.value && (clearTimeout(n.value), n.value = null);
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1808
|
+
function R() {
|
|
1809
1809
|
d.value = !1, n.value && (clearTimeout(n.value), n.value = null), c.value || O();
|
|
1810
1810
|
}
|
|
1811
1811
|
function w() {
|
|
1812
|
-
c.value = !0,
|
|
1812
|
+
c.value = !0, S();
|
|
1813
1813
|
}
|
|
1814
|
-
function
|
|
1814
|
+
function L() {
|
|
1815
1815
|
c.value = !1, n.value && (clearTimeout(n.value), n.value = null), d.value || O();
|
|
1816
1816
|
}
|
|
1817
|
-
function
|
|
1818
|
-
|
|
1817
|
+
function W(C) {
|
|
1818
|
+
C.key === "Escape" && O();
|
|
1819
1819
|
}
|
|
1820
|
-
return
|
|
1821
|
-
t._forceOpenForDesignReview &&
|
|
1822
|
-
}),
|
|
1823
|
-
|
|
1820
|
+
return te(() => {
|
|
1821
|
+
t._forceOpenForDesignReview && S();
|
|
1822
|
+
}), N(() => t._forceOpenForDesignReview, (C) => {
|
|
1823
|
+
C ? S() : O();
|
|
1824
1824
|
}), le(() => {
|
|
1825
1825
|
n.value && clearTimeout(n.value);
|
|
1826
|
-
}), (
|
|
1826
|
+
}), (C, V) => (p(), E(y(at), {
|
|
1827
1827
|
teleport: !0,
|
|
1828
|
-
"is-open":
|
|
1828
|
+
"is-open": i.value,
|
|
1829
1829
|
position: e.position,
|
|
1830
1830
|
class: "fz__tooltip flex h-max",
|
|
1831
1831
|
contentClass: ["rounded", x.value, "z-80"]
|
|
1832
1832
|
}, {
|
|
1833
1833
|
opener: F(() => [
|
|
1834
|
-
|
|
1834
|
+
B("span", {
|
|
1835
1835
|
"aria-label": t.ariaLabel,
|
|
1836
|
-
"aria-describedby":
|
|
1837
|
-
tabindex:
|
|
1838
|
-
onMouseover:
|
|
1839
|
-
onMouseleave:
|
|
1836
|
+
"aria-describedby": g.value,
|
|
1837
|
+
tabindex: I.value,
|
|
1838
|
+
onMouseover: D,
|
|
1839
|
+
onMouseleave: P,
|
|
1840
1840
|
onFocusin: w,
|
|
1841
|
-
onFocusout:
|
|
1842
|
-
onKeydown:
|
|
1841
|
+
onFocusout: L,
|
|
1842
|
+
onKeydown: W
|
|
1843
1843
|
}, [
|
|
1844
|
-
$(
|
|
1844
|
+
$(C.$slots, "default", {}, void 0, !0)
|
|
1845
1845
|
], 40, st)
|
|
1846
1846
|
]),
|
|
1847
1847
|
default: F(() => [
|
|
1848
|
-
|
|
1849
|
-
id:
|
|
1850
|
-
class:
|
|
1848
|
+
B("div", {
|
|
1849
|
+
id: b,
|
|
1850
|
+
class: h(dt),
|
|
1851
1851
|
role: "tooltip",
|
|
1852
|
-
"aria-hidden": !
|
|
1853
|
-
onMouseenter:
|
|
1854
|
-
onMouseleave:
|
|
1852
|
+
"aria-hidden": !i.value,
|
|
1853
|
+
onMouseenter: M,
|
|
1854
|
+
onMouseleave: R
|
|
1855
1855
|
}, [
|
|
1856
|
-
|
|
1856
|
+
m.value ? (p(), E(y(H), {
|
|
1857
1857
|
key: 0,
|
|
1858
1858
|
size: "md",
|
|
1859
|
-
name:
|
|
1860
|
-
class:
|
|
1859
|
+
name: v.value,
|
|
1860
|
+
class: h(["mr-4", "!w-[16px]", "!h-[16px]", "grow-0", "shrink-0", { "text-core-black": t.status === "alert" }]),
|
|
1861
1861
|
"aria-hidden": !0
|
|
1862
|
-
}, null, 8, ["name", "class"])) :
|
|
1863
|
-
|
|
1864
|
-
class:
|
|
1862
|
+
}, null, 8, ["name", "class"])) : k("", !0),
|
|
1863
|
+
B("span", {
|
|
1864
|
+
class: h(["basis-0 grow shrink-0 break-normal fz__tooltip__text", { "text-core-black": t.status === "alert" }])
|
|
1865
1865
|
}, [
|
|
1866
|
-
$(
|
|
1867
|
-
q(
|
|
1866
|
+
$(C.$slots, "text", {}, () => [
|
|
1867
|
+
j(q(t.text), 1)
|
|
1868
1868
|
], !0)
|
|
1869
1869
|
], 2)
|
|
1870
1870
|
], 40, ut)
|
|
@@ -1872,10 +1872,10 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1872
1872
|
_: 3
|
|
1873
1873
|
}, 8, ["is-open", "position", "contentClass"]));
|
|
1874
1874
|
}
|
|
1875
|
-
}), xe = /* @__PURE__ */
|
|
1875
|
+
}), xe = /* @__PURE__ */ Y(ft, [["__scopeId", "data-v-94597a6c"]]), pt = { class: "flex flex-col flex-1" }, vt = {
|
|
1876
1876
|
key: 0,
|
|
1877
1877
|
class: "leading-[20px]"
|
|
1878
|
-
}, mt = /* @__PURE__ */
|
|
1878
|
+
}, mt = /* @__PURE__ */ T({
|
|
1879
1879
|
__name: "FzAlert",
|
|
1880
1880
|
props: {
|
|
1881
1881
|
tone: {},
|
|
@@ -1897,145 +1897,152 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
1897
1897
|
},
|
|
1898
1898
|
emits: ["fzAlert:click", "fzAlert:dismiss"],
|
|
1899
1899
|
setup(e, { emit: t }) {
|
|
1900
|
-
const
|
|
1900
|
+
const a = e, o = t, s = Z(), l = A(a.defaultOpen), u = {
|
|
1901
1901
|
info: "bg-semantic-info-50 border-semantic-info",
|
|
1902
1902
|
error: "bg-semantic-error-50 border-semantic-error",
|
|
1903
1903
|
danger: "bg-semantic-error-50 border-semantic-error",
|
|
1904
1904
|
warning: "bg-semantic-warning-50 border-semantic-warning",
|
|
1905
1905
|
success: "bg-semantic-success-50 border-semantic-success"
|
|
1906
|
-
},
|
|
1906
|
+
}, f = {
|
|
1907
1907
|
sm: "backoffice",
|
|
1908
1908
|
md: "frontoffice",
|
|
1909
1909
|
lg: "frontoffice"
|
|
1910
|
-
},
|
|
1910
|
+
}, v = r(() => R.value === "text"), x = r(() => [
|
|
1911
1911
|
"flex select-none gap-12 rounded justify-between",
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
...
|
|
1915
|
-
]),
|
|
1912
|
+
...v.value ? ["bg-transparent"] : [u[a.tone]],
|
|
1913
|
+
...!v.value && M.value === "backoffice" ? ["p-6"] : [],
|
|
1914
|
+
...R.value === "accordion" ? ["cursor-pointer"] : []
|
|
1915
|
+
]), b = r(
|
|
1916
1916
|
() => ({
|
|
1917
1917
|
info: "circle-info",
|
|
1918
1918
|
error: "circle-xmark",
|
|
1919
1919
|
danger: "triangle-exclamation",
|
|
1920
1920
|
warning: "triangle-exclamation",
|
|
1921
1921
|
success: "circle-check"
|
|
1922
|
-
})[
|
|
1923
|
-
),
|
|
1922
|
+
})[a.tone]
|
|
1923
|
+
), i = r(() => [
|
|
1924
1924
|
{
|
|
1925
1925
|
info: "text-semantic-info",
|
|
1926
1926
|
error: "text-semantic-error",
|
|
1927
1927
|
danger: "text-semantic-error",
|
|
1928
1928
|
warning: "text-semantic-warning",
|
|
1929
1929
|
success: "text-semantic-success"
|
|
1930
|
-
}[
|
|
1931
|
-
]),
|
|
1930
|
+
}[a.tone]
|
|
1931
|
+
]), d = r(
|
|
1932
|
+
() => v.value && M.value === "backoffice" ? "sm" : "md"
|
|
1933
|
+
), c = r(
|
|
1934
|
+
() => v.value ? "" : M.value === "backoffice" ? "p-6" : "p-12"
|
|
1935
|
+
), n = r(() => v.value ? "xs" : "sm"), m = r(() => v.value || !(a.showButtonAction || a.showLinkAction || !!s.action) ? !1 : R.value === "background" ? !0 : l.value), g = r(() => [
|
|
1932
1936
|
"font-normal",
|
|
1933
1937
|
"!leading-[20px]",
|
|
1934
1938
|
{
|
|
1935
|
-
"mt-8":
|
|
1936
|
-
"mb-16":
|
|
1939
|
+
"mt-8": a.title && !v.value,
|
|
1940
|
+
"mb-16": m.value && !v.value
|
|
1937
1941
|
}
|
|
1938
|
-
]),
|
|
1939
|
-
if (
|
|
1940
|
-
if (
|
|
1941
|
-
}),
|
|
1942
|
-
function
|
|
1943
|
-
|
|
1942
|
+
]), I = r(() => l.value ? "angle-up" : "angle-down"), S = r(() => {
|
|
1943
|
+
if (R.value === "accordion") return I.value;
|
|
1944
|
+
if (a.isDismissible) return "xmark";
|
|
1945
|
+
}), O = r(() => v.value || R.value === "background" ? !0 : R.value === "accordion" ? l.value : !0), D = r(() => O.value && !!s.default);
|
|
1946
|
+
function P(C) {
|
|
1947
|
+
C.stopPropagation(), o("fzAlert:click");
|
|
1944
1948
|
}
|
|
1945
|
-
const
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
+
const M = r(() => a.size ? f[a.size] : a.environment), R = r(() => a.variant ? a.variant : ["default", "simple"].includes(a.alertStyle) ? "background" : "accordion"), w = r(
|
|
1950
|
+
() => !v.value && (R.value === "accordion" || a.isDismissible)
|
|
1951
|
+
), L = () => {
|
|
1952
|
+
R.value === "accordion" && (l.value = !l.value), a.isDismissible && o("fzAlert:dismiss");
|
|
1953
|
+
}, W = () => {
|
|
1954
|
+
!v.value && R.value === "accordion" && (l.value = !l.value);
|
|
1949
1955
|
};
|
|
1950
|
-
return (
|
|
1951
|
-
const
|
|
1956
|
+
return (C, V) => {
|
|
1957
|
+
const K = Ie("bold");
|
|
1952
1958
|
return p(), z("div", {
|
|
1953
|
-
class:
|
|
1954
|
-
onClick:
|
|
1959
|
+
class: h(x.value),
|
|
1960
|
+
onClick: W
|
|
1955
1961
|
}, [
|
|
1956
|
-
|
|
1962
|
+
U(y(pe), {
|
|
1957
1963
|
horizontal: "",
|
|
1958
|
-
gap:
|
|
1959
|
-
class:
|
|
1964
|
+
gap: n.value,
|
|
1965
|
+
class: h(["flex-1", c.value]),
|
|
1960
1966
|
alignItems: "start"
|
|
1961
1967
|
}, {
|
|
1962
1968
|
default: F(() => [
|
|
1963
|
-
|
|
1964
|
-
name:
|
|
1965
|
-
size:
|
|
1966
|
-
class:
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1969
|
+
U(y(H), {
|
|
1970
|
+
name: b.value,
|
|
1971
|
+
size: d.value,
|
|
1972
|
+
class: h(i.value),
|
|
1973
|
+
"aria-hidden": "true"
|
|
1974
|
+
}, null, 8, ["name", "size", "class"]),
|
|
1975
|
+
B("div", pt, [
|
|
1976
|
+
e.title && !v.value ? _((p(), z("p", vt, [
|
|
1977
|
+
j(q(e.title), 1)
|
|
1971
1978
|
])), [
|
|
1972
|
-
[
|
|
1973
|
-
]) :
|
|
1974
|
-
|
|
1979
|
+
[K]
|
|
1980
|
+
]) : k("", !0),
|
|
1981
|
+
D.value ? (p(), z("p", {
|
|
1975
1982
|
key: 1,
|
|
1976
|
-
class:
|
|
1983
|
+
class: h(g.value)
|
|
1977
1984
|
}, [
|
|
1978
|
-
$(
|
|
1979
|
-
], 2)) :
|
|
1980
|
-
|
|
1981
|
-
|
|
1985
|
+
$(C.$slots, "default", {}, void 0, !0)
|
|
1986
|
+
], 2)) : k("", !0),
|
|
1987
|
+
m.value ? $(C.$slots, "action", { key: 2 }, () => [
|
|
1988
|
+
U(y(pe), {
|
|
1982
1989
|
horizontal: "",
|
|
1983
1990
|
gap: "sm"
|
|
1984
1991
|
}, {
|
|
1985
1992
|
default: F(() => [
|
|
1986
|
-
e.showButtonAction ? (p(),
|
|
1993
|
+
e.showButtonAction ? (p(), E(y(ue), {
|
|
1987
1994
|
key: 0,
|
|
1988
|
-
onClick:
|
|
1995
|
+
onClick: P,
|
|
1989
1996
|
tooltip: e.buttonActionTooltip,
|
|
1990
|
-
environment:
|
|
1997
|
+
environment: M.value,
|
|
1991
1998
|
variant: "secondary"
|
|
1992
1999
|
}, {
|
|
1993
2000
|
default: F(() => [
|
|
1994
|
-
q(
|
|
2001
|
+
j(q(e.buttonActionLabel), 1)
|
|
1995
2002
|
]),
|
|
1996
2003
|
_: 1
|
|
1997
|
-
}, 8, ["tooltip", "environment"])) :
|
|
1998
|
-
e.showLinkAction ? (p(),
|
|
2004
|
+
}, 8, ["tooltip", "environment"])) : k("", !0),
|
|
2005
|
+
e.showLinkAction ? (p(), E(y(he), {
|
|
1999
2006
|
key: 1,
|
|
2000
2007
|
to: e.linkActionLocation,
|
|
2001
|
-
onClick:
|
|
2008
|
+
onClick: P,
|
|
2002
2009
|
size: "md",
|
|
2003
2010
|
target: e.linkActionTarget,
|
|
2004
2011
|
external: e.linkActionExternal
|
|
2005
2012
|
}, {
|
|
2006
2013
|
default: F(() => [
|
|
2007
|
-
q(
|
|
2014
|
+
j(q(e.linkActionLabel), 1)
|
|
2008
2015
|
]),
|
|
2009
2016
|
_: 1
|
|
2010
|
-
}, 8, ["to", "target", "external"])) :
|
|
2017
|
+
}, 8, ["to", "target", "external"])) : k("", !0)
|
|
2011
2018
|
]),
|
|
2012
2019
|
_: 1
|
|
2013
2020
|
})
|
|
2014
|
-
], !0) :
|
|
2021
|
+
], !0) : k("", !0)
|
|
2015
2022
|
])
|
|
2016
2023
|
]),
|
|
2017
2024
|
_: 3
|
|
2018
|
-
}, 8, ["class"]),
|
|
2019
|
-
|
|
2025
|
+
}, 8, ["gap", "class"]),
|
|
2026
|
+
w.value ? (p(), E(y(ye), {
|
|
2020
2027
|
key: 0,
|
|
2021
|
-
iconName:
|
|
2022
|
-
environment:
|
|
2028
|
+
iconName: S.value,
|
|
2029
|
+
environment: M.value,
|
|
2023
2030
|
variant: "invisible",
|
|
2024
|
-
onClick: Oe(
|
|
2025
|
-
}, null, 8, ["iconName", "environment"])) :
|
|
2031
|
+
onClick: Oe(L, ["stop"])
|
|
2032
|
+
}, null, 8, ["iconName", "environment"])) : k("", !0)
|
|
2026
2033
|
], 2);
|
|
2027
2034
|
};
|
|
2028
2035
|
}
|
|
2029
|
-
}), bt = /* @__PURE__ */
|
|
2036
|
+
}), bt = /* @__PURE__ */ Y(mt, [["__scopeId", "data-v-3d1f9d4e"]]), ge = /* @__PURE__ */ T({
|
|
2030
2037
|
__name: "ErrorAlert",
|
|
2031
2038
|
props: {
|
|
2032
2039
|
id: {}
|
|
2033
2040
|
},
|
|
2034
2041
|
setup(e) {
|
|
2035
|
-
return (t,
|
|
2042
|
+
return (t, a) => (p(), E(y(bt), {
|
|
2036
2043
|
id: e.id,
|
|
2037
2044
|
tone: "error",
|
|
2038
|
-
|
|
2045
|
+
variant: "text",
|
|
2039
2046
|
role: "alert",
|
|
2040
2047
|
"aria-live": "assertive",
|
|
2041
2048
|
"aria-atomic": "true",
|
|
@@ -2059,9 +2066,9 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
2059
2066
|
peer-focus:[&_div]:after:right-0
|
|
2060
2067
|
peer-focus:[&_div]:after:bottom-0
|
|
2061
2068
|
peer-focus:[&_div]:after:absolute
|
|
2062
|
-
`, kt = "relative", zt = /* @__PURE__ */
|
|
2069
|
+
`, kt = "relative", zt = /* @__PURE__ */ T({
|
|
2063
2070
|
__name: "FzCheckbox",
|
|
2064
|
-
props: /* @__PURE__ */
|
|
2071
|
+
props: /* @__PURE__ */ J({
|
|
2065
2072
|
label: {},
|
|
2066
2073
|
value: { type: [String, Number, Boolean] },
|
|
2067
2074
|
size: {},
|
|
@@ -2078,86 +2085,86 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
2078
2085
|
modelValue: { type: [null, Boolean, Array], required: !0 },
|
|
2079
2086
|
modelModifiers: {}
|
|
2080
2087
|
}),
|
|
2081
|
-
emits: /* @__PURE__ */
|
|
2088
|
+
emits: /* @__PURE__ */ J(["change"], ["update:modelValue"]),
|
|
2082
2089
|
setup(e, { emit: t }) {
|
|
2083
|
-
const
|
|
2084
|
-
|
|
2085
|
-
() =>
|
|
2086
|
-
(
|
|
2087
|
-
|
|
2090
|
+
const a = e;
|
|
2091
|
+
N(
|
|
2092
|
+
() => a.size,
|
|
2093
|
+
(I) => {
|
|
2094
|
+
I !== void 0 && console.warn(
|
|
2088
2095
|
'[FzCheckbox] The "size" prop is deprecated and will be removed in a future version. Checkboxes now have a fixed size.'
|
|
2089
2096
|
);
|
|
2090
2097
|
},
|
|
2091
2098
|
{ immediate: !0 }
|
|
2092
2099
|
);
|
|
2093
|
-
const
|
|
2100
|
+
const o = Object.freeze({
|
|
2094
2101
|
/** Icon for indeterminate state (partial selection) */
|
|
2095
2102
|
INDETERMINATE: "square-minus",
|
|
2096
2103
|
/** Icon for checked state */
|
|
2097
2104
|
CHECKED: "square-check",
|
|
2098
2105
|
/** Icon for unchecked state */
|
|
2099
2106
|
UNCHECKED: "square"
|
|
2100
|
-
}),
|
|
2107
|
+
}), s = Object.freeze({
|
|
2101
2108
|
/** Solid variant (filled) - used for checked and indeterminate states */
|
|
2102
2109
|
SOLID: "fas",
|
|
2103
2110
|
/** Regular variant (outline) - used for unchecked state */
|
|
2104
2111
|
REGULAR: "far"
|
|
2105
|
-
}), l =
|
|
2106
|
-
() =>
|
|
2107
|
-
), u =
|
|
2112
|
+
}), l = r(
|
|
2113
|
+
() => a.value ?? a.label
|
|
2114
|
+
), u = a.checkboxId || ie(), f = oe(e, "modelValue"), v = t, x = Re(null), b = r(() => f.value == null ? !1 : typeof f.value == "boolean" ? f.value : f.value.includes(l.value)), i = r(() => a.disabled ? "text-grey-300 [&_div]:text-grey-300" : a.error ? "text-semantic-error-200 [&_div]:text-semantic-error-200 peer-checked:[&_div]:text-semantic-error-200 peer-indeterminate:[&_div]:text-semantic-error-200" : a.emphasis ? "text-core-black [&_div]:text-blue-500 peer-checked:[&_div]:text-blue-500 peer-indeterminate:[&_div]:text-blue-500" : "text-core-black peer-checked:[&_div]:text-grey-500 peer-indeterminate:[&_div]:text-grey-500"), d = r(() => a.disabled ? "text-grey-300" : a.error ? "text-semantic-error-200" : a.emphasis ? "text-blue-500" : "text-grey-400"), c = r(() => [
|
|
2108
2115
|
"text-base",
|
|
2109
|
-
|
|
2110
|
-
]), n =
|
|
2111
|
-
return
|
|
2112
|
-
var
|
|
2113
|
-
f.value != null && (typeof f.value == "boolean" ? f.value && ((
|
|
2114
|
-
}), (
|
|
2115
|
-
|
|
2116
|
+
i.value
|
|
2117
|
+
]), n = r(() => [d.value]), m = r(() => a.indeterminate ? o.INDETERMINATE : b.value ? o.CHECKED : o.UNCHECKED), g = r(() => a.indeterminate || b.value ? s.SOLID : s.REGULAR);
|
|
2118
|
+
return te(() => {
|
|
2119
|
+
var I, S;
|
|
2120
|
+
f.value != null && (typeof f.value == "boolean" ? f.value && ((I = x.value) == null || I.dispatchEvent(new Event("change"))) : f.value.includes(l.value) && ((S = x.value) == null || S.dispatchEvent(new Event("change"))));
|
|
2121
|
+
}), (I, S) => (p(), z("div", yt, [
|
|
2122
|
+
B("div", {
|
|
2116
2123
|
class: "flex items-start group",
|
|
2117
2124
|
"data-emphasis": e.emphasis || void 0,
|
|
2118
2125
|
"data-error": e.error || void 0,
|
|
2119
2126
|
"data-disabled": e.disabled || void 0
|
|
2120
2127
|
}, [
|
|
2121
|
-
|
|
2128
|
+
_(B("input", {
|
|
2122
2129
|
type: "checkbox",
|
|
2123
|
-
id:
|
|
2130
|
+
id: y(u),
|
|
2124
2131
|
disabled: e.disabled,
|
|
2125
|
-
class:
|
|
2132
|
+
class: h(wt),
|
|
2126
2133
|
required: e.required,
|
|
2127
2134
|
value: e.value,
|
|
2128
|
-
onChange:
|
|
2129
|
-
"onUpdate:modelValue":
|
|
2130
|
-
"aria-checked": e.indeterminate ? "mixed" :
|
|
2135
|
+
onChange: S[0] || (S[0] = (O) => v("change", O)),
|
|
2136
|
+
"onUpdate:modelValue": S[1] || (S[1] = (O) => f.value = O),
|
|
2137
|
+
"aria-checked": e.indeterminate ? "mixed" : b.value,
|
|
2131
2138
|
"aria-label": e.standalone ? e.label : void 0,
|
|
2132
2139
|
"aria-required": e.required ? "true" : "false",
|
|
2133
2140
|
"aria-invalid": e.error ? "true" : "false",
|
|
2134
|
-
"aria-describedby": e.error &&
|
|
2135
|
-
"aria-labelledby": e.standalone ? void 0 : `${
|
|
2136
|
-
"aria-owns":
|
|
2141
|
+
"aria-describedby": e.error && I.$slots.error ? `${y(u)}-error` : void 0,
|
|
2142
|
+
"aria-labelledby": e.standalone ? void 0 : `${y(u)}-label`,
|
|
2143
|
+
"aria-owns": a.ariaOwns,
|
|
2137
2144
|
ref_key: "refCheckbox",
|
|
2138
2145
|
ref: x
|
|
2139
2146
|
}, null, 40, xt), [
|
|
2140
|
-
[
|
|
2147
|
+
[Ae, f.value]
|
|
2141
2148
|
]),
|
|
2142
|
-
|
|
2143
|
-
id: `${
|
|
2144
|
-
for:
|
|
2145
|
-
class:
|
|
2149
|
+
B("label", {
|
|
2150
|
+
id: `${y(u)}-label`,
|
|
2151
|
+
for: y(u),
|
|
2152
|
+
class: h([Ct, c.value])
|
|
2146
2153
|
}, [
|
|
2147
|
-
|
|
2148
|
-
name:
|
|
2154
|
+
U(y(H), {
|
|
2155
|
+
name: m.value,
|
|
2149
2156
|
size: "md",
|
|
2150
|
-
class:
|
|
2151
|
-
variant:
|
|
2157
|
+
class: h([kt, n.value]),
|
|
2158
|
+
variant: g.value,
|
|
2152
2159
|
"aria-hidden": "true"
|
|
2153
2160
|
}, null, 8, ["name", "class", "variant"]),
|
|
2154
|
-
e.standalone ?
|
|
2155
|
-
q(
|
|
2161
|
+
e.standalone ? k("", !0) : (p(), z(re, { key: 0 }, [
|
|
2162
|
+
j(q(e.label), 1)
|
|
2156
2163
|
], 64))
|
|
2157
2164
|
], 10, gt),
|
|
2158
|
-
e.tooltip ? (p(),
|
|
2165
|
+
e.tooltip ? (p(), E(y(xe), ae({ key: 0 }, e.tooltip, { class: "ml-6" }), {
|
|
2159
2166
|
default: F(() => [
|
|
2160
|
-
|
|
2167
|
+
U(y(H), {
|
|
2161
2168
|
name: "info-circle",
|
|
2162
2169
|
size: "md",
|
|
2163
2170
|
class: "text-semantic-info",
|
|
@@ -2166,23 +2173,23 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
2166
2173
|
})
|
|
2167
2174
|
]),
|
|
2168
2175
|
_: 1
|
|
2169
|
-
}, 16)) :
|
|
2176
|
+
}, 16)) : k("", !0)
|
|
2170
2177
|
], 8, ht),
|
|
2171
|
-
e.error &&
|
|
2178
|
+
e.error && I.$slots.error ? (p(), E(ge, {
|
|
2172
2179
|
key: 0,
|
|
2173
|
-
id: `${
|
|
2180
|
+
id: `${y(u)}-error`
|
|
2174
2181
|
}, {
|
|
2175
2182
|
default: F(() => [
|
|
2176
|
-
$(
|
|
2183
|
+
$(I.$slots, "error", {}, void 0, !0)
|
|
2177
2184
|
]),
|
|
2178
2185
|
_: 3
|
|
2179
|
-
}, 8, ["id"])) :
|
|
2180
|
-
$(
|
|
2186
|
+
}, 8, ["id"])) : k("", !0),
|
|
2187
|
+
$(I.$slots, "children", {}, void 0, !0)
|
|
2181
2188
|
]));
|
|
2182
2189
|
}
|
|
2183
|
-
}), ve = /* @__PURE__ */
|
|
2190
|
+
}), ve = /* @__PURE__ */ Y(zt, [["__scopeId", "data-v-2b198cc9"]]), we = Symbol("FzCheckboxCheckedSet"), $t = "flex flex-col justify-center gap-8 pl-24", St = /* @__PURE__ */ T({
|
|
2184
2191
|
__name: "FzCheckboxGroupOption",
|
|
2185
|
-
props: /* @__PURE__ */
|
|
2192
|
+
props: /* @__PURE__ */ J({
|
|
2186
2193
|
label: {},
|
|
2187
2194
|
value: { type: [String, Number, Boolean] },
|
|
2188
2195
|
indeterminate: { type: Boolean },
|
|
@@ -2204,42 +2211,42 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
2204
2211
|
}),
|
|
2205
2212
|
emits: ["update:modelValue"],
|
|
2206
2213
|
setup(e) {
|
|
2207
|
-
const t = e,
|
|
2214
|
+
const t = e, a = r(
|
|
2208
2215
|
() => t.value ?? t.label
|
|
2209
|
-
),
|
|
2216
|
+
), o = oe(e, "modelValue"), s = ie(), l = r(
|
|
2210
2217
|
() => {
|
|
2211
|
-
var
|
|
2212
|
-
return (
|
|
2218
|
+
var b;
|
|
2219
|
+
return (b = t.children) == null ? void 0 : b.map((i, d) => `${s}-child-${d}`).join(" ");
|
|
2213
2220
|
}
|
|
2214
|
-
), u =
|
|
2221
|
+
), u = r(() => []), f = r(() => {
|
|
2215
2222
|
if (!t.children) return !1;
|
|
2216
|
-
const
|
|
2217
|
-
(
|
|
2223
|
+
const b = t.children.filter(
|
|
2224
|
+
(i) => o.value.includes(i.value ?? i.label)
|
|
2218
2225
|
).length;
|
|
2219
|
-
return
|
|
2226
|
+
return b > 0 && b < t.children.length;
|
|
2220
2227
|
});
|
|
2221
|
-
function
|
|
2228
|
+
function v() {
|
|
2222
2229
|
if (!t.children) return;
|
|
2223
2230
|
t.children.filter(
|
|
2224
|
-
(
|
|
2225
|
-
).length === t.children.length ?
|
|
2231
|
+
(i) => o.value.includes(i.value ?? i.label)
|
|
2232
|
+
).length === t.children.length ? o.value.includes(a.value) || (o.value = o.value.concat(a.value)) : o.value.includes(a.value) && (o.value = o.value.filter((i) => i !== a.value));
|
|
2226
2233
|
}
|
|
2227
2234
|
function x() {
|
|
2228
|
-
var
|
|
2229
|
-
t.children && (
|
|
2230
|
-
(
|
|
2231
|
-
) :
|
|
2232
|
-
(
|
|
2235
|
+
var b;
|
|
2236
|
+
t.children && (o.value.includes(a.value) ? o.value = o.value.concat(
|
|
2237
|
+
(b = t.children) == null ? void 0 : b.map((i) => i.value ?? i.label).filter((i) => !o.value.includes(i))
|
|
2238
|
+
) : o.value = o.value.filter(
|
|
2239
|
+
(i) => {
|
|
2233
2240
|
var d;
|
|
2234
|
-
return !((d = t.children) != null && d.map((c) => c.value ?? c.label).includes(
|
|
2241
|
+
return !((d = t.children) != null && d.map((c) => c.value ?? c.label).includes(i));
|
|
2235
2242
|
}
|
|
2236
2243
|
));
|
|
2237
2244
|
}
|
|
2238
|
-
return (
|
|
2245
|
+
return (b, i) => {
|
|
2239
2246
|
var d, c;
|
|
2240
|
-
return p(),
|
|
2241
|
-
modelValue:
|
|
2242
|
-
"onUpdate:modelValue":
|
|
2247
|
+
return p(), E(ve, {
|
|
2248
|
+
modelValue: o.value,
|
|
2249
|
+
"onUpdate:modelValue": i[1] || (i[1] = (n) => o.value = n),
|
|
2243
2250
|
value: t.value,
|
|
2244
2251
|
label: t.label,
|
|
2245
2252
|
disabled: e.disabled,
|
|
@@ -2248,23 +2255,23 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
2248
2255
|
indeterminate: f.value,
|
|
2249
2256
|
"aria-owns": (d = e.children) != null && d.length ? l.value : void 0,
|
|
2250
2257
|
onChange: x
|
|
2251
|
-
},
|
|
2258
|
+
}, Fe({ _: 2 }, [
|
|
2252
2259
|
(c = e.children) != null && c.length ? {
|
|
2253
2260
|
name: "children",
|
|
2254
2261
|
fn: F(() => [
|
|
2255
|
-
|
|
2256
|
-
class:
|
|
2262
|
+
B("div", {
|
|
2263
|
+
class: h([$t, u.value])
|
|
2257
2264
|
}, [
|
|
2258
|
-
(p(!0), z(re, null, me(e.children, (n,
|
|
2265
|
+
(p(!0), z(re, null, me(e.children, (n, m) => (p(), E(ve, ae({
|
|
2259
2266
|
key: n.value ? n.value.toString() : n.label,
|
|
2260
|
-
modelValue:
|
|
2261
|
-
"onUpdate:modelValue":
|
|
2267
|
+
modelValue: o.value,
|
|
2268
|
+
"onUpdate:modelValue": i[0] || (i[0] = (g) => o.value = g),
|
|
2262
2269
|
disabled: e.disabled
|
|
2263
2270
|
}, { ref_for: !0 }, n, {
|
|
2264
2271
|
emphasis: e.emphasis,
|
|
2265
2272
|
error: e.error,
|
|
2266
|
-
"checkbox-id": `${
|
|
2267
|
-
onChange:
|
|
2273
|
+
"checkbox-id": `${y(s)}-child-${m}`,
|
|
2274
|
+
onChange: v
|
|
2268
2275
|
}), null, 16, ["modelValue", "disabled", "emphasis", "error", "checkbox-id"]))), 128))
|
|
2269
2276
|
], 2)
|
|
2270
2277
|
]),
|
|
@@ -2273,9 +2280,9 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
2273
2280
|
]), 1032, ["modelValue", "value", "label", "disabled", "emphasis", "error", "indeterminate", "aria-owns"]);
|
|
2274
2281
|
};
|
|
2275
2282
|
}
|
|
2276
|
-
}), Bt = ["id"], Et = { key: 0 }, It = ["id"], Ot = ["id", "aria-labelledby", "aria-describedby", "aria-required", "aria-invalid"], Rt = "flex flex-col",
|
|
2283
|
+
}), Bt = ["id"], Et = { key: 0 }, It = ["id"], Ot = ["id", "aria-labelledby", "aria-describedby", "aria-required", "aria-invalid"], Rt = "flex flex-col", At = "flex flex-col gap-10", Ft = "flex items-start", Ut = /* @__PURE__ */ T({
|
|
2277
2284
|
__name: "FzCheckboxGroup",
|
|
2278
|
-
props: /* @__PURE__ */
|
|
2285
|
+
props: /* @__PURE__ */ J({
|
|
2279
2286
|
label: {},
|
|
2280
2287
|
size: {},
|
|
2281
2288
|
options: {},
|
|
@@ -2293,8 +2300,8 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
2293
2300
|
}),
|
|
2294
2301
|
emits: ["update:modelValue"],
|
|
2295
2302
|
setup(e) {
|
|
2296
|
-
const t = e,
|
|
2297
|
-
|
|
2303
|
+
const t = e, a = Z();
|
|
2304
|
+
N(
|
|
2298
2305
|
() => t.size,
|
|
2299
2306
|
(c) => {
|
|
2300
2307
|
c !== void 0 && console.warn(
|
|
@@ -2303,85 +2310,85 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
2303
2310
|
},
|
|
2304
2311
|
{ immediate: !0 }
|
|
2305
2312
|
);
|
|
2306
|
-
const
|
|
2313
|
+
const o = Le(), s = r(() => [
|
|
2307
2314
|
"text-sm",
|
|
2308
2315
|
t.disabled ? "text-grey-400" : "text-grey-500"
|
|
2309
|
-
]), l =
|
|
2316
|
+
]), l = oe(e, "modelValue"), u = r(() => new Set(l.value));
|
|
2310
2317
|
Ne(we, { source: l, set: u });
|
|
2311
|
-
const f =
|
|
2318
|
+
const f = r(() => [
|
|
2312
2319
|
"text-base",
|
|
2313
2320
|
"gap-6",
|
|
2314
2321
|
t.disabled ? "text-grey-400" : "text-core-black"
|
|
2315
|
-
]),
|
|
2322
|
+
]), v = r(() => ["text-base"]), x = r(() => [
|
|
2316
2323
|
"text-base",
|
|
2317
2324
|
t.horizontal ? "gap-16" : "gap-8",
|
|
2318
2325
|
t.horizontal ? "flex-row" : "flex-col"
|
|
2319
|
-
]),
|
|
2326
|
+
]), b = r(
|
|
2320
2327
|
() => Array.isArray(t.options) && t.options.length > 0
|
|
2321
|
-
),
|
|
2328
|
+
), i = r(() => ({
|
|
2322
2329
|
disabled: t.disabled,
|
|
2323
2330
|
error: t.error,
|
|
2324
2331
|
emphasis: t.emphasis,
|
|
2325
2332
|
required: t.required
|
|
2326
|
-
})), d =
|
|
2333
|
+
})), d = r(() => {
|
|
2327
2334
|
const c = [];
|
|
2328
|
-
return
|
|
2335
|
+
return a.help && c.push(`${o}-help`), t.error && a.error && c.push(`${o}-error`), c.length > 0 ? c.join(" ") : void 0;
|
|
2329
2336
|
});
|
|
2330
2337
|
return (c, n) => (p(), z("div", {
|
|
2331
|
-
class:
|
|
2338
|
+
class: h([At, v.value])
|
|
2332
2339
|
}, [
|
|
2333
|
-
|
|
2334
|
-
id:
|
|
2335
|
-
class:
|
|
2340
|
+
B("label", {
|
|
2341
|
+
id: y(o) + "-label",
|
|
2342
|
+
class: h([Rt, f.value])
|
|
2336
2343
|
}, [
|
|
2337
|
-
|
|
2338
|
-
q(
|
|
2339
|
-
e.required ? (p(), z("span", Et, " *")) :
|
|
2344
|
+
B("span", null, [
|
|
2345
|
+
j(q(e.label), 1),
|
|
2346
|
+
e.required ? (p(), z("span", Et, " *")) : k("", !0)
|
|
2340
2347
|
]),
|
|
2341
2348
|
c.$slots.help ? (p(), z("p", {
|
|
2342
2349
|
key: 0,
|
|
2343
|
-
id:
|
|
2344
|
-
class:
|
|
2350
|
+
id: y(o) + "-help",
|
|
2351
|
+
class: h(s.value)
|
|
2345
2352
|
}, [
|
|
2346
2353
|
$(c.$slots, "help")
|
|
2347
|
-
], 10, It)) :
|
|
2354
|
+
], 10, It)) : k("", !0)
|
|
2348
2355
|
], 10, Bt),
|
|
2349
|
-
|
|
2350
|
-
class:
|
|
2351
|
-
id:
|
|
2356
|
+
B("div", {
|
|
2357
|
+
class: h([Ft, x.value]),
|
|
2358
|
+
id: y(o),
|
|
2352
2359
|
role: "group",
|
|
2353
|
-
"aria-labelledby":
|
|
2360
|
+
"aria-labelledby": y(o) + "-label",
|
|
2354
2361
|
"aria-describedby": d.value,
|
|
2355
2362
|
"aria-required": e.required ? "true" : "false",
|
|
2356
2363
|
"aria-invalid": e.error ? "true" : "false"
|
|
2357
2364
|
}, [
|
|
2358
|
-
|
|
2359
|
-
key:
|
|
2365
|
+
b.value ? (p(!0), z(re, { key: 0 }, me(e.options, (m) => (p(), E(St, ae({
|
|
2366
|
+
key: m.value ? m.value.toString() : m.label,
|
|
2360
2367
|
modelValue: l.value,
|
|
2361
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
2368
|
+
"onUpdate:modelValue": n[0] || (n[0] = (g) => l.value = g),
|
|
2362
2369
|
disabled: e.disabled
|
|
2363
|
-
}, { ref_for: !0 },
|
|
2370
|
+
}, { ref_for: !0 }, m, {
|
|
2364
2371
|
emphasis: e.emphasis,
|
|
2365
2372
|
error: e.error
|
|
2366
2373
|
}), null, 16, ["modelValue", "disabled", "emphasis", "error"]))), 128)) : $(c.$slots, "default", {
|
|
2367
2374
|
key: 1,
|
|
2368
|
-
checkboxGroupProps:
|
|
2375
|
+
checkboxGroupProps: i.value
|
|
2369
2376
|
})
|
|
2370
2377
|
], 10, Ot),
|
|
2371
|
-
e.error && c.$slots.error ? (p(),
|
|
2378
|
+
e.error && c.$slots.error ? (p(), E(ge, {
|
|
2372
2379
|
key: 0,
|
|
2373
|
-
id:
|
|
2380
|
+
id: y(o) + "-error"
|
|
2374
2381
|
}, {
|
|
2375
2382
|
default: F(() => [
|
|
2376
2383
|
$(c.$slots, "error")
|
|
2377
2384
|
]),
|
|
2378
2385
|
_: 3
|
|
2379
|
-
}, 8, ["id"])) :
|
|
2386
|
+
}, 8, ["id"])) : k("", !0)
|
|
2380
2387
|
], 2));
|
|
2381
2388
|
}
|
|
2382
|
-
}), Nt = ["id", "value", "disabled", "checked", "name", "required", "aria-checked", "aria-required", "aria-invalid"], Tt = ["for"], Lt = ["title"], Vt = ["src", "alt"], Dt = { class: "flex flex-row w-full justify-between min-w-0" },
|
|
2389
|
+
}), Nt = ["id", "value", "disabled", "checked", "name", "required", "aria-checked", "aria-required", "aria-invalid"], Tt = ["for"], Lt = ["title"], Vt = ["src", "alt"], Dt = { class: "flex flex-row w-full justify-between min-w-0" }, Pt = { class: "justify-center flex flex-col w-full grow-0 min-w-0 gap-4" }, Mt = "w-0 h-0 peer fz-hidden-input", qt = /* @__PURE__ */ T({
|
|
2383
2390
|
__name: "FzCheckboxCard",
|
|
2384
|
-
props: /* @__PURE__ */
|
|
2391
|
+
props: /* @__PURE__ */ J({
|
|
2385
2392
|
label: {},
|
|
2386
2393
|
size: {},
|
|
2387
2394
|
emphasis: { type: Boolean },
|
|
@@ -2407,25 +2414,25 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
2407
2414
|
}),
|
|
2408
2415
|
emits: ["update:modelValue"],
|
|
2409
2416
|
setup(e) {
|
|
2410
|
-
const t = e,
|
|
2417
|
+
const t = e, a = r(
|
|
2411
2418
|
() => t.value ?? t.label
|
|
2412
|
-
),
|
|
2419
|
+
), o = ie(), s = oe(e, "modelValue"), l = Te(we, null), u = r(() => s.value == null ? !1 : l && l.source.value === s.value ? l.set.value.has(a.value) : s.value.includes(a.value));
|
|
2413
2420
|
function f() {
|
|
2414
2421
|
if (t.disabled) return;
|
|
2415
|
-
const
|
|
2416
|
-
u.value ?
|
|
2422
|
+
const m = s.value ?? [];
|
|
2423
|
+
u.value ? s.value = m.filter((g) => g !== a.value) : s.value = [...m, a.value];
|
|
2417
2424
|
}
|
|
2418
|
-
const
|
|
2425
|
+
const v = Object.freeze({
|
|
2419
2426
|
CHECKED: "square-check",
|
|
2420
2427
|
UNCHECKED: "square"
|
|
2421
2428
|
}), x = Object.freeze({
|
|
2422
2429
|
SOLID: "fas",
|
|
2423
2430
|
REGULAR: "far"
|
|
2424
|
-
}),
|
|
2425
|
-
() => u.value ?
|
|
2426
|
-
),
|
|
2431
|
+
}), b = r(
|
|
2432
|
+
() => u.value ? v.CHECKED : v.UNCHECKED
|
|
2433
|
+
), i = r(
|
|
2427
2434
|
() => u.value ? x.SOLID : x.REGULAR
|
|
2428
|
-
), d =
|
|
2435
|
+
), d = r(() => t.disabled ? "text-grey-300" : t.error ? "text-semantic-error-200" : t.emphasis || u.value ? "text-blue-500" : "text-grey-400"), c = r(() => t.variant === "vertical" || !!t.imageUrl), n = r(() => ({
|
|
2429
2436
|
"flex-col": t.variant === "vertical",
|
|
2430
2437
|
"flex-row": t.variant === "horizontal",
|
|
2431
2438
|
"pb-20": t.variant === "vertical" && (!u.value || t.disabled),
|
|
@@ -2439,12 +2446,12 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
2439
2446
|
"border-1 border-grey-300": !u.value || t.disabled,
|
|
2440
2447
|
"hover:bg-[#f9faff] peer-focus:outline peer-focus:bg-[#f9faff] peer-focus:outline-blue-200 peer-focus:outline-2 peer-checked:bg-[#f9faff]": !t.disabled
|
|
2441
2448
|
}));
|
|
2442
|
-
return (
|
|
2443
|
-
|
|
2449
|
+
return (m, g) => (p(), z("div", null, [
|
|
2450
|
+
B("input", {
|
|
2444
2451
|
type: "checkbox",
|
|
2445
|
-
id:
|
|
2446
|
-
class:
|
|
2447
|
-
value:
|
|
2452
|
+
id: y(o),
|
|
2453
|
+
class: h([Mt]),
|
|
2454
|
+
value: a.value,
|
|
2448
2455
|
disabled: e.disabled,
|
|
2449
2456
|
checked: u.value,
|
|
2450
2457
|
name: e.name,
|
|
@@ -2455,18 +2462,18 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
2455
2462
|
"aria-invalid": e.error ? "true" : "false",
|
|
2456
2463
|
onChange: f
|
|
2457
2464
|
}, null, 42, Nt),
|
|
2458
|
-
|
|
2459
|
-
class:
|
|
2465
|
+
B("label", {
|
|
2466
|
+
class: h([
|
|
2460
2467
|
"relative flex block rounded-lg border-solid pt-12 px-12 cursor-pointer w-full",
|
|
2461
2468
|
n.value
|
|
2462
2469
|
]),
|
|
2463
|
-
for:
|
|
2470
|
+
for: y(o)
|
|
2464
2471
|
}, [
|
|
2465
|
-
e.hasCheckbox ? (p(),
|
|
2472
|
+
e.hasCheckbox ? (p(), E(y(H), {
|
|
2466
2473
|
key: 0,
|
|
2467
|
-
name:
|
|
2474
|
+
name: b.value,
|
|
2468
2475
|
size: "md",
|
|
2469
|
-
class:
|
|
2476
|
+
class: h([
|
|
2470
2477
|
"shrink-0",
|
|
2471
2478
|
d.value,
|
|
2472
2479
|
{
|
|
@@ -2474,12 +2481,12 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
2474
2481
|
"self-start": e.variant === "horizontal"
|
|
2475
2482
|
}
|
|
2476
2483
|
]),
|
|
2477
|
-
variant:
|
|
2484
|
+
variant: i.value,
|
|
2478
2485
|
"aria-hidden": "true"
|
|
2479
|
-
}, null, 8, ["name", "class", "variant"])) :
|
|
2486
|
+
}, null, 8, ["name", "class", "variant"])) : k("", !0),
|
|
2480
2487
|
c.value ? (p(), z("picture", {
|
|
2481
2488
|
key: 1,
|
|
2482
|
-
class:
|
|
2489
|
+
class: h([
|
|
2483
2490
|
"rounded overflow-hidden",
|
|
2484
2491
|
{
|
|
2485
2492
|
"shrink-0 size-[58px]": e.variant === "horizontal",
|
|
@@ -2489,34 +2496,34 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
2489
2496
|
]),
|
|
2490
2497
|
title: e.imageAlt || ""
|
|
2491
2498
|
}, [
|
|
2492
|
-
|
|
2499
|
+
B("img", {
|
|
2493
2500
|
src: e.imageUrl,
|
|
2494
2501
|
alt: e.imageAlt || "",
|
|
2495
2502
|
class: "object-cover h-full w-full"
|
|
2496
2503
|
}, null, 8, Vt)
|
|
2497
|
-
], 10, Lt)) :
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
class:
|
|
2504
|
+
], 10, Lt)) : k("", !0),
|
|
2505
|
+
B("div", Dt, [
|
|
2506
|
+
B("div", Pt, [
|
|
2507
|
+
B("p", {
|
|
2508
|
+
class: h([
|
|
2502
2509
|
"font-medium break-words !m-0 !leading-[20px]",
|
|
2503
2510
|
{ "text-grey-300": t.disabled }
|
|
2504
2511
|
])
|
|
2505
|
-
},
|
|
2512
|
+
}, q(e.title), 3),
|
|
2506
2513
|
e.subtitle ? (p(), z("p", {
|
|
2507
2514
|
key: 0,
|
|
2508
|
-
class:
|
|
2515
|
+
class: h([
|
|
2509
2516
|
"font-normal text-sm mt-4 break-words !m-0 !leading-[16px]",
|
|
2510
2517
|
{
|
|
2511
2518
|
"text-grey-300": t.disabled,
|
|
2512
2519
|
"text-grey-500": !t.disabled
|
|
2513
2520
|
}
|
|
2514
2521
|
])
|
|
2515
|
-
},
|
|
2522
|
+
}, q(e.subtitle), 3)) : k("", !0)
|
|
2516
2523
|
]),
|
|
2517
|
-
e.tooltip ? (p(),
|
|
2524
|
+
e.tooltip ? (p(), E(y(xe), {
|
|
2518
2525
|
key: 0,
|
|
2519
|
-
class:
|
|
2526
|
+
class: h({
|
|
2520
2527
|
"self-center": t.variant === "horizontal",
|
|
2521
2528
|
"self-start": t.variant === "vertical",
|
|
2522
2529
|
"ml-8": t.variant === "vertical",
|
|
@@ -2527,7 +2534,7 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
2527
2534
|
status: e.tooltipStatus || "neutral"
|
|
2528
2535
|
}, {
|
|
2529
2536
|
default: F(() => [
|
|
2530
|
-
|
|
2537
|
+
U(y(H), {
|
|
2531
2538
|
name: "circle-info",
|
|
2532
2539
|
variant: "far",
|
|
2533
2540
|
size: "md",
|
|
@@ -2535,12 +2542,12 @@ const tt = Object.entries(se.global.breakpoint).reduce(
|
|
|
2535
2542
|
})
|
|
2536
2543
|
]),
|
|
2537
2544
|
_: 1
|
|
2538
|
-
}, 8, ["class", "disabled", "text", "status"])) :
|
|
2545
|
+
}, 8, ["class", "disabled", "text", "status"])) : k("", !0)
|
|
2539
2546
|
])
|
|
2540
2547
|
], 10, Tt)
|
|
2541
2548
|
]));
|
|
2542
2549
|
}
|
|
2543
|
-
}), Wt = /* @__PURE__ */
|
|
2550
|
+
}), Wt = /* @__PURE__ */ Y(qt, [["__scopeId", "data-v-d850ec45"]]);
|
|
2544
2551
|
export {
|
|
2545
2552
|
ve as FzCheckbox,
|
|
2546
2553
|
Wt as FzCheckboxCard,
|