@cyberpunk-vue/components 1.10.0 → 1.10.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/dist/index.mjs CHANGED
@@ -1842,39 +1842,45 @@ var ae = {
1842
1842
  });
1843
1843
  let A = (e) => {
1844
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() {
1845
+ }, M = T(), P = T(null), I = null, z = null;
1846
+ function H() {
1847
1847
  let e = i.peekHeight;
1848
1848
  return typeof e == "number" ? e : parseFloat(e) || 80;
1849
1849
  }
1850
- function H() {
1850
+ function U() {
1851
1851
  if (!i.halfCollapse || !M.value) return;
1852
- let e = M.value.scrollHeight > z();
1852
+ let e = M.value.scrollHeight > H();
1853
1853
  w.value !== e && (w.value = e, c("collapse-change", { needed: e }));
1854
1854
  }
1855
- function U() {
1856
- M.value && (P.value = M.value.scrollHeight);
1857
- }
1858
1855
  function W() {
1859
- K(), !(!i.halfCollapse || !M.value) && (I = new ResizeObserver(() => {
1860
- H(), U();
1861
- }), I.observe(M.value));
1856
+ M.value && (P.value = M.value.scrollHeight);
1862
1857
  }
1863
1858
  function K() {
1864
- I &&= (I.disconnect(), null);
1859
+ q(), !(!i.halfCollapse || !M.value) && (I = new ResizeObserver(() => {
1860
+ U(), W();
1861
+ }), I.observe(M.value), z = new MutationObserver(() => {
1862
+ U(), W();
1863
+ }), z.observe(M.value, {
1864
+ childList: !0,
1865
+ subtree: !0,
1866
+ characterData: !0
1867
+ }));
1868
+ }
1869
+ function q() {
1870
+ I &&= (I.disconnect(), null), z &&= (z.disconnect(), null);
1865
1871
  }
1866
1872
  R(() => i.halfCollapse, (e) => {
1867
1873
  e ? _(() => {
1868
- W(), H();
1869
- }) : (K(), w.value = !0);
1870
- }), R(() => i.peekHeight, () => H()), x(() => {
1874
+ K(), U();
1875
+ }) : (q(), w.value = !0);
1876
+ }), R(() => i.peekHeight, () => U()), x(() => {
1871
1877
  i.halfCollapse && _(() => {
1872
- W(), H(), U();
1878
+ K(), U(), W();
1873
1879
  });
1874
1880
  }), b(() => {
1875
- h(), K();
1881
+ h(), q();
1876
1882
  });
1877
- let q = r(() => i.showCollapseAction && i.halfCollapse && w.value), J = r(() => [
1883
+ let J = r(() => i.showCollapseAction && i.halfCollapse && w.value), X = r(() => [
1878
1884
  f.b(),
1879
1885
  f.m(i.variant),
1880
1886
  f.m(`shape-${i.shape}`),
@@ -1889,39 +1895,39 @@ var ae = {
1889
1895
  f.is("half-collapsed", D.value && i.halfCollapse),
1890
1896
  f.is("loading", i.loading),
1891
1897
  f.is("disabled", i.disabled)
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), Q = r(() => i.color ? `color-mix(in srgb, ${i.color} 30%, transparent)` : i.type && i.type !== "default" ? `var(--cp-color-${i.type}-light)` : null), ee = r(() => {
1898
+ ]), Z = r(() => [f.e("container"), i.backgroundClass]), Q = 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(() => {
1893
1899
  let e = {};
1894
- Z.value && (e["--cp-card-color"] = Z.value), Q.value && (e["--cp-card-color-light"] = Q.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)`);
1900
+ Q.value && (e["--cp-card-color"] = Q.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 : Q.value && (e["--cp-card-shadow-color"] = `color-mix(in srgb, ${Q.value} 40%, black)`);
1895
1901
  let t = G(i.dimmedDuration);
1896
1902
  if (t && (e["--cp-card-dimmed-duration"] = t), i.halfCollapse) {
1897
1903
  let t = i.peekHeight;
1898
1904
  e["--cp-card-peek-height"] = typeof t == "number" ? `${t}px` : t, P.value !== null && (e["--cp-card-expanded-height"] = `${P.value}px`);
1899
1905
  }
1900
1906
  return e;
1901
- }), te = r(() => {
1907
+ }), ne = r(() => {
1902
1908
  let e = typeof i.bodyStyle == "string" ? {} : { ...i.bodyStyle };
1903
1909
  return i.bodyPadding && (e.padding = i.bodyPadding), e;
1904
- }), ne = r(() => !!(i.title || d.header || d.title || d.extra)), re = r(() => !D.value || ne.value), $ = r(() => !!d.footer), ie = r(() => !!d.overlay), ae = r(() => [
1910
+ }), re = r(() => !!(i.title || d.header || d.title || d.extra)), $ = r(() => !D.value || re.value), ie = r(() => !!d.footer), ae = r(() => !!d.overlay), oe = r(() => [
1905
1911
  f.e("header"),
1906
1912
  f.is("bordered", i.headerBorder),
1907
1913
  i.headerClass
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(() => [
1914
+ ]), se = r(() => [f.e("footer"), f.is("bordered", i.footerBorder)]), ce = r(() => i.actionEffect ?? i.overlayEffect), le = r(() => i.actionColor ?? i.overlayColor), ue = r(() => i.actionBlur ?? i.overlayBlur), de = r(() => [
1909
1915
  f.e("overlay"),
1910
1916
  f.bem("", "overlay", i.overlayAnimation),
1911
1917
  f.bem("", "overlay", i.overlayPosition),
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(() => ({
1918
+ f.bem("", "overlay", `effect-${ce.value}`)
1919
+ ]), fe = r(() => [f.e("overlay-backdrop"), f.bem("", "overlay-backdrop", `effect-${i.overlayEffect}`)]), pe = (e) => e === void 0 ? "10px" : typeof e == "number" ? `${e}px` : e, me = r(() => ({
1914
1920
  "--cp-card-overlay-duration": G(i.overlayDuration),
1915
1921
  "--cp-card-overlay-color": i.overlayColor,
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]);
1922
+ "--cp-card-overlay-blur": pe(i.overlayBlur),
1923
+ "--cp-card-action-color": le.value,
1924
+ "--cp-card-action-blur": pe(ue.value)
1925
+ })), ge = r(() => [f.e("loading-overlay"), i.loadingClass]);
1920
1926
  return (e, t) => V((S(), o("div", {
1921
- class: v(J.value),
1922
- style: y(ee.value)
1923
- }, [s("div", {
1924
1927
  class: v(X.value),
1928
+ style: y(te.value)
1929
+ }, [s("div", {
1930
+ class: v(Z.value),
1925
1931
  style: y(e.backgroundStyle)
1926
1932
  }, [
1927
1933
  e.$slots.cover ? (S(), o("div", {
@@ -1929,9 +1935,9 @@ var ae = {
1929
1935
  class: v(N(f).e("collapse-transition")),
1930
1936
  onTransitionend: A
1931
1937
  }, [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),
1932
- ne.value ? (S(), o("div", {
1938
+ re.value ? (S(), o("div", {
1933
1939
  key: 1,
1934
- class: v(ae.value),
1940
+ class: v(oe.value),
1935
1941
  style: y(e.headerStyle)
1936
1942
  }, [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", {
1937
1943
  key: 0,
@@ -1946,12 +1952,12 @@ var ae = {
1946
1952
  class: v(N(f).e("collapse-inner"))
1947
1953
  }, [s("div", {
1948
1954
  class: v([N(f).e("body"), e.bodyClass]),
1949
- style: y(te.value)
1950
- }, [O(e.$slots, "default")], 6), $.value ? (S(), o("div", {
1955
+ style: y(ne.value)
1956
+ }, [O(e.$slots, "default")], 6), ie.value ? (S(), o("div", {
1951
1957
  key: 0,
1952
- class: v(oe.value)
1958
+ class: v(se.value)
1953
1959
  }, [O(e.$slots, "footer")], 2)) : a("", !0)], 2)], 34),
1954
- q.value ? (S(), o("div", {
1960
+ J.value ? (S(), o("div", {
1955
1961
  key: 2,
1956
1962
  class: v(N(f).e("collapse-action"))
1957
1963
  }, [O(e.$slots, "collapse-action", {
@@ -1962,28 +1968,28 @@ var ae = {
1962
1968
  class: v(N(f).e("collapse-action-default")),
1963
1969
  onClick: k
1964
1970
  }, [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", {
1971
+ ae.value ? (S(), o("div", {
1966
1972
  key: 3,
1967
- class: v(de.value),
1968
- style: y(pe.value)
1973
+ class: v(fe.value),
1974
+ style: y(me.value)
1969
1975
  }, null, 6)) : a("", !0),
1970
- ie.value ? (S(), o("div", {
1976
+ ae.value ? (S(), o("div", {
1971
1977
  key: 4,
1972
- class: v(ue.value),
1973
- style: y(pe.value)
1978
+ class: v(de.value),
1979
+ style: y(me.value)
1974
1980
  }, [O(e.$slots, "overlay")], 6)) : a("", !0),
1975
1981
  u(n, { name: "cp-card-loading" }, {
1976
1982
  default: B(() => [e.loading ? (S(), o("div", {
1977
1983
  key: 0,
1978
- class: v(me.value),
1984
+ class: v(ge.value),
1979
1985
  style: y(e.loadingStyle)
1980
- }, [O(e.$slots, "loading", {}, () => [u(N(he), { color: Z.value || void 0 }, null, 8, ["color"]), e.loadingText ? (S(), o("span", {
1986
+ }, [O(e.$slots, "loading", {}, () => [u(N(he), { color: Q.value || void 0 }, null, 8, ["color"]), e.loadingText ? (S(), o("span", {
1981
1987
  key: 0,
1982
1988
  class: v(N(f).e("loading-text"))
1983
1989
  }, j(e.loadingText), 3)) : a("", !0)])], 6)) : a("", !0)]),
1984
1990
  _: 3
1985
1991
  })
1986
- ], 6)], 6)), [[L, re.value]]);
1992
+ ], 6)], 6)), [[L, $.value]]);
1987
1993
  }
1988
1994
  })), ht = {
1989
1995
  type: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyberpunk-vue/components",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
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.10.0",
27
- "@cyberpunk-vue/theme-chalk": "1.10.0",
28
- "@cyberpunk-vue/constants": "1.10.0"
26
+ "@cyberpunk-vue/constants": "1.10.1",
27
+ "@cyberpunk-vue/hooks": "1.10.1",
28
+ "@cyberpunk-vue/theme-chalk": "1.10.1"
29
29
  },
30
30
  "author": "Juxest",
31
31
  "license": "MIT",