@cyberpunk-vue/components 1.9.12 → 1.9.13
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/card/src/card.vue.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +66 -61
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1830,46 +1830,51 @@ var ae = {
|
|
|
1830
1830
|
h(), m = setTimeout(() => {
|
|
1831
1831
|
p.value = !1, m = null;
|
|
1832
1832
|
}, pt);
|
|
1833
|
-
}, C = T(!0), w = r(() => i.collapse !== void 0),
|
|
1834
|
-
|
|
1833
|
+
}, C = T(!0), w = T(!0), E = r(() => i.collapse !== void 0), D = r(() => E.value ? i.collapse : i.showCollapseAction && i.halfCollapse ? C.value && w.value : !1), k = () => {
|
|
1834
|
+
E.value || (C.value = !C.value);
|
|
1835
1835
|
};
|
|
1836
|
-
R(
|
|
1836
|
+
R(D, (e, t) => {
|
|
1837
1837
|
if (e) {
|
|
1838
1838
|
p.value = !1, h();
|
|
1839
1839
|
return;
|
|
1840
1840
|
}
|
|
1841
1841
|
t && (p.value = !0, g());
|
|
1842
1842
|
});
|
|
1843
|
-
let
|
|
1844
|
-
|
|
1845
|
-
},
|
|
1846
|
-
function
|
|
1843
|
+
let A = (e) => {
|
|
1844
|
+
D.value || !p.value || e.target === e.currentTarget && e.propertyName === "grid-template-rows" && (p.value = !1, h());
|
|
1845
|
+
}, M = T(), P = T(null), I = null;
|
|
1846
|
+
function z() {
|
|
1847
1847
|
let e = i.peekHeight;
|
|
1848
1848
|
return typeof e == "number" ? e : parseFloat(e) || 80;
|
|
1849
1849
|
}
|
|
1850
|
-
function z() {
|
|
1851
|
-
if (!i.halfCollapse || !A.value) return;
|
|
1852
|
-
let e = A.value.scrollHeight > I();
|
|
1853
|
-
M.value !== e && (M.value = e, c("collapse-change", { needed: e }));
|
|
1854
|
-
}
|
|
1855
1850
|
function H() {
|
|
1856
|
-
|
|
1851
|
+
if (!i.halfCollapse || !M.value) return;
|
|
1852
|
+
let e = M.value.scrollHeight > z();
|
|
1853
|
+
w.value !== e && (w.value = e, c("collapse-change", { needed: e }));
|
|
1857
1854
|
}
|
|
1858
1855
|
function U() {
|
|
1859
|
-
|
|
1856
|
+
M.value && (P.value = M.value.scrollHeight);
|
|
1857
|
+
}
|
|
1858
|
+
function W() {
|
|
1859
|
+
K(), !(!i.halfCollapse || !M.value) && (I = new ResizeObserver(() => {
|
|
1860
|
+
H(), U();
|
|
1861
|
+
}), I.observe(M.value));
|
|
1862
|
+
}
|
|
1863
|
+
function K() {
|
|
1864
|
+
I &&= (I.disconnect(), null);
|
|
1860
1865
|
}
|
|
1861
1866
|
R(() => i.halfCollapse, (e) => {
|
|
1862
1867
|
e ? _(() => {
|
|
1863
|
-
|
|
1864
|
-
}) : (
|
|
1865
|
-
}), R(() => i.peekHeight, () =>
|
|
1868
|
+
W(), H();
|
|
1869
|
+
}) : (K(), w.value = !0);
|
|
1870
|
+
}), R(() => i.peekHeight, () => H()), x(() => {
|
|
1866
1871
|
i.halfCollapse && _(() => {
|
|
1867
|
-
H(),
|
|
1872
|
+
W(), H(), U();
|
|
1868
1873
|
});
|
|
1869
1874
|
}), b(() => {
|
|
1870
|
-
h(),
|
|
1875
|
+
h(), K();
|
|
1871
1876
|
});
|
|
1872
|
-
let
|
|
1877
|
+
let q = r(() => i.showCollapseAction && i.halfCollapse && w.value), J = r(() => [
|
|
1873
1878
|
f.b(),
|
|
1874
1879
|
f.m(i.variant),
|
|
1875
1880
|
f.m(`shape-${i.shape}`),
|
|
@@ -1879,54 +1884,54 @@ var ae = {
|
|
|
1879
1884
|
f.is("dimmed", i.dimmed),
|
|
1880
1885
|
f.is("trigger-image-hover", i.triggerImageHover),
|
|
1881
1886
|
f.is("hover-scale", i.hoverScale),
|
|
1882
|
-
f.is("collapse-size-locked",
|
|
1883
|
-
f.is("collapsed",
|
|
1884
|
-
f.is("half-collapsed",
|
|
1887
|
+
f.is("collapse-size-locked", D.value || p.value),
|
|
1888
|
+
f.is("collapsed", D.value),
|
|
1889
|
+
f.is("half-collapsed", D.value && i.halfCollapse),
|
|
1885
1890
|
f.is("loading", i.loading),
|
|
1886
1891
|
f.is("disabled", i.disabled)
|
|
1887
|
-
]),
|
|
1892
|
+
]), X = r(() => [f.e("container"), i.backgroundClass]), Z = r(() => i.color ? i.color : i.type && i.type !== "default" ? `var(--cp-color-${i.type})` : null), ee = r(() => i.color ? `color-mix(in srgb, ${i.color} 30%, transparent)` : i.type && i.type !== "default" ? `var(--cp-color-${i.type}-light)` : null), te = r(() => {
|
|
1888
1893
|
let e = {};
|
|
1889
|
-
|
|
1894
|
+
Z.value && (e["--cp-card-color"] = Z.value), ee.value && (e["--cp-card-color-light"] = ee.value), i.bgColor && (e["--cp-card-bg"] = i.bgColor), i.borderColor && (e["--cp-card-border-color"] = i.borderColor), i.dividerColor && (e["--cp-card-divider-color"] = i.dividerColor), i.headerDividerColor && (e["--cp-card-header-divider-color"] = i.headerDividerColor), i.footerDividerColor && (e["--cp-card-footer-divider-color"] = i.footerDividerColor), i.shadowColor ? e["--cp-card-shadow-color"] = i.shadowColor : Z.value && (e["--cp-card-shadow-color"] = `color-mix(in srgb, ${Z.value} 40%, black)`);
|
|
1890
1895
|
let t = G(i.dimmedDuration);
|
|
1891
1896
|
if (t && (e["--cp-card-dimmed-duration"] = t), i.halfCollapse) {
|
|
1892
1897
|
let t = i.peekHeight;
|
|
1893
|
-
e["--cp-card-peek-height"] = typeof t == "number" ? `${t}px` : t;
|
|
1898
|
+
e["--cp-card-peek-height"] = typeof t == "number" ? `${t}px` : t, P.value !== null && (e["--cp-card-expanded-height"] = `${P.value}px`);
|
|
1894
1899
|
}
|
|
1895
1900
|
return e;
|
|
1896
|
-
}),
|
|
1901
|
+
}), ne = r(() => {
|
|
1897
1902
|
let e = typeof i.bodyStyle == "string" ? {} : { ...i.bodyStyle };
|
|
1898
1903
|
return i.bodyPadding && (e.padding = i.bodyPadding), e;
|
|
1899
|
-
}),
|
|
1904
|
+
}), Q = r(() => !!(i.title || d.header || d.title || d.extra)), re = r(() => !D.value || Q.value), $ = r(() => !!d.footer), ie = r(() => !!d.overlay), ae = r(() => [
|
|
1900
1905
|
f.e("header"),
|
|
1901
1906
|
f.is("bordered", i.headerBorder),
|
|
1902
1907
|
i.headerClass
|
|
1903
|
-
]),
|
|
1908
|
+
]), oe = r(() => [f.e("footer"), f.is("bordered", i.footerBorder)]), se = r(() => i.actionEffect ?? i.overlayEffect), ce = r(() => i.actionColor ?? i.overlayColor), le = r(() => i.actionBlur ?? i.overlayBlur), ue = r(() => [
|
|
1904
1909
|
f.e("overlay"),
|
|
1905
1910
|
f.bem("", "overlay", i.overlayAnimation),
|
|
1906
1911
|
f.bem("", "overlay", i.overlayPosition),
|
|
1907
|
-
f.bem("", "overlay", `effect-${
|
|
1908
|
-
]),
|
|
1912
|
+
f.bem("", "overlay", `effect-${se.value}`)
|
|
1913
|
+
]), de = r(() => [f.e("overlay-backdrop"), f.bem("", "overlay-backdrop", `effect-${i.overlayEffect}`)]), fe = (e) => e === void 0 ? "10px" : typeof e == "number" ? `${e}px` : e, pe = r(() => ({
|
|
1909
1914
|
"--cp-card-overlay-duration": G(i.overlayDuration),
|
|
1910
1915
|
"--cp-card-overlay-color": i.overlayColor,
|
|
1911
|
-
"--cp-card-overlay-blur":
|
|
1912
|
-
"--cp-card-action-color":
|
|
1913
|
-
"--cp-card-action-blur":
|
|
1914
|
-
})),
|
|
1916
|
+
"--cp-card-overlay-blur": fe(i.overlayBlur),
|
|
1917
|
+
"--cp-card-action-color": ce.value,
|
|
1918
|
+
"--cp-card-action-blur": fe(le.value)
|
|
1919
|
+
})), me = r(() => [f.e("loading-overlay"), i.loadingClass]);
|
|
1915
1920
|
return (e, t) => V((S(), o("div", {
|
|
1916
|
-
class: v(
|
|
1917
|
-
style: y(
|
|
1921
|
+
class: v(J.value),
|
|
1922
|
+
style: y(te.value)
|
|
1918
1923
|
}, [s("div", {
|
|
1919
|
-
class: v(
|
|
1924
|
+
class: v(X.value),
|
|
1920
1925
|
style: y(e.backgroundStyle)
|
|
1921
1926
|
}, [
|
|
1922
1927
|
e.$slots.cover ? (S(), o("div", {
|
|
1923
1928
|
key: 0,
|
|
1924
1929
|
class: v(N(f).e("collapse-transition")),
|
|
1925
|
-
onTransitionend:
|
|
1930
|
+
onTransitionend: A
|
|
1926
1931
|
}, [s("div", { class: v(N(f).e("collapse-inner")) }, [s("div", { class: v(N(f).e("cover")) }, [O(e.$slots, "cover")], 2)], 2)], 34)) : a("", !0),
|
|
1927
|
-
|
|
1932
|
+
Q.value ? (S(), o("div", {
|
|
1928
1933
|
key: 1,
|
|
1929
|
-
class: v(
|
|
1934
|
+
class: v(ae.value),
|
|
1930
1935
|
style: y(e.headerStyle)
|
|
1931
1936
|
}, [O(e.$slots, "header", {}, () => [s("div", { class: v(N(f).e("title")) }, [O(e.$slots, "title", {}, () => [l(j(e.title), 1)])], 2), N(d).extra ? (S(), o("div", {
|
|
1932
1937
|
key: 0,
|
|
@@ -1934,51 +1939,51 @@ var ae = {
|
|
|
1934
1939
|
}, [O(e.$slots, "extra")], 2)) : a("", !0)])], 6)) : a("", !0),
|
|
1935
1940
|
s("div", {
|
|
1936
1941
|
class: v(N(f).e("collapse-transition")),
|
|
1937
|
-
onTransitionend:
|
|
1942
|
+
onTransitionend: A
|
|
1938
1943
|
}, [s("div", {
|
|
1939
1944
|
ref_key: "collapseInnerRef",
|
|
1940
|
-
ref:
|
|
1945
|
+
ref: M,
|
|
1941
1946
|
class: v(N(f).e("collapse-inner"))
|
|
1942
1947
|
}, [s("div", {
|
|
1943
1948
|
class: v([N(f).e("body"), e.bodyClass]),
|
|
1944
|
-
style: y(
|
|
1945
|
-
}, [O(e.$slots, "default")], 6),
|
|
1949
|
+
style: y(ne.value)
|
|
1950
|
+
}, [O(e.$slots, "default")], 6), $.value ? (S(), o("div", {
|
|
1946
1951
|
key: 0,
|
|
1947
|
-
class: v(
|
|
1952
|
+
class: v(oe.value)
|
|
1948
1953
|
}, [O(e.$slots, "footer")], 2)) : a("", !0)], 2)], 34),
|
|
1949
|
-
|
|
1954
|
+
q.value ? (S(), o("div", {
|
|
1950
1955
|
key: 2,
|
|
1951
1956
|
class: v(N(f).e("collapse-action"))
|
|
1952
1957
|
}, [O(e.$slots, "collapse-action", {
|
|
1953
|
-
collapsed:
|
|
1954
|
-
needed:
|
|
1955
|
-
toggle:
|
|
1958
|
+
collapsed: D.value,
|
|
1959
|
+
needed: w.value,
|
|
1960
|
+
toggle: k
|
|
1956
1961
|
}, () => [s("div", {
|
|
1957
1962
|
class: v(N(f).e("collapse-action-default")),
|
|
1958
|
-
onClick:
|
|
1959
|
-
}, [s("span", { class: v(N(f).e("collapse-action-text")) }, j(
|
|
1960
|
-
|
|
1963
|
+
onClick: k
|
|
1964
|
+
}, [s("span", { class: v(N(f).e("collapse-action-text")) }, j(D.value ? e.collapseActionExpandText : e.collapseActionCollapseText), 3), s("span", { class: v([N(f).e("collapse-action-icon"), { "is-expanded": !D.value }]) }, "▼", 2)], 2)])], 2)) : a("", !0),
|
|
1965
|
+
ie.value ? (S(), o("div", {
|
|
1961
1966
|
key: 3,
|
|
1962
|
-
class: v(
|
|
1963
|
-
style: y(
|
|
1967
|
+
class: v(de.value),
|
|
1968
|
+
style: y(pe.value)
|
|
1964
1969
|
}, null, 6)) : a("", !0),
|
|
1965
|
-
|
|
1970
|
+
ie.value ? (S(), o("div", {
|
|
1966
1971
|
key: 4,
|
|
1967
|
-
class: v(
|
|
1968
|
-
style: y(
|
|
1972
|
+
class: v(ue.value),
|
|
1973
|
+
style: y(pe.value)
|
|
1969
1974
|
}, [O(e.$slots, "overlay")], 6)) : a("", !0),
|
|
1970
1975
|
u(n, { name: "cp-card-loading" }, {
|
|
1971
1976
|
default: B(() => [e.loading ? (S(), o("div", {
|
|
1972
1977
|
key: 0,
|
|
1973
|
-
class: v(
|
|
1978
|
+
class: v(me.value),
|
|
1974
1979
|
style: y(e.loadingStyle)
|
|
1975
|
-
}, [O(e.$slots, "loading", {}, () => [u(N(he), { color:
|
|
1980
|
+
}, [O(e.$slots, "loading", {}, () => [u(N(he), { color: Z.value || void 0 }, null, 8, ["color"]), e.loadingText ? (S(), o("span", {
|
|
1976
1981
|
key: 0,
|
|
1977
1982
|
class: v(N(f).e("loading-text"))
|
|
1978
1983
|
}, j(e.loadingText), 3)) : a("", !0)])], 6)) : a("", !0)]),
|
|
1979
1984
|
_: 3
|
|
1980
1985
|
})
|
|
1981
|
-
], 6)], 6)), [[L,
|
|
1986
|
+
], 6)], 6)), [[L, re.value]]);
|
|
1982
1987
|
}
|
|
1983
1988
|
})), ht = {
|
|
1984
1989
|
type: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyberpunk-vue/components",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.13",
|
|
4
4
|
"description": "Cyberpunk Vue components - A futuristic Vue 3 component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"vue": "^3.5.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@cyberpunk-vue/hooks": "1.9.
|
|
27
|
-
"@cyberpunk-vue/theme-chalk": "1.9.
|
|
28
|
-
"@cyberpunk-vue/constants": "1.9.
|
|
26
|
+
"@cyberpunk-vue/hooks": "1.9.13",
|
|
27
|
+
"@cyberpunk-vue/theme-chalk": "1.9.13",
|
|
28
|
+
"@cyberpunk-vue/constants": "1.9.13"
|
|
29
29
|
},
|
|
30
30
|
"author": "Juxest",
|
|
31
31
|
"license": "MIT",
|