@pantograph/vue 0.10.4 → 0.10.6
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-DZY7N5gS.js → ActionButton.vue_vue_type_script_setup_true_lang-B3fz9VlS.js} +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-XYkQJLWE.js → ActionButton.vue_vue_type_script_setup_true_lang-CGtPZ6WM.js} +2 -2
- 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-B3h6--NG.js → Avatar.vue_vue_type_style_index_0_lang-CxtFAywe.js} +2 -2
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-B62H7K8P.js → Avatar.vue_vue_type_style_index_0_lang-Dno8MmtN.js} +1 -1
- package/dist/AvatarGroup/index.js.js +1 -1
- package/dist/AvatarGroup/index.umd.cjs.js +1 -1
- package/dist/Badge/Badge.d.ts +1 -1
- package/dist/Badge/index.js.js +1 -1
- package/dist/{Badge.vue_vue_type_script_setup_true_lang-BY-B21u1.js → Badge.vue_vue_type_script_setup_true_lang-TQx4Ht7v.js} +1 -1
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-D0Qoa28N.js +1 -0
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-C0nSQYiX.js → BaseButton.vue_vue_type_style_index_0_lang-DsO7fB2L.js} +30 -30
- 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-ZXQe6Slx.js → Button.vue_vue_type_script_setup_true_lang-CYNr2NyY.js} +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-C49On28W.js → Button.vue_vue_type_script_setup_true_lang-iVnBi1qI.js} +2 -2
- package/dist/Checkbox/Checkbox.d.ts +3 -3
- 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-Bphv5qnx.js → Checkbox.vue_vue_type_style_index_0_lang-BmkAqFq7.js} +69 -67
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-pWUK1jtk.js +1 -0
- package/dist/CheckboxGroup/index.js.js +1 -1
- package/dist/CheckboxGroup/index.umd.cjs.js +1 -1
- package/dist/ColorPicker/index.js.js +1 -1
- package/dist/ColorPicker/index.umd.cjs.js +1 -1
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-LYEiXGuI.js → ColorPicker.vue_vue_type_style_index_0_lang-BNdf9ydf.js} +1 -1
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-nriGmBdP.js → ColorPicker.vue_vue_type_style_index_0_lang-ELatlkv4.js} +2 -2
- package/dist/ColorSwatch/index.js.js +1 -1
- package/dist/ColorSwatch/index.umd.cjs.js +1 -1
- package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-Tu5jN_qs.js → ColorSwatch.vue_vue_type_style_index_0_lang-DWbErEeg.js} +1 -1
- package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-DMzq203l.js → ColorSwatch.vue_vue_type_style_index_0_lang-gdy03Pwc.js} +3 -3
- package/dist/ColorSwatchGroup/ColorSwatchGroup.d.ts +3 -3
- package/dist/ColorSwatchGroup/index.js.js +1 -1
- package/dist/ColorSwatchGroup/index.umd.cjs.js +1 -1
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-BxWt-Zbz.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-CfrcyIa2.js} +1 -1
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-CRyynAiW.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-DfnOsEBq.js} +6 -6
- package/dist/ColorTrigger/index.js.js +1 -1
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-m13EP8UW.js → ColorTrigger.vue_vue_type_style_index_0_lang-C5aTcJN1.js} +2 -2
- package/dist/DataTable/DataTable.d.ts +67 -0
- package/dist/DataTable/DataTable.model.d.ts +57 -0
- package/dist/DataTable/index.d.ts +2 -0
- package/dist/DataTable/index.js.js +2663 -0
- package/dist/DataTable/index.umd.cjs.js +22 -0
- package/dist/DataTable/useColumn.d.ts +16 -0
- package/dist/DataTable/useColumnWrap.d.ts +12 -0
- package/dist/Divider/Divider.d.ts +1 -1
- package/dist/Empty/Empty.d.ts +38 -0
- package/dist/Empty/Empty.model.d.ts +2 -0
- package/dist/Empty/index.d.ts +1 -0
- package/dist/Empty/index.js.js +1 -0
- package/dist/Empty/index.umd.cjs.js +1 -0
- 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-Vfrxg8PK.js → FloatButton.vue_vue_type_script_setup_true_lang-CCzgATDq.js} +2 -2
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-sfslt2vn.js → FloatButton.vue_vue_type_script_setup_true_lang-io7at7GI.js} +1 -1
- package/dist/GraphicalObject/GraphicalObject.d.ts +1 -1
- package/dist/GraphicalObject/index.js.js +1 -1
- package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-D9DyDBKQ.js → GraphicalObject.vue_vue_type_script_setup_true_lang-zaYp13KC.js} +1 -1
- 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-5W7GQOhv.js → IconButton.vue_vue_type_script_setup_true_lang-CTfRxff0.js} +2 -2
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-B_9aypIC.js → IconButton.vue_vue_type_script_setup_true_lang-CWqrQ22L.js} +1 -1
- package/dist/IndentLevel/IndentLevel.d.ts +1 -1
- package/dist/IndentLevel/index.js.js +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-C4bSKGaz.js → IndentLevel.vue_vue_type_style_index_0_lang-BkunIxeY.js} +1 -1
- package/dist/Indicator/Indicator.d.ts +1 -1
- package/dist/Indicator/index.js.js +1 -1
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-DYFKQ-dL.js → Indicator.vue_vue_type_script_setup_true_lang-DivfztWD.js} +1 -1
- package/dist/Input/index.js.js +1 -1
- package/dist/Input/index.umd.cjs.js +1 -1
- package/dist/Input.vue_vue_type_style_index_0_lang-Bg1yMzU-.js +1 -0
- package/dist/Input.vue_vue_type_style_index_0_lang-DqsL8ARC.js +269 -0
- package/dist/Menu/Menu.d.ts +41 -4
- 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-1iiTY68f.js +1 -0
- package/dist/{Menu.vue_vue_type_style_index_0_lang-Dcu2gyxm.js → Menu.vue_vue_type_style_index_0_lang-CL5PTbsT.js} +146 -145
- package/dist/MenuItem/MenuItem.d.ts +20 -3
- package/dist/MenuItem/MenuItemContent.d.ts +7 -7
- package/dist/MenuItem/index.js.js +1 -1
- package/dist/MenuItem/index.umd.cjs.js +1 -1
- package/dist/Popover/Popover.d.ts +8 -6
- 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-C7q9V9tc.js +1 -0
- package/dist/Popover.vue_vue_type_style_index_0_lang-P1ZoqEUT.js +154 -0
- package/dist/RadioGroup/index.js.js +1 -1
- package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-DTcXCTZt.js → RadioGroup.vue_vue_type_script_setup_true_lang-DxYzvshj.js} +1 -1
- package/dist/Switch/index.js.js +1 -1
- package/dist/{Switch.vue_vue_type_style_index_0_lang-Diz2BK9E.js → Switch.vue_vue_type_style_index_0_lang-C63Gv1EO.js} +1 -1
- package/dist/Tree/Tree.d.ts +3 -3
- 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-CDS7qhkC.js +1 -0
- package/dist/Tree.vue_vue_type_style_index_0_lang-DTZfk6zI.js +499 -0
- package/dist/_baseIsEqual-BknLKouD.js +144 -0
- package/dist/_baseIsEqual-DP4HkppL.js +1 -0
- package/dist/{_flatRest-Cgl-JzmZ.js → _flatRest-Dx0ZZgOx.js} +17 -17
- package/dist/{cloneDeep-C3qTbnbj.js → cloneDeep-C4ka1P8m.js} +1 -1
- package/dist/{get-B_rtzkiJ.js → get-B14Mml42.js} +1 -1
- package/dist/index.js.js +20 -20
- package/dist/index.umd.cjs.js +1 -1
- package/dist/{omit-gDFhewvU.js → omit-CD3OjwFx.js} +36 -36
- package/dist/{pick-D8bMooY6.js → pick-8ze0sbWb.js} +1 -1
- package/dist/style/index.css +1 -1
- package/dist/uniq-ChIEzCZe.js +1 -0
- package/dist/uniq-DSVd52ma.js +56 -0
- package/package.json +12 -2
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-dcMigyCt.js +0 -1
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-BPQsppLy.js +0 -1
- package/dist/Input.vue_vue_type_style_index_0_lang-BCS_of9l.js +0 -406
- package/dist/Input.vue_vue_type_style_index_0_lang-HdWdXVjL.js +0 -1
- package/dist/Menu.vue_vue_type_style_index_0_lang-zgFo-Qhe.js +0 -1
- package/dist/Popover.vue_vue_type_style_index_0_lang-CCfVt5eZ.js +0 -142
- package/dist/Popover.vue_vue_type_style_index_0_lang-DyKW40kh.js +0 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-ChV5Fqjc.js +0 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-CoTI1i5g.js +0 -545
|
@@ -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-B3fz9VlS.js");exports.ActionButton=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -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-D0Qoa28N.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;
|
|
@@ -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
|
-
import { o as k } from "./omit-
|
|
3
|
-
import { _ as x } from "./BaseButton.vue_vue_type_style_index_0_lang-
|
|
2
|
+
import { o as k } from "./omit-CD3OjwFx.js";
|
|
3
|
+
import { _ as x } from "./BaseButton.vue_vue_type_style_index_0_lang-DsO7fB2L.js";
|
|
4
4
|
import { g as y } from "./options-JBqnVZUl.js";
|
|
5
5
|
const R = /* @__PURE__ */ p({
|
|
6
6
|
...y("ActionButton", !1),
|
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-CxtFAywe.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-Dno8MmtN.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 T, useEmitAsProps as H, AvatarRoot as J, AvatarImage a
|
|
|
3
3
|
import { b as v, a as f, g as O } from "./class-DziTeW9B.js";
|
|
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-P1ZoqEUT.js";
|
|
7
7
|
import "@iconify/vue";
|
|
8
8
|
import { _ as W } from "./Icon.vue_vue_type_style_index_0_lang-BVVc15Aa.js";
|
|
9
|
-
import { _ as X } from "./Indicator.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { _ as X } from "./Indicator.vue_vue_type_script_setup_true_lang-DivfztWD.js";
|
|
10
10
|
const [Y, Z] = T("AvatarGroup"), ue = /* @__PURE__ */ E({
|
|
11
11
|
...q("AvatarGroup"),
|
|
12
12
|
__name: "AvatarGroup",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),m=require("radix-vue"),s=require("./class-CjZYGZDW.js"),z=require("class-variance-authority"),x=require("./options-B4iSAKol.js"),b=require("./Popover.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";const e=require("vue"),m=require("radix-vue"),s=require("./class-CjZYGZDW.js"),z=require("class-variance-authority"),x=require("./options-B4iSAKol.js"),b=require("./Popover.vue_vue_type_style_index_0_lang-C7q9V9tc.js");require("@iconify/vue");const N=require("./Icon.vue_vue_type_style_index_0_lang-c9NvwoHi.js"),G=require("./Indicator.vue_vue_type_script_setup_true_lang-DmGmSuAJ.js"),[y,S]=m.createContext("AvatarGroup"),P=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})),u=()=>{const o=p.default?p.default():[];return l.value>1&&o.length>l.value?[...o.filter((d,i)=>i<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,i)=>i>=l.value-1)})})]:o};return(o,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([c.value,r.class])},[e.createVNode(u,{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),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",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"}}),i=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:i.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=P;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-Dno8MmtN.js");exports.AvatarGroup=t._sfc_main$1;exports.injectAvatarGroupContext=t.injectAvatarGroupContext;exports.provideAvatarGroupContext=t.provideAvatarGroupContext;
|
package/dist/Badge/Badge.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseBadgeSlots, BaseBadgeProps } from '../Base/BaseBadge/BaseBadge';
|
|
2
|
-
import { BadgeColor, BadgeColorSubtle } from '../Base/BaseBadge/BaseBadge.model
|
|
2
|
+
import { BadgeColor, BadgeColorSubtle } from '../Base/BaseBadge/BaseBadge.model';
|
|
3
3
|
export type BadgeProps = Partial<Pick<BaseBadgeProps, 'class' | 'text' | 'icon' | 'flipOnDir'>> & {
|
|
4
4
|
size?: Exclude<BaseBadgeProps['size'], 'sm' | 'tiny' | 'tinier'>;
|
|
5
5
|
color?: BadgeColor | BadgeColorSubtle;
|
package/dist/Badge/index.js.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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 B, withCtx as C, renderSlot as O, normalizeProps as $, guardReactiveProps as j } from "vue";
|
|
2
|
-
import { o as k } from "./omit-
|
|
2
|
+
import { o as k } from "./omit-CD3OjwFx.js";
|
|
3
3
|
import { B as a, a as n, _ as E } from "./BaseBadge.vue_vue_type_style_index_0_lang-BaxHfiNY.js";
|
|
4
4
|
import { g as h } from "./options-JBqnVZUl.js";
|
|
5
5
|
import { getCssVar as r } from "@pantograph/tokens";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),m=require("./Icon.vue_vue_type_style_index_0_lang-c9NvwoHi.js"),S=require("./Spinner.vue_vue_type_style_index_0_lang-BFKOyKva.js"),x=require("./Badge.vue_vue_type_script_setup_true_lang-CrMJ4fbZ.js"),s=require("./ButtonGroup.vue_vue_type_script_setup_true_lang-D486_o-Z.js"),a=require("./class-CjZYGZDW.js"),h=require("class-variance-authority"),L=require("./options-B4iSAKol.js"),q=require("./index-BBeDQiz4.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
|
-
import { defineComponent as A, computed as s, useSlots as G, ref as L, createElementBlock as D, openBlock as c, normalizeClass as O, unref as
|
|
2
|
-
import { _ as
|
|
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
|
+
import { _ as B } from "./Icon.vue_vue_type_style_index_0_lang-BVVc15Aa.js";
|
|
3
3
|
import { _ as U } from "./Spinner.vue_vue_type_style_index_0_lang-Birom5mO.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-TQx4Ht7v.js";
|
|
5
5
|
import { i as X, a as k, c as $, b as C, B as F } from "./ButtonGroup.vue_vue_type_script_setup_true_lang-CT_Kgpjf.js";
|
|
6
6
|
import { g as Y, a as t, b as Z } from "./class-DziTeW9B.js";
|
|
7
7
|
import { cva as ee } from "class-variance-authority";
|
|
@@ -44,24 +44,24 @@ const S = "2xsm", fe = /* @__PURE__ */ A({
|
|
|
44
44
|
postIcon: t("postIcon", n),
|
|
45
45
|
loading: t("loading", n)
|
|
46
46
|
}
|
|
47
|
-
}),
|
|
47
|
+
}), z = X({
|
|
48
48
|
size: s(() => o.size),
|
|
49
49
|
variant: s(() => o.variant)
|
|
50
|
-
}), f = s(() => o.variant ??
|
|
50
|
+
}), f = s(() => o.variant ?? z.variant.value ?? "simple"), i = s(() => ["icon", "float"].includes(f.value)), a = G(), E = s(() => {
|
|
51
51
|
let e = k.includes(o.type) ? o.type : "fill";
|
|
52
|
-
const d = o.size ??
|
|
52
|
+
const d = o.size ?? z.size.value, j = d && $.includes(d) ? d : "md";
|
|
53
53
|
let m = o.color && C.includes(o.color) ? o.color : "primary", g = f.value && F.includes(f.value) ? f.value : "simple";
|
|
54
54
|
return o.action ? (g === "float" && (g = "icon"), e === "fill" && (e = "outline"), m = void 0) : g === "float" && (e === "ghost" && (e = "fill"), ["primary", "gray"].includes(m) || (m = "primary")), {
|
|
55
55
|
size: j,
|
|
56
56
|
type: e,
|
|
57
57
|
color: m,
|
|
58
58
|
variant: g,
|
|
59
|
-
action: o.action,
|
|
60
|
-
active: o.active,
|
|
61
|
-
loading: o.loading,
|
|
62
|
-
text: !
|
|
63
|
-
preIcon: !
|
|
64
|
-
postIcon: !
|
|
59
|
+
action: !!o.action,
|
|
60
|
+
active: !!o.active,
|
|
61
|
+
loading: !!o.loading,
|
|
62
|
+
text: !i.value && !!(o.text || a.default),
|
|
63
|
+
preIcon: !i.value && !!(o.preIcon || a.preIcon),
|
|
64
|
+
postIcon: !i.value && !!(o.postIcon || a.postIcon)
|
|
65
65
|
};
|
|
66
66
|
}), I = s(() => {
|
|
67
67
|
switch (o.size) {
|
|
@@ -91,72 +91,72 @@ const S = "2xsm", fe = /* @__PURE__ */ A({
|
|
|
91
91
|
(e = y.value) == null || e.blur();
|
|
92
92
|
}
|
|
93
93
|
}), (e, d) => (c(), D("button", {
|
|
94
|
-
class: O([
|
|
94
|
+
class: O([l(N)(E.value), o.class]),
|
|
95
95
|
tabindex: "0",
|
|
96
96
|
ref_key: "buttonRef",
|
|
97
97
|
ref: y
|
|
98
98
|
}, [
|
|
99
99
|
e.loading ? (c(), v(U, {
|
|
100
100
|
key: 1,
|
|
101
|
-
class: O(
|
|
101
|
+
class: O(l(Z)(l(n), "loading")),
|
|
102
102
|
size: I.value
|
|
103
103
|
}, null, 8, ["class", "size"])) : (c(), D(_, { key: 0 }, [
|
|
104
|
-
(e.preIcon ||
|
|
104
|
+
(e.preIcon || a.preIcon) && !i.value ? (c(), v(B, {
|
|
105
105
|
key: 0,
|
|
106
|
-
flipOnDir:
|
|
106
|
+
flipOnDir: l(P),
|
|
107
107
|
icon: e.preIcon,
|
|
108
108
|
size: I.value
|
|
109
109
|
}, {
|
|
110
110
|
default: p(() => [
|
|
111
|
-
|
|
111
|
+
r(e.$slots, "preIcon")
|
|
112
112
|
]),
|
|
113
113
|
_: 3
|
|
114
114
|
}, 8, ["flipOnDir", "icon", "size"])) : b("", !0),
|
|
115
|
-
|
|
115
|
+
i.value ? (c(), v(B, {
|
|
116
116
|
key: 1,
|
|
117
117
|
icon: e.icon,
|
|
118
118
|
size: R.value,
|
|
119
|
-
flipOnDir:
|
|
119
|
+
flipOnDir: l(h)
|
|
120
120
|
}, {
|
|
121
121
|
default: p(() => [
|
|
122
|
-
|
|
122
|
+
r(e.$slots, "icon")
|
|
123
123
|
]),
|
|
124
124
|
_: 3
|
|
125
|
-
}, 8, ["icon", "size", "flipOnDir"])) :
|
|
125
|
+
}, 8, ["icon", "size", "flipOnDir"])) : r(e.$slots, "default", { key: 2 }, () => [
|
|
126
126
|
q(H(e.text), 1)
|
|
127
127
|
]),
|
|
128
|
-
e.action && e.active && !
|
|
128
|
+
e.action && e.active && !i.value && (e.badgeText || a.badgeText || e.badgeIcon || a.badgeIcon) ? r(e.$slots, "badge", J(K({ key: 3 }, { color: e.$attrs.disabled ? "gray" : "primary", size: S })), () => [
|
|
129
129
|
M(W, {
|
|
130
130
|
text: e.badgeText,
|
|
131
131
|
icon: e.badgeIcon,
|
|
132
|
-
flipOnDir:
|
|
132
|
+
flipOnDir: l(w),
|
|
133
133
|
color: e.$attrs.disabled ? "gray" : "primary",
|
|
134
134
|
size: S
|
|
135
135
|
}, Q({ _: 2 }, [
|
|
136
|
-
|
|
136
|
+
a.badgeText ? {
|
|
137
137
|
name: "default",
|
|
138
138
|
fn: p(() => [
|
|
139
|
-
|
|
139
|
+
r(e.$slots, "badgeText")
|
|
140
140
|
]),
|
|
141
141
|
key: "0"
|
|
142
142
|
} : void 0,
|
|
143
|
-
|
|
143
|
+
a.badgeIcon ? {
|
|
144
144
|
name: "icon",
|
|
145
145
|
fn: p(() => [
|
|
146
|
-
|
|
146
|
+
r(e.$slots, "badgeIcon")
|
|
147
147
|
]),
|
|
148
148
|
key: "1"
|
|
149
149
|
} : void 0
|
|
150
150
|
]), 1032, ["text", "icon", "flipOnDir", "color"])
|
|
151
151
|
]) : b("", !0),
|
|
152
|
-
(e.postIcon ||
|
|
152
|
+
(e.postIcon || a.postIcon) && !i.value ? (c(), v(B, {
|
|
153
153
|
key: 4,
|
|
154
|
-
flipOnDir:
|
|
154
|
+
flipOnDir: l(V),
|
|
155
155
|
icon: e.postIcon,
|
|
156
156
|
size: I.value
|
|
157
157
|
}, {
|
|
158
158
|
default: p(() => [
|
|
159
|
-
|
|
159
|
+
r(e.$slots, "postIcon")
|
|
160
160
|
]),
|
|
161
161
|
_: 3
|
|
162
162
|
}, 8, ["flipOnDir", "icon", "size"])) : b("", !0)
|
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-CYNr2NyY.js");exports.Button=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -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-D0Qoa28N.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,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
|
-
import { o as y } from "./omit-
|
|
3
|
-
import { _ as I } from "./BaseButton.vue_vue_type_style_index_0_lang-
|
|
2
|
+
import { o as y } from "./omit-CD3OjwFx.js";
|
|
3
|
+
import { _ as I } from "./BaseButton.vue_vue_type_style_index_0_lang-DsO7fB2L.js";
|
|
4
4
|
import { g as O } from "./options-JBqnVZUl.js";
|
|
5
5
|
const z = /* @__PURE__ */ c({
|
|
6
6
|
...O("Button", !1),
|
|
@@ -17,19 +17,19 @@ export interface CheckboxSlots {
|
|
|
17
17
|
default?: (props: object) => never;
|
|
18
18
|
}
|
|
19
19
|
export type CheckboxEmits = CheckboxRootEmits & {
|
|
20
|
-
change: [value: boolean
|
|
20
|
+
change: [value: boolean];
|
|
21
21
|
blur: [event: InputEvent];
|
|
22
22
|
focus: [event: InputEvent];
|
|
23
23
|
};
|
|
24
24
|
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<CheckboxProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
25
25
|
blur: (event: InputEvent) => any;
|
|
26
26
|
focus: (event: InputEvent) => any;
|
|
27
|
-
change: (value: boolean
|
|
27
|
+
change: (value: boolean) => any;
|
|
28
28
|
"update:checked": (value: boolean) => any;
|
|
29
29
|
}, string, import('vue').PublicProps, Readonly<CheckboxProps> & Readonly<{
|
|
30
30
|
onBlur?: ((event: InputEvent) => any) | undefined;
|
|
31
31
|
onFocus?: ((event: InputEvent) => any) | undefined;
|
|
32
|
-
onChange?: ((value: boolean
|
|
32
|
+
onChange?: ((value: boolean) => any) | undefined;
|
|
33
33
|
"onUpdate:checked"?: ((value: boolean) => any) | undefined;
|
|
34
34
|
}>, {
|
|
35
35
|
size: CheckboxSize;
|
|
@@ -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-BmkAqFq7.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-pWUK1jtk.js");exports.Checkbox=e._sfc_main;exports.CheckboxSizes=e.CheckboxSizes;exports.default=e._sfc_main;exports.useColoredPantographCheckbox=e.useColoredPantographCheckbox;exports.useColoredPantographCheckboxGroup=e.useColoredPantographCheckboxGroup;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { defineComponent as S, ref as _, watch as L, computed as c, createElementBlock as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { prefixTokens as
|
|
4
|
-
import { g as
|
|
5
|
-
import { cva as
|
|
1
|
+
import { defineComponent as S, ref as _, watch as L, computed as c, createElementBlock as p, openBlock as i, renderSlot as G, createCommentVNode as w, Fragment as K, renderList as O, createBlock as V, mergeProps as $, useSlots as T, unref as l, createVNode as y, withKeys as j, withCtx as B, normalizeClass as x, createTextVNode as F, toDisplayString as R } from "vue";
|
|
2
|
+
import { createContext as H, CheckboxRoot as J, CheckboxIndicator as M } from "radix-vue";
|
|
3
|
+
import { prefixTokens as n } from "@pantograph/tokens";
|
|
4
|
+
import { g as Q, a as W, b as f } from "./class-DziTeW9B.js";
|
|
5
|
+
import { cva as X } from "class-variance-authority";
|
|
6
6
|
import { g as P } from "./options-JBqnVZUl.js";
|
|
7
|
-
import { o as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { u as
|
|
10
|
-
import { U as
|
|
11
|
-
const
|
|
12
|
-
"--ptc-checkbox-bg": `var(--${
|
|
13
|
-
"--ptc-checkbox-bg-hover": `var(--${
|
|
14
|
-
"--ptc-checkbox-bg-focus": `var(--${
|
|
15
|
-
"--ptc-checkbox-br-focus": `var(--${
|
|
16
|
-
"--ptc-checkbox-bg-active": `var(--${
|
|
17
|
-
}),
|
|
18
|
-
"--ptc-group-checkbox-bg": `var(--${
|
|
19
|
-
"--ptc-group-checkbox-bg-hover": `var(--${
|
|
20
|
-
"--ptc-group-checkbox-bg-focus": `var(--${
|
|
21
|
-
"--ptc-group-checkbox-br-focus": `var(--${
|
|
22
|
-
"--ptc-group-checkbox-bg-active": `var(--${
|
|
23
|
-
}), [
|
|
7
|
+
import { o as Y } from "./omit-CD3OjwFx.js";
|
|
8
|
+
import { _ as Z } from "./Icon.vue_vue_type_style_index_0_lang-BVVc15Aa.js";
|
|
9
|
+
import { u as ee } from "./useId-DvOSMFGX.js";
|
|
10
|
+
import { U as ae } from "./useInputDataStates-CZbdWpyp.js";
|
|
11
|
+
const te = ["2xsm", "xsm"], fe = (t) => ({
|
|
12
|
+
"--ptc-checkbox-bg": `var(--${n}-${t}-5)`,
|
|
13
|
+
"--ptc-checkbox-bg-hover": `var(--${n}-${t}-4)`,
|
|
14
|
+
"--ptc-checkbox-bg-focus": `var(--${n}-${t}-6)`,
|
|
15
|
+
"--ptc-checkbox-br-focus": `var(--${n}-${t}-6)`,
|
|
16
|
+
"--ptc-checkbox-bg-active": `var(--${n}-${t}-7)`
|
|
17
|
+
}), ke = (t) => ({
|
|
18
|
+
"--ptc-group-checkbox-bg": `var(--${n}-${t}-5)`,
|
|
19
|
+
"--ptc-group-checkbox-bg-hover": `var(--${n}-${t}-4)`,
|
|
20
|
+
"--ptc-group-checkbox-bg-focus": `var(--${n}-${t}-6)`,
|
|
21
|
+
"--ptc-group-checkbox-br-focus": `var(--${n}-${t}-6)`,
|
|
22
|
+
"--ptc-group-checkbox-bg-active": `var(--${n}-${t}-7)`
|
|
23
|
+
}), [oe, se] = H("CheckboxGroup"), Ce = /* @__PURE__ */ S({
|
|
24
24
|
...P("CheckboxGroup"),
|
|
25
25
|
__name: "CheckboxGroup",
|
|
26
26
|
props: {
|
|
@@ -32,7 +32,7 @@ const ee = ["2xsm", "xsm"], be = (t) => ({
|
|
|
32
32
|
},
|
|
33
33
|
emits: ["update:value", "change"],
|
|
34
34
|
setup(t, { emit: k }) {
|
|
35
|
-
const
|
|
35
|
+
const r = k, e = t, o = _(e.value ?? []);
|
|
36
36
|
L(
|
|
37
37
|
() => e.value,
|
|
38
38
|
() => {
|
|
@@ -43,27 +43,27 @@ const ee = ["2xsm", "xsm"], be = (t) => ({
|
|
|
43
43
|
get() {
|
|
44
44
|
return e.value ? e.value : o.value;
|
|
45
45
|
},
|
|
46
|
-
set(
|
|
47
|
-
e.value || (o.value =
|
|
46
|
+
set(s) {
|
|
47
|
+
e.value || (o.value = s), r("update:value", s), r("change", s);
|
|
48
48
|
}
|
|
49
49
|
}), C = c(() => e.size), d = c(() => e.disabled ? !0 : void 0);
|
|
50
|
-
return
|
|
50
|
+
return se({
|
|
51
51
|
model: u,
|
|
52
52
|
size: C,
|
|
53
53
|
disabled: d
|
|
54
|
-
}), (
|
|
55
|
-
G(
|
|
54
|
+
}), (s, g) => (i(), p("div", null, [
|
|
55
|
+
G(s.$slots, "default", {}, () => {
|
|
56
56
|
var m;
|
|
57
57
|
return [
|
|
58
|
-
(m =
|
|
58
|
+
(m = s.options) != null && m.length ? (i(!0), p(K, { key: 0 }, O(s.options, (b) => (i(), V(re, $({
|
|
59
59
|
key: b.value,
|
|
60
60
|
ref_for: !0
|
|
61
|
-
}, b), null, 16))), 128)) :
|
|
61
|
+
}, b), null, 16))), 128)) : w("", !0)
|
|
62
62
|
];
|
|
63
63
|
})
|
|
64
64
|
]));
|
|
65
65
|
}
|
|
66
|
-
}),
|
|
66
|
+
}), le = ["for"], re = /* @__PURE__ */ S({
|
|
67
67
|
...P("Checkbox"),
|
|
68
68
|
__name: "Checkbox",
|
|
69
69
|
props: {
|
|
@@ -85,36 +85,36 @@ const ee = ["2xsm", "xsm"], be = (t) => ({
|
|
|
85
85
|
},
|
|
86
86
|
emits: ["update:checked", "change", "blur", "focus"],
|
|
87
87
|
setup(t, { emit: k }) {
|
|
88
|
-
const
|
|
88
|
+
const r = Q("checkbox"), e = t, o = oe({}), u = k, C = T(), d = _(e.checked ?? !1);
|
|
89
89
|
L(
|
|
90
90
|
() => e.checked,
|
|
91
91
|
() => {
|
|
92
92
|
d.value = e.checked ?? !1;
|
|
93
93
|
}
|
|
94
94
|
);
|
|
95
|
-
const
|
|
95
|
+
const s = c({
|
|
96
96
|
get() {
|
|
97
97
|
var a;
|
|
98
98
|
return (a = o.model) != null && a.value ? e.value !== void 0 && o.model.value.includes(e.value) : e.checked !== void 0 ? e.checked : d.value;
|
|
99
99
|
},
|
|
100
100
|
set(a) {
|
|
101
|
-
var
|
|
102
|
-
if ((
|
|
101
|
+
var v;
|
|
102
|
+
if ((v = o.model) != null && v.value) {
|
|
103
103
|
if (e.value !== void 0) {
|
|
104
104
|
const h = o.model.value.indexOf(e.value);
|
|
105
105
|
a && h === -1 ? o.model.value = [...o.model.value, e.value] : !a && h !== -1 && (o.model.value = o.model.value.filter(
|
|
106
|
-
(
|
|
106
|
+
(E) => E !== e.value
|
|
107
107
|
));
|
|
108
108
|
}
|
|
109
109
|
} else
|
|
110
110
|
e.checked === void 0 && (d.value = a), u("update:checked", a), u("change", a);
|
|
111
111
|
}
|
|
112
|
-
}), g = c(() => e.id ??
|
|
112
|
+
}), g = c(() => e.id ?? ee(r)), m = c(() => {
|
|
113
113
|
var a;
|
|
114
114
|
return {
|
|
115
115
|
disabled: ((a = o.disabled) == null ? void 0 : a.value) ?? e.disabled,
|
|
116
116
|
...N.value,
|
|
117
|
-
...
|
|
117
|
+
...Y(
|
|
118
118
|
e,
|
|
119
119
|
"size",
|
|
120
120
|
"class",
|
|
@@ -128,9 +128,9 @@ const ee = ["2xsm", "xsm"], be = (t) => ({
|
|
|
128
128
|
"labelCls"
|
|
129
129
|
)
|
|
130
130
|
};
|
|
131
|
-
}), b =
|
|
131
|
+
}), b = X(r, {
|
|
132
132
|
variants: {
|
|
133
|
-
size:
|
|
133
|
+
size: W(te, r)
|
|
134
134
|
}
|
|
135
135
|
}), q = c(() => e.label || C.default || e.value && e.valueAsLabel), A = c(() => {
|
|
136
136
|
if (e.label) return e.label;
|
|
@@ -146,35 +146,37 @@ const ee = ["2xsm", "xsm"], be = (t) => ({
|
|
|
146
146
|
default:
|
|
147
147
|
return "3xsm";
|
|
148
148
|
}
|
|
149
|
-
}), { rootBindings: I, inputBindings: N } =
|
|
149
|
+
}), { rootBindings: I, inputBindings: N } = ae({
|
|
150
150
|
getDisabled: () => {
|
|
151
151
|
var a;
|
|
152
152
|
return ((a = o.disabled) == null ? void 0 : a.value) ?? e.disabled;
|
|
153
153
|
},
|
|
154
154
|
emit: u
|
|
155
|
-
});
|
|
156
|
-
return (a,
|
|
157
|
-
class: [
|
|
158
|
-
},
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
155
|
+
}), U = () => s.value = !s.value;
|
|
156
|
+
return (a, v) => (i(), p("div", $({
|
|
157
|
+
class: [l(f)(l(r), "root"), a.rootCls]
|
|
158
|
+
}, l(I)), [
|
|
159
|
+
y(l(J), $({
|
|
160
|
+
onKeyup: j(U, ["enter"])
|
|
161
|
+
}, m.value, {
|
|
162
|
+
checked: s.value,
|
|
163
|
+
"onUpdate:checked": v[0] || (v[0] = (h) => s.value = h),
|
|
162
164
|
id: g.value,
|
|
163
|
-
class: [
|
|
165
|
+
class: [l(b)({ size: z.value }), e.class]
|
|
164
166
|
}), {
|
|
165
|
-
default:
|
|
166
|
-
|
|
167
|
-
class: x([
|
|
167
|
+
default: B(() => [
|
|
168
|
+
y(l(M), {
|
|
169
|
+
class: x([l(f)(l(r), "indicator"), a.indicatorCls]),
|
|
168
170
|
asChild: ""
|
|
169
171
|
}, {
|
|
170
|
-
default:
|
|
171
|
-
e.checked != "indeterminate" ? (
|
|
172
|
+
default: B(() => [
|
|
173
|
+
e.checked != "indeterminate" ? (i(), V(Z, {
|
|
172
174
|
key: 0,
|
|
173
175
|
icon: "tabler:check",
|
|
174
176
|
size: D.value
|
|
175
|
-
}, null, 8, ["size"])) : (
|
|
177
|
+
}, null, 8, ["size"])) : (i(), p("span", {
|
|
176
178
|
key: 1,
|
|
177
|
-
class: x([
|
|
179
|
+
class: x([l(f)(l(r), "indeterminate"), a.indeterminateCls])
|
|
178
180
|
}, null, 2))
|
|
179
181
|
]),
|
|
180
182
|
_: 1
|
|
@@ -182,28 +184,28 @@ const ee = ["2xsm", "xsm"], be = (t) => ({
|
|
|
182
184
|
]),
|
|
183
185
|
_: 1
|
|
184
186
|
}, 16, ["checked", "id", "class"]),
|
|
185
|
-
q.value ? (
|
|
187
|
+
q.value ? (i(), p("label", {
|
|
186
188
|
key: 0,
|
|
187
189
|
for: g.value,
|
|
188
|
-
class: x([
|
|
190
|
+
class: x([l(f)(l(r), "label"), a.labelCls])
|
|
189
191
|
}, [
|
|
190
192
|
G(a.$slots, "default", {
|
|
191
193
|
checked: a.checked,
|
|
192
194
|
disabled: a.disabled,
|
|
193
195
|
required: a.required
|
|
194
196
|
}, () => [
|
|
195
|
-
|
|
197
|
+
F(R(A.value), 1)
|
|
196
198
|
])
|
|
197
|
-
], 10,
|
|
199
|
+
], 10, le)) : w("", !0)
|
|
198
200
|
], 16));
|
|
199
201
|
}
|
|
200
202
|
});
|
|
201
203
|
export {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
204
|
+
te as C,
|
|
205
|
+
re as _,
|
|
206
|
+
ke as a,
|
|
207
|
+
Ce as b,
|
|
208
|
+
oe as i,
|
|
209
|
+
se as p,
|
|
210
|
+
fe as u
|
|
209
211
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),h=require("radix-vue"),l=require("@pantograph/tokens"),r=require("./class-CjZYGZDW.js"),V=require("class-variance-authority"),x=require("./options-B4iSAKol.js"),P=require("./omit-C4BrcXKG.js"),w=require("./Icon.vue_vue_type_style_index_0_lang-c9NvwoHi.js"),L=require("./useId-Ku3O_8TK.js"),I=require("./useInputDataStates-CbRgNQqU.js"),g=["2xsm","xsm"],N=a=>({"--ptc-checkbox-bg":`var(--${l.prefixTokens}-${a}-5)`,"--ptc-checkbox-bg-hover":`var(--${l.prefixTokens}-${a}-4)`,"--ptc-checkbox-bg-focus":`var(--${l.prefixTokens}-${a}-6)`,"--ptc-checkbox-br-focus":`var(--${l.prefixTokens}-${a}-6)`,"--ptc-checkbox-bg-active":`var(--${l.prefixTokens}-${a}-7)`}),A=a=>({"--ptc-group-checkbox-bg":`var(--${l.prefixTokens}-${a}-5)`,"--ptc-group-checkbox-bg-hover":`var(--${l.prefixTokens}-${a}-4)`,"--ptc-group-checkbox-bg-focus":`var(--${l.prefixTokens}-${a}-6)`,"--ptc-group-checkbox-br-focus":`var(--${l.prefixTokens}-${a}-6)`,"--ptc-group-checkbox-bg-active":`var(--${l.prefixTokens}-${a}-7)`}),[B,$]=h.createContext("CheckboxGroup"),D=e.defineComponent({...x.getComponentOptions("CheckboxGroup"),__name:"CheckboxGroup",props:{value:{},size:{},disabled:{type:Boolean},name:{},options:{}},emits:["update:value","change"],setup(a,{emit:m}){const c=m,t=a,s=e.ref(t.value??[]);e.watch(()=>t.value,()=>{s.value=t.value??[]});const u=e.computed({get(){return t.value?t.value:s.value},set(n){t.value||(s.value=n),c("update:value",n),c("change",n)}}),f=e.computed(()=>t.size),i=e.computed(()=>t.disabled?!0:void 0);return $({model:u,size:f,disabled:i}),(n,b)=>(e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(n.$slots,"default",{},()=>{var p;return[(p=n.options)!=null&&p.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.options,k=>(e.openBlock(),e.createBlock(z,e.mergeProps({key:k.value,ref_for:!0},k),null,16))),128)):e.createCommentVNode("",!0)]})]))}}),O=["for"],z=e.defineComponent({...x.getComponentOptions("Checkbox"),__name:"Checkbox",props:{size:{default:"xsm"},class:{},rootCls:{},indicatorCls:{},indeterminateCls:{},labelCls:{},label:{},value:{},id:{},valueAsLabel:{type:Boolean,default:!0},defaultChecked:{type:Boolean},checked:{type:[Boolean,String],default:void 0},disabled:{type:Boolean},required:{type:Boolean},name:{}},emits:["update:checked","change","blur","focus"],setup(a,{emit:m}){const c=r.getBemBlock("checkbox"),t=a,s=B({}),u=m,f=e.useSlots(),i=e.ref(t.checked??!1);e.watch(()=>t.checked,()=>{i.value=t.checked??!1});const n=e.computed({get(){var o;return(o=s.model)!=null&&o.value?t.value!==void 0&&s.model.value.includes(t.value):t.checked!==void 0?t.checked:i.value},set(o){var d;if((d=s.model)!=null&&d.value){if(t.value!==void 0){const v=s.model.value.indexOf(t.value);o&&v===-1?s.model.value=[...s.model.value,t.value]:!o&&v!==-1&&(s.model.value=s.model.value.filter(G=>G!==t.value))}}else t.checked===void 0&&(i.value=o),u("update:checked",o),u("change",o)}}),b=e.computed(()=>t.id??L.usePCId(c)),p=e.computed(()=>{var o;return{disabled:((o=s.disabled)==null?void 0:o.value)??t.disabled,...T.value,...P.omit(t,"size","class","label","disabled","checked","id","rootCls","indicatorCls","indeterminateCls","labelCls")}}),k=V.cva(c,{variants:{size:r.generateVariantClassList(g,c)}}),_=e.computed(()=>t.label||f.default||t.value&&t.valueAsLabel),y=e.computed(()=>{if(t.label)return t.label;if(t.value&&t.valueAsLabel)return t.value}),C=e.computed(()=>{var o;return((o=s.size)==null?void 0:o.value)??t.size}),q=e.computed(()=>{switch(C.value){case"xsm":return"2xsm";case"2xsm":default:return"3xsm"}}),{rootBindings:S,inputBindings:T}=I.UseInputDataStates({getDisabled:()=>{var o;return((o=s.disabled)==null?void 0:o.value)??t.disabled},emit:u}),E=()=>n.value=!n.value;return(o,d)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:[e.unref(r.getBemElement)(e.unref(c),"root"),o.rootCls]},e.unref(S)),[e.createVNode(e.unref(h.CheckboxRoot),e.mergeProps({onKeyup:e.withKeys(E,["enter"])},p.value,{checked:n.value,"onUpdate:checked":d[0]||(d[0]=v=>n.value=v),id:b.value,class:[e.unref(k)({size:C.value}),t.class]}),{default:e.withCtx(()=>[e.createVNode(e.unref(h.CheckboxIndicator),{class:e.normalizeClass([e.unref(r.getBemElement)(e.unref(c),"indicator"),o.indicatorCls]),asChild:""},{default:e.withCtx(()=>[t.checked!="indeterminate"?(e.openBlock(),e.createBlock(w._sfc_main,{key:0,icon:"tabler:check",size:q.value},null,8,["size"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass([e.unref(r.getBemElement)(e.unref(c),"indeterminate"),o.indeterminateCls])},null,2))]),_:1},8,["class"])]),_:1},16,["checked","id","class"]),_.value?(e.openBlock(),e.createElementBlock("label",{key:0,for:b.value,class:e.normalizeClass([e.unref(r.getBemElement)(e.unref(c),"label"),o.labelCls])},[e.renderSlot(o.$slots,"default",{checked:o.checked,disabled:o.disabled,required:o.required},()=>[e.createTextVNode(e.toDisplayString(y.value),1)])],10,O)):e.createCommentVNode("",!0)],16))}});exports.CheckboxSizes=g;exports._sfc_main=z;exports._sfc_main$1=D;exports.injectCheckboxGroupContext=B;exports.provideCheckboxGroupContext=$;exports.useColoredPantographCheckbox=N;exports.useColoredPantographCheckboxGroup=A;
|
|
@@ -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-pWUK1jtk.js");exports.CheckboxGroup=e._sfc_main$1;exports.injectCheckboxGroupContext=e.injectCheckboxGroupContext;exports.provideCheckboxGroupContext=e.provideCheckboxGroupContext;
|