@pantograph/vue 0.10.1 → 0.10.3
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 +79 -3
- package/dist/ActionButton/index.js.js +1 -1
- package/dist/ActionButton/index.umd.cjs.js +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-KL8JuFlI.js → ActionButton.vue_vue_type_script_setup_true_lang-Bmld__SV.js} +1 -2
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-Bno9iBJg.js +1 -0
- package/dist/Avatar/Avatar.d.ts +14 -7
- package/dist/Avatar/index.js.js +1 -1
- package/dist/Avatar/index.umd.cjs.js +1 -1
- package/dist/Avatar.vue_vue_type_style_index_0_lang-BBmLnOBV.js +1 -0
- package/dist/Avatar.vue_vue_type_style_index_0_lang-ZqNWAzDy.js +182 -0
- package/dist/AvatarGroup/AvatarGroup.d.ts +3 -6
- package/dist/AvatarGroup/index.js.js +1 -1
- package/dist/AvatarGroup/index.umd.cjs.js +1 -1
- package/dist/Badge/Badge.d.ts +9 -2
- package/dist/Badge/index.js.js +1 -1
- package/dist/Badge/index.umd.cjs.js +1 -1
- package/dist/{Badge.vue_vue_type_script_setup_true_lang-nmw9qfJ_.js → Badge.vue_vue_type_script_setup_true_lang-CCIamdNB.js} +1 -2
- package/dist/Badge.vue_vue_type_script_setup_true_lang-ooDlpl8j.js +1 -0
- package/dist/Base/BaseBadge/BaseBadge.d.ts +12 -7
- package/dist/Base/BaseButton/BaseButton.d.ts +14 -7
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-BNs69VP4.js +1 -0
- package/dist/{BaseBadge.vue_vue_type_style_index_0_lang-MM6bsdzR.js → BaseBadge.vue_vue_type_style_index_0_lang-Bh1152XC.js} +46 -52
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-4ju_QUXH.js +1 -0
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-CEY27kcT.js +160 -0
- package/dist/Button/Button.d.ts +79 -3
- package/dist/Button/index.js.js +1 -1
- package/dist/Button/index.umd.cjs.js +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-DIj3gT2D.js → Button.vue_vue_type_script_setup_true_lang-BHumLt2E.js} +5 -6
- package/dist/Button.vue_vue_type_script_setup_true_lang-BZ0h9oaW.js +1 -0
- package/dist/ButtonGroup/ButtonGroup.d.ts +3 -5
- package/dist/ButtonGroup/index.js.js +1 -1
- package/dist/ButtonGroup/index.umd.cjs.js +1 -1
- package/dist/ButtonGroup.vue_vue_type_script_setup_true_lang-CT_Kgpjf.js +47 -0
- package/dist/ButtonGroup.vue_vue_type_script_setup_true_lang-D486_o-Z.js +1 -0
- package/dist/Checkbox/Checkbox.d.ts +12 -4
- package/dist/Checkbox/index.js.js +1 -1
- package/dist/Checkbox/index.umd.cjs.js +1 -1
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-CSmeTeZh.js +209 -0
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-D0sF0-hW.js +1 -0
- package/dist/CheckboxGroup/CheckboxGroup.d.ts +2 -5
- package/dist/CheckboxGroup/index.js.js +1 -1
- package/dist/CheckboxGroup/index.umd.cjs.js +1 -1
- package/dist/ColorPicker/index.js.js +1 -1
- package/dist/ColorPicker/index.umd.cjs.js +1 -1
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-Dq-kFXox.js → ColorPicker.vue_vue_type_style_index_0_lang-Bj735O4E.js} +2 -2
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-C36JPo4m.js → ColorPicker.vue_vue_type_style_index_0_lang-C86gVRVp.js} +1 -1
- package/dist/ColorSwatch/ColorSwatch.d.ts +11 -4
- package/dist/ColorSwatch/index.js.js +1 -1
- package/dist/ColorSwatch/index.umd.cjs.js +1 -1
- package/dist/ColorSwatch.vue_vue_type_style_index_0_lang-8sQWWbLp.js +100 -0
- package/dist/ColorSwatch.vue_vue_type_style_index_0_lang-Bt9Tu3La.js +1 -0
- package/dist/ColorSwatchGroup/ColorSwatchGroup.d.ts +17 -11
- package/dist/ColorSwatchGroup/index.js.js +1 -1
- package/dist/ColorSwatchGroup/index.umd.cjs.js +1 -1
- package/dist/ColorSwatchGroup.vue_vue_type_style_index_0_lang-BiHYDJTg.js +159 -0
- package/dist/ColorSwatchGroup.vue_vue_type_style_index_0_lang-DmF-FkKK.js +1 -0
- package/dist/ColorTrigger/ColorTrigger.d.ts +13 -5
- package/dist/ColorTrigger/index.js.js +1 -1
- package/dist/ColorTrigger/index.umd.cjs.js +1 -1
- package/dist/ColorTrigger.vue_vue_type_style_index_0_lang-BNFu93Ns.js +86 -0
- package/dist/ColorTrigger.vue_vue_type_style_index_0_lang-C8kPa338.js +1 -0
- package/dist/ConfigProvider/index.d.ts +6 -6
- package/dist/ConfigProvider/utils.d.ts +2 -2
- package/dist/Divider/Divider.d.ts +13 -8
- package/dist/Divider/index.js.js +1 -1
- package/dist/Divider/index.umd.cjs.js +1 -1
- package/dist/Divider.vue_vue_type_style_index_0_lang-BELWThBf.js +1 -0
- package/dist/Divider.vue_vue_type_style_index_0_lang-CRs1KEcj.js +34 -0
- package/dist/FloatButton/FloatButton.d.ts +79 -3
- package/dist/FloatButton/index.js.js +1 -1
- package/dist/FloatButton/index.umd.cjs.js +1 -1
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-Bapsnc_p.js → FloatButton.vue_vue_type_script_setup_true_lang-Bg4MdrWW.js} +1 -2
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-Bsmuycb8.js +1 -0
- package/dist/GraphicalObject/GraphicalObject.d.ts +9 -2
- package/dist/GraphicalObject/index.js.js +1 -1
- package/dist/GraphicalObject/index.umd.cjs.js +1 -1
- package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-B3FouRlw.js → GraphicalObject.vue_vue_type_script_setup_true_lang-BEZ6FkRf.js} +1 -2
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-CdO2zArd.js +1 -0
- package/dist/Icon/Icon.d.ts +11 -4
- package/dist/IconButton/IconButton.d.ts +79 -3
- package/dist/IconButton/index.js.js +1 -1
- package/dist/IconButton/index.umd.cjs.js +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-dI6-RNyi.js → IconButton.vue_vue_type_script_setup_true_lang-DJGgntqa.js} +1 -2
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-DU9MPZq2.js +1 -0
- package/dist/Image/Image.d.ts +16 -8
- package/dist/Image/index.js.js +1 -1
- package/dist/Image/index.umd.cjs.js +1 -1
- package/dist/{Image.vue_vue_type_style_index_0_lang-DbqKKOAs.js → Image.vue_vue_type_style_index_0_lang-Hg1jFz-L.js} +1 -1
- package/dist/{Image.vue_vue_type_style_index_0_lang-Cku5hiNE.js → Image.vue_vue_type_style_index_0_lang-pkzjPQyu.js} +2 -2
- package/dist/IndentLevel/IndentLevel.d.ts +14 -8
- package/dist/IndentLevel/index.js.js +1 -1
- package/dist/IndentLevel/index.umd.cjs.js +1 -1
- package/dist/IndentLevel.vue_vue_type_style_index_0_lang-DqqJTrDF.js +1 -0
- package/dist/IndentLevel.vue_vue_type_style_index_0_lang-ZZ1uEhji.js +94 -0
- package/dist/Indicator/Indicator.d.ts +9 -2
- package/dist/Indicator/index.js.js +1 -1
- package/dist/Indicator/index.umd.cjs.js +1 -1
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-ICqvLVbq.js → Indicator.vue_vue_type_script_setup_true_lang-B16OmZLF.js} +1 -2
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-BibzfVax.js +1 -0
- package/dist/Input/Input.d.ts +15 -7
- package/dist/Input/index.js.js +1 -1
- package/dist/Input/index.umd.cjs.js +1 -1
- package/dist/Input.vue_vue_type_style_index_0_lang-CcR6oCIR.js +407 -0
- package/dist/Input.vue_vue_type_style_index_0_lang-DVN491cI.js +1 -0
- package/dist/Kbd/Kbd.d.ts +13 -9
- package/dist/Kbd/index.js.js +1 -1
- package/dist/Kbd/index.umd.cjs.js +1 -1
- package/dist/Kbd.vue_vue_type_style_index_0_lang-CpDjSQqg.js +1 -0
- package/dist/Kbd.vue_vue_type_style_index_0_lang-D1y-0kBN.js +47 -0
- package/dist/Menu/Menu.d.ts +9 -10
- package/dist/Menu/index.js.js +1 -1
- package/dist/Menu/index.umd.cjs.js +1 -1
- package/dist/Menu.vue_vue_type_style_index_0_lang-CG9UOulA.js +1 -0
- package/dist/Menu.vue_vue_type_style_index_0_lang-CtqLC5y9.js +482 -0
- package/dist/MenuItem/MenuItem.d.ts +1 -1
- package/dist/MenuItem/index.js.js +1 -1
- package/dist/MenuItem/index.umd.cjs.js +1 -1
- package/dist/Popover/Popover.d.ts +83 -5
- package/dist/Popover/index.js.js +1 -1
- package/dist/Popover/index.umd.cjs.js +1 -1
- package/dist/Popover.vue_vue_type_style_index_0_lang-DRMPu5Ij.js +1 -0
- package/dist/{Popover.vue_vue_type_style_index_0_lang-C0IwnsU5.js → Popover.vue_vue_type_style_index_0_lang-vZfwRHoU.js} +22 -21
- package/dist/RadioGroup/RadioGroup.d.ts +12 -5
- package/dist/RadioGroup/RadioGroupItem.d.ts +11 -3
- package/dist/RadioGroup/index.d.ts +1 -1
- package/dist/RadioGroup/index.js.js +3 -2
- package/dist/RadioGroup/index.umd.cjs.js +1 -1
- package/dist/RadioGroup.vue_vue_type_script_setup_true_lang-C8nd4TEI.js +100 -0
- package/dist/RadioGroup.vue_vue_type_script_setup_true_lang-DjEHmvMo.js +1 -0
- package/dist/Shortcut/Shortcut.d.ts +1 -2
- package/dist/Shortcut/index.js.js +1 -1
- package/dist/Shortcut/index.umd.cjs.js +1 -1
- package/dist/Shortcut.vue_vue_type_style_index_0_lang-D4xo_UgO.js +32 -0
- package/dist/Shortcut.vue_vue_type_style_index_0_lang-D8_aLpYM.js +1 -0
- package/dist/Skeleton/Skeleton.d.ts +4 -8
- package/dist/Skeleton/index.js.js +1 -1
- package/dist/Skeleton/index.umd.cjs.js +1 -1
- package/dist/Skeleton.vue_vue_type_style_index_0_lang-BjcjY70B.js +58 -0
- package/dist/Skeleton.vue_vue_type_style_index_0_lang-gJRxIuPb.js +1 -0
- package/dist/Spinner/Spinner.d.ts +11 -6
- package/dist/Spinner/index.js.js +1 -1
- package/dist/Spinner/index.umd.cjs.js +1 -1
- package/dist/Spinner.vue_vue_type_style_index_0_lang-BP7P5xu8.js +1 -0
- package/dist/Spinner.vue_vue_type_style_index_0_lang-BYqqSQAx.js +73 -0
- package/dist/Switch/Switch.d.ts +14 -3
- package/dist/Switch/index.js.js +1 -1
- package/dist/Switch/index.umd.cjs.js +1 -1
- package/dist/Switch.vue_vue_type_style_index_0_lang-CoXu3YJ-.js +1 -0
- package/dist/Switch.vue_vue_type_style_index_0_lang-CvWay8Wa.js +106 -0
- package/dist/Tree/Tree.d.ts +12 -3
- package/dist/Tree/TreeNode.d.ts +11 -2
- package/dist/Tree/index.js.js +1 -1
- package/dist/Tree/index.umd.cjs.js +1 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-BCYjSwUH.js +545 -0
- package/dist/Tree.vue_vue_type_style_index_0_lang-CvskECfv.js +1 -0
- package/dist/index.js.js +66 -62
- package/dist/index.umd.cjs.js +1 -1
- package/dist/style/index.css +1 -1
- package/dist/useId-DvOSMFGX.js +9 -0
- package/dist/useId-Ku3O_8TK.js +1 -0
- package/dist/useInputDataStates-CZbdWpyp.js +26 -0
- package/dist/useInputDataStates-CbRgNQqU.js +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js.js +10 -6
- package/dist/utils/index.umd.cjs.js +1 -1
- package/dist/utils/useId.d.ts +1 -0
- package/dist/utils/useInputDataStates.d.ts +19 -0
- package/package.json +7 -3
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-BVtP6mpl.js +0 -1
- package/dist/Avatar.vue_vue_type_style_index_0_lang-BHYcXGuX.js +0 -188
- package/dist/Avatar.vue_vue_type_style_index_0_lang-DKGY3npY.js +0 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-BcdNUohN.js +0 -1
- package/dist/Base/Primitive.d.ts +0 -39
- package/dist/Base/Slot.d.ts +0 -6
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-OEeJw0Sy.js +0 -1
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-BrQJfrgg.js +0 -159
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-CTK5nNR6.js +0 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang-7V57ztN4.js +0 -1
- package/dist/ButtonGroup.vue_vue_type_script_setup_true_lang-BSj1Y1j2.js +0 -1
- package/dist/ButtonGroup.vue_vue_type_script_setup_true_lang-CdSgBboA.js +0 -52
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-C6Mdufam.js +0 -1
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-DNlvOQmv.js +0 -216
- package/dist/ColorSwatch.vue_vue_type_style_index_0_lang-Bo-zDAyc.js +0 -1
- package/dist/ColorSwatch.vue_vue_type_style_index_0_lang-DmLhCPh4.js +0 -102
- package/dist/ColorSwatchGroup.vue_vue_type_style_index_0_lang-CIkTvqD_.js +0 -165
- package/dist/ColorSwatchGroup.vue_vue_type_style_index_0_lang-T_L-D2SS.js +0 -1
- package/dist/ColorTrigger.vue_vue_type_style_index_0_lang-DSZ8fAZ9.js +0 -91
- package/dist/ColorTrigger.vue_vue_type_style_index_0_lang-DwyinKNj.js +0 -1
- package/dist/Divider.vue_vue_type_style_index_0_lang-B_4XMyuu.js +0 -40
- package/dist/Divider.vue_vue_type_style_index_0_lang-C6Suy0tD.js +0 -1
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-C56u1xaL.js +0 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-DlMeNk_1.js +0 -1
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-7QB-mmyg.js +0 -1
- package/dist/IndentLevel.vue_vue_type_style_index_0_lang-CM6s5E6c.js +0 -1
- package/dist/IndentLevel.vue_vue_type_style_index_0_lang-nGsyFkwr.js +0 -104
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-C4Ecg4iy.js +0 -1
- package/dist/Input.vue_vue_type_style_index_0_lang-D0zx-hd_.js +0 -1
- package/dist/Input.vue_vue_type_style_index_0_lang-cjYJlwXf.js +0 -413
- package/dist/Kbd.vue_vue_type_style_index_0_lang-BqEaW_kJ.js +0 -1
- package/dist/Kbd.vue_vue_type_style_index_0_lang-DbtLbpq-.js +0 -60
- package/dist/Menu.vue_vue_type_style_index_0_lang-DHGED80D.js +0 -481
- package/dist/Menu.vue_vue_type_style_index_0_lang-DU0Rexv8.js +0 -1
- package/dist/Popover.vue_vue_type_style_index_0_lang-CM8qMFEi.js +0 -1
- package/dist/Primitive-BT1RjuGS.js +0 -1
- package/dist/Primitive-nOVjbfuc.js +0 -47
- package/dist/RadioGroup.vue_vue_type_script_setup_true_lang-DWfKIuDH.js +0 -100
- package/dist/RadioGroup.vue_vue_type_script_setup_true_lang-s-m7W1By.js +0 -1
- package/dist/Shortcut.vue_vue_type_style_index_0_lang-BQb7DjFe.js +0 -41
- package/dist/Shortcut.vue_vue_type_style_index_0_lang-C49ZdQFd.js +0 -1
- package/dist/Skeleton.vue_vue_type_style_index_0_lang-B6bCkLlD.js +0 -66
- package/dist/Skeleton.vue_vue_type_style_index_0_lang-PNNUgKOq.js +0 -1
- package/dist/Spinner.vue_vue_type_style_index_0_lang-CxNO28J7.js +0 -1
- package/dist/Spinner.vue_vue_type_style_index_0_lang-D6nB06Z8.js +0 -85
- package/dist/Switch.vue_vue_type_style_index_0_lang-BzC8-ylY.js +0 -103
- package/dist/Switch.vue_vue_type_style_index_0_lang-DnNHGn1c.js +0 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-B-BPV_p7.js +0 -547
- package/dist/Tree.vue_vue_type_style_index_0_lang-BIpFWo5L.js +0 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { g as P, a as i } from "./class-DziTeW9B.js";
|
|
1
|
+
import { defineComponent as k, useSlots as _, computed as a, createElementBlock as c, openBlock as o, normalizeStyle as C, normalizeClass as h, unref as u, createCommentVNode as m, Fragment as S, createBlock as w, renderSlot as p, withCtx as V, createTextVNode as $, toDisplayString as I } from "vue";
|
|
2
|
+
import { g as N, a as l } from "./class-DziTeW9B.js";
|
|
4
3
|
import { cva as T } from "class-variance-authority";
|
|
5
4
|
import { g as D } from "./options-JBqnVZUl.js";
|
|
6
5
|
import "@iconify/vue";
|
|
7
6
|
import { _ as E } from "./Icon.vue_vue_type_style_index_0_lang-BfPcw6PU.js";
|
|
8
|
-
const b = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], d = ["rect", "pill", "minify"],
|
|
7
|
+
const b = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], d = ["rect", "pill", "minify"], G = [
|
|
9
8
|
"primary",
|
|
10
9
|
"red",
|
|
11
10
|
"orange",
|
|
@@ -23,7 +22,7 @@ const b = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], d = ["rect", "pill", "m
|
|
|
23
22
|
"fuchsia",
|
|
24
23
|
"pink",
|
|
25
24
|
"gray"
|
|
26
|
-
],
|
|
25
|
+
], H = [
|
|
27
26
|
"primary-subtle",
|
|
28
27
|
"red-subtle",
|
|
29
28
|
"orange-subtle",
|
|
@@ -41,7 +40,7 @@ const b = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], d = ["rect", "pill", "m
|
|
|
41
40
|
"fuchsia-subtle",
|
|
42
41
|
"pink-subtle",
|
|
43
42
|
"gray-subtle"
|
|
44
|
-
],
|
|
43
|
+
], J = /* @__PURE__ */ k({
|
|
45
44
|
...D("BaseBadge"),
|
|
46
45
|
__name: "BaseBadge",
|
|
47
46
|
props: {
|
|
@@ -52,23 +51,22 @@ const b = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], d = ["rect", "pill", "m
|
|
|
52
51
|
fg: {},
|
|
53
52
|
br: {},
|
|
54
53
|
type: { default: "pill" },
|
|
55
|
-
icon: {}
|
|
56
|
-
as: { default: "div" }
|
|
54
|
+
icon: {}
|
|
57
55
|
},
|
|
58
|
-
setup(
|
|
59
|
-
const
|
|
56
|
+
setup(f) {
|
|
57
|
+
const n = N("badge"), t = f, y = T(n, {
|
|
60
58
|
variants: {
|
|
61
|
-
size:
|
|
62
|
-
type:
|
|
63
|
-
text:
|
|
64
|
-
icon:
|
|
65
|
-
br:
|
|
59
|
+
size: l(b, n),
|
|
60
|
+
type: l(d, n),
|
|
61
|
+
text: l("text", n),
|
|
62
|
+
icon: l("icon", n),
|
|
63
|
+
br: l("br", n)
|
|
66
64
|
}
|
|
67
|
-
}),
|
|
65
|
+
}), i = _(), s = a(() => d.includes(t.type) ? t.type : "pill"), g = a(() => !!(t.text || i.default)), v = a(() => !!(t.icon || i.icon)), r = a(() => {
|
|
68
66
|
let e = b.includes(t.size) ? t.size : "md";
|
|
69
67
|
return e === "sm" && s.value !== "rect" ? s.value === "minify" ? e = "tiny" : s.value === "pill" && (e = "md") : s.value === "minify" && !["tiny", "tinier"].includes(e) ? e = "tiny" : s.value !== "minify" && ["tiny", "tinier"].includes(e) && (e = "md"), e;
|
|
70
|
-
}),
|
|
71
|
-
switch (
|
|
68
|
+
}), B = a(() => {
|
|
69
|
+
switch (r.value) {
|
|
72
70
|
case "sm":
|
|
73
71
|
return "xsm";
|
|
74
72
|
case "xsm":
|
|
@@ -79,51 +77,47 @@ const b = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], d = ["rect", "pill", "m
|
|
|
79
77
|
default:
|
|
80
78
|
return "sm";
|
|
81
79
|
}
|
|
82
|
-
}),
|
|
83
|
-
size:
|
|
80
|
+
}), x = a(() => ({
|
|
81
|
+
size: r.value,
|
|
84
82
|
// color,
|
|
85
83
|
type: s.value,
|
|
86
|
-
text:
|
|
87
|
-
icon:
|
|
84
|
+
text: g.value,
|
|
85
|
+
icon: v.value,
|
|
88
86
|
br: !!t.br
|
|
89
|
-
})),
|
|
90
|
-
const e =
|
|
91
|
-
return t.type === "rect" && (
|
|
87
|
+
})), z = a(() => {
|
|
88
|
+
const e = i.icon ?? t.icon;
|
|
89
|
+
return t.type === "rect" && (i.default || t.text) ? !1 : e;
|
|
92
90
|
});
|
|
93
|
-
return (e, F) => (o(),
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
style: h({
|
|
91
|
+
return (e, F) => (o(), c("div", {
|
|
92
|
+
class: h([u(y)(x.value), t.class]),
|
|
93
|
+
style: C({
|
|
97
94
|
"--ptc-badge-fg": t.fg,
|
|
98
95
|
"--ptc-badge-bg": t.bg,
|
|
99
96
|
"--ptc-badge-br": t.br
|
|
100
97
|
})
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
]),
|
|
119
|
-
_: 3
|
|
120
|
-
}, 8, ["as", "class", "style"]));
|
|
98
|
+
}, [
|
|
99
|
+
s.value !== "minify" ? (o(), c(S, { key: 0 }, [
|
|
100
|
+
z.value ? (o(), w(u(E), {
|
|
101
|
+
key: 0,
|
|
102
|
+
icon: e.icon,
|
|
103
|
+
size: B.value
|
|
104
|
+
}, {
|
|
105
|
+
default: V(() => [
|
|
106
|
+
p(e.$slots, "icon")
|
|
107
|
+
]),
|
|
108
|
+
_: 3
|
|
109
|
+
}, 8, ["icon", "size"])) : m("", !0),
|
|
110
|
+
p(e.$slots, "default", {}, () => [
|
|
111
|
+
$(I(e.text), 1)
|
|
112
|
+
])
|
|
113
|
+
], 64)) : m("", !0)
|
|
114
|
+
], 6));
|
|
121
115
|
}
|
|
122
116
|
});
|
|
123
117
|
export {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
118
|
+
H as B,
|
|
119
|
+
J as _,
|
|
120
|
+
G as a,
|
|
127
121
|
b,
|
|
128
122
|
d as c
|
|
129
123
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),g=require("./Icon.vue_vue_type_style_index_0_lang-BvHCdzZP.js"),b=require("./Spinner.vue_vue_type_style_index_0_lang-BP7P5xu8.js"),k=require("./Badge.vue_vue_type_script_setup_true_lang-ooDlpl8j.js"),i=require("./ButtonGroup.vue_vue_type_script_setup_true_lang-D486_o-Z.js"),a=require("./class-CjZYGZDW.js"),V=require("class-variance-authority"),S=require("./options-B4iSAKol.js"),f="2xsm",x=e.defineComponent({...S.getComponentOptions("BaseButton"),__name:"BaseButton",props:{class:{},text:{},size:{},color:{default:"primary"},type:{default:"fill"},variant:{},loading:{type:Boolean},action:{type:Boolean},active:{type:Boolean},badgeText:{},badgeIcon:{},icon:{},preIcon:{},postIcon:{}},setup(y,{expose:B}){const o=y,n=a.getBemBlock("button"),_=V.cva(n,{variants:{size:a.generateVariantClassList(i.ButtonSizes,n),type:a.generateVariantClassList(i.ButtonTypes,n),color:a.generateVariantClassList(i.ButtonColors,n),variant:a.generateVariantClassList(i.ButtonVariants,n),action:a.generateVariantClassList("action",n),active:a.generateVariantClassList("active",n),text:a.generateVariantClassList("text",n),preIcon:a.generateVariantClassList("preIcon",n),postIcon:a.generateVariantClassList("postIcon",n),loading:a.generateVariantClassList("loading",n)}}),v=i.injectButtonGroupContext({size:e.computed(()=>o.size),variant:e.computed(()=>o.variant)}),l=e.computed(()=>o.variant??v.variant.value??"simple"),r=e.computed(()=>["icon","float"].includes(l.value)),s=e.useSlots(),I=e.computed(()=>{let t=i.ButtonTypes.includes(o.type)?o.type:"fill";const c=o.size??v.size.value,C=c&&i.ButtonSizes.includes(c)?c:"md";let u=o.color&&i.ButtonColors.includes(o.color)?o.color:"primary",p=l.value&&i.ButtonVariants.includes(l.value)?l.value:"simple";return o.action?(p==="float"&&(p="icon"),t==="fill"&&(t="outline"),u=void 0):p==="float"&&(t==="ghost"&&(t="fill"),["primary","gray"].includes(u)||(u="primary")),{size:C,type:t,color:u,variant:p,action:o.action,active:o.active,loading:o.loading,text:!r.value&&!!(o.text||s.default),preIcon:!r.value&&!!(o.preIcon||s.preIcon),postIcon:!r.value&&!!(o.postIcon||s.postIcon)}}),d=e.computed(()=>{switch(o.size){case"sm":return"3xsm";default:return"2xsm"}}),z=e.computed(()=>{switch(o.size){case"sm":return"3xsm";case"lg":return"xsm";case"md":default:return"2xsm"}}),m=e.ref();return B({focus(){var t;(t=m.value)==null||t.focus()},blur(){var t;(t=m.value)==null||t.blur()}}),(t,c)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass([e.unref(_)(I.value),o.class]),tabindex:"0",ref_key:"buttonRef",ref:m},[t.loading?(e.openBlock(),e.createBlock(b._sfc_main,{key:1,class:e.normalizeClass(e.unref(a.getBemElement)(e.unref(n),"loading")),size:d.value},null,8,["class","size"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(t.preIcon||s.preIcon)&&!r.value?(e.openBlock(),e.createBlock(g._sfc_main,{key:0,icon:t.preIcon,size:d.value},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"preIcon")]),_:3},8,["icon","size"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(g._sfc_main,{key:1,icon:t.icon,size:z.value},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"icon")]),_:3},8,["icon","size"])):e.renderSlot(t.$slots,"default",{key:2},()=>[e.createTextVNode(e.toDisplayString(t.text),1)]),t.action&&t.active&&!r.value&&(t.badgeText||s.badgeText||t.badgeIcon||s.badgeIcon)?e.renderSlot(t.$slots,"badge",e.normalizeProps(e.mergeProps({key:3},{color:t.$attrs.disabled?"gray":"primary",size:f})),()=>[e.createVNode(k._sfc_main,{text:t.badgeText,icon:t.badgeIcon,color:t.$attrs.disabled?"gray":"primary",size:f},e.createSlots({_:2},[s.badgeText?{name:"default",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"badgeText")]),key:"0"}:void 0,s.badgeIcon?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"badgeIcon")]),key:"1"}:void 0]),1032,["text","icon","color"])]):e.createCommentVNode("",!0),(t.postIcon||s.postIcon)&&!r.value?(e.openBlock(),e.createBlock(g._sfc_main,{key:4,icon:t.postIcon,size:d.value},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"postIcon")]),_:3},8,["icon","size"])):e.createCommentVNode("",!0)],64))],2))}});exports._sfc_main=x;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { defineComponent as R, computed as i, useSlots as j, ref as A, createElementBlock as B, openBlock as r, normalizeClass as k, unref as y, createBlock as f, Fragment as D, createCommentVNode as I, renderSlot as l, withCtx as c, createTextVNode as F, toDisplayString as G, normalizeProps as L, mergeProps as O, createVNode as _, createSlots as q } from "vue";
|
|
2
|
+
import { _ as z } from "./Icon.vue_vue_type_style_index_0_lang-BfPcw6PU.js";
|
|
3
|
+
import { _ as H } from "./Spinner.vue_vue_type_style_index_0_lang-BYqqSQAx.js";
|
|
4
|
+
import { _ as J } from "./Badge.vue_vue_type_script_setup_true_lang-CCIamdNB.js";
|
|
5
|
+
import { i as K, a as $, c as C, b as S, B as T } from "./ButtonGroup.vue_vue_type_script_setup_true_lang-CT_Kgpjf.js";
|
|
6
|
+
import { g as M, a, b as Q } from "./class-DziTeW9B.js";
|
|
7
|
+
import { cva as U } from "class-variance-authority";
|
|
8
|
+
import { g as W } from "./options-JBqnVZUl.js";
|
|
9
|
+
const x = "2xsm", se = /* @__PURE__ */ R({
|
|
10
|
+
...W("BaseButton"),
|
|
11
|
+
__name: "BaseButton",
|
|
12
|
+
props: {
|
|
13
|
+
class: {},
|
|
14
|
+
text: {},
|
|
15
|
+
size: {},
|
|
16
|
+
color: { default: "primary" },
|
|
17
|
+
type: { default: "fill" },
|
|
18
|
+
variant: {},
|
|
19
|
+
loading: { type: Boolean },
|
|
20
|
+
action: { type: Boolean },
|
|
21
|
+
active: { type: Boolean },
|
|
22
|
+
badgeText: {},
|
|
23
|
+
badgeIcon: {},
|
|
24
|
+
icon: {},
|
|
25
|
+
preIcon: {},
|
|
26
|
+
postIcon: {}
|
|
27
|
+
},
|
|
28
|
+
setup(h, { expose: V }) {
|
|
29
|
+
const o = h, t = M("button"), w = U(t, {
|
|
30
|
+
variants: {
|
|
31
|
+
size: a(C, t),
|
|
32
|
+
type: a($, t),
|
|
33
|
+
color: a(S, t),
|
|
34
|
+
variant: a(T, t),
|
|
35
|
+
action: a("action", t),
|
|
36
|
+
active: a("active", t),
|
|
37
|
+
text: a("text", t),
|
|
38
|
+
preIcon: a("preIcon", t),
|
|
39
|
+
postIcon: a("postIcon", t),
|
|
40
|
+
loading: a("loading", t)
|
|
41
|
+
}
|
|
42
|
+
}), b = K({
|
|
43
|
+
size: i(() => o.size),
|
|
44
|
+
variant: i(() => o.variant)
|
|
45
|
+
}), u = i(() => o.variant ?? b.variant.value ?? "simple"), s = i(() => ["icon", "float"].includes(u.value)), n = j(), N = i(() => {
|
|
46
|
+
let e = $.includes(o.type) ? o.type : "fill";
|
|
47
|
+
const p = o.size ?? b.size.value, E = p && C.includes(p) ? p : "md";
|
|
48
|
+
let d = o.color && S.includes(o.color) ? o.color : "primary", m = u.value && T.includes(u.value) ? u.value : "simple";
|
|
49
|
+
return o.action ? (m === "float" && (m = "icon"), e === "fill" && (e = "outline"), d = void 0) : m === "float" && (e === "ghost" && (e = "fill"), ["primary", "gray"].includes(d) || (d = "primary")), {
|
|
50
|
+
size: E,
|
|
51
|
+
type: e,
|
|
52
|
+
color: d,
|
|
53
|
+
variant: m,
|
|
54
|
+
action: o.action,
|
|
55
|
+
active: o.active,
|
|
56
|
+
loading: o.loading,
|
|
57
|
+
text: !s.value && !!(o.text || n.default),
|
|
58
|
+
preIcon: !s.value && !!(o.preIcon || n.preIcon),
|
|
59
|
+
postIcon: !s.value && !!(o.postIcon || n.postIcon)
|
|
60
|
+
};
|
|
61
|
+
}), v = i(() => {
|
|
62
|
+
switch (o.size) {
|
|
63
|
+
case "sm":
|
|
64
|
+
return "3xsm";
|
|
65
|
+
default:
|
|
66
|
+
return "2xsm";
|
|
67
|
+
}
|
|
68
|
+
}), P = i(() => {
|
|
69
|
+
switch (o.size) {
|
|
70
|
+
case "sm":
|
|
71
|
+
return "3xsm";
|
|
72
|
+
case "lg":
|
|
73
|
+
return "xsm";
|
|
74
|
+
case "md":
|
|
75
|
+
default:
|
|
76
|
+
return "2xsm";
|
|
77
|
+
}
|
|
78
|
+
}), g = A();
|
|
79
|
+
return V({
|
|
80
|
+
focus() {
|
|
81
|
+
var e;
|
|
82
|
+
(e = g.value) == null || e.focus();
|
|
83
|
+
},
|
|
84
|
+
blur() {
|
|
85
|
+
var e;
|
|
86
|
+
(e = g.value) == null || e.blur();
|
|
87
|
+
}
|
|
88
|
+
}), (e, p) => (r(), B("button", {
|
|
89
|
+
class: k([y(w)(N.value), o.class]),
|
|
90
|
+
tabindex: "0",
|
|
91
|
+
ref_key: "buttonRef",
|
|
92
|
+
ref: g
|
|
93
|
+
}, [
|
|
94
|
+
e.loading ? (r(), f(H, {
|
|
95
|
+
key: 1,
|
|
96
|
+
class: k(y(Q)(y(t), "loading")),
|
|
97
|
+
size: v.value
|
|
98
|
+
}, null, 8, ["class", "size"])) : (r(), B(D, { key: 0 }, [
|
|
99
|
+
(e.preIcon || n.preIcon) && !s.value ? (r(), f(z, {
|
|
100
|
+
key: 0,
|
|
101
|
+
icon: e.preIcon,
|
|
102
|
+
size: v.value
|
|
103
|
+
}, {
|
|
104
|
+
default: c(() => [
|
|
105
|
+
l(e.$slots, "preIcon")
|
|
106
|
+
]),
|
|
107
|
+
_: 3
|
|
108
|
+
}, 8, ["icon", "size"])) : I("", !0),
|
|
109
|
+
s.value ? (r(), f(z, {
|
|
110
|
+
key: 1,
|
|
111
|
+
icon: e.icon,
|
|
112
|
+
size: P.value
|
|
113
|
+
}, {
|
|
114
|
+
default: c(() => [
|
|
115
|
+
l(e.$slots, "icon")
|
|
116
|
+
]),
|
|
117
|
+
_: 3
|
|
118
|
+
}, 8, ["icon", "size"])) : l(e.$slots, "default", { key: 2 }, () => [
|
|
119
|
+
F(G(e.text), 1)
|
|
120
|
+
]),
|
|
121
|
+
e.action && e.active && !s.value && (e.badgeText || n.badgeText || e.badgeIcon || n.badgeIcon) ? l(e.$slots, "badge", L(O({ key: 3 }, { color: e.$attrs.disabled ? "gray" : "primary", size: x })), () => [
|
|
122
|
+
_(J, {
|
|
123
|
+
text: e.badgeText,
|
|
124
|
+
icon: e.badgeIcon,
|
|
125
|
+
color: e.$attrs.disabled ? "gray" : "primary",
|
|
126
|
+
size: x
|
|
127
|
+
}, q({ _: 2 }, [
|
|
128
|
+
n.badgeText ? {
|
|
129
|
+
name: "default",
|
|
130
|
+
fn: c(() => [
|
|
131
|
+
l(e.$slots, "badgeText")
|
|
132
|
+
]),
|
|
133
|
+
key: "0"
|
|
134
|
+
} : void 0,
|
|
135
|
+
n.badgeIcon ? {
|
|
136
|
+
name: "icon",
|
|
137
|
+
fn: c(() => [
|
|
138
|
+
l(e.$slots, "badgeIcon")
|
|
139
|
+
]),
|
|
140
|
+
key: "1"
|
|
141
|
+
} : void 0
|
|
142
|
+
]), 1032, ["text", "icon", "color"])
|
|
143
|
+
]) : I("", !0),
|
|
144
|
+
(e.postIcon || n.postIcon) && !s.value ? (r(), f(z, {
|
|
145
|
+
key: 4,
|
|
146
|
+
icon: e.postIcon,
|
|
147
|
+
size: v.value
|
|
148
|
+
}, {
|
|
149
|
+
default: c(() => [
|
|
150
|
+
l(e.$slots, "postIcon")
|
|
151
|
+
]),
|
|
152
|
+
_: 3
|
|
153
|
+
}, 8, ["icon", "size"])) : I("", !0)
|
|
154
|
+
], 64))
|
|
155
|
+
], 2));
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
export {
|
|
159
|
+
se as _
|
|
160
|
+
};
|
package/dist/Button/Button.d.ts
CHANGED
|
@@ -1,10 +1,86 @@
|
|
|
1
1
|
import { BaseButtonSlots, BaseButtonProps } from '../Base/BaseButton/BaseButton';
|
|
2
|
-
export type ButtonProps = Partial<Pick<BaseButtonProps, '
|
|
2
|
+
export type ButtonProps = Partial<Pick<BaseButtonProps, 'class' | 'type' | 'color' | 'loading' | 'preIcon' | 'postIcon' | 'size' | 'text'>>;
|
|
3
3
|
type ButtonSlots = Omit<BaseButtonSlots, 'icon' | 'badge'>;
|
|
4
|
-
declare
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
slots: Readonly<ButtonSlots> & ButtonSlots;
|
|
6
|
+
refs: {
|
|
7
|
+
buttonRef: ({
|
|
8
|
+
$: import('vue').ComponentInternalInstance;
|
|
9
|
+
$data: {};
|
|
10
|
+
$props: {
|
|
11
|
+
readonly class?: import('../index.ts', { with: { "resolution-mode": "import" } }).Class | undefined;
|
|
12
|
+
readonly text?: (string | number) | undefined;
|
|
13
|
+
readonly size?: import('../index.ts', { with: { "resolution-mode": "import" } }).ButtonSize | undefined;
|
|
14
|
+
readonly color?: import('../index.ts', { with: { "resolution-mode": "import" } }).ButtonColor | undefined;
|
|
15
|
+
readonly type?: import('../index.ts', { with: { "resolution-mode": "import" } }).ButtonType | undefined;
|
|
16
|
+
readonly variant?: import('../index.ts', { with: { "resolution-mode": "import" } }).ButtonVariant | undefined;
|
|
17
|
+
readonly loading?: boolean | undefined;
|
|
18
|
+
readonly action?: boolean | undefined;
|
|
19
|
+
readonly active?: boolean | undefined;
|
|
20
|
+
readonly badgeText?: string | undefined;
|
|
21
|
+
readonly badgeIcon?: string | undefined;
|
|
22
|
+
readonly icon?: string | undefined;
|
|
23
|
+
readonly preIcon?: string | undefined;
|
|
24
|
+
readonly postIcon?: string | undefined;
|
|
25
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
26
|
+
$attrs: {
|
|
27
|
+
[x: string]: unknown;
|
|
28
|
+
};
|
|
29
|
+
$refs: {
|
|
30
|
+
[x: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
$slots: Readonly<{
|
|
33
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
34
|
+
}>;
|
|
35
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
36
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
37
|
+
$host: Element | null;
|
|
38
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
39
|
+
$el: any;
|
|
40
|
+
$options: import('vue').ComponentOptionsBase<Readonly<BaseButtonProps> & Readonly<{}>, {
|
|
41
|
+
focus(): void;
|
|
42
|
+
blur(): void;
|
|
43
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
44
|
+
type: import('../index.ts', { with: { "resolution-mode": "import" } }).ButtonType;
|
|
45
|
+
color: import('../index.ts', { with: { "resolution-mode": "import" } }).ButtonColor;
|
|
46
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
47
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
48
|
+
created?: (() => void) | (() => void)[];
|
|
49
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
50
|
+
mounted?: (() => void) | (() => void)[];
|
|
51
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
52
|
+
updated?: (() => void) | (() => void)[];
|
|
53
|
+
activated?: (() => void) | (() => void)[];
|
|
54
|
+
deactivated?: (() => void) | (() => void)[];
|
|
55
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
56
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
57
|
+
destroyed?: (() => void) | (() => void)[];
|
|
58
|
+
unmounted?: (() => void) | (() => void)[];
|
|
59
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
60
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
61
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
62
|
+
};
|
|
63
|
+
$forceUpdate: () => void;
|
|
64
|
+
$nextTick: typeof import('vue').nextTick;
|
|
65
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
66
|
+
} & Readonly<{
|
|
67
|
+
type: import('../index.ts', { with: { "resolution-mode": "import" } }).ButtonType;
|
|
68
|
+
color: import('../index.ts', { with: { "resolution-mode": "import" } }).ButtonColor;
|
|
69
|
+
}> & Omit<Readonly<BaseButtonProps> & Readonly<{}>, "blur" | "focus" | ("type" | "color")> & import('vue').ShallowUnwrapRef<{
|
|
70
|
+
focus(): void;
|
|
71
|
+
blur(): void;
|
|
72
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
73
|
+
$slots: Readonly<BaseButtonSlots> & BaseButtonSlots;
|
|
74
|
+
}) | null;
|
|
75
|
+
};
|
|
76
|
+
attrs: Partial<{}>;
|
|
77
|
+
};
|
|
78
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
79
|
+
declare const __VLS_component: import('vue').DefineComponent<Partial<Pick<BaseButtonProps, "size" | "class" | "type" | "color" | "text" | "loading" | "preIcon" | "postIcon">>, {
|
|
5
80
|
focus(): void;
|
|
6
81
|
blur(): void;
|
|
7
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Partial<Pick<BaseButtonProps, "size" | "class" | "type" | "color" | "text" | "
|
|
82
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Partial<Pick<BaseButtonProps, "size" | "class" | "type" | "color" | "text" | "loading" | "preIcon" | "postIcon">>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
83
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
8
84
|
export default _default;
|
|
9
85
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
10
86
|
new (): {
|
package/dist/Button/index.js.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Button.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Button.vue_vue_type_script_setup_true_lang-BZ0h9oaW.js");exports.Button=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { defineComponent as i, useAttrs as m, computed as u, ref as l, createBlock as f, openBlock as _, mergeProps as d, createSlots as b, renderList as g, withCtx as v, renderSlot as B, normalizeProps as k, guardReactiveProps as x } from "vue";
|
|
2
2
|
import { o as y } from "./omit-BEkBWXra.js";
|
|
3
|
-
import { _ as C } from "./BaseButton.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import { _ as C } from "./BaseButton.vue_vue_type_style_index_0_lang-CEY27kcT.js";
|
|
4
4
|
import { g as P } from "./options-JBqnVZUl.js";
|
|
5
5
|
const O = /* @__PURE__ */ i({
|
|
6
6
|
...P("Button", !1),
|
|
7
7
|
__name: "Button",
|
|
8
8
|
props: {
|
|
9
|
-
as: {},
|
|
10
9
|
class: {},
|
|
11
10
|
type: {},
|
|
12
11
|
color: {},
|
|
@@ -16,12 +15,12 @@ const O = /* @__PURE__ */ i({
|
|
|
16
15
|
size: {},
|
|
17
16
|
text: {}
|
|
18
17
|
},
|
|
19
|
-
setup(r, { expose:
|
|
20
|
-
const
|
|
18
|
+
setup(r, { expose: n }) {
|
|
19
|
+
const s = r, a = m(), c = u(() => ({
|
|
21
20
|
...y(a, "variant", "icon", "action", "active", "badgeText"),
|
|
22
|
-
...
|
|
21
|
+
...s
|
|
23
22
|
})), o = l();
|
|
24
|
-
return
|
|
23
|
+
return n({
|
|
25
24
|
focus() {
|
|
26
25
|
var e;
|
|
27
26
|
(e = o.value) == null || e.focus();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),p=require("./omit-BKPbELUG.js"),l=require("./BaseButton.vue_vue_type_style_index_0_lang-4ju_QUXH.js"),_=require("./options-B4iSAKol.js"),f=e.defineComponent({..._.getComponentOptions("Button",!1),__name:"Button",props:{class:{},type:{},color:{},loading:{type:Boolean},preIcon:{},postIcon:{},size:{},text:{}},setup(s,{expose:r}){const c=s,a=e.useAttrs(),i=e.computed(()=>({...p.omit(a,"variant","icon","action","active","badgeText"),...c})),o=e.ref();return r({focus(){var t;(t=o.value)==null||t.focus()},blur(){var t;(t=o.value)==null||t.blur()}}),(t,m)=>(e.openBlock(),e.createBlock(l._sfc_main,e.mergeProps(i.value,{variant:"simple",ref_key:"buttonRef",ref:o}),e.createSlots({_:2},[e.renderList(Object.keys(t.$slots),n=>({name:n,fn:e.withCtx(u=>[e.renderSlot(t.$slots,n,e.normalizeProps(e.guardReactiveProps(u)))])}))]),1040))}});exports._sfc_main=f;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ButtonSize, ButtonVariant } from '../Base/BaseButton/BaseButton.model';
|
|
2
|
-
import { PrimitiveProps } from 'radix-vue';
|
|
3
2
|
import { ComputedRef } from 'vue';
|
|
4
3
|
import { Class } from '../types';
|
|
5
4
|
declare const ButtonGroupGaps: readonly ["sm", "md", "lg", "none"];
|
|
6
|
-
export type ButtonGroupProps =
|
|
5
|
+
export type ButtonGroupProps = {
|
|
7
6
|
class?: Class;
|
|
8
7
|
size?: ButtonSize;
|
|
9
8
|
variant?: ButtonVariant;
|
|
@@ -30,10 +29,9 @@ export declare const injectButtonGroupContext: <T extends {
|
|
|
30
29
|
variant: ComputedRef<ButtonVariant | undefined>;
|
|
31
30
|
};
|
|
32
31
|
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<ButtonGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {
|
|
33
|
-
size:
|
|
32
|
+
size: ButtonSize;
|
|
34
33
|
split: boolean;
|
|
35
|
-
|
|
36
|
-
variant: "icon" | "simple" | "float";
|
|
34
|
+
variant: ButtonVariant;
|
|
37
35
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
38
36
|
default?(_: {}): any;
|
|
39
37
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../ButtonGroup.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../ButtonGroup.vue_vue_type_script_setup_true_lang-D486_o-Z.js");exports.ButtonGroup=t._sfc_main;exports.default=t._sfc_main;exports.injectButtonGroupContext=t.injectButtonGroupContext;exports.provideButtonGroupContext=t.provideButtonGroupContext;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineComponent as i, computed as n, createElementBlock as l, openBlock as u, normalizeClass as c, unref as m, renderSlot as B } from "vue";
|
|
2
|
+
import { b as f, a as e, g } from "./class-DziTeW9B.js";
|
|
3
|
+
import { g as d } from "./options-JBqnVZUl.js";
|
|
4
|
+
import { cva as C } from "class-variance-authority";
|
|
5
|
+
import { createContext as v } from "radix-vue";
|
|
6
|
+
const S = ["simple", "icon", "float"], V = ["fill", "outline", "ghost"], j = ["primary", "danger", "success", "warning", "gray"], G = ["sm", "md", "lg"], z = [...G, "none"], [w, x] = v("ButtonGroup"), L = /* @__PURE__ */ i({
|
|
7
|
+
...d("ButtonGroup"),
|
|
8
|
+
__name: "ButtonGroup",
|
|
9
|
+
props: {
|
|
10
|
+
class: {},
|
|
11
|
+
size: { default: "md" },
|
|
12
|
+
variant: { default: "simple" },
|
|
13
|
+
gap: {},
|
|
14
|
+
split: { type: Boolean, default: !0 }
|
|
15
|
+
},
|
|
16
|
+
setup(a) {
|
|
17
|
+
const t = a, r = g("button"), o = f(r, "group"), p = C(o, {
|
|
18
|
+
variants: {
|
|
19
|
+
gap: e(z, o),
|
|
20
|
+
split: e("split", o)
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return x({
|
|
24
|
+
size: n(() => t.size),
|
|
25
|
+
variant: n(() => t.variant)
|
|
26
|
+
}), (s, _) => (u(), l("div", {
|
|
27
|
+
class: c([
|
|
28
|
+
m(p)({
|
|
29
|
+
gap: t.gap ?? t.size,
|
|
30
|
+
split: s.split
|
|
31
|
+
}),
|
|
32
|
+
t.class
|
|
33
|
+
])
|
|
34
|
+
}, [
|
|
35
|
+
B(s.$slots, "default")
|
|
36
|
+
], 2));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
S as B,
|
|
41
|
+
L as _,
|
|
42
|
+
V as a,
|
|
43
|
+
j as b,
|
|
44
|
+
G as c,
|
|
45
|
+
w as i,
|
|
46
|
+
x as p
|
|
47
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),o=require("./class-CjZYGZDW.js"),c=require("./options-B4iSAKol.js"),l=require("class-variance-authority"),B=require("radix-vue"),m=["simple","icon","float"],d=["fill","outline","ghost"],g=["primary","danger","success","warning","gray"],r=["sm","md","lg"],C=[...r,"none"],[f,a]=B.createContext("ButtonGroup"),v=t.defineComponent({...c.getComponentOptions("ButtonGroup"),__name:"ButtonGroup",props:{class:{},size:{default:"md"},variant:{default:"simple"},gap:{},split:{type:Boolean,default:!0}},setup(i){const e=i,u=o.getBemBlock("button"),n=o.getBemElement(u,"group"),p=l.cva(n,{variants:{gap:o.generateVariantClassList(C,n),split:o.generateVariantClassList("split",n)}});return a({size:t.computed(()=>e.size),variant:t.computed(()=>e.variant)}),(s,G)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([t.unref(p)({gap:e.gap??e.size,split:s.split}),e.class])},[t.renderSlot(s.$slots,"default")],2))}});exports.ButtonColors=g;exports.ButtonSizes=r;exports.ButtonTypes=d;exports.ButtonVariants=m;exports._sfc_main=v;exports.injectButtonGroupContext=f;exports.provideButtonGroupContext=a;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CheckboxRootProps } from 'radix-vue';
|
|
1
|
+
import { CheckboxRootEmits, CheckboxRootProps } from 'radix-vue';
|
|
2
2
|
import { CheckboxSize } from './Checkbox.model';
|
|
3
3
|
import { Class } from '../types';
|
|
4
|
-
export interface CheckboxProps extends Omit<CheckboxRootProps, 'asChild' | 'value'> {
|
|
4
|
+
export interface CheckboxProps extends Omit<CheckboxRootProps, 'as' | 'asChild' | 'value'> {
|
|
5
5
|
size?: CheckboxSize;
|
|
6
6
|
class?: Class;
|
|
7
7
|
rootCls?: Class;
|
|
@@ -16,15 +16,23 @@ export interface CheckboxProps extends Omit<CheckboxRootProps, 'asChild' | 'valu
|
|
|
16
16
|
export interface CheckboxSlots {
|
|
17
17
|
default?: (props: object) => never;
|
|
18
18
|
}
|
|
19
|
+
export type CheckboxEmits = CheckboxRootEmits & {
|
|
20
|
+
change: [value: boolean | 'indeterminate'];
|
|
21
|
+
blur: [event: InputEvent];
|
|
22
|
+
focus: [event: InputEvent];
|
|
23
|
+
};
|
|
19
24
|
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<CheckboxProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
25
|
+
blur: (event: InputEvent) => any;
|
|
20
26
|
change: (value: boolean | "indeterminate") => any;
|
|
27
|
+
focus: (event: InputEvent) => any;
|
|
21
28
|
"update:checked": (value: boolean) => any;
|
|
22
29
|
}, string, import('vue').PublicProps, Readonly<CheckboxProps> & Readonly<{
|
|
30
|
+
onBlur?: ((event: InputEvent) => any) | undefined;
|
|
23
31
|
onChange?: ((value: boolean | "indeterminate") => any) | undefined;
|
|
32
|
+
onFocus?: ((event: InputEvent) => any) | undefined;
|
|
24
33
|
"onUpdate:checked"?: ((value: boolean) => any) | undefined;
|
|
25
34
|
}>, {
|
|
26
|
-
size:
|
|
27
|
-
as: import('radix-vue', { with: { "resolution-mode": "import" } }).AsTag | import('vue').Component;
|
|
35
|
+
size: CheckboxSize;
|
|
28
36
|
checked: boolean | "indeterminate";
|
|
29
37
|
valueAsLabel: boolean;
|
|
30
38
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, Readonly<CheckboxSlots> & CheckboxSlots>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as e, C as s, _ as r, u as C, a as h } from "../Checkbox.vue_vue_type_style_index_0_lang-
|
|
1
|
+
import { _ as e, C as s, _ as r, u as C, a as h } from "../Checkbox.vue_vue_type_style_index_0_lang-CSmeTeZh.js";
|
|
2
2
|
export {
|
|
3
3
|
e as Checkbox,
|
|
4
4
|
s as CheckboxSizes,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Checkbox.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Checkbox.vue_vue_type_style_index_0_lang-D0sF0-hW.js");exports.Checkbox=e._sfc_main;exports.CheckboxSizes=e.CheckboxSizes;exports.default=e._sfc_main;exports.useColoredPantographCheckbox=e.useColoredPantographCheckbox;exports.useColoredPantographCheckboxGroup=e.useColoredPantographCheckboxGroup;
|