@pantograph/vue 0.7.2 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionButton/index.js.js +1 -1
- package/dist/ActionButton/index.umd.cjs.js +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-Co1UzWfm.js → ActionButton.vue_vue_type_script_setup_true_lang-2X340gYi.js} +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-8rfrMrqQ.js → ActionButton.vue_vue_type_script_setup_true_lang-IN_Iar0s.js} +2 -2
- package/dist/Avatar/Avatar.d.ts +1 -1
- package/dist/Avatar/index.js.js +1 -1
- package/dist/Avatar/index.umd.cjs.js +1 -1
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-CqcW1fye.js → Avatar.vue_vue_type_style_index_0_lang-BVysdOnq.js} +2 -2
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-3Z2dCzsh.js → Avatar.vue_vue_type_style_index_0_lang-BiEWBKYn.js} +1 -1
- package/dist/AvatarGroup/index.js.js +1 -1
- package/dist/AvatarGroup/index.umd.cjs.js +1 -1
- package/dist/Badge/index.js.js +1 -1
- package/dist/Badge/index.umd.cjs.js +1 -1
- package/dist/{Badge.vue_vue_type_script_setup_true_lang-BvRVbeWS.js → Badge.vue_vue_type_script_setup_true_lang-CIkF44xM.js} +2 -2
- package/dist/{Badge.vue_vue_type_script_setup_true_lang-BYTVAQi7.js → Badge.vue_vue_type_script_setup_true_lang-D7hKm2YM.js} +1 -1
- package/dist/Base/BaseBadge/BaseBadge.d.ts +1 -5
- package/dist/Base/BaseBadge/BaseBadge.model.d.ts +2 -2
- package/dist/{BaseBadge.vue_vue_type_style_index_0_lang-DvaxWCOW.js → BaseBadge.vue_vue_type_style_index_0_lang-Bm8mav0C.js} +34 -30
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-OEeJw0Sy.js +1 -0
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-rkT_6hGT.js → BaseButton.vue_vue_type_style_index_0_lang-5rSLcXNk.js} +50 -50
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-r8E5BNEu.js → BaseButton.vue_vue_type_style_index_0_lang-CfBRZCKS.js} +1 -1
- package/dist/Button/index.js.js +1 -1
- package/dist/Button/index.umd.cjs.js +1 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang-687jBefr.js +1 -0
- package/dist/{Button.vue_vue_type_script_setup_true_lang-CGKvYm0U.js → Button.vue_vue_type_script_setup_true_lang-Pghn6KJY.js} +9 -9
- package/dist/Checkbox/index.js.js +1 -1
- package/dist/Checkbox/index.umd.cjs.js +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-BezXV-lY.js → Checkbox.vue_vue_type_style_index_0_lang-Bvk3KN2L.js} +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-BY73A9jA.js → Checkbox.vue_vue_type_style_index_0_lang-DPxsdfde.js} +2 -2
- package/dist/CheckboxGroup/index.js.js +1 -1
- package/dist/CheckboxGroup/index.umd.cjs.js +1 -1
- package/dist/ColorSwatch/ColorSwatch.model.d.ts +4 -0
- package/dist/ColorTrigger/ColorTrigger.model.d.ts +2 -0
- package/dist/ConfigProvider/index.js.js +4 -3
- package/dist/ConfigProvider/index.umd.cjs.js +1 -1
- package/dist/FloatButton/index.js.js +1 -1
- package/dist/FloatButton/index.umd.cjs.js +1 -1
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-D3kjXKT2.js → FloatButton.vue_vue_type_script_setup_true_lang-CQIk1UgJ.js} +1 -1
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-Bxz1zlC1.js → FloatButton.vue_vue_type_script_setup_true_lang-DNeMMm9j.js} +2 -2
- package/dist/GraphicalObject/GraphicalObject.d.ts +6 -5
- package/dist/GraphicalObject/GraphicalObject.model.d.ts +6 -0
- package/dist/GraphicalObject/index.js.js +1 -1
- package/dist/GraphicalObject/index.umd.cjs.js +1 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-8ZXdETpQ.js +1 -0
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-C2MQwiwk.js +59 -0
- package/dist/IconButton/index.js.js +1 -1
- package/dist/IconButton/index.umd.cjs.js +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-BSv6nOMZ.js → IconButton.vue_vue_type_script_setup_true_lang-BMbK9bu3.js} +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-6rgAId79.js → IconButton.vue_vue_type_script_setup_true_lang-BNuSFI1j.js} +2 -2
- package/dist/Image/index.js.js +1 -1
- package/dist/Image/index.umd.cjs.js +1 -1
- package/dist/{Image.vue_vue_type_style_index_0_lang-f4IzwLoA.js → Image.vue_vue_type_style_index_0_lang-Cku5hiNE.js} +1 -1
- package/dist/Image.vue_vue_type_style_index_0_lang-DbqKKOAs.js +1 -0
- package/dist/IndentLevel/index.js.js +1 -1
- package/dist/IndentLevel/index.umd.cjs.js +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-Uwg5ZCHM.js → IndentLevel.vue_vue_type_style_index_0_lang-Bs9k7yZP.js} +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-D2rB4cK6.js → IndentLevel.vue_vue_type_style_index_0_lang-C0p5Alem.js} +1 -1
- package/dist/Indicator/index.js.js +1 -1
- package/dist/Indicator/index.umd.cjs.js +1 -1
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-D0pF2bEY.js → Indicator.vue_vue_type_script_setup_true_lang-CHuo9sYF.js} +2 -2
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-D61Ub5JW.js → Indicator.vue_vue_type_script_setup_true_lang-DzKJMO-h.js} +1 -1
- package/dist/Menu/index.js.js +1 -1
- package/dist/Menu/index.umd.cjs.js +1 -1
- package/dist/Menu.vue_vue_type_style_index_0_lang-BJqJJOUC.js +1 -0
- package/dist/{Menu.vue_vue_type_style_index_0_lang-B3dPxftq.js → Menu.vue_vue_type_style_index_0_lang-CfK6q5lj.js} +20 -19
- package/dist/MenuItem/index.js.js +1 -1
- package/dist/MenuItem/index.umd.cjs.js +1 -1
- package/dist/Popover/index.js.js +1 -1
- package/dist/Popover/index.umd.cjs.js +1 -1
- package/dist/{Popover.vue_vue_type_style_index_0_lang-CMyqfhum.js → Popover.vue_vue_type_style_index_0_lang-MJjv8Cvt.js} +4 -4
- package/dist/Popover.vue_vue_type_style_index_0_lang-TwQPMDMD.js +1 -0
- package/dist/RadioGroup/index.js.js +1 -1
- package/dist/RadioGroup/index.umd.cjs.js +1 -1
- package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-CLCQycnR.js → RadioGroup.vue_vue_type_script_setup_true_lang-DWC7_LXA.js} +1 -1
- package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-CYjzOKgl.js → RadioGroup.vue_vue_type_script_setup_true_lang-c3UZIDsE.js} +1 -1
- package/dist/Switch/index.js.js +1 -1
- package/dist/Switch/index.umd.cjs.js +1 -1
- package/dist/{Switch.vue_vue_type_style_index_0_lang-DCrwOHDJ.js → Switch.vue_vue_type_style_index_0_lang-B4DpjGcF.js} +1 -1
- package/dist/{Switch.vue_vue_type_style_index_0_lang-C2cAawMN.js → Switch.vue_vue_type_style_index_0_lang-LcwRXYSm.js} +1 -1
- package/dist/Tree/Tree.d.ts +1 -1
- package/dist/Tree/Tree.model.d.ts +1 -0
- package/dist/Tree/index.js.js +1 -1
- package/dist/Tree/index.umd.cjs.js +1 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-Ds7jrgdN.js +1 -0
- package/dist/Tree.vue_vue_type_style_index_0_lang-WOtMzGCH.js +575 -0
- package/dist/{cloneDeep-v62P9_F-.js → cloneDeep-DIRSbAoF.js} +1 -1
- package/dist/cloneDeep-DgcRQUzH.js +1 -0
- package/dist/{index-DgVKQuPc.js → index-CRYvpN0O.js} +27 -25
- package/dist/index-JUGW3BX8.js +1 -0
- package/dist/index.js.js +18 -18
- package/dist/index.umd.cjs.js +1 -1
- package/dist/omit-CMPOmOGF.js +1 -0
- package/dist/{omit-Cxaoa8oo.js → omit-wqhC12f_.js} +24 -23
- package/dist/{pick-DojrVogK.js → pick-CQkYSNzp.js} +1 -1
- package/dist/{pick-DKW6-a-5.js → pick-DYQvkbv7.js} +1 -1
- package/dist/style/index.css +1 -1
- package/package.json +1 -1
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-PPTugZ8e.js +0 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang-C5n0-Qgh.js +0 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-1IrOA4D_.js +0 -58
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-D07Fj6uI.js +0 -1
- package/dist/Image.vue_vue_type_style_index_0_lang-C1KxnvZB.js +0 -1
- package/dist/Menu.vue_vue_type_style_index_0_lang-BbydkTMQ.js +0 -1
- package/dist/Popover.vue_vue_type_style_index_0_lang-CQAcDtV-.js +0 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-BN2IKgT7.js +0 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-hDdrQ_8K.js +0 -574
- package/dist/cloneDeep-mcJFBKk6.js +0 -1
- package/dist/index-BCJFpT7y.js +0 -1
- package/dist/omit-1sFJ_mId.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-2X340gYi.js");exports.ActionButton=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),p=require("./omit-
|
|
1
|
+
"use strict";const e=require("vue"),p=require("./omit-CMPOmOGF.js"),l=require("./BaseButton.vue_vue_type_style_index_0_lang-CfBRZCKS.js"),_=require("./options-B4iSAKol.js"),f=e.defineComponent({..._.getComponentOptions("ActionButton",!1),__name:"ActionButton",props:{as:{},class:{},preIcon:{},postIcon:{},size:{},text:{},icon:{},active:{type:Boolean},badgeText:{},badgeIcon:{},type:{},variant:{}},setup(s,{expose:r}){const c=s,a=e.useAttrs(),i=e.computed(()=>({...p.omit(a,"variant","loading","color"),...c})),o=e.ref();return r({focus(){var t;(t=o.value)==null||t.focus()},blur(){var t;(t=o.value)==null||t.blur()}}),(t,m)=>(e.openBlock(),e.createBlock(l._sfc_main,e.mergeProps(i.value,{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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as p, useAttrs as m, computed as u, ref as f, createBlock as l, 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
|
-
import { o as y } from "./omit-
|
|
3
|
-
import { _ as A } from "./BaseButton.vue_vue_type_style_index_0_lang-
|
|
2
|
+
import { o as y } from "./omit-wqhC12f_.js";
|
|
3
|
+
import { _ as A } from "./BaseButton.vue_vue_type_style_index_0_lang-5rSLcXNk.js";
|
|
4
4
|
import { g as C } from "./options-JBqnVZUl.js";
|
|
5
5
|
const z = /* @__PURE__ */ p({
|
|
6
6
|
...C("ActionButton", !1),
|
package/dist/Avatar/Avatar.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Av
|
|
|
30
30
|
icon: string;
|
|
31
31
|
shape: "circle" | "rect" | "square";
|
|
32
32
|
src: string;
|
|
33
|
-
onlineColor: "primary" | "
|
|
33
|
+
onlineColor: "primary" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "teal" | "cyan" | "sky" | "blue" | "ocean" | "violet" | "amethyst" | "fuchsia" | "pink" | "gray";
|
|
34
34
|
onlineAlignment: "start" | "end";
|
|
35
35
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, Readonly<AvatarSlots> & AvatarSlots>;
|
|
36
36
|
export default _default;
|
package/dist/Avatar/index.js.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-BVysdOnq.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-BiEWBKYn.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;
|
|
@@ -3,10 +3,10 @@ import { createContext as H, Primitive as G, useEmitAsProps as J, AvatarRoot as
|
|
|
3
3
|
import { b as f, a as d, g as j } from "./class-DziTeW9B.js";
|
|
4
4
|
import { cva as q } from "class-variance-authority";
|
|
5
5
|
import { g as D } from "./options-JBqnVZUl.js";
|
|
6
|
-
import { _ as W } from "./Popover.vue_vue_type_style_index_0_lang-
|
|
6
|
+
import { _ as W } from "./Popover.vue_vue_type_style_index_0_lang-MJjv8Cvt.js";
|
|
7
7
|
import "@iconify/vue";
|
|
8
8
|
import { _ as X } from "./Icon.vue_vue_type_style_index_0_lang-BfPcw6PU.js";
|
|
9
|
-
import { _ as Y } from "./Indicator.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { _ as Y } from "./Indicator.vue_vue_type_script_setup_true_lang-CHuo9sYF.js";
|
|
10
10
|
const [Z, ee] = H("AvatarGroup"), me = /* @__PURE__ */ F({
|
|
11
11
|
...D("AvatarGroup"),
|
|
12
12
|
__name: "AvatarGroup",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),i=require("radix-vue"),s=require("./class-CjZYGZDW.js"),z=require("class-variance-authority"),x=require("./options-B4iSAKol.js"),E=require("./Popover.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";const e=require("vue"),i=require("radix-vue"),s=require("./class-CjZYGZDW.js"),z=require("class-variance-authority"),x=require("./options-B4iSAKol.js"),E=require("./Popover.vue_vue_type_style_index_0_lang-TwQPMDMD.js");require("@iconify/vue");const N=require("./Icon.vue_vue_type_style_index_0_lang-BvHCdzZP.js"),P=require("./Indicator.vue_vue_type_script_setup_true_lang-DzKJMO-h.js"),[y,S]=i.createContext("AvatarGroup"),G=e.defineComponent({...x.getComponentOptions("AvatarGroup"),__name:"AvatarGroup",props:{as:{default:"div"},class:{},gutter:{type:Boolean},size:{},shape:{},popoverClass:{},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})),u=()=>{const o=p.default?p.default():[];return l.value>1&&o.length>l.value?[...o.filter((d,m)=>m<l.value-1),e.h(E._sfc_main,{},{default:e.h(V,{text:`+${o.length-l.value+1}`}),content:e.h(i.Primitive,{class:[c.value,r.class],as:r.as},{default:()=>o.filter((d,m)=>m>=l.value-1)})})]:o};return(o,d)=>(e.openBlock(),e.createBlock(e.unref(i.Primitive),{as:o.as,class:e.normalizeClass([c.value,r.class])},{default:e.withCtx(()=>[e.createVNode(u,{maxCount:o.maxCount},null,8,["maxCount"])]),_:1},8,["as","class"]))}}),_=["2xsm","xsm","sm","md","lg","2xlg"],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"},as:{},referrerPolicy:{},delayMs:{}},emits:["loadingStatusChange"],setup(f,{emit:r}){const p=e.useSlots(),n=s.getBemBlock("avatar"),a=f,g=r,v=i.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),u=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=u.value&&A.includes(u.value)?u.value:"circle",b=h[a.onlineAlignment]?a.onlineAlignment:"start";return{size:t,stroke:B,shape:q,onlineAlignment:b}}),d=e.computed(()=>{switch(c.value){case"lg":case"2xlg":return"tiny";default:return"tinier"}}),m=e.computed(()=>{switch(c.value){case"lg":case"2xlg":return"sm";case"xsm":case"2xsm":return"3xsm";case"sm":case"md":default:return"xsm"}});return(t,B)=>(e.openBlock(),e.createBlock(e.unref(i.AvatarRoot),{as:t.as,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(i.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(i.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:m.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(P._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,["as","class"]))}});exports.AvatarOnlineAlignments=h;exports.AvatarShapes=A;exports.AvatarSizes=_;exports.AvatarStrokes=k;exports._sfc_main=V;exports._sfc_main$1=G;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-BiEWBKYn.js");exports.AvatarGroup=t._sfc_main$1;exports.injectAvatarGroupContext=t.injectAvatarGroupContext;exports.provideAvatarGroupContext=t.provideAvatarGroupContext;
|
package/dist/Badge/index.js.js
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-D7hKm2YM.js");exports.Badge=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as f, useAttrs as u, computed as l, createBlock as b, openBlock as d, mergeProps as y, createSlots as _, renderList as C, withCtx as B, renderSlot as O, normalizeProps as $, guardReactiveProps as j } from "vue";
|
|
2
|
-
import { o as k } from "./omit-
|
|
3
|
-
import { c as a, b as n, _ as E } from "./BaseBadge.vue_vue_type_style_index_0_lang-
|
|
2
|
+
import { o as k } from "./omit-wqhC12f_.js";
|
|
3
|
+
import { c as a, b as n, _ as E } from "./BaseBadge.vue_vue_type_style_index_0_lang-Bm8mav0C.js";
|
|
4
4
|
import { g as h } from "./options-JBqnVZUl.js";
|
|
5
5
|
import { getCssVar as r } from "@pantograph/tokens";
|
|
6
6
|
const z = /* @__PURE__ */ f({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),u=require("./omit-
|
|
1
|
+
"use strict";const e=require("vue"),u=require("./omit-CMPOmOGF.js"),t=require("./BaseBadge.vue_vue_type_style_index_0_lang-OEeJw0Sy.js"),m=require("./options-B4iSAKol.js"),r=require("@pantograph/tokens"),d=e.defineComponent({...m.getComponentOptions("Badge",!1),__name:"Badge",props:{as:{},class:{},text:{},icon:{},size:{},color:{}},setup(l){const o=l,g=e.useAttrs(),i=e.computed(()=>{const a=[...t.BadgeColors,...t.BadgeColorsSubtle],c={...Object.fromEntries(t.BadgeColors.map(s=>[s,r.getCssVar(`${s}-5`)])),...Object.fromEntries(t.BadgeColorsSubtle.map(s=>[s,r.getCssVar(`${s.replace("-subtle","")}-0`)])),"gray-subtle":r.getCssVar("gray-1")},n={...Object.fromEntries(t.BadgeColors.map(s=>[s,r.getCssVar("grayscale-light-0")])),yellow:r.getCssVar("grayscale-dark-0"),...Object.fromEntries(t.BadgeColorsSubtle.map(s=>[s,r.getCssVar(`${s.replace("-subtle","")}-5`)])),"gray-subtle":r.getCssVar("gray-6")};return o.color&&a.includes(o.color)?{bg:c[o.color],fg:n[o.color]}:{bg:r.getCssVar("primary-5"),fg:r.getCssVar("primary-oncolor")}}),p=e.computed(()=>({...u.omit(g,"type"),...o,...i.value}));return(a,c)=>(e.openBlock(),e.createBlock(t._sfc_main,e.mergeProps(p.value,{type:"pill"}),e.createSlots({_:2},[e.renderList(Object.keys(a.$slots),n=>({name:n,fn:e.withCtx(s=>[e.renderSlot(a.$slots,n,e.normalizeProps(e.guardReactiveProps(s)))])}))]),1040))}});exports._sfc_main=d;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PrimitiveProps } from 'radix-vue';
|
|
2
2
|
import { Class } from '../../types';
|
|
3
3
|
import { BadgeColor, BadgeColorSubtle, BadgeSize, BadgeType } from './BaseBadge.model';
|
|
4
|
-
import { IconSize } from '../../Icon';
|
|
5
4
|
export interface BaseBadgeProps extends Omit<PrimitiveProps, 'asChild'> {
|
|
6
5
|
size?: BadgeSize;
|
|
7
6
|
class?: Class;
|
|
@@ -14,10 +13,7 @@ export interface BaseBadgeProps extends Omit<PrimitiveProps, 'asChild'> {
|
|
|
14
13
|
}
|
|
15
14
|
export interface BaseBadgeSlots {
|
|
16
15
|
default?: () => never;
|
|
17
|
-
icon?: (
|
|
18
|
-
icon: string;
|
|
19
|
-
size: IconSize;
|
|
20
|
-
}) => never;
|
|
16
|
+
icon?: () => never;
|
|
21
17
|
}
|
|
22
18
|
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<BaseBadgeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BaseBadgeProps> & Readonly<{}>, {
|
|
23
19
|
size: "2xsm" | "xsm" | "sm" | "md" | "tiny" | "tinier";
|
|
@@ -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", "
|
|
5
|
+
export declare const BadgeColors: readonly ["primary", "red", "orange", "amber", "yellow", "lime", "green", "teal", "cyan", "sky", "blue", "ocean", "violet", "amethyst", "fuchsia", "pink", "gray"];
|
|
6
6
|
export type BadgeColor = (typeof BadgeColors)[number];
|
|
7
|
-
export declare const BadgeColorsSubtle: readonly ["primary-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"];
|
|
8
8
|
export type BadgeColorSubtle = (typeof BadgeColorsSubtle)[number];
|
|
@@ -1,42 +1,46 @@
|
|
|
1
|
-
import { defineComponent as _, useSlots as C, computed as a, createBlock as u, openBlock as o, unref as r, normalizeStyle as
|
|
1
|
+
import { defineComponent as _, useSlots as C, computed as a, createBlock as u, openBlock as o, unref as r, normalizeStyle as h, normalizeClass as S, withCtx as m, createElementBlock as w, createCommentVNode as p, Fragment as V, renderSlot as f, createTextVNode as $, toDisplayString as I } from "vue";
|
|
2
2
|
import { Primitive as N } from "radix-vue";
|
|
3
|
-
import { g as P, a as
|
|
3
|
+
import { g as P, a as i } from "./class-DziTeW9B.js";
|
|
4
4
|
import { cva as T } from "class-variance-authority";
|
|
5
5
|
import { g as D } from "./options-JBqnVZUl.js";
|
|
6
6
|
import "@iconify/vue";
|
|
7
7
|
import { _ as E } from "./Icon.vue_vue_type_style_index_0_lang-BfPcw6PU.js";
|
|
8
|
-
const
|
|
8
|
+
const b = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], d = ["rect", "pill", "minify"], J = [
|
|
9
9
|
"primary",
|
|
10
|
-
"blue",
|
|
11
10
|
"red",
|
|
12
11
|
"orange",
|
|
12
|
+
"amber",
|
|
13
13
|
"yellow",
|
|
14
14
|
"lime",
|
|
15
|
-
"violet",
|
|
16
|
-
"gray",
|
|
17
|
-
"teal",
|
|
18
15
|
"green",
|
|
19
|
-
"
|
|
16
|
+
"teal",
|
|
20
17
|
"cyan",
|
|
18
|
+
"sky",
|
|
19
|
+
"blue",
|
|
20
|
+
"ocean",
|
|
21
|
+
"violet",
|
|
22
|
+
"amethyst",
|
|
23
|
+
"fuchsia",
|
|
21
24
|
"pink",
|
|
22
|
-
"
|
|
23
|
-
"fuchsia"
|
|
25
|
+
"gray"
|
|
24
26
|
], K = [
|
|
25
27
|
"primary-subtle",
|
|
26
|
-
"blue-subtle",
|
|
27
28
|
"red-subtle",
|
|
28
29
|
"orange-subtle",
|
|
30
|
+
"amber-subtle",
|
|
29
31
|
"yellow-subtle",
|
|
30
32
|
"lime-subtle",
|
|
31
|
-
"violet-subtle",
|
|
32
|
-
"gray-subtle",
|
|
33
|
-
"teal-subtle",
|
|
34
33
|
"green-subtle",
|
|
35
|
-
"
|
|
34
|
+
"teal-subtle",
|
|
36
35
|
"cyan-subtle",
|
|
36
|
+
"sky-subtle",
|
|
37
|
+
"blue-subtle",
|
|
38
|
+
"ocean-subtle",
|
|
39
|
+
"violet-subtle",
|
|
40
|
+
"amethyst-subtle",
|
|
41
|
+
"fuchsia-subtle",
|
|
37
42
|
"pink-subtle",
|
|
38
|
-
"
|
|
39
|
-
"fuchsia-subtle"
|
|
43
|
+
"gray-subtle"
|
|
40
44
|
], M = /* @__PURE__ */ _({
|
|
41
45
|
...D("BaseBadge"),
|
|
42
46
|
__name: "BaseBadge",
|
|
@@ -52,16 +56,16 @@ const d = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], b = ["rect", "pill", "m
|
|
|
52
56
|
as: { default: "div" }
|
|
53
57
|
},
|
|
54
58
|
setup(y) {
|
|
55
|
-
const
|
|
59
|
+
const l = P("badge"), t = y, g = T(l, {
|
|
56
60
|
variants: {
|
|
57
|
-
size:
|
|
58
|
-
type:
|
|
59
|
-
text:
|
|
60
|
-
icon:
|
|
61
|
-
br:
|
|
61
|
+
size: i(b, l),
|
|
62
|
+
type: i(d, l),
|
|
63
|
+
text: i("text", l),
|
|
64
|
+
icon: i("icon", l),
|
|
65
|
+
br: i("br", l)
|
|
62
66
|
}
|
|
63
|
-
}), n = C(), s = a(() =>
|
|
64
|
-
let e =
|
|
67
|
+
}), n = C(), s = a(() => d.includes(t.type) ? t.type : "pill"), v = a(() => !!(t.text || n.default)), B = a(() => !!(t.icon || n.icon)), c = a(() => {
|
|
68
|
+
let e = b.includes(t.size) ? t.size : "md";
|
|
65
69
|
return e === "sm" && s.value !== "rect" ? s.value === "minify" ? e = "tiny" : s.value === "pill" && (e = "md") : s.value === "minify" && !["tiny", "tinier"].includes(e) ? e = "tiny" : s.value !== "minify" && ["tiny", "tinier"].includes(e) && (e = "md"), e;
|
|
66
70
|
}), x = a(() => {
|
|
67
71
|
switch (c.value) {
|
|
@@ -83,13 +87,13 @@ const d = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], b = ["rect", "pill", "m
|
|
|
83
87
|
icon: B.value,
|
|
84
88
|
br: !!t.br
|
|
85
89
|
})), k = a(() => {
|
|
86
|
-
const e =
|
|
90
|
+
const e = n.icon ?? t.icon;
|
|
87
91
|
return t.type === "rect" && (n.default || t.text) ? !1 : e;
|
|
88
92
|
});
|
|
89
93
|
return (e, F) => (o(), u(r(N), {
|
|
90
94
|
as: e.as,
|
|
91
|
-
class:
|
|
92
|
-
style:
|
|
95
|
+
class: S([r(g)(z.value), t.class]),
|
|
96
|
+
style: h({
|
|
93
97
|
"--ptc-badge-fg": t.fg,
|
|
94
98
|
"--ptc-badge-bg": t.bg,
|
|
95
99
|
"--ptc-badge-br": t.br
|
|
@@ -117,9 +121,9 @@ const d = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], b = ["rect", "pill", "m
|
|
|
117
121
|
}
|
|
118
122
|
});
|
|
119
123
|
export {
|
|
120
|
-
|
|
124
|
+
b as B,
|
|
121
125
|
M as _,
|
|
122
|
-
|
|
126
|
+
d as a,
|
|
123
127
|
J as b,
|
|
124
128
|
K as c
|
|
125
129
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),f=require("radix-vue"),i=require("./class-CjZYGZDW.js"),v=require("class-variance-authority"),B=require("./options-B4iSAKol.js");require("@iconify/vue");const _=require("./Icon.vue_vue_type_style_index_0_lang-BvHCdzZP.js"),r=["2xsm","xsm","sm","md","tiny","tinier"],o=["rect","pill","minify"],x=["primary","red","orange","amber","yellow","lime","green","teal","cyan","sky","blue","ocean","violet","amethyst","fuchsia","pink","gray"],C=["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"],z=e.defineComponent({...B.getComponentOptions("BaseBadge"),__name:"BaseBadge",props:{size:{default:"md"},class:{},text:{},bg:{},fg:{},br:{},type:{default:"pill"},icon:{},as:{default:"div"}},setup(u){const n=i.getBemBlock("badge"),s=u,m=v.cva(n,{variants:{size:i.generateVariantClassList(r,n),type:i.generateVariantClassList(o,n),text:i.generateVariantClassList("text",n),icon:i.generateVariantClassList("icon",n),br:i.generateVariantClassList("br",n)}}),l=e.useSlots(),a=e.computed(()=>o.includes(s.type)?s.type:"pill"),d=e.computed(()=>!!(s.text||l.default)),p=e.computed(()=>!!(s.icon||l.icon)),c=e.computed(()=>{let t=r.includes(s.size)?s.size:"md";return t==="sm"&&a.value!=="rect"?a.value==="minify"?t="tiny":a.value==="pill"&&(t="md"):a.value==="minify"&&!["tiny","tinier"].includes(t)?t="tiny":a.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:a.value,text:d.value,icon:p.value,br:!!s.br})),g=e.computed(()=>{const t=l.icon??s.icon;return s.type==="rect"&&(l.default||s.text)?!1:t});return(t,k)=>(e.openBlock(),e.createBlock(e.unref(f.Primitive),{as:t.as,class:e.normalizeClass([e.unref(m)(b.value),s.class]),style:e.normalizeStyle({"--ptc-badge-fg":s.fg,"--ptc-badge-bg":s.bg,"--ptc-badge-br":s.br})},{default:e.withCtx(()=>[a.value!=="minify"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g.value?(e.openBlock(),e.createBlock(e.unref(_._sfc_main),{key:0,icon:t.icon,size:y.value},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"icon")]),_:3},8,["icon","size"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)])],64)):e.createCommentVNode("",!0)]),_:3},8,["as","class","style"]))}});exports.BadgeColors=x;exports.BadgeColorsSubtle=C;exports.BadgeSizes=r;exports.BadgeTypes=o;exports._sfc_main=z;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as E, computed as i, useSlots as
|
|
2
|
-
import { Primitive as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { i as
|
|
7
|
-
import { g as
|
|
8
|
-
import { cva as
|
|
9
|
-
import { g as
|
|
10
|
-
const
|
|
11
|
-
...
|
|
1
|
+
import { defineComponent as E, computed as i, useSlots as R, ref as j, createBlock as u, openBlock as r, unref as v, normalizeClass as B, withCtx as c, createElementBlock as A, Fragment as D, createCommentVNode as y, renderSlot as l, createTextVNode as F, toDisplayString as G, normalizeProps as L, mergeProps as O, createVNode as _ } from "vue";
|
|
2
|
+
import { Primitive as q } from "radix-vue";
|
|
3
|
+
import { _ as z } from "./Icon.vue_vue_type_style_index_0_lang-BfPcw6PU.js";
|
|
4
|
+
import { _ as H } from "./Spinner.vue_vue_type_style_index_0_lang-D6nB06Z8.js";
|
|
5
|
+
import { _ as J } from "./Badge.vue_vue_type_script_setup_true_lang-CIkF44xM.js";
|
|
6
|
+
import { i as K, a as k, c as $, b as C, B as S } from "./ButtonGroup.vue_vue_type_script_setup_true_lang-CdSgBboA.js";
|
|
7
|
+
import { g as M, a, b as Q } from "./class-DziTeW9B.js";
|
|
8
|
+
import { cva as U } from "class-variance-authority";
|
|
9
|
+
import { g as W } from "./options-JBqnVZUl.js";
|
|
10
|
+
const T = "2xsm", ie = /* @__PURE__ */ E({
|
|
11
|
+
...W("BaseButton"),
|
|
12
12
|
__name: "BaseButton",
|
|
13
13
|
props: {
|
|
14
14
|
class: {},
|
|
@@ -27,13 +27,13 @@ const x = "2xsm", re = /* @__PURE__ */ E({
|
|
|
27
27
|
postIcon: {},
|
|
28
28
|
as: { default: "button" }
|
|
29
29
|
},
|
|
30
|
-
setup(
|
|
31
|
-
const o =
|
|
30
|
+
setup(h, { expose: x }) {
|
|
31
|
+
const o = h, t = M("button"), V = U(t, {
|
|
32
32
|
variants: {
|
|
33
|
-
size: a(
|
|
34
|
-
type: a(
|
|
35
|
-
color: a(
|
|
36
|
-
variant: a(
|
|
33
|
+
size: a($, t),
|
|
34
|
+
type: a(k, t),
|
|
35
|
+
color: a(C, t),
|
|
36
|
+
variant: a(S, t),
|
|
37
37
|
action: a("action", t),
|
|
38
38
|
active: a("active", t),
|
|
39
39
|
text: a("text", t),
|
|
@@ -41,15 +41,15 @@ const x = "2xsm", re = /* @__PURE__ */ E({
|
|
|
41
41
|
postIcon: a("postIcon", t),
|
|
42
42
|
loading: a("loading", t)
|
|
43
43
|
}
|
|
44
|
-
}),
|
|
44
|
+
}), b = K({
|
|
45
45
|
size: i(() => o.size),
|
|
46
46
|
variant: i(() => o.variant)
|
|
47
|
-
}), p = i(() => o.variant ??
|
|
48
|
-
let e =
|
|
49
|
-
const m = o.size ??
|
|
50
|
-
let d = o.color &&
|
|
47
|
+
}), p = i(() => o.variant ?? b.variant.value ?? "simple"), s = i(() => ["icon", "float"].includes(p.value)), n = R(), P = i(() => {
|
|
48
|
+
let e = k.includes(o.type) ? o.type : "fill";
|
|
49
|
+
const m = o.size ?? b.size.value, N = m && $.includes(m) ? m : "md";
|
|
50
|
+
let d = o.color && C.includes(o.color) ? o.color : "primary", f = p.value && S.includes(p.value) ? p.value : "simple";
|
|
51
51
|
return o.action ? (f === "float" && (f = "icon"), e === "fill" && (e = "outline"), d = void 0) : f === "float" && (e === "ghost" && (e = "fill"), ["primary", "gray"].includes(d) || (d = "primary")), {
|
|
52
|
-
size:
|
|
52
|
+
size: N,
|
|
53
53
|
type: e,
|
|
54
54
|
color: d,
|
|
55
55
|
variant: f,
|
|
@@ -67,7 +67,7 @@ const x = "2xsm", re = /* @__PURE__ */ E({
|
|
|
67
67
|
default:
|
|
68
68
|
return "2xsm";
|
|
69
69
|
}
|
|
70
|
-
}),
|
|
70
|
+
}), w = i(() => {
|
|
71
71
|
switch (o.size) {
|
|
72
72
|
case "sm":
|
|
73
73
|
return "3xsm";
|
|
@@ -77,8 +77,8 @@ const x = "2xsm", re = /* @__PURE__ */ E({
|
|
|
77
77
|
default:
|
|
78
78
|
return "2xsm";
|
|
79
79
|
}
|
|
80
|
-
}), I =
|
|
81
|
-
return
|
|
80
|
+
}), I = j();
|
|
81
|
+
return x({
|
|
82
82
|
focus() {
|
|
83
83
|
var e;
|
|
84
84
|
(e = I.value) == null || e.focus();
|
|
@@ -87,67 +87,67 @@ const x = "2xsm", re = /* @__PURE__ */ E({
|
|
|
87
87
|
var e;
|
|
88
88
|
(e = I.value) == null || e.blur();
|
|
89
89
|
}
|
|
90
|
-
}), (e, m) => (
|
|
90
|
+
}), (e, m) => (r(), u(v(q), {
|
|
91
91
|
as: e.as,
|
|
92
|
-
class:
|
|
92
|
+
class: B([v(V)(P.value), o.class]),
|
|
93
93
|
tabindex: "0",
|
|
94
94
|
ref_key: "buttonRef",
|
|
95
95
|
ref: I
|
|
96
96
|
}, {
|
|
97
97
|
default: c(() => [
|
|
98
|
-
e.loading ? (
|
|
98
|
+
e.loading ? (r(), u(H, {
|
|
99
99
|
key: 1,
|
|
100
|
-
class:
|
|
100
|
+
class: B(v(Q)(v(t), "loading")),
|
|
101
101
|
size: g.value
|
|
102
|
-
}, null, 8, ["class", "size"])) : (
|
|
103
|
-
(e.preIcon || n.preIcon) && !s.value ? (
|
|
102
|
+
}, null, 8, ["class", "size"])) : (r(), A(D, { key: 0 }, [
|
|
103
|
+
(e.preIcon || n.preIcon) && !s.value ? (r(), u(z, {
|
|
104
104
|
key: 0,
|
|
105
105
|
icon: e.preIcon,
|
|
106
106
|
size: g.value
|
|
107
107
|
}, {
|
|
108
108
|
default: c(() => [
|
|
109
|
-
|
|
109
|
+
l(e.$slots, "preIcon")
|
|
110
110
|
]),
|
|
111
111
|
_: 3
|
|
112
|
-
}, 8, ["icon", "size"])) :
|
|
113
|
-
s.value ? (
|
|
112
|
+
}, 8, ["icon", "size"])) : y("", !0),
|
|
113
|
+
s.value ? (r(), u(z, {
|
|
114
114
|
key: 1,
|
|
115
115
|
icon: e.icon,
|
|
116
|
-
size:
|
|
116
|
+
size: w.value
|
|
117
117
|
}, {
|
|
118
118
|
default: c(() => [
|
|
119
|
-
|
|
119
|
+
l(e.$slots, "icon")
|
|
120
120
|
]),
|
|
121
121
|
_: 3
|
|
122
|
-
}, 8, ["icon", "size"])) :
|
|
123
|
-
G(
|
|
122
|
+
}, 8, ["icon", "size"])) : l(e.$slots, "default", { key: 2 }, () => [
|
|
123
|
+
F(G(e.text), 1)
|
|
124
124
|
]),
|
|
125
|
-
e.action && e.active && !s.value && (e.badgeText || n.badgeText || e.badgeIcon || n.badgeIcon) ?
|
|
126
|
-
_(
|
|
125
|
+
e.action && e.active && !s.value && (e.badgeText || n.badgeText || e.badgeIcon || n.badgeIcon) ? l(e.$slots, "badge", L(O({ key: 3 }, { color: e.$attrs.disabled ? "gray" : "primary", size: T })), () => [
|
|
126
|
+
_(J, {
|
|
127
127
|
text: e.badgeText,
|
|
128
128
|
icon: e.badgeIcon,
|
|
129
129
|
color: e.$attrs.disabled ? "gray" : "primary",
|
|
130
|
-
size:
|
|
130
|
+
size: T
|
|
131
131
|
}, {
|
|
132
132
|
default: c(() => [
|
|
133
|
-
|
|
133
|
+
l(e.$slots, "badgeText")
|
|
134
134
|
]),
|
|
135
|
-
icon: c((
|
|
136
|
-
|
|
135
|
+
icon: c(() => [
|
|
136
|
+
l(e.$slots, "badgeIcon")
|
|
137
137
|
]),
|
|
138
138
|
_: 3
|
|
139
139
|
}, 8, ["text", "icon", "color"])
|
|
140
|
-
]) :
|
|
141
|
-
(e.postIcon || n.postIcon) && !s.value ? (
|
|
140
|
+
]) : y("", !0),
|
|
141
|
+
(e.postIcon || n.postIcon) && !s.value ? (r(), u(z, {
|
|
142
142
|
key: 4,
|
|
143
143
|
icon: e.postIcon,
|
|
144
144
|
size: g.value
|
|
145
145
|
}, {
|
|
146
146
|
default: c(() => [
|
|
147
|
-
|
|
147
|
+
l(e.$slots, "postIcon")
|
|
148
148
|
]),
|
|
149
149
|
_: 3
|
|
150
|
-
}, 8, ["icon", "size"])) :
|
|
150
|
+
}, 8, ["icon", "size"])) : y("", !0)
|
|
151
151
|
], 64))
|
|
152
152
|
]),
|
|
153
153
|
_: 3
|
|
@@ -155,5 +155,5 @@ const x = "2xsm", re = /* @__PURE__ */ E({
|
|
|
155
155
|
}
|
|
156
156
|
});
|
|
157
157
|
export {
|
|
158
|
-
|
|
158
|
+
ie as _
|
|
159
159
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),b=require("radix-vue"),
|
|
1
|
+
"use strict";const e=require("vue"),b=require("radix-vue"),g=require("./Icon.vue_vue_type_style_index_0_lang-BvHCdzZP.js"),k=require("./Spinner.vue_vue_type_style_index_0_lang-CxNO28J7.js"),V=require("./Badge.vue_vue_type_script_setup_true_lang-D7hKm2YM.js"),s=require("./ButtonGroup.vue_vue_type_script_setup_true_lang-BSj1Y1j2.js"),a=require("./class-CjZYGZDW.js"),S=require("class-variance-authority"),x=require("./options-B4iSAKol.js"),f="2xsm",h=e.defineComponent({...x.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:{},as:{default:"button"}},setup(B,{expose:y}){const o=B,n=a.getBemBlock("button"),_=S.cva(n,{variants:{size:a.generateVariantClassList(s.ButtonSizes,n),type:a.generateVariantClassList(s.ButtonTypes,n),color:a.generateVariantClassList(s.ButtonColors,n),variant:a.generateVariantClassList(s.ButtonVariants,n),action:a.generateVariantClassList("action",n),active:a.generateVariantClassList("active",n),text:a.generateVariantClassList("text",n),preIcon:a.generateVariantClassList("preIcon",n),postIcon:a.generateVariantClassList("postIcon",n),loading:a.generateVariantClassList("loading",n)}}),v=s.injectButtonGroupContext({size:e.computed(()=>o.size),variant:e.computed(()=>o.variant)}),l=e.computed(()=>o.variant??v.variant.value??"simple"),i=e.computed(()=>["icon","float"].includes(l.value)),r=e.useSlots(),I=e.computed(()=>{let t=s.ButtonTypes.includes(o.type)?o.type:"fill";const c=o.size??v.size.value,C=c&&s.ButtonSizes.includes(c)?c:"md";let u=o.color&&s.ButtonColors.includes(o.color)?o.color:"primary",p=l.value&&s.ButtonVariants.includes(l.value)?l.value:"simple";return o.action?(p==="float"&&(p="icon"),t==="fill"&&(t="outline"),u=void 0):p==="float"&&(t==="ghost"&&(t="fill"),["primary","gray"].includes(u)||(u="primary")),{size:C,type:t,color:u,variant:p,action:o.action,active:o.active,loading:o.loading,text:!i.value&&!!(o.text||r.default),preIcon:!i.value&&!!(o.preIcon||r.preIcon),postIcon:!i.value&&!!(o.postIcon||r.postIcon)}}),d=e.computed(()=>{switch(o.size){case"sm":return"3xsm";default:return"2xsm"}}),z=e.computed(()=>{switch(o.size){case"sm":return"3xsm";case"lg":return"xsm";case"md":default:return"2xsm"}}),m=e.ref();return y({focus(){var t;(t=m.value)==null||t.focus()},blur(){var t;(t=m.value)==null||t.blur()}}),(t,c)=>(e.openBlock(),e.createBlock(e.unref(b.Primitive),{as:t.as,class:e.normalizeClass([e.unref(_)(I.value),o.class]),tabindex:"0",ref_key:"buttonRef",ref:m},{default:e.withCtx(()=>[t.loading?(e.openBlock(),e.createBlock(k._sfc_main,{key:1,class:e.normalizeClass(e.unref(a.getBemElement)(e.unref(n),"loading")),size:d.value},null,8,["class","size"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(t.preIcon||r.preIcon)&&!i.value?(e.openBlock(),e.createBlock(g._sfc_main,{key:0,icon:t.preIcon,size:d.value},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"preIcon")]),_:3},8,["icon","size"])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createBlock(g._sfc_main,{key:1,icon:t.icon,size:z.value},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"icon")]),_:3},8,["icon","size"])):e.renderSlot(t.$slots,"default",{key:2},()=>[e.createTextVNode(e.toDisplayString(t.text),1)]),t.action&&t.active&&!i.value&&(t.badgeText||r.badgeText||t.badgeIcon||r.badgeIcon)?e.renderSlot(t.$slots,"badge",e.normalizeProps(e.mergeProps({key:3},{color:t.$attrs.disabled?"gray":"primary",size:f})),()=>[e.createVNode(V._sfc_main,{text:t.badgeText,icon:t.badgeIcon,color:t.$attrs.disabled?"gray":"primary",size:f},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"badgeText")]),icon:e.withCtx(()=>[e.renderSlot(t.$slots,"badgeIcon")]),_:3},8,["text","icon","color"])]):e.createCommentVNode("",!0),(t.postIcon||r.postIcon)&&!i.value?(e.openBlock(),e.createBlock(g._sfc_main,{key:4,icon:t.postIcon,size:d.value},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"postIcon")]),_:3},8,["icon","size"])):e.createCommentVNode("",!0)],64))]),_:3},8,["as","class"]))}});exports._sfc_main=h;
|
package/dist/Button/index.js.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Button.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Button.vue_vue_type_script_setup_true_lang-687jBefr.js");exports.Button=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),p=require("./omit-CMPOmOGF.js"),l=require("./BaseButton.vue_vue_type_style_index_0_lang-CfBRZCKS.js"),_=require("./options-B4iSAKol.js"),f=e.defineComponent({..._.getComponentOptions("Button",!1),__name:"Button",props:{as:{},class:{},type:{},color:{},loading:{type:Boolean},preIcon:{},postIcon:{},size:{},text:{}},setup(s,{expose:r}){const c=s,a=e.useAttrs(),i=e.computed(()=>({...p.omit(a,"variant","icon","action","active","badgeText"),...c})),o=e.ref();return r({focus(){var t;(t=o.value)==null||t.focus()},blur(){var t;(t=o.value)==null||t.blur()}}),(t,m)=>(e.openBlock(),e.createBlock(l._sfc_main,e.mergeProps(i.value,{variant:"simple",ref_key:"buttonRef",ref:o}),e.createSlots({_:2},[e.renderList(Object.keys(t.$slots),n=>({name:n,fn:e.withCtx(u=>[e.renderSlot(t.$slots,n,e.normalizeProps(e.guardReactiveProps(u)))])}))]),1040))}});exports._sfc_main=f;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as i, useAttrs as m, computed as u, ref as l, createBlock as f, openBlock as _, mergeProps as d, createSlots as b, renderList as g, withCtx as v, renderSlot as B, normalizeProps as k, guardReactiveProps as x } from "vue";
|
|
2
|
-
import { o as y } from "./omit-
|
|
3
|
-
import { _ as C } from "./BaseButton.vue_vue_type_style_index_0_lang-
|
|
4
|
-
import { g as
|
|
2
|
+
import { o as y } from "./omit-wqhC12f_.js";
|
|
3
|
+
import { _ as C } from "./BaseButton.vue_vue_type_style_index_0_lang-5rSLcXNk.js";
|
|
4
|
+
import { g as P } from "./options-JBqnVZUl.js";
|
|
5
5
|
const O = /* @__PURE__ */ i({
|
|
6
|
-
...
|
|
6
|
+
...P("Button", !1),
|
|
7
7
|
__name: "Button",
|
|
8
8
|
props: {
|
|
9
9
|
as: {},
|
|
@@ -16,12 +16,12 @@ const O = /* @__PURE__ */ i({
|
|
|
16
16
|
size: {},
|
|
17
17
|
text: {}
|
|
18
18
|
},
|
|
19
|
-
setup(r, { expose:
|
|
20
|
-
const
|
|
19
|
+
setup(r, { expose: s }) {
|
|
20
|
+
const n = r, a = m(), c = u(() => ({
|
|
21
21
|
...y(a, "variant", "icon", "action", "active", "badgeText"),
|
|
22
|
-
...
|
|
22
|
+
...n
|
|
23
23
|
})), o = l();
|
|
24
|
-
return
|
|
24
|
+
return s({
|
|
25
25
|
focus() {
|
|
26
26
|
var e;
|
|
27
27
|
(e = o.value) == null || e.focus();
|
|
@@ -30,7 +30,7 @@ const O = /* @__PURE__ */ i({
|
|
|
30
30
|
var e;
|
|
31
31
|
(e = o.value) == null || e.blur();
|
|
32
32
|
}
|
|
33
|
-
}), (e,
|
|
33
|
+
}), (e, R) => (_(), f(C, d(c.value, {
|
|
34
34
|
variant: "simple",
|
|
35
35
|
ref_key: "buttonRef",
|
|
36
36
|
ref: o
|
|
@@ -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-DPxsdfde.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-Bvk3KN2L.js");exports.Checkbox=e._sfc_main;exports.CheckboxSizes=e.CheckboxSizes;exports.default=e._sfc_main;exports.useColoredPantographCheckbox=e.useColoredPantographCheckbox;exports.useColoredPantographCheckboxGroup=e.useColoredPantographCheckboxGroup;
|