@cyberpunk-vue/components 1.9.25 → 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.cjs +1 -1
- package/dist/index.mjs +78 -56
- package/dist/segmented/index.d.ts +15 -4
- package/dist/segmented/src/segmented.d.ts +17 -2
- package/dist/segmented/src/segmented.vue.d.ts +15 -4
- package/package.json +4 -4
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
|
|
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
|
|
1850
|
+
function U() {
|
|
1851
1851
|
if (!i.halfCollapse || !M.value) return;
|
|
1852
|
-
let e = M.value.scrollHeight >
|
|
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
|
-
|
|
1860
|
-
H(), U();
|
|
1861
|
-
}), I.observe(M.value));
|
|
1856
|
+
M.value && (P.value = M.value.scrollHeight);
|
|
1862
1857
|
}
|
|
1863
1858
|
function K() {
|
|
1864
|
-
|
|
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
|
-
|
|
1869
|
-
}) : (
|
|
1870
|
-
}), R(() => i.peekHeight, () =>
|
|
1874
|
+
K(), U();
|
|
1875
|
+
}) : (q(), w.value = !0);
|
|
1876
|
+
}), R(() => i.peekHeight, () => U()), x(() => {
|
|
1871
1877
|
i.halfCollapse && _(() => {
|
|
1872
|
-
|
|
1878
|
+
K(), U(), W();
|
|
1873
1879
|
});
|
|
1874
1880
|
}), b(() => {
|
|
1875
|
-
h(),
|
|
1881
|
+
h(), q();
|
|
1876
1882
|
});
|
|
1877
|
-
let
|
|
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
|
-
]),
|
|
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
|
-
|
|
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
|
-
}),
|
|
1907
|
+
}), ne = r(() => {
|
|
1902
1908
|
let e = typeof i.bodyStyle == "string" ? {} : { ...i.bodyStyle };
|
|
1903
1909
|
return i.bodyPadding && (e.padding = i.bodyPadding), e;
|
|
1904
|
-
}),
|
|
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
|
-
]),
|
|
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-${
|
|
1913
|
-
]),
|
|
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":
|
|
1917
|
-
"--cp-card-action-color":
|
|
1918
|
-
"--cp-card-action-blur":
|
|
1919
|
-
})),
|
|
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
|
-
|
|
1938
|
+
re.value ? (S(), o("div", {
|
|
1933
1939
|
key: 1,
|
|
1934
|
-
class: v(
|
|
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(
|
|
1950
|
-
}, [O(e.$slots, "default")], 6),
|
|
1955
|
+
style: y(ne.value)
|
|
1956
|
+
}, [O(e.$slots, "default")], 6), ie.value ? (S(), o("div", {
|
|
1951
1957
|
key: 0,
|
|
1952
|
-
class: v(
|
|
1958
|
+
class: v(se.value)
|
|
1953
1959
|
}, [O(e.$slots, "footer")], 2)) : a("", !0)], 2)], 34),
|
|
1954
|
-
|
|
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
|
-
|
|
1971
|
+
ae.value ? (S(), o("div", {
|
|
1966
1972
|
key: 3,
|
|
1967
|
-
class: v(
|
|
1968
|
-
style: y(
|
|
1973
|
+
class: v(fe.value),
|
|
1974
|
+
style: y(me.value)
|
|
1969
1975
|
}, null, 6)) : a("", !0),
|
|
1970
|
-
|
|
1976
|
+
ae.value ? (S(), o("div", {
|
|
1971
1977
|
key: 4,
|
|
1972
|
-
class: v(
|
|
1973
|
-
style: y(
|
|
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(
|
|
1984
|
+
class: v(ge.value),
|
|
1979
1985
|
style: y(e.loadingStyle)
|
|
1980
|
-
}, [O(e.$slots, "loading", {}, () => [u(N(he), { color:
|
|
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,
|
|
1992
|
+
], 6)], 6)), [[L, $.value]]);
|
|
1987
1993
|
}
|
|
1988
1994
|
})), ht = {
|
|
1989
1995
|
type: {
|
|
@@ -7100,10 +7106,15 @@ var Zr = $(Vr), Qr = ie(Jr, "$notify"), $r = /* @__PURE__ */ d({
|
|
|
7100
7106
|
block: {
|
|
7101
7107
|
type: Boolean,
|
|
7102
7108
|
default: !1
|
|
7109
|
+
},
|
|
7110
|
+
clearable: {
|
|
7111
|
+
type: Boolean,
|
|
7112
|
+
default: !1
|
|
7103
7113
|
}
|
|
7104
7114
|
}, ci = {
|
|
7105
|
-
"update:modelValue": (e) => typeof e == "string" || typeof e == "number",
|
|
7106
|
-
change: (e) => typeof e == "string" || typeof e == "number"
|
|
7115
|
+
"update:modelValue": (e) => e === void 0 || typeof e == "string" || typeof e == "number",
|
|
7116
|
+
change: (e) => e === void 0 || typeof e == "string" || typeof e == "number",
|
|
7117
|
+
clear: () => !0
|
|
7107
7118
|
}, li = [
|
|
7108
7119
|
"disabled",
|
|
7109
7120
|
"aria-checked",
|
|
@@ -7132,7 +7143,7 @@ var Zr = $(Vr), Qr = ie(Jr, "$notify"), $r = /* @__PURE__ */ d({
|
|
|
7132
7143
|
let t = w.value[e];
|
|
7133
7144
|
E.value = {
|
|
7134
7145
|
width: `${t.offsetWidth}px`,
|
|
7135
|
-
transform: `translateX(calc(${t.offsetLeft}px + var(--cp-segmented-indicator-offset,
|
|
7146
|
+
transform: `translateX(calc(${t.offsetLeft}px + var(--cp-segmented-indicator-offset, 0px)))`,
|
|
7136
7147
|
opacity: "1"
|
|
7137
7148
|
};
|
|
7138
7149
|
};
|
|
@@ -7158,9 +7169,19 @@ var Zr = $(Vr), Qr = ie(Jr, "$notify"), $r = /* @__PURE__ */ d({
|
|
|
7158
7169
|
]), F = r(() => {
|
|
7159
7170
|
let e = {};
|
|
7160
7171
|
return l.color && (e["--cp-segmented-color"] = l.color, e["--cp-segmented-color-light"] = `${l.color}25`), W(l.size) || (e["--cp-segmented-height"] = K(l.size, h)), e;
|
|
7161
|
-
}), I = (
|
|
7162
|
-
p.value ||
|
|
7163
|
-
}, L = (e) =>
|
|
7172
|
+
}), I = () => {
|
|
7173
|
+
p.value || l.modelValue === void 0 || (u("update:modelValue", void 0), u("change", void 0), u("clear"));
|
|
7174
|
+
}, L = (e) => {
|
|
7175
|
+
if (!(p.value || e.disabled)) {
|
|
7176
|
+
if (e.value === l.modelValue) {
|
|
7177
|
+
l.clearable && I();
|
|
7178
|
+
return;
|
|
7179
|
+
}
|
|
7180
|
+
u("update:modelValue", e.value), u("change", e.value);
|
|
7181
|
+
}
|
|
7182
|
+
}, z = (e) => {
|
|
7183
|
+
e.key === "Escape" && (!l.clearable || p.value || l.modelValue !== void 0 && (e.preventDefault(), I()));
|
|
7184
|
+
}, B = (e) => [
|
|
7164
7185
|
d.e("item"),
|
|
7165
7186
|
d.is("active", e.value === l.modelValue),
|
|
7166
7187
|
d.is("disabled", !!e.disabled)
|
|
@@ -7170,7 +7191,8 @@ var Zr = $(Vr), Qr = ie(Jr, "$notify"), $r = /* @__PURE__ */ d({
|
|
|
7170
7191
|
ref: C,
|
|
7171
7192
|
class: v(P.value),
|
|
7172
7193
|
style: y(F.value),
|
|
7173
|
-
role: "radiogroup"
|
|
7194
|
+
role: "radiogroup",
|
|
7195
|
+
onKeydown: z
|
|
7174
7196
|
}, [s("div", {
|
|
7175
7197
|
class: v(N(d).e("indicator")),
|
|
7176
7198
|
style: y(E.value)
|
|
@@ -7178,16 +7200,16 @@ var Zr = $(Vr), Qr = ie(Jr, "$notify"), $r = /* @__PURE__ */ d({
|
|
|
7178
7200
|
key: e.value,
|
|
7179
7201
|
ref_for: !0,
|
|
7180
7202
|
ref: (e) => O(e, n),
|
|
7181
|
-
class: v(
|
|
7203
|
+
class: v(B(e)),
|
|
7182
7204
|
disabled: p.value || e.disabled,
|
|
7183
7205
|
type: "button",
|
|
7184
7206
|
role: "radio",
|
|
7185
7207
|
"aria-checked": e.value === t.modelValue,
|
|
7186
|
-
onClick: (t) =>
|
|
7208
|
+
onClick: (t) => L(e)
|
|
7187
7209
|
}, [e.icon ? (S(), i(A(e.icon), {
|
|
7188
7210
|
key: 0,
|
|
7189
7211
|
class: v(N(d).e("item-icon"))
|
|
7190
|
-
}, null, 8, ["class"])) : a("", !0), s("span", { class: v(N(d).e("item-label")) }, j(e.label), 3)], 10, li))), 128))],
|
|
7212
|
+
}, null, 8, ["class"])) : a("", !0), s("span", { class: v(N(d).e("item-label")) }, j(e.label), 3)], 10, li))), 128))], 38));
|
|
7191
7213
|
}
|
|
7192
7214
|
})), di = {
|
|
7193
7215
|
data: {
|
|
@@ -47,11 +47,16 @@ export declare const CpSegmented: import('../utils').SFCWithInstall<import('vue'
|
|
|
47
47
|
readonly type: BooleanConstructor;
|
|
48
48
|
readonly default: false;
|
|
49
49
|
};
|
|
50
|
+
readonly clearable: {
|
|
51
|
+
readonly type: BooleanConstructor;
|
|
52
|
+
readonly default: false;
|
|
53
|
+
};
|
|
50
54
|
}>, {
|
|
51
55
|
updateIndicator: () => void;
|
|
52
56
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
clear: () => void;
|
|
58
|
+
change: (value: import('.').SegmentedValueType | undefined) => void;
|
|
59
|
+
"update:modelValue": (value: import('.').SegmentedValueType | undefined) => void;
|
|
55
60
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
56
61
|
readonly modelValue: {
|
|
57
62
|
readonly type: import('vue').PropType<import('.').SegmentedValueType>;
|
|
@@ -89,9 +94,14 @@ export declare const CpSegmented: import('../utils').SFCWithInstall<import('vue'
|
|
|
89
94
|
readonly type: BooleanConstructor;
|
|
90
95
|
readonly default: false;
|
|
91
96
|
};
|
|
97
|
+
readonly clearable: {
|
|
98
|
+
readonly type: BooleanConstructor;
|
|
99
|
+
readonly default: false;
|
|
100
|
+
};
|
|
92
101
|
}>> & Readonly<{
|
|
93
|
-
|
|
94
|
-
|
|
102
|
+
onClear?: (() => any) | undefined;
|
|
103
|
+
onChange?: ((value: import('.').SegmentedValueType | undefined) => any) | undefined;
|
|
104
|
+
"onUpdate:modelValue"?: ((value: import('.').SegmentedValueType | undefined) => any) | undefined;
|
|
95
105
|
}>, {
|
|
96
106
|
readonly size: import('@cyberpunk-vue/hooks').Size;
|
|
97
107
|
readonly type: import('.').SegmentedType;
|
|
@@ -101,6 +111,7 @@ export declare const CpSegmented: import('../utils').SFCWithInstall<import('vue'
|
|
|
101
111
|
readonly block: boolean;
|
|
102
112
|
readonly shape: import('.').SegmentedShape;
|
|
103
113
|
readonly modelValue: import('.').SegmentedValueType;
|
|
114
|
+
readonly clearable: boolean;
|
|
104
115
|
readonly options: (string | number | import('.').SegmentedOption)[];
|
|
105
116
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
106
117
|
trackRef: HTMLDivElement;
|
|
@@ -143,6 +143,15 @@ export declare const segmentedProps: {
|
|
|
143
143
|
readonly type: BooleanConstructor;
|
|
144
144
|
readonly default: false;
|
|
145
145
|
};
|
|
146
|
+
/**
|
|
147
|
+
* 是否允许清空选中项
|
|
148
|
+
* 启用后可通过再次点击已选项或按 Esc 键清空
|
|
149
|
+
* @default false
|
|
150
|
+
*/
|
|
151
|
+
readonly clearable: {
|
|
152
|
+
readonly type: BooleanConstructor;
|
|
153
|
+
readonly default: false;
|
|
154
|
+
};
|
|
146
155
|
};
|
|
147
156
|
export type SegmentedProps = ExtractPropTypes<typeof segmentedProps>;
|
|
148
157
|
/**
|
|
@@ -151,11 +160,17 @@ export type SegmentedProps = ExtractPropTypes<typeof segmentedProps>;
|
|
|
151
160
|
export declare const segmentedEmits: {
|
|
152
161
|
/**
|
|
153
162
|
* 值变化时触发 (v-model 绑定)
|
|
163
|
+
* 启用 clearable 并清空时值为 undefined
|
|
154
164
|
*/
|
|
155
|
-
'update:modelValue': (value: SegmentedValueType) => value is string | number;
|
|
165
|
+
'update:modelValue': (value: SegmentedValueType | undefined) => value is string | number | undefined;
|
|
156
166
|
/**
|
|
157
167
|
* 值变化时触发
|
|
168
|
+
* 启用 clearable 并清空时值为 undefined
|
|
169
|
+
*/
|
|
170
|
+
change: (value: SegmentedValueType | undefined) => value is string | number | undefined;
|
|
171
|
+
/**
|
|
172
|
+
* 清空选中项时触发(需启用 clearable)
|
|
158
173
|
*/
|
|
159
|
-
|
|
174
|
+
clear: () => boolean;
|
|
160
175
|
};
|
|
161
176
|
export type SegmentedEmits = typeof segmentedEmits;
|
|
@@ -36,12 +36,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
36
36
|
readonly type: BooleanConstructor;
|
|
37
37
|
readonly default: false;
|
|
38
38
|
};
|
|
39
|
+
readonly clearable: {
|
|
40
|
+
readonly type: BooleanConstructor;
|
|
41
|
+
readonly default: false;
|
|
42
|
+
};
|
|
39
43
|
}>, {
|
|
40
44
|
/** @description 更新滑块位置 */
|
|
41
45
|
updateIndicator: () => void;
|
|
42
46
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
clear: () => void;
|
|
48
|
+
change: (value: SegmentedValueType | undefined) => void;
|
|
49
|
+
"update:modelValue": (value: SegmentedValueType | undefined) => void;
|
|
45
50
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
46
51
|
readonly modelValue: {
|
|
47
52
|
readonly type: import('vue').PropType<SegmentedValueType>;
|
|
@@ -79,9 +84,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
79
84
|
readonly type: BooleanConstructor;
|
|
80
85
|
readonly default: false;
|
|
81
86
|
};
|
|
87
|
+
readonly clearable: {
|
|
88
|
+
readonly type: BooleanConstructor;
|
|
89
|
+
readonly default: false;
|
|
90
|
+
};
|
|
82
91
|
}>> & Readonly<{
|
|
83
|
-
|
|
84
|
-
|
|
92
|
+
onClear?: (() => any) | undefined;
|
|
93
|
+
onChange?: ((value: SegmentedValueType | undefined) => any) | undefined;
|
|
94
|
+
"onUpdate:modelValue"?: ((value: SegmentedValueType | undefined) => any) | undefined;
|
|
85
95
|
}>, {
|
|
86
96
|
readonly size: import('@cyberpunk-vue/hooks').Size;
|
|
87
97
|
readonly type: import('./segmented').SegmentedType;
|
|
@@ -91,6 +101,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
91
101
|
readonly block: boolean;
|
|
92
102
|
readonly shape: import('./segmented').SegmentedShape;
|
|
93
103
|
readonly modelValue: SegmentedValueType;
|
|
104
|
+
readonly clearable: boolean;
|
|
94
105
|
readonly options: (string | number | SegmentedOption)[];
|
|
95
106
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
96
107
|
trackRef: HTMLDivElement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyberpunk-vue/components",
|
|
3
|
-
"version": "1.
|
|
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/
|
|
27
|
-
"@cyberpunk-vue/
|
|
28
|
-
"@cyberpunk-vue/theme-chalk": "1.
|
|
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",
|