@pantograph/vue 0.14.2 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionButton/index.js +1 -1
- package/dist/ActionButton/index.umd.cjs +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-SWGqIOkL.js → ActionButton.vue_vue_type_script_setup_true_lang-4bWnl8i0.js} +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-CIRnLjGb.js → ActionButton.vue_vue_type_script_setup_true_lang-C_7SZxPE.js} +2 -2
- package/dist/Alert/index.js +1 -1
- package/dist/Alert/index.umd.cjs +1 -1
- package/dist/{Alert.vue_vue_type_style_index_0_lang-CgaIpUlB.js → Alert.vue_vue_type_style_index_0_lang-BSPB5uP9.js} +4 -4
- package/dist/{Alert.vue_vue_type_style_index_0_lang-igQvl6PR.js → Alert.vue_vue_type_style_index_0_lang-De8BdiEm.js} +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/Avatar/index.umd.cjs +1 -1
- package/dist/Avatar.vue_vue_type_style_index_0_lang-CrIwlgJN.js +1 -0
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-CsXvz6XE.js → Avatar.vue_vue_type_style_index_0_lang-DeTUyD13.js} +68 -53
- package/dist/AvatarGroup/AvatarGroup.d.ts +2 -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-CvnE7Srj.js +1 -0
- package/dist/Badge.vue_vue_type_script_setup_true_lang-DYPVS-yf.js +66 -0
- package/dist/BaseBadge.model-B27aBzz_.js +45 -0
- package/dist/BaseBadge.model-qrHPAcrC.js +1 -0
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-BGO_OgyI.js +87 -0
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-CKgCe7Up.js +1 -0
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-BG8oFqnh.js → BaseButton.vue_vue_type_style_index_0_lang-CgMukDgL.js} +4 -4
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-CDioOTsQ.js → BaseButton.vue_vue_type_style_index_0_lang-eeWTMdbl.js} +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/Button/index.umd.cjs +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-B4NQ4Dxa.js → Button.vue_vue_type_script_setup_true_lang-B6PUOUfI.js} +2 -2
- package/dist/{Button.vue_vue_type_script_setup_true_lang-BCRCGuJq.js → Button.vue_vue_type_script_setup_true_lang-DjzpN9q5.js} +1 -1
- package/dist/Checkbox/index.js +1 -1
- package/dist/Checkbox/index.umd.cjs +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-Dpzk-ikf.js → Checkbox.vue_vue_type_style_index_0_lang-BoCylzCv.js} +14 -14
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-CP6XeMyz.js +1 -0
- package/dist/CheckboxGroup/index.js +1 -1
- package/dist/CheckboxGroup/index.umd.cjs +1 -1
- package/dist/Chip/Chip.d.ts +55 -0
- package/dist/Chip/Chip.model.d.ts +4 -0
- package/dist/Chip/index.d.ts +2 -0
- package/dist/Chip/index.js +8 -0
- package/dist/Chip/index.umd.cjs +1 -0
- package/dist/Chip.vue_vue_type_style_index_0_lang-B8_9Fuov.js +114 -0
- package/dist/Chip.vue_vue_type_style_index_0_lang-DkdkKJvb.js +1 -0
- package/dist/ChipGroup/ChipGroup.d.ts +38 -0
- package/dist/ChipGroup/index.d.ts +1 -0
- package/dist/ChipGroup/index.js +7 -0
- package/dist/ChipGroup/index.umd.cjs +1 -0
- package/dist/ChipGroup.vue_vue_type_style_index_0_lang-Cn0SS405.js +74 -0
- package/dist/ChipGroup.vue_vue_type_style_index_0_lang-DXgB3D2F.js +1 -0
- package/dist/ColorPicker/index.js +1 -1
- package/dist/ColorPicker/index.umd.cjs +1 -1
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-znCqIygO.js → ColorPicker.vue_vue_type_style_index_0_lang-BJqIuqb1.js} +1 -1
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-C7mV51Ad.js → ColorPicker.vue_vue_type_style_index_0_lang-OlYb1GsW.js} +3 -3
- package/dist/ColorSwatch/index.js +1 -1
- package/dist/ColorSwatch/index.umd.cjs +1 -1
- package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-BmHfEa7I.js → ColorSwatch.vue_vue_type_style_index_0_lang-B35b1BsJ.js} +3 -3
- package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-03eJikYh.js → ColorSwatch.vue_vue_type_style_index_0_lang-DmhhCVv7.js} +1 -1
- package/dist/ColorSwatchGroup/index.js +1 -1
- package/dist/ColorSwatchGroup/index.umd.cjs +1 -1
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-B77FnS5z.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-CUBuxVaq.js} +7 -7
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-DkF3uee8.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-CYLmaqeI.js} +1 -1
- package/dist/ColorTrigger/index.js +1 -1
- package/dist/ColorTrigger/index.umd.cjs +1 -1
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-Q00MQEXY.js → ColorTrigger.vue_vue_type_style_index_0_lang-DNZxq-yR.js} +4 -4
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-DtSOxztA.js → ColorTrigger.vue_vue_type_style_index_0_lang-YWVLXFVc.js} +1 -1
- package/dist/ConfigProvider/index.js +1 -1
- package/dist/DataTable/index.js +1 -1
- package/dist/DataTable/index.umd.cjs +1 -1
- package/dist/DataTable.vue_vue_type_style_index_0_lang-BP5c0rda.js +1 -0
- package/dist/{DataTable.vue_vue_type_style_index_0_lang-wUSNbKN5.js → DataTable.vue_vue_type_style_index_0_lang-C-7s05L-.js} +198 -197
- package/dist/Empty/index.js +1 -1
- package/dist/{Empty.vue_vue_type_style_index_0_lang-DIgNReMG.js → Empty.vue_vue_type_style_index_0_lang-Jm_jtiLY.js} +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-B_StGCXt.js → FloatButton.vue_vue_type_script_setup_true_lang-BxvHC70e.js} +2 -2
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-B1XPEkaM.js → FloatButton.vue_vue_type_script_setup_true_lang-COenBFvO.js} +1 -1
- package/dist/GraphicalObject/index.js +1 -1
- package/dist/GraphicalObject/index.umd.cjs +1 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-Bc5zh_wp.js +63 -0
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-CwxMftZ5.js +1 -0
- package/dist/Icon/index.js +1 -1
- package/dist/{Icon.vue_vue_type_style_index_0_lang-BbOuVnaS.js → Icon.vue_vue_type_style_index_0_lang-D2A2tkHI.js} +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-BCKUoXMR.js → IconButton.vue_vue_type_script_setup_true_lang-Bi_qwuVm.js} +2 -2
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-8SXYjPFD.js → IconButton.vue_vue_type_script_setup_true_lang-efWR_OuR.js} +1 -1
- package/dist/Image/index.js +1 -1
- package/dist/{Image.vue_vue_type_style_index_0_lang-BCEUJNgp.js → Image.vue_vue_type_style_index_0_lang-BgSo-YAW.js} +3 -3
- package/dist/IndentLevel/index.js +1 -1
- package/dist/IndentLevel/index.umd.cjs +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-Balon_8b.js → IndentLevel.vue_vue_type_style_index_0_lang-C_b-LVE0.js} +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-B8LQPGav.js → IndentLevel.vue_vue_type_style_index_0_lang-ChiSKb-J.js} +3 -3
- 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-DjRN5aRj.js +40 -0
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-RPFjQEzE.js +1 -0
- package/dist/Input/index.js +1 -1
- package/dist/{Input.vue_vue_type_style_index_0_lang-B2Z-qNGX.js → Input.vue_vue_type_style_index_0_lang-CCKpwRTa.js} +35 -35
- package/dist/Kbd/index.js +1 -1
- package/dist/{Kbd.vue_vue_type_style_index_0_lang-qT4atWnM.js → Kbd.vue_vue_type_style_index_0_lang-4JCBBCVt.js} +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/{Link.vue_vue_type_style_index_0_lang-CwqNtUft.js → Link.vue_vue_type_style_index_0_lang-klDK1kuj.js} +2 -2
- package/dist/Menu/index.js +1 -1
- package/dist/Menu/index.umd.cjs +1 -1
- package/dist/{Menu.vue_vue_type_style_index_0_lang-B4nElqHh.js → Menu.vue_vue_type_style_index_0_lang-BVNhKBcu.js} +7 -7
- package/dist/{Menu.vue_vue_type_style_index_0_lang-DI8PfRfx.js → Menu.vue_vue_type_style_index_0_lang-DacaUajM.js} +1 -1
- package/dist/MenuItem/index.js +1 -1
- package/dist/MenuItem/index.umd.cjs +1 -1
- package/dist/Popover/Popover.d.ts +0 -1
- package/dist/Popover/index.js +1 -1
- package/dist/Popover/index.umd.cjs +1 -1
- package/dist/Popover.vue_vue_type_style_index_0_lang-B695YDJE.js +1 -0
- package/dist/{Popover.vue_vue_type_style_index_0_lang-0M5QF6zB.js → Popover.vue_vue_type_style_index_0_lang-ByhaxoQo.js} +20 -21
- package/dist/RadioGroup/index.js +1 -1
- package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-nmPTqQWQ.js → RadioGroup.vue_vue_type_script_setup_true_lang-B9tmAIEG.js} +1 -1
- package/dist/ScrollContainer/index.js +1 -1
- package/dist/{ScrollContainer.model-BjFK83Qc.js → ScrollContainer.model-BzodTc4p.js} +1 -1
- package/dist/Shortcut/index.js +1 -1
- package/dist/{Shortcut.vue_vue_type_style_index_0_lang-BVM8_oZn.js → Shortcut.vue_vue_type_style_index_0_lang-Ae0GyIDs.js} +2 -2
- package/dist/Spinner/index.js +1 -1
- package/dist/{Spinner.vue_vue_type_style_index_0_lang-BxkbqSR_.js → Spinner.vue_vue_type_style_index_0_lang-DxwACaLW.js} +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch.vue_vue_type_style_index_0_lang-EFeii6Wg.js → Switch.vue_vue_type_style_index_0_lang-mkO4UH9N.js} +2 -2
- package/dist/Tree/index.js +1 -1
- package/dist/Tree/index.umd.cjs +1 -1
- package/dist/{Tree.vue_vue_type_style_index_0_lang-DKH3b_ev.js → Tree.vue_vue_type_style_index_0_lang-DKtLWacR.js} +7 -7
- package/dist/{Tree.vue_vue_type_style_index_0_lang-CYGAlGwC.js → Tree.vue_vue_type_style_index_0_lang-DnnW2v03.js} +1 -1
- package/dist/{_baseIsEqual-D6OIyc9x.js → _baseIsEqual-B1yr67CO.js} +4 -4
- package/dist/{_flatRest-BFIiKgYv.js → _flatRest-Bw7fWA39.js} +2 -2
- package/dist/{_getTag-C1N7G_It.js → _getTag-z7QaQ5uZ.js} +1 -1
- package/dist/{cloneDeep-BNNspOg-.js → cloneDeep-unwWx7xF.js} +1 -1
- package/dist/{get-9cMI4wkc.js → get-FzuQyzCL.js} +1 -1
- package/dist/{index-D_hCmLp9.js → index-CKvTY2M1.js} +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +144 -136
- package/dist/index.umd.cjs +1 -1
- package/dist/{isArray-DGJFqUD8.js → isArray-CdbPONHA.js} +2 -2
- package/dist/{isEmpty-BfqMcSem.js → isEmpty-BEYnAygl.js} +2 -2
- package/dist/{isNumber-CFhCrbTP.js → isNumber-BopDesuz.js} +3 -3
- package/dist/{omit-BsFVls5E.js → omit-DB3u1XL5.js} +3 -3
- package/dist/{pick-CJI0LhLm.js → pick-BEnuz3iO.js} +3 -3
- package/dist/style/index.css +1 -1
- package/dist/{uniq-DI-nuzAz.js → uniq-Yl5OObL1.js} +2 -2
- package/package.json +12 -2
- package/dist/Avatar.vue_vue_type_style_index_0_lang-B--X3QQp.js +0 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-C6BNLMaW.js +0 -65
- package/dist/Badge.vue_vue_type_script_setup_true_lang-Dn33PgFw.js +0 -1
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-BCkm3H4P.js +0 -128
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-BeAtJkbh.js +0 -1
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-DXothnel.js +0 -1
- package/dist/DataTable.vue_vue_type_style_index_0_lang-zj_Bkt1X.js +0 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-BfmGxGrs.js +0 -62
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-CS169UvS.js +0 -1
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-B23gQXdq.js +0 -39
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-DW3eCurT.js +0 -1
- package/dist/Popover.vue_vue_type_style_index_0_lang-DexTJf-3.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../ActionButton.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../ActionButton.vue_vue_type_script_setup_true_lang-4bWnl8i0.js");exports.ActionButton=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),p=require("./omit-6FeILhm3.js"),l=require("./BaseButton.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";const e=require("vue"),p=require("./omit-6FeILhm3.js"),l=require("./BaseButton.vue_vue_type_style_index_0_lang-eeWTMdbl.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-DB3u1XL5.js";
|
|
3
|
+
import { _ as x } from "./BaseButton.vue_vue_type_style_index_0_lang-CgMukDgL.js";
|
|
4
4
|
import { g as y } from "./options-JBqnVZUl.js";
|
|
5
5
|
const R = /* @__PURE__ */ p({
|
|
6
6
|
...y("ActionButton", !1),
|
package/dist/Alert/index.js
CHANGED
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("../Alert.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Alert.vue_vue_type_style_index_0_lang-De8BdiEm.js");exports.Alert=e._sfc_main;exports.AlertTypes=e.AlertTypes;exports.default=e._sfc_main;
|
|
@@ -2,10 +2,10 @@ import { defineComponent as $, useSlots as h, computed as S, createElementBlock
|
|
|
2
2
|
import { getBemBlock as I, generateVariantClassList as T, getBemElement as r } from "@pantograph/utils";
|
|
3
3
|
import { cva as D } from "class-variance-authority";
|
|
4
4
|
import { g as L } from "./options-JBqnVZUl.js";
|
|
5
|
-
import { _ as M } from "./IconButton.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import "./Button.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as O } from "./GraphicalObject.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { _ as R } from "./Link.vue_vue_type_style_index_0_lang-
|
|
5
|
+
import { _ as M } from "./IconButton.vue_vue_type_script_setup_true_lang-Bi_qwuVm.js";
|
|
6
|
+
import "./Button.vue_vue_type_script_setup_true_lang-B6PUOUfI.js";
|
|
7
|
+
import { _ as O } from "./GraphicalObject.vue_vue_type_script_setup_true_lang-Bc5zh_wp.js";
|
|
8
|
+
import { _ as R } from "./Link.vue_vue_type_style_index_0_lang-klDK1kuj.js";
|
|
9
9
|
const j = ["info", "success", "danger", "warning", "hint"], W = /* @__PURE__ */ $({
|
|
10
10
|
...L("Alert"),
|
|
11
11
|
__name: "Alert",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),o=require("@pantograph/utils"),y=require("class-variance-authority"),f=require("./options-B4iSAKol.js"),B=require("./IconButton.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";const e=require("vue"),o=require("@pantograph/utils"),y=require("class-variance-authority"),f=require("./options-B4iSAKol.js"),B=require("./IconButton.vue_vue_type_script_setup_true_lang-efWR_OuR.js");require("./Button.vue_vue_type_script_setup_true_lang-DjzpN9q5.js");const k=require("./GraphicalObject.vue_vue_type_script_setup_true_lang-CwxMftZ5.js"),C=require("./Link.vue_vue_type_style_index_0_lang-C-Zg_lAq.js"),i=["info","success","danger","warning","hint"],b=e.defineComponent({...f.getComponentOptions("Alert"),__name:"Alert",props:{type:{default:"hint"},closeable:{type:Boolean},class:{},icon:{},iconCls:{},bodyCls:{},closeableCls:{},fg:{},br:{},bg:{},title:{},titleCls:{},description:{},descriptionCls:{},link:{type:Boolean},linkProps:{}},emits:["close"],setup(c,{emit:p}){const s=c,u=p,l=o.getBemBlock("alert"),m=y.cva(l,{variants:{type:o.generateVariantClassList(i,l)}}),n=e.useSlots(),d={success:"tabler:circle-check",warning:"tabler:alert-triangle",danger:"tabler:circle-x",hint:"tabler:bulb",info:"tabler:info-circle"},r=e.computed(()=>s.icon??d[s.type]);return(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(m)({type:t.type}),s.class]),style:e.normalizeStyle({"--ptc-alert-fg":t.fg,"--ptc-alert-bg":t.bg,"--ptc-alert-br":t.br})},[n.icon||r.value?(e.openBlock(),e.createBlock(k._sfc_main,{key:0,size:"md",icon:r.value,class:e.normalizeClass([e.unref(o.getBemElement)(e.unref(l),"icon"),t.iconCls])},e.createSlots({_:2},[n.icon?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"icon")]),key:"0"}:void 0]),1032,["icon","class"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([e.unref(o.getBemElement)(e.unref(l),"body"),t.bodyCls])},[e.renderSlot(t.$slots,"default",{},()=>[t.title||n.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(o.getBemElement)(e.unref(l),"title"),t.titleCls,"paragraph"])},[e.renderSlot(t.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2)):e.createCommentVNode("",!0),t.description||n.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(o.getBemElement)(e.unref(l),"description"),t.descriptionCls,"paragraph"])},[e.renderSlot(t.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])],2)):e.createCommentVNode("",!0),t.link||n.link?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(o.getBemElement)(e.unref(l),"action"))},[e.renderSlot(t.$slots,"link",{},()=>[e.createVNode(C._sfc_main,e.normalizeProps(e.guardReactiveProps(t.linkProps)),null,16)])],2)):e.createCommentVNode("",!0)])],2),s.closeable||n.closeable?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(o.getBemElement)(e.unref(l),"closeable"),t.closeableCls])},[e.renderSlot(t.$slots,"closeable",{},()=>[e.createVNode(B._sfc_main,{icon:"tabler:x",color:"gray",type:"ghost",onClick:a[0]||(a[0]=g=>u("close",g))})])],2)):e.createCommentVNode("",!0)],6))}});exports.AlertTypes=i;exports._sfc_main=b;
|
package/dist/Avatar/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as t, c as r, b as e, A, a as v, _ as n } from "../Avatar.vue_vue_type_style_index_0_lang-
|
|
1
|
+
import { _ as t, c as r, b as e, A, a as v, _ as n } from "../Avatar.vue_vue_type_style_index_0_lang-DeTUyD13.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-CrIwlgJN.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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),i=require("radix-vue"),a=require("@pantograph/utils"),x=require("class-variance-authority"),B=require("./options-B4iSAKol.js"),P=require("./Popover.vue_vue_type_style_index_0_lang-B695YDJE.js");require("@iconify/vue");const b=require("./Icon.vue_vue_type_style_index_0_lang-BrV8amSh.js"),N=require("./Indicator.vue_vue_type_script_setup_true_lang-RPFjQEzE.js"),G=require("./element-BURaVF00.js"),[y,S]=i.createContext("AvatarGroup"),w=e.defineComponent({...B.getComponentOptions("AvatarGroup"),__name:"AvatarGroup",props:{class:{},gutter:{type:Boolean},size:{},shape:{},popoverProps:{},maxCount:{}},setup(d){const n=d,m=e.useSlots(),r=e.computed(()=>n.size),s=e.computed(()=>n.shape),g=a.getBemBlock("avatar"),p=a.getBemElement(g,"group"),f=x.cva(p,{variants:{gutter:a.generateVariantClassList("gutter",p)}});S({size:r,shape:s});const l=e.computed(()=>n.maxCount?Number(n.maxCount):0),c=e.computed(()=>f({gutter:n.gutter})),u=e.computed(()=>{switch(n.size){case"2xsm":case"xsm":case"sm":return"sm";case"lg":case"xlg":return"lg";default:return"md"}}),C=()=>{const o=G.flattenChildren(m.default?m.default():[]);return l.value>1&&o.length>l.value?[...o.filter((v,t)=>t<l.value),e.h(P._sfc_main,{size:u.value,...n.popoverProps??{}},{default:()=>e.h(V,{text:`+${o.length-l.value+1}`}),content:()=>e.h("div",{class:[c.value,n.class]},{default:()=>o.filter((v,t)=>t>=l.value)})})]:o};return(o,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([c.value,n.class])},[e.createVNode(C,{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({...B.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(d,{emit:n}){const m=e.useSlots(),r=a.getBemBlock("avatar"),s=d,g=n,p=i.useEmitAsProps(g),f=x.cva(r,{variants:{size:a.generateVariantClassList(_,r),stroke:a.generateVariantClassList(k,r),shape:a.generateVariantClassList(A,r),onlineAlignment:a.generateVariantClassList(h,r)}}),l=y({size:e.computed(()=>s.size),shape:e.computed(()=>s.shape)}),c=e.computed(()=>l.size.value??s.size),u=e.computed(()=>l.shape.value??s.shape),C=e.computed(()=>{const t=c.value&&_.includes(c.value)?c.value:"md",z=s.stroke&&k.includes(s.stroke)?s.stroke:"none",q=u.value&&A.includes(u.value)?u.value:"circle",E=h[s.onlineAlignment]?s.onlineAlignment:"start";return{size:t,stroke:z,shape:q,onlineAlignment:E}}),o=e.computed(()=>{switch(c.value){case"lg":case"xlg":return"tiny";default:return"tinier"}}),v=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,z)=>(e.openBlock(),e.createBlock(e.unref(i.AvatarRoot),{as:"div",class:e.normalizeClass([e.unref(f)(C.value),s.class])},{default:e.withCtx(()=>[!m.default&&!t.text?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.src?(e.openBlock(),e.createBlock(e.unref(i.AvatarImage),e.mergeProps({key:0},e.unref(p),{src:t.src,alt:t.alt,class:e.unref(a.getBemElement)(e.unref(r),"image")}),null,16,["src","alt","class"])):e.createCommentVNode("",!0),e.createVNode(e.unref(i.AvatarFallback),{class:e.normalizeClass(e.unref(a.getBemElement)(e.unref(r),"fallback"))},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"fallback",{},()=>[t.fallback?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(b._sfc_main),{key:0,icon:t.icon,size:v.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(a.getBemElement)(e.unref(r),"image"))},[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)])],2)),t.online?(e.openBlock(),e.createBlock(N._sfc_main,{key:2,color:t.onlineColor,size:o.value,class:e.normalizeClass(e.unref(a.getBemElement)(e.unref(r),"online"))},null,8,["color","size","class"])):e.createCommentVNode("",!0)]),_:3},8,["class"]))}});exports.AvatarOnlineAlignments=h;exports.AvatarShapes=A;exports.AvatarSizes=_;exports.AvatarStrokes=k;exports._sfc_main=V;exports._sfc_main$1=w;exports.injectAvatarGroupContext=y;exports.provideAvatarGroupContext=S;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as E, useSlots as F, computed as
|
|
1
|
+
import { defineComponent as E, useSlots as F, computed as a, createElementBlock as _, openBlock as i, normalizeClass as m, createVNode as I, h as k, createBlock as h, unref as t, withCtx as b, createCommentVNode as x, Fragment as M, mergeProps as R, renderSlot as B, createTextVNode as P, toDisplayString as $ } from "vue";
|
|
2
2
|
import { createContext as T, useEmitAsProps as H, AvatarRoot as J, AvatarImage as K, AvatarFallback as Q } from "radix-vue";
|
|
3
|
-
import { getBemBlock as O, getBemElement as
|
|
3
|
+
import { getBemBlock as O, getBemElement as p, generateVariantClassList as v } from "@pantograph/utils";
|
|
4
4
|
import { cva as j } from "class-variance-authority";
|
|
5
5
|
import { g as q } from "./options-JBqnVZUl.js";
|
|
6
|
-
import { _ as U } from "./Popover.vue_vue_type_style_index_0_lang-
|
|
6
|
+
import { _ as U } from "./Popover.vue_vue_type_style_index_0_lang-ByhaxoQo.js";
|
|
7
7
|
import "@iconify/vue";
|
|
8
|
-
import { _ as W } from "./Icon.vue_vue_type_style_index_0_lang-
|
|
9
|
-
import { _ as X } from "./Indicator.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { _ as W } from "./Icon.vue_vue_type_style_index_0_lang-D2A2tkHI.js";
|
|
9
|
+
import { _ as X } from "./Indicator.vue_vue_type_script_setup_true_lang-DjRN5aRj.js";
|
|
10
10
|
import { c as Y } from "./element-CayrDxFe.js";
|
|
11
11
|
const [Z, ee] = T("AvatarGroup"), pe = /* @__PURE__ */ E({
|
|
12
12
|
...q("AvatarGroup"),
|
|
@@ -16,50 +16,65 @@ const [Z, ee] = T("AvatarGroup"), pe = /* @__PURE__ */ E({
|
|
|
16
16
|
gutter: { type: Boolean },
|
|
17
17
|
size: {},
|
|
18
18
|
shape: {},
|
|
19
|
-
|
|
19
|
+
popoverProps: {},
|
|
20
20
|
maxCount: {}
|
|
21
21
|
},
|
|
22
22
|
setup(A) {
|
|
23
|
-
const
|
|
23
|
+
const n = A, f = F(), r = a(() => n.size), s = a(() => n.shape), y = O("avatar"), d = p(y, "group"), z = j(d, {
|
|
24
24
|
variants: {
|
|
25
|
-
gutter:
|
|
25
|
+
gutter: v("gutter", d)
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
ee({
|
|
29
|
-
size:
|
|
29
|
+
size: r,
|
|
30
30
|
shape: s
|
|
31
31
|
});
|
|
32
|
-
const l =
|
|
33
|
-
() =>
|
|
34
|
-
gutter:
|
|
32
|
+
const l = a(() => n.maxCount ? Number(n.maxCount) : 0), c = a(
|
|
33
|
+
() => z({
|
|
34
|
+
gutter: n.gutter
|
|
35
35
|
})
|
|
36
|
-
), u = () => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
), u = a(() => {
|
|
37
|
+
switch (n.size) {
|
|
38
|
+
case "2xsm":
|
|
39
|
+
case "xsm":
|
|
40
|
+
case "sm":
|
|
41
|
+
return "sm";
|
|
42
|
+
case "lg":
|
|
43
|
+
case "xlg":
|
|
44
|
+
return "lg";
|
|
45
|
+
default:
|
|
46
|
+
return "md";
|
|
47
|
+
}
|
|
48
|
+
}), C = () => {
|
|
49
|
+
const o = Y(f.default ? f.default() : []);
|
|
50
|
+
return l.value > 1 && o.length > l.value ? [
|
|
51
|
+
...o.filter((g, e) => e < l.value),
|
|
52
|
+
k(
|
|
41
53
|
U,
|
|
42
|
-
{ containerCls: o.popoverCls },
|
|
43
54
|
{
|
|
44
|
-
|
|
45
|
-
|
|
55
|
+
size: u.value,
|
|
56
|
+
...n.popoverProps ?? {}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
default: () => k(te, { text: `+${o.length - l.value + 1}` }),
|
|
60
|
+
content: () => k(
|
|
46
61
|
"div",
|
|
47
|
-
{ class: [c.value,
|
|
62
|
+
{ class: [c.value, n.class] },
|
|
48
63
|
{
|
|
49
|
-
default: () =>
|
|
64
|
+
default: () => o.filter((g, e) => e >= l.value)
|
|
50
65
|
}
|
|
51
66
|
)
|
|
52
67
|
}
|
|
53
68
|
)
|
|
54
|
-
] :
|
|
69
|
+
] : o;
|
|
55
70
|
};
|
|
56
|
-
return (
|
|
57
|
-
class:
|
|
71
|
+
return (o, g) => (i(), _("div", {
|
|
72
|
+
class: m([c.value, n.class])
|
|
58
73
|
}, [
|
|
59
|
-
I(
|
|
74
|
+
I(C, { maxCount: o.maxCount }, null, 8, ["maxCount"])
|
|
60
75
|
], 2));
|
|
61
76
|
}
|
|
62
|
-
}),
|
|
77
|
+
}), w = ["2xsm", "xsm", "sm", "md", "lg", "xlg"], G = ["gray", "white"], N = ["circle", "square", "rect"], V = {
|
|
63
78
|
start: "online-start",
|
|
64
79
|
end: "online-end"
|
|
65
80
|
}, te = /* @__PURE__ */ E({
|
|
@@ -82,29 +97,29 @@ const [Z, ee] = T("AvatarGroup"), pe = /* @__PURE__ */ E({
|
|
|
82
97
|
delayMs: {}
|
|
83
98
|
},
|
|
84
99
|
emits: ["loadingStatusChange"],
|
|
85
|
-
setup(A, { emit:
|
|
86
|
-
const
|
|
100
|
+
setup(A, { emit: n }) {
|
|
101
|
+
const f = F(), r = O("avatar"), s = A, d = H(n), z = j(r, {
|
|
87
102
|
variants: {
|
|
88
|
-
size:
|
|
89
|
-
stroke:
|
|
90
|
-
shape:
|
|
91
|
-
onlineAlignment:
|
|
103
|
+
size: v(w, r),
|
|
104
|
+
stroke: v(G, r),
|
|
105
|
+
shape: v(N, r),
|
|
106
|
+
onlineAlignment: v(
|
|
92
107
|
V,
|
|
93
|
-
|
|
108
|
+
r
|
|
94
109
|
)
|
|
95
110
|
}
|
|
96
111
|
}), l = Z({
|
|
97
|
-
size:
|
|
98
|
-
shape:
|
|
99
|
-
}), c =
|
|
100
|
-
const e = c.value &&
|
|
112
|
+
size: a(() => s.size),
|
|
113
|
+
shape: a(() => s.shape)
|
|
114
|
+
}), c = a(() => l.size.value ?? s.size), u = a(() => l.shape.value ?? s.shape), C = a(() => {
|
|
115
|
+
const e = c.value && w.includes(c.value) ? c.value : "md", S = s.stroke && G.includes(s.stroke) ? s.stroke : "none", D = u.value && N.includes(u.value) ? u.value : "circle", L = V[s.onlineAlignment] ? s.onlineAlignment : "start";
|
|
101
116
|
return {
|
|
102
117
|
size: e,
|
|
103
118
|
stroke: S,
|
|
104
119
|
shape: D,
|
|
105
120
|
onlineAlignment: L
|
|
106
121
|
};
|
|
107
|
-
}),
|
|
122
|
+
}), o = a(() => {
|
|
108
123
|
switch (c.value) {
|
|
109
124
|
case "lg":
|
|
110
125
|
case "xlg":
|
|
@@ -112,7 +127,7 @@ const [Z, ee] = T("AvatarGroup"), pe = /* @__PURE__ */ E({
|
|
|
112
127
|
default:
|
|
113
128
|
return "tinier";
|
|
114
129
|
}
|
|
115
|
-
}),
|
|
130
|
+
}), g = a(() => {
|
|
116
131
|
switch (c.value) {
|
|
117
132
|
case "lg":
|
|
118
133
|
case "xlg":
|
|
@@ -128,43 +143,43 @@ const [Z, ee] = T("AvatarGroup"), pe = /* @__PURE__ */ E({
|
|
|
128
143
|
});
|
|
129
144
|
return (e, S) => (i(), h(t(J), {
|
|
130
145
|
as: "div",
|
|
131
|
-
class:
|
|
146
|
+
class: m([t(z)(C.value), s.class])
|
|
132
147
|
}, {
|
|
133
148
|
default: b(() => [
|
|
134
|
-
!
|
|
135
|
-
e.src ? (i(), h(t(K), R({ key: 0 }, t(
|
|
149
|
+
!f.default && !e.text ? (i(), _(M, { key: 0 }, [
|
|
150
|
+
e.src ? (i(), h(t(K), R({ key: 0 }, t(d), {
|
|
136
151
|
src: e.src,
|
|
137
152
|
alt: e.alt,
|
|
138
|
-
class: t(
|
|
153
|
+
class: t(p)(t(r), "image")
|
|
139
154
|
}), null, 16, ["src", "alt", "class"])) : x("", !0),
|
|
140
155
|
I(t(Q), {
|
|
141
|
-
class:
|
|
156
|
+
class: m(t(p)(t(r), "fallback"))
|
|
142
157
|
}, {
|
|
143
158
|
default: b(() => [
|
|
144
159
|
B(e.$slots, "fallback", {}, () => [
|
|
145
160
|
e.fallback ? x("", !0) : (i(), h(t(W), {
|
|
146
161
|
key: 0,
|
|
147
162
|
icon: e.icon,
|
|
148
|
-
size:
|
|
163
|
+
size: g.value
|
|
149
164
|
}, null, 8, ["icon", "size"])),
|
|
150
|
-
|
|
165
|
+
P(" " + $(e.fallback), 1)
|
|
151
166
|
])
|
|
152
167
|
]),
|
|
153
168
|
_: 3
|
|
154
169
|
}, 8, ["class"])
|
|
155
170
|
], 64)) : (i(), _("span", {
|
|
156
171
|
key: 1,
|
|
157
|
-
class:
|
|
172
|
+
class: m(t(p)(t(r), "image"))
|
|
158
173
|
}, [
|
|
159
174
|
B(e.$slots, "default", {}, () => [
|
|
160
|
-
$(
|
|
175
|
+
P($(e.text), 1)
|
|
161
176
|
])
|
|
162
177
|
], 2)),
|
|
163
178
|
e.online ? (i(), h(X, {
|
|
164
179
|
key: 2,
|
|
165
180
|
color: e.onlineColor,
|
|
166
|
-
size:
|
|
167
|
-
class:
|
|
181
|
+
size: o.value,
|
|
182
|
+
class: m(t(p)(t(r), "online"))
|
|
168
183
|
}, null, 8, ["color", "size", "class"])) : x("", !0)
|
|
169
184
|
]),
|
|
170
185
|
_: 3
|
|
@@ -172,9 +187,9 @@ const [Z, ee] = T("AvatarGroup"), pe = /* @__PURE__ */ E({
|
|
|
172
187
|
}
|
|
173
188
|
});
|
|
174
189
|
export {
|
|
175
|
-
|
|
190
|
+
w as A,
|
|
176
191
|
te as _,
|
|
177
|
-
|
|
192
|
+
G as a,
|
|
178
193
|
N as b,
|
|
179
194
|
V as c,
|
|
180
195
|
pe as d,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { AvatarShape, AvatarSize } from '../Avatar/Avatar.model';
|
|
2
2
|
import { ComputedRef } from 'vue';
|
|
3
3
|
import { Class } from '../types';
|
|
4
|
+
import { PopoverProps } from '../Popover';
|
|
4
5
|
export type AvatarGroupProps = {
|
|
5
6
|
class?: Class;
|
|
6
7
|
gutter?: boolean;
|
|
7
8
|
size?: AvatarSize;
|
|
8
9
|
shape?: AvatarShape;
|
|
9
|
-
|
|
10
|
+
popoverProps?: PopoverProps;
|
|
10
11
|
maxCount?: number | string;
|
|
11
12
|
};
|
|
12
13
|
export interface AvatarGroupSlots {
|
|
@@ -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-CrIwlgJN.js");exports.AvatarGroup=t._sfc_main$1;exports.injectAvatarGroupContext=t.injectAvatarGroupContext;exports.provideAvatarGroupContext=t.provideAvatarGroupContext;
|
package/dist/Badge/index.js
CHANGED
package/dist/Badge/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Badge.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Badge.vue_vue_type_script_setup_true_lang-CvnE7Srj.js");exports.Badge=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),p=require("./omit-6FeILhm3.js"),u=require("./BaseBadge.vue_vue_type_style_index_0_lang-CKgCe7Up.js"),m=require("./options-B4iSAKol.js"),s=require("./BaseBadge.model-qrHPAcrC.js"),r=require("@pantograph/tokens"),d=e.defineComponent({...m.getComponentOptions("Badge",!1),__name:"Badge",props:{class:{},text:{},icon:{},flipOnDir:{},size:{},color:{}},setup(c){const t=c,g=e.useAttrs(),C=e.computed(()=>{const l=[...s.BadgeColors,...s.BadgeColorsSubtle],n={...Object.fromEntries(s.BadgeColors.map(o=>[o,r.getCssCoreColor(`${o}-5`)])),...Object.fromEntries(s.BadgeColorsSubtle.map(o=>[o,r.getCssCoreColor(`${o.replace("-subtle","")}-0`)])),"gray-subtle":r.getCssCoreColor("gray-1")},a={...Object.fromEntries(s.BadgeColors.map(o=>[o,r.getCssCoreColor("grayscale-light-0")])),yellow:r.getCssCoreColor("grayscale-dark-0"),...Object.fromEntries(s.BadgeColorsSubtle.map(o=>[o,r.getCssCoreColor(`${o.replace("-subtle","")}-5`)])),"gray-subtle":r.getCssCoreColor("gray-6")};return t.color&&l.includes(t.color)?{bg:n[t.color],fg:a[t.color]}:{bg:r.getCssCoreColor("primary-5"),fg:r.getCssCoreColor("primary-oncolor")}}),i=e.computed(()=>({...p.omit(g,"type"),...t,...C.value}));return(l,n)=>(e.openBlock(),e.createBlock(u._sfc_main,e.mergeProps(i.value,{type:"pill"}),e.createSlots({_:2},[e.renderList(Object.keys(l.$slots),a=>({name:a,fn:e.withCtx(o=>[e.renderSlot(l.$slots,a,e.normalizeProps(e.guardReactiveProps(o)))])}))]),1040))}});exports._sfc_main=d;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { defineComponent as f, useAttrs as u, computed as p, createBlock as b, openBlock as d, mergeProps as y, createSlots as C, renderList as _, withCtx as B, renderSlot as O, normalizeProps as $, guardReactiveProps as j } from "vue";
|
|
2
|
+
import { o as k } from "./omit-DB3u1XL5.js";
|
|
3
|
+
import { _ as E } from "./BaseBadge.vue_vue_type_style_index_0_lang-BGO_OgyI.js";
|
|
4
|
+
import { g as h } from "./options-JBqnVZUl.js";
|
|
5
|
+
import { B as a, a as n } from "./BaseBadge.model-B27aBzz_.js";
|
|
6
|
+
import { getCssCoreColor as e } from "@pantograph/tokens";
|
|
7
|
+
const M = /* @__PURE__ */ f({
|
|
8
|
+
...h("Badge", !1),
|
|
9
|
+
__name: "Badge",
|
|
10
|
+
props: {
|
|
11
|
+
class: {},
|
|
12
|
+
text: {},
|
|
13
|
+
icon: {},
|
|
14
|
+
flipOnDir: {},
|
|
15
|
+
size: {},
|
|
16
|
+
color: {}
|
|
17
|
+
},
|
|
18
|
+
setup(c) {
|
|
19
|
+
const o = c, m = u(), i = p(() => {
|
|
20
|
+
const t = [...a, ...n], l = {
|
|
21
|
+
...Object.fromEntries(a.map((r) => [r, e(`${r}-5`)])),
|
|
22
|
+
...Object.fromEntries(
|
|
23
|
+
n.map((r) => [
|
|
24
|
+
r,
|
|
25
|
+
e(`${r.replace("-subtle", "")}-0`)
|
|
26
|
+
])
|
|
27
|
+
),
|
|
28
|
+
"gray-subtle": e("gray-1")
|
|
29
|
+
}, s = {
|
|
30
|
+
...Object.fromEntries(
|
|
31
|
+
a.map((r) => [r, e("grayscale-light-0")])
|
|
32
|
+
),
|
|
33
|
+
yellow: e("grayscale-dark-0"),
|
|
34
|
+
...Object.fromEntries(
|
|
35
|
+
n.map((r) => [
|
|
36
|
+
r,
|
|
37
|
+
e(`${r.replace("-subtle", "")}-5`)
|
|
38
|
+
])
|
|
39
|
+
),
|
|
40
|
+
"gray-subtle": e("gray-6")
|
|
41
|
+
};
|
|
42
|
+
return o.color && t.includes(o.color) ? {
|
|
43
|
+
bg: l[o.color],
|
|
44
|
+
fg: s[o.color]
|
|
45
|
+
} : {
|
|
46
|
+
bg: e("primary-5"),
|
|
47
|
+
fg: e("primary-oncolor")
|
|
48
|
+
};
|
|
49
|
+
}), g = p(() => ({
|
|
50
|
+
...k(m, "type"),
|
|
51
|
+
...o,
|
|
52
|
+
...i.value
|
|
53
|
+
}));
|
|
54
|
+
return (t, l) => (d(), b(E, y(g.value, { type: "pill" }), C({ _: 2 }, [
|
|
55
|
+
_(Object.keys(t.$slots), (s) => ({
|
|
56
|
+
name: s,
|
|
57
|
+
fn: B((r) => [
|
|
58
|
+
O(t.$slots, s, $(j(r)))
|
|
59
|
+
])
|
|
60
|
+
}))
|
|
61
|
+
]), 1040));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
export {
|
|
65
|
+
M as _
|
|
66
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const e = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], l = ["rect", "pill", "minify"], s = [
|
|
2
|
+
"primary",
|
|
3
|
+
"red",
|
|
4
|
+
"orange",
|
|
5
|
+
"amber",
|
|
6
|
+
"yellow",
|
|
7
|
+
"lime",
|
|
8
|
+
"green",
|
|
9
|
+
"teal",
|
|
10
|
+
"cyan",
|
|
11
|
+
"sky",
|
|
12
|
+
"blue",
|
|
13
|
+
"ocean",
|
|
14
|
+
"violet",
|
|
15
|
+
"amethyst",
|
|
16
|
+
"fuchsia",
|
|
17
|
+
"pink",
|
|
18
|
+
"gray",
|
|
19
|
+
"mallard"
|
|
20
|
+
], t = [
|
|
21
|
+
"primary-subtle",
|
|
22
|
+
"red-subtle",
|
|
23
|
+
"orange-subtle",
|
|
24
|
+
"amber-subtle",
|
|
25
|
+
"yellow-subtle",
|
|
26
|
+
"lime-subtle",
|
|
27
|
+
"green-subtle",
|
|
28
|
+
"teal-subtle",
|
|
29
|
+
"cyan-subtle",
|
|
30
|
+
"sky-subtle",
|
|
31
|
+
"blue-subtle",
|
|
32
|
+
"ocean-subtle",
|
|
33
|
+
"violet-subtle",
|
|
34
|
+
"amethyst-subtle",
|
|
35
|
+
"fuchsia-subtle",
|
|
36
|
+
"pink-subtle",
|
|
37
|
+
"gray-subtle",
|
|
38
|
+
"mallard-subtle"
|
|
39
|
+
];
|
|
40
|
+
export {
|
|
41
|
+
s as B,
|
|
42
|
+
t as a,
|
|
43
|
+
l as b,
|
|
44
|
+
e as c
|
|
45
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=["2xsm","xsm","sm","md","tiny","tinier"],l=["rect","pill","minify"],s=["primary","red","orange","amber","yellow","lime","green","teal","cyan","sky","blue","ocean","violet","amethyst","fuchsia","pink","gray","mallard"],t=["primary-subtle","red-subtle","orange-subtle","amber-subtle","yellow-subtle","lime-subtle","green-subtle","teal-subtle","cyan-subtle","sky-subtle","blue-subtle","ocean-subtle","violet-subtle","amethyst-subtle","fuchsia-subtle","pink-subtle","gray-subtle","mallard-subtle"];exports.BadgeColors=s;exports.BadgeColorsSubtle=t;exports.BadgeSizes=e;exports.BadgeTypes=l;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { defineComponent as S, useSlots as k, computed as s, createElementBlock as m, openBlock as a, normalizeStyle as D, normalizeClass as O, unref as l, createCommentVNode as u, Fragment as h, createBlock as V, renderSlot as p, withCtx as $, createTextVNode as w, toDisplayString as F } from "vue";
|
|
2
|
+
import { getBemBlock as I, generateVariantClassList as o } from "@pantograph/utils";
|
|
3
|
+
import { cva as N } from "class-variance-authority";
|
|
4
|
+
import { g as T } from "./options-JBqnVZUl.js";
|
|
5
|
+
import { b as f, c as d } from "./BaseBadge.model-B27aBzz_.js";
|
|
6
|
+
import "@iconify/vue";
|
|
7
|
+
import { _ as E } from "./Icon.vue_vue_type_style_index_0_lang-D2A2tkHI.js";
|
|
8
|
+
import { u as L } from "./index-CKvTY2M1.js";
|
|
9
|
+
const Q = /* @__PURE__ */ S({
|
|
10
|
+
...T("BaseBadge"),
|
|
11
|
+
__name: "BaseBadge",
|
|
12
|
+
props: {
|
|
13
|
+
size: { default: "md" },
|
|
14
|
+
class: {},
|
|
15
|
+
text: {},
|
|
16
|
+
bg: {},
|
|
17
|
+
fg: {},
|
|
18
|
+
br: {},
|
|
19
|
+
type: { default: "pill" },
|
|
20
|
+
icon: {},
|
|
21
|
+
flipOnDir: {}
|
|
22
|
+
},
|
|
23
|
+
setup(g) {
|
|
24
|
+
const { getFlipOnDir: y } = L(), v = y("flipOnDir"), n = I("badge"), t = g, b = N(n, {
|
|
25
|
+
variants: {
|
|
26
|
+
size: o(d, n),
|
|
27
|
+
type: o(f, n),
|
|
28
|
+
text: o("text", n),
|
|
29
|
+
icon: o("icon", n),
|
|
30
|
+
br: o("br", n)
|
|
31
|
+
}
|
|
32
|
+
}), r = k(), i = s(() => f.includes(t.type) ? t.type : "pill"), x = s(() => !!(t.text || r.default)), B = s(() => !!(t.icon || r.icon)), c = s(() => {
|
|
33
|
+
let e = d.includes(t.size) ? t.size : "md";
|
|
34
|
+
return e === "sm" && i.value !== "rect" ? i.value === "minify" ? e = "tiny" : i.value === "pill" && (e = "md") : i.value === "minify" && !["tiny", "tinier"].includes(e) ? e = "tiny" : i.value !== "minify" && ["tiny", "tinier"].includes(e) && (e = "md"), e;
|
|
35
|
+
}), z = s(() => {
|
|
36
|
+
switch (c.value) {
|
|
37
|
+
case "sm":
|
|
38
|
+
return "xsm";
|
|
39
|
+
case "xsm":
|
|
40
|
+
return "2xsm";
|
|
41
|
+
case "2xsm":
|
|
42
|
+
return "3xsm";
|
|
43
|
+
case "md":
|
|
44
|
+
default:
|
|
45
|
+
return "sm";
|
|
46
|
+
}
|
|
47
|
+
}), _ = s(() => ({
|
|
48
|
+
size: c.value,
|
|
49
|
+
// color,
|
|
50
|
+
type: i.value,
|
|
51
|
+
text: x.value,
|
|
52
|
+
icon: B.value,
|
|
53
|
+
br: !!t.br
|
|
54
|
+
})), C = s(() => {
|
|
55
|
+
const e = r.icon ?? t.icon;
|
|
56
|
+
return t.type === "rect" && (r.default || t.text) ? !1 : e;
|
|
57
|
+
});
|
|
58
|
+
return (e, P) => (a(), m("div", {
|
|
59
|
+
class: O([l(b)(_.value), t.class]),
|
|
60
|
+
style: D({
|
|
61
|
+
"--ptc-badge-fg": t.fg,
|
|
62
|
+
"--ptc-badge-bg": t.bg,
|
|
63
|
+
"--ptc-badge-br": t.br
|
|
64
|
+
})
|
|
65
|
+
}, [
|
|
66
|
+
i.value !== "minify" ? (a(), m(h, { key: 0 }, [
|
|
67
|
+
C.value ? (a(), V(l(E), {
|
|
68
|
+
key: 0,
|
|
69
|
+
icon: e.icon,
|
|
70
|
+
size: z.value,
|
|
71
|
+
flipOnDir: l(v)
|
|
72
|
+
}, {
|
|
73
|
+
default: $(() => [
|
|
74
|
+
p(e.$slots, "icon")
|
|
75
|
+
]),
|
|
76
|
+
_: 3
|
|
77
|
+
}, 8, ["icon", "size", "flipOnDir"])) : u("", !0),
|
|
78
|
+
p(e.$slots, "default", {}, () => [
|
|
79
|
+
w(F(e.text), 1)
|
|
80
|
+
])
|
|
81
|
+
], 64)) : u("", !0)
|
|
82
|
+
], 6));
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
export {
|
|
86
|
+
Q as _
|
|
87
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),a=require("@pantograph/utils"),B=require("class-variance-authority"),_=require("./options-B4iSAKol.js"),o=require("./BaseBadge.model-qrHPAcrC.js");require("@iconify/vue");const b=require("./Icon.vue_vue_type_style_index_0_lang-BrV8amSh.js"),x=require("./index-BfpYQmzU.js"),z=e.defineComponent({..._.getComponentOptions("BaseBadge"),__name:"BaseBadge",props:{size:{default:"md"},class:{},text:{},bg:{},fg:{},br:{},type:{default:"pill"},icon:{},flipOnDir:{}},setup(l){const{getFlipOnDir:u}=x.useConfig(),d=u("flipOnDir"),i=a.getBemBlock("badge"),n=l,p=B.cva(i,{variants:{size:a.generateVariantClassList(o.BadgeSizes,i),type:a.generateVariantClassList(o.BadgeTypes,i),text:a.generateVariantClassList("text",i),icon:a.generateVariantClassList("icon",i),br:a.generateVariantClassList("br",i)}}),r=e.useSlots(),s=e.computed(()=>o.BadgeTypes.includes(n.type)?n.type:"pill"),m=e.computed(()=>!!(n.text||r.default)),f=e.computed(()=>!!(n.icon||r.icon)),c=e.computed(()=>{let t=o.BadgeSizes.includes(n.size)?n.size:"md";return t==="sm"&&s.value!=="rect"?s.value==="minify"?t="tiny":s.value==="pill"&&(t="md"):s.value==="minify"&&!["tiny","tinier"].includes(t)?t="tiny":s.value!=="minify"&&["tiny","tinier"].includes(t)&&(t="md"),t}),g=e.computed(()=>{switch(c.value){case"sm":return"xsm";case"xsm":return"2xsm";case"2xsm":return"3xsm";case"md":default:return"sm"}}),y=e.computed(()=>({size:c.value,type:s.value,text:m.value,icon:f.value,br:!!n.br})),v=e.computed(()=>{const t=r.icon??n.icon;return n.type==="rect"&&(r.default||n.text)?!1:t});return(t,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(p)(y.value),n.class]),style:e.normalizeStyle({"--ptc-badge-fg":n.fg,"--ptc-badge-bg":n.bg,"--ptc-badge-br":n.br})},[s.value!=="minify"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[v.value?(e.openBlock(),e.createBlock(e.unref(b._sfc_main),{key:0,icon:t.icon,size:g.value,flipOnDir:e.unref(d)},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"icon")]),_:3},8,["icon","size","flipOnDir"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)])],64)):e.createCommentVNode("",!0)],6))}});exports._sfc_main=z;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as A, computed as s, useSlots as G, ref as L, createElementBlock as D, openBlock as c, normalizeClass as O, unref as l, createBlock as v, Fragment as _, createCommentVNode as B, renderSlot as r, withCtx as p, createTextVNode as q, toDisplayString as H, normalizeProps as J, mergeProps as K, createVNode as M, createSlots as Q } from "vue";
|
|
2
|
-
import { _ as b } from "./Icon.vue_vue_type_style_index_0_lang-
|
|
3
|
-
import { _ as U } from "./Spinner.vue_vue_type_style_index_0_lang-
|
|
4
|
-
import { _ as W } from "./Badge.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as b } from "./Icon.vue_vue_type_style_index_0_lang-D2A2tkHI.js";
|
|
3
|
+
import { _ as U } from "./Spinner.vue_vue_type_style_index_0_lang-DxwACaLW.js";
|
|
4
|
+
import { _ as W } from "./Badge.vue_vue_type_script_setup_true_lang-DYPVS-yf.js";
|
|
5
5
|
import { B as k, a as $, b as C, c as F, i as X } from "./ButtonGroup.vue_vue_type_script_setup_true_lang-BCxUeTU6.js";
|
|
6
6
|
import { getBemBlock as Y, generateVariantClassList as t, getBemElement as Z } from "@pantograph/utils";
|
|
7
7
|
import { cva as ee } from "class-variance-authority";
|
|
8
8
|
import { g as oe } from "./options-JBqnVZUl.js";
|
|
9
|
-
import { u as ne } from "./index-
|
|
9
|
+
import { u as ne } from "./index-CKvTY2M1.js";
|
|
10
10
|
const S = "2xsm", fe = /* @__PURE__ */ A({
|
|
11
11
|
...oe("BaseButton"),
|
|
12
12
|
__name: "BaseButton",
|