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