@pantograph/vue 0.29.7 → 0.29.9
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 +6 -0
- package/dist/ActionButton/index.js +1 -1
- package/dist/ActionButton/index.umd.cjs +1 -1
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-C5zne9bw.js +67 -0
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-qVBQpm_u.js +1 -0
- package/dist/Alert/index.js +2 -2
- package/dist/Alert/index.umd.cjs +1 -1
- package/dist/Avatar/index.js +2 -2
- package/dist/Avatar/index.umd.cjs +1 -1
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-D2o9rP-R.js → Avatar.vue_vue_type_style_index_0_lang-BS8RZHC9.js} +1 -1
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-BSPQHKch.js → Avatar.vue_vue_type_style_index_0_lang-Bmf84KwX.js} +2 -2
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/AvatarGroup/index.umd.cjs +1 -1
- package/dist/Badge/Badge.d.ts +1 -1
- package/dist/Badge/index.js +1 -1
- package/dist/Badge/index.umd.cjs +1 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-Cbuqn3RE.js +1 -0
- package/dist/Badge.vue_vue_type_script_setup_true_lang-DcoQiykg.js +58 -0
- package/dist/Base/BaseBadge/BaseBadge.d.ts +1 -0
- package/dist/Base/BaseButton/BaseButton.d.ts +3 -0
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-BXt23eop.js +1 -0
- package/dist/{BaseBadge.vue_vue_type_style_index_0_lang-10ckF176.js → BaseBadge.vue_vue_type_style_index_0_lang-Df6xp03I.js} +16 -10
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-B-IwYZpC.js +1 -0
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-cyVSqCc-.js +222 -0
- package/dist/{BaseInput.vue_vue_type_style_index_0_lang-CrYgr0E2.js → BaseInput.vue_vue_type_style_index_0_lang-B_7Xbncz.js} +1 -1
- package/dist/{BaseInput.vue_vue_type_style_index_0_lang-BaaSkNs8.js → BaseInput.vue_vue_type_style_index_0_lang-DiGqAQ5h.js} +1 -1
- package/dist/Button/Button.d.ts +6 -0
- package/dist/Button/index.js +1 -1
- package/dist/Button/index.umd.cjs +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-BGBvg82i.js → Button.vue_vue_type_script_setup_true_lang-CZ7Za7mh.js} +22 -19
- package/dist/Button.vue_vue_type_script_setup_true_lang-eHox8bRY.js +1 -0
- package/dist/Card/Card.d.ts +2 -1
- package/dist/Card/Card.model.d.ts +2 -0
- package/dist/Card/index.js +41 -34
- package/dist/Card/index.umd.cjs +1 -1
- package/dist/Checkbox/index.js +2 -2
- package/dist/Checkbox/index.umd.cjs +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-CFQlwsbT.js → Checkbox.vue_vue_type_style_index_0_lang-CnrFY7Yi.js} +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-CXAyoKcr.js → Checkbox.vue_vue_type_style_index_0_lang-DNuWqN2W.js} +1 -1
- package/dist/CheckboxGroup/index.js +1 -1
- package/dist/CheckboxGroup/index.umd.cjs +1 -1
- package/dist/Chip/index.js +1 -1
- package/dist/Chip/index.umd.cjs +1 -1
- package/dist/{Chip.vue_vue_type_style_index_0_lang-VHPsw9Yn.js → Chip.vue_vue_type_style_index_0_lang-Bsd6EPfq.js} +1 -1
- package/dist/{Chip.vue_vue_type_style_index_0_lang-Dm0RiLDU.js → Chip.vue_vue_type_style_index_0_lang-JstJEDXW.js} +1 -1
- package/dist/ColorPicker/index.js +2 -2
- package/dist/ColorPicker/index.umd.cjs +1 -1
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-CJ0_qSst.js → ColorPicker.vue_vue_type_style_index_0_lang-BVpcXUCO.js} +3 -3
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-gVtNEhvy.js → ColorPicker.vue_vue_type_style_index_0_lang-C-L0U3jD.js} +1 -1
- package/dist/ColorSwatch/index.js +3 -2
- package/dist/ColorSwatch/index.umd.cjs +1 -1
- package/dist/ColorSwatchGroup/index.js +1 -1
- package/dist/ColorSwatchGroup/index.umd.cjs +1 -1
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-KU2yttLu.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-BkHkxIe5.js} +1 -1
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-IJFzTFx_.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-SH8jp1nG.js} +1 -1
- package/dist/ColorTrigger/index.js +2 -2
- package/dist/ColorTrigger/index.umd.cjs +1 -1
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-ypTGR_Fw.js → ColorTrigger.vue_vue_type_style_index_0_lang-B3JcLsEe.js} +2 -2
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-CXBS_4cj.js → ColorTrigger.vue_vue_type_style_index_0_lang-CWnBZpqK.js} +1 -1
- package/dist/Combobox/index.js +9 -9
- package/dist/Combobox/index.umd.cjs +1 -1
- package/dist/Comment/CommentActions.d.ts +12 -0
- package/dist/Comment/CommentEditor.d.ts +24 -0
- package/dist/Comment/CommentReactions.d.ts +6 -0
- package/dist/Comment/index.js +8 -8
- package/dist/Comment/index.umd.cjs +1 -1
- package/dist/DataTable/components/DataTableHeaderCell.d.ts +12 -0
- package/dist/DataTable/index.js +8 -8
- package/dist/DataTable/index.umd.cjs +1 -1
- package/dist/DropZone/DropZone.d.ts +1 -0
- package/dist/DropZone/index.js +38 -36
- package/dist/DropZone/index.umd.cjs +1 -1
- package/dist/Empty/Empty.d.ts +1 -0
- package/dist/Empty/index.js +2 -2
- package/dist/Empty/index.umd.cjs +1 -1
- package/dist/Empty.vue_vue_type_style_index_0_lang-C84ZxbFo.js +1 -0
- package/dist/{Empty.vue_vue_type_style_index_0_lang-DRqpYyi-.js → Empty.vue_vue_type_style_index_0_lang-DlPKtmHG.js} +24 -22
- package/dist/FloatButton/FloatButton.d.ts +6 -0
- package/dist/FloatButton/index.js +1 -1
- package/dist/FloatButton/index.umd.cjs +1 -1
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-0FmMTC2B.js +1 -0
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-C6CRtyze.js +71 -0
- package/dist/Form/index.js +2 -2
- package/dist/Form/index.umd.cjs +1 -1
- package/dist/FormValidation/index.js +1 -1
- package/dist/FormValidation/index.umd.cjs +1 -1
- package/dist/{FormValidation.vue_vue_type_style_index_0_lang-CeM2O3Id.js → FormValidation.vue_vue_type_style_index_0_lang-BfEkq6dv.js} +1 -1
- package/dist/{FormValidation.vue_vue_type_style_index_0_lang-4DQfQtme.js → FormValidation.vue_vue_type_style_index_0_lang-DQAst-L_.js} +1 -1
- package/dist/GOPicker/GOPicker.d.ts +6 -0
- package/dist/GOPicker/index.js +6 -6
- package/dist/GOPicker/index.umd.cjs +1 -1
- package/dist/GraphicalObject/GraphicalObject.d.ts +1 -1
- package/dist/GraphicalObject/index.js +1 -1
- package/dist/GraphicalObject/index.umd.cjs +1 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-04b3bV37.js +66 -0
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-CpazLeBG.js +1 -0
- package/dist/Icon/Icon.d.ts +1 -0
- package/dist/Icon/index.js +2 -2
- package/dist/Icon/index.umd.cjs +1 -1
- package/dist/Icon.vue_vue_type_style_index_0_lang-Bnaz1Ya1.js +59 -0
- package/dist/Icon.vue_vue_type_style_index_0_lang-C71M9gUt.js +1 -0
- package/dist/IconButton/IconButton.d.ts +6 -0
- package/dist/IconButton/index.js +1 -1
- package/dist/IconButton/index.umd.cjs +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-DBDmWePu.js → IconButton.vue_vue_type_script_setup_true_lang-DLBdaqOg.js} +17 -14
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-iGl3qBg8.js +1 -0
- package/dist/Image/index.js +2 -2
- package/dist/Image/index.umd.cjs +1 -1
- package/dist/{Image.vue_vue_type_style_index_0_lang-B5wL0qfB.js → Image.vue_vue_type_style_index_0_lang-af3cRK9F.js} +1 -1
- package/dist/{Image.vue_vue_type_style_index_0_lang-DyZjQGcE.js → Image.vue_vue_type_style_index_0_lang-oFSy9tfm.js} +2 -2
- package/dist/IndentLevel/index.js +2 -2
- package/dist/IndentLevel/index.umd.cjs +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-DXqbeAQ-.js → IndentLevel.vue_vue_type_style_index_0_lang-CCuL_Yvo.js} +2 -2
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-D1htGz8f.js → IndentLevel.vue_vue_type_style_index_0_lang-CtswoLOu.js} +1 -1
- package/dist/Indicator/index.js +1 -1
- package/dist/Indicator/index.umd.cjs +1 -1
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-JJjkSXKC.js → Indicator.vue_vue_type_script_setup_true_lang-CCc6erAV.js} +1 -1
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-d3Y_ijwq.js → Indicator.vue_vue_type_script_setup_true_lang-CNVVjR7d.js} +1 -1
- package/dist/Input/index.js +1 -1
- package/dist/Input/index.umd.cjs +1 -1
- package/dist/{Input.vue_vue_type_script_setup_true_lang-BYffMo8x.js → Input.vue_vue_type_script_setup_true_lang-C905araq.js} +1 -1
- package/dist/{Input.vue_vue_type_script_setup_true_lang-BKbts3jz.js → Input.vue_vue_type_script_setup_true_lang-CLOCaEyg.js} +1 -1
- package/dist/InputNumber/index.js +1 -1
- package/dist/InputNumber/index.umd.cjs +1 -1
- package/dist/{InputNumber.vue_vue_type_script_setup_true_lang-D9u3HUvv.js → InputNumber.vue_vue_type_script_setup_true_lang-BaXMfsP-.js} +2 -2
- package/dist/{InputNumber.vue_vue_type_script_setup_true_lang-DOFeMQKx.js → InputNumber.vue_vue_type_script_setup_true_lang-WEPQt5WK.js} +1 -1
- package/dist/Kbd/index.js +1 -1
- package/dist/Kbd/index.umd.cjs +1 -1
- package/dist/Label/index.js +2 -2
- package/dist/Label/index.umd.cjs +1 -1
- package/dist/{Label.vue_vue_type_style_index_0_lang-DMi6Zx-J.js → Label.vue_vue_type_style_index_0_lang-Bhdi11bS.js} +1 -1
- package/dist/{Label.vue_vue_type_style_index_0_lang-D89a1p58.js → Label.vue_vue_type_style_index_0_lang-CsAu-zCI.js} +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/Link/index.umd.cjs +1 -1
- package/dist/Menu/index.js +2 -2
- package/dist/Menu/index.umd.cjs +1 -1
- package/dist/MenuItem/index.js +2 -2
- package/dist/MenuItem/index.umd.cjs +1 -1
- package/dist/{MenuItem.vue_vue_type_style_index_0_lang-CRGerBun.js → MenuItem.vue_vue_type_style_index_0_lang-BSXks7wB.js} +1 -1
- package/dist/{MenuItem.vue_vue_type_style_index_0_lang-BjSUdd1p.js → MenuItem.vue_vue_type_style_index_0_lang-C-XLJOCZ.js} +1 -1
- package/dist/Pagination/index.js +4 -4
- package/dist/Pagination/index.umd.cjs +1 -1
- package/dist/Progress/index.js +2 -2
- package/dist/Progress/index.umd.cjs +1 -1
- package/dist/{Progress.vue_vue_type_style_index_0_lang-Da3J8MwA.js → Progress.vue_vue_type_style_index_0_lang-Co-Ntdse.js} +1 -1
- package/dist/{Progress.vue_vue_type_style_index_0_lang-VcaWRb-o.js → Progress.vue_vue_type_style_index_0_lang-Cu11kmyG.js} +2 -2
- package/dist/Segmented/index.js +2 -2
- package/dist/Segmented/index.umd.cjs +1 -1
- package/dist/{Segmented.vue_vue_type_style_index_0_lang-Bwyz7RU9.js → Segmented.vue_vue_type_style_index_0_lang-CQLCiPp5.js} +1 -1
- package/dist/{Segmented.vue_vue_type_style_index_0_lang-JoWqilVK.js → Segmented.vue_vue_type_style_index_0_lang-DvSSdSQT.js} +1 -1
- package/dist/Select/index.js +2 -2
- package/dist/Select/index.umd.cjs +1 -1
- package/dist/{Select.vue_vue_type_style_index_0_lang-DGdCmDGr.js → Select.vue_vue_type_style_index_0_lang-CMTqQsyB.js} +1 -1
- package/dist/{Select.vue_vue_type_style_index_0_lang-43LRXAk7.js → Select.vue_vue_type_style_index_0_lang-Ndi9aOLj.js} +3 -3
- package/dist/Shortcut/index.js +1 -1
- package/dist/Shortcut/index.umd.cjs +1 -1
- package/dist/{Shortcut.vue_vue_type_style_index_0_lang-BE85KcH8.js → Shortcut.vue_vue_type_style_index_0_lang-CJJGHM36.js} +1 -1
- package/dist/{Shortcut.vue_vue_type_style_index_0_lang-BfPJ-C7d.js → Shortcut.vue_vue_type_style_index_0_lang-CS_C0eLD.js} +1 -1
- package/dist/Spinner/index.js +2 -2
- package/dist/Spinner/index.umd.cjs +1 -1
- package/dist/{Spinner.vue_vue_type_style_index_0_lang-D-425sXj.js → Spinner.vue_vue_type_style_index_0_lang-C9MCz_69.js} +1 -1
- package/dist/{Spinner.vue_vue_type_style_index_0_lang-ByCVaoZy.js → Spinner.vue_vue_type_style_index_0_lang-wzp-qiCg.js} +1 -1
- package/dist/SubMenu/index.js +1 -1
- package/dist/SubMenu/index.umd.cjs +1 -1
- package/dist/Tabs/index.js +2 -2
- package/dist/Tabs/index.umd.cjs +1 -1
- package/dist/Tree/index.js +1 -1
- package/dist/Tree/index.umd.cjs +1 -1
- package/dist/Upload/index.js +6 -6
- package/dist/Upload/index.umd.cjs +1 -1
- package/dist/{index-ChJBx3zx.js → index-BKOC_aqA.js} +3 -3
- package/dist/{index-BGRPfms4.js → index-CK7W6_Qj.js} +1 -1
- package/dist/index-beGKgyVN.js +1 -0
- package/dist/index-gV5GRaQv.js +398 -0
- package/dist/index.js +346 -345
- package/dist/index.umd.cjs +1 -1
- package/dist/nuxt.d.ts +1 -1
- package/dist/style/index.css +1 -1
- package/dist/use/index.js +2 -2
- package/dist/use/index.umd.cjs +1 -1
- package/package.json +1 -1
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-BKA6jQN0.js +0 -64
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-BhI55sWu.js +0 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-BFQCx53R.js +0 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-BvaT1pMA.js +0 -57
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-CE9-_G4N.js +0 -1
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-BmmbeeCU.js +0 -1
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-SL_re9nc.js +0 -216
- package/dist/Button.vue_vue_type_script_setup_true_lang-DRaac7hE.js +0 -1
- package/dist/Empty.vue_vue_type_style_index_0_lang-qlOjnH1j.js +0 -1
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-BD_pn8Vu.js +0 -1
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-CjWleMQR.js +0 -68
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-Cw-dYlrK.js +0 -65
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-DuCrET7F.js +0 -1
- package/dist/Icon.vue_vue_type_style_index_0_lang-D35DGfhm.js +0 -1
- package/dist/Icon.vue_vue_type_style_index_0_lang-cUm6hfXg.js +0 -48
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-CeH-nxZ6.js +0 -1
- package/dist/index-C09B6Xw_.js +0 -1
- package/dist/index-DIv3guO-.js +0 -397
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { defineComponent as M, computed as p, useSlots as Q, ref as x, watch as U, createBlock as m, openBlock as u, unref as r, mergeProps as W, withCtx as v, createElementBlock as X, Fragment as Y, createCommentVNode as T, renderSlot as I, createVNode as Z, createTextVNode as oo, toDisplayString as eo, normalizeClass as to, h as no } from "vue";
|
|
2
|
+
import { _ as S } from "./Icon.vue_vue_type_style_index_0_lang-Bnaz1Ya1.js";
|
|
3
|
+
import { _ as ao } from "./Spinner.vue_vue_type_style_index_0_lang-C9MCz_69.js";
|
|
4
|
+
import { _ as io } from "./Badge.vue_vue_type_script_setup_true_lang-DcoQiykg.js";
|
|
5
|
+
import { Primitive as ro } from "reka-ui";
|
|
6
|
+
import { d as F, B as _, c as P, b as $, i as so } from "./index-C3LNCbQ5.js";
|
|
7
|
+
import { useConfig as lo } from "./ConfigProvider/index.js";
|
|
8
|
+
import { useFormInput as co, isEmptyElement as po } from "@pantograph/utils-vue";
|
|
9
|
+
import { getBemBlock as uo, generateVariantClassList as a, getComponentOptions as mo, normCls as fo, getBemElement as go } from "@pantograph/utils";
|
|
10
|
+
import { cva as vo } from "class-variance-authority";
|
|
11
|
+
const n = uo("button"), Io = vo(n, {
|
|
12
|
+
variants: {
|
|
13
|
+
size: a($, n),
|
|
14
|
+
type: a(P, n),
|
|
15
|
+
color: a(_, n),
|
|
16
|
+
variant: a(F, n),
|
|
17
|
+
action: a("action", n),
|
|
18
|
+
active: a("active", n),
|
|
19
|
+
text: a("text", n),
|
|
20
|
+
preIcon: a("preIcon", n),
|
|
21
|
+
postIcon: a("postIcon", n),
|
|
22
|
+
loading: a("loading", n),
|
|
23
|
+
block: a("block", n),
|
|
24
|
+
noRing: a("no-ring", n)
|
|
25
|
+
}
|
|
26
|
+
}), xo = /* @__PURE__ */ M({
|
|
27
|
+
...mo("BaseButton"),
|
|
28
|
+
__name: "BaseButton",
|
|
29
|
+
props: {
|
|
30
|
+
as: {},
|
|
31
|
+
class: {},
|
|
32
|
+
text: {},
|
|
33
|
+
size: {},
|
|
34
|
+
color: { default: "primary" },
|
|
35
|
+
noRing: { type: Boolean },
|
|
36
|
+
type: { default: "fill" },
|
|
37
|
+
variant: {},
|
|
38
|
+
loading: { type: Boolean },
|
|
39
|
+
action: { type: Boolean },
|
|
40
|
+
active: { type: Boolean },
|
|
41
|
+
badgeText: {},
|
|
42
|
+
badgeIcon: {},
|
|
43
|
+
icon: {},
|
|
44
|
+
preIcon: {},
|
|
45
|
+
postIcon: {},
|
|
46
|
+
customStroke: { type: Boolean },
|
|
47
|
+
preIconCustomStroke: { type: Boolean },
|
|
48
|
+
postIconCustomStroke: { type: Boolean },
|
|
49
|
+
flipOnDir: {},
|
|
50
|
+
preIconFlipOnDir: {},
|
|
51
|
+
postIconFlipOnDir: {},
|
|
52
|
+
badgeIconFlipOnDir: {},
|
|
53
|
+
htmlType: { default: "button" },
|
|
54
|
+
block: { type: Boolean },
|
|
55
|
+
disabled: { type: Boolean, default: void 0 },
|
|
56
|
+
hover: { type: Boolean },
|
|
57
|
+
href: {},
|
|
58
|
+
target: {}
|
|
59
|
+
},
|
|
60
|
+
emits: ["click"],
|
|
61
|
+
setup(R, { expose: V, emit: w }) {
|
|
62
|
+
const e = R, { getFlipOnDir: f } = lo(), E = f("flipOnDir"), N = f("preIconFlipOnDir"), G = f("postIconFlipOnDir"), j = f("badgeIconFlipOnDir"), z = so({}), d = p(() => {
|
|
63
|
+
var o;
|
|
64
|
+
return e.variant ?? ((o = z.props) == null ? void 0 : o.variant) ?? "simple";
|
|
65
|
+
}), i = p(
|
|
66
|
+
() => ["icon", "float"].includes(d.value) || (t.icon || e.icon) && !(e.text || t.default || e.preIcon || t.preIcon || e.postIcon || t.postIcon)
|
|
67
|
+
), t = Q(), { getDisabled: y, getSize: B } = co({ getSize: () => {
|
|
68
|
+
var o;
|
|
69
|
+
return e.size ?? ((o = z.props) == null ? void 0 : o.size);
|
|
70
|
+
} }), A = p(() => {
|
|
71
|
+
let o = P.includes(e.type) ? e.type : "fill";
|
|
72
|
+
const s = B.value, g = s && $.includes(s) ? s : "md";
|
|
73
|
+
let l = e.color && _.includes(e.color) ? e.color : "primary", c = d.value && F.includes(d.value) ? d.value : "simple";
|
|
74
|
+
return e.action ? ((c === "float" || i.value) && (c = "icon"), o === "fill" && (o = "outline"), l = void 0) : c === "float" && (o === "ghost" && (o = "fill"), ["primary", "neutral"].includes(l) || (l = "primary")), {
|
|
75
|
+
size: g,
|
|
76
|
+
type: o,
|
|
77
|
+
color: l,
|
|
78
|
+
variant: c,
|
|
79
|
+
action: !!e.action,
|
|
80
|
+
active: !!e.active,
|
|
81
|
+
loading: !!e.loading,
|
|
82
|
+
block: !!e.block,
|
|
83
|
+
noRing: !!e.noRing,
|
|
84
|
+
text: !i.value && !!(e.text || t.default),
|
|
85
|
+
preIcon: !i.value && !!(e.preIcon || t.preIcon),
|
|
86
|
+
postIcon: !i.value && !!(e.postIcon || t.postIcon)
|
|
87
|
+
};
|
|
88
|
+
}), b = p(() => {
|
|
89
|
+
switch (B.value) {
|
|
90
|
+
case "lg":
|
|
91
|
+
return "sm";
|
|
92
|
+
case "sm":
|
|
93
|
+
return "2xsm";
|
|
94
|
+
default:
|
|
95
|
+
return "xsm";
|
|
96
|
+
}
|
|
97
|
+
}), K = p(() => {
|
|
98
|
+
switch (B.value) {
|
|
99
|
+
case "sm":
|
|
100
|
+
return "3xsm";
|
|
101
|
+
case "lg":
|
|
102
|
+
return "xsm";
|
|
103
|
+
case "md":
|
|
104
|
+
default:
|
|
105
|
+
return "2xsm";
|
|
106
|
+
}
|
|
107
|
+
}), h = "2xsm", D = x(0), O = p(() => e.as ? e.as : e.href ? "a" : "button");
|
|
108
|
+
U(O, () => {
|
|
109
|
+
D.value++;
|
|
110
|
+
});
|
|
111
|
+
const L = p(() => {
|
|
112
|
+
const o = {
|
|
113
|
+
disabled: y.value
|
|
114
|
+
};
|
|
115
|
+
return e.href && (o.href = e.href, o.target = e.target), e.htmlType && (o.type = e.htmlType), e.hover && (o["data-hover"] = ""), o;
|
|
116
|
+
}), k = x();
|
|
117
|
+
V({
|
|
118
|
+
focus() {
|
|
119
|
+
var o;
|
|
120
|
+
(o = k.value) == null || o.focus();
|
|
121
|
+
},
|
|
122
|
+
blur() {
|
|
123
|
+
var o;
|
|
124
|
+
(o = k.value) == null || o.blur();
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
const q = w, H = (o) => {
|
|
128
|
+
if (e.loading || e.disabled) {
|
|
129
|
+
o.preventDefault(), o.stopPropagation();
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
q("click", o);
|
|
133
|
+
}, J = () => {
|
|
134
|
+
var o, s, g;
|
|
135
|
+
if (e.action && e.active && !i.value) {
|
|
136
|
+
const l = (o = t.badge) == null ? void 0 : o.call(t, {
|
|
137
|
+
color: y.value ? "gray" : "primary",
|
|
138
|
+
size: h
|
|
139
|
+
});
|
|
140
|
+
if (!po(l)) return l;
|
|
141
|
+
const c = (s = t.badgeText) == null ? void 0 : s.call(t, {}), C = (g = t.badgeIcon) == null ? void 0 : g.call(t, {});
|
|
142
|
+
if (e.badgeText || c || e.badgeIcon || C)
|
|
143
|
+
return no(
|
|
144
|
+
io,
|
|
145
|
+
{
|
|
146
|
+
text: e.badgeText,
|
|
147
|
+
icon: e.badgeIcon,
|
|
148
|
+
flipOnDir: j.value,
|
|
149
|
+
color: y.value ? "gray" : "primary",
|
|
150
|
+
size: h
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
default: c ? t.badgeText : void 0,
|
|
154
|
+
icon: C ? t.badgeIcon : void 0
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
return null;
|
|
159
|
+
};
|
|
160
|
+
return console.log("props.customStroke ===>", e.customStroke), (o, s) => (u(), m(r(ro), W({
|
|
161
|
+
as: O.value,
|
|
162
|
+
key: String(D.value),
|
|
163
|
+
class: r(fo)(r(Io)(A.value), e.class),
|
|
164
|
+
ref_key: "buttonRef",
|
|
165
|
+
ref: k
|
|
166
|
+
}, L.value, { onClick: H }), {
|
|
167
|
+
default: v(() => [
|
|
168
|
+
o.loading ? (u(), m(ao, {
|
|
169
|
+
key: 1,
|
|
170
|
+
class: to(r(go)(r(n), "loading")),
|
|
171
|
+
size: b.value
|
|
172
|
+
}, null, 8, ["class", "size"])) : (u(), X(Y, { key: 0 }, [
|
|
173
|
+
(o.preIcon || t.preIcon) && !i.value ? (u(), m(S, {
|
|
174
|
+
key: 0,
|
|
175
|
+
flipOnDir: r(N),
|
|
176
|
+
icon: o.preIcon,
|
|
177
|
+
size: b.value,
|
|
178
|
+
customStroke: o.preIconCustomStroke
|
|
179
|
+
}, {
|
|
180
|
+
default: v(() => [
|
|
181
|
+
I(o.$slots, "preIcon")
|
|
182
|
+
]),
|
|
183
|
+
_: 3
|
|
184
|
+
}, 8, ["flipOnDir", "icon", "size", "customStroke"])) : T("", !0),
|
|
185
|
+
i.value ? (u(), m(S, {
|
|
186
|
+
key: 1,
|
|
187
|
+
icon: o.icon,
|
|
188
|
+
size: K.value,
|
|
189
|
+
flipOnDir: r(E),
|
|
190
|
+
customStroke: o.customStroke
|
|
191
|
+
}, {
|
|
192
|
+
default: v(() => [
|
|
193
|
+
I(o.$slots, "icon")
|
|
194
|
+
]),
|
|
195
|
+
_: 3
|
|
196
|
+
}, 8, ["icon", "size", "flipOnDir", "customStroke"])) : I(o.$slots, "default", { key: 2 }, () => [
|
|
197
|
+
oo(eo(o.text), 1)
|
|
198
|
+
]),
|
|
199
|
+
Z(J),
|
|
200
|
+
(o.postIcon || t.postIcon) && !i.value ? (u(), m(S, {
|
|
201
|
+
key: 3,
|
|
202
|
+
flipOnDir: r(G),
|
|
203
|
+
customStroke: o.postIconCustomStroke,
|
|
204
|
+
icon: o.postIcon,
|
|
205
|
+
size: b.value
|
|
206
|
+
}, {
|
|
207
|
+
default: v(() => [
|
|
208
|
+
I(o.$slots, "postIcon")
|
|
209
|
+
]),
|
|
210
|
+
_: 3
|
|
211
|
+
}, 8, ["flipOnDir", "customStroke", "icon", "size"])) : T("", !0)
|
|
212
|
+
], 64))
|
|
213
|
+
]),
|
|
214
|
+
_: 3
|
|
215
|
+
}, 16, ["as", "class"]));
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
export {
|
|
219
|
+
xo as _,
|
|
220
|
+
Io as a,
|
|
221
|
+
n as b
|
|
222
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),f=require("class-variance-authority"),B=require("./Icon.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";const e=require("vue"),f=require("class-variance-authority"),B=require("./Icon.vue_vue_type_style_index_0_lang-C71M9gUt.js"),S=require("./Divider.vue_vue_type_style_index_0_lang-D3wrVsBd.js"),z=require("@pantograph/utils-vue"),t=require("@pantograph/utils"),C=["sm","md","lg"],v=["error","warning","success"],a=t.getBemBlock("input"),y=r=>({input:r,focus:l=>{var o;return(o=r.value)==null?void 0:o.focus(l)},blur:()=>{var l;return(l=r.value)==null?void 0:l.blur()},select:()=>{var l;return(l=r.value)==null?void 0:l.select()},setSelectionRange:(l,o,u)=>{var d;return(d=r.value)==null?void 0:d.setSelectionRange(l,o,u)}}),V=e.defineComponent({...t.getComponentOptions("BaseInput"),__name:"BaseInput",props:{disabled:{type:Boolean,default:void 0},immediateFocus:{type:Boolean},leading:{},trailing:{},clearIcon:{default:"tabler:circle-x"},trailingCls:{},clearIconCls:{},dividerCls:{},leadingCls:{},class:{},allowClear:{type:Boolean},bordered:{type:Boolean,default:!0},simple:{type:Boolean},size:{},status:{},hasValue:{type:Boolean},steps:{type:Boolean}},emits:["clear"],setup(r,{emit:p}){const n=r,i=e.useSlots(),g=f.cva(a,{variants:{size:t.generateVariantClassList(C,a),status:t.generateVariantClassList(v,a),bordered:t.generateVariantClassList("bordered",a),simple:t.generateVariantClassList("simple",a),steps:t.generateVariantClassList("steps",a)}}),l=p,o=e.computed(()=>{switch(n.size){case"sm":return"2xsm";default:return"xsm"}}),u=e.computed(()=>{switch(n.size){case"sm":return"2xsm";case"md":return"xsm";default:return"sm"}}),d=()=>{var m;const s=(m=i.leading)==null?void 0:m.call(i,{iconSize:u.value}),c=!z.isEmptyElement(s);return c||n.leading?e.h("div",{class:t.normCls(t.getBemElement(a,"leading"),n.leadingCls)},c?s:n.leading):null};return(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(t.normCls)(e.unref(g)({size:n.size,status:n.status==="success"&&!s.hasValue?void 0:n.status,bordered:s.bordered,simple:s.simple,steps:s.steps}),n.class))},[e.createVNode(d),e.renderSlot(s.$slots,"default"),i.trailing||n.trailing||s.allowClear?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(t.normCls)(e.unref(t.getBemElement)(e.unref(a),"trailing"),s.trailingCls))},[!n.disabled&&s.allowClear&&s.hasValue?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(B._sfc_main,{icon:s.clearIcon,size:o.value,onClick:c[0]||(c[0]=e.withModifiers(m=>l("clear"),["stop"])),class:e.normalizeClass(e.unref(t.normCls)(e.unref(t.getBemElement)(e.unref(a),"clear_icon"),s.clearIconCls))},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"clearIcon")]),_:3},8,["icon","size","class"]),i.trailing||n.trailing?(e.openBlock(),e.createBlock(S._sfc_main,{key:0,type:"vertical",class:e.normalizeClass(e.unref(t.normCls)(e.unref(t.getBemElement)(e.unref(a),"divider"),s.dividerCls))},null,8,["class"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"trailing",{iconSize:u.value},()=>[e.createTextVNode(e.toDisplayString(s.trailing),1)])],2)):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"extra",{iconSize:u.value})],2))}});exports.InputSizes=C;exports.InputStatuses=v;exports._sfc_main=V;exports.inputPrefix=a;exports.useInputExposes=y;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as h, useSlots as k, computed as b, createElementBlock as z, openBlock as p, normalizeClass as g, unref as a, createVNode as I, renderSlot as v, createCommentVNode as B, Fragment as w, createBlock as V, withModifiers as $, withCtx as E, createTextVNode as L, toDisplayString as N, h as F } from "vue";
|
|
2
2
|
import { cva as D } from "class-variance-authority";
|
|
3
|
-
import { _ as M } from "./Icon.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import { _ as M } from "./Icon.vue_vue_type_style_index_0_lang-Bnaz1Ya1.js";
|
|
4
4
|
import { _ as O } from "./Divider.vue_vue_type_style_index_0_lang-GfWcHNix.js";
|
|
5
5
|
import { isEmptyElement as P } from "@pantograph/utils-vue";
|
|
6
6
|
import { getBemBlock as T, getComponentOptions as j, generateVariantClassList as u, normCls as d, getBemElement as f } from "@pantograph/utils";
|
package/dist/Button/Button.d.ts
CHANGED
|
@@ -25,6 +25,9 @@ declare function __VLS_template(): {
|
|
|
25
25
|
readonly icon?: string | undefined;
|
|
26
26
|
readonly preIcon?: string | undefined;
|
|
27
27
|
readonly postIcon?: string | undefined;
|
|
28
|
+
readonly customStroke?: boolean | undefined;
|
|
29
|
+
readonly preIconCustomStroke?: boolean | undefined;
|
|
30
|
+
readonly postIconCustomStroke?: boolean | undefined;
|
|
28
31
|
readonly flipOnDir?: import('..').FlipOnDir | undefined;
|
|
29
32
|
readonly preIconFlipOnDir?: import('..').FlipOnDir | undefined;
|
|
30
33
|
readonly postIconFlipOnDir?: import('..').FlipOnDir | undefined;
|
|
@@ -163,6 +166,9 @@ declare const __VLS_component: import('vue').DefineComponent<Partial<Omit<BaseBu
|
|
|
163
166
|
readonly icon?: string | undefined;
|
|
164
167
|
readonly preIcon?: string | undefined;
|
|
165
168
|
readonly postIcon?: string | undefined;
|
|
169
|
+
readonly customStroke?: boolean | undefined;
|
|
170
|
+
readonly preIconCustomStroke?: boolean | undefined;
|
|
171
|
+
readonly postIconCustomStroke?: boolean | undefined;
|
|
166
172
|
readonly flipOnDir?: import('..').FlipOnDir | undefined;
|
|
167
173
|
readonly preIconFlipOnDir?: import('..').FlipOnDir | undefined;
|
|
168
174
|
readonly postIconFlipOnDir?: import('..').FlipOnDir | undefined;
|
package/dist/Button/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as t } from "../Button.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as t } from "../Button.vue_vue_type_script_setup_true_lang-CZ7Za7mh.js";
|
|
2
2
|
import { installComponent as o } from "@pantograph/utils-vue";
|
|
3
3
|
import { getComponentName as n } from "@pantograph/utils";
|
|
4
4
|
const e = o(t, n("Button"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../Button.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../Button.vue_vue_type_script_setup_true_lang-eHox8bRY.js"),e=require("@pantograph/utils-vue"),u=require("@pantograph/utils"),n=e.installComponent(t._sfc_main,u.getComponentName("Button"));exports.Button=t._sfc_main;exports.default=t._sfc_main;exports.ButtonPlugin=n;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as c, useAttrs as l, computed as m, ref as
|
|
2
|
-
import { omit as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { getComponentOptions as
|
|
5
|
-
const
|
|
6
|
-
...
|
|
1
|
+
import { defineComponent as c, useAttrs as l, computed as m, ref as u, createBlock as f, openBlock as d, mergeProps as y, createSlots as B, renderList as b, withCtx as g, renderSlot as _, normalizeProps as v, guardReactiveProps as k } from "vue";
|
|
2
|
+
import { omit as I } from "es-toolkit";
|
|
3
|
+
import { _ as O } from "./BaseButton.vue_vue_type_style_index_0_lang-cyVSqCc-.js";
|
|
4
|
+
import { getComponentOptions as h } from "@pantograph/utils";
|
|
5
|
+
const F = /* @__PURE__ */ c({
|
|
6
|
+
...h("Button", !1),
|
|
7
7
|
__name: "Button",
|
|
8
8
|
props: {
|
|
9
9
|
as: {},
|
|
@@ -16,6 +16,9 @@ const P = /* @__PURE__ */ c({
|
|
|
16
16
|
loading: { type: Boolean },
|
|
17
17
|
preIcon: {},
|
|
18
18
|
postIcon: {},
|
|
19
|
+
customStroke: { type: Boolean },
|
|
20
|
+
preIconCustomStroke: { type: Boolean },
|
|
21
|
+
postIconCustomStroke: { type: Boolean },
|
|
19
22
|
preIconFlipOnDir: {},
|
|
20
23
|
postIconFlipOnDir: {},
|
|
21
24
|
htmlType: {},
|
|
@@ -27,7 +30,7 @@ const P = /* @__PURE__ */ c({
|
|
|
27
30
|
},
|
|
28
31
|
setup(n, { expose: r }) {
|
|
29
32
|
const s = n, a = l(), p = m(() => ({
|
|
30
|
-
...
|
|
33
|
+
...I(a, [
|
|
31
34
|
"variant",
|
|
32
35
|
"action",
|
|
33
36
|
"active",
|
|
@@ -38,30 +41,30 @@ const P = /* @__PURE__ */ c({
|
|
|
38
41
|
"badgeIconFlipOnDir"
|
|
39
42
|
]),
|
|
40
43
|
...s
|
|
41
|
-
})),
|
|
44
|
+
})), e = u();
|
|
42
45
|
return r({
|
|
43
46
|
focus() {
|
|
44
|
-
var
|
|
45
|
-
(
|
|
47
|
+
var o;
|
|
48
|
+
(o = e.value) == null || o.focus();
|
|
46
49
|
},
|
|
47
50
|
blur() {
|
|
48
|
-
var
|
|
49
|
-
(
|
|
51
|
+
var o;
|
|
52
|
+
(o = e.value) == null || o.blur();
|
|
50
53
|
}
|
|
51
|
-
}), (
|
|
54
|
+
}), (o, C) => (d(), f(O, y(p.value, {
|
|
52
55
|
variant: "simple",
|
|
53
56
|
ref_key: "buttonRef",
|
|
54
|
-
ref:
|
|
55
|
-
}),
|
|
56
|
-
|
|
57
|
+
ref: e
|
|
58
|
+
}), B({ _: 2 }, [
|
|
59
|
+
b(Object.keys(o.$slots), (t) => ({
|
|
57
60
|
name: t,
|
|
58
|
-
fn:
|
|
59
|
-
|
|
61
|
+
fn: g((i) => [
|
|
62
|
+
_(o.$slots, t, v(k(i)))
|
|
60
63
|
])
|
|
61
64
|
}))
|
|
62
65
|
]), 1040));
|
|
63
66
|
}
|
|
64
67
|
});
|
|
65
68
|
export {
|
|
66
|
-
|
|
69
|
+
F as _
|
|
67
70
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),p=require("es-toolkit"),u=require("./BaseButton.vue_vue_type_style_index_0_lang-B-IwYZpC.js"),_=require("@pantograph/utils"),f=e.defineComponent({..._.getComponentOptions("Button",!1),__name:"Button",props:{as:{},class:{},text:{},size:{},color:{},noRing:{type:Boolean},type:{},loading:{type:Boolean},preIcon:{},postIcon:{},customStroke:{type:Boolean},preIconCustomStroke:{type:Boolean},postIconCustomStroke:{type:Boolean},preIconFlipOnDir:{},postIconFlipOnDir:{},htmlType:{},block:{type:Boolean},disabled:{type:Boolean,default:void 0},hover:{type:Boolean},href:{},target:{}},setup(r,{expose:s}){const a=r,i=e.useAttrs(),c=e.computed(()=>({...p.omit(i,["variant","action","active","badgeText","badgeIcon","icon","flipOnDir","badgeIconFlipOnDir"]),...a})),t=e.ref();return s({focus(){var o;(o=t.value)==null||o.focus()},blur(){var o;(o=t.value)==null||o.blur()}}),(o,m)=>(e.openBlock(),e.createBlock(u._sfc_main,e.mergeProps(c.value,{variant:"simple",ref_key:"buttonRef",ref:t}),e.createSlots({_:2},[e.renderList(Object.keys(o.$slots),n=>({name:n,fn:e.withCtx(l=>[e.renderSlot(o.$slots,n,e.normalizeProps(e.guardReactiveProps(l)))])}))]),1040))}});exports._sfc_main=f;
|
package/dist/Card/Card.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CardType } from './Card.model';
|
|
1
|
+
import { CardType, CarResponsiveBreakpoint } from './Card.model';
|
|
2
2
|
import { ClassValue } from 'class-variance-authority/types';
|
|
3
3
|
export interface CardProps {
|
|
4
4
|
type?: CardType;
|
|
@@ -16,6 +16,7 @@ export interface CardProps {
|
|
|
16
16
|
actionsCls?: ClassValue;
|
|
17
17
|
floatedActionsCls?: ClassValue;
|
|
18
18
|
bodyCls?: ClassValue;
|
|
19
|
+
responsiveBreakPoint?: CarResponsiveBreakpoint;
|
|
19
20
|
}
|
|
20
21
|
export interface CardSlots {
|
|
21
22
|
default: (data?: object) => never;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export declare const CardTypes: readonly ["vertical", "horizontal"];
|
|
2
2
|
export type CardType = (typeof CardTypes)[number];
|
|
3
|
+
export declare const CarResponsiveBreakpoints: readonly ["desktop", "tablet"];
|
|
4
|
+
export type CarResponsiveBreakpoint = (typeof CarResponsiveBreakpoints)[number];
|
package/dist/Card/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getComponentOptions as F, getBemBlock as N, generateVariantClassList as
|
|
1
|
+
import { defineComponent as A, useSlots as w, createElementBlock as E, openBlock as b, normalizeClass as u, unref as a, createVNode as d, createElementVNode as C, h as r } from "vue";
|
|
2
|
+
import { getComponentOptions as F, getBemBlock as N, generateVariantClassList as p, normCls as i, getBemElement as l, getComponentName as O } from "@pantograph/utils";
|
|
3
3
|
import { cva as S } from "class-variance-authority";
|
|
4
4
|
import { isEmptyElement as c, installComponent as V } from "@pantograph/utils-vue";
|
|
5
|
-
const
|
|
5
|
+
const z = ["vertical", "horizontal"], H = ["desktop", "tablet"], L = /* @__PURE__ */ A({
|
|
6
6
|
...F("Card"),
|
|
7
7
|
__name: "Card",
|
|
8
8
|
props: {
|
|
@@ -20,25 +20,30 @@ const _ = ["vertical", "horizontal"], z = /* @__PURE__ */ E({
|
|
|
20
20
|
descriptionCls: {},
|
|
21
21
|
actionsCls: {},
|
|
22
22
|
floatedActionsCls: {},
|
|
23
|
-
bodyCls: {}
|
|
23
|
+
bodyCls: {},
|
|
24
|
+
responsiveBreakPoint: {}
|
|
24
25
|
},
|
|
25
26
|
setup(f) {
|
|
26
|
-
const o = f,
|
|
27
|
+
const o = f, s = N("card"), m = S(s, {
|
|
27
28
|
variants: {
|
|
28
|
-
type:
|
|
29
|
-
selected:
|
|
30
|
-
leadingPadding:
|
|
29
|
+
type: p(z, s),
|
|
30
|
+
selected: p("selected", s),
|
|
31
|
+
leadingPadding: p("leading-padding", s),
|
|
32
|
+
responsiveBreakPoint: p(
|
|
33
|
+
H,
|
|
34
|
+
s
|
|
35
|
+
)
|
|
31
36
|
}
|
|
32
|
-
}), n =
|
|
37
|
+
}), n = w(), g = () => {
|
|
33
38
|
var t;
|
|
34
39
|
const e = (t = n.leading) == null ? void 0 : t.call(n, {});
|
|
35
|
-
return c(e) ? null : r("div", { class:
|
|
40
|
+
return c(e) ? null : r("div", { class: i(l(s, "leading"), o.leadingCls) }, e);
|
|
36
41
|
}, v = () => {
|
|
37
42
|
var t;
|
|
38
43
|
const e = (t = n.title) == null ? void 0 : t.call(n, {});
|
|
39
44
|
return o.title || !c(e) ? r(
|
|
40
45
|
"div",
|
|
41
|
-
{ class:
|
|
46
|
+
{ class: i(l(s, "title"), "paragraph", o.titleCls) },
|
|
42
47
|
e ?? o.title
|
|
43
48
|
) : null;
|
|
44
49
|
}, y = () => {
|
|
@@ -46,33 +51,33 @@ const _ = ["vertical", "horizontal"], z = /* @__PURE__ */ E({
|
|
|
46
51
|
const e = (t = n.description) == null ? void 0 : t.call(n, {});
|
|
47
52
|
return o.description || !c(e) ? r(
|
|
48
53
|
"div",
|
|
49
|
-
{ class:
|
|
54
|
+
{ class: i(l(s, "description"), "paragraph", o.descriptionCls) },
|
|
50
55
|
e ?? o.description
|
|
51
56
|
) : null;
|
|
52
57
|
}, B = () => {
|
|
53
58
|
const e = v(), t = y();
|
|
54
|
-
return e || t ? r("div", { class:
|
|
59
|
+
return e || t ? r("div", { class: i(l(s, "body"), o.bodyCls) }, [
|
|
55
60
|
e,
|
|
56
61
|
t
|
|
57
62
|
]) : null;
|
|
58
|
-
},
|
|
63
|
+
}, k = () => {
|
|
59
64
|
var t;
|
|
60
65
|
const e = (t = n.default) == null ? void 0 : t.call(n, {});
|
|
61
66
|
return c(e) ? null : e;
|
|
62
|
-
},
|
|
67
|
+
}, P = () => {
|
|
63
68
|
var t;
|
|
64
69
|
const e = (t = n.actions) == null ? void 0 : t.call(n, {});
|
|
65
|
-
return c(e) ? null : r("div", { class:
|
|
66
|
-
},
|
|
70
|
+
return c(e) ? null : r("div", { class: i(l(s, "actions"), o.actionsCls) }, e);
|
|
71
|
+
}, h = () => {
|
|
67
72
|
var t;
|
|
68
73
|
const e = (t = n.floatedActions) == null ? void 0 : t.call(n, {});
|
|
69
74
|
return c(e) ? null : r(
|
|
70
75
|
"div",
|
|
71
76
|
{
|
|
72
|
-
class:
|
|
73
|
-
|
|
77
|
+
class: i(
|
|
78
|
+
l(s, "floated-actions"),
|
|
74
79
|
{
|
|
75
|
-
[`${
|
|
80
|
+
[`${l(s, "floated-actions")}--hover-only`]: o.showFloatedActionsOnHover
|
|
76
81
|
},
|
|
77
82
|
o.floatedActionsCls
|
|
78
83
|
)
|
|
@@ -80,37 +85,39 @@ const _ = ["vertical", "horizontal"], z = /* @__PURE__ */ E({
|
|
|
80
85
|
e
|
|
81
86
|
);
|
|
82
87
|
};
|
|
83
|
-
return (e, t) => (
|
|
84
|
-
class:
|
|
85
|
-
i
|
|
86
|
-
|
|
88
|
+
return (e, t) => (b(), E("div", {
|
|
89
|
+
class: u(
|
|
90
|
+
a(i)(
|
|
91
|
+
a(m)({
|
|
87
92
|
type: e.type,
|
|
88
93
|
selected: e.selected,
|
|
89
|
-
leadingPadding: e.leadingPadding
|
|
94
|
+
leadingPadding: e.leadingPadding,
|
|
95
|
+
responsiveBreakPoint: e.responsiveBreakPoint
|
|
90
96
|
}),
|
|
91
97
|
o.class
|
|
92
98
|
)
|
|
93
99
|
)
|
|
94
100
|
}, [
|
|
95
|
-
d(
|
|
101
|
+
d(h),
|
|
96
102
|
d(g),
|
|
97
103
|
C("div", {
|
|
98
|
-
class:
|
|
104
|
+
class: u(a(i)(a(l)(a(s), "content"), o.contentCls))
|
|
99
105
|
}, [
|
|
100
106
|
C("div", {
|
|
101
|
-
class:
|
|
107
|
+
class: u(a(i)(a(l)(a(s), "wrapper"), o.wrapperCls))
|
|
102
108
|
}, [
|
|
103
109
|
d(B),
|
|
104
|
-
d(
|
|
110
|
+
d(k)
|
|
105
111
|
], 2),
|
|
106
|
-
d(
|
|
112
|
+
d(P)
|
|
107
113
|
], 2)
|
|
108
114
|
], 2));
|
|
109
115
|
}
|
|
110
|
-
}), $ = V(
|
|
116
|
+
}), $ = V(L, O("Card"));
|
|
111
117
|
export {
|
|
112
|
-
|
|
118
|
+
H as CarResponsiveBreakpoints,
|
|
119
|
+
L as Card,
|
|
113
120
|
$ as CardPlugin,
|
|
114
|
-
|
|
115
|
-
|
|
121
|
+
z as CardTypes,
|
|
122
|
+
L as default
|
|
116
123
|
};
|
package/dist/Card/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("@pantograph/utils"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("@pantograph/utils"),y=require("class-variance-authority"),a=require("@pantograph/utils-vue"),c=["vertical","horizontal"],d=["desktop","tablet"],i=e.defineComponent({...n.getComponentOptions("Card"),__name:"Card",props:{type:{default:"vertical"},selected:{type:Boolean,default:!1},showFloatedActionsOnHover:{type:Boolean,default:!0},leadingPadding:{type:Boolean,default:!0},title:{},description:{},class:{},leadingCls:{},contentCls:{},wrapperCls:{},titleCls:{},descriptionCls:{},actionsCls:{},floatedActionsCls:{},bodyCls:{},responsiveBreakPoint:{}},setup(u){const r=u,o=n.getBemBlock("card"),p=y.cva(o,{variants:{type:n.generateVariantClassList(c,o),selected:n.generateVariantClassList("selected",o),leadingPadding:n.generateVariantClassList("leading-padding",o),responsiveBreakPoint:n.generateVariantClassList(d,o)}}),l=e.useSlots(),m=()=>{var s;const t=(s=l.leading)==null?void 0:s.call(l,{});return a.isEmptyElement(t)?null:e.h("div",{class:n.normCls(n.getBemElement(o,"leading"),r.leadingCls)},t)},C=()=>{var s;const t=(s=l.title)==null?void 0:s.call(l,{});return r.title||!a.isEmptyElement(t)?e.h("div",{class:n.normCls(n.getBemElement(o,"title"),"paragraph",r.titleCls)},t??r.title):null},g=()=>{var s;const t=(s=l.description)==null?void 0:s.call(l,{});return r.description||!a.isEmptyElement(t)?e.h("div",{class:n.normCls(n.getBemElement(o,"description"),"paragraph",r.descriptionCls)},t??r.description):null},f=()=>{const t=C(),s=g();return t||s?e.h("div",{class:n.normCls(n.getBemElement(o,"body"),r.bodyCls)},[t,s]):null},v=()=>{var s;const t=(s=l.default)==null?void 0:s.call(l,{});return a.isEmptyElement(t)?null:t},B=()=>{var s;const t=(s=l.actions)==null?void 0:s.call(l,{});return a.isEmptyElement(t)?null:e.h("div",{class:n.normCls(n.getBemElement(o,"actions"),r.actionsCls)},t)},E=()=>{var s;const t=(s=l.floatedActions)==null?void 0:s.call(l,{});return a.isEmptyElement(t)?null:e.h("div",{class:n.normCls(n.getBemElement(o,"floated-actions"),{[`${n.getBemElement(o,"floated-actions")}--hover-only`]:r.showFloatedActionsOnHover},r.floatedActionsCls)},t)};return(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(n.normCls)(e.unref(p)({type:t.type,selected:t.selected,leadingPadding:t.leadingPadding,responsiveBreakPoint:t.responsiveBreakPoint}),r.class))},[e.createVNode(E),e.createVNode(m),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(o),"content"),r.contentCls))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(o),"wrapper"),r.wrapperCls))},[e.createVNode(f),e.createVNode(v)],2),e.createVNode(B)],2)],2))}}),h=a.installComponent(i,n.getComponentName("Card"));exports.CarResponsiveBreakpoints=d;exports.Card=i;exports.CardPlugin=h;exports.CardTypes=c;exports.default=i;
|
package/dist/Checkbox/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as o } from "../Checkbox.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { b as C, u as c, c as h } from "../Checkbox.vue_vue_type_style_index_0_lang-
|
|
1
|
+
import { _ as o } from "../Checkbox.vue_vue_type_style_index_0_lang-CnrFY7Yi.js";
|
|
2
|
+
import { b as C, u as c, c as h } from "../Checkbox.vue_vue_type_style_index_0_lang-CnrFY7Yi.js";
|
|
3
3
|
import { installComponent as e } from "@pantograph/utils-vue";
|
|
4
4
|
import { getComponentName as a } from "@pantograph/utils";
|
|
5
5
|
const m = e(o, a("Checkbox"));
|
|
@@ -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-DNuWqN2W.js"),o=require("@pantograph/utils-vue"),r=require("@pantograph/utils"),t=o.installComponent(e._sfc_main,r.getComponentName("Checkbox"));exports.Checkbox=e._sfc_main;exports.CheckboxSizes=e.CheckboxSizes;exports.default=e._sfc_main;exports.useColoredPantographCheckbox=e.useColoredPantographCheckbox;exports.useColoredPantographCheckboxGroup=e.useColoredPantographCheckboxGroup;exports.CheckboxPlugin=t;
|
|
@@ -5,7 +5,7 @@ import { getComponentOptions as D, getComponentName as ae, getBemBlock as oe, us
|
|
|
5
5
|
import { cva as ue } from "class-variance-authority";
|
|
6
6
|
import { installComponent as re, useFormInput as de, useInputDataStates as ne } from "@pantograph/utils-vue";
|
|
7
7
|
import { omit as S } from "es-toolkit";
|
|
8
|
-
import { _ as ce } from "./Icon.vue_vue_type_style_index_0_lang-
|
|
8
|
+
import { _ as ce } from "./Icon.vue_vue_type_style_index_0_lang-Bnaz1Ya1.js";
|
|
9
9
|
const ie = ["2xsm", "xsm"], $e = (t) => ({
|
|
10
10
|
"--ptc-checkbox-bg": r(`${t}-5`),
|
|
11
11
|
"--ptc-checkbox-bg-hover": r(`${t}-4`),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),C=require("reka-ui"),n=require("@pantograph/tokens"),r=require("@pantograph/utils"),j=require("class-variance-authority"),g=require("@pantograph/utils-vue"),B=require("es-toolkit"),D=require("./Icon.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";const e=require("vue"),C=require("reka-ui"),n=require("@pantograph/tokens"),r=require("@pantograph/utils"),j=require("class-variance-authority"),g=require("@pantograph/utils-vue"),B=require("es-toolkit"),D=require("./Icon.vue_vue_type_style_index_0_lang-C71M9gUt.js"),x=["2xsm","xsm"],I=t=>({"--ptc-checkbox-bg":n.getCssCoreColor(`${t}-5`),"--ptc-checkbox-bg-hover":n.getCssCoreColor(`${t}-4`),"--ptc-checkbox-bg-focus":n.getCssCoreColor(`${t}-6`),"--ptc-checkbox-br-focus":n.getCssCoreColor(`${t}-6`),"--ptc-checkbox-bg-active":n.getCssCoreColor(`${t}-7`)}),O=t=>({"--ptc-group-checkbox-bg":n.getCssCoreColor(`${t}-5`),"--ptc-group-checkbox-bg-hover":n.getCssCoreColor(`${t}-4`),"--ptc-group-checkbox-bg-focus":n.getCssCoreColor(`${t}-6`),"--ptc-group-checkbox-br-focus":n.getCssCoreColor(`${t}-6`),"--ptc-group-checkbox-bg-active":n.getCssCoreColor(`${t}-7`)}),[V,y]=C.createContext("CheckboxGroup"),_=e.defineComponent({...r.getComponentOptions("CheckboxGroup"),__name:"CheckboxGroup",props:{asChild:{type:Boolean,default:!0},as:{},modelValue:{},size:{},disabled:{type:Boolean,default:void 0},name:{},options:{}},emits:["update:modelValue","change"],setup(t,{emit:f}){const u=f,l=t,a=o=>({value:typeof o=="object"?o==null?void 0:o.value:o,disabled:typeof o=="object"?o==null?void 0:o.disabled:void 0,label:typeof o=="object"?(o==null?void 0:o.label)??(o==null?void 0:o.value):o}),c=e.ref(l.modelValue??[]);e.watch(()=>l.modelValue,()=>{c.value=l.modelValue??[]});const v=e.computed({get(){return l.modelValue?l.modelValue:c.value},set(o){l.modelValue||(c.value=o),u("update:modelValue",o),u("change",o)}});return y({model:v,props:l}),(o,m)=>(e.openBlock(),e.createBlock(e.unref(C.Primitive),{as:o.as,asChild:o.asChild},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",{},()=>{var d;return[(d=o.options)!=null&&d.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.options,(i,h)=>(e.openBlock(),e.createBlock(z,e.mergeProps({key:i.value??i,ref_for:!0},a(i)),null,16))),128)):e.createCommentVNode("",!0)]})]),_:3},8,["as","asChild"]))}}),U=g.installComponent(_,r.getComponentName("CheckboxGroup")),F=["for"],z=e.defineComponent({...r.getComponentOptions("Checkbox"),__name:"Checkbox",props:{checked:{type:[Boolean,String,null],default:void 0},size:{default:"xsm"},class:{},rootCls:{},indicatorCls:{},indeterminateCls:{},labelCls:{},label:{},value:{},id:{},valueAsLabel:{type:Boolean,default:!0},unExtendParent:{type:Boolean},defaultValue:{type:[Boolean,String]},modelValue:{type:[Boolean,String,null],default:void 0},disabled:{type:Boolean,default:void 0},name:{},required:{type:Boolean}},emits:["update:modelValue","update:checked","change","blur","focus"],setup(t,{emit:f}){const u=r.getBemBlock("checkbox"),l=t,a=l.unExtendParent?void 0:V({}),c=f,v=e.useSlots(),o=e.computed(()=>l.modelValue??l.checked),m=e.ref(o.value??!1);e.watch(()=>[l.modelValue,l.checked],()=>{m.value=o.value??!1});const d=e.computed({get(){var s;return(s=a==null?void 0:a.model)!=null&&s.value?l.value!==void 0&&(a==null?void 0:a.model.value.includes(l.value)):o.value!==void 0?o.value:m.value},set(s){var p;if((p=a==null?void 0:a.model)!=null&&p.value){if(l.value!==void 0){const b=a==null?void 0:a.model.value.indexOf(l.value);s&&b===-1?a.model.value=[...(a==null?void 0:a.model.value)??[],l.value]:!s&&b!==-1&&(a.model.value=a==null?void 0:a.model.value.filter(N=>N!==l.value))}}else o.value===void 0&&(m.value=s),c("update:checked",s),c("update:modelValue",s),c("change",s)}}),{getDisabled:i}=g.useFormInput({getDisabled:()=>{var s;return((s=a==null?void 0:a.props)==null?void 0:s.disabled)??l.disabled}}),h=e.computed(()=>l.id??r.usePCId(u)),P=C.useEmitAsProps(c),$=e.computed(()=>({disabled:i.value,...L.value,...B.omit(l,["size","class","label","disabled","modelValue","checked","id","rootCls","indicatorCls","indeterminateCls","labelCls"]),...B.omit(P,["onUpdate:modelValue","onUpdate:checked"])})),G=j.cva(u,{variants:{size:r.generateVariantClassList(x,u)}}),S=e.computed(()=>l.label||v.default||l.value&&l.valueAsLabel),q=e.computed(()=>{if(l.label)return l.label;if(l.value&&l.valueAsLabel)return l.value}),k=e.computed(()=>{var s;return((s=a==null?void 0:a.props)==null?void 0:s.size)??l.size}),E=e.computed(()=>{switch(k.value){case"xsm":return"2xsm";case"2xsm":default:return"3xsm"}}),{rootBindings:w,inputBindings:L}=g.useInputDataStates({getDisabled:()=>i.value,emit:c}),A=()=>d.value=!d.value;return(s,p)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:e.unref(r.normCls)(e.unref(r.getBemElement)(e.unref(u),"root"),s.rootCls)},e.unref(w)),[e.createVNode(e.unref(C.CheckboxRoot),e.mergeProps({onKeyup:e.withKeys(A,["enter"])},$.value,{modelValue:d.value,"onUpdate:modelValue":p[0]||(p[0]=b=>d.value=b),id:h.value,class:e.unref(r.normCls)(e.unref(G)({size:k.value}),l.class)}),{default:e.withCtx(()=>[e.createVNode(e.unref(C.CheckboxIndicator),{class:e.normalizeClass(e.unref(r.normCls)(e.unref(r.getBemElement)(e.unref(u),"indicator"),s.indicatorCls)),asChild:""},{default:e.withCtx(()=>[o.value!="indeterminate"?(e.openBlock(),e.createBlock(D._sfc_main,{key:0,icon:"tabler:check",size:E.value},null,8,["size"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(r.normCls)(e.unref(r.getBemElement)(e.unref(u),"indeterminate"),s.indeterminateCls))},null,2))]),_:1},8,["class"])]),_:1},16,["modelValue","id","class"]),S.value?(e.openBlock(),e.createElementBlock("label",{key:0,for:h.value,class:e.normalizeClass(e.unref(r.normCls)(e.unref(r.getBemElement)(e.unref(u),"label"),s.labelCls))},[e.renderSlot(s.$slots,"default",{checked:o.value,disabled:e.unref(i),required:s.required},()=>[e.createTextVNode(e.toDisplayString(q.value),1)])],10,F)):e.createCommentVNode("",!0)],16))}});exports.CheckboxGroupPlugin=U;exports.CheckboxSizes=x;exports._sfc_main=z;exports._sfc_main$1=_;exports.injectCheckboxGroupContext=V;exports.provideCheckboxGroupContext=y;exports.useColoredPantographCheckbox=I;exports.useColoredPantographCheckboxGroup=O;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as t, C as x, i as C, p as i } from "../Checkbox.vue_vue_type_style_index_0_lang-
|
|
1
|
+
import { a as t, C as x, i as C, p as i } from "../Checkbox.vue_vue_type_style_index_0_lang-CnrFY7Yi.js";
|
|
2
2
|
import "@pantograph/utils-vue";
|
|
3
3
|
import "@pantograph/utils";
|
|
4
4
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Checkbox.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Checkbox.vue_vue_type_style_index_0_lang-DNuWqN2W.js");require("@pantograph/utils-vue");require("@pantograph/utils");exports.CheckboxGroup=e._sfc_main$1;exports.CheckboxGroupPlugin=e.CheckboxGroupPlugin;exports.injectCheckboxGroupContext=e.injectCheckboxGroupContext;exports.provideCheckboxGroupContext=e.provideCheckboxGroupContext;
|
package/dist/Chip/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as o } from "../Chip.vue_vue_type_style_index_0_lang-
|
|
1
|
+
import { _ as o } from "../Chip.vue_vue_type_style_index_0_lang-Bsd6EPfq.js";
|
|
2
2
|
import { installComponent as i } from "@pantograph/utils-vue";
|
|
3
3
|
import { getComponentName as p } from "@pantograph/utils";
|
|
4
4
|
import { C as e, b as n } from "../index-D8GuRo14.js";
|
package/dist/Chip/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Chip.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Chip.vue_vue_type_style_index_0_lang-JstJEDXW.js"),t=require("@pantograph/utils-vue"),s=require("@pantograph/utils"),i=require("../index-SHgIzWWT.js"),n=t.installComponent(e._sfc_main,s.getComponentName("Chip"));exports.Chip=e._sfc_main;exports.default=e._sfc_main;exports.ChipColors=i.ChipColors;exports.ChipSizes=i.ChipSizes;exports.ChipPlugin=n;
|