@pantograph/vue 0.0.3 → 0.6.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/ActionButton/ActionButton.d.ts +148 -5
- package/dist/ActionButton/index.cjs.js +1 -1
- package/dist/ActionButton/index.es.js +1 -1
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-9sHS6TT0.js +52 -0
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-BRYxIFQL.js +1 -0
- package/dist/Avatar/Avatar.d.ts +1 -1
- package/dist/Avatar/index.cjs.js +1 -1
- package/dist/Avatar/index.es.js +1 -1
- package/dist/Avatar.vue_vue_type_style_index_0_lang-D72SN0zC.js +1 -0
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-BWeEmazM.js → Avatar.vue_vue_type_style_index_0_lang-RziDt5Qs.js} +19 -18
- package/dist/AvatarGroup/index.cjs.js +1 -1
- package/dist/AvatarGroup/index.es.js +1 -1
- package/dist/Badge/Badge.d.ts +3 -3
- package/dist/Badge/index.cjs.js +1 -1
- package/dist/Badge/index.es.js +1 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-DzkeQwzH.js +1 -0
- package/dist/Badge.vue_vue_type_script_setup_true_lang-LwccxMER.js +34 -0
- package/dist/Base/BaseBadge/BaseBadge.d.ts +6 -10
- package/dist/Base/BaseButton/BaseButton.d.ts +13 -15
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-B1Va5X21.js +1 -0
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-CHhhflIH.js +107 -0
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-BLGNTber.js +151 -0
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-HdsdAsR3.js +1 -0
- package/dist/Button/Button.d.ts +149 -5
- package/dist/Button/index.cjs.js +1 -1
- package/dist/Button/index.es.js +1 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang-DMOtqE4k.js +49 -0
- package/dist/Button.vue_vue_type_script_setup_true_lang-DNpM6F5j.js +1 -0
- package/dist/ButtonGroup/index.cjs.js +1 -1
- package/dist/ButtonGroup/index.es.js +1 -1
- package/dist/ButtonGroup.vue_vue_type_script_setup_true_lang-BSj1Y1j2.js +1 -0
- package/dist/{ButtonGroup.vue_vue_type_script_setup_true_lang-jtE0Gtp9.js → ButtonGroup.vue_vue_type_script_setup_true_lang-DBq7tYaO.js} +11 -10
- package/dist/Checkbox/Checkbox.d.ts +6 -14
- package/dist/Checkbox/Checkbox.model.d.ts +0 -2
- package/dist/Checkbox/index.cjs.js +1 -1
- package/dist/Checkbox/index.es.js +1 -1
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-BQeNpCYy.js +1 -0
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-gsOfYgHe.js +245 -0
- package/dist/CheckboxGroup/index.cjs.js +1 -1
- package/dist/CheckboxGroup/index.es.js +1 -1
- package/dist/ConfigProvider/index.cjs.js +1 -0
- package/dist/ConfigProvider/index.d.ts +40 -0
- package/dist/ConfigProvider/index.es.js +112 -0
- package/dist/ConfigProvider/utils.d.ts +4 -0
- package/dist/Divider/Divider.d.ts +27 -0
- package/dist/Divider/Divider.model.d.ts +2 -0
- package/dist/Divider/index.cjs.js +1 -0
- package/dist/Divider/index.d.ts +2 -0
- package/dist/Divider/index.es.js +6 -0
- package/dist/Divider.vue_vue_type_style_index_0_lang-C6Suy0tD.js +1 -0
- package/dist/Divider.vue_vue_type_style_index_0_lang-SBMg48di.js +40 -0
- package/dist/FloatButton/FloatButton.d.ts +149 -5
- package/dist/FloatButton/index.cjs.js +1 -1
- package/dist/FloatButton/index.es.js +1 -1
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-BD8KDs-3.js +1 -0
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-CLL_AR_I.js +47 -0
- package/dist/GraphicalObject/GraphicalObject.d.ts +3 -3
- package/dist/GraphicalObject/index.cjs.js +1 -1
- package/dist/GraphicalObject/index.es.js +1 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-BKYCNg9l.js +1 -0
- package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-CcI-aIS4.js → GraphicalObject.vue_vue_type_script_setup_true_lang-DqfDSUXz.js} +7 -6
- package/dist/Icon/Icon.d.ts +1 -1
- package/dist/Icon/index.cjs.js +1 -1
- package/dist/Icon/index.es.js +1 -1
- package/dist/Icon.vue_vue_type_style_index_0_lang-D-jaUivh.js +1 -0
- package/dist/Icon.vue_vue_type_style_index_0_lang-W7sippxn.js +48 -0
- package/dist/IconButton/IconButton.d.ts +149 -5
- package/dist/IconButton/index.cjs.js +1 -1
- package/dist/IconButton/index.es.js +1 -1
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-DCrUZOP9.js +47 -0
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-DVbz9uji.js +1 -0
- package/dist/Image/Image.d.ts +48 -0
- package/dist/Image/Image.model.d.ts +6 -0
- package/dist/Image/index.cjs.js +1 -0
- package/dist/Image/index.d.ts +2 -0
- package/dist/Image/index.es.js +117 -0
- package/dist/IndentLevel/IndentLevel.d.ts +35 -0
- package/dist/IndentLevel/IndentLevel.model.d.ts +4 -0
- package/dist/IndentLevel/index.cjs.js +1 -0
- package/dist/IndentLevel/index.d.ts +2 -0
- package/dist/IndentLevel/index.es.js +7 -0
- package/dist/IndentLevel.vue_vue_type_style_index_0_lang-B_x8tshB.js +1 -0
- package/dist/IndentLevel.vue_vue_type_style_index_0_lang-jaoDj9GA.js +103 -0
- package/dist/Indicator/Indicator.d.ts +1 -1
- package/dist/Indicator/index.cjs.js +1 -1
- package/dist/Indicator/index.es.js +1 -1
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-D2iFmRna.js +1 -0
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-jv3IND51.js +34 -0
- package/dist/Kbd/Kbd.d.ts +31 -0
- package/dist/Kbd/index.cjs.js +1 -0
- package/dist/Kbd/index.d.ts +1 -0
- package/dist/Kbd/index.es.js +5 -0
- package/dist/Kbd.vue_vue_type_style_index_0_lang-Br1eygIf.js +1 -0
- package/dist/Kbd.vue_vue_type_style_index_0_lang-D5D9tTsQ.js +60 -0
- package/dist/MenuItem/MenuItem.model.d.ts +2 -0
- package/dist/MenuItem/index.cjs.js +1 -0
- package/dist/MenuItem/index.d.ts +1 -0
- package/dist/MenuItem/index.es.js +1 -0
- package/dist/Popover/Popover.d.ts +6 -83
- package/dist/Popover/index.cjs.js +1 -1
- package/dist/Popover/index.es.js +1 -1
- package/dist/Popover.vue_vue_type_style_index_0_lang-BZMSPrfB.js +1 -0
- package/dist/{Popover.vue_vue_type_style_index_0_lang-Jf0LVKU_.js → Popover.vue_vue_type_style_index_0_lang-DTr33v9y.js} +31 -29
- package/dist/RadioGroup/RadioGroup.d.ts +32 -0
- package/dist/RadioGroup/RadioGroup.model.d.ts +2 -0
- package/dist/RadioGroup/RadioGroupItem.d.ts +16 -0
- package/dist/RadioGroup/index.cjs.js +1 -0
- package/dist/RadioGroup/index.d.ts +2 -0
- package/dist/RadioGroup/index.es.js +100 -0
- package/dist/Shortcut/Shortcut.d.ts +12 -0
- package/dist/Shortcut/index.cjs.js +1 -0
- package/dist/Shortcut/index.d.ts +1 -0
- package/dist/Shortcut/index.es.js +42 -0
- package/dist/Skeleton/index.cjs.js +1 -1
- package/dist/Skeleton/index.es.js +1 -1
- package/dist/{Skeleton.vue_vue_type_style_index_0_lang-C56TOumA.js → Skeleton.vue_vue_type_style_index_0_lang-BgVkwMj4.js} +10 -9
- package/dist/Skeleton.vue_vue_type_style_index_0_lang-PNNUgKOq.js +1 -0
- package/dist/Spinner/Spinner.d.ts +2 -10
- package/dist/Spinner/index.cjs.js +1 -1
- package/dist/Spinner/index.es.js +1 -1
- package/dist/Spinner.vue_vue_type_style_index_0_lang-BOXr-RUw.js +85 -0
- package/dist/Spinner.vue_vue_type_style_index_0_lang-DW5QRtWO.js +1 -0
- package/dist/Switch/Switch.d.ts +29 -0
- package/dist/Switch/Switch.model.d.ts +2 -0
- package/dist/Switch/index.cjs.js +1 -0
- package/dist/Switch/index.d.ts +2 -0
- package/dist/Switch/index.es.js +104 -0
- package/dist/Tree/Tree.d.ts +66 -0
- package/dist/Tree/Tree.model.d.ts +71 -0
- package/dist/Tree/TreeNode.d.ts +33 -0
- package/dist/Tree/index.cjs.js +1 -0
- package/dist/Tree/index.d.ts +2 -0
- package/dist/Tree/index.es.js +458 -0
- package/dist/class-CjZYGZDW.js +1 -0
- package/dist/class-DyU-Ox8D.js +24 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +27 -24
- package/dist/omit-C_ZXwm9T.js +1 -0
- package/dist/omit-DtumnYm5.js +760 -0
- package/dist/options-B4iSAKol.js +1 -0
- package/dist/options-JBqnVZUl.js +9 -0
- package/dist/style/index.css +1 -1
- package/dist/utils/element.d.ts +1 -1
- package/dist/utils/index.cjs.js +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.es.js +7 -4
- package/package.json +61 -16
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-Drb30rfG.js +0 -39
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-dxthnFw4.js +0 -1
- package/dist/Avatar.vue_vue_type_style_index_0_lang-BB-v9NHG.js +0 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-CXfdGkKV.js +0 -33
- package/dist/Badge.vue_vue_type_script_setup_true_lang-sx-dXgFD.js +0 -1
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-B-uDLmB_.js +0 -1
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-F50Tg7IQ.js +0 -151
- package/dist/Button.vue_vue_type_script_setup_true_lang-Crhe5sHQ.js +0 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang-XrPBGQq8.js +0 -36
- package/dist/ButtonGroup.vue_vue_type_script_setup_true_lang-DmShg2d-.js +0 -1
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-BRJhkPIY.js +0 -1
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-OQRmH46S.js +0 -194
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-Bu9Ndwxm.js +0 -1
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-CCfZsUxy.js +0 -34
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-BhMxC00o.js +0 -1
- package/dist/Icon.vue_vue_type_style_index_0_lang-CB4CYuWH.js +0 -47
- package/dist/Icon.vue_vue_type_style_index_0_lang-CV1YvIs-.js +0 -1
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-BTG_oQuF.js +0 -34
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-C93zhnQU.js +0 -1
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-Z02asVPa.js +0 -1
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-qIUYIdkm.js +0 -33
- package/dist/Logotype-Dark.svg +0 -3
- package/dist/Logotype-Light.svg +0 -3
- package/dist/Popover.vue_vue_type_style_index_0_lang-VH8LnLG9.js +0 -1
- package/dist/Skeleton.vue_vue_type_style_index_0_lang-B6-i0F1w.js +0 -1
- package/dist/Spinner.vue_vue_type_style_index_0_lang-B5byV1za.js +0 -75
- package/dist/Spinner.vue_vue_type_style_index_0_lang-Baaz0Dxb.js +0 -1
- package/dist/logo.svg +0 -4
- package/dist/omit-B0hUroNu.js +0 -1
- package/dist/omit-DU39EwuA.js +0 -851
- package/dist/options-B8SF1auT.js +0 -1
- package/dist/options-B8rT2fg0.js +0 -30
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { defineComponent as A, computed as c, openBlock as h, createBlock as x, unref as d, normalizeProps as K, guardReactiveProps as U, withCtx as C, renderSlot as w, createElementBlock as z, Fragment as V, renderList as J, mergeProps as _, createCommentVNode as O, ref as S, useSlots as M, watch as Q, createVNode as G, normalizeClass as $, createTextVNode as W, toDisplayString as X } from "vue";
|
|
2
|
+
import { createContext as Y, Primitive as q, useId as Z, CheckboxRoot as j, CheckboxIndicator as ee } from "radix-vue";
|
|
3
|
+
import { prefixTokens as f } from "@pantograph/tokens";
|
|
4
|
+
import { _ as ae } from "./Icon.vue_vue_type_style_index_0_lang-W7sippxn.js";
|
|
5
|
+
import { g as se, a as k, b as te } from "./class-DyU-Ox8D.js";
|
|
6
|
+
import { cva as ne } from "class-variance-authority";
|
|
7
|
+
import { g as N } from "./options-JBqnVZUl.js";
|
|
8
|
+
import { i as I, c as B, t as R, a as E, d as le, e as re, f as ie, g as oe, h as ue, j as de, o as ce } from "./omit-DtumnYm5.js";
|
|
9
|
+
const fe = ["2xsm", "xsm"], Ae = (e) => ({
|
|
10
|
+
"--ptc-checkbox-bg": `var(--${f}-${e}-5)`,
|
|
11
|
+
"--ptc-checkbox-bg-hover": `var(--${f}-${e}-4)`,
|
|
12
|
+
"--ptc-checkbox-bg-focus": `var(--${f}-${e}-6)`,
|
|
13
|
+
"--ptc-checkbox-br-focus": `var(--${f}-${e}-6)`,
|
|
14
|
+
"--ptc-checkbox-bg-active": `var(--${f}-${e}-7)`
|
|
15
|
+
}), we = (e) => ({
|
|
16
|
+
"--ptc-group-checkbox-bg": `var(--${f}-${e}-5)`,
|
|
17
|
+
"--ptc-group-checkbox-bg-hover": `var(--${f}-${e}-4)`,
|
|
18
|
+
"--ptc-group-checkbox-bg-focus": `var(--${f}-${e}-6)`,
|
|
19
|
+
"--ptc-group-checkbox-br-focus": `var(--${f}-${e}-6)`,
|
|
20
|
+
"--ptc-group-checkbox-bg-active": `var(--${f}-${e}-7)`
|
|
21
|
+
});
|
|
22
|
+
function me(e, t, l, a) {
|
|
23
|
+
if (!I(e))
|
|
24
|
+
return e;
|
|
25
|
+
t = B(t, e);
|
|
26
|
+
for (var s = -1, o = t.length, u = o - 1, r = e; r != null && ++s < o; ) {
|
|
27
|
+
var i = R(t[s]), m = l;
|
|
28
|
+
if (i === "__proto__" || i === "constructor" || i === "prototype")
|
|
29
|
+
return e;
|
|
30
|
+
if (s != u) {
|
|
31
|
+
var p = r[i];
|
|
32
|
+
m = void 0, m === void 0 && (m = I(p) ? p : E(t[s + 1]) ? [] : {});
|
|
33
|
+
}
|
|
34
|
+
le(r, i, m), r = r[i];
|
|
35
|
+
}
|
|
36
|
+
return e;
|
|
37
|
+
}
|
|
38
|
+
function ve(e, t, l) {
|
|
39
|
+
for (var a = -1, s = t.length, o = {}; ++a < s; ) {
|
|
40
|
+
var u = t[a], r = re(e, u);
|
|
41
|
+
l(r, u) && me(o, B(u, e), r);
|
|
42
|
+
}
|
|
43
|
+
return o;
|
|
44
|
+
}
|
|
45
|
+
function pe(e, t) {
|
|
46
|
+
return e != null && t in Object(e);
|
|
47
|
+
}
|
|
48
|
+
function he(e, t, l) {
|
|
49
|
+
t = B(t, e);
|
|
50
|
+
for (var a = -1, s = t.length, o = !1; ++a < s; ) {
|
|
51
|
+
var u = R(t[a]);
|
|
52
|
+
if (!(o = e != null && l(e, u)))
|
|
53
|
+
break;
|
|
54
|
+
e = e[u];
|
|
55
|
+
}
|
|
56
|
+
return o || ++a != s ? o : (s = e == null ? 0 : e.length, !!s && ie(s) && E(u, s) && (oe(e) || ue(e)));
|
|
57
|
+
}
|
|
58
|
+
function be(e, t) {
|
|
59
|
+
return e != null && he(e, t, pe);
|
|
60
|
+
}
|
|
61
|
+
function ge(e, t) {
|
|
62
|
+
return ve(e, t, function(l, a) {
|
|
63
|
+
return be(e, a);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
var ke = de(function(e, t) {
|
|
67
|
+
return e == null ? {} : ge(e, t);
|
|
68
|
+
});
|
|
69
|
+
const [Ce, xe] = Y("CheckboxGroup"), Oe = /* @__PURE__ */ A({
|
|
70
|
+
...N("CheckboxGroup"),
|
|
71
|
+
__name: "CheckboxGroup",
|
|
72
|
+
props: {
|
|
73
|
+
asChild: { type: Boolean, default: !1 },
|
|
74
|
+
as: {},
|
|
75
|
+
value: {},
|
|
76
|
+
size: {},
|
|
77
|
+
disabled: { type: Boolean },
|
|
78
|
+
name: {},
|
|
79
|
+
options: {}
|
|
80
|
+
},
|
|
81
|
+
emits: ["update:value", "change"],
|
|
82
|
+
setup(e, { emit: t }) {
|
|
83
|
+
const l = t, a = e, s = c(() => ke(a, "asChild", "as")), o = c({
|
|
84
|
+
get() {
|
|
85
|
+
return a.value ?? [];
|
|
86
|
+
},
|
|
87
|
+
set(i) {
|
|
88
|
+
l("update:value", i), l("change", i);
|
|
89
|
+
}
|
|
90
|
+
}), u = c(() => a.size), r = c(() => a.disabled ? !0 : void 0);
|
|
91
|
+
return xe({
|
|
92
|
+
model: o,
|
|
93
|
+
size: u,
|
|
94
|
+
disabled: r
|
|
95
|
+
}), (i, m) => (h(), x(d(q), K(U(s.value)), {
|
|
96
|
+
default: C(() => [
|
|
97
|
+
w(i.$slots, "default", {}, () => {
|
|
98
|
+
var p;
|
|
99
|
+
return [
|
|
100
|
+
(p = i.options) != null && p.length ? (h(!0), z(V, { key: 0 }, J(i.options, (g) => (h(), x(ze, _({
|
|
101
|
+
key: g.value,
|
|
102
|
+
ref_for: !0
|
|
103
|
+
}, g), null, 16))), 128)) : O("", !0)
|
|
104
|
+
];
|
|
105
|
+
})
|
|
106
|
+
]),
|
|
107
|
+
_: 3
|
|
108
|
+
}, 16));
|
|
109
|
+
}
|
|
110
|
+
}), $e = ["for"], ze = /* @__PURE__ */ A({
|
|
111
|
+
...N("Checkbox"),
|
|
112
|
+
__name: "Checkbox",
|
|
113
|
+
props: {
|
|
114
|
+
size: { default: "xsm" },
|
|
115
|
+
class: {},
|
|
116
|
+
rootCls: {},
|
|
117
|
+
indicatorCls: {},
|
|
118
|
+
indeterminateCls: {},
|
|
119
|
+
labelCls: {},
|
|
120
|
+
label: {},
|
|
121
|
+
id: {},
|
|
122
|
+
valueAsLabel: { type: Boolean, default: !0 },
|
|
123
|
+
defaultChecked: { type: Boolean },
|
|
124
|
+
checked: { type: [Boolean, String], default: void 0 },
|
|
125
|
+
disabled: { type: Boolean },
|
|
126
|
+
required: { type: Boolean },
|
|
127
|
+
name: {},
|
|
128
|
+
value: {},
|
|
129
|
+
as: { default: "div" }
|
|
130
|
+
},
|
|
131
|
+
emits: ["update:checked", "change"],
|
|
132
|
+
setup(e, { emit: t }) {
|
|
133
|
+
const l = te("checkbox"), a = e, s = Ce({
|
|
134
|
+
model: S([]),
|
|
135
|
+
size: c(() => a.size),
|
|
136
|
+
disabled: c(() => a.disabled)
|
|
137
|
+
}), o = t, u = M(), r = S(), i = (n) => {
|
|
138
|
+
var v, P;
|
|
139
|
+
if (s.model.value && a.value !== void 0) {
|
|
140
|
+
const L = (P = (v = s.model.value) == null ? void 0 : v.indexOf) == null ? void 0 : P.call(v, a.value);
|
|
141
|
+
n && L === -1 ? s.model.value = [...s.model.value, a.value] : !n && L !== -1 && (s.model.value = s.model.value.filter((H) => H !== a.value));
|
|
142
|
+
} else a.checked !== void 0 ? (o("update:checked", n), o("change", n)) : r.value = n;
|
|
143
|
+
};
|
|
144
|
+
Q(
|
|
145
|
+
() => [s.model, a.checked],
|
|
146
|
+
() => {
|
|
147
|
+
var n, v;
|
|
148
|
+
s.model.value && a.value !== void 0 ? r.value = (v = (n = s.model.value) == null ? void 0 : n.includes) == null ? void 0 : v.call(n, a.value) : r.value = a.checked;
|
|
149
|
+
},
|
|
150
|
+
{ immediate: !0, deep: !0 }
|
|
151
|
+
);
|
|
152
|
+
const m = c(() => a.id ?? Z(void 0, l)), p = c(() => ({
|
|
153
|
+
disabled: s.disabled.value ?? a.disabled,
|
|
154
|
+
...ce(
|
|
155
|
+
a,
|
|
156
|
+
"size",
|
|
157
|
+
"class",
|
|
158
|
+
"label",
|
|
159
|
+
"as",
|
|
160
|
+
"disabled",
|
|
161
|
+
"checked",
|
|
162
|
+
"id",
|
|
163
|
+
"rootCls",
|
|
164
|
+
"indicatorCls",
|
|
165
|
+
"indeterminateCls",
|
|
166
|
+
"labelCls"
|
|
167
|
+
)
|
|
168
|
+
})), g = ne(l, {
|
|
169
|
+
variants: {
|
|
170
|
+
size: se(fe, l)
|
|
171
|
+
}
|
|
172
|
+
}), b = c(() => a.label || u.default || a.value && a.valueAsLabel), T = c(() => {
|
|
173
|
+
if (a.label) return a.label;
|
|
174
|
+
if (a.value && a.valueAsLabel) return a.value;
|
|
175
|
+
}), D = c(() => ({
|
|
176
|
+
asChild: !b.value,
|
|
177
|
+
as: a.as
|
|
178
|
+
})), y = c(() => s.size.value ?? a.size), F = c(() => {
|
|
179
|
+
switch (y.value) {
|
|
180
|
+
case "xsm":
|
|
181
|
+
return "2xsm";
|
|
182
|
+
case "2xsm":
|
|
183
|
+
default:
|
|
184
|
+
return "3xsm";
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
return (n, v) => (h(), x(d(q), _({
|
|
188
|
+
key: b.value
|
|
189
|
+
}, D.value, {
|
|
190
|
+
class: [{ [d(k)(d(l), "root")]: b.value }, b.value ? n.rootCls : void 0]
|
|
191
|
+
}), {
|
|
192
|
+
default: C(() => [
|
|
193
|
+
G(d(j), _(p.value, {
|
|
194
|
+
checked: r.value,
|
|
195
|
+
id: m.value,
|
|
196
|
+
"onUpdate:checked": i,
|
|
197
|
+
class: [d(g)({ size: y.value }), a.class]
|
|
198
|
+
}), {
|
|
199
|
+
default: C(() => [
|
|
200
|
+
G(d(ee), {
|
|
201
|
+
class: $([d(k)(d(l), "indicator"), n.indicatorCls]),
|
|
202
|
+
asChild: ""
|
|
203
|
+
}, {
|
|
204
|
+
default: C(() => [
|
|
205
|
+
a.checked != "indeterminate" ? (h(), x(ae, {
|
|
206
|
+
key: 0,
|
|
207
|
+
icon: "tabler:check",
|
|
208
|
+
size: F.value
|
|
209
|
+
}, null, 8, ["size"])) : (h(), z("span", {
|
|
210
|
+
key: 1,
|
|
211
|
+
class: $([d(k)(d(l), "indeterminate"), n.indeterminateCls])
|
|
212
|
+
}, null, 2))
|
|
213
|
+
]),
|
|
214
|
+
_: 1
|
|
215
|
+
}, 8, ["class"])
|
|
216
|
+
]),
|
|
217
|
+
_: 1
|
|
218
|
+
}, 16, ["checked", "id", "class"]),
|
|
219
|
+
b.value ? (h(), z("label", {
|
|
220
|
+
key: 0,
|
|
221
|
+
for: m.value,
|
|
222
|
+
class: $([d(k)(d(l), "label"), n.labelCls])
|
|
223
|
+
}, [
|
|
224
|
+
w(n.$slots, "default", {
|
|
225
|
+
checked: n.checked,
|
|
226
|
+
disabled: n.disabled,
|
|
227
|
+
required: n.required
|
|
228
|
+
}, () => [
|
|
229
|
+
W(X(T.value), 1)
|
|
230
|
+
])
|
|
231
|
+
], 10, $e)) : O("", !0)
|
|
232
|
+
]),
|
|
233
|
+
_: 3
|
|
234
|
+
}, 16, ["class"]));
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
export {
|
|
238
|
+
fe as C,
|
|
239
|
+
ze as _,
|
|
240
|
+
we as a,
|
|
241
|
+
Oe as b,
|
|
242
|
+
Ce as i,
|
|
243
|
+
xe as p,
|
|
244
|
+
Ae as u
|
|
245
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Checkbox.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Checkbox.vue_vue_type_style_index_0_lang-BQeNpCYy.js");exports.CheckboxGroup=e._sfc_main$1;exports.injectCheckboxGroupContext=e.injectCheckboxGroupContext;exports.provideCheckboxGroupContext=e.provideCheckboxGroupContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("radix-vue"),s=require("@pantograph/tokens"),i=require("vue"),g=require("lodash-es"),h=require("@vueuse/core"),C=n=>{const t=i.computed(()=>{const e=i.unref(n);return g.isString(e)?document.querySelector(e):e instanceof HTMLElement?e:document.documentElement}),r=i.ref("ltr"),u=()=>{t.value instanceof HTMLElement&&(r.value=getComputedStyle(t.value).direction)};u();const l=e=>{const o=["rtl","ltr"].includes(e)?e:r.value==="ltr"?"rtl":"ltr";t.value&&(t.value.dir=o)};return h.useMutationObserver(t,u,{attributes:!0,attributeFilter:["dir"]}),[r,l]},D=n=>{const t=i.computed(()=>{const e=i.unref(n);return g.isString(e)?document.querySelector(e):e instanceof HTMLElement?e:document.documentElement}),r=i.ref(!1),u=()=>{var e,o;t.value instanceof HTMLElement&&(r.value=((o=(e=t.value)==null?void 0:e.classList)==null?void 0:o.contains("dark"))??!1)};u();const l=e=>{const o=e===!0?!0:e===!1?!1:!r.value;t.value&&s.toggleDark(o,t.value)};return h.useMutationObserver(t,u,{attributes:!0,attributeFilter:["class"]}),[r,l]},[k,v]=f.createContext("config-provider"),E=()=>k({}),b=i.defineComponent({name:"ConfigProvider",props:{locale:{type:[String,Object],required:!1},theme:{type:Object,required:!1},changeAbleDirectionElement:{type:[String,HTMLElement,Object],default:"html"},changeAbleDarkElement:{type:[String,HTMLElement,Object],default:"html"}},setup(n,{slots:t}){const[r,u]=C(n.changeAbleDirectionElement),[l,e]=D(n.changeAbleDarkElement);i.watch(()=>n.theme,()=>{var c,a;if((c=n.theme)!=null&&c.init||(a=n.theme)!=null&&a.element){const{init:T,...m}=n.theme;window.pantographThemeDefined?s.defineTheme(m):(s.init(m),Promise.resolve().then(()=>require("../index-Dyvby5gX.js")),window.pantographThemeDefined=!0)}},{immediate:!0});const o=i.computed(()=>({...s.getThemeConfig(n.theme),dark:l.value})),d=c=>{var a;return s.defineTheme({element:(a=n.theme)==null?void 0:a.element,...c})};return v({dir:r,theme:o,dark:l,changeDirection:u,changeTheme:d,toggleDark:e}),()=>i.h(f.ConfigProvider,{dir:r},{default:()=>{var c;return(c=t.default)==null?void 0:c.call(t,{dir:r.value,theme:o.value,dark:l.value,changeDirection:u,changeTheme:d,toggleDark:e})}})}});exports.ConfigProvider=b;exports.default=b;exports.injectConfigContext=E;exports.provideConfigContext=v;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Config } from '@pantograph/tokens';
|
|
2
|
+
import { ComputedRef, Ref } from 'vue';
|
|
3
|
+
interface _Config extends Config {
|
|
4
|
+
init?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface ConfigProviderProps {
|
|
7
|
+
locale?: 'fa' | 'en' | object;
|
|
8
|
+
theme?: _Config;
|
|
9
|
+
changeAbleDirectionElement?: string | HTMLElement | Ref<string | HTMLElement>;
|
|
10
|
+
changeAbleDarkElement?: string | HTMLElement | Ref<string | HTMLElement>;
|
|
11
|
+
}
|
|
12
|
+
export type Direction = 'ltr' | 'rtl';
|
|
13
|
+
interface Context {
|
|
14
|
+
theme: ComputedRef<Config>;
|
|
15
|
+
dir: Ref<Direction>;
|
|
16
|
+
dark: Ref<boolean>;
|
|
17
|
+
changeDirection: (dir?: Direction) => void;
|
|
18
|
+
changeTheme: (config: Config) => void;
|
|
19
|
+
toggleDark: (dark?: boolean, element?: Config['element']) => void;
|
|
20
|
+
}
|
|
21
|
+
declare const provideConfigContext: (contextValue: object | Context) => object | Context;
|
|
22
|
+
declare const injectConfigContext: () => object | Context;
|
|
23
|
+
export { provideConfigContext, injectConfigContext };
|
|
24
|
+
export declare const ConfigProvider: import('vue').DefineComponent<{
|
|
25
|
+
locale?: ("fa" | "en" | object) | undefined;
|
|
26
|
+
theme?: _Config | undefined;
|
|
27
|
+
changeAbleDirectionElement?: (string | HTMLElement | Ref<string | HTMLElement>) | undefined;
|
|
28
|
+
changeAbleDarkElement?: (string | HTMLElement | Ref<string | HTMLElement>) | undefined;
|
|
29
|
+
}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
32
|
+
locale?: ("fa" | "en" | object) | undefined;
|
|
33
|
+
theme?: _Config | undefined;
|
|
34
|
+
changeAbleDirectionElement?: (string | HTMLElement | Ref<string | HTMLElement>) | undefined;
|
|
35
|
+
changeAbleDarkElement?: (string | HTMLElement | Ref<string | HTMLElement>) | undefined;
|
|
36
|
+
}> & Readonly<{}>, {
|
|
37
|
+
changeAbleDirectionElement: string | HTMLElement | Ref<string | HTMLElement, string | HTMLElement>;
|
|
38
|
+
changeAbleDarkElement: string | HTMLElement | Ref<string | HTMLElement, string | HTMLElement>;
|
|
39
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
40
|
+
export default ConfigProvider;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { createContext as D, ConfigProvider as b } from "radix-vue";
|
|
2
|
+
import { toggleDark as k, init as C, defineTheme as d, getThemeConfig as E } from "@pantograph/tokens";
|
|
3
|
+
import { computed as u, unref as s, ref as h, defineComponent as T, watch as p, h as _ } from "vue";
|
|
4
|
+
import { isString as g } from "lodash-es";
|
|
5
|
+
import { useMutationObserver as v } from "@vueuse/core";
|
|
6
|
+
const y = (n) => {
|
|
7
|
+
const t = u(() => {
|
|
8
|
+
const e = s(n);
|
|
9
|
+
return g(e) ? document.querySelector(e) : e instanceof HTMLElement ? e : document.documentElement;
|
|
10
|
+
}), r = h("ltr"), o = () => {
|
|
11
|
+
t.value instanceof HTMLElement && (r.value = getComputedStyle(t.value).direction);
|
|
12
|
+
};
|
|
13
|
+
o();
|
|
14
|
+
const l = (e) => {
|
|
15
|
+
const i = ["rtl", "ltr"].includes(e) ? e : r.value === "ltr" ? "rtl" : "ltr";
|
|
16
|
+
t.value && (t.value.dir = i);
|
|
17
|
+
};
|
|
18
|
+
return v(t, o, {
|
|
19
|
+
attributes: !0,
|
|
20
|
+
attributeFilter: ["dir"]
|
|
21
|
+
}), [r, l];
|
|
22
|
+
}, L = (n) => {
|
|
23
|
+
const t = u(() => {
|
|
24
|
+
const e = s(n);
|
|
25
|
+
return g(e) ? document.querySelector(e) : e instanceof HTMLElement ? e : document.documentElement;
|
|
26
|
+
}), r = h(!1), o = () => {
|
|
27
|
+
var e, i;
|
|
28
|
+
t.value instanceof HTMLElement && (r.value = ((i = (e = t.value) == null ? void 0 : e.classList) == null ? void 0 : i.contains("dark")) ?? !1);
|
|
29
|
+
};
|
|
30
|
+
o();
|
|
31
|
+
const l = (e) => {
|
|
32
|
+
const i = e === !0 ? !0 : e === !1 ? !1 : !r.value;
|
|
33
|
+
t.value && k(i, t.value);
|
|
34
|
+
};
|
|
35
|
+
return v(t, o, {
|
|
36
|
+
attributes: !0,
|
|
37
|
+
attributeFilter: ["class"]
|
|
38
|
+
}), [r, l];
|
|
39
|
+
}, [M, S] = D("config-provider"), A = () => M({}), P = T({
|
|
40
|
+
name: "ConfigProvider",
|
|
41
|
+
props: {
|
|
42
|
+
locale: {
|
|
43
|
+
type: [String, Object],
|
|
44
|
+
required: !1
|
|
45
|
+
},
|
|
46
|
+
theme: {
|
|
47
|
+
type: Object,
|
|
48
|
+
required: !1
|
|
49
|
+
},
|
|
50
|
+
changeAbleDirectionElement: {
|
|
51
|
+
type: [String, HTMLElement, Object],
|
|
52
|
+
default: "html"
|
|
53
|
+
},
|
|
54
|
+
changeAbleDarkElement: {
|
|
55
|
+
type: [String, HTMLElement, Object],
|
|
56
|
+
default: "html"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
setup(n, {
|
|
60
|
+
slots: t
|
|
61
|
+
}) {
|
|
62
|
+
const [r, o] = y(n.changeAbleDirectionElement), [l, e] = L(n.changeAbleDarkElement);
|
|
63
|
+
p(
|
|
64
|
+
() => n.theme,
|
|
65
|
+
() => {
|
|
66
|
+
var a, c;
|
|
67
|
+
if ((a = n.theme) != null && a.init || (c = n.theme) != null && c.element) {
|
|
68
|
+
const { init: j, ...f } = n.theme;
|
|
69
|
+
window.pantographThemeDefined ? d(f) : (C(f), Promise.resolve({ }), window.pantographThemeDefined = !0);
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{ immediate: !0 }
|
|
73
|
+
);
|
|
74
|
+
const i = u(() => ({
|
|
75
|
+
...E(n.theme),
|
|
76
|
+
dark: l.value
|
|
77
|
+
})), m = (a) => {
|
|
78
|
+
var c;
|
|
79
|
+
return d({ element: (c = n.theme) == null ? void 0 : c.element, ...a });
|
|
80
|
+
};
|
|
81
|
+
return S({
|
|
82
|
+
dir: r,
|
|
83
|
+
theme: i,
|
|
84
|
+
dark: l,
|
|
85
|
+
changeDirection: o,
|
|
86
|
+
changeTheme: m,
|
|
87
|
+
toggleDark: e
|
|
88
|
+
}), () => _(
|
|
89
|
+
b,
|
|
90
|
+
{ dir: r },
|
|
91
|
+
{
|
|
92
|
+
default: () => {
|
|
93
|
+
var a;
|
|
94
|
+
return (a = t.default) == null ? void 0 : a.call(t, {
|
|
95
|
+
dir: r.value,
|
|
96
|
+
theme: i.value,
|
|
97
|
+
dark: l.value,
|
|
98
|
+
changeDirection: o,
|
|
99
|
+
changeTheme: m,
|
|
100
|
+
toggleDark: e
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
export {
|
|
108
|
+
P as ConfigProvider,
|
|
109
|
+
P as default,
|
|
110
|
+
A as injectConfigContext,
|
|
111
|
+
S as provideConfigContext
|
|
112
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { ConfigProviderProps, Direction } from './index.js';
|
|
3
|
+
export declare const useDir: (changeAbleDirectionElement?: ConfigProviderProps["changeAbleDirectionElement"]) => [Ref<Direction>, (dir?: Direction) => void];
|
|
4
|
+
export declare const useDark: (changeAbleDirectionElement?: ConfigProviderProps["changeAbleDirectionElement"]) => [Ref<boolean>, (dark?: boolean) => void];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PrimitiveProps } from 'radix-vue';
|
|
2
|
+
import { Class } from '../types';
|
|
3
|
+
import { DividerType } from './Divider.model.js';
|
|
4
|
+
export interface DividerProps extends Omit<PrimitiveProps, 'asChild'> {
|
|
5
|
+
type?: DividerType;
|
|
6
|
+
class?: Class;
|
|
7
|
+
}
|
|
8
|
+
declare function __VLS_template(): {
|
|
9
|
+
attrs: Partial<{}>;
|
|
10
|
+
slots: {
|
|
11
|
+
default?(_: {}): any;
|
|
12
|
+
};
|
|
13
|
+
refs: {};
|
|
14
|
+
rootEl: any;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<DividerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DividerProps> & Readonly<{}>, {
|
|
18
|
+
type: DividerType;
|
|
19
|
+
as: import('radix-vue', { with: { "resolution-mode": "import" } }).AsTag | import('vue').Component;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Divider.vue_vue_type_style_index_0_lang-C6Suy0tD.js");exports.Divider=e._sfc_main;exports.DividerTypes=e.DividerTypes;exports.default=e._sfc_main;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),c=require("radix-vue"),r=require("./class-CjZYGZDW.js"),l=require("class-variance-authority"),u=require("./options-B4iSAKol.js"),i=["horizontal","vertical"],p=e.defineComponent({...u.getComponentOptions("Divider"),__name:"Divider",props:{type:{default:"horizontal"},class:{},as:{default:"div"}},setup(a){const n=a,t=r.getBemBlock("divider"),o=l.cva(t,{variants:{type:r.generateVariantClassList(i,t)}});return(s,d)=>(e.openBlock(),e.createBlock(e.unref(c.Primitive),{as:s.as,class:e.normalizeClass([e.unref(o)({type:s.type}),n.class])},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3},8,["as","class"]))}});exports.DividerTypes=i;exports._sfc_main=p;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineComponent as i, openBlock as n, createBlock as p, unref as t, normalizeClass as l, withCtx as m, renderSlot as c } from "vue";
|
|
2
|
+
import { Primitive as f } from "radix-vue";
|
|
3
|
+
import { g as d, b as v } from "./class-DyU-Ox8D.js";
|
|
4
|
+
import { cva as u } from "class-variance-authority";
|
|
5
|
+
import { g as C } from "./options-JBqnVZUl.js";
|
|
6
|
+
const g = ["horizontal", "vertical"], z = /* @__PURE__ */ i({
|
|
7
|
+
...C("Divider"),
|
|
8
|
+
__name: "Divider",
|
|
9
|
+
props: {
|
|
10
|
+
type: { default: "horizontal" },
|
|
11
|
+
class: {},
|
|
12
|
+
as: { default: "div" }
|
|
13
|
+
},
|
|
14
|
+
setup(a) {
|
|
15
|
+
const r = a, s = v("divider"), o = u(s, {
|
|
16
|
+
variants: {
|
|
17
|
+
type: d(g, s)
|
|
18
|
+
// hasChild: generateVariantClassList('has-child', prefix),
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return (e, y) => (n(), p(t(f), {
|
|
22
|
+
as: e.as,
|
|
23
|
+
class: l([
|
|
24
|
+
t(o)({
|
|
25
|
+
type: e.type
|
|
26
|
+
}),
|
|
27
|
+
r.class
|
|
28
|
+
])
|
|
29
|
+
}, {
|
|
30
|
+
default: m(() => [
|
|
31
|
+
c(e.$slots, "default")
|
|
32
|
+
]),
|
|
33
|
+
_: 3
|
|
34
|
+
}, 8, ["as", "class"]));
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
g as D,
|
|
39
|
+
z as _
|
|
40
|
+
};
|