@lumx/vue 4.25.1-alpha.0 → 4.25.1-alpha.1
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/index.js +60 -50
- package/index.js.map +1 -1
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColorVariant as Qd, Size as ct, VISUALLY_HIDDEN as ef, DIALOG_TRANSITION_DURATION as yc, AspectRatio as Nc, Typography as tf, IS_BROWSER as cs, ColorPalette as nf } from "@lumx/core/js/constants";
|
|
2
2
|
export * from "@lumx/core/js/constants";
|
|
3
3
|
export * from "@lumx/core/js/types";
|
|
4
|
-
import { createVNode as m, mergeProps as A, Fragment as oe, isVNode as U, useAttrs as F, computed as P, toValue as je, getCurrentScope as Ac, onScopeDispose as Ar, toRef as
|
|
4
|
+
import { createVNode as m, mergeProps as A, Fragment as oe, isVNode as U, useAttrs as F, computed as P, toValue as je, getCurrentScope as Ac, onScopeDispose as Ar, toRef as Q, readonly as af, customRef as of, ref as B, shallowRef as He, watch as J, getCurrentInstance as Oc, onMounted as Je, inject as Ne, defineComponent as I, toRefs as rf, reactive as Cc, provide as Me, watchEffect as Ue, onUnmounted as we, isRef as ft, watchPostEffect as sf, onBeforeUnmount as on, Comment as Or, unref as xt, useSlots as $e, Text as Cr, useTemplateRef as lf, toRaw as Qe, nextTick as Pc, shallowReadonly as st, h as us, cloneVNode as cf, onWatcherCleanup as uf, createTextVNode as Sc, withDirectives as df, resolveDirective as ff } from "vue";
|
|
5
5
|
import { classNames as he } from "@lumx/core/js/utils";
|
|
6
6
|
import { k as L, g as M, u as Y, C as Pr, T as Sr, P as rn, I as wc } from "./_internal/GIQod6ql.js";
|
|
7
7
|
import { getDisabledState as hf } from "@lumx/core/js/utils/disabledState";
|
|
@@ -354,7 +354,7 @@ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
|
354
354
|
const Rc = (e) => e != null, Gt = () => {
|
|
355
355
|
};
|
|
356
356
|
function Uf(...e) {
|
|
357
|
-
if (e.length !== 1) return
|
|
357
|
+
if (e.length !== 1) return Q(...e);
|
|
358
358
|
const t = e[0];
|
|
359
359
|
return typeof t == "function" ? af(of(() => ({
|
|
360
360
|
get: t,
|
|
@@ -1818,7 +1818,7 @@ const xi = I({
|
|
|
1818
1818
|
}
|
|
1819
1819
|
}), cu = "Icon", ym = "lumx-icon", uu = ym, {
|
|
1820
1820
|
block: Nm
|
|
1821
|
-
} = q(uu), Am = {},
|
|
1821
|
+
} = q(uu), Am = {}, ee = (e) => {
|
|
1822
1822
|
const {
|
|
1823
1823
|
className: t,
|
|
1824
1824
|
color: n,
|
|
@@ -1867,14 +1867,14 @@ const xi = I({
|
|
|
1867
1867
|
fill: "currentColor"
|
|
1868
1868
|
}, null)])]);
|
|
1869
1869
|
};
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1870
|
+
ee.displayName = cu;
|
|
1871
|
+
ee.className = uu;
|
|
1872
|
+
ee.defaultProps = Am;
|
|
1873
1873
|
const ze = /* @__PURE__ */ I((e) => {
|
|
1874
1874
|
const t = F(), n = Y({
|
|
1875
1875
|
defaultTheme: void 0
|
|
1876
1876
|
}), a = D(() => e.class);
|
|
1877
|
-
return () => m(
|
|
1877
|
+
return () => m(ee, A(e, t, {
|
|
1878
1878
|
className: a.value,
|
|
1879
1879
|
theme: e.theme || n.value
|
|
1880
1880
|
}), null);
|
|
@@ -2326,7 +2326,7 @@ const Um = "Thumbnail", Gm = "lumx-thumbnail", {
|
|
|
2326
2326
|
loading: y
|
|
2327
2327
|
}), null), !H && z && m("span", {
|
|
2328
2328
|
className: St("fallback")
|
|
2329
|
-
}, [Z ?
|
|
2329
|
+
}, [Z ? ee({
|
|
2330
2330
|
icon: l,
|
|
2331
2331
|
size: ct.xxs,
|
|
2332
2332
|
theme: S
|
|
@@ -2415,12 +2415,12 @@ const Jm = {
|
|
|
2415
2415
|
} = re(P(() => ({
|
|
2416
2416
|
...e,
|
|
2417
2417
|
...a
|
|
2418
|
-
}))), h = Xm(
|
|
2419
|
-
image:
|
|
2420
|
-
aspectRatio:
|
|
2421
|
-
focusPoint:
|
|
2422
|
-
width:
|
|
2423
|
-
height:
|
|
2418
|
+
}))), h = Xm(Q(() => e.image), s), f = P(() => h.value === "isLoaded"), g = Zm({
|
|
2419
|
+
image: Q(() => e.image),
|
|
2420
|
+
aspectRatio: Q(() => e.aspectRatio),
|
|
2421
|
+
focusPoint: Q(() => e.focusPoint),
|
|
2422
|
+
width: Q(() => typeof e.imgProps?.width == "number" ? e.imgProps.width : void 0),
|
|
2423
|
+
height: Q(() => typeof e.imgProps?.height == "number" ? e.imgProps.height : void 0),
|
|
2424
2424
|
element: s,
|
|
2425
2425
|
isLoaded: f
|
|
2426
2426
|
}), p = (v) => {
|
|
@@ -3396,7 +3396,7 @@ const Nu = "IconButton", gp = "lumx-icon-button", dr = {
|
|
|
3396
3396
|
} = e, i = n ? m("img", {
|
|
3397
3397
|
alt: "",
|
|
3398
3398
|
src: n
|
|
3399
|
-
}, null) :
|
|
3399
|
+
}, null) : ee({
|
|
3400
3400
|
icon: a
|
|
3401
3401
|
});
|
|
3402
3402
|
return Mt({
|
|
@@ -5380,7 +5380,7 @@ const Qg = (e) => {
|
|
|
5380
5380
|
} = e, z = (O || "").length, Z = z > 0, k = p ? p - z : 0, j = p ? m("span", {
|
|
5381
5381
|
className: fe("char-counter"),
|
|
5382
5382
|
role: "status"
|
|
5383
|
-
}, [N ? N(k) : k, k === 0 &&
|
|
5383
|
+
}, [N ? N(k) : k, k === 0 && ee({
|
|
5384
5384
|
icon: Tt,
|
|
5385
5385
|
size: V.xxs
|
|
5386
5386
|
})]) : void 0;
|
|
@@ -5414,7 +5414,7 @@ const Qg = (e) => {
|
|
|
5414
5414
|
})]), m("div", {
|
|
5415
5415
|
className: fe("wrapper"),
|
|
5416
5416
|
ref: b
|
|
5417
|
-
}, [l &&
|
|
5417
|
+
}, [l && ee({
|
|
5418
5418
|
className: fe("input-icon"),
|
|
5419
5419
|
color: T === ge.dark ? "light" : void 0,
|
|
5420
5420
|
icon: l,
|
|
@@ -5423,7 +5423,7 @@ const Qg = (e) => {
|
|
|
5423
5423
|
className: fe("chips")
|
|
5424
5424
|
}, [t, _]) : m("div", {
|
|
5425
5425
|
className: fe("input-wrapper")
|
|
5426
|
-
}, [_]), (d || s) &&
|
|
5426
|
+
}, [_]), (d || s) && ee({
|
|
5427
5427
|
className: fe("input-validity"),
|
|
5428
5428
|
color: T === ge.dark ? "light" : void 0,
|
|
5429
5429
|
icon: d ? sn : Tt,
|
|
@@ -5914,7 +5914,7 @@ const Av = {
|
|
|
5914
5914
|
d.value = b;
|
|
5915
5915
|
});
|
|
5916
5916
|
}), J(
|
|
5917
|
-
|
|
5917
|
+
Q(e, "value"),
|
|
5918
5918
|
() => {
|
|
5919
5919
|
const y = s.value, v = u.value;
|
|
5920
5920
|
!y || !v || y.refilterOption(v);
|
|
@@ -6258,7 +6258,7 @@ const Kv = {
|
|
|
6258
6258
|
slots: n,
|
|
6259
6259
|
attrs: a
|
|
6260
6260
|
}) => {
|
|
6261
|
-
const o = D(() => e.class), r = P(() => xt(e.anchorRef)), s =
|
|
6261
|
+
const o = D(() => e.class), r = P(() => xt(e.anchorRef)), s = Q(e, "focusElement"), {
|
|
6262
6262
|
styles: i,
|
|
6263
6263
|
isPositioned: l,
|
|
6264
6264
|
position: c,
|
|
@@ -6267,16 +6267,16 @@ const Kv = {
|
|
|
6267
6267
|
} = Uv({
|
|
6268
6268
|
anchorRef: r,
|
|
6269
6269
|
boundaryRef: P(() => xt(e.boundaryRef)),
|
|
6270
|
-
offset:
|
|
6271
|
-
hasArrow:
|
|
6272
|
-
fitToAnchorWidth:
|
|
6273
|
-
fitWithinViewportHeight:
|
|
6274
|
-
width:
|
|
6275
|
-
minWidth:
|
|
6276
|
-
maxWidth:
|
|
6277
|
-
height:
|
|
6278
|
-
minHeight:
|
|
6279
|
-
maxHeight:
|
|
6270
|
+
offset: Q(e, "offset"),
|
|
6271
|
+
hasArrow: Q(e, "hasArrow"),
|
|
6272
|
+
fitToAnchorWidth: Q(e, "fitToAnchorWidth"),
|
|
6273
|
+
fitWithinViewportHeight: Q(e, "fitWithinViewportHeight"),
|
|
6274
|
+
width: Q(e, "width"),
|
|
6275
|
+
minWidth: Q(e, "minWidth"),
|
|
6276
|
+
maxWidth: Q(e, "maxWidth"),
|
|
6277
|
+
height: Q(e, "height"),
|
|
6278
|
+
minHeight: Q(e, "minHeight"),
|
|
6279
|
+
maxHeight: Q(e, "maxHeight"),
|
|
6280
6280
|
placement: P(() => e.placement || Kt.placement),
|
|
6281
6281
|
style: P(() => {
|
|
6282
6282
|
}),
|
|
@@ -6792,7 +6792,7 @@ const cd = /* @__PURE__ */ I((e) => {
|
|
|
6792
6792
|
className: Yi("title"),
|
|
6793
6793
|
id: u
|
|
6794
6794
|
}, {
|
|
6795
|
-
default: () => [o &&
|
|
6795
|
+
default: () => [o && ee({
|
|
6796
6796
|
icon: o
|
|
6797
6797
|
}), a]
|
|
6798
6798
|
}), m("ul", A(r, {
|
|
@@ -7817,7 +7817,7 @@ const $y = "Card", Ly = "lumx-card", {
|
|
|
7817
7817
|
className: De("input-background")
|
|
7818
7818
|
}, null), m("div", {
|
|
7819
7819
|
className: De("input-indicator")
|
|
7820
|
-
}, [
|
|
7820
|
+
}, [ee({
|
|
7821
7821
|
icon: v ? bf : vf
|
|
7822
7822
|
})])])]), m("div", {
|
|
7823
7823
|
className: De("content")
|
|
@@ -8459,7 +8459,7 @@ const Od = (e) => (t) => U(t) && t.type === e, iN = {
|
|
|
8459
8459
|
className: $(t, PN({
|
|
8460
8460
|
[`theme-${n}`]: !!n
|
|
8461
8461
|
}))
|
|
8462
|
-
}), [
|
|
8462
|
+
}), [ee({
|
|
8463
8463
|
icon: yf,
|
|
8464
8464
|
color: n === ge.dark ? X.light : X.dark,
|
|
8465
8465
|
size: V.xs
|
|
@@ -8633,7 +8633,7 @@ const MN = "Flag", $N = "lumx-flag", {
|
|
|
8633
8633
|
[`color-${c}`]: !!c,
|
|
8634
8634
|
"is-truncated": u
|
|
8635
8635
|
}))
|
|
8636
|
-
}), [n &&
|
|
8636
|
+
}), [n && ee({
|
|
8637
8637
|
icon: n,
|
|
8638
8638
|
size: V.xxs,
|
|
8639
8639
|
className: Yl("icon")
|
|
@@ -9613,7 +9613,7 @@ const TA = "MenuPopover", _A = "lumx-menu-popover", {
|
|
|
9613
9613
|
[`color-${c}`]: !!c,
|
|
9614
9614
|
"has-background": a
|
|
9615
9615
|
}))
|
|
9616
|
-
}), [(r || u) &&
|
|
9616
|
+
}), [(r || u) && ee({
|
|
9617
9617
|
className: Qo("icon"),
|
|
9618
9618
|
icon: r || u,
|
|
9619
9619
|
size: V.xs,
|
|
@@ -10236,7 +10236,7 @@ const QP = /* @__PURE__ */ I((e, {
|
|
|
10236
10236
|
className: Ot("background")
|
|
10237
10237
|
}, null), m("span", {
|
|
10238
10238
|
className: Ot("wrapper")
|
|
10239
|
-
}, [o &&
|
|
10239
|
+
}, [o && ee({
|
|
10240
10240
|
className: Ot("icon"),
|
|
10241
10241
|
icon: o,
|
|
10242
10242
|
size: V.s
|
|
@@ -10647,15 +10647,15 @@ const sS = /* @__PURE__ */ I((e, {
|
|
|
10647
10647
|
}), [m(u, A({
|
|
10648
10648
|
className: `${Xe}-wrapper`
|
|
10649
10649
|
}, d), {
|
|
10650
|
-
default: () => [a && !o &&
|
|
10650
|
+
default: () => [a && !o && ee({
|
|
10651
10651
|
className: `${Xe}-icon`,
|
|
10652
10652
|
icon: a,
|
|
10653
10653
|
size: V.xxs
|
|
10654
|
-
}), o && i === Ut.asc &&
|
|
10654
|
+
}), o && i === Ut.asc && ee({
|
|
10655
10655
|
className: `${Xe}-icon`,
|
|
10656
10656
|
icon: wf,
|
|
10657
10657
|
size: V.xxs
|
|
10658
|
-
}), o && i === Ut.desc &&
|
|
10658
|
+
}), o && i === Ut.desc && ee({
|
|
10659
10659
|
className: `${Xe}-icon`,
|
|
10660
10660
|
icon: Sf,
|
|
10661
10661
|
size: V.xxs
|
|
@@ -11327,19 +11327,26 @@ function Ud(e, t, n) {
|
|
|
11327
11327
|
}
|
|
11328
11328
|
return n ? String(le(n, e)) : "";
|
|
11329
11329
|
}
|
|
11330
|
+
const IC = ({
|
|
11331
|
+
selectionType: e,
|
|
11332
|
+
isSelected: t
|
|
11333
|
+
}) => {
|
|
11334
|
+
let n;
|
|
11335
|
+
if (e === "multiple")
|
|
11336
|
+
n = t ? Cf : Of;
|
|
11337
|
+
else if (e === "single")
|
|
11338
|
+
n = t ? sn : Pf;
|
|
11339
|
+
else
|
|
11340
|
+
return null;
|
|
11341
|
+
return m(ee, {
|
|
11342
|
+
icon: n,
|
|
11343
|
+
color: t ? "primary" : void 0,
|
|
11344
|
+
className: "lumx-combobox-option__selection-icon"
|
|
11345
|
+
}, null);
|
|
11346
|
+
};
|
|
11330
11347
|
function pc(e) {
|
|
11331
11348
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !U(e);
|
|
11332
11349
|
}
|
|
11333
|
-
function IC(e, t) {
|
|
11334
|
-
const n = t ? "primary" : void 0;
|
|
11335
|
-
return e === "multiple" ? Q({
|
|
11336
|
-
icon: t ? Cf : Of,
|
|
11337
|
-
color: n
|
|
11338
|
-
}) : e === "single" ? Q({
|
|
11339
|
-
icon: t ? sn : Pf,
|
|
11340
|
-
color: n
|
|
11341
|
-
}) : null;
|
|
11342
|
-
}
|
|
11343
11350
|
function rs(e, t) {
|
|
11344
11351
|
const {
|
|
11345
11352
|
options: n,
|
|
@@ -11378,7 +11385,10 @@ function rs(e, t) {
|
|
|
11378
11385
|
}
|
|
11379
11386
|
const h = i ? new Set((Array.isArray(i) ? i : [i]).map((f) => le(a, f))) : void 0;
|
|
11380
11387
|
return n?.map((f, g) => {
|
|
11381
|
-
const p = le(a || o, f), y = le(o || a, f) || p, v = r && le(r, f), b = h?.has(p) ?? !1, N = IC
|
|
11388
|
+
const p = le(a || o, f), y = le(o || a, f) || p, v = r && le(r, f), b = h?.has(p) ?? !1, N = m(IC, {
|
|
11389
|
+
selectionType: l,
|
|
11390
|
+
isSelected: b
|
|
11391
|
+
}, null);
|
|
11382
11392
|
return s ? s(f, {
|
|
11383
11393
|
index: g,
|
|
11384
11394
|
value: p,
|