@pantograph/vue 0.11.0 → 0.12.0
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/index.js +1 -1
- package/dist/ActionButton/index.umd.cjs +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-BZf08kPh.js → ActionButton.vue_vue_type_script_setup_true_lang-CiJO-TtM.js} +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-BayCQ8ok.js → ActionButton.vue_vue_type_script_setup_true_lang-ViFlltdC.js} +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/Avatar/index.umd.cjs +1 -1
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-BLPh8zCp.js → Avatar.vue_vue_type_style_index_0_lang-B327aIKw.js} +31 -30
- package/dist/Avatar.vue_vue_type_style_index_0_lang-BFe4hxYW.js +1 -0
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/AvatarGroup/index.umd.cjs +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-C8L2pGJ3.js → Badge.vue_vue_type_script_setup_true_lang-Bad9nnGa.js} +21 -13
- package/dist/Badge.vue_vue_type_script_setup_true_lang-DYK5srGm.js +1 -0
- package/dist/Base/BaseBadge/BaseBadge.model.d.ts +2 -2
- package/dist/{BaseBadge.vue_vue_type_style_index_0_lang-CEI46Vj4.js → BaseBadge.vue_vue_type_style_index_0_lang-BcdmTWX7.js} +11 -9
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-Coak5m7J.js +1 -0
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-Cu_wyrUY.js → BaseButton.vue_vue_type_style_index_0_lang-4kmojL6W.js} +1 -1
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-Cxd4xw3_.js → BaseButton.vue_vue_type_style_index_0_lang-DXgQ3ris.js} +1 -1
- 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-8Q-PTpnv.js → Button.vue_vue_type_script_setup_true_lang-2DEfrzzC.js} +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-C8xrlHDs.js → Button.vue_vue_type_script_setup_true_lang-D6IZHvUZ.js} +1 -1
- package/dist/Checkbox/Checkbox.model.d.ts +10 -10
- package/dist/Checkbox/index.js +1 -1
- package/dist/Checkbox/index.umd.cjs +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-C7it9Wv8.js → Checkbox.vue_vue_type_style_index_0_lang-D6HTNzfn.js} +64 -64
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-mD-mS-u3.js +1 -0
- package/dist/CheckboxGroup/index.js +1 -1
- package/dist/CheckboxGroup/index.umd.cjs +1 -1
- package/dist/ColorPicker/index.js +1 -1
- package/dist/ColorPicker/index.umd.cjs +1 -1
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-D_Q2AACS.js → ColorPicker.vue_vue_type_style_index_0_lang-CniJlpEJ.js} +1 -1
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-Cul5oJ7_.js → ColorPicker.vue_vue_type_style_index_0_lang-DN82VYCI.js} +1 -1
- package/dist/ColorSwatch/index.js +1 -1
- package/dist/ColorSwatch/index.umd.cjs +1 -1
- package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-D_h9Uh7N.js → ColorSwatch.vue_vue_type_style_index_0_lang-CmiVBddf.js} +1 -1
- package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-ju2qA_wA.js → ColorSwatch.vue_vue_type_style_index_0_lang-ZEuyslU3.js} +2 -2
- 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-DWGCMHVU.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-DEeU3fwR.js} +1 -1
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-Dc6gEmsZ.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-DUPU05Mk.js} +3 -3
- package/dist/ColorTrigger/index.js +1 -1
- package/dist/ColorTrigger/index.umd.cjs +1 -1
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-CvjaO0Uv.js → ColorTrigger.vue_vue_type_style_index_0_lang-BoQP08i6.js} +1 -1
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-CORbzpQN.js → ColorTrigger.vue_vue_type_style_index_0_lang-DNapwSG1.js} +1 -1
- package/dist/DataTable/index.js +7 -7
- package/dist/DataTable/index.umd.cjs +1 -1
- package/dist/Empty/index.js +1 -1
- package/dist/Empty/index.umd.cjs +1 -1
- package/dist/Empty.vue_vue_type_style_index_0_lang-BCaOU35N.js +1 -0
- package/dist/{Empty.vue_vue_type_style_index_0_lang-DbUtm7Hx.js → Empty.vue_vue_type_style_index_0_lang-BlW5utb2.js} +5 -5
- 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-77A3vBEt.js → FloatButton.vue_vue_type_script_setup_true_lang-B9mpfDyP.js} +1 -1
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-CNoTwogj.js → FloatButton.vue_vue_type_script_setup_true_lang-DM0rSSdK.js} +1 -1
- package/dist/GraphicalObject/GraphicalObject.model.d.ts +3 -3
- 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-BNS3O4Gh.js +1 -0
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-D0SLQ2VT.js +62 -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-DytRXxrl.js → IconButton.vue_vue_type_script_setup_true_lang-BhMR_Y-g.js} +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-B1hjcIFz.js → IconButton.vue_vue_type_script_setup_true_lang-BhcKAsTi.js} +1 -1
- package/dist/IndentLevel/index.js +1 -1
- package/dist/IndentLevel/index.umd.cjs +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-CR3y-jwd.js → IndentLevel.vue_vue_type_style_index_0_lang-BMvDCqMT.js} +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-Bxo_bAGI.js → IndentLevel.vue_vue_type_style_index_0_lang-Dcp0Pbh1.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-1Tv8ZzfK.js +1 -0
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-Bsp8iIQN.js → Indicator.vue_vue_type_script_setup_true_lang-uTHr60wL.js} +8 -6
- package/dist/Menu/index.js +1 -1
- package/dist/Menu/index.umd.cjs +1 -1
- package/dist/{Menu.vue_vue_type_style_index_0_lang-U69mRopb.js → Menu.vue_vue_type_style_index_0_lang-BSR_8MKN.js} +1 -1
- package/dist/{Menu.vue_vue_type_style_index_0_lang-RUqqWTb-.js → Menu.vue_vue_type_style_index_0_lang-DzZ6brMU.js} +1 -1
- package/dist/MenuItem/index.js +1 -1
- package/dist/MenuItem/index.umd.cjs +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/Popover/index.umd.cjs +1 -1
- package/dist/{Popover.vue_vue_type_style_index_0_lang-BCFXul8O.js → Popover.vue_vue_type_style_index_0_lang-CIv6R_D2.js} +1 -1
- package/dist/{Popover.vue_vue_type_style_index_0_lang-CYNcA-aI.js → Popover.vue_vue_type_style_index_0_lang-_D1J6CSu.js} +1 -1
- 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-lRQda-XM.js → Shortcut.vue_vue_type_style_index_0_lang-BC2nLIR_.js} +6 -6
- package/dist/{Shortcut.vue_vue_type_style_index_0_lang-DeTzUFmC.js → Shortcut.vue_vue_type_style_index_0_lang-ChhQV0kI.js} +1 -1
- package/dist/Tree/index.js +1 -1
- package/dist/Tree/index.umd.cjs +1 -1
- package/dist/{Tree.vue_vue_type_style_index_0_lang-irjjsFae.js → Tree.vue_vue_type_style_index_0_lang-B3BLoWLT.js} +2 -2
- package/dist/{Tree.vue_vue_type_style_index_0_lang-Da1-B5KL.js → Tree.vue_vue_type_style_index_0_lang-DItSzkar.js} +1 -1
- package/dist/element-BURaVF00.js +1 -0
- package/dist/element-CayrDxFe.js +30 -0
- package/dist/index.js +20 -20
- package/dist/index.umd.cjs +1 -1
- package/dist/style/index.css +1 -1
- package/dist/utils/element.d.ts +2 -0
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.umd.cjs +1 -1
- package/package.json +3 -3
- package/dist/Avatar.vue_vue_type_style_index_0_lang-Duxj62Xn.js +0 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-BChsnh9M.js +0 -1
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-WTsL3poJ.js +0 -1
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-BuqfswxO.js +0 -1
- package/dist/Empty.vue_vue_type_style_index_0_lang-C9fZc_AL.js +0 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-DQ-TKjQG.js +0 -59
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-fyO8zi4r.js +0 -1
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-26XUXdy9.js +0 -1
- package/dist/element-DPnhLHX0.js +0 -23
- package/dist/element-uBbpeYVo.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../ActionButton.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../ActionButton.vue_vue_type_script_setup_true_lang-ViFlltdC.js");exports.ActionButton=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as p, useAttrs as l, computed as m, ref as u, createBlock as f, openBlock as d, mergeProps as _, createSlots as b, renderList as g, withCtx as v, renderSlot as I, normalizeProps as B, guardReactiveProps as O } from "vue";
|
|
2
2
|
import { o as k } from "./omit-CD3OjwFx.js";
|
|
3
|
-
import { _ as x } from "./BaseButton.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import { _ as x } from "./BaseButton.vue_vue_type_style_index_0_lang-DXgQ3ris.js";
|
|
4
4
|
import { g as y } from "./options-JBqnVZUl.js";
|
|
5
5
|
const R = /* @__PURE__ */ p({
|
|
6
6
|
...y("ActionButton", !1),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),p=require("./omit-C4BrcXKG.js"),l=require("./BaseButton.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";const e=require("vue"),p=require("./omit-C4BrcXKG.js"),l=require("./BaseButton.vue_vue_type_style_index_0_lang-4kmojL6W.js"),_=require("./options-B4iSAKol.js"),f=e.defineComponent({..._.getComponentOptions("ActionButton",!1),__name:"ActionButton",props:{class:{},preIcon:{},postIcon:{},size:{},text:{},icon:{},active:{type:Boolean},badgeText:{},badgeIcon:{},postIconFlipOnDir:{},preIconFlipOnDir:{},badgeIconFlipOnDir:{},type:{},variant:{}},setup(r,{expose:s}){const c=r,i=e.useAttrs(),a=e.computed(()=>({...p.omit(i,"variant","loading","color"),...c})),o=e.ref();return s({focus(){var t;(t=o.value)==null||t.focus()},blur(){var t;(t=o.value)==null||t.blur()}}),(t,m)=>(e.openBlock(),e.createBlock(l._sfc_main,e.mergeProps(a.value,{action:"",ref_key:"buttonRef",ref:o}),e.createSlots({_:2},[e.renderList(Object.keys(t.$slots),n=>({name:n,fn:e.withCtx(u=>[e.renderSlot(t.$slots,n,e.normalizeProps(e.guardReactiveProps(u)))])}))]),1040))}});exports._sfc_main=f;
|
package/dist/Avatar/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as t, c as r, b as e, A, a as v, _ as n } from "../Avatar.vue_vue_type_style_index_0_lang-
|
|
1
|
+
import { _ as t, c as r, b as e, A, a as v, _ as n } from "../Avatar.vue_vue_type_style_index_0_lang-B327aIKw.js";
|
|
2
2
|
export {
|
|
3
3
|
t as Avatar,
|
|
4
4
|
r as AvatarOnlineAlignments,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Avatar.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Avatar.vue_vue_type_style_index_0_lang-BFe4hxYW.js");exports.Avatar=e._sfc_main;exports.AvatarOnlineAlignments=e.AvatarOnlineAlignments;exports.AvatarShapes=e.AvatarShapes;exports.AvatarSizes=e.AvatarSizes;exports.AvatarStrokes=e.AvatarStrokes;exports.default=e._sfc_main;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as E, useSlots as F, computed as n, createElementBlock as _, openBlock as i, normalizeClass as p, createVNode as I, h as z, createBlock as
|
|
1
|
+
import { defineComponent as E, useSlots as F, computed as n, createElementBlock as _, openBlock as i, normalizeClass as p, createVNode as I, h as z, createBlock as h, unref as t, withCtx as b, createCommentVNode as x, Fragment as M, mergeProps as R, renderSlot as B, createTextVNode as $, toDisplayString as G } from "vue";
|
|
2
2
|
import { createContext as T, useEmitAsProps as H, AvatarRoot as J, AvatarImage as K, AvatarFallback as Q } from "radix-vue";
|
|
3
3
|
import { getBemBlock as O, getBemElement as v, generateVariantClassList as f } from "@pantograph/utils";
|
|
4
4
|
import { cva as j } from "class-variance-authority";
|
|
5
5
|
import { g as q } from "./options-JBqnVZUl.js";
|
|
6
|
-
import { _ as U } from "./Popover.vue_vue_type_style_index_0_lang-
|
|
6
|
+
import { _ as U } from "./Popover.vue_vue_type_style_index_0_lang-CIv6R_D2.js";
|
|
7
7
|
import "@iconify/vue";
|
|
8
8
|
import { _ as W } from "./Icon.vue_vue_type_style_index_0_lang-BlmMv3wD.js";
|
|
9
|
-
import { _ as X } from "./Indicator.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
|
|
9
|
+
import { _ as X } from "./Indicator.vue_vue_type_script_setup_true_lang-uTHr60wL.js";
|
|
10
|
+
import { c as Y } from "./element-CayrDxFe.js";
|
|
11
|
+
const [Z, ee] = T("AvatarGroup"), pe = /* @__PURE__ */ E({
|
|
11
12
|
...q("AvatarGroup"),
|
|
12
13
|
__name: "AvatarGroup",
|
|
13
14
|
props: {
|
|
@@ -18,50 +19,50 @@ const [Y, Z] = T("AvatarGroup"), ue = /* @__PURE__ */ E({
|
|
|
18
19
|
popoverCls: {},
|
|
19
20
|
maxCount: {}
|
|
20
21
|
},
|
|
21
|
-
setup(
|
|
22
|
-
const o =
|
|
22
|
+
setup(A) {
|
|
23
|
+
const o = A, d = F(), a = n(() => o.size), s = n(() => o.shape), y = O("avatar"), g = v(y, "group"), k = j(g, {
|
|
23
24
|
variants: {
|
|
24
25
|
gutter: f("gutter", g)
|
|
25
26
|
}
|
|
26
27
|
});
|
|
27
|
-
|
|
28
|
+
ee({
|
|
28
29
|
size: a,
|
|
29
30
|
shape: s
|
|
30
31
|
});
|
|
31
|
-
const
|
|
32
|
+
const l = n(() => o.maxCount ? Number(o.maxCount) : 0), c = n(
|
|
32
33
|
() => k({
|
|
33
34
|
gutter: o.gutter
|
|
34
35
|
})
|
|
35
36
|
), u = () => {
|
|
36
|
-
const
|
|
37
|
-
return
|
|
38
|
-
...
|
|
37
|
+
const r = Y(d.default ? d.default() : []);
|
|
38
|
+
return l.value > 1 && r.length > l.value ? [
|
|
39
|
+
...r.filter((C, m) => m < l.value - 1),
|
|
39
40
|
z(
|
|
40
41
|
U,
|
|
41
42
|
{ containerCls: o.popoverCls },
|
|
42
43
|
{
|
|
43
|
-
default: () => z(
|
|
44
|
+
default: () => z(te, { text: `+${r.length - l.value + 1}` }),
|
|
44
45
|
content: () => z(
|
|
45
46
|
"div",
|
|
46
47
|
{ class: [c.value, o.class] },
|
|
47
48
|
{
|
|
48
|
-
default: () =>
|
|
49
|
+
default: () => r.filter((C, m) => m >= l.value - 1)
|
|
49
50
|
}
|
|
50
51
|
)
|
|
51
52
|
}
|
|
52
53
|
)
|
|
53
|
-
] :
|
|
54
|
+
] : r;
|
|
54
55
|
};
|
|
55
|
-
return (
|
|
56
|
+
return (r, C) => (i(), _("div", {
|
|
56
57
|
class: p([c.value, o.class])
|
|
57
58
|
}, [
|
|
58
|
-
I(u, { maxCount:
|
|
59
|
+
I(u, { maxCount: r.maxCount }, null, 8, ["maxCount"])
|
|
59
60
|
], 2));
|
|
60
61
|
}
|
|
61
62
|
}), P = ["2xsm", "xsm", "sm", "md", "lg", "xlg"], w = ["gray", "white"], N = ["circle", "square", "rect"], V = {
|
|
62
63
|
start: "online-start",
|
|
63
64
|
end: "online-end"
|
|
64
|
-
},
|
|
65
|
+
}, te = /* @__PURE__ */ E({
|
|
65
66
|
...q("Avatar"),
|
|
66
67
|
__name: "Avatar",
|
|
67
68
|
props: {
|
|
@@ -81,8 +82,8 @@ const [Y, Z] = T("AvatarGroup"), ue = /* @__PURE__ */ E({
|
|
|
81
82
|
delayMs: {}
|
|
82
83
|
},
|
|
83
84
|
emits: ["loadingStatusChange"],
|
|
84
|
-
setup(
|
|
85
|
-
const d = F(), a = O("avatar"), s =
|
|
85
|
+
setup(A, { emit: o }) {
|
|
86
|
+
const d = F(), a = O("avatar"), s = A, g = H(o), k = j(a, {
|
|
86
87
|
variants: {
|
|
87
88
|
size: f(P, a),
|
|
88
89
|
stroke: f(w, a),
|
|
@@ -92,10 +93,10 @@ const [Y, Z] = T("AvatarGroup"), ue = /* @__PURE__ */ E({
|
|
|
92
93
|
a
|
|
93
94
|
)
|
|
94
95
|
}
|
|
95
|
-
}),
|
|
96
|
+
}), l = Z({
|
|
96
97
|
size: n(() => s.size),
|
|
97
98
|
shape: n(() => s.shape)
|
|
98
|
-
}), c = n(() =>
|
|
99
|
+
}), c = n(() => l.size.value ?? s.size), u = n(() => l.shape.value ?? s.shape), r = n(() => {
|
|
99
100
|
const e = c.value && P.includes(c.value) ? c.value : "md", S = s.stroke && w.includes(s.stroke) ? s.stroke : "none", D = u.value && N.includes(u.value) ? u.value : "circle", L = V[s.onlineAlignment] ? s.onlineAlignment : "start";
|
|
100
101
|
return {
|
|
101
102
|
size: e,
|
|
@@ -125,13 +126,13 @@ const [Y, Z] = T("AvatarGroup"), ue = /* @__PURE__ */ E({
|
|
|
125
126
|
return "xsm";
|
|
126
127
|
}
|
|
127
128
|
});
|
|
128
|
-
return (e, S) => (i(),
|
|
129
|
+
return (e, S) => (i(), h(t(J), {
|
|
129
130
|
as: "div",
|
|
130
|
-
class: p([t(k)(
|
|
131
|
+
class: p([t(k)(r.value), s.class])
|
|
131
132
|
}, {
|
|
132
133
|
default: b(() => [
|
|
133
134
|
!d.default && !e.text ? (i(), _(M, { key: 0 }, [
|
|
134
|
-
e.src ? (i(),
|
|
135
|
+
e.src ? (i(), h(t(K), R({ key: 0 }, t(g), {
|
|
135
136
|
src: e.src,
|
|
136
137
|
alt: e.alt,
|
|
137
138
|
class: t(v)(t(a), "image")
|
|
@@ -141,7 +142,7 @@ const [Y, Z] = T("AvatarGroup"), ue = /* @__PURE__ */ E({
|
|
|
141
142
|
}, {
|
|
142
143
|
default: b(() => [
|
|
143
144
|
B(e.$slots, "fallback", {}, () => [
|
|
144
|
-
e.fallback ? x("", !0) : (i(),
|
|
145
|
+
e.fallback ? x("", !0) : (i(), h(t(W), {
|
|
145
146
|
key: 0,
|
|
146
147
|
icon: e.icon,
|
|
147
148
|
size: m.value
|
|
@@ -159,7 +160,7 @@ const [Y, Z] = T("AvatarGroup"), ue = /* @__PURE__ */ E({
|
|
|
159
160
|
$(G(e.text), 1)
|
|
160
161
|
])
|
|
161
162
|
], 2)),
|
|
162
|
-
e.online ? (i(),
|
|
163
|
+
e.online ? (i(), h(X, {
|
|
163
164
|
key: 2,
|
|
164
165
|
color: e.onlineColor,
|
|
165
166
|
size: C.value,
|
|
@@ -172,11 +173,11 @@ const [Y, Z] = T("AvatarGroup"), ue = /* @__PURE__ */ E({
|
|
|
172
173
|
});
|
|
173
174
|
export {
|
|
174
175
|
P as A,
|
|
175
|
-
|
|
176
|
+
te as _,
|
|
176
177
|
w as a,
|
|
177
178
|
N as b,
|
|
178
179
|
V as c,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
pe as d,
|
|
181
|
+
Z as i,
|
|
182
|
+
ee as p
|
|
182
183
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),m=require("radix-vue"),s=require("@pantograph/utils"),z=require("class-variance-authority"),x=require("./options-B4iSAKol.js"),b=require("./Popover.vue_vue_type_style_index_0_lang-_D1J6CSu.js");require("@iconify/vue");const N=require("./Icon.vue_vue_type_style_index_0_lang-C00M2fnO.js"),G=require("./Indicator.vue_vue_type_script_setup_true_lang-1Tv8ZzfK.js"),P=require("./element-BURaVF00.js"),[y,S]=m.createContext("AvatarGroup"),w=e.defineComponent({...x.getComponentOptions("AvatarGroup"),__name:"AvatarGroup",props:{class:{},gutter:{type:Boolean},size:{},shape:{},popoverCls:{},maxCount:{}},setup(f){const r=f,p=e.useSlots(),n=e.computed(()=>r.size),a=e.computed(()=>r.shape),g=s.getBemBlock("avatar"),v=s.getBemElement(g,"group"),C=z.cva(v,{variants:{gutter:s.generateVariantClassList("gutter",v)}});S({size:n,shape:a});const l=e.computed(()=>r.maxCount?Number(r.maxCount):0),c=e.computed(()=>C({gutter:r.gutter})),i=()=>{const o=P.flattenChildren(p.default?p.default():[]);return l.value>1&&o.length>l.value?[...o.filter((d,u)=>u<l.value-1),e.h(b._sfc_main,{containerCls:r.popoverCls},{default:()=>e.h(V,{text:`+${o.length-l.value+1}`}),content:()=>e.h("div",{class:[c.value,r.class]},{default:()=>o.filter((d,u)=>u>=l.value-1)})})]:o};return(o,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([c.value,r.class])},[e.createVNode(i,{maxCount:o.maxCount},null,8,["maxCount"])],2))}}),_=["2xsm","xsm","sm","md","lg","xlg"],k=["gray","white"],A=["circle","square","rect"],h={start:"online-start",end:"online-end"},V=e.defineComponent({...x.getComponentOptions("Avatar"),__name:"Avatar",props:{src:{default:""},class:{},onlineColor:{default:"lime"},size:{default:"md"},stroke:{},shape:{default:"circle"},online:{type:Boolean},alt:{},fallback:{},text:{},icon:{default:"tabler:user"},onlineAlignment:{default:"start"},referrerPolicy:{},delayMs:{}},emits:["loadingStatusChange"],setup(f,{emit:r}){const p=e.useSlots(),n=s.getBemBlock("avatar"),a=f,g=r,v=m.useEmitAsProps(g),C=z.cva(n,{variants:{size:s.generateVariantClassList(_,n),stroke:s.generateVariantClassList(k,n),shape:s.generateVariantClassList(A,n),onlineAlignment:s.generateVariantClassList(h,n)}}),l=y({size:e.computed(()=>a.size),shape:e.computed(()=>a.shape)}),c=e.computed(()=>l.size.value??a.size),i=e.computed(()=>l.shape.value??a.shape),o=e.computed(()=>{const t=c.value&&_.includes(c.value)?c.value:"md",B=a.stroke&&k.includes(a.stroke)?a.stroke:"none",q=i.value&&A.includes(i.value)?i.value:"circle",E=h[a.onlineAlignment]?a.onlineAlignment:"start";return{size:t,stroke:B,shape:q,onlineAlignment:E}}),d=e.computed(()=>{switch(c.value){case"lg":case"xlg":return"tiny";default:return"tinier"}}),u=e.computed(()=>{switch(c.value){case"lg":case"xlg":return"sm";case"xsm":case"2xsm":return"3xsm";case"sm":case"md":default:return"xsm"}});return(t,B)=>(e.openBlock(),e.createBlock(e.unref(m.AvatarRoot),{as:"div",class:e.normalizeClass([e.unref(C)(o.value),a.class])},{default:e.withCtx(()=>[!p.default&&!t.text?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.src?(e.openBlock(),e.createBlock(e.unref(m.AvatarImage),e.mergeProps({key:0},e.unref(v),{src:t.src,alt:t.alt,class:e.unref(s.getBemElement)(e.unref(n),"image")}),null,16,["src","alt","class"])):e.createCommentVNode("",!0),e.createVNode(e.unref(m.AvatarFallback),{class:e.normalizeClass(e.unref(s.getBemElement)(e.unref(n),"fallback"))},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"fallback",{},()=>[t.fallback?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(N._sfc_main),{key:0,icon:t.icon,size:u.value},null,8,["icon","size"])),e.createTextVNode(" "+e.toDisplayString(t.fallback),1)])]),_:3},8,["class"])],64)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(s.getBemElement)(e.unref(n),"image"))},[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)])],2)),t.online?(e.openBlock(),e.createBlock(G._sfc_main,{key:2,color:t.onlineColor,size:d.value,class:e.normalizeClass(e.unref(s.getBemElement)(e.unref(n),"online"))},null,8,["color","size","class"])):e.createCommentVNode("",!0)]),_:3},8,["class"]))}});exports.AvatarOnlineAlignments=h;exports.AvatarShapes=A;exports.AvatarSizes=_;exports.AvatarStrokes=k;exports._sfc_main=V;exports._sfc_main$1=w;exports.injectAvatarGroupContext=y;exports.provideAvatarGroupContext=S;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../Avatar.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../Avatar.vue_vue_type_style_index_0_lang-BFe4hxYW.js");exports.AvatarGroup=t._sfc_main$1;exports.injectAvatarGroupContext=t.injectAvatarGroupContext;exports.provideAvatarGroupContext=t.provideAvatarGroupContext;
|
package/dist/Badge/index.js
CHANGED
package/dist/Badge/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Badge.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Badge.vue_vue_type_script_setup_true_lang-DYK5srGm.js");exports.Badge=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as f, useAttrs as u, computed as
|
|
1
|
+
import { defineComponent as f, useAttrs as u, computed as c, createBlock as b, openBlock as d, mergeProps as y, createSlots as C, renderList as _, withCtx as B, renderSlot as O, normalizeProps as $, guardReactiveProps as j } from "vue";
|
|
2
2
|
import { o as k } from "./omit-CD3OjwFx.js";
|
|
3
|
-
import { B as a, a as n, _ as E } from "./BaseBadge.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import { B as a, a as n, _ as E } from "./BaseBadge.vue_vue_type_style_index_0_lang-BcdmTWX7.js";
|
|
4
4
|
import { g as h } from "./options-JBqnVZUl.js";
|
|
5
|
-
import {
|
|
5
|
+
import { getCssCoreColor as r } from "@pantograph/tokens";
|
|
6
6
|
const z = /* @__PURE__ */ f({
|
|
7
7
|
...h("Badge", !1),
|
|
8
8
|
__name: "Badge",
|
|
@@ -15,37 +15,45 @@ const z = /* @__PURE__ */ f({
|
|
|
15
15
|
color: {}
|
|
16
16
|
},
|
|
17
17
|
setup(p) {
|
|
18
|
-
const o = p, i = u(), m =
|
|
19
|
-
const t = [...n, ...a],
|
|
18
|
+
const o = p, i = u(), m = c(() => {
|
|
19
|
+
const t = [...n, ...a], l = {
|
|
20
20
|
...Object.fromEntries(n.map((e) => [e, r(`${e}-5`)])),
|
|
21
21
|
...Object.fromEntries(
|
|
22
|
-
a.map((e) => [
|
|
22
|
+
a.map((e) => [
|
|
23
|
+
e,
|
|
24
|
+
r(`${e.replace("-subtle", "")}-0`)
|
|
25
|
+
])
|
|
23
26
|
),
|
|
24
27
|
"gray-subtle": r("gray-1")
|
|
25
28
|
}, s = {
|
|
26
|
-
...Object.fromEntries(
|
|
29
|
+
...Object.fromEntries(
|
|
30
|
+
n.map((e) => [e, r("grayscale-light-0")])
|
|
31
|
+
),
|
|
27
32
|
yellow: r("grayscale-dark-0"),
|
|
28
33
|
...Object.fromEntries(
|
|
29
|
-
a.map((e) => [
|
|
34
|
+
a.map((e) => [
|
|
35
|
+
e,
|
|
36
|
+
r(`${e.replace("-subtle", "")}-5`)
|
|
37
|
+
])
|
|
30
38
|
),
|
|
31
39
|
"gray-subtle": r("gray-6")
|
|
32
40
|
};
|
|
33
41
|
return o.color && t.includes(o.color) ? {
|
|
34
|
-
bg:
|
|
42
|
+
bg: l[o.color],
|
|
35
43
|
fg: s[o.color]
|
|
36
44
|
} : {
|
|
37
45
|
bg: r("primary-5"),
|
|
38
46
|
fg: r("primary-oncolor")
|
|
39
47
|
};
|
|
40
|
-
}), g =
|
|
48
|
+
}), g = c(() => ({
|
|
41
49
|
...k(i, "type"),
|
|
42
50
|
...o,
|
|
43
51
|
...m.value
|
|
44
52
|
}));
|
|
45
|
-
return (t,
|
|
46
|
-
|
|
53
|
+
return (t, l) => (d(), b(E, y(g.value, { type: "pill" }), C({ _: 2 }, [
|
|
54
|
+
_(Object.keys(t.$slots), (s) => ({
|
|
47
55
|
name: s,
|
|
48
|
-
fn:
|
|
56
|
+
fn: B((e) => [
|
|
49
57
|
O(t.$slots, s, $(j(e)))
|
|
50
58
|
])
|
|
51
59
|
}))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),p=require("./omit-C4BrcXKG.js"),s=require("./BaseBadge.vue_vue_type_style_index_0_lang-Coak5m7J.js"),u=require("./options-B4iSAKol.js"),r=require("@pantograph/tokens"),m=e.defineComponent({...u.getComponentOptions("Badge",!1),__name:"Badge",props:{class:{},text:{},icon:{},flipOnDir:{},size:{},color:{}},setup(c){const t=c,g=e.useAttrs(),C=e.computed(()=>{const l=[...s.BadgeColors,...s.BadgeColorsSubtle],a={...Object.fromEntries(s.BadgeColors.map(o=>[o,r.getCssCoreColor(`${o}-5`)])),...Object.fromEntries(s.BadgeColorsSubtle.map(o=>[o,r.getCssCoreColor(`${o.replace("-subtle","")}-0`)])),"gray-subtle":r.getCssCoreColor("gray-1")},n={...Object.fromEntries(s.BadgeColors.map(o=>[o,r.getCssCoreColor("grayscale-light-0")])),yellow:r.getCssCoreColor("grayscale-dark-0"),...Object.fromEntries(s.BadgeColorsSubtle.map(o=>[o,r.getCssCoreColor(`${o.replace("-subtle","")}-5`)])),"gray-subtle":r.getCssCoreColor("gray-6")};return t.color&&l.includes(t.color)?{bg:a[t.color],fg:n[t.color]}:{bg:r.getCssCoreColor("primary-5"),fg:r.getCssCoreColor("primary-oncolor")}}),i=e.computed(()=>({...p.omit(g,"type"),...t,...C.value}));return(l,a)=>(e.openBlock(),e.createBlock(s._sfc_main,e.mergeProps(i.value,{type:"pill"}),e.createSlots({_:2},[e.renderList(Object.keys(l.$slots),n=>({name:n,fn:e.withCtx(o=>[e.renderSlot(l.$slots,n,e.normalizeProps(e.guardReactiveProps(o)))])}))]),1040))}});exports._sfc_main=m;
|
|
@@ -2,7 +2,7 @@ export declare const BadgeSizes: readonly ["2xsm", "xsm", "sm", "md", "tiny", "t
|
|
|
2
2
|
export type BadgeSize = (typeof BadgeSizes)[number];
|
|
3
3
|
export declare const BadgeTypes: readonly ["rect", "pill", "minify"];
|
|
4
4
|
export type BadgeType = (typeof BadgeTypes)[number];
|
|
5
|
-
export declare const BadgeColors: readonly ["primary", "red", "orange", "amber", "yellow", "lime", "green", "teal", "cyan", "sky", "blue", "ocean", "violet", "amethyst", "fuchsia", "pink", "gray"];
|
|
5
|
+
export declare const BadgeColors: readonly ["primary", "red", "orange", "amber", "yellow", "lime", "green", "teal", "cyan", "sky", "blue", "ocean", "violet", "amethyst", "fuchsia", "pink", "gray", "mallard"];
|
|
6
6
|
export type BadgeColor = (typeof BadgeColors)[number];
|
|
7
|
-
export declare const BadgeColorsSubtle: readonly ["primary-subtle", "red-subtle", "orange-subtle", "amber-subtle", "yellow-subtle", "lime-subtle", "green-subtle", "teal-subtle", "cyan-subtle", "sky-subtle", "blue-subtle", "ocean-subtle", "violet-subtle", "amethyst-subtle", "fuchsia-subtle", "pink-subtle", "gray-subtle"];
|
|
7
|
+
export declare const BadgeColorsSubtle: readonly ["primary-subtle", "red-subtle", "orange-subtle", "amber-subtle", "yellow-subtle", "lime-subtle", "green-subtle", "teal-subtle", "cyan-subtle", "sky-subtle", "blue-subtle", "ocean-subtle", "violet-subtle", "amethyst-subtle", "fuchsia-subtle", "pink-subtle", "gray-subtle", "mallard-subtle"];
|
|
8
8
|
export type BadgeColorSubtle = (typeof BadgeColorsSubtle)[number];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as _, useSlots as h, computed as i, createElementBlock as u, openBlock as o, normalizeStyle as S, normalizeClass as D, unref as r, createCommentVNode as m, Fragment as O, createBlock as w, renderSlot as p, withCtx as V, createTextVNode as $, toDisplayString as F } from "vue";
|
|
2
|
-
import { getBemBlock as I, generateVariantClassList as
|
|
2
|
+
import { getBemBlock as I, generateVariantClassList as n } from "@pantograph/utils";
|
|
3
3
|
import { cva as N } from "class-variance-authority";
|
|
4
4
|
import { g as T } from "./options-JBqnVZUl.js";
|
|
5
5
|
import "@iconify/vue";
|
|
@@ -22,7 +22,8 @@ const f = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], b = ["rect", "pill", "m
|
|
|
22
22
|
"amethyst",
|
|
23
23
|
"fuchsia",
|
|
24
24
|
"pink",
|
|
25
|
-
"gray"
|
|
25
|
+
"gray",
|
|
26
|
+
"mallard"
|
|
26
27
|
], Q = [
|
|
27
28
|
"primary-subtle",
|
|
28
29
|
"red-subtle",
|
|
@@ -40,7 +41,8 @@ const f = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], b = ["rect", "pill", "m
|
|
|
40
41
|
"amethyst-subtle",
|
|
41
42
|
"fuchsia-subtle",
|
|
42
43
|
"pink-subtle",
|
|
43
|
-
"gray-subtle"
|
|
44
|
+
"gray-subtle",
|
|
45
|
+
"mallard-subtle"
|
|
44
46
|
], R = /* @__PURE__ */ _({
|
|
45
47
|
...T("BaseBadge"),
|
|
46
48
|
__name: "BaseBadge",
|
|
@@ -56,13 +58,13 @@ const f = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], b = ["rect", "pill", "m
|
|
|
56
58
|
flipOnDir: {}
|
|
57
59
|
},
|
|
58
60
|
setup(d) {
|
|
59
|
-
const { getFlipOnDir: y } = L(), g = y("flipOnDir"),
|
|
61
|
+
const { getFlipOnDir: y } = L(), g = y("flipOnDir"), l = I("badge"), t = d, v = N(l, {
|
|
60
62
|
variants: {
|
|
61
|
-
size:
|
|
62
|
-
type:
|
|
63
|
-
text:
|
|
64
|
-
icon:
|
|
65
|
-
br:
|
|
63
|
+
size: n(f, l),
|
|
64
|
+
type: n(b, l),
|
|
65
|
+
text: n("text", l),
|
|
66
|
+
icon: n("icon", l),
|
|
67
|
+
br: n("br", l)
|
|
66
68
|
}
|
|
67
69
|
}), a = h(), s = i(() => b.includes(t.type) ? t.type : "pill"), B = i(() => !!(t.text || a.default)), x = i(() => !!(t.icon || a.icon)), c = i(() => {
|
|
68
70
|
let e = f.includes(t.size) ? t.size : "md";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),l=require("@pantograph/utils"),B=require("class-variance-authority"),C=require("./options-B4iSAKol.js");require("@iconify/vue");const _=require("./Icon.vue_vue_type_style_index_0_lang-C00M2fnO.js"),x=require("./index-fCdmNGB1.js"),r=["2xsm","xsm","sm","md","tiny","tinier"],o=["rect","pill","minify"],z=["primary","red","orange","amber","yellow","lime","green","teal","cyan","sky","blue","ocean","violet","amethyst","fuchsia","pink","gray","mallard"],k=["primary-subtle","red-subtle","orange-subtle","amber-subtle","yellow-subtle","lime-subtle","green-subtle","teal-subtle","cyan-subtle","sky-subtle","blue-subtle","ocean-subtle","violet-subtle","amethyst-subtle","fuchsia-subtle","pink-subtle","gray-subtle","mallard-subtle"],S=e.defineComponent({...C.getComponentOptions("BaseBadge"),__name:"BaseBadge",props:{size:{default:"md"},class:{},text:{},bg:{},fg:{},br:{},type:{default:"pill"},icon:{},flipOnDir:{}},setup(u){const{getFlipOnDir:m}=x.useConfig(),d=m("flipOnDir"),i=l.getBemBlock("badge"),s=u,p=B.cva(i,{variants:{size:l.generateVariantClassList(r,i),type:l.generateVariantClassList(o,i),text:l.generateVariantClassList("text",i),icon:l.generateVariantClassList("icon",i),br:l.generateVariantClassList("br",i)}}),a=e.useSlots(),n=e.computed(()=>o.includes(s.type)?s.type:"pill"),f=e.computed(()=>!!(s.text||a.default)),g=e.computed(()=>!!(s.icon||a.icon)),c=e.computed(()=>{let t=r.includes(s.size)?s.size:"md";return t==="sm"&&n.value!=="rect"?n.value==="minify"?t="tiny":n.value==="pill"&&(t="md"):n.value==="minify"&&!["tiny","tinier"].includes(t)?t="tiny":n.value!=="minify"&&["tiny","tinier"].includes(t)&&(t="md"),t}),y=e.computed(()=>{switch(c.value){case"sm":return"xsm";case"xsm":return"2xsm";case"2xsm":return"3xsm";case"md":default:return"sm"}}),b=e.computed(()=>({size:c.value,type:n.value,text:f.value,icon:g.value,br:!!s.br})),v=e.computed(()=>{const t=a.icon??s.icon;return s.type==="rect"&&(a.default||s.text)?!1:t});return(t,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(p)(b.value),s.class]),style:e.normalizeStyle({"--ptc-badge-fg":s.fg,"--ptc-badge-bg":s.bg,"--ptc-badge-br":s.br})},[n.value!=="minify"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[v.value?(e.openBlock(),e.createBlock(e.unref(_._sfc_main),{key:0,icon:t.icon,size:y.value,flipOnDir:e.unref(d)},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"icon")]),_:3},8,["icon","size","flipOnDir"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)])],64)):e.createCommentVNode("",!0)],6))}});exports.BadgeColors=z;exports.BadgeColorsSubtle=k;exports.BadgeSizes=r;exports.BadgeTypes=o;exports._sfc_main=S;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),m=require("./Icon.vue_vue_type_style_index_0_lang-C00M2fnO.js"),S=require("./Spinner.vue_vue_type_style_index_0_lang-CTjUx8rR.js"),x=require("./Badge.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";const e=require("vue"),m=require("./Icon.vue_vue_type_style_index_0_lang-C00M2fnO.js"),S=require("./Spinner.vue_vue_type_style_index_0_lang-CTjUx8rR.js"),x=require("./Badge.vue_vue_type_script_setup_true_lang-DYK5srGm.js"),s=require("./ButtonGroup.vue_vue_type_script_setup_true_lang-Dh51uD32.js"),a=require("@pantograph/utils"),h=require("class-variance-authority"),L=require("./options-B4iSAKol.js"),q=require("./index-fCdmNGB1.js"),B="2xsm",T=e.defineComponent({...L.getComponentOptions("BaseButton"),__name:"BaseButton",props:{class:{},text:{},size:{},color:{default:"primary"},type:{default:"fill"},variant:{},loading:{type:Boolean},action:{type:Boolean},active:{type:Boolean},badgeText:{},badgeIcon:{},icon:{},preIcon:{},postIcon:{},flipOnDir:{},preIconFlipOnDir:{},postIconFlipOnDir:{},badgeIconFlipOnDir:{}},setup(I,{expose:y}){const n=I,{getFlipOnDir:l}=q.useConfig(),_=l("flipOnDir"),z=l("preIconFlipOnDir"),C=l("postIconFlipOnDir"),b=l("badgeIconFlipOnDir"),o=a.getBemBlock("button"),k=h.cva(o,{variants:{size:a.generateVariantClassList(s.ButtonSizes,o),type:a.generateVariantClassList(s.ButtonTypes,o),color:a.generateVariantClassList(s.ButtonColors,o),variant:a.generateVariantClassList(s.ButtonVariants,o),action:a.generateVariantClassList("action",o),active:a.generateVariantClassList("active",o),text:a.generateVariantClassList("text",o),preIcon:a.generateVariantClassList("preIcon",o),postIcon:a.generateVariantClassList("postIcon",o),loading:a.generateVariantClassList("loading",o)}}),v=s.injectButtonGroupContext({size:e.computed(()=>n.size),variant:e.computed(()=>n.variant)}),c=e.computed(()=>n.variant??v.variant.value??"simple"),r=e.computed(()=>["icon","float"].includes(c.value)),i=e.useSlots(),D=e.computed(()=>{let t=s.ButtonTypes.includes(n.type)?n.type:"fill";const u=n.size??v.size.value,V=u&&s.ButtonSizes.includes(u)?u:"md";let p=n.color&&s.ButtonColors.includes(n.color)?n.color:"primary",d=c.value&&s.ButtonVariants.includes(c.value)?c.value:"simple";return n.action?(d==="float"&&(d="icon"),t==="fill"&&(t="outline"),p=void 0):d==="float"&&(t==="ghost"&&(t="fill"),["primary","gray"].includes(p)||(p="primary")),{size:V,type:t,color:p,variant:d,action:!!n.action,active:!!n.active,loading:!!n.loading,text:!r.value&&!!(n.text||i.default),preIcon:!r.value&&!!(n.preIcon||i.preIcon),postIcon:!r.value&&!!(n.postIcon||i.postIcon)}}),f=e.computed(()=>{switch(n.size){case"sm":return"3xsm";default:return"2xsm"}}),O=e.computed(()=>{switch(n.size){case"sm":return"3xsm";case"lg":return"xsm";case"md":default:return"2xsm"}}),g=e.ref();return y({focus(){var t;(t=g.value)==null||t.focus()},blur(){var t;(t=g.value)==null||t.blur()}}),(t,u)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass([e.unref(k)(D.value),n.class]),tabindex:"0",ref_key:"buttonRef",ref:g},[t.loading?(e.openBlock(),e.createBlock(S._sfc_main,{key:1,class:e.normalizeClass(e.unref(a.getBemElement)(e.unref(o),"loading")),size:f.value},null,8,["class","size"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(t.preIcon||i.preIcon)&&!r.value?(e.openBlock(),e.createBlock(m._sfc_main,{key:0,flipOnDir:e.unref(z),icon:t.preIcon,size:f.value},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"preIcon")]),_:3},8,["flipOnDir","icon","size"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(m._sfc_main,{key:1,icon:t.icon,size:O.value,flipOnDir:e.unref(_)},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"icon")]),_:3},8,["icon","size","flipOnDir"])):e.renderSlot(t.$slots,"default",{key:2},()=>[e.createTextVNode(e.toDisplayString(t.text),1)]),t.action&&t.active&&!r.value&&(t.badgeText||i.badgeText||t.badgeIcon||i.badgeIcon)?e.renderSlot(t.$slots,"badge",e.normalizeProps(e.mergeProps({key:3},{color:t.$attrs.disabled?"gray":"primary",size:B})),()=>[e.createVNode(x._sfc_main,{text:t.badgeText,icon:t.badgeIcon,flipOnDir:e.unref(b),color:t.$attrs.disabled?"gray":"primary",size:B},e.createSlots({_:2},[i.badgeText?{name:"default",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"badgeText")]),key:"0"}:void 0,i.badgeIcon?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"badgeIcon")]),key:"1"}:void 0]),1032,["text","icon","flipOnDir","color"])]):e.createCommentVNode("",!0),(t.postIcon||i.postIcon)&&!r.value?(e.openBlock(),e.createBlock(m._sfc_main,{key:4,flipOnDir:e.unref(C),icon:t.postIcon,size:f.value},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"postIcon")]),_:3},8,["flipOnDir","icon","size"])):e.createCommentVNode("",!0)],64))],2))}});exports._sfc_main=T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as A, computed as s, useSlots as G, ref as L, createElementBlock as D, openBlock as c, normalizeClass as O, unref as l, createBlock as v, Fragment as _, createCommentVNode as B, renderSlot as r, withCtx as p, createTextVNode as q, toDisplayString as H, normalizeProps as J, mergeProps as K, createVNode as M, createSlots as Q } from "vue";
|
|
2
2
|
import { _ as b } from "./Icon.vue_vue_type_style_index_0_lang-BlmMv3wD.js";
|
|
3
3
|
import { _ as U } from "./Spinner.vue_vue_type_style_index_0_lang-CBIZtgX4.js";
|
|
4
|
-
import { _ as W } from "./Badge.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as W } from "./Badge.vue_vue_type_script_setup_true_lang-Bad9nnGa.js";
|
|
5
5
|
import { B as k, b as $, a as C, c as F, i as X } from "./ButtonGroup.vue_vue_type_script_setup_true_lang-pokTDMXb.js";
|
|
6
6
|
import { getBemBlock as Y, generateVariantClassList as t, getBemElement as Z } from "@pantograph/utils";
|
|
7
7
|
import { cva as ee } from "class-variance-authority";
|
package/dist/Button/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Button.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Button.vue_vue_type_script_setup_true_lang-D6IZHvUZ.js");exports.Button=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as c, useAttrs as l, computed as m, ref as u, createBlock as f, openBlock as _, mergeProps as d, createSlots as b, renderList as g, withCtx as v, renderSlot as B, normalizeProps as k, guardReactiveProps as x } from "vue";
|
|
2
2
|
import { o as y } from "./omit-CD3OjwFx.js";
|
|
3
|
-
import { _ as I } from "./BaseButton.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import { _ as I } from "./BaseButton.vue_vue_type_style_index_0_lang-DXgQ3ris.js";
|
|
4
4
|
import { g as O } from "./options-JBqnVZUl.js";
|
|
5
5
|
const z = /* @__PURE__ */ c({
|
|
6
6
|
...O("Button", !1),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),p=require("./omit-C4BrcXKG.js"),l=require("./BaseButton.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";const e=require("vue"),p=require("./omit-C4BrcXKG.js"),l=require("./BaseButton.vue_vue_type_style_index_0_lang-4kmojL6W.js"),_=require("./options-B4iSAKol.js"),f=e.defineComponent({..._.getComponentOptions("Button",!1),__name:"Button",props:{class:{},type:{},color:{},loading:{type:Boolean},preIcon:{},postIcon:{},size:{},text:{},postIconFlipOnDir:{},preIconFlipOnDir:{}},setup(s,{expose:r}){const c=s,i=e.useAttrs(),a=e.computed(()=>({...p.omit(i,"variant","icon","action","active","badgeText"),...c})),o=e.ref();return r({focus(){var t;(t=o.value)==null||t.focus()},blur(){var t;(t=o.value)==null||t.blur()}}),(t,m)=>(e.openBlock(),e.createBlock(l._sfc_main,e.mergeProps(a.value,{variant:"simple",ref_key:"buttonRef",ref:o}),e.createSlots({_:2},[e.renderList(Object.keys(t.$slots),n=>({name:n,fn:e.withCtx(u=>[e.renderSlot(t.$slots,n,e.normalizeProps(e.guardReactiveProps(u)))])}))]),1040))}});exports._sfc_main=f;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export declare const CheckboxSizes: readonly ["2xsm", "xsm"];
|
|
2
2
|
export type CheckboxSize = (typeof CheckboxSizes)[number];
|
|
3
3
|
export declare const useColoredPantographCheckbox: (color: string) => {
|
|
4
|
-
'--ptc-checkbox-bg': string;
|
|
5
|
-
'--ptc-checkbox-bg-hover': string;
|
|
6
|
-
'--ptc-checkbox-bg-focus': string;
|
|
7
|
-
'--ptc-checkbox-br-focus': string;
|
|
8
|
-
'--ptc-checkbox-bg-active': string;
|
|
4
|
+
'--ptc-checkbox-bg': string | undefined;
|
|
5
|
+
'--ptc-checkbox-bg-hover': string | undefined;
|
|
6
|
+
'--ptc-checkbox-bg-focus': string | undefined;
|
|
7
|
+
'--ptc-checkbox-br-focus': string | undefined;
|
|
8
|
+
'--ptc-checkbox-bg-active': string | undefined;
|
|
9
9
|
};
|
|
10
10
|
export declare const useColoredPantographCheckboxGroup: (color: string) => {
|
|
11
|
-
'--ptc-group-checkbox-bg': string;
|
|
12
|
-
'--ptc-group-checkbox-bg-hover': string;
|
|
13
|
-
'--ptc-group-checkbox-bg-focus': string;
|
|
14
|
-
'--ptc-group-checkbox-br-focus': string;
|
|
15
|
-
'--ptc-group-checkbox-bg-active': string;
|
|
11
|
+
'--ptc-group-checkbox-bg': string | undefined;
|
|
12
|
+
'--ptc-group-checkbox-bg-hover': string | undefined;
|
|
13
|
+
'--ptc-group-checkbox-bg-focus': string | undefined;
|
|
14
|
+
'--ptc-group-checkbox-br-focus': string | undefined;
|
|
15
|
+
'--ptc-group-checkbox-bg-active': string | undefined;
|
|
16
16
|
};
|
package/dist/Checkbox/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as e, C as s, _ as r, u as C, a as h } from "../Checkbox.vue_vue_type_style_index_0_lang-
|
|
1
|
+
import { _ as e, C as s, _ as r, u as C, a as h } from "../Checkbox.vue_vue_type_style_index_0_lang-D6HTNzfn.js";
|
|
2
2
|
export {
|
|
3
3
|
e as Checkbox,
|
|
4
4
|
s as CheckboxSizes,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Checkbox.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Checkbox.vue_vue_type_style_index_0_lang-mD-mS-u3.js");exports.Checkbox=e._sfc_main;exports.CheckboxSizes=e.CheckboxSizes;exports.default=e._sfc_main;exports.useColoredPantographCheckbox=e.useColoredPantographCheckbox;exports.useColoredPantographCheckboxGroup=e.useColoredPantographCheckboxGroup;
|