@romainbx/wpic-components 0.0.29 → 0.0.31
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/dist/wpic-components.js
CHANGED
|
@@ -1065,8 +1065,8 @@ function Lh(t, e, n) {
|
|
|
1065
1065
|
const { initialValue: r, validateOnMount: i, bails: s, type: o, checkedValue: a, label: l, validateOnValueUpdate: c, uncheckedValue: u, controlled: d, keepValueOnUnmount: f, syncVModel: h, form: p } = My(n), m = d ? Ac(qs) : void 0, g = p || m, b = oe(() => ds(ve(t))), k = oe(() => {
|
|
1066
1066
|
if (ve(g == null ? void 0 : g.schema))
|
|
1067
1067
|
return;
|
|
1068
|
-
const
|
|
1069
|
-
return Po(
|
|
1068
|
+
const le = $(e);
|
|
1069
|
+
return Po(le) || en(le) || Ze(le) || Array.isArray(le) ? le : Nh(le);
|
|
1070
1070
|
}), T = !Ze(k.value) && en(ve(e)), { id: y, value: O, initialValue: v, meta: S, setState: A, errors: N, flags: L } = dy(b, {
|
|
1071
1071
|
modelValue: r,
|
|
1072
1072
|
form: g,
|
|
@@ -1082,14 +1082,14 @@ function Lh(t, e, n) {
|
|
|
1082
1082
|
handleChange: P,
|
|
1083
1083
|
shouldValidate: () => c && !L.pendingReset
|
|
1084
1084
|
});
|
|
1085
|
-
const Q = (H,
|
|
1086
|
-
S.touched = !0,
|
|
1085
|
+
const Q = (H, le = !1) => {
|
|
1086
|
+
S.touched = !0, le && z();
|
|
1087
1087
|
};
|
|
1088
1088
|
async function I(H) {
|
|
1089
|
-
var
|
|
1089
|
+
var le, De;
|
|
1090
1090
|
if (g != null && g.validateSchema) {
|
|
1091
1091
|
const { results: ye } = await g.validateSchema(H);
|
|
1092
|
-
return (
|
|
1092
|
+
return (le = ye[ve(b)]) !== null && le !== void 0 ? le : { valid: !0, errors: [] };
|
|
1093
1093
|
}
|
|
1094
1094
|
return k.value ? $h(O.value, k.value, {
|
|
1095
1095
|
name: ve(b),
|
|
@@ -1102,9 +1102,9 @@ function Lh(t, e, n) {
|
|
|
1102
1102
|
function j(H) {
|
|
1103
1103
|
return (H == null ? void 0 : H.mode) === "silent" ? W() : z();
|
|
1104
1104
|
}
|
|
1105
|
-
function P(H,
|
|
1105
|
+
function P(H, le = !0) {
|
|
1106
1106
|
const De = Io(H);
|
|
1107
|
-
wt(De,
|
|
1107
|
+
wt(De, le);
|
|
1108
1108
|
}
|
|
1109
1109
|
Kn(() => {
|
|
1110
1110
|
if (i)
|
|
@@ -1115,18 +1115,18 @@ function Lh(t, e, n) {
|
|
|
1115
1115
|
S.touched = H;
|
|
1116
1116
|
}
|
|
1117
1117
|
function Te(H) {
|
|
1118
|
-
var
|
|
1118
|
+
var le;
|
|
1119
1119
|
const De = H && "value" in H ? H.value : v.value;
|
|
1120
1120
|
A({
|
|
1121
1121
|
value: Ee(De),
|
|
1122
1122
|
initialValue: Ee(De),
|
|
1123
|
-
touched: (
|
|
1123
|
+
touched: (le = H == null ? void 0 : H.touched) !== null && le !== void 0 ? le : !1,
|
|
1124
1124
|
errors: (H == null ? void 0 : H.errors) || []
|
|
1125
1125
|
}), S.pending = !1, S.validated = !1, W();
|
|
1126
1126
|
}
|
|
1127
1127
|
const tt = Un();
|
|
1128
|
-
function wt(H,
|
|
1129
|
-
O.value = tt && h ? K0(H, tt.props.modelModifiers) : H, (
|
|
1128
|
+
function wt(H, le = !0) {
|
|
1129
|
+
O.value = tt && h ? K0(H, tt.props.modelModifiers) : H, (le ? z : W)();
|
|
1130
1130
|
}
|
|
1131
1131
|
function Et(H) {
|
|
1132
1132
|
A({ errors: Array.isArray(H) ? H : [H] });
|
|
@@ -1161,8 +1161,8 @@ function Lh(t, e, n) {
|
|
|
1161
1161
|
setErrors: Et,
|
|
1162
1162
|
setValue: wt
|
|
1163
1163
|
};
|
|
1164
|
-
if (Cs(Dh, Pe), No(e) && typeof $(e) != "function" && pt(e, (H,
|
|
1165
|
-
mt(H,
|
|
1164
|
+
if (Cs(Dh, Pe), No(e) && typeof $(e) != "function" && pt(e, (H, le) => {
|
|
1165
|
+
mt(H, le) || (S.validated ? z() : W());
|
|
1166
1166
|
}, {
|
|
1167
1167
|
deep: !0
|
|
1168
1168
|
}), process.env.NODE_ENV !== "production" && (Pe._vm = Un(), pt(() => Object.assign(Object.assign({ errors: N.value }, S), { value: O.value }), _i, {
|
|
@@ -1171,22 +1171,22 @@ function Lh(t, e, n) {
|
|
|
1171
1171
|
return Pe;
|
|
1172
1172
|
const ut = oe(() => {
|
|
1173
1173
|
const H = k.value;
|
|
1174
|
-
return !H || Ze(H) || Po(H) || en(H) || Array.isArray(H) ? {} : Object.keys(H).reduce((
|
|
1174
|
+
return !H || Ze(H) || Po(H) || en(H) || Array.isArray(H) ? {} : Object.keys(H).reduce((le, De) => {
|
|
1175
1175
|
const ye = ty(H[De]).map((Ge) => Ge.__locatorRef).reduce((Ge, Ke) => {
|
|
1176
1176
|
const kt = Ct(g.values, Ke) || g.values[Ke];
|
|
1177
1177
|
return kt !== void 0 && (Ge[Ke] = kt), Ge;
|
|
1178
1178
|
}, {});
|
|
1179
|
-
return Object.assign(
|
|
1179
|
+
return Object.assign(le, ye), le;
|
|
1180
1180
|
}, {});
|
|
1181
1181
|
});
|
|
1182
|
-
return pt(ut, (H,
|
|
1182
|
+
return pt(ut, (H, le) => {
|
|
1183
1183
|
if (!Object.keys(H).length)
|
|
1184
1184
|
return;
|
|
1185
|
-
!mt(H,
|
|
1185
|
+
!mt(H, le) && (S.validated ? z() : W());
|
|
1186
1186
|
}), Qr(() => {
|
|
1187
1187
|
var H;
|
|
1188
|
-
const
|
|
1189
|
-
if (
|
|
1188
|
+
const le = (H = ve(Pe.keepValueOnUnmount)) !== null && H !== void 0 ? H : ve(g.keepValuesOnUnmount), De = ve(b);
|
|
1189
|
+
if (le || !g || L.pendingUnmount[Pe.id]) {
|
|
1190
1190
|
g == null || g.removePathState(De, y);
|
|
1191
1191
|
return;
|
|
1192
1192
|
}
|
|
@@ -1576,7 +1576,7 @@ function Ny(t) {
|
|
|
1576
1576
|
setTouched: Xn,
|
|
1577
1577
|
setFieldTouched: Ke,
|
|
1578
1578
|
setValues: ye,
|
|
1579
|
-
setFieldValue:
|
|
1579
|
+
setFieldValue: le,
|
|
1580
1580
|
resetForm: An,
|
|
1581
1581
|
resetField: Qn
|
|
1582
1582
|
});
|
|
@@ -1631,7 +1631,7 @@ function Ny(t) {
|
|
|
1631
1631
|
validate: Zt,
|
|
1632
1632
|
setFieldError: h,
|
|
1633
1633
|
validateField: Ft,
|
|
1634
|
-
setFieldValue:
|
|
1634
|
+
setFieldValue: le,
|
|
1635
1635
|
setValues: ye,
|
|
1636
1636
|
setErrors: p,
|
|
1637
1637
|
setFieldTouched: Ke,
|
|
@@ -1657,7 +1657,7 @@ function Ny(t) {
|
|
|
1657
1657
|
isFieldDirty: Cr,
|
|
1658
1658
|
isFieldValid: ni
|
|
1659
1659
|
};
|
|
1660
|
-
function
|
|
1660
|
+
function le(C, M, R = !0) {
|
|
1661
1661
|
const U = Ee(M), ie = typeof C == "string" ? C : C.path;
|
|
1662
1662
|
j(ie) || ne(ie), In(l, ie, U), R && Ft(ie);
|
|
1663
1663
|
}
|
|
@@ -1665,7 +1665,7 @@ function Ny(t) {
|
|
|
1665
1665
|
Ot(l).forEach((R) => {
|
|
1666
1666
|
delete l[R];
|
|
1667
1667
|
}), Ot(C).forEach((R) => {
|
|
1668
|
-
|
|
1668
|
+
le(R, C[R], !1);
|
|
1669
1669
|
}), M && Zt();
|
|
1670
1670
|
}
|
|
1671
1671
|
function ye(C, M = !0) {
|
|
@@ -1680,7 +1680,7 @@ function Ny(t) {
|
|
|
1680
1680
|
set(U) {
|
|
1681
1681
|
var ie;
|
|
1682
1682
|
const w = ve(C);
|
|
1683
|
-
|
|
1683
|
+
le(w, U, (ie = ve(M)) !== null && ie !== void 0 ? ie : !1);
|
|
1684
1684
|
}
|
|
1685
1685
|
});
|
|
1686
1686
|
}
|
|
@@ -1714,7 +1714,7 @@ function Ny(t) {
|
|
|
1714
1714
|
function Qn(C, M) {
|
|
1715
1715
|
var R;
|
|
1716
1716
|
const U = M && "value" in M ? M.value : Ct(O.value, C), ie = j(C);
|
|
1717
|
-
ie && (ie.__flags.pendingReset = !0), Nn(C, Ee(U), !0),
|
|
1717
|
+
ie && (ie.__flags.pendingReset = !0), Nn(C, Ee(U), !0), le(C, U, !1), Ke(C, (R = M == null ? void 0 : M.touched) !== null && R !== void 0 ? R : !1), h(C, (M == null ? void 0 : M.errors) || []), St(() => {
|
|
1718
1718
|
ie && (ie.__flags.pendingReset = !1);
|
|
1719
1719
|
});
|
|
1720
1720
|
}
|
|
@@ -1722,7 +1722,7 @@ function Ny(t) {
|
|
|
1722
1722
|
let R = Ee(C != null && C.values ? C.values : v.value);
|
|
1723
1723
|
R = M != null && M.force ? R : Ts(v.value, R), R = en(L) && Ze(L.cast) ? L.cast(R) : R, S(R), W((U) => {
|
|
1724
1724
|
var ie;
|
|
1725
|
-
U.__flags.pendingReset = !0, U.validated = !1, U.touched = ((ie = C == null ? void 0 : C.touched) === null || ie === void 0 ? void 0 : ie[U.path]) || !1,
|
|
1725
|
+
U.__flags.pendingReset = !0, U.validated = !1, U.touched = ((ie = C == null ? void 0 : C.touched) === null || ie === void 0 ? void 0 : ie[U.path]) || !1, le(U.path, Ct(R, U.path), !1), h(U.path, void 0);
|
|
1726
1726
|
}), M != null && M.force ? De(R, !1) : ye(R, !1), p((C == null ? void 0 : C.errors) || {}), o.value = (C == null ? void 0 : C.submitCount) || 0, St(() => {
|
|
1727
1727
|
Zt({ mode: "silent" }), W((U) => {
|
|
1728
1728
|
U.__flags.pendingReset = !1;
|
|
@@ -1841,11 +1841,11 @@ function Ny(t) {
|
|
|
1841
1841
|
}
|
|
1842
1842
|
function w(G) {
|
|
1843
1843
|
const re = Io(G);
|
|
1844
|
-
|
|
1844
|
+
le(ve(C), re, !1), U.value.onInput();
|
|
1845
1845
|
}
|
|
1846
1846
|
function B(G) {
|
|
1847
1847
|
const re = Io(G);
|
|
1848
|
-
|
|
1848
|
+
le(ve(C), re, !1), U.value.onChange();
|
|
1849
1849
|
}
|
|
1850
1850
|
return oe(() => Object.assign(Object.assign({}, U.value), {
|
|
1851
1851
|
onBlur: ie,
|
|
@@ -2118,7 +2118,7 @@ const Xy = /* @__PURE__ */ ke(qy, [["render", Zy]]), Qy = { class: "relative" },
|
|
|
2118
2118
|
]));
|
|
2119
2119
|
}
|
|
2120
2120
|
});
|
|
2121
|
-
let
|
|
2121
|
+
let ae = {
|
|
2122
2122
|
theme: "wpic-tools",
|
|
2123
2123
|
popoverTarget: "body"
|
|
2124
2124
|
};
|
|
@@ -2159,25 +2159,28 @@ const tv = ["is", "type", "disabled"], nv = {
|
|
|
2159
2159
|
pmi: "",
|
|
2160
2160
|
"wpic-tools": "bg-transparent text-gray-700 enabled:hover:bg-gray-900/5 enabled:active:bg-gray-200 enabled:active:shadow-inner dark:enabled:border-gray-900 dark:text-gray-400 dark:enabled:hover:bg-gray-900 dark:enabled:active:bg-gray-930 dark:disabled:text-gray-700"
|
|
2161
2161
|
}, i = {
|
|
2162
|
+
pmi: "",
|
|
2163
|
+
"wpic-tools": "bg-transparent text-red-600 enabled:hover:bg-red-500/5 enabled:active:bg-red-100 enabled:active:shadow-inner dark:text-red-400 dark:enabled:hover:bg-red-500/10 dark:enabled:active:bg-red-500/25 dark:disabled:text-red-500/50"
|
|
2164
|
+
}, s = {
|
|
2162
2165
|
pmi: "bg-violet-800 border border-violet-800 focus:bg-violet-800 text-white disabled:bg-zinc-100 disabled:text-zinc-400 disabled:border-zinc-100 enabled:hover:bg-violet-900 enabled:hover:border-violet-900 active:scale-95 enabled:transform",
|
|
2163
2166
|
"wpic-tools": "text-white bg-lime-500 border-lime-500 enabled:hover:bg-lime-400 enabled:hover:border-lime-400 enabled:active:bg-lime-500 enabled:active:border-lime-500 enabled:active:shadow-inner disabled:bg-lime-600/25 disabled:text-white disabled:border-0 dark:bg-lime-700 dark:border-lime-700 dark:enabled:hover:bg-lime-600 dark:enabled:hover:border-lime-600 dark:enabled:active:bg-lime-800 dark:enabled:active:border-lime-800 dark:disabled:bg-lime-700/50 dark:disabled:text-white/25"
|
|
2164
|
-
},
|
|
2167
|
+
}, o = {
|
|
2165
2168
|
pmi: "bg-white text-violet-800 border-zinc-400 dark:border-zinc-700 dark:text-zinc-200 dark:bg-zinc-700 dark:hover:bg-zinc-600 dark:hover:border-zinc-600 disabled:text-zinc-400 active:scale-95 enabled:transform",
|
|
2166
2169
|
"wpic-tools": "text-gray-700 bg-gray-100 border-gray-300 enabled:hover:bg-lime-50 enabled:hover:border-lime-300 enabled:hover:text-lime-600 enabled:active:shadow-inner disabled:border-gray-200 disabled:text-zinc-400 disabled:bg-gray-50/50 dark:bg-gray-700 dark:border-gray-700 dark:text-gray-400"
|
|
2167
|
-
},
|
|
2170
|
+
}, a = {
|
|
2168
2171
|
pmi: "",
|
|
2169
2172
|
"wpic-tools": "text-white bg-red-500 border-red-500 enabled:hover:bg-red-600 enabled:hover:border-red-600 enabled:active:bg-red-700 enabled:active:border-red-700 dark:bg-red-400/70 dark:border-red-400/70"
|
|
2170
|
-
},
|
|
2173
|
+
}, l = {
|
|
2171
2174
|
pmi: "border-zinc-300 dark:border-zinc-700 dark:text-zinc-300",
|
|
2172
2175
|
"wpic-tools": "border-gray-200 bg-gray-200 text-gray-700 enabled:hover:bg-gray-300 enabled:hover:border-gray-300 enabled:active:bg-gray-200 enabled:active:border-gray-200 enabled:active:shadow-inner disabled:bg-gray-100 disabled:text-zinc-400 disabled:border-0 dark:bg-gray-930 dark:border-gray-930 dark:text-gray-300 dark:enabled:hover:bg-gray-920 dark:enabled:hover:border-gray-920 dark:enabled:active:bg-gray-930 dark:enabled:active:border-gray-930 dark:disabled:text-gray-700 dark:disabled:bg-gray-940"
|
|
2173
|
-
},
|
|
2176
|
+
}, c = {
|
|
2174
2177
|
pmi: "text-violet-800 hover:underline",
|
|
2175
2178
|
"wpic-tools": "text-lime-800 hover:underline"
|
|
2176
|
-
},
|
|
2179
|
+
}, u = {
|
|
2177
2180
|
pmi: "hover:text-violet-800",
|
|
2178
2181
|
"wpic-tools": "hover:text-lime-800"
|
|
2179
2182
|
};
|
|
2180
|
-
return (
|
|
2183
|
+
return (d, f) => (x(), _("button", {
|
|
2181
2184
|
is: n.value,
|
|
2182
2185
|
type: t.type,
|
|
2183
2186
|
disabled: t.disabled,
|
|
@@ -2186,13 +2189,14 @@ const tv = ["is", "type", "disabled"], nv = {
|
|
|
2186
2189
|
"active:outline active:outline-2 active:outline-offset-4": !t.disabled && !t.loading && t.outlining,
|
|
2187
2190
|
"cursor-not-allowed": t.disabled,
|
|
2188
2191
|
border: t.outline && !t.plain,
|
|
2189
|
-
[`${
|
|
2190
|
-
[`${
|
|
2191
|
-
[`${
|
|
2192
|
-
[`${
|
|
2193
|
-
[`${
|
|
2194
|
-
[`${r[$(
|
|
2195
|
-
[`${
|
|
2192
|
+
[`${s[$(ae).theme]}`]: t.primary && !t.plain && !t.inverse,
|
|
2193
|
+
[`${o[$(ae).theme]}`]: t.secondary,
|
|
2194
|
+
[`${l[$(ae).theme]}`]: !t.primary && !t.secondary && !t.plain && !t.colorless && !t.destructive,
|
|
2195
|
+
[`${c[$(ae).theme]}`]: t.primary && t.plain,
|
|
2196
|
+
[`${u[$(ae).theme]}`]: !t.primary && t.plain,
|
|
2197
|
+
[`${r[$(ae).theme]}`]: t.colorless,
|
|
2198
|
+
[`${a[$(ae).theme]}`]: t.destructive && !t.colorless,
|
|
2199
|
+
[`${i[$(ae).theme]}`]: t.destructive && t.colorless,
|
|
2196
2200
|
"bg-zinc-50 border-violet-800 text-violet-800": t.primary && t.inverse,
|
|
2197
2201
|
"hover:bg-white": t.primary && t.inverse && !t.disabled && !t.loading,
|
|
2198
2202
|
"w-full": t.full,
|
|
@@ -2217,7 +2221,7 @@ const tv = ["is", "type", "disabled"], nv = {
|
|
|
2217
2221
|
}])
|
|
2218
2222
|
}, {
|
|
2219
2223
|
default: Se(() => [
|
|
2220
|
-
Oe(
|
|
2224
|
+
Oe(d.$slots, "default", {}, () => [
|
|
2221
2225
|
Le(ge(t.label), 1)
|
|
2222
2226
|
])
|
|
2223
2227
|
]),
|
|
@@ -2234,7 +2238,7 @@ const tv = ["is", "type", "disabled"], nv = {
|
|
|
2234
2238
|
"wpic-tools": "border-gray-300"
|
|
2235
2239
|
};
|
|
2236
2240
|
return (n, r) => (x(), _("div", {
|
|
2237
|
-
class: q(["wpic-button-group flex flex-wrap h-10", [e[$(
|
|
2241
|
+
class: q(["wpic-button-group flex flex-wrap h-10", [e[$(ae).theme]]])
|
|
2238
2242
|
}, [
|
|
2239
2243
|
Oe(n.$slots, "default")
|
|
2240
2244
|
], 2));
|
|
@@ -3273,20 +3277,20 @@ const tb = { class: "bg-white dark:bg-gray-700 rounded-t-lg w-full" }, nb = { cl
|
|
|
3273
3277
|
Oe(m.$slots, "default", { isHidden: l.value })
|
|
3274
3278
|
], 32)),
|
|
3275
3279
|
(x(), be(Oh, {
|
|
3276
|
-
to: $(
|
|
3280
|
+
to: $(ae).popoverTarget
|
|
3277
3281
|
}, [
|
|
3278
3282
|
(x(), _("div", {
|
|
3279
3283
|
key: `floating_${$(n)}`,
|
|
3280
3284
|
ref_key: "floating",
|
|
3281
3285
|
ref: a,
|
|
3282
3286
|
style: or({ maxWidth: t.maxWidth }),
|
|
3283
|
-
class: q(["z-30 rounded-md overflow-hidden", { [`${t.customWidth}`]: !0, hidden: l.value, [`${i[$(
|
|
3287
|
+
class: q(["z-30 rounded-md overflow-hidden", { [`${t.customWidth}`]: !0, hidden: l.value, [`${i[$(ae).theme]}`]: !l.value, "rounded-md": !t.custom, "px-3 py-2": !t.custom && !t.expand }])
|
|
3284
3288
|
}, [
|
|
3285
3289
|
Oe(m.$slots, "content")
|
|
3286
3290
|
], 6)),
|
|
3287
3291
|
E("div", {
|
|
3288
3292
|
onClick: g[1] || (g[1] = (b) => u()),
|
|
3289
|
-
class: q(["fixed z-30 flex items-end w-screen h-screen top-0 bg-black/20", { hidden: l.value, [`${s[$(
|
|
3293
|
+
class: q(["fixed z-30 flex items-end w-screen h-screen top-0 bg-black/20", { hidden: l.value, [`${s[$(ae).theme]}`]: !0 }])
|
|
3290
3294
|
}, [
|
|
3291
3295
|
E("div", tb, [
|
|
3292
3296
|
E("div", nb, [
|
|
@@ -3405,11 +3409,11 @@ const zc = /* @__PURE__ */ ke(mb, [["render", bb]]), wb = {
|
|
|
3405
3409
|
class: q(["wpic-input overflow-auto leading-none rounded flex relative border pr-4 items-center", {
|
|
3406
3410
|
"pl-4": !o.$slots.prepend,
|
|
3407
3411
|
"pl-10": o.$slots.prepend,
|
|
3408
|
-
[`${n[$(
|
|
3412
|
+
[`${n[$(ae).theme]}`]: !0,
|
|
3409
3413
|
"h-8": t.small,
|
|
3410
3414
|
"h-10": !t.large,
|
|
3411
3415
|
"h-12": t.large,
|
|
3412
|
-
[`${r[$(
|
|
3416
|
+
[`${r[$(ae).theme]}`]: t.disabled,
|
|
3413
3417
|
"cursor-pointer": !t.disabled,
|
|
3414
3418
|
"!border-red-600 focus-within:outline-red-600": t.invalid
|
|
3415
3419
|
}])
|
|
@@ -4291,7 +4295,7 @@ const Nd = /* @__PURE__ */ rp(TM), DM = {
|
|
|
4291
4295
|
E("div", {
|
|
4292
4296
|
class: q(["flex items-center py-2 px-4 min-w-64 text-base", {
|
|
4293
4297
|
"cursor-pointer": !t.multiple || O.value,
|
|
4294
|
-
[`${p[$(
|
|
4298
|
+
[`${p[$(ae).theme]}`]: !0
|
|
4295
4299
|
}]),
|
|
4296
4300
|
onClick: (v) => O.disabled ? null : l(O.value)
|
|
4297
4301
|
}, [
|
|
@@ -4669,7 +4673,7 @@ const oC = /* @__PURE__ */ ke(tC, [["render", sC]]), aC = {
|
|
|
4669
4673
|
}, [
|
|
4670
4674
|
E("div", {
|
|
4671
4675
|
class: q(["w-4 h-4 border cursor-pointer", {
|
|
4672
|
-
[`${i[$(
|
|
4676
|
+
[`${i[$(ae).theme]}`]: !0
|
|
4673
4677
|
}])
|
|
4674
4678
|
}, [
|
|
4675
4679
|
t.modelValue === !0 ? (x(), be(np, { key: 0 })) : Z("", !0)
|
|
@@ -4759,7 +4763,7 @@ const oC = /* @__PURE__ */ ke(tC, [["render", sC]]), aC = {
|
|
|
4759
4763
|
}, 8, ["modelValue", "rules", "name"])) : (x(), _("div", {
|
|
4760
4764
|
key: 4,
|
|
4761
4765
|
class: q(["wpic-input rounded flex relative border", {
|
|
4762
|
-
[`${r[$(
|
|
4766
|
+
[`${r[$(ae).theme]}`]: !0,
|
|
4763
4767
|
"!bg-transparent": t.transparent,
|
|
4764
4768
|
"h-10": !t.textarea && !t.large,
|
|
4765
4769
|
"h-12": !t.textarea && t.large,
|
|
@@ -4978,7 +4982,7 @@ const oC = /* @__PURE__ */ ke(tC, [["render", sC]]), aC = {
|
|
|
4978
4982
|
return (r, i) => {
|
|
4979
4983
|
const s = x0("wpic-loading-panel");
|
|
4980
4984
|
return x(), _("div", {
|
|
4981
|
-
class: q(["rounded-lg wpic-card relative", { [e[$(
|
|
4985
|
+
class: q(["rounded-lg wpic-card relative", { [e[$(ae).theme]]: !0, "wpic-card-inline": t.inline, "has-header": t.title || r.$slots.actions }])
|
|
4982
4986
|
}, [
|
|
4983
4987
|
t.loading ? (x(), be(s, {
|
|
4984
4988
|
key: 0,
|
|
@@ -4988,7 +4992,7 @@ const oC = /* @__PURE__ */ ke(tC, [["render", sC]]), aC = {
|
|
|
4988
4992
|
t.title || r.$slots.actions ? (x(), _("div", vC, [
|
|
4989
4993
|
t.title || r.$slots.actions ? (x(), _("div", {
|
|
4990
4994
|
key: 0,
|
|
4991
|
-
class: q(["text-lg 2xl:text-xl", [n[$(
|
|
4995
|
+
class: q(["text-lg 2xl:text-xl", [n[$(ae).theme]]])
|
|
4992
4996
|
}, ge(t.title), 3)) : Z("", !0),
|
|
4993
4997
|
E("div", bC, [
|
|
4994
4998
|
Oe(r.$slots, "actions")
|
|
@@ -5017,7 +5021,7 @@ const oC = /* @__PURE__ */ ke(tC, [["render", sC]]), aC = {
|
|
|
5017
5021
|
};
|
|
5018
5022
|
return (n, r) => (x(), _("div", {
|
|
5019
5023
|
class: q(["border-b relative dark:border-gray-900 last:border-0 pb-6", {
|
|
5020
|
-
[`${e[$(
|
|
5024
|
+
[`${e[$(ae).theme]}`]: !0,
|
|
5021
5025
|
"pt-6": !(t.title && n.$slots.actions)
|
|
5022
5026
|
}])
|
|
5023
5027
|
}, [
|
|
@@ -5057,7 +5061,7 @@ const oC = /* @__PURE__ */ ke(tC, [["render", sC]]), aC = {
|
|
|
5057
5061
|
class: q(["relative flex", { "mb-4": t.indicators }])
|
|
5058
5062
|
}, [
|
|
5059
5063
|
E("div", {
|
|
5060
|
-
class: q(["flex w-full relative", r[$(
|
|
5064
|
+
class: q(["flex w-full relative", r[$(ae).theme]]),
|
|
5061
5065
|
style: { "z-index": "1" }
|
|
5062
5066
|
}, [
|
|
5063
5067
|
n.value > 0 ? (x(), _("div", {
|
|
@@ -5065,7 +5069,7 @@ const oC = /* @__PURE__ */ ke(tC, [["render", sC]]), aC = {
|
|
|
5065
5069
|
style: or({ width: `${n.value}%` }),
|
|
5066
5070
|
class: q(["flex h-full", {
|
|
5067
5071
|
[`${t.background}`]: !0,
|
|
5068
|
-
[`${i[$(
|
|
5072
|
+
[`${i[$(ae).theme]}`]: !0
|
|
5069
5073
|
}])
|
|
5070
5074
|
}, [
|
|
5071
5075
|
ce(kp, {
|
|
@@ -5100,7 +5104,7 @@ const oC = /* @__PURE__ */ ke(tC, [["render", sC]]), aC = {
|
|
|
5100
5104
|
r("clear");
|
|
5101
5105
|
}
|
|
5102
5106
|
return (s, o) => (x(), _("div", {
|
|
5103
|
-
class: q(["wpic-tag select-none border inline-flex rounded h-8 items-center justify-center pl-3 py-1", { "pr-3": !t.clearable, "pr-2": t.clearable, [n[$(
|
|
5107
|
+
class: q(["wpic-tag select-none border inline-flex rounded h-8 items-center justify-center pl-3 py-1", { "pr-3": !t.clearable, "pr-2": t.clearable, [n[$(ae).theme]]: !0 }])
|
|
5104
5108
|
}, [
|
|
5105
5109
|
E("span", AC, [
|
|
5106
5110
|
Oe(s.$slots, "default")
|
|
@@ -5176,8 +5180,8 @@ const oC = /* @__PURE__ */ ke(tC, [["render", sC]]), aC = {
|
|
|
5176
5180
|
};
|
|
5177
5181
|
return (r, i) => (x(), _("div", {
|
|
5178
5182
|
class: q(["border rounded flex items-center justify-center w-10 h-10 cursor-pointer", {
|
|
5179
|
-
[e[$(
|
|
5180
|
-
[n[$(
|
|
5183
|
+
[e[$(ae).theme]]: !t.active,
|
|
5184
|
+
[n[$(ae).theme]]: t.active
|
|
5181
5185
|
}])
|
|
5182
5186
|
}, [
|
|
5183
5187
|
E("span", HC, [
|
|
@@ -5387,7 +5391,7 @@ const xT = /* @__PURE__ */ ke(yT, [["render", kT]]), ST = { class: "font-semibol
|
|
|
5387
5391
|
return (n, r) => (x(), _("tr", ST, [
|
|
5388
5392
|
(x(!0), _($e, null, ft(t.columns, (i, s) => (x(), be(ql, {
|
|
5389
5393
|
class: q(["py-3 first:pl-6 pr-6 border-t", {
|
|
5390
|
-
[`${e[$(
|
|
5394
|
+
[`${e[$(ae).theme]}`]: !0,
|
|
5391
5395
|
"sticky left-0": s === 0,
|
|
5392
5396
|
"border-b": t.position === "header",
|
|
5393
5397
|
"border-t": t.position === "footer",
|
|
@@ -5547,7 +5551,7 @@ const _T = /* @__PURE__ */ ke(OT, [["render", DT]]), ET = { class: "overflow-aut
|
|
|
5547
5551
|
return (T, y) => (x(), _("div", {
|
|
5548
5552
|
class: q(["wpic-table relative w-full rounded-lg overflow-hidden", {
|
|
5549
5553
|
border: t.border,
|
|
5550
|
-
[`${i[$(
|
|
5554
|
+
[`${i[$(ae).theme]}`]: !0
|
|
5551
5555
|
}])
|
|
5552
5556
|
}, [
|
|
5553
5557
|
E("div", ET, [
|
|
@@ -5568,13 +5572,13 @@ const _T = /* @__PURE__ */ ke(OT, [["render", DT]]), ET = { class: "overflow-aut
|
|
|
5568
5572
|
E("tr", null, [
|
|
5569
5573
|
p.value.find((O) => O.type == "expand") ? (x(), _("th", {
|
|
5570
5574
|
key: 0,
|
|
5571
|
-
class: q(["first:rounded-tl-lg last:rounded-tr-lg py-0 border-b first:pl-6 pr-6", [`${s[$(
|
|
5575
|
+
class: q(["first:rounded-tl-lg last:rounded-tr-lg py-0 border-b first:pl-6 pr-6", [`${s[$(ae).theme]}`]])
|
|
5572
5576
|
}, null, 2)) : Z("", !0),
|
|
5573
5577
|
(x(!0), _($e, null, ft(p.value.filter((O) => O.type != "expand"), (O, v) => {
|
|
5574
5578
|
var S, A;
|
|
5575
5579
|
return x(), _("th", {
|
|
5576
5580
|
class: q(["first:rounded-tl-lg last:rounded-tr-lg py-0 border-b first:pl-6 pr-6", {
|
|
5577
|
-
[`${s[$(
|
|
5581
|
+
[`${s[$(ae).theme]}`]: !0,
|
|
5578
5582
|
"sticky left-0": v === 0
|
|
5579
5583
|
}]),
|
|
5580
5584
|
style: or({ maxWidth: `${O.maxWidth}px` })
|
|
@@ -5608,7 +5612,7 @@ const _T = /* @__PURE__ */ ke(OT, [["render", DT]]), ET = { class: "overflow-aut
|
|
|
5608
5612
|
E("tbody", RT, [
|
|
5609
5613
|
t.loading ? (x(), _($e, { key: 0 }, [
|
|
5610
5614
|
E("div", {
|
|
5611
|
-
class: q(["inset-0 z-10 absolute flex items-center justify-center", [u[$(
|
|
5615
|
+
class: q(["inset-0 z-10 absolute flex items-center justify-center", [u[$(ae).theme]]])
|
|
5612
5616
|
}, [
|
|
5613
5617
|
ce(ji, { class: "w-6 h-6" })
|
|
5614
5618
|
], 2),
|
|
@@ -5630,7 +5634,7 @@ const _T = /* @__PURE__ */ ke(OT, [["render", DT]]), ET = { class: "overflow-aut
|
|
|
5630
5634
|
class: q(["tr group border-b last:border-b-0 overflow-hidden", {
|
|
5631
5635
|
"is-odd": v % 2 == 0,
|
|
5632
5636
|
"is-even": v % 2 != 0,
|
|
5633
|
-
[o[$(
|
|
5637
|
+
[o[$(ae).theme]]: !0
|
|
5634
5638
|
// [trStripeColors[config.theme]]: stripe
|
|
5635
5639
|
}])
|
|
5636
5640
|
}, [
|
|
@@ -5667,8 +5671,8 @@ const _T = /* @__PURE__ */ ke(OT, [["render", DT]]), ET = { class: "overflow-aut
|
|
|
5667
5671
|
class: q(["py-3 first:pl-6 pr-6 lg:text-base h-full table-cell", {
|
|
5668
5672
|
"text-sm lg:text-sm !py-1": t.small,
|
|
5669
5673
|
"sticky left-0 shadow": ne === 0,
|
|
5670
|
-
[`${l[$(
|
|
5671
|
-
[`${c[$(
|
|
5674
|
+
[`${l[$(ae).theme]}`]: !0,
|
|
5675
|
+
[`${c[$(ae).theme]}`]: t.stripe,
|
|
5672
5676
|
"first:pl-0 last:pr-0": t.noXPadding,
|
|
5673
5677
|
"last:rounded-br-lg": v === ((Q = t.data) == null ? void 0 : Q.length) - 1 && !t.totalItem && !p.value.find((z) => z.type == "expand"),
|
|
5674
5678
|
"first:rounded-bl-lg": v === ((I = t.data) == null ? void 0 : I.length) - 1 && !t.totalItem && !p.value.find((z) => z.type == "expand"),
|
|
@@ -5688,13 +5692,13 @@ const _T = /* @__PURE__ */ ke(OT, [["render", DT]]), ET = { class: "overflow-aut
|
|
|
5688
5692
|
p.value.find((L) => L.type == "expand") ? Nl((x(), _("tr", {
|
|
5689
5693
|
key: 0,
|
|
5690
5694
|
class: q([{
|
|
5691
|
-
[o[$(
|
|
5692
|
-
[a[$(
|
|
5695
|
+
[o[$(ae).theme]]: !t.stripe,
|
|
5696
|
+
[a[$(ae).theme]]: t.stripe
|
|
5693
5697
|
}, "tr border-b last:border-b-0 overflow-hidden"])
|
|
5694
5698
|
}, [
|
|
5695
5699
|
ce(ql, {
|
|
5696
5700
|
class: q(["py-3 first:pl-6 pr-6 lg:text-base", {
|
|
5697
|
-
[`${l[$(
|
|
5701
|
+
[`${l[$(ae).theme]}`]: !0,
|
|
5698
5702
|
"first:pl-0 last:pr-0": t.noXPadding,
|
|
5699
5703
|
"last:rounded-br-lg": v === ((S = t.data) == null ? void 0 : S.length) - 1 && !t.totalItem,
|
|
5700
5704
|
"first:rounded-bl-lg": v === ((A = t.data) == null ? void 0 : A.length) - 1 && !t.totalItem,
|
|
@@ -18041,8 +18045,8 @@ function MN(t) {
|
|
|
18041
18045
|
}
|
|
18042
18046
|
if (A)
|
|
18043
18047
|
for (var tt = p ? 3 : 1, wt = function(ut) {
|
|
18044
|
-
var H = y.find(function(
|
|
18045
|
-
var De = S.get(
|
|
18048
|
+
var H = y.find(function(le) {
|
|
18049
|
+
var De = S.get(le);
|
|
18046
18050
|
if (De)
|
|
18047
18051
|
return De.slice(0, ut).every(function(ye) {
|
|
18048
18052
|
return ye;
|
|
@@ -18174,7 +18178,7 @@ function IN(t) {
|
|
|
18174
18178
|
var I, z = y === "y" ? Dt : _t, W = y === "y" ? qt : Gt, j = y === "y" ? "height" : "width", P = v[y], ee = P + g[z], Te = P - g[W], tt = h ? -A[j] / 2 : 0, wt = k === Bi ? S[j] : A[j], Et = k === Bi ? -A[j] : -S[j], At = e.elements.arrow, Pe = h && At ? fu(At) : {
|
|
18175
18179
|
width: 0,
|
|
18176
18180
|
height: 0
|
|
18177
|
-
}, ut = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : ig(), H = ut[z],
|
|
18181
|
+
}, ut = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : ig(), H = ut[z], le = ut[W], De = ks(0, S[j], Pe[j]), ye = T ? S[j] / 2 - tt - De - H - L.mainAxis : wt - De - H - L.mainAxis, Ge = T ? -S[j] / 2 + tt + De + le + L.mainAxis : Et + De + le + L.mainAxis, Ke = e.elements.arrow && io(e.elements.arrow), kt = Ke ? y === "y" ? Ke.clientTop || 0 : Ke.clientLeft || 0 : 0, Cr = (I = ne == null ? void 0 : ne[y]) != null ? I : 0, ni = P + ye - Cr - kt, Xn = P + Ge - Cr, Qn = ks(h ? ra(ee, ni) : ee, P, h ? Wr(Te, Xn) : Te);
|
|
18178
18182
|
v[y] = Qn, Q[y] = Qn - P;
|
|
18179
18183
|
}
|
|
18180
18184
|
if (a) {
|
|
@@ -18884,7 +18888,7 @@ function k$(t, e) {
|
|
|
18884
18888
|
var w = z();
|
|
18885
18889
|
w.removeEventListener("mousedown", Et, !0), w.removeEventListener("touchend", Et, Ar), w.removeEventListener("touchstart", Pe, Ar), w.removeEventListener("touchmove", At, Ar);
|
|
18886
18890
|
}
|
|
18887
|
-
function
|
|
18891
|
+
function le(w, B) {
|
|
18888
18892
|
ye(w, function() {
|
|
18889
18893
|
!y.state.isVisible && v.parentNode && v.parentNode.contains(v) && B();
|
|
18890
18894
|
});
|
|
@@ -19129,7 +19133,7 @@ function k$(t, e) {
|
|
|
19129
19133
|
var se = W(), fe = se.box, _e = se.content;
|
|
19130
19134
|
y.props.animation && (wl([fe, _e], re), Jf([fe, _e], "hidden"));
|
|
19131
19135
|
}
|
|
19132
|
-
Te(), tt(), y.props.animation ? Q() &&
|
|
19136
|
+
Te(), tt(), y.props.animation ? Q() && le(re, y.unmount) : y.unmount();
|
|
19133
19137
|
}
|
|
19134
19138
|
}
|
|
19135
19139
|
function R(w) {
|
|
@@ -21331,7 +21335,7 @@ const kP = /* @__PURE__ */ ke(gP, [["render", wP]]), xP = { class: "py-1 px-1 bo
|
|
|
21331
21335
|
}
|
|
21332
21336
|
return (c, u) => $(o) ? (x(), _("div", {
|
|
21333
21337
|
key: 0,
|
|
21334
|
-
class: q(["pt-px relative flex flex-col rounded border", r[$(
|
|
21338
|
+
class: q(["pt-px relative flex flex-col rounded border", r[$(ae).theme]])
|
|
21335
21339
|
}, [
|
|
21336
21340
|
E("div", xP, [
|
|
21337
21341
|
E("div", SP, [
|
|
@@ -24080,17 +24084,17 @@ const _l = {
|
|
|
24080
24084
|
}, [
|
|
24081
24085
|
E("div", {
|
|
24082
24086
|
class: q(["h-8 w-full flex justify-center items-center", {
|
|
24083
|
-
[`${r[$(
|
|
24084
|
-
[`${i[$(
|
|
24085
|
-
[`${s[$(
|
|
24086
|
-
[`${o[$(
|
|
24087
|
+
[`${r[$(ae).theme]}`]: t.between,
|
|
24088
|
+
[`${i[$(ae).theme]}`]: t.firstDay,
|
|
24089
|
+
[`${s[$(ae).theme]}`]: t.lastDay,
|
|
24090
|
+
[`${o[$(ae).theme]}`]: t.highlight
|
|
24087
24091
|
}]),
|
|
24088
24092
|
style: or({ marginLeft: t.firstDay ? "50%" : void 0, marginRight: t.lastDay ? "50%" : void 0 })
|
|
24089
24093
|
}, [
|
|
24090
24094
|
E("span", {
|
|
24091
24095
|
class: q(["absolute w-8 h-8 flex items-center justify-center dark:text-gray-400", {
|
|
24092
|
-
[`${e[$(
|
|
24093
|
-
[`${n[$(
|
|
24096
|
+
[`${e[$(ae).theme]}`]: !0,
|
|
24097
|
+
[`${n[$(ae).theme]}`]: t.highlight && (t.firstDay || t.lastDay)
|
|
24094
24098
|
}]),
|
|
24095
24099
|
style: { left: "50%", transform: "translateX(-50%)" }
|
|
24096
24100
|
}, [
|
|
@@ -24531,7 +24535,7 @@ const gL = /* @__PURE__ */ ke(dL, [["render", mL]]), yL = { class: "flex gap-3"
|
|
|
24531
24535
|
"translate-x-0": t.visible,
|
|
24532
24536
|
"translate-x-full": !t.visible,
|
|
24533
24537
|
[t.options.width]: !0,
|
|
24534
|
-
[r[$(
|
|
24538
|
+
[r[$(ae).theme]]: !0
|
|
24535
24539
|
}])
|
|
24536
24540
|
}, [
|
|
24537
24541
|
E("div", {
|
|
@@ -24641,11 +24645,13 @@ const gL = /* @__PURE__ */ ke(dL, [["render", mL]]), yL = { class: "flex gap-3"
|
|
|
24641
24645
|
E("div", _L, [
|
|
24642
24646
|
(x(!0), _($e, null, ft(i.value, (u) => (x(), _("div", {
|
|
24643
24647
|
key: u.name,
|
|
24644
|
-
class: q(["border-b items-center flex leading-snug cursor-pointer py-3 px-6 -mb-[2px] font-medium
|
|
24648
|
+
class: q(["border-b items-center flex leading-snug cursor-pointer py-3 px-6 -mb-[2px] font-medium", {
|
|
24645
24649
|
"dark:border-gray-930": u.name != t.modelValue,
|
|
24646
|
-
"border-b-2 text-lime-500 border-b-lime-500": u.name === t.modelValue
|
|
24650
|
+
"border-b-2 text-lime-500 border-b-lime-500": u.name === t.modelValue,
|
|
24651
|
+
"text-gray-500 dark:text-gray-500": !u.disabled,
|
|
24652
|
+
"text-gray-300 dark:text-gray-700": u.disabled
|
|
24647
24653
|
}]),
|
|
24648
|
-
onClick: (d) => s(u.name)
|
|
24654
|
+
onClick: (d) => u.disabled ? null : s(u.name)
|
|
24649
24655
|
}, [
|
|
24650
24656
|
Oe(l.$slots, "label", {}, () => [
|
|
24651
24657
|
E("span", {
|
|
@@ -24671,14 +24677,16 @@ const gL = /* @__PURE__ */ ke(dL, [["render", mL]]), yL = { class: "flex gap-3"
|
|
|
24671
24677
|
type: String,
|
|
24672
24678
|
required: !0
|
|
24673
24679
|
},
|
|
24674
|
-
noStyle: Boolean
|
|
24680
|
+
noStyle: Boolean,
|
|
24681
|
+
disabled: Boolean
|
|
24675
24682
|
},
|
|
24676
24683
|
setup(t) {
|
|
24677
24684
|
const e = t, n = de(!1), r = Ms("addTab"), i = Ms("modelValue");
|
|
24678
24685
|
return Kn(() => {
|
|
24679
24686
|
r({
|
|
24680
24687
|
label: e.label,
|
|
24681
|
-
name: e.name
|
|
24688
|
+
name: e.name,
|
|
24689
|
+
disabled: e.disabled
|
|
24682
24690
|
});
|
|
24683
24691
|
}), pt(
|
|
24684
24692
|
() => i.value,
|
|
@@ -24883,7 +24891,7 @@ const v3 = {
|
|
|
24883
24891
|
useConfirm: v0
|
|
24884
24892
|
};
|
|
24885
24893
|
function b3(t, e) {
|
|
24886
|
-
b0(
|
|
24894
|
+
b0(ae, e);
|
|
24887
24895
|
for (const n in Al)
|
|
24888
24896
|
if (Al.hasOwnProperty(n)) {
|
|
24889
24897
|
const r = Al[n];
|
|
@@ -24893,7 +24901,7 @@ function b3(t, e) {
|
|
|
24893
24901
|
const x3 = {
|
|
24894
24902
|
install: b3,
|
|
24895
24903
|
composables: v3,
|
|
24896
|
-
options:
|
|
24904
|
+
options: ae
|
|
24897
24905
|
};
|
|
24898
24906
|
export {
|
|
24899
24907
|
x3 as default,
|