@pantograph/vue 0.10.0 → 0.10.2
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-ClxZJxTh.js → ActionButton.vue_vue_type_script_setup_true_lang-B8F78aq-.js} +2 -3
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-DYj83ijm.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-BwkELI0y.js +1 -0
- package/dist/Avatar.vue_vue_type_style_index_0_lang-DheqjJPa.js +182 -0
- package/dist/AvatarGroup/AvatarGroup.d.ts +2 -5
- 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-CfA3dSJr.js → Badge.vue_vue_type_script_setup_true_lang-CCIamdNB.js} +2 -3
- 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-CgEN8K4D.js +1 -0
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-D7irHU-6.js +153 -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-BA3bxjLD.js +1 -0
- package/dist/{Button.vue_vue_type_script_setup_true_lang-B8DWC8Du.js → Button.vue_vue_type_script_setup_true_lang-NKY7YYCC.js} +6 -7
- 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-B1Rst4Q9.js +1 -0
- package/dist/ColorPicker.vue_vue_type_style_index_0_lang-CEz3bIJG.js +541 -0
- 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-BH-NSALx.js +1 -0
- package/dist/ColorSwatch.vue_vue_type_style_index_0_lang-CL9dd69H.js +100 -0
- package/dist/ColorSwatchGroup/ColorSwatchGroup.d.ts +17 -11
- package/dist/ColorSwatchGroup/index.js.js +3 -163
- package/dist/ColorSwatchGroup/index.umd.cjs.js +1 -1
- package/dist/ColorSwatchGroup.vue_vue_type_style_index_0_lang-CpgTgIuE.js +1 -0
- package/dist/ColorSwatchGroup.vue_vue_type_style_index_0_lang-Cwh2REmh.js +159 -0
- package/dist/ColorTrigger/ColorTrigger.d.ts +13 -5
- package/dist/ColorTrigger/index.js.js +4 -90
- 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-iElZdgSE.js → FloatButton.vue_vue_type_script_setup_true_lang-BAxKXFb0.js} +2 -3
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-C5hAAZZQ.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-Cc4PxUnd.js → GraphicalObject.vue_vue_type_script_setup_true_lang-BEZ6FkRf.js} +2 -3
- 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-D1nK8pEU.js → IconButton.vue_vue_type_script_setup_true_lang-CchpvdkX.js} +2 -3
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-c16Xu6mm.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-DURlzRTQ.js → Indicator.vue_vue_type_script_setup_true_lang-B16OmZLF.js} +2 -3
- 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.d.ts +2 -0
- package/dist/Input/index.js.js +7 -0
- package/dist/Input/index.umd.cjs.js +1 -0
- 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-B64mJSxF.js +481 -0
- package/dist/Menu.vue_vue_type_style_index_0_lang-Sq_kFrSI.js +1 -0
- package/dist/MenuItem/MenuItem.d.ts +2 -2
- package/dist/MenuItem/index.js.js +1 -1
- package/dist/MenuItem/index.umd.cjs.js +1 -1
- package/dist/Popover/Popover.d.ts +82 -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-DkM_Ynrg.js → Popover.vue_vue_type_style_index_0_lang-C0IwnsU5.js} +2 -2
- package/dist/{Popover.vue_vue_type_style_index_0_lang-pSXmj4z1.js → Popover.vue_vue_type_style_index_0_lang-CM8qMFEi.js} +1 -1
- 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 +3 -7
- 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-C1I-p4Yn.js +1 -0
- package/dist/Skeleton.vue_vue_type_style_index_0_lang-IQEtEnZx.js +58 -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/_flatRest-CHX8vV1P.js +556 -0
- package/dist/_flatRest-R59G2N4m.js +1 -0
- package/dist/{cloneDeep-7ho7cOLj.js → cloneDeep-BMA7VTX1.js} +1 -1
- package/dist/cloneDeep-BcKVMzWC.js +1 -0
- package/dist/get-B4UJlXpC.js +1 -0
- package/dist/{get-CdoyK4GU.js → get-Q8GXlj-L.js} +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js.js +123 -102
- package/dist/index.umd.cjs.js +1 -1
- package/dist/omit-BEkBWXra.js +212 -0
- package/dist/omit-BKPbELUG.js +1 -0
- package/dist/pick-C-ap2Lj0.js +1 -0
- package/dist/{pick-BHVX8oMF.js → pick-DLskPTKb.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 +10 -3
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-Db3ryil1.js +0 -1
- package/dist/Avatar.vue_vue_type_style_index_0_lang-B538jct0.js +0 -188
- package/dist/Avatar.vue_vue_type_style_index_0_lang-BSi0qbuq.js +0 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-CKxCSXXL.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-gzePKYHN.js +0 -1
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-s4G57j5o.js +0 -159
- package/dist/Button.vue_vue_type_script_setup_true_lang-BVCP3jP3.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-Bm6sm_wm.js +0 -1
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-maH6mbC5.js +0 -216
- package/dist/ColorPicker.vue_vue_type_style_index_0_lang-CROQzfNe.js +0 -944
- package/dist/ColorPicker.vue_vue_type_style_index_0_lang-IZSWne-0.js +0 -1
- package/dist/ColorSwatch.vue_vue_type_style_index_0_lang-Bf0glWPU.js +0 -102
- package/dist/ColorSwatch.vue_vue_type_style_index_0_lang-Dki5150Z.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-DARsq4US.js +0 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-Bouixpu2.js +0 -1
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-CufKPHFD.js +0 -1
- package/dist/IndentLevel.vue_vue_type_style_index_0_lang-C9mNx1Zx.js +0 -1
- package/dist/IndentLevel.vue_vue_type_style_index_0_lang-CKJpRLV6.js +0 -104
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-DpPAMjWw.js +0 -1
- 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-Danl_w4K.js +0 -480
- package/dist/Menu.vue_vue_type_style_index_0_lang-eKNVzfnz.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-8BgnVYlc.js +0 -1
- package/dist/RadioGroup.vue_vue_type_script_setup_true_lang-NNLg5ogX.js +0 -100
- 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-B9_IPFyg.js +0 -1
- package/dist/Switch.vue_vue_type_style_index_0_lang-_FIrRkI7.js +0 -103
- package/dist/Tree.vue_vue_type_style_index_0_lang-B3ZzwkLN.js +0 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-D9GBs86I.js +0 -547
- package/dist/cloneDeep-C6tiVz1k.js +0 -1
- package/dist/get-BULsy4gy.js +0 -1
- package/dist/omit-BHZMfUBv.js +0 -757
- package/dist/omit-DlH5U9Jc.js +0 -1
- package/dist/pick-DpwC5mlg.js +0 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { defineComponent as z, computed as v, createElementBlock as a, openBlock as o, normalizeClass as u, unref as l, Fragment as d, renderList as I, createBlock as f, createCommentVNode as m, createVNode as C, withCtx as N, renderSlot as S } from "vue";
|
|
2
|
+
import { g as $, a as r, b as g, c as R } from "./class-DziTeW9B.js";
|
|
3
|
+
import { cva as D } from "class-variance-authority";
|
|
4
|
+
import { g as E } from "./options-JBqnVZUl.js";
|
|
5
|
+
import { _ as L } from "./Divider.vue_vue_type_style_index_0_lang-CRs1KEcj.js";
|
|
6
|
+
import { _ as V } from "./Spinner.vue_vue_type_style_index_0_lang-BYqqSQAx.js";
|
|
7
|
+
import { _ } from "./GraphicalObject.vue_vue_type_script_setup_true_lang-BEZ6FkRf.js";
|
|
8
|
+
import { i as M } from "./isNumber-DlKYWCo3.js";
|
|
9
|
+
const F = ["2xsm", "xsm", "sm"], Q = ["last", "all", "before", "self"], O = { key: 0 }, T = /* @__PURE__ */ z({
|
|
10
|
+
...E("IndentLevel"),
|
|
11
|
+
__name: "IndentLevel",
|
|
12
|
+
props: {
|
|
13
|
+
size: { default: "xsm" },
|
|
14
|
+
showLine: { type: [Number, Boolean] },
|
|
15
|
+
children: { type: Boolean },
|
|
16
|
+
level: { default: 1 },
|
|
17
|
+
expanded: { type: Boolean },
|
|
18
|
+
loading: { type: Boolean },
|
|
19
|
+
class: {},
|
|
20
|
+
branchIcon: { default: "tabler:chevron-right" },
|
|
21
|
+
noRotateBranch: { type: Boolean }
|
|
22
|
+
},
|
|
23
|
+
setup(b) {
|
|
24
|
+
const n = b, s = $("indent_level"), p = g(s, "item"), y = g(p, "branch"), B = D(s, {
|
|
25
|
+
variants: {
|
|
26
|
+
size: r(F, s),
|
|
27
|
+
expanded: r("expanded", s),
|
|
28
|
+
branchSlot: r("branch-slot", s),
|
|
29
|
+
selfDivider: r("self-divider", s),
|
|
30
|
+
noRotateBranch: r("no-rotate-branch", s),
|
|
31
|
+
loading: r("loading", s)
|
|
32
|
+
}
|
|
33
|
+
}), i = v(() => {
|
|
34
|
+
const e = Number(n.level);
|
|
35
|
+
return e < 1 ? 1 : e % 10 === 0 ? e : Math.floor(e);
|
|
36
|
+
}), c = v(() => {
|
|
37
|
+
if (n.showLine)
|
|
38
|
+
return typeof n.showLine == "string" ? ["all", "self"].includes(n.showLine) : M(n.showLine) && n.showLine <= Number(n.level);
|
|
39
|
+
}), k = (e) => typeof n.showLine == "number" ? n.showLine <= Number(e) : !1;
|
|
40
|
+
return (e, h) => (o(), a("div", {
|
|
41
|
+
class: u([
|
|
42
|
+
l(B)({
|
|
43
|
+
size: e.size,
|
|
44
|
+
expanded: e.expanded,
|
|
45
|
+
noRotateBranch: e.noRotateBranch,
|
|
46
|
+
branchSlot: e.$slots.default,
|
|
47
|
+
selfDivider: c.value,
|
|
48
|
+
loading: e.loading
|
|
49
|
+
}),
|
|
50
|
+
n.class
|
|
51
|
+
])
|
|
52
|
+
}, [
|
|
53
|
+
(o(!0), a(d, null, I(i.value, (t) => (o(), a("div", {
|
|
54
|
+
class: u([l(p), { [l(R)(l(s), "expand")]: t === i.value }]),
|
|
55
|
+
key: t
|
|
56
|
+
}, [
|
|
57
|
+
t === i.value ? (o(), a(d, { key: 0 }, [
|
|
58
|
+
e.children ? (o(), a(d, { key: 0 }, [
|
|
59
|
+
e.loading ? (o(), f(V, {
|
|
60
|
+
key: 1,
|
|
61
|
+
size: e.size
|
|
62
|
+
}, null, 8, ["size"])) : (o(), a(d, { key: 0 }, [
|
|
63
|
+
e.expanded && c.value ? (o(), a("div", O)) : m("", !0),
|
|
64
|
+
C(_, {
|
|
65
|
+
size: e.size,
|
|
66
|
+
icon: e.branchIcon,
|
|
67
|
+
color: "none",
|
|
68
|
+
class: u(l(y)),
|
|
69
|
+
onClick: h[0] || (h[0] = (w) => e.$emit("toggleExpand", w))
|
|
70
|
+
}, {
|
|
71
|
+
icon: N(() => [
|
|
72
|
+
S(e.$slots, "default")
|
|
73
|
+
]),
|
|
74
|
+
_: 3
|
|
75
|
+
}, 8, ["size", "icon", "class"]),
|
|
76
|
+
e.expanded && c.value ? (o(), f(L, {
|
|
77
|
+
key: 1,
|
|
78
|
+
type: "vertical"
|
|
79
|
+
})) : m("", !0)
|
|
80
|
+
], 64))
|
|
81
|
+
], 64)) : m("", !0)
|
|
82
|
+
], 64)) : ["all", "before"].includes(e.showLine) || e.showLine === "last" && t === i.value - 1 || k(t) ? (o(), f(L, {
|
|
83
|
+
key: 1,
|
|
84
|
+
type: "vertical"
|
|
85
|
+
})) : m("", !0)
|
|
86
|
+
], 2))), 128))
|
|
87
|
+
], 2));
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
export {
|
|
91
|
+
F as I,
|
|
92
|
+
T as _,
|
|
93
|
+
Q as a
|
|
94
|
+
};
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { BaseBadgeSlots, BaseBadgeProps } from '../Base/BaseBadge/BaseBadge';
|
|
2
2
|
import { BadgeColor } from '../Base/BaseBadge/BaseBadge.model.js';
|
|
3
|
-
export type IndicatorProps = Partial<Pick<BaseBadgeProps, '
|
|
3
|
+
export type IndicatorProps = Partial<Pick<BaseBadgeProps, 'class'>> & {
|
|
4
4
|
size?: 'tiny' | 'tinier';
|
|
5
5
|
color?: BadgeColor;
|
|
6
6
|
};
|
|
7
|
-
declare
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
slots: Readonly<BaseBadgeSlots> & BaseBadgeSlots;
|
|
9
|
+
refs: {};
|
|
10
|
+
attrs: Partial<{}>;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<IndicatorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IndicatorProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
8
15
|
export default _default;
|
|
9
16
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
10
17
|
new (): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Indicator.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Indicator.vue_vue_type_script_setup_true_lang-BibzfVax.js");exports.Indicator=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { defineComponent as d, useAttrs as f, computed as s, useSlots as u, createBlock as g, openBlock as _, mergeProps as b, createSlots as y, renderList as C, withCtx as k, renderSlot as v, normalizeProps as x, guardReactiveProps as B } from "vue";
|
|
2
|
-
import { o as O } from "./omit-
|
|
3
|
-
import { a as P, _ as S } from "./BaseBadge.vue_vue_type_style_index_0_lang-
|
|
2
|
+
import { o as O } from "./omit-BEkBWXra.js";
|
|
3
|
+
import { a as P, _ as S } from "./BaseBadge.vue_vue_type_style_index_0_lang-Bh1152XC.js";
|
|
4
4
|
import { g as $ } from "./options-JBqnVZUl.js";
|
|
5
5
|
import { getCssVar as n } from "@pantograph/tokens";
|
|
6
6
|
const w = /* @__PURE__ */ d({
|
|
7
7
|
...$("Indicator", !1),
|
|
8
8
|
__name: "Indicator",
|
|
9
9
|
props: {
|
|
10
|
-
as: {},
|
|
11
10
|
class: {},
|
|
12
11
|
size: {},
|
|
13
12
|
color: {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),_=require("./omit-BKPbELUG.js"),n=require("./BaseBadge.vue_vue_type_style_index_0_lang-BNs69VP4.js"),d=require("./options-B4iSAKol.js"),c=require("@pantograph/tokens"),g=e.defineComponent({...d.getComponentOptions("Indicator",!1),__name:"Indicator",props:{class:{},size:{},color:{}},setup(i){const s=i,a=e.useAttrs(),p=e.computed(()=>({bg:Object.fromEntries(n.BadgeColors.map(t=>[t,c.getCssVar(`${t}-5`)]))[s.color]??c.getCssVar("primary-5")})),u=e.computed(()=>({..._.omit(a,"type","text","icon","mode"),...s,...p.value})),m=e.useSlots();return(o,t)=>(e.openBlock(),e.createBlock(n._sfc_main,e.mergeProps(u.value,{type:"minify",mode:"bold"}),e.createSlots({_:2},[e.renderList(Object.keys(m),r=>({name:r,fn:e.withCtx(l=>[e.renderSlot(o.$slots,r,e.normalizeProps(e.guardReactiveProps(l)))])}))]),1040))}});exports._sfc_main=g;
|
package/dist/Input/Input.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Class } from '../types';
|
|
2
2
|
import { InputSize, InputStatus } from './Input.model';
|
|
3
3
|
import { IconSize } from '../Icon/Icon.model';
|
|
4
|
+
import { HasRootInputEmits } from '../utils';
|
|
4
5
|
export interface InputProps {
|
|
5
6
|
id?: string;
|
|
6
7
|
maxlength?: number;
|
|
@@ -32,18 +33,24 @@ export interface InputSlots {
|
|
|
32
33
|
}) => never;
|
|
33
34
|
clearIcon?: () => never;
|
|
34
35
|
}
|
|
35
|
-
export interface InputEmits {
|
|
36
|
+
export interface InputEmits extends HasRootInputEmits {
|
|
36
37
|
(e: 'update:modelValue', value?: string): void;
|
|
37
38
|
(e: 'clear'): void;
|
|
38
|
-
(e: 'blur', event: InputEvent): void;
|
|
39
|
-
(e: 'focus', event: InputEvent): void;
|
|
40
39
|
}
|
|
41
|
-
declare
|
|
40
|
+
declare function __VLS_template(): {
|
|
41
|
+
slots: Readonly<InputSlots> & InputSlots;
|
|
42
|
+
refs: {
|
|
43
|
+
inputRef: HTMLInputElement;
|
|
44
|
+
};
|
|
45
|
+
attrs: Partial<{}>;
|
|
46
|
+
};
|
|
47
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
48
|
+
declare const __VLS_component: import('vue').DefineComponent<InputProps, {
|
|
42
49
|
input: import('vue').Ref<any, any>;
|
|
43
|
-
focus: (option?: FocusOptions
|
|
50
|
+
focus: (option?: FocusOptions) => any;
|
|
44
51
|
blur: () => any;
|
|
45
52
|
select: () => any;
|
|
46
|
-
setSelectionRange: (start: number, end: number, direction?: "
|
|
53
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => any;
|
|
47
54
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
48
55
|
blur: (event: InputEvent) => any;
|
|
49
56
|
focus: (event: InputEvent) => any;
|
|
@@ -58,7 +65,8 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<In
|
|
|
58
65
|
disabled: boolean;
|
|
59
66
|
clearIcon: string;
|
|
60
67
|
bordered: boolean;
|
|
61
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any
|
|
68
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
69
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
62
70
|
export default _default;
|
|
63
71
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
64
72
|
new (): {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Input.vue_vue_type_style_index_0_lang-DVN491cI.js");exports.Input=e._sfc_main;exports.InputSizes=e.InputSizes;exports.InputStatuses=e.InputStatuses;exports.default=e._sfc_main;
|
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
import { defineComponent as te, useSlots as le, computed as L, useAttrs as ue, ref as fe, createElementBlock as I, openBlock as E, mergeProps as x, unref as A, createCommentVNode as B, withDirectives as oe, normalizeClass as b, renderSlot as G, createTextVNode as q, toDisplayString as K, createElementVNode as de, isRef as ge, vModelDynamic as ce, Fragment as pe, createVNode as ve, createBlock as me, withCtx as Ae } from "vue";
|
|
2
|
+
import { useVModel as ye } from "@vueuse/core";
|
|
3
|
+
import { g as we, a as U, b as S } from "./class-DziTeW9B.js";
|
|
4
|
+
import { cva as Oe } from "class-variance-authority";
|
|
5
|
+
import { h as Re, b as Pe, p as Te } from "./pick-DLskPTKb.js";
|
|
6
|
+
import { p as Ee, U as H, q as X, l as h, j as J, r as D, k as Se, i as _e, s as Ce, u as ee, t as ne, b as Le, v as Ie, w as Be, x as be } from "./_flatRest-CHX8vV1P.js";
|
|
7
|
+
import { S as Me, c as De, s as $e, g as Ge } from "./get-Q8GXlj-L.js";
|
|
8
|
+
import { S as Q, i as Y } from "./isObjectLike-BatpeCIi.js";
|
|
9
|
+
import { i as z } from "./isArray-WzO_os3q.js";
|
|
10
|
+
import { _ as Ue } from "./Icon.vue_vue_type_style_index_0_lang-BfPcw6PU.js";
|
|
11
|
+
import { _ as Ne } from "./Divider.vue_vue_type_style_index_0_lang-CRs1KEcj.js";
|
|
12
|
+
import { g as ze } from "./options-JBqnVZUl.js";
|
|
13
|
+
import { U as Fe } from "./useInputDataStates-CZbdWpyp.js";
|
|
14
|
+
function xe(e) {
|
|
15
|
+
return e === void 0;
|
|
16
|
+
}
|
|
17
|
+
function qe(e, n) {
|
|
18
|
+
for (var i = -1, r = e == null ? 0 : e.length; ++i < r; )
|
|
19
|
+
if (n(e[i], i, e))
|
|
20
|
+
return !0;
|
|
21
|
+
return !1;
|
|
22
|
+
}
|
|
23
|
+
var Ke = 1, He = 2;
|
|
24
|
+
function re(e, n, i, r, t, a) {
|
|
25
|
+
var s = i & Ke, l = e.length, f = n.length;
|
|
26
|
+
if (l != f && !(s && f > l))
|
|
27
|
+
return !1;
|
|
28
|
+
var o = a.get(e), c = a.get(n);
|
|
29
|
+
if (o && c)
|
|
30
|
+
return o == n && c == e;
|
|
31
|
+
var g = -1, d = !0, w = i & He ? new Me() : void 0;
|
|
32
|
+
for (a.set(e, n), a.set(n, e); ++g < l; ) {
|
|
33
|
+
var p = e[g], v = n[g];
|
|
34
|
+
if (r)
|
|
35
|
+
var O = s ? r(v, p, g, n, e, a) : r(p, v, g, e, n, a);
|
|
36
|
+
if (O !== void 0) {
|
|
37
|
+
if (O)
|
|
38
|
+
continue;
|
|
39
|
+
d = !1;
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
if (w) {
|
|
43
|
+
if (!qe(n, function(m, R) {
|
|
44
|
+
if (!De(w, R) && (p === m || t(p, m, i, r, a)))
|
|
45
|
+
return w.push(R);
|
|
46
|
+
})) {
|
|
47
|
+
d = !1;
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
} else if (!(p === v || t(p, v, i, r, a))) {
|
|
51
|
+
d = !1;
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return a.delete(e), a.delete(n), d;
|
|
56
|
+
}
|
|
57
|
+
function Xe(e) {
|
|
58
|
+
var n = -1, i = Array(e.size);
|
|
59
|
+
return e.forEach(function(r, t) {
|
|
60
|
+
i[++n] = [t, r];
|
|
61
|
+
}), i;
|
|
62
|
+
}
|
|
63
|
+
var he = 1, Je = 2, Qe = "[object Boolean]", Ye = "[object Date]", Ze = "[object Error]", Ve = "[object Map]", We = "[object Number]", je = "[object RegExp]", ke = "[object Set]", en = "[object String]", nn = "[object Symbol]", rn = "[object ArrayBuffer]", an = "[object DataView]", Z = Q ? Q.prototype : void 0, N = Z ? Z.valueOf : void 0;
|
|
64
|
+
function sn(e, n, i, r, t, a, s) {
|
|
65
|
+
switch (i) {
|
|
66
|
+
case an:
|
|
67
|
+
if (e.byteLength != n.byteLength || e.byteOffset != n.byteOffset)
|
|
68
|
+
return !1;
|
|
69
|
+
e = e.buffer, n = n.buffer;
|
|
70
|
+
case rn:
|
|
71
|
+
return !(e.byteLength != n.byteLength || !a(new H(e), new H(n)));
|
|
72
|
+
case Qe:
|
|
73
|
+
case Ye:
|
|
74
|
+
case We:
|
|
75
|
+
return Ee(+e, +n);
|
|
76
|
+
case Ze:
|
|
77
|
+
return e.name == n.name && e.message == n.message;
|
|
78
|
+
case je:
|
|
79
|
+
case en:
|
|
80
|
+
return e == n + "";
|
|
81
|
+
case Ve:
|
|
82
|
+
var l = Xe;
|
|
83
|
+
case ke:
|
|
84
|
+
var f = r & he;
|
|
85
|
+
if (l || (l = $e), e.size != n.size && !f)
|
|
86
|
+
return !1;
|
|
87
|
+
var o = s.get(e);
|
|
88
|
+
if (o)
|
|
89
|
+
return o == n;
|
|
90
|
+
r |= Je, s.set(e, n);
|
|
91
|
+
var c = re(l(e), l(n), r, t, a, s);
|
|
92
|
+
return s.delete(e), c;
|
|
93
|
+
case nn:
|
|
94
|
+
if (N)
|
|
95
|
+
return N.call(e) == N.call(n);
|
|
96
|
+
}
|
|
97
|
+
return !1;
|
|
98
|
+
}
|
|
99
|
+
var tn = 1, ln = Object.prototype, un = ln.hasOwnProperty;
|
|
100
|
+
function fn(e, n, i, r, t, a) {
|
|
101
|
+
var s = i & tn, l = X(e), f = l.length, o = X(n), c = o.length;
|
|
102
|
+
if (f != c && !s)
|
|
103
|
+
return !1;
|
|
104
|
+
for (var g = f; g--; ) {
|
|
105
|
+
var d = l[g];
|
|
106
|
+
if (!(s ? d in n : un.call(n, d)))
|
|
107
|
+
return !1;
|
|
108
|
+
}
|
|
109
|
+
var w = a.get(e), p = a.get(n);
|
|
110
|
+
if (w && p)
|
|
111
|
+
return w == n && p == e;
|
|
112
|
+
var v = !0;
|
|
113
|
+
a.set(e, n), a.set(n, e);
|
|
114
|
+
for (var O = s; ++g < f; ) {
|
|
115
|
+
d = l[g];
|
|
116
|
+
var m = e[d], R = n[d];
|
|
117
|
+
if (r)
|
|
118
|
+
var $ = s ? r(R, m, d, n, e, a) : r(m, R, d, e, n, a);
|
|
119
|
+
if (!($ === void 0 ? m === R || t(m, R, i, r, a) : $)) {
|
|
120
|
+
v = !1;
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
O || (O = d == "constructor");
|
|
124
|
+
}
|
|
125
|
+
if (v && !O) {
|
|
126
|
+
var P = e.constructor, T = n.constructor;
|
|
127
|
+
P != T && "constructor" in e && "constructor" in n && !(typeof P == "function" && P instanceof P && typeof T == "function" && T instanceof T) && (v = !1);
|
|
128
|
+
}
|
|
129
|
+
return a.delete(e), a.delete(n), v;
|
|
130
|
+
}
|
|
131
|
+
var on = 1, V = "[object Arguments]", W = "[object Array]", M = "[object Object]", dn = Object.prototype, j = dn.hasOwnProperty;
|
|
132
|
+
function gn(e, n, i, r, t, a) {
|
|
133
|
+
var s = z(e), l = z(n), f = s ? W : h(e), o = l ? W : h(n);
|
|
134
|
+
f = f == V ? M : f, o = o == V ? M : o;
|
|
135
|
+
var c = f == M, g = o == M, d = f == o;
|
|
136
|
+
if (d && J(e)) {
|
|
137
|
+
if (!J(n))
|
|
138
|
+
return !1;
|
|
139
|
+
s = !0, c = !1;
|
|
140
|
+
}
|
|
141
|
+
if (d && !c)
|
|
142
|
+
return a || (a = new D()), s || Se(e) ? re(e, n, i, r, t, a) : sn(e, n, f, i, r, t, a);
|
|
143
|
+
if (!(i & on)) {
|
|
144
|
+
var w = c && j.call(e, "__wrapped__"), p = g && j.call(n, "__wrapped__");
|
|
145
|
+
if (w || p) {
|
|
146
|
+
var v = w ? e.value() : e, O = p ? n.value() : n;
|
|
147
|
+
return a || (a = new D()), t(v, O, i, r, a);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return d ? (a || (a = new D()), fn(e, n, i, r, t, a)) : !1;
|
|
151
|
+
}
|
|
152
|
+
function F(e, n, i, r, t) {
|
|
153
|
+
return e === n ? !0 : e == null || n == null || !Y(e) && !Y(n) ? e !== e && n !== n : gn(e, n, i, r, F, t);
|
|
154
|
+
}
|
|
155
|
+
var cn = 1, pn = 2;
|
|
156
|
+
function vn(e, n, i, r) {
|
|
157
|
+
var t = i.length, a = t;
|
|
158
|
+
if (e == null)
|
|
159
|
+
return !a;
|
|
160
|
+
for (e = Object(e); t--; ) {
|
|
161
|
+
var s = i[t];
|
|
162
|
+
if (s[2] ? s[1] !== e[s[0]] : !(s[0] in e))
|
|
163
|
+
return !1;
|
|
164
|
+
}
|
|
165
|
+
for (; ++t < a; ) {
|
|
166
|
+
s = i[t];
|
|
167
|
+
var l = s[0], f = e[l], o = s[1];
|
|
168
|
+
if (s[2]) {
|
|
169
|
+
if (f === void 0 && !(l in e))
|
|
170
|
+
return !1;
|
|
171
|
+
} else {
|
|
172
|
+
var c = new D(), g;
|
|
173
|
+
if (!(g === void 0 ? F(o, f, cn | pn, r, c) : g))
|
|
174
|
+
return !1;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return !0;
|
|
178
|
+
}
|
|
179
|
+
function ie(e) {
|
|
180
|
+
return e === e && !_e(e);
|
|
181
|
+
}
|
|
182
|
+
function mn(e) {
|
|
183
|
+
for (var n = Ce(e), i = n.length; i--; ) {
|
|
184
|
+
var r = n[i], t = e[r];
|
|
185
|
+
n[i] = [r, t, ie(t)];
|
|
186
|
+
}
|
|
187
|
+
return n;
|
|
188
|
+
}
|
|
189
|
+
function ae(e, n) {
|
|
190
|
+
return function(i) {
|
|
191
|
+
return i == null ? !1 : i[e] === n && (n !== void 0 || e in Object(i));
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
function An(e) {
|
|
195
|
+
var n = mn(e);
|
|
196
|
+
return n.length == 1 && n[0][2] ? ae(n[0][0], n[0][1]) : function(i) {
|
|
197
|
+
return i === e || vn(i, e, n);
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
var yn = 1, wn = 2;
|
|
201
|
+
function On(e, n) {
|
|
202
|
+
return ee(e) && ie(n) ? ae(ne(e), n) : function(i) {
|
|
203
|
+
var r = Ge(i, e);
|
|
204
|
+
return r === void 0 && r === n ? Re(i, e) : F(n, r, yn | wn);
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
function Rn(e) {
|
|
208
|
+
return function(n) {
|
|
209
|
+
return n == null ? void 0 : n[e];
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
function Pn(e) {
|
|
213
|
+
return function(n) {
|
|
214
|
+
return Le(n, e);
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
function Tn(e) {
|
|
218
|
+
return ee(e) ? Rn(ne(e)) : Pn(e);
|
|
219
|
+
}
|
|
220
|
+
function se(e) {
|
|
221
|
+
return typeof e == "function" ? e : e == null ? Ie : typeof e == "object" ? z(e) ? On(e[0], e[1]) : An(e) : Tn(e);
|
|
222
|
+
}
|
|
223
|
+
var En = "Expected a function";
|
|
224
|
+
function Sn(e) {
|
|
225
|
+
if (typeof e != "function")
|
|
226
|
+
throw new TypeError(En);
|
|
227
|
+
return function() {
|
|
228
|
+
var n = arguments;
|
|
229
|
+
switch (n.length) {
|
|
230
|
+
case 0:
|
|
231
|
+
return !e.call(this);
|
|
232
|
+
case 1:
|
|
233
|
+
return !e.call(this, n[0]);
|
|
234
|
+
case 2:
|
|
235
|
+
return !e.call(this, n[0], n[1]);
|
|
236
|
+
case 3:
|
|
237
|
+
return !e.call(this, n[0], n[1], n[2]);
|
|
238
|
+
}
|
|
239
|
+
return !e.apply(this, n);
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
function _n(e, n) {
|
|
243
|
+
if (e == null)
|
|
244
|
+
return {};
|
|
245
|
+
var i = Be(be(e), function(r) {
|
|
246
|
+
return [r];
|
|
247
|
+
});
|
|
248
|
+
return n = se(n), Pe(e, i, function(r, t) {
|
|
249
|
+
return n(r, t[0]);
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
function Cn(e, n) {
|
|
253
|
+
return _n(e, Sn(se(n)));
|
|
254
|
+
}
|
|
255
|
+
const k = ["sm", "md", "lg"], Ln = ["error", "warning"], Kn = /* @__PURE__ */ te({
|
|
256
|
+
...ze("Input", !1),
|
|
257
|
+
__name: "Input",
|
|
258
|
+
props: {
|
|
259
|
+
id: {},
|
|
260
|
+
maxlength: {},
|
|
261
|
+
type: {},
|
|
262
|
+
placeholder: {},
|
|
263
|
+
disabled: { type: Boolean, default: void 0 },
|
|
264
|
+
required: { type: Boolean },
|
|
265
|
+
modelValue: {},
|
|
266
|
+
defaultValue: {},
|
|
267
|
+
leading: {},
|
|
268
|
+
trailing: {},
|
|
269
|
+
clearIcon: { default: "tabler:circle-x" },
|
|
270
|
+
trailingCls: {},
|
|
271
|
+
clearIconCls: {},
|
|
272
|
+
dividerCls: {},
|
|
273
|
+
leadingCls: {},
|
|
274
|
+
class: {},
|
|
275
|
+
allowClear: { type: Boolean },
|
|
276
|
+
bordered: { type: Boolean, default: !0 },
|
|
277
|
+
size: {},
|
|
278
|
+
status: {}
|
|
279
|
+
},
|
|
280
|
+
emits: ["update:modelValue", "clear", "blur", "focus"],
|
|
281
|
+
setup(e, { expose: n, emit: i }) {
|
|
282
|
+
const r = e, t = le(), a = i, s = ye(r, "modelValue", a, {
|
|
283
|
+
defaultValue: r.defaultValue,
|
|
284
|
+
passive: r.modelValue === void 0
|
|
285
|
+
}), l = we("input"), f = Oe(l, {
|
|
286
|
+
variants: {
|
|
287
|
+
size: U(k, l),
|
|
288
|
+
status: U(Ln, l),
|
|
289
|
+
bordered: U("bordered", l)
|
|
290
|
+
}
|
|
291
|
+
}), o = L(() => r.size && k.includes(r.size) ? r.size : "md"), c = ue(), { rootBindings: g, inputBindings: d } = Fe({
|
|
292
|
+
getDisabled: () => r.disabled,
|
|
293
|
+
emit: a,
|
|
294
|
+
blurCallBack: (u) => {
|
|
295
|
+
const y = u.target;
|
|
296
|
+
y != null && y.value && (y.value = s.value);
|
|
297
|
+
}
|
|
298
|
+
}), w = L(
|
|
299
|
+
() => Cn(
|
|
300
|
+
{
|
|
301
|
+
...Te(r, "id", "maxlength", "type", "disabled", "required", "placeholder"),
|
|
302
|
+
...c,
|
|
303
|
+
...d.value
|
|
304
|
+
},
|
|
305
|
+
xe
|
|
306
|
+
)
|
|
307
|
+
), p = L(() => {
|
|
308
|
+
switch (o.value) {
|
|
309
|
+
case "sm":
|
|
310
|
+
return "2xsm";
|
|
311
|
+
default:
|
|
312
|
+
return "xsm";
|
|
313
|
+
}
|
|
314
|
+
}), v = L(() => {
|
|
315
|
+
switch (o.value) {
|
|
316
|
+
case "sm":
|
|
317
|
+
return "2xsm";
|
|
318
|
+
case "md":
|
|
319
|
+
return "xsm";
|
|
320
|
+
default:
|
|
321
|
+
return "sm";
|
|
322
|
+
}
|
|
323
|
+
}), O = () => {
|
|
324
|
+
s.value = "", a("clear");
|
|
325
|
+
}, m = fe();
|
|
326
|
+
return n({
|
|
327
|
+
input: m,
|
|
328
|
+
focus: (u) => {
|
|
329
|
+
var y;
|
|
330
|
+
return (y = m.value) == null ? void 0 : y.focus(u);
|
|
331
|
+
},
|
|
332
|
+
blur: () => {
|
|
333
|
+
var u;
|
|
334
|
+
return (u = m.value) == null ? void 0 : u.blur();
|
|
335
|
+
},
|
|
336
|
+
select: () => {
|
|
337
|
+
var u;
|
|
338
|
+
return (u = m.value.input) == null ? void 0 : u.select();
|
|
339
|
+
},
|
|
340
|
+
setSelectionRange: (u, y, _) => {
|
|
341
|
+
var C;
|
|
342
|
+
return (C = m.value.input) == null ? void 0 : C.setSelectionRange(u, y, _);
|
|
343
|
+
}
|
|
344
|
+
}), (u, y) => {
|
|
345
|
+
var _;
|
|
346
|
+
return E(), I("div", x({
|
|
347
|
+
class: [
|
|
348
|
+
A(f)({
|
|
349
|
+
size: o.value,
|
|
350
|
+
status: u.status,
|
|
351
|
+
bordered: u.bordered
|
|
352
|
+
}),
|
|
353
|
+
r.class
|
|
354
|
+
]
|
|
355
|
+
}, A(g)), [
|
|
356
|
+
t.leading || r.leading ? (E(), I("div", {
|
|
357
|
+
key: 0,
|
|
358
|
+
class: b([A(S)(A(l), "leading"), u.leadingCls])
|
|
359
|
+
}, [
|
|
360
|
+
G(u.$slots, "leading", { iconSize: v.value }, () => [
|
|
361
|
+
q(K(u.leading), 1)
|
|
362
|
+
])
|
|
363
|
+
], 2)) : B("", !0),
|
|
364
|
+
oe(de("input", x({
|
|
365
|
+
ref_key: "inputRef",
|
|
366
|
+
ref: m,
|
|
367
|
+
"onUpdate:modelValue": y[0] || (y[0] = (C) => ge(s) ? s.value = C : null)
|
|
368
|
+
}, w.value, {
|
|
369
|
+
class: [A(S)(A(l), "input")]
|
|
370
|
+
}), null, 16), [
|
|
371
|
+
[ce, A(s)]
|
|
372
|
+
]),
|
|
373
|
+
t.trailing || r.trailing || u.allowClear ? (E(), I("div", {
|
|
374
|
+
key: 1,
|
|
375
|
+
class: b([A(S)(A(l), "trailing"), u.trailingCls])
|
|
376
|
+
}, [
|
|
377
|
+
!u.disabled && u.allowClear && ((_ = A(s)) != null && _.length) ? (E(), I(pe, { key: 0 }, [
|
|
378
|
+
ve(Ue, {
|
|
379
|
+
icon: u.clearIcon,
|
|
380
|
+
size: p.value,
|
|
381
|
+
onClick: O,
|
|
382
|
+
class: b([A(S)(A(l), "clear_icon"), u.clearIconCls])
|
|
383
|
+
}, {
|
|
384
|
+
default: Ae(() => [
|
|
385
|
+
G(u.$slots, "clearIcon")
|
|
386
|
+
]),
|
|
387
|
+
_: 3
|
|
388
|
+
}, 8, ["icon", "size", "class"]),
|
|
389
|
+
t.trailing || r.trailing ? (E(), me(Ne, {
|
|
390
|
+
key: 0,
|
|
391
|
+
type: "vertical",
|
|
392
|
+
class: b([A(S)(A(l), "divider"), u.dividerCls])
|
|
393
|
+
}, null, 8, ["class"])) : B("", !0)
|
|
394
|
+
], 64)) : B("", !0),
|
|
395
|
+
G(u.$slots, "trailing", { iconSize: v.value }, () => [
|
|
396
|
+
q(K(u.trailing), 1)
|
|
397
|
+
])
|
|
398
|
+
], 2)) : B("", !0)
|
|
399
|
+
], 16);
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
export {
|
|
404
|
+
k as I,
|
|
405
|
+
Kn as _,
|
|
406
|
+
Ln as a
|
|
407
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("vue"),h=require("@vueuse/core"),E=require("./class-CjZYGZDW.js"),J=require("class-variance-authority"),N=require("./pick-C-ap2Lj0.js"),o=require("./_flatRest-R59G2N4m.js"),L=require("./get-B4UJlXpC.js"),I=require("./isObjectLike-kO9e4B7g.js"),M=require("./isArray-B7z6QoM5.js"),Q=require("./Icon.vue_vue_type_style_index_0_lang-BvHCdzZP.js"),Y=require("./Divider.vue_vue_type_style_index_0_lang-BELWThBf.js"),Z=require("./options-B4iSAKol.js"),W=require("./useInputDataStates-CbRgNQqU.js");function k(e){return e===void 0}function j(e,n){for(var i=-1,t=e==null?0:e.length;++i<t;)if(n(e[i],i,e))return!0;return!1}var ee=1,ne=2;function F(e,n,i,t,a,s){var l=i&ee,u=e.length,c=n.length;if(u!=c&&!(l&&c>u))return!1;var d=s.get(e),v=s.get(n);if(d&&v)return d==n&&v==e;var p=-1,g=!0,S=i&ne?new L.SetCache:void 0;for(s.set(e,n),s.set(n,e);++p<u;){var m=e[p],y=n[p];if(t)var C=l?t(y,m,p,n,e,s):t(m,y,p,e,n,s);if(C!==void 0){if(C)continue;g=!1;break}if(S){if(!j(n,function(A,O){if(!L.cacheHas(S,O)&&(m===A||a(m,A,i,t,s)))return S.push(O)})){g=!1;break}}else if(!(m===y||a(m,y,i,t,s))){g=!1;break}}return s.delete(e),s.delete(n),g}function re(e){var n=-1,i=Array(e.size);return e.forEach(function(t,a){i[++n]=[a,t]}),i}var te=1,ie=2,se="[object Boolean]",le="[object Date]",ae="[object Error]",ue="[object Map]",fe="[object Number]",oe="[object RegExp]",ce="[object Set]",de="[object String]",ge="[object Symbol]",pe="[object ArrayBuffer]",ve="[object DataView]",z=I.Symbol?I.Symbol.prototype:void 0,D=z?z.valueOf:void 0;function me(e,n,i,t,a,s,l){switch(i){case ve:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case pe:return!(e.byteLength!=n.byteLength||!s(new o.Uint8Array(e),new o.Uint8Array(n)));case se:case le:case fe:return o.eq(+e,+n);case ae:return e.name==n.name&&e.message==n.message;case oe:case de:return e==n+"";case ue:var u=re;case ce:var c=t&te;if(u||(u=L.setToArray),e.size!=n.size&&!c)return!1;var d=l.get(e);if(d)return d==n;t|=ie,l.set(e,n);var v=F(u(e),u(n),t,a,s,l);return l.delete(e),v;case ge:if(D)return D.call(e)==D.call(n)}return!1}var ye=1,Ae=Object.prototype,_e=Ae.hasOwnProperty;function Se(e,n,i,t,a,s){var l=i&ye,u=o.getAllKeys(e),c=u.length,d=o.getAllKeys(n),v=d.length;if(c!=v&&!l)return!1;for(var p=c;p--;){var g=u[p];if(!(l?g in n:_e.call(n,g)))return!1}var S=s.get(e),m=s.get(n);if(S&&m)return S==n&&m==e;var y=!0;s.set(e,n),s.set(n,e);for(var C=l;++p<c;){g=u[p];var A=e[g],O=n[g];if(t)var b=l?t(O,A,g,n,e,s):t(A,O,g,e,n,s);if(!(b===void 0?A===O||a(A,O,i,t,s):b)){y=!1;break}C||(C=g=="constructor")}if(y&&!C){var B=e.constructor,R=n.constructor;B!=R&&"constructor"in e&&"constructor"in n&&!(typeof B=="function"&&B instanceof B&&typeof R=="function"&&R instanceof R)&&(y=!1)}return s.delete(e),s.delete(n),y}var Ce=1,G="[object Arguments]",U="[object Array]",P="[object Object]",Ee=Object.prototype,x=Ee.hasOwnProperty;function Oe(e,n,i,t,a,s){var l=M.isArray(e),u=M.isArray(n),c=l?U:o.getTag(e),d=u?U:o.getTag(n);c=c==G?P:c,d=d==G?P:d;var v=c==P,p=d==P,g=c==d;if(g&&o.isBuffer(e)){if(!o.isBuffer(n))return!1;l=!0,v=!1}if(g&&!v)return s||(s=new o.Stack),l||o.isTypedArray(e)?F(e,n,i,t,a,s):me(e,n,c,i,t,a,s);if(!(i&Ce)){var S=v&&x.call(e,"__wrapped__"),m=p&&x.call(n,"__wrapped__");if(S||m){var y=S?e.value():e,C=m?n.value():n;return s||(s=new o.Stack),a(y,C,i,t,s)}}return g?(s||(s=new o.Stack),Se(e,n,i,t,a,s)):!1}function $(e,n,i,t,a){return e===n?!0:e==null||n==null||!I.isObjectLike(e)&&!I.isObjectLike(n)?e!==e&&n!==n:Oe(e,n,i,t,$,a)}var Be=1,Re=2;function we(e,n,i,t){var a=i.length,s=a;if(e==null)return!s;for(e=Object(e);a--;){var l=i[a];if(l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<s;){l=i[a];var u=l[0],c=e[u],d=l[1];if(l[2]){if(c===void 0&&!(u in e))return!1}else{var v=new o.Stack,p;if(!(p===void 0?$(d,c,Be|Re,t,v):p))return!1}}return!0}function K(e){return e===e&&!o.isObject(e)}function Te(e){for(var n=o.keys(e),i=n.length;i--;){var t=n[i],a=e[t];n[i]=[t,a,K(a)]}return n}function V(e,n){return function(i){return i==null?!1:i[e]===n&&(n!==void 0||e in Object(i))}}function Pe(e){var n=Te(e);return n.length==1&&n[0][2]?V(n[0][0],n[0][1]):function(i){return i===e||we(i,e,n)}}var Le=1,Ie=2;function be(e,n){return o.isKey(e)&&K(n)?V(o.toKey(e),n):function(i){var t=L.get(i,e);return t===void 0&&t===n?N.hasIn(i,e):$(n,t,Le|Ie)}}function De(e){return function(n){return n==null?void 0:n[e]}}function Me(e){return function(n){return o.baseGet(n,e)}}function qe(e){return o.isKey(e)?De(o.toKey(e)):Me(e)}function H(e){return typeof e=="function"?e:e==null?o.identity:typeof e=="object"?M.isArray(e)?be(e[0],e[1]):Pe(e):qe(e)}var Ne="Expected a function";function $e(e){if(typeof e!="function")throw new TypeError(Ne);return function(){var n=arguments;switch(n.length){case 0:return!e.call(this);case 1:return!e.call(this,n[0]);case 2:return!e.call(this,n[0],n[1]);case 3:return!e.call(this,n[0],n[1],n[2])}return!e.apply(this,n)}}function ze(e,n){if(e==null)return{};var i=o.arrayMap(o.getAllKeysIn(e),function(t){return[t]});return n=H(n),N.basePickBy(e,i,function(t,a){return n(t,a[0])})}function Ge(e,n){return ze(e,$e(H(n)))}const q=["sm","md","lg"],X=["error","warning"],Ue=r.defineComponent({...Z.getComponentOptions("Input",!1),__name:"Input",props:{id:{},maxlength:{},type:{},placeholder:{},disabled:{type:Boolean,default:void 0},required:{type:Boolean},modelValue:{},defaultValue:{},leading:{},trailing:{},clearIcon:{default:"tabler:circle-x"},trailingCls:{},clearIconCls:{},dividerCls:{},leadingCls:{},class:{},allowClear:{type:Boolean},bordered:{type:Boolean,default:!0},size:{},status:{}},emits:["update:modelValue","clear","blur","focus"],setup(e,{expose:n,emit:i}){const t=e,a=r.useSlots(),s=i,l=h.useVModel(t,"modelValue",s,{defaultValue:t.defaultValue,passive:t.modelValue===void 0}),u=E.getBemBlock("input"),c=J.cva(u,{variants:{size:E.generateVariantClassList(q,u),status:E.generateVariantClassList(X,u),bordered:E.generateVariantClassList("bordered",u)}}),d=r.computed(()=>t.size&&q.includes(t.size)?t.size:"md"),v=r.useAttrs(),{rootBindings:p,inputBindings:g}=W.UseInputDataStates({getDisabled:()=>t.disabled,emit:s,blurCallBack:f=>{const _=f.target;_!=null&&_.value&&(_.value=l.value)}}),S=r.computed(()=>Ge({...N.pick(t,"id","maxlength","type","disabled","required","placeholder"),...v,...g.value},k)),m=r.computed(()=>{switch(d.value){case"sm":return"2xsm";default:return"xsm"}}),y=r.computed(()=>{switch(d.value){case"sm":return"2xsm";case"md":return"xsm";default:return"sm"}}),C=()=>{l.value="",s("clear")},A=r.ref();return n({input:A,focus:f=>{var _;return(_=A.value)==null?void 0:_.focus(f)},blur:()=>{var f;return(f=A.value)==null?void 0:f.blur()},select:()=>{var f;return(f=A.value.input)==null?void 0:f.select()},setSelectionRange:(f,_,w)=>{var T;return(T=A.value.input)==null?void 0:T.setSelectionRange(f,_,w)}}),(f,_)=>{var w;return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:[r.unref(c)({size:d.value,status:f.status,bordered:f.bordered}),t.class]},r.unref(p)),[a.leading||t.leading?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([r.unref(E.getBemElement)(r.unref(u),"leading"),f.leadingCls])},[r.renderSlot(f.$slots,"leading",{iconSize:y.value},()=>[r.createTextVNode(r.toDisplayString(f.leading),1)])],2)):r.createCommentVNode("",!0),r.withDirectives(r.createElementVNode("input",r.mergeProps({ref_key:"inputRef",ref:A,"onUpdate:modelValue":_[0]||(_[0]=T=>r.isRef(l)?l.value=T:null)},S.value,{class:[r.unref(E.getBemElement)(r.unref(u),"input")]}),null,16),[[r.vModelDynamic,r.unref(l)]]),a.trailing||t.trailing||f.allowClear?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass([r.unref(E.getBemElement)(r.unref(u),"trailing"),f.trailingCls])},[!f.disabled&&f.allowClear&&((w=r.unref(l))!=null&&w.length)?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createVNode(Q._sfc_main,{icon:f.clearIcon,size:m.value,onClick:C,class:r.normalizeClass([r.unref(E.getBemElement)(r.unref(u),"clear_icon"),f.clearIconCls])},{default:r.withCtx(()=>[r.renderSlot(f.$slots,"clearIcon")]),_:3},8,["icon","size","class"]),a.trailing||t.trailing?(r.openBlock(),r.createBlock(Y._sfc_main,{key:0,type:"vertical",class:r.normalizeClass([r.unref(E.getBemElement)(r.unref(u),"divider"),f.dividerCls])},null,8,["class"])):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0),r.renderSlot(f.$slots,"trailing",{iconSize:y.value},()=>[r.createTextVNode(r.toDisplayString(f.trailing),1)])],2)):r.createCommentVNode("",!0)],16)}}});exports.InputSizes=q;exports.InputStatuses=X;exports._sfc_main=Ue;
|
package/dist/Kbd/Kbd.d.ts
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import { PrimitiveProps } from 'radix-vue';
|
|
2
1
|
import { Class } from '../types';
|
|
3
|
-
export interface KbdProps
|
|
2
|
+
export interface KbdProps {
|
|
4
3
|
iconOnly?: boolean;
|
|
5
4
|
class?: Class;
|
|
6
5
|
containerCls?: Class;
|
|
7
|
-
containerAs?: PrimitiveProps['as'];
|
|
8
6
|
text?: string;
|
|
9
7
|
icon?: string;
|
|
10
8
|
}
|
|
11
|
-
declare
|
|
9
|
+
declare function __VLS_template(): {
|
|
10
|
+
slots: {
|
|
11
|
+
text?(_: {}): any;
|
|
12
|
+
icon?(_: {}): any;
|
|
13
|
+
};
|
|
14
|
+
refs: {};
|
|
15
|
+
attrs: Partial<{}>;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<KbdProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<KbdProps> & Readonly<{}>, {
|
|
12
19
|
text: string;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
icon?(_: {}): any;
|
|
16
|
-
text?(_: {}): any;
|
|
17
|
-
}>;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
22
|
export default _default;
|
|
19
23
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
24
|
new (): {
|