@pantograph/vue 0.30.15 → 0.30.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionButton/index.js +1 -1
- package/dist/ActionButton/index.umd.cjs +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-DUTQMgx0.js → ActionButton.vue_vue_type_script_setup_true_lang-BNcIbOqh.js} +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-md1ppHCX.js → ActionButton.vue_vue_type_script_setup_true_lang-CZ8fi9pP.js} +1 -1
- package/dist/Alert/index.js +2 -2
- package/dist/Alert/index.umd.cjs +1 -1
- package/dist/Avatar/index.js +2 -2
- package/dist/Avatar/index.umd.cjs +1 -1
- package/dist/Avatar.vue_vue_type_style_index_0_lang-CDS2HSEG.js +1 -0
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-CMZWw-cd.js → Avatar.vue_vue_type_style_index_0_lang-bdprhtPJ.js} +59 -58
- package/dist/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/AvatarGroup/index.umd.cjs +1 -1
- package/dist/Badge/index.js +1 -1
- package/dist/Badge/index.umd.cjs +1 -1
- package/dist/{Badge.vue_vue_type_script_setup_true_lang-CQFRqDV5.js → Badge.vue_vue_type_script_setup_true_lang-BqJFLc4T.js} +1 -1
- package/dist/{Badge.vue_vue_type_script_setup_true_lang-B4ny-e_O.js → Badge.vue_vue_type_script_setup_true_lang-DUriFX2R.js} +1 -1
- package/dist/Base/BaseBadge/BaseBadge.d.ts +10 -11
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-CwP-zfy9.js +95 -0
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-D7hTJXf9.js +1 -0
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-D34wKLFG.js → BaseButton.vue_vue_type_style_index_0_lang-B-UIQjF_.js} +31 -28
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-BNHYQnWU.js +1 -0
- package/dist/Blanket/index.d.ts +1 -1
- package/dist/Breadcrumb/Breadcrumb.d.ts +150 -0
- package/dist/Breadcrumb/Breadcrumb.model.d.ts +8 -0
- package/dist/Breadcrumb/BreadcrumbItem.d.ts +39 -0
- package/dist/Breadcrumb/_index.d.ts +13 -0
- package/dist/Button/index.js +1 -1
- package/dist/Button/index.umd.cjs +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-Dj0TeKv5.js → Button.vue_vue_type_script_setup_true_lang-BX8LelJk.js} +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-COsqOG6i.js → Button.vue_vue_type_script_setup_true_lang-DVRSkhfU.js} +1 -1
- package/dist/Checkbox/index.js +2 -2
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-BjhfMpGt.js → Checkbox.vue_vue_type_style_index_0_lang-evu2oYXX.js} +4 -1
- package/dist/CheckboxGroup/index.js +1 -1
- package/dist/Chip/index.js +2 -2
- package/dist/Chip/index.umd.cjs +1 -1
- package/dist/{Chip.vue_vue_type_style_index_0_lang-C8hcmlvc.js → Chip.vue_vue_type_style_index_0_lang-BqO-H-4u.js} +1 -1
- package/dist/{Chip.vue_vue_type_style_index_0_lang-CSqQRmWd.js → Chip.vue_vue_type_style_index_0_lang-DGqR2sQv.js} +1 -1
- package/dist/ChipGroup/ChipGroup.d.ts +2 -2
- package/dist/ChipGroup/index.js +1 -1
- package/dist/ChipGroup/index.umd.cjs +1 -1
- package/dist/ColorPicker/index.js +2 -2
- package/dist/ColorPicker/index.umd.cjs +1 -1
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-BR5_BBtX.js → ColorPicker.vue_vue_type_style_index_0_lang-CCLtUcKi.js} +2 -2
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-BXQomO80.js → ColorPicker.vue_vue_type_style_index_0_lang-Q_fWB8I8.js} +1 -1
- package/dist/ColorSwatch/index.js +2 -2
- package/dist/ColorSwatch/index.umd.cjs +1 -1
- package/dist/ColorSwatchGroup/index.js +5 -2
- package/dist/ColorSwatchGroup/index.umd.cjs +1 -1
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-CwnowPnQ.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-CDRePazm.js} +1 -1
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-Cgyamtd1.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-qdjb38MJ.js} +1 -1
- package/dist/ColorTrigger/ColorTrigger.d.ts +4 -2
- package/dist/ColorTrigger/index.js +2 -2
- package/dist/ColorTrigger/index.umd.cjs +1 -1
- package/dist/ColorTrigger.vue_vue_type_style_index_0_lang-BR_3jHvV.js +1 -0
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-Bvi_UHyF.js → ColorTrigger.vue_vue_type_style_index_0_lang-Ci7-P9B7.js} +19 -19
- package/dist/Combobox/Combobox.d.ts +14 -14
- package/dist/Combobox/index.js +262 -258
- package/dist/Combobox/index.umd.cjs +1 -1
- package/dist/Comment/CommentMention.d.ts +30 -30
- package/dist/Comment/index.js +286 -286
- package/dist/Comment/index.umd.cjs +1 -1
- package/dist/ConfigProvider/index.js +4 -1
- package/dist/DataTable/index.js +715 -729
- package/dist/DataTable/index.umd.cjs +1 -1
- package/dist/DataTable/types/column.d.ts +1 -0
- package/dist/DropZone/DropZone.d.ts +4 -4
- package/dist/DropZone/index.js +5 -5
- package/dist/DropZone/index.umd.cjs +1 -1
- package/dist/FloatButton/index.js +1 -1
- package/dist/FloatButton/index.umd.cjs +1 -1
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-Dadp9ViH.js → FloatButton.vue_vue_type_script_setup_true_lang-1ZSyOCUZ.js} +1 -1
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-DFZD1E5T.js → FloatButton.vue_vue_type_script_setup_true_lang-C6_a_qAd.js} +1 -1
- package/dist/GOPicker/GOPicker.d.ts +7 -6
- package/dist/GOPicker/index.js +7 -7
- package/dist/GOPicker/index.umd.cjs +1 -1
- package/dist/GraphicalObject/index.js +5 -2
- package/dist/GraphicalObject/index.umd.cjs +1 -1
- package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-D8zWdo89.js → GraphicalObject.vue_vue_type_script_setup_true_lang-Bq3vS9vp.js} +1 -1
- package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-BDZKksip.js → GraphicalObject.vue_vue_type_script_setup_true_lang-DVkWOhwp.js} +1 -1
- package/dist/GraphicalObjectGroup/GraphicalObjectGroup.d.ts +2 -2
- package/dist/GraphicalObjectGroup/index.js +35 -31
- package/dist/GraphicalObjectGroup/index.umd.cjs +1 -1
- package/dist/IconButton/index.js +1 -1
- package/dist/IconButton/index.umd.cjs +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-BR82Bz96.js → IconButton.vue_vue_type_script_setup_true_lang-4_qFjriZ.js} +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-i5ZOiWt-.js → IconButton.vue_vue_type_script_setup_true_lang-CgGTR6vM.js} +1 -1
- package/dist/IndentLevel/index.js +2 -2
- package/dist/IndentLevel/index.umd.cjs +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-C9CGzPFs.js → IndentLevel.vue_vue_type_style_index_0_lang-B8DEUVXb.js} +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-2IAeKcy_.js → IndentLevel.vue_vue_type_style_index_0_lang-TU4z8CYL.js} +1 -1
- package/dist/Indicator/index.js +1 -1
- package/dist/Indicator/index.umd.cjs +1 -1
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-DRwrazbG.js → Indicator.vue_vue_type_script_setup_true_lang-Bm51mCOj.js} +1 -1
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-Ds4syJ4w.js → Indicator.vue_vue_type_script_setup_true_lang-q_awX-ua.js} +1 -1
- package/dist/Kbd/index.d.ts +1 -1
- package/dist/Label/index.d.ts +1 -1
- package/dist/Link/index.d.ts +1 -1
- package/dist/Menu/Menu.d.ts +271 -107
- package/dist/Menu/index.js +2 -2
- package/dist/Menu/index.umd.cjs +1 -1
- package/dist/MenuItem/MenuItem.d.ts +12 -0
- package/dist/MenuItem/MenuItemContent.d.ts +3 -1
- package/dist/MenuItem/index.js +2 -2
- package/dist/MenuItem/index.umd.cjs +1 -1
- package/dist/{MenuItem.vue_vue_type_style_index_0_lang-2q0oU5qK.js → MenuItem.vue_vue_type_style_index_0_lang-CuYCh2j-.js} +46 -56
- package/dist/MenuItem.vue_vue_type_style_index_0_lang-D9vo-si5.js +1 -0
- package/dist/Pagination/index.js +2 -2
- package/dist/Pagination/index.umd.cjs +1 -1
- package/dist/RadioGroup/index.js +4 -1
- package/dist/ScrollContainer/index.js +4 -1
- package/dist/Segmented/Segmented.d.ts +15 -0
- package/dist/Segmented/index.js +2 -2
- package/dist/Segmented/index.umd.cjs +1 -1
- package/dist/Segmented.vue_vue_type_style_index_0_lang-Bduy19EW.js +202 -0
- package/dist/Segmented.vue_vue_type_style_index_0_lang-DUcuzut9.js +1 -0
- package/dist/Select/index.js +2 -2
- package/dist/Select/index.umd.cjs +1 -1
- package/dist/{Select.vue_vue_type_style_index_0_lang-DvjjIQFT.js → Select.vue_vue_type_style_index_0_lang-Byazjliv.js} +2 -2
- package/dist/{Select.vue_vue_type_style_index_0_lang-BzgyiyJr.js → Select.vue_vue_type_style_index_0_lang-CVRN1sqo.js} +1 -1
- package/dist/Steps/index.js +102 -104
- package/dist/Steps/index.umd.cjs +1 -1
- package/dist/SubMenu/index.js +1 -1
- package/dist/SubMenu/index.umd.cjs +1 -1
- package/dist/Tabs/index.js +2 -2
- package/dist/Tabs/index.umd.cjs +1 -1
- package/dist/Toast/index.js +2 -2
- package/dist/Toast/index.umd.cjs +1 -1
- package/dist/Tree/Tree.d.ts +6 -7
- package/dist/Tree/index.js +1 -1
- package/dist/Tree/index.umd.cjs +1 -1
- package/dist/Tree/utils.d.ts +2 -2
- package/dist/Upload/Upload.d.ts +1 -1
- package/dist/Upload/index.js +7 -4
- package/dist/Upload/index.umd.cjs +1 -1
- package/dist/index-BUzezp9o.js +1 -0
- package/dist/index-BhaFiUPP.js +78 -0
- package/dist/{index-C0VS23FW.js → index-DEKw8hhq.js} +92 -92
- package/dist/index-ZRVUL1QN.js +1 -0
- package/dist/index.js +418 -417
- package/dist/index.umd.cjs +1 -1
- package/dist/style/index.css +1 -1
- package/dist/use/index.js +421 -418
- package/dist/use/index.umd.cjs +1 -1
- package/package.json +1 -1
- package/dist/Avatar.vue_vue_type_style_index_0_lang-KicZdDY5.js +0 -1
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-DDBBnMzY.js +0 -1
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-h6OJcaiv.js +0 -94
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-C_Z9AE3Z.js +0 -1
- package/dist/ColorTrigger.vue_vue_type_style_index_0_lang-B6h8UYUo.js +0 -1
- package/dist/MenuItem.vue_vue_type_style_index_0_lang-DxK5l1Cv.js +0 -1
- package/dist/Segmented.vue_vue_type_style_index_0_lang-CCAxhINA.js +0 -169
- package/dist/Segmented.vue_vue_type_style_index_0_lang-DyOI710D.js +0 -1
- package/dist/index-B1i4l7x_.js +0 -1
- package/dist/index-CZ5v-Cfi.js +0 -1
- package/dist/index-GgakTU7m.js +0 -77
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as t } from "../ActionButton.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as t } from "../ActionButton.vue_vue_type_script_setup_true_lang-BNcIbOqh.js";
|
|
2
2
|
import { installComponent as o } from "@pantograph/utils-vue";
|
|
3
3
|
import { getComponentName as n } from "@pantograph/utils";
|
|
4
4
|
const r = o(t, n("ActionButton"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../ActionButton.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../ActionButton.vue_vue_type_script_setup_true_lang-CZ8fi9pP.js"),e=require("@pantograph/utils-vue"),n=require("@pantograph/utils"),u=e.installComponent(t._sfc_main,n.getComponentName("ActionButton"));exports.ActionButton=t._sfc_main;exports.default=t._sfc_main;exports.ActionButtonPlugin=u;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as c, useAttrs as l, computed as u, ref as m, createBlock as f, openBlock as y, mergeProps as d, createSlots as B, renderList as b, withCtx as g, renderSlot as _, normalizeProps as v, guardReactiveProps as k } from "vue";
|
|
2
2
|
import { omit as I } from "es-toolkit";
|
|
3
|
-
import { _ as O } from "./BaseButton.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import { _ as O } from "./BaseButton.vue_vue_type_style_index_0_lang-B-UIQjF_.js";
|
|
4
4
|
import { getComponentOptions as S } from "@pantograph/utils";
|
|
5
5
|
const R = /* @__PURE__ */ c({
|
|
6
6
|
...S("ActionButton", !1),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),p=require("es-toolkit"),u=require("./BaseButton.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";const e=require("vue"),p=require("es-toolkit"),u=require("./BaseButton.vue_vue_type_style_index_0_lang-BNHYQnWU.js"),y=require("@pantograph/utils"),_=e.defineComponent({...y.getComponentOptions("ActionButton",!1),__name:"ActionButton",props:{as:{},class:{type:[Array,Object,String,Number,null,Boolean]},text:{},size:{},noRing:{type:Boolean},loading:{type:Boolean},active:{type:Boolean},badgeText:{},badgeIcon:{},icon:{},preIcon:{},postIcon:{},customStroke:{type:Boolean},preIconCustomStroke:{type:Boolean},postIconCustomStroke:{type:Boolean},flipOnDir:{},preIconFlipOnDir:{},postIconFlipOnDir:{},badgeIconFlipOnDir:{},htmlType:{},block:{type:Boolean},disabled:{type:Boolean,default:void 0},hover:{type:Boolean},href:{},target:{},type:{},variant:{}},setup(r,{expose:s}){const a=r,c=e.useAttrs(),i=e.computed(()=>({...p.omit(c,["color","type","variant","action"]),...a})),t=e.ref();return s({focus(){var o;(o=t.value)==null||o.focus()},blur(){var o;(o=t.value)==null||o.blur()}}),(o,f)=>(e.openBlock(),e.createBlock(u._sfc_main,e.mergeProps(i.value,{action:"",ref_key:"buttonRef",ref:t}),e.createSlots({_:2},[e.renderList(Object.keys(o.$slots),n=>({name:n,fn:e.withCtx(l=>[e.renderSlot(o.$slots,n,e.normalizeProps(e.guardReactiveProps(l)))])}))]),1040))}});exports._sfc_main=_;
|
package/dist/Alert/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as N, useSlots as S, computed as $, createElementBlock as m, openBlock as i, normalizeStyle as h, normalizeClass as o, unref as e, createBlock as O, createCommentVNode as b, createElementVNode as j, createSlots as z, withCtx as P, renderSlot as r, createTextVNode as g, toDisplayString as p, createVNode as f, normalizeProps as V, guardReactiveProps as w } from "vue";
|
|
2
2
|
import { getComponentOptions as E, getBemBlock as I, generateVariantClassList as L, normCls as s, getBemElement as c, getComponentName as T } from "@pantograph/utils";
|
|
3
3
|
import { cva as x } from "class-variance-authority";
|
|
4
|
-
import { _ as D } from "../IconButton.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { _ as M } from "../GraphicalObject.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as D } from "../IconButton.vue_vue_type_script_setup_true_lang-4_qFjriZ.js";
|
|
5
|
+
import { _ as M } from "../GraphicalObject.vue_vue_type_script_setup_true_lang-Bq3vS9vp.js";
|
|
6
6
|
import { Link as R } from "../Link/index.js";
|
|
7
7
|
import { installComponent as q } from "@pantograph/utils-vue";
|
|
8
8
|
const F = ["info", "success", "danger", "warning", "hint"], G = /* @__PURE__ */ N({
|
package/dist/Alert/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("@pantograph/utils"),f=require("class-variance-authority"),C=require("../IconButton.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("@pantograph/utils"),f=require("class-variance-authority"),C=require("../IconButton.vue_vue_type_script_setup_true_lang-CgGTR6vM.js"),p=require("../GraphicalObject.vue_vue_type_script_setup_true_lang-DVkWOhwp.js"),B=require("../Link/index.umd.cjs"),k=require("@pantograph/utils-vue"),u=["info","success","danger","warning","hint"],a=e.defineComponent({...l.getComponentOptions("Alert"),__name:"Alert",props:{type:{default:"hint"},closeable:{type:Boolean},class:{type:[Array,Object,String,Number,null,Boolean]},icon:{},iconCls:{type:[Array,Object,String,Number,null,Boolean]},bodyCls:{type:[Array,Object,String,Number,null,Boolean]},closeableCls:{type:[Array,Object,String,Number,null,Boolean]},fg:{},br:{},bg:{},title:{},titleCls:{type:[Array,Object,String,Number,null,Boolean]},description:{},descriptionCls:{type:[Array,Object,String,Number,null,Boolean]},link:{type:Boolean},linkProps:{}},emits:["close"],setup(t,{emit:m}){const s=t,d=m,n=l.getBemBlock("alert"),g=f.cva(n,{variants:{type:l.generateVariantClassList(u,n)}}),r=e.useSlots(),y={success:"tabler:circle-check",warning:"tabler:alert-triangle",danger:"tabler:circle-x",hint:"tabler:bulb",info:"tabler:info-circle"},i=e.computed(()=>s.icon??y[s.type]);return(o,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l.normCls)(e.unref(g)({type:t.type}),s.class)),style:e.normalizeStyle({"--ptc-alert-fg":t.fg,"--ptc-alert-bg":t.bg,"--ptc-alert-br":t.br})},[r.icon||i.value?(e.openBlock(),e.createBlock(p._sfc_main,{key:0,size:"sm",icon:i.value,class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(n),"icon"),t.iconCls))},e.createSlots({_:2},[r.icon?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"icon")]),key:"0"}:void 0]),1032,["icon","class"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(n),"body"),t.bodyCls))},[e.renderSlot(o.$slots,"default",{},()=>[t.title||r.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(n),"title"),t.titleCls,"paragraph"))},[e.renderSlot(o.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2)):e.createCommentVNode("",!0),t.description||r.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(n),"description"),t.descriptionCls,"paragraph"))},[e.renderSlot(o.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])],2)):e.createCommentVNode("",!0),t.link||r.link?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(l.getBemElement)(e.unref(n),"action"))},[e.renderSlot(o.$slots,"link",{},()=>[e.createVNode(e.unref(B.Link),e.normalizeProps(e.guardReactiveProps(t.linkProps)),null,16)])],2)):e.createCommentVNode("",!0)])],2),s.closeable||r.closeable?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(n),"closeable"),t.closeableCls))},[e.renderSlot(o.$slots,"closeable",{},()=>[e.createVNode(C._sfc_main,{icon:"tabler:x",color:"neutral",size:"sm",type:"ghost",onClick:c[0]||(c[0]=b=>d("close",b))})])],2)):e.createCommentVNode("",!0)],6))}}),v=k.installComponent(a,l.getComponentName("Alert"));exports.Alert=a;exports.AlertPlugin=v;exports.AlertTypes=u;exports.default=a;
|
package/dist/Avatar/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as a } from "../Avatar.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { b as p, c as A, d as v, e as f } from "../Avatar.vue_vue_type_style_index_0_lang-
|
|
1
|
+
import { _ as a } from "../Avatar.vue_vue_type_style_index_0_lang-bdprhtPJ.js";
|
|
2
|
+
import { b as p, c as A, d as v, e as f } from "../Avatar.vue_vue_type_style_index_0_lang-bdprhtPJ.js";
|
|
3
3
|
import { installComponent as t } from "@pantograph/utils-vue";
|
|
4
4
|
import { getComponentName as r } from "@pantograph/utils";
|
|
5
5
|
const m = t(a, r("Avatar"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../Avatar.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../Avatar.vue_vue_type_style_index_0_lang-CDS2HSEG.js"),t=require("@pantograph/utils-vue"),e=require("@pantograph/utils"),r=t.installComponent(a._sfc_main,e.getComponentName("Avatar"));exports.Avatar=a._sfc_main;exports.AvatarOnlineAlignments=a.AvatarOnlineAlignments;exports.AvatarShapes=a.AvatarShapes;exports.AvatarSizes=a.AvatarSizes;exports.AvatarStrokes=a.AvatarStrokes;exports.default=a._sfc_main;exports.AvatarPlugin=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),p=require("reka-ui"),t=require("@pantograph/utils"),z=require("class-variance-authority"),y=require("@pantograph/utils-vue"),N=require("./HoverCard/index.umd.cjs");require("./Icon/index.umd.cjs");const G=require("./Indicator.vue_vue_type_script_setup_true_lang-Bm51mCOj.js"),w=require("./BaseBadge.model-DecqxaGN.js"),O=require("./Icon.vue_vue_type_style_index_0_lang-D9YESScE.js"),[S,_]=p.createContext("AvatarGroup"),P=e.defineComponent({...t.getComponentOptions("AvatarGroup"),__name:"AvatarGroup",props:{class:{type:[Array,Object,String,Number,null,Boolean]},gutter:{type:Boolean},size:{},stroke:{default:"white"},shape:{},popoverProps:{},maxCount:{},noPopover:{type:Boolean}},setup(a){const n=a,i=e.useSlots(),s=t.getBemBlock("avatar"),r=t.getBemElement(s,"group"),C=z.cva(r,{variants:{gutter:t.generateVariantClassList("gutter",r)}});_({props:n});const c=e.computed(()=>n.maxCount?Number(n.maxCount):0),d=e.computed(()=>C({gutter:n.gutter})),o=e.computed(()=>{switch(n.size){case"2xsm":case"xsm":case"sm":return"sm";case"lg":case"xlg":return"lg";default:return"md"}}),m=()=>{var g;const l=y.flattenChildren(((g=i.default)==null?void 0:g.call(i,{}))??[]),u=()=>e.h(b,{text:`+${l.length-c.value}`});return c.value>=1&&l.length>c.value?[...l.filter((k,v)=>v<c.value),n.noPopover?u():e.h(N.HoverCard,{size:o.value,...n.popoverProps??{}},{default:u,content:()=>e.h("div",{class:t.normCls(d.value,n.class)},{default:()=>l.filter((k,v)=>v>=c.value)})})]:l};return(l,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(t.normCls)(d.value,n.class))},[e.createVNode(m,{maxCount:a.maxCount},null,8,["maxCount"])],2))}}),L=y.installComponent(P,t.getComponentName("AvatarGroup")),V=["2xsm","xsm","sm","md","lg","xlg"],A=["gray-subtle","white",...w.BadgeColors],B=["circle","square","rect"],x={start:"online-start",end:"online-end"},b=e.defineComponent({...t.getComponentOptions("Avatar"),__name:"Avatar",props:{src:{default:""},class:{type:[Array,Object,String,Number,null,Boolean]},onlineColor:{default:"lime"},size:{},stroke:{},shape:{},online:{type:Boolean},unExtendParent:{type:Boolean,default:!1},alt:{},fallback:{},text:{},icon:{default:"tabler:user"},onlineAlignment:{default:"start"},referrerPolicy:{},crossOrigin:{},delayMs:{}},emits:["loadingStatusChange"],setup(a,{emit:n}){const i=e.useSlots(),s=t.getBemBlock("avatar"),r=a,C=n,c=p.useEmitAsProps(C),d=z.cva(s,{variants:{size:t.generateVariantClassList(V,s),stroke:t.generateVariantClassList(A,s),shape:t.generateVariantClassList(B,s),onlineAlignment:t.generateVariantClassList(x,s)}}),o=r.unExtendParent?void 0:S({props:r}),m=e.computed(()=>r.size??(o==null?void 0:o.props.size)??"md"),l=e.computed(()=>r.shape??(o==null?void 0:o.props.shape)??"circle"),u=e.computed(()=>r.stroke??(o==null?void 0:o.props.stroke)),g=e.computed(()=>{const f=m.value??"md",h=u.value&&A.includes(u.value)?u.value:"none",q=l.value&&B.includes(l.value)?l.value:"circle",E=x[r.onlineAlignment]?r.onlineAlignment:"start";return{size:f,stroke:h,shape:q,onlineAlignment:E}}),k=e.computed(()=>{switch(m.value){case"lg":case"xlg":return"tiny";default:return"tinier"}}),v=e.computed(()=>{switch(m.value){case"lg":case"xlg":return"sm";case"xsm":case"2xsm":return"3xsm";case"sm":case"md":default:return"xsm"}});return(f,h)=>(e.openBlock(),e.createBlock(e.unref(p.AvatarRoot),{as:"div",class:e.normalizeClass(e.unref(t.normCls)(e.unref(d)(g.value),r.class))},{default:e.withCtx(()=>[!i.default&&!a.text?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.src?(e.openBlock(),e.createBlock(e.unref(p.AvatarImage),e.mergeProps({key:0},e.unref(c),{src:a.src,alt:a.alt,class:e.unref(t.getBemElement)(e.unref(s),"image")}),null,16,["src","alt","class"])):e.createCommentVNode("",!0),e.createVNode(e.unref(p.AvatarFallback),{class:e.normalizeClass(e.unref(t.getBemElement)(e.unref(s),"fallback"))},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"fallback",{},()=>[a.fallback?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(O._sfc_main),{key:0,icon:a.icon,size:v.value},null,8,["icon","size"])),e.createTextVNode(" "+e.toDisplayString(a.fallback),1)])]),_:3},8,["class"])],64)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(t.getBemElement)(e.unref(s),"image"))},[e.renderSlot(f.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(a.text),1)])],2)),a.online?(e.openBlock(),e.createBlock(G._sfc_main,{key:2,color:a.onlineColor,size:k.value,class:e.normalizeClass(e.unref(t.getBemElement)(e.unref(s),"online"))},null,8,["color","size","class"])):e.createCommentVNode("",!0)]),_:3},8,["class"]))}});exports.AvatarGroupPlugin=L;exports.AvatarOnlineAlignments=x;exports.AvatarShapes=B;exports.AvatarSizes=V;exports.AvatarStrokes=A;exports._sfc_main=b;exports._sfc_main$1=P;exports.injectAvatarGroupContext=S;exports.provideAvatarGroupContext=_;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as _, useSlots as j, computed as l, createElementBlock as B, openBlock as u, normalizeClass as f, unref as e, createVNode as F, h as z, createBlock as k, withCtx as G, createCommentVNode as y, Fragment as M, mergeProps as R, renderSlot as N, createTextVNode as $, toDisplayString as w } from "vue";
|
|
2
2
|
import { createContext as T, useEmitAsProps as J, AvatarRoot as K, AvatarImage as Q, AvatarFallback as U } from "reka-ui";
|
|
3
|
-
import { getComponentOptions as
|
|
4
|
-
import { cva as
|
|
3
|
+
import { getComponentOptions as I, getBemBlock as q, getBemElement as g, generateVariantClassList as d, normCls as b, getComponentName as W } from "@pantograph/utils";
|
|
4
|
+
import { cva as D } from "class-variance-authority";
|
|
5
5
|
import { flattenChildren as X, installComponent as Y } from "@pantograph/utils-vue";
|
|
6
6
|
import { HoverCard as Z } from "./HoverCard/index.js";
|
|
7
7
|
import "./Icon/index.js";
|
|
8
|
-
import { _ as ee } from "./Indicator.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { _ as ee } from "./Indicator.vue_vue_type_script_setup_true_lang-q_awX-ua.js";
|
|
9
9
|
import { B as te } from "./BaseBadge.model-D4ZfMIfM.js";
|
|
10
10
|
import { _ as ae } from "./Icon.vue_vue_type_style_index_0_lang-D7PiBbDb.js";
|
|
11
|
-
const [se, ne] = T("AvatarGroup"), re = /* @__PURE__ */
|
|
12
|
-
...
|
|
11
|
+
const [se, ne] = T("AvatarGroup"), re = /* @__PURE__ */ _({
|
|
12
|
+
...I("AvatarGroup"),
|
|
13
13
|
__name: "AvatarGroup",
|
|
14
14
|
props: {
|
|
15
15
|
class: { type: [Array, Object, String, Number, null, Boolean] },
|
|
@@ -22,7 +22,7 @@ const [se, ne] = T("AvatarGroup"), re = /* @__PURE__ */ V({
|
|
|
22
22
|
noPopover: { type: Boolean }
|
|
23
23
|
},
|
|
24
24
|
setup(t) {
|
|
25
|
-
const a = t,
|
|
25
|
+
const a = t, m = j(), s = q("avatar"), n = g(s, "group"), S = D(n, {
|
|
26
26
|
variants: {
|
|
27
27
|
gutter: d("gutter", n)
|
|
28
28
|
}
|
|
@@ -31,7 +31,7 @@ const [se, ne] = T("AvatarGroup"), re = /* @__PURE__ */ V({
|
|
|
31
31
|
props: a
|
|
32
32
|
});
|
|
33
33
|
const c = l(() => a.maxCount ? Number(a.maxCount) : 0), x = l(
|
|
34
|
-
() =>
|
|
34
|
+
() => S({
|
|
35
35
|
gutter: a.gutter
|
|
36
36
|
})
|
|
37
37
|
), r = l(() => {
|
|
@@ -46,11 +46,12 @@ const [se, ne] = T("AvatarGroup"), re = /* @__PURE__ */ V({
|
|
|
46
46
|
default:
|
|
47
47
|
return "md";
|
|
48
48
|
}
|
|
49
|
-
}),
|
|
50
|
-
|
|
49
|
+
}), v = () => {
|
|
50
|
+
var A;
|
|
51
|
+
const o = X(((A = m.default) == null ? void 0 : A.call(m, {})) ?? []), i = () => z(le, { text: `+${o.length - c.value}` });
|
|
51
52
|
return c.value >= 1 && o.length > c.value ? [
|
|
52
|
-
...o.filter((
|
|
53
|
-
a.noPopover ? i() :
|
|
53
|
+
...o.filter((h, p) => p < c.value),
|
|
54
|
+
a.noPopover ? i() : z(
|
|
54
55
|
Z,
|
|
55
56
|
{
|
|
56
57
|
size: r.value,
|
|
@@ -58,28 +59,28 @@ const [se, ne] = T("AvatarGroup"), re = /* @__PURE__ */ V({
|
|
|
58
59
|
},
|
|
59
60
|
{
|
|
60
61
|
default: i,
|
|
61
|
-
content: () =>
|
|
62
|
+
content: () => z(
|
|
62
63
|
"div",
|
|
63
|
-
{ class:
|
|
64
|
+
{ class: b(x.value, a.class) },
|
|
64
65
|
{
|
|
65
|
-
default: () => o.filter((
|
|
66
|
+
default: () => o.filter((h, p) => p >= c.value)
|
|
66
67
|
}
|
|
67
68
|
)
|
|
68
69
|
}
|
|
69
70
|
)
|
|
70
71
|
] : o;
|
|
71
72
|
};
|
|
72
|
-
return (o, i) => (u(),
|
|
73
|
-
class:
|
|
73
|
+
return (o, i) => (u(), B("div", {
|
|
74
|
+
class: f(e(b)(x.value, a.class))
|
|
74
75
|
}, [
|
|
75
|
-
|
|
76
|
+
F(v, { maxCount: t.maxCount }, null, 8, ["maxCount"])
|
|
76
77
|
], 2));
|
|
77
78
|
}
|
|
78
|
-
}), Ae = Y(re, W("AvatarGroup")), oe = ["2xsm", "xsm", "sm", "md", "lg", "xlg"],
|
|
79
|
+
}), Ae = Y(re, W("AvatarGroup")), oe = ["2xsm", "xsm", "sm", "md", "lg", "xlg"], E = ["gray-subtle", "white", ...te], O = ["circle", "square", "rect"], V = {
|
|
79
80
|
start: "online-start",
|
|
80
81
|
end: "online-end"
|
|
81
|
-
}, le = /* @__PURE__ */
|
|
82
|
-
...
|
|
82
|
+
}, le = /* @__PURE__ */ _({
|
|
83
|
+
...I("Avatar"),
|
|
83
84
|
__name: "Avatar",
|
|
84
85
|
props: {
|
|
85
86
|
src: { default: "" },
|
|
@@ -101,36 +102,36 @@ const [se, ne] = T("AvatarGroup"), re = /* @__PURE__ */ V({
|
|
|
101
102
|
},
|
|
102
103
|
emits: ["loadingStatusChange"],
|
|
103
104
|
setup(t, { emit: a }) {
|
|
104
|
-
const
|
|
105
|
+
const m = j(), s = q("avatar"), n = t, c = J(a), x = D(s, {
|
|
105
106
|
variants: {
|
|
106
107
|
size: d(oe, s),
|
|
107
|
-
stroke: d(
|
|
108
|
-
shape: d(
|
|
108
|
+
stroke: d(E, s),
|
|
109
|
+
shape: d(O, s),
|
|
109
110
|
onlineAlignment: d(
|
|
110
|
-
|
|
111
|
+
V,
|
|
111
112
|
s
|
|
112
113
|
)
|
|
113
114
|
}
|
|
114
115
|
}), r = n.unExtendParent ? void 0 : se({
|
|
115
116
|
props: n
|
|
116
|
-
}),
|
|
117
|
-
const
|
|
117
|
+
}), v = l(() => n.size ?? (r == null ? void 0 : r.props.size) ?? "md"), o = l(() => n.shape ?? (r == null ? void 0 : r.props.shape) ?? "circle"), i = l(() => n.stroke ?? (r == null ? void 0 : r.props.stroke)), A = l(() => {
|
|
118
|
+
const C = v.value ?? "md", P = i.value && E.includes(i.value) ? i.value : "none", H = o.value && O.includes(o.value) ? o.value : "circle", L = V[n.onlineAlignment] ? n.onlineAlignment : "start";
|
|
118
119
|
return {
|
|
119
|
-
size:
|
|
120
|
-
stroke:
|
|
120
|
+
size: C,
|
|
121
|
+
stroke: P,
|
|
121
122
|
shape: H,
|
|
122
123
|
onlineAlignment: L
|
|
123
124
|
};
|
|
124
|
-
}),
|
|
125
|
-
switch (
|
|
125
|
+
}), h = l(() => {
|
|
126
|
+
switch (v.value) {
|
|
126
127
|
case "lg":
|
|
127
128
|
case "xlg":
|
|
128
129
|
return "tiny";
|
|
129
130
|
default:
|
|
130
131
|
return "tinier";
|
|
131
132
|
}
|
|
132
|
-
}),
|
|
133
|
-
switch (
|
|
133
|
+
}), p = l(() => {
|
|
134
|
+
switch (v.value) {
|
|
134
135
|
case "lg":
|
|
135
136
|
case "xlg":
|
|
136
137
|
return "sm";
|
|
@@ -143,46 +144,46 @@ const [se, ne] = T("AvatarGroup"), re = /* @__PURE__ */ V({
|
|
|
143
144
|
return "xsm";
|
|
144
145
|
}
|
|
145
146
|
});
|
|
146
|
-
return (
|
|
147
|
+
return (C, P) => (u(), k(e(K), {
|
|
147
148
|
as: "div",
|
|
148
|
-
class:
|
|
149
|
+
class: f(e(b)(e(x)(A.value), n.class))
|
|
149
150
|
}, {
|
|
150
|
-
default:
|
|
151
|
-
!
|
|
152
|
-
t.src ? (u(),
|
|
151
|
+
default: G(() => [
|
|
152
|
+
!m.default && !t.text ? (u(), B(M, { key: 0 }, [
|
|
153
|
+
t.src ? (u(), k(e(Q), R({ key: 0 }, e(c), {
|
|
153
154
|
src: t.src,
|
|
154
155
|
alt: t.alt,
|
|
155
|
-
class: e(
|
|
156
|
-
}), null, 16, ["src", "alt", "class"])) :
|
|
157
|
-
|
|
158
|
-
class:
|
|
156
|
+
class: e(g)(e(s), "image")
|
|
157
|
+
}), null, 16, ["src", "alt", "class"])) : y("", !0),
|
|
158
|
+
F(e(U), {
|
|
159
|
+
class: f(e(g)(e(s), "fallback"))
|
|
159
160
|
}, {
|
|
160
|
-
default:
|
|
161
|
-
|
|
162
|
-
t.fallback ?
|
|
161
|
+
default: G(() => [
|
|
162
|
+
N(C.$slots, "fallback", {}, () => [
|
|
163
|
+
t.fallback ? y("", !0) : (u(), k(e(ae), {
|
|
163
164
|
key: 0,
|
|
164
165
|
icon: t.icon,
|
|
165
|
-
size:
|
|
166
|
+
size: p.value
|
|
166
167
|
}, null, 8, ["icon", "size"])),
|
|
167
|
-
|
|
168
|
+
$(" " + w(t.fallback), 1)
|
|
168
169
|
])
|
|
169
170
|
]),
|
|
170
171
|
_: 3
|
|
171
172
|
}, 8, ["class"])
|
|
172
|
-
], 64)) : (u(),
|
|
173
|
+
], 64)) : (u(), B("span", {
|
|
173
174
|
key: 1,
|
|
174
|
-
class:
|
|
175
|
+
class: f(e(g)(e(s), "image"))
|
|
175
176
|
}, [
|
|
176
|
-
|
|
177
|
-
|
|
177
|
+
N(C.$slots, "default", {}, () => [
|
|
178
|
+
$(w(t.text), 1)
|
|
178
179
|
])
|
|
179
180
|
], 2)),
|
|
180
|
-
t.online ? (u(),
|
|
181
|
+
t.online ? (u(), k(ee, {
|
|
181
182
|
key: 2,
|
|
182
183
|
color: t.onlineColor,
|
|
183
|
-
size:
|
|
184
|
-
class:
|
|
185
|
-
}, null, 8, ["color", "size", "class"])) :
|
|
184
|
+
size: h.value,
|
|
185
|
+
class: f(e(g)(e(s), "online"))
|
|
186
|
+
}, null, 8, ["color", "size", "class"])) : y("", !0)
|
|
186
187
|
]),
|
|
187
188
|
_: 3
|
|
188
189
|
}, 8, ["class"]));
|
|
@@ -192,10 +193,10 @@ export {
|
|
|
192
193
|
Ae as A,
|
|
193
194
|
le as _,
|
|
194
195
|
re as a,
|
|
195
|
-
|
|
196
|
-
|
|
196
|
+
V as b,
|
|
197
|
+
O as c,
|
|
197
198
|
oe as d,
|
|
198
|
-
|
|
199
|
+
E as e,
|
|
199
200
|
se as i,
|
|
200
201
|
ne as p
|
|
201
202
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as p, A as i, i as e, p as u } from "../Avatar.vue_vue_type_style_index_0_lang-
|
|
1
|
+
import { a as p, A as i, i as e, p as u } from "../Avatar.vue_vue_type_style_index_0_lang-bdprhtPJ.js";
|
|
2
2
|
import "@pantograph/utils-vue";
|
|
3
3
|
import "@pantograph/utils";
|
|
4
4
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../Avatar.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../Avatar.vue_vue_type_style_index_0_lang-CDS2HSEG.js");require("@pantograph/utils-vue");require("@pantograph/utils");exports.AvatarGroup=r._sfc_main$1;exports.AvatarGroupPlugin=r.AvatarGroupPlugin;exports.injectAvatarGroupContext=r.injectAvatarGroupContext;exports.provideAvatarGroupContext=r.provideAvatarGroupContext;
|
package/dist/Badge/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as o } from "../Badge.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as o } from "../Badge.vue_vue_type_script_setup_true_lang-DUriFX2R.js";
|
|
2
2
|
import { installComponent as a } from "@pantograph/utils-vue";
|
|
3
3
|
import { getComponentName as m } from "@pantograph/utils";
|
|
4
4
|
const r = a(o, m("Badge"));
|
package/dist/Badge/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Badge.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Badge.vue_vue_type_script_setup_true_lang-BqJFLc4T.js"),t=require("@pantograph/utils-vue"),u=require("@pantograph/utils"),n=t.installComponent(e._sfc_main,u.getComponentName("Badge"));exports.Badge=e._sfc_main;exports.default=e._sfc_main;exports.BadgePlugin=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("vue"),f=require("es-toolkit"),B=require("./BaseBadge.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";const o=require("vue"),f=require("es-toolkit"),B=require("./BaseBadge.vue_vue_type_style_index_0_lang-D7hTJXf9.js"),m=require("@pantograph/utils"),s=require("./BaseBadge.model-DecqxaGN.js"),r=require("@pantograph/tokens"),y=o.defineComponent({...m.getComponentOptions("Badge",!1),__name:"Badge",props:{class:{type:[Array,Object,String,Number,null,Boolean]},text:{},icon:{},flipOnDir:{},customStroke:{type:Boolean},size:{},color:{default:"primary"}},setup(c){const e=c,a=o.useAttrs(),t=[...s.BadgeColors,...s.BadgeColorsSubtle],i=[...s.BadgeColors,...s.BadgeColorsSubtle],u=()=>{if(i.includes(e.color)){if(e.color==="gray-subtle")return r.getCssCoreColor("gray-6");if(e.color==="yellow")return r.getCssCoreColor("grayscale-dark-0");if(s.BadgeColorsSubtle.includes(e.color))return r.getCssCoreColor(`${e.color.replace("-subtle","")}-5`);if(s.BadgeColors.includes(e.color))return r.getCssCoreColor("grayscale-light-0")}},g=()=>{if(t.includes(e.color)){if(e.color==="gray-subtle")return r.getCssCoreColor("gray-1");if(s.BadgeColorsSubtle.includes(e.color))return r.getCssCoreColor(`${e.color.replace("-subtle","")}-0`);if(s.BadgeColors.includes(e.color))return r.getCssCoreColor(`${e.color}-5`)}},C=o.computed(()=>e.color&&t.includes(e.color)?{bg:g(),fg:u()}:{bg:r.getCssCoreColor("primary-5"),fg:r.getCssCoreColor("primary-oncolor")}),d=o.computed(()=>({...f.omit(a,["type"]),...e,...C.value}));return(l,_)=>(o.openBlock(),o.createBlock(B._sfc_main,o.mergeProps(d.value,{type:"pill"}),o.createSlots({_:2},[o.renderList(Object.keys(l.$slots),n=>({name:n,fn:o.withCtx(p=>[o.renderSlot(l.$slots,n,o.normalizeProps(o.guardReactiveProps(p)))])}))]),1040))}});exports._sfc_main=y;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as y, useAttrs as b, computed as c, createBlock as C, openBlock as B, mergeProps as _, createSlots as $, renderList as k, withCtx as S, renderSlot as O, normalizeProps as h, guardReactiveProps as v } from "vue";
|
|
2
2
|
import { omit as P } from "es-toolkit";
|
|
3
|
-
import { _ as j } from "./BaseBadge.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import { _ as j } from "./BaseBadge.vue_vue_type_style_index_0_lang-CwP-zfy9.js";
|
|
4
4
|
import { getComponentOptions as w } from "@pantograph/utils";
|
|
5
5
|
import { B as e, a as t } from "./BaseBadge.model-D4ZfMIfM.js";
|
|
6
6
|
import { getCssCoreColor as o } from "@pantograph/tokens";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BadgeColor, BadgeColorSubtle, BadgeSize, BadgeType } from './BaseBadge.model';
|
|
2
|
+
import { IconSize } from '../../Icon';
|
|
2
3
|
import { FlipOnDir } from '../../ConfigProvider';
|
|
3
4
|
import { ClassValue } from 'clsx';
|
|
4
5
|
/**
|
|
@@ -59,20 +60,18 @@ export interface BaseBadgeSlots {
|
|
|
59
60
|
/**
|
|
60
61
|
* Slot for the icon
|
|
61
62
|
*/
|
|
62
|
-
icon?: (data?:
|
|
63
|
+
icon?: (data?: {
|
|
64
|
+
iconSize: IconSize;
|
|
65
|
+
}) => never;
|
|
63
66
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
};
|
|
70
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
71
|
-
declare const __VLS_component: import('vue').DefineComponent<BaseBadgeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BaseBadgeProps> & Readonly<{}>, {
|
|
67
|
+
/**
|
|
68
|
+
* function icon size based on the badge size
|
|
69
|
+
*/
|
|
70
|
+
export declare const getBadgeIconSize: (size: BadgeSize) => "2xsm" | "xsm" | "sm" | "3xsm";
|
|
71
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<BaseBadgeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BaseBadgeProps> & Readonly<{}>, {
|
|
72
72
|
type: BadgeType;
|
|
73
73
|
size: BadgeSize;
|
|
74
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
75
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
74
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, Readonly<BaseBadgeSlots> & BaseBadgeSlots>;
|
|
76
75
|
export default _default;
|
|
77
76
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
78
77
|
new (): {
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { defineComponent as O, useSlots as D, computed as m, createBlock as I, openBlock as E, h as x } from "vue";
|
|
2
|
+
import { getComponentOptions as L, getBemBlock as j, generateVariantClassList as s, isEmptyLikeLodash as w, normCls as A } from "@pantograph/utils";
|
|
3
|
+
import { cva as F } from "class-variance-authority";
|
|
4
|
+
import { isEmptyElement as B } from "@pantograph/utils-vue";
|
|
5
|
+
import { c as S, b as G } from "./BaseBadge.model-D4ZfMIfM.js";
|
|
6
|
+
import "./Icon/index.js";
|
|
7
|
+
import { useConfig as M } from "./ConfigProvider/index.js";
|
|
8
|
+
import { _ as N } from "./Icon.vue_vue_type_style_index_0_lang-D7PiBbDb.js";
|
|
9
|
+
const P = (r) => {
|
|
10
|
+
switch (r) {
|
|
11
|
+
case "sm":
|
|
12
|
+
return "xsm";
|
|
13
|
+
case "xsm":
|
|
14
|
+
return "2xsm";
|
|
15
|
+
case "2xsm":
|
|
16
|
+
return "3xsm";
|
|
17
|
+
case "md":
|
|
18
|
+
default:
|
|
19
|
+
return "sm";
|
|
20
|
+
}
|
|
21
|
+
}, U = /* @__PURE__ */ O({
|
|
22
|
+
...L("BaseBadge"),
|
|
23
|
+
__name: "BaseBadge",
|
|
24
|
+
props: {
|
|
25
|
+
size: { default: "md" },
|
|
26
|
+
class: { type: [Array, Object, String, Number, null, Boolean] },
|
|
27
|
+
text: {},
|
|
28
|
+
bg: {},
|
|
29
|
+
fg: {},
|
|
30
|
+
br: {},
|
|
31
|
+
type: { default: "pill" },
|
|
32
|
+
icon: {},
|
|
33
|
+
customStroke: { type: Boolean },
|
|
34
|
+
flipOnDir: {}
|
|
35
|
+
},
|
|
36
|
+
setup(r) {
|
|
37
|
+
const { getFlipOnDir: _ } = M(), z = _("flipOnDir"), n = j("badge"), e = r, h = F(n, {
|
|
38
|
+
variants: {
|
|
39
|
+
size: s(G, n),
|
|
40
|
+
type: s(S, n),
|
|
41
|
+
text: s("text", n),
|
|
42
|
+
icon: s("icon", n),
|
|
43
|
+
br: s("br", n)
|
|
44
|
+
}
|
|
45
|
+
}), i = D(), o = m(() => S.includes(e.type) ? e.type : "pill"), f = m(() => {
|
|
46
|
+
let t = e.size ?? "md";
|
|
47
|
+
return t === "sm" && o.value !== "rect" ? o.value === "minify" ? t = "tiny" : o.value === "pill" && (t = "md") : o.value === "minify" && !["tiny", "tinier"].includes(t) ? t = "tiny" : o.value !== "minify" && ["tiny", "tinier"].includes(t) && (t = "md"), t;
|
|
48
|
+
}), u = m(() => P(f.value)), k = () => {
|
|
49
|
+
var b, v;
|
|
50
|
+
const t = [];
|
|
51
|
+
let c, a;
|
|
52
|
+
const l = e.type === "minify";
|
|
53
|
+
l || (c = (b = i.icon) == null ? void 0 : b.call(i, { iconSize: u.value }), a = (v = i.default) == null ? void 0 : v.call(i, {}));
|
|
54
|
+
const d = !l && !B(a), g = !l && !B(c), p = !!(e.text === 0 || !w(e.text) || d), y = !!(e.icon || g);
|
|
55
|
+
(e.type === "rect" && p ? !1 : y) && t.push(
|
|
56
|
+
x(
|
|
57
|
+
N,
|
|
58
|
+
{
|
|
59
|
+
icon: e.icon,
|
|
60
|
+
size: u.value,
|
|
61
|
+
flipOnDir: z.value,
|
|
62
|
+
customStroke: e.customStroke
|
|
63
|
+
},
|
|
64
|
+
g ? {
|
|
65
|
+
default: () => c
|
|
66
|
+
} : void 0
|
|
67
|
+
)
|
|
68
|
+
), p && (d ? t.push(a) : t.push(e.text));
|
|
69
|
+
const C = {
|
|
70
|
+
size: f.value,
|
|
71
|
+
type: o.value,
|
|
72
|
+
text: p,
|
|
73
|
+
icon: y,
|
|
74
|
+
br: !!e.br
|
|
75
|
+
};
|
|
76
|
+
return x(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
class: A(h(C), e.class),
|
|
80
|
+
style: {
|
|
81
|
+
"--ptc-badge-fg": e.fg,
|
|
82
|
+
"--ptc-badge-bg": e.bg,
|
|
83
|
+
"--ptc-badge-br": e.br
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
t
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
return (t, c) => (E(), I(k));
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
export {
|
|
93
|
+
U as _,
|
|
94
|
+
P as g
|
|
95
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("vue"),s=require("@pantograph/utils"),k=require("class-variance-authority"),b=require("@pantograph/utils-vue"),m=require("./BaseBadge.model-DecqxaGN.js");require("./Icon/index.umd.cjs");const I=require("./ConfigProvider/index.umd.cjs"),L=require("./Icon.vue_vue_type_style_index_0_lang-D9YESScE.js"),x=r=>{switch(r){case"sm":return"xsm";case"xsm":return"2xsm";case"2xsm":return"3xsm";case"md":default:return"sm"}},V=n.defineComponent({...s.getComponentOptions("BaseBadge"),__name:"BaseBadge",props:{size:{default:"md"},class:{type:[Array,Object,String,Number,null,Boolean]},text:{},bg:{},fg:{},br:{},type:{default:"pill"},icon:{},customStroke:{type:Boolean},flipOnDir:{}},setup(r){const{getFlipOnDir:S}=I.useConfig(),h=S("flipOnDir"),i=s.getBemBlock("badge"),e=r,z=k.cva(i,{variants:{size:s.generateVariantClassList(m.BadgeSizes,i),type:s.generateVariantClassList(m.BadgeTypes,i),text:s.generateVariantClassList("text",i),icon:s.generateVariantClassList("icon",i),br:s.generateVariantClassList("br",i)}}),o=n.useSlots(),a=n.computed(()=>m.BadgeTypes.includes(e.type)?e.type:"pill"),d=n.computed(()=>{let t=e.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}),f=n.computed(()=>x(d.value)),C=()=>{var v,B;const t=[];let c,l;const u=e.type==="minify";u||(c=(v=o.icon)==null?void 0:v.call(o,{iconSize:f.value}),l=(B=o.default)==null?void 0:B.call(o,{}));const g=!u&&!b.isEmptyElement(l),y=!u&&!b.isEmptyElement(c),p=!!(e.text===0||!s.isEmptyLikeLodash(e.text)||g),_=!!(e.icon||y);(e.type==="rect"&&p?!1:_)&&t.push(n.h(L._sfc_main,{icon:e.icon,size:f.value,flipOnDir:h.value,customStroke:e.customStroke},y?{default:()=>c}:void 0)),p&&(g?t.push(l):t.push(e.text));const q={size:d.value,type:a.value,text:p,icon:_,br:!!e.br};return n.h("div",{class:s.normCls(z(q),e.class),style:{"--ptc-badge-fg":e.fg,"--ptc-badge-bg":e.bg,"--ptc-badge-br":e.br}},t)};return(t,c)=>(n.openBlock(),n.createBlock(C))}});exports._sfc_main=V;exports.getBadgeIconSize=x;
|