@pantograph/vue 0.10.2 → 0.10.4
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/ActionButton.d.ts +5 -1
- 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 +1 -0
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-XYkQJLWE.js +54 -0
- package/dist/Avatar/Avatar.d.ts +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-DheqjJPa.js → Avatar.vue_vue_type_style_index_0_lang-B3h6--NG.js} +19 -19
- package/dist/Avatar.vue_vue_type_style_index_0_lang-B62H7K8P.js +1 -0
- package/dist/AvatarGroup/AvatarGroup.d.ts +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/index.umd.cjs.js +1 -1
- package/dist/{Badge.vue_vue_type_script_setup_true_lang-CCIamdNB.js → Badge.vue_vue_type_script_setup_true_lang-BY-B21u1.js} +6 -5
- package/dist/Badge.vue_vue_type_script_setup_true_lang-CrMJ4fbZ.js +1 -0
- package/dist/Base/BaseBadge/BaseBadge.d.ts +3 -1
- package/dist/Base/BaseButton/BaseButton.d.ts +5 -0
- package/dist/{BaseBadge.vue_vue_type_style_index_0_lang-Bh1152XC.js → BaseBadge.vue_vue_type_style_index_0_lang-BaxHfiNY.js} +41 -38
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-PmBe2V25.js +1 -0
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-C0nSQYiX.js +169 -0
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-dcMigyCt.js +1 -0
- package/dist/Button/Button.d.ts +7 -3
- 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-NKY7YYCC.js → Button.vue_vue_type_script_setup_true_lang-C49On28W.js} +15 -13
- package/dist/Button.vue_vue_type_script_setup_true_lang-ZXQe6Slx.js +1 -0
- package/dist/Checkbox/Checkbox.d.ts +2 -2
- 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-D0sF0-hW.js → Checkbox.vue_vue_type_style_index_0_lang-BPQsppLy.js} +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-CSmeTeZh.js → Checkbox.vue_vue_type_style_index_0_lang-Bphv5qnx.js} +2 -2
- 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-B1Rst4Q9.js → ColorPicker.vue_vue_type_style_index_0_lang-LYEiXGuI.js} +1 -1
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-CEz3bIJG.js → ColorPicker.vue_vue_type_style_index_0_lang-nriGmBdP.js} +3 -3
- package/dist/ColorSwatch/ColorSwatch.d.ts +1 -1
- 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-CL9dd69H.js → ColorSwatch.vue_vue_type_style_index_0_lang-DMzq203l.js} +22 -21
- package/dist/ColorSwatch.vue_vue_type_style_index_0_lang-Tu5jN_qs.js +1 -0
- 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 +1 -0
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-Cwh2REmh.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-CRyynAiW.js} +7 -7
- package/dist/ColorTrigger/index.js.js +1 -1
- package/dist/ColorTrigger/index.umd.cjs.js +1 -1
- package/dist/ColorTrigger.vue_vue_type_style_index_0_lang-lIncYku3.js +1 -0
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-BNFu93Ns.js → ColorTrigger.vue_vue_type_style_index_0_lang-m13EP8UW.js} +4 -4
- package/dist/ConfigProvider/index.d.ts +10 -2
- package/dist/ConfigProvider/index.js.js +10 -119
- package/dist/ConfigProvider/index.umd.cjs.js +1 -1
- package/dist/ConfigProvider/utils.d.ts +1 -0
- package/dist/FloatButton/FloatButton.d.ts +5 -1
- package/dist/FloatButton/index.js.js +1 -1
- package/dist/FloatButton/index.umd.cjs.js +1 -1
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-BAxKXFb0.js → FloatButton.vue_vue_type_script_setup_true_lang-Vfrxg8PK.js} +13 -12
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-sfslt2vn.js +1 -0
- package/dist/GraphicalObject/GraphicalObject.d.ts +1 -1
- package/dist/GraphicalObject/index.js.js +1 -1
- package/dist/GraphicalObject/index.umd.cjs.js +1 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-CshbWnRl.js +1 -0
- package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-BEZ6FkRf.js → GraphicalObject.vue_vue_type_script_setup_true_lang-D9DyDBKQ.js} +7 -6
- package/dist/Icon/Icon.d.ts +2 -1
- package/dist/Icon/index.js.js +1 -1
- package/dist/Icon/index.umd.cjs.js +1 -1
- package/dist/Icon.vue_vue_type_style_index_0_lang-BVVc15Aa.js +49 -0
- package/dist/Icon.vue_vue_type_style_index_0_lang-c9NvwoHi.js +1 -0
- package/dist/IconButton/IconButton.d.ts +7 -3
- 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-CchpvdkX.js → IconButton.vue_vue_type_script_setup_true_lang-5W7GQOhv.js} +7 -6
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-B_9aypIC.js +1 -0
- package/dist/Image/Image.d.ts +1 -1
- package/dist/Image/index.js.js +1 -1
- package/dist/Image/index.umd.cjs.js +1 -1
- package/dist/{Image.vue_vue_type_style_index_0_lang-Hg1jFz-L.js → Image.vue_vue_type_style_index_0_lang-Bu6dc2yW.js} +1 -1
- package/dist/{Image.vue_vue_type_style_index_0_lang-pkzjPQyu.js → Image.vue_vue_type_style_index_0_lang-C8UTT06Z.js} +3 -3
- package/dist/IndentLevel/index.js.js +1 -1
- package/dist/IndentLevel/index.umd.cjs.js +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-ZZ1uEhji.js → IndentLevel.vue_vue_type_style_index_0_lang-C4bSKGaz.js} +3 -3
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-DqqJTrDF.js → IndentLevel.vue_vue_type_style_index_0_lang-D19gT0Bo.js} +1 -1
- package/dist/Indicator/index.js.js +1 -1
- package/dist/Indicator/index.umd.cjs.js +1 -1
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-B16OmZLF.js → Indicator.vue_vue_type_script_setup_true_lang-DYFKQ-dL.js} +2 -2
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-BibzfVax.js → Indicator.vue_vue_type_script_setup_true_lang-DmGmSuAJ.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-CcR6oCIR.js → Input.vue_vue_type_style_index_0_lang-BCS_of9l.js} +7 -8
- package/dist/Input.vue_vue_type_style_index_0_lang-HdWdXVjL.js +1 -0
- package/dist/Kbd/index.js.js +1 -1
- package/dist/Kbd/index.umd.cjs.js +1 -1
- package/dist/{Kbd.vue_vue_type_style_index_0_lang-CpDjSQqg.js → Kbd.vue_vue_type_style_index_0_lang-CUCZZjvw.js} +1 -1
- package/dist/{Kbd.vue_vue_type_style_index_0_lang-D1y-0kBN.js → Kbd.vue_vue_type_style_index_0_lang-C_WG0F7e.js} +1 -1
- package/dist/Menu/Menu.d.ts +2 -2
- 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-B64mJSxF.js → Menu.vue_vue_type_style_index_0_lang-Dcu2gyxm.js} +95 -94
- package/dist/Menu.vue_vue_type_style_index_0_lang-zgFo-Qhe.js +1 -0
- package/dist/MenuItem/index.js.js +1 -1
- package/dist/MenuItem/index.umd.cjs.js +1 -1
- package/dist/Popover/Popover.d.ts +1 -0
- 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-C0IwnsU5.js → Popover.vue_vue_type_style_index_0_lang-CCfVt5eZ.js} +25 -24
- package/dist/Popover.vue_vue_type_style_index_0_lang-DyKW40kh.js +1 -0
- package/dist/RadioGroup/index.js.js +1 -1
- package/dist/RadioGroup/index.umd.cjs.js +1 -1
- package/dist/RadioGroup.vue_vue_type_script_setup_true_lang-BCj1pwSS.js +1 -0
- package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-C8nd4TEI.js → RadioGroup.vue_vue_type_script_setup_true_lang-DTcXCTZt.js} +12 -11
- package/dist/Shortcut/index.js.js +1 -1
- package/dist/Shortcut/index.umd.cjs.js +1 -1
- package/dist/{Shortcut.vue_vue_type_style_index_0_lang-D4xo_UgO.js → Shortcut.vue_vue_type_style_index_0_lang-CmVub9SF.js} +2 -2
- package/dist/{Shortcut.vue_vue_type_style_index_0_lang-D8_aLpYM.js → Shortcut.vue_vue_type_style_index_0_lang-IKgak4ec.js} +1 -1
- package/dist/Skeleton/Skeleton.d.ts +2 -2
- package/dist/Skeleton/index.js.js +1 -1
- package/dist/Skeleton/index.umd.cjs.js +1 -1
- package/dist/{Skeleton.vue_vue_type_style_index_0_lang-IQEtEnZx.js → Skeleton.vue_vue_type_style_index_0_lang-BjcjY70B.js} +2 -2
- package/dist/Skeleton.vue_vue_type_style_index_0_lang-gJRxIuPb.js +1 -0
- package/dist/Spinner/Spinner.d.ts +1 -1
- package/dist/Spinner/index.js.js +1 -1
- package/dist/Spinner/index.umd.cjs.js +1 -1
- package/dist/{Spinner.vue_vue_type_style_index_0_lang-BP7P5xu8.js → Spinner.vue_vue_type_style_index_0_lang-BFKOyKva.js} +1 -1
- package/dist/{Spinner.vue_vue_type_style_index_0_lang-BYqqSQAx.js → Spinner.vue_vue_type_style_index_0_lang-Birom5mO.js} +1 -1
- package/dist/Switch/Switch.d.ts +1 -1
- package/dist/Switch/index.js.js +1 -1
- package/dist/Switch/index.umd.cjs.js +1 -1
- package/dist/{Switch.vue_vue_type_style_index_0_lang-CoXu3YJ-.js → Switch.vue_vue_type_style_index_0_lang-BhiOtkMp.js} +1 -1
- package/dist/{Switch.vue_vue_type_style_index_0_lang-CvWay8Wa.js → Switch.vue_vue_type_style_index_0_lang-Diz2BK9E.js} +2 -2
- 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-CvskECfv.js → Tree.vue_vue_type_style_index_0_lang-ChV5Fqjc.js} +1 -1
- package/dist/{Tree.vue_vue_type_style_index_0_lang-BCYjSwUH.js → Tree.vue_vue_type_style_index_0_lang-CoTI1i5g.js} +6 -6
- package/dist/{_flatRest-CHX8vV1P.js → _flatRest-Cgl-JzmZ.js} +25 -26
- package/dist/_flatRest-CreY2VBo.js +1 -0
- package/dist/{cloneDeep-BMA7VTX1.js → cloneDeep-C3qTbnbj.js} +1 -1
- package/dist/cloneDeep-DkiDLLTT.js +1 -0
- package/dist/{get-Q8GXlj-L.js → get-B_rtzkiJ.js} +1 -1
- package/dist/{get-B4UJlXpC.js → get-DhKz3lGB.js} +1 -1
- package/dist/index-BBeDQiz4.js +1 -0
- package/dist/index-iTlmMf0U.js +137 -0
- package/dist/index.js.js +32 -32
- package/dist/index.umd.cjs.js +1 -1
- package/dist/isArray-3RTyNB5p.js +1 -0
- package/dist/isArray-CdbPONHA.js +31 -0
- package/dist/{isNumber-DlKYWCo3.js → isNumber-BopDesuz.js} +1 -1
- package/dist/isNumber-CYWvnzF3.js +1 -0
- package/dist/omit-C4BrcXKG.js +1 -0
- package/dist/{omit-BEkBWXra.js → omit-gDFhewvU.js} +23 -24
- package/dist/{pick-DLskPTKb.js → pick-D8bMooY6.js} +2 -2
- package/dist/{pick-C-ap2Lj0.js → pick-Db06rbL5.js} +1 -1
- package/dist/style/index.css +1 -1
- package/package.json +3 -1
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-B8F78aq-.js +0 -51
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-DYj83ijm.js +0 -1
- package/dist/Avatar.vue_vue_type_style_index_0_lang-BwkELI0y.js +0 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-ooDlpl8j.js +0 -1
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-BNs69VP4.js +0 -1
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-CgEN8K4D.js +0 -1
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-D7irHU-6.js +0 -153
- package/dist/Button.vue_vue_type_script_setup_true_lang-BA3bxjLD.js +0 -1
- package/dist/ColorSwatch.vue_vue_type_style_index_0_lang-BH-NSALx.js +0 -1
- package/dist/ColorSwatchGroup.vue_vue_type_style_index_0_lang-CpgTgIuE.js +0 -1
- package/dist/ColorTrigger.vue_vue_type_style_index_0_lang-C8kPa338.js +0 -1
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-C5hAAZZQ.js +0 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-CdO2zArd.js +0 -1
- package/dist/Icon.vue_vue_type_style_index_0_lang-BfPcw6PU.js +0 -48
- package/dist/Icon.vue_vue_type_style_index_0_lang-BvHCdzZP.js +0 -1
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-c16Xu6mm.js +0 -1
- package/dist/Input.vue_vue_type_style_index_0_lang-DVN491cI.js +0 -1
- package/dist/Menu.vue_vue_type_style_index_0_lang-Sq_kFrSI.js +0 -1
- package/dist/Popover.vue_vue_type_style_index_0_lang-CM8qMFEi.js +0 -1
- package/dist/RadioGroup.vue_vue_type_script_setup_true_lang-DjEHmvMo.js +0 -1
- package/dist/Skeleton.vue_vue_type_style_index_0_lang-C1I-p4Yn.js +0 -1
- package/dist/_flatRest-R59G2N4m.js +0 -1
- package/dist/cloneDeep-BcKVMzWC.js +0 -1
- package/dist/isArray-B7z6QoM5.js +0 -1
- package/dist/isArray-WzO_os3q.js +0 -4
- package/dist/isNumber-eaDdxhkG.js +0 -1
- package/dist/isObjectLike-BatpeCIi.js +0 -29
- package/dist/isObjectLike-kO9e4B7g.js +0 -1
- package/dist/isString-BVAZt9W3.js +0 -9
- package/dist/isString-CKmTJsel.js +0 -1
- package/dist/omit-BKPbELUG.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseButtonSlots, BaseButtonProps } from '../Base/BaseButton/BaseButton';
|
|
2
2
|
import { ButtonType, ButtonVariant } from '../Base/BaseButton/BaseButton.model';
|
|
3
|
-
export type ActionButtonProps = Partial<Pick<BaseButtonProps, 'class' | 'preIcon' | 'postIcon' | 'size' | 'text' | 'icon' | 'active' | 'badgeText' | 'badgeIcon'>> & {
|
|
3
|
+
export type ActionButtonProps = Partial<Pick<BaseButtonProps, 'class' | 'preIcon' | 'postIcon' | 'size' | 'text' | 'icon' | 'active' | 'badgeText' | 'badgeIcon' | 'postIconFlipOnDir' | 'preIconFlipOnDir' | 'badgeIconFlipOnDir'>> & {
|
|
4
4
|
type?: Exclude<ButtonType, 'fill'>;
|
|
5
5
|
variant?: Exclude<ButtonVariant, 'float'>;
|
|
6
6
|
};
|
|
@@ -25,6 +25,10 @@ declare function __VLS_template(): {
|
|
|
25
25
|
readonly icon?: string | undefined;
|
|
26
26
|
readonly preIcon?: string | undefined;
|
|
27
27
|
readonly postIcon?: string | undefined;
|
|
28
|
+
readonly flipOnDir?: import('../ConfigProvider/index.ts', { with: { "resolution-mode": "import" } }).FlipOnDir | undefined;
|
|
29
|
+
readonly preIconFlipOnDir?: import('../ConfigProvider/index.ts', { with: { "resolution-mode": "import" } }).FlipOnDir | undefined;
|
|
30
|
+
readonly postIconFlipOnDir?: import('../ConfigProvider/index.ts', { with: { "resolution-mode": "import" } }).FlipOnDir | undefined;
|
|
31
|
+
readonly badgeIconFlipOnDir?: import('../ConfigProvider/index.ts', { with: { "resolution-mode": "import" } }).FlipOnDir | undefined;
|
|
28
32
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
29
33
|
$attrs: {
|
|
30
34
|
[x: string]: unknown;
|
|
@@ -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-DZY7N5gS.js");exports.ActionButton=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),p=require("./omit-C4BrcXKG.js"),l=require("./BaseButton.vue_vue_type_style_index_0_lang-dcMigyCt.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;
|
|
@@ -0,0 +1,54 @@
|
|
|
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-gDFhewvU.js";
|
|
3
|
+
import { _ as x } from "./BaseButton.vue_vue_type_style_index_0_lang-C0nSQYiX.js";
|
|
4
|
+
import { g as y } from "./options-JBqnVZUl.js";
|
|
5
|
+
const R = /* @__PURE__ */ p({
|
|
6
|
+
...y("ActionButton", !1),
|
|
7
|
+
__name: "ActionButton",
|
|
8
|
+
props: {
|
|
9
|
+
class: {},
|
|
10
|
+
preIcon: {},
|
|
11
|
+
postIcon: {},
|
|
12
|
+
size: {},
|
|
13
|
+
text: {},
|
|
14
|
+
icon: {},
|
|
15
|
+
active: { type: Boolean },
|
|
16
|
+
badgeText: {},
|
|
17
|
+
badgeIcon: {},
|
|
18
|
+
postIconFlipOnDir: {},
|
|
19
|
+
preIconFlipOnDir: {},
|
|
20
|
+
badgeIconFlipOnDir: {},
|
|
21
|
+
type: {},
|
|
22
|
+
variant: {}
|
|
23
|
+
},
|
|
24
|
+
setup(n, { expose: r }) {
|
|
25
|
+
const s = n, a = l(), c = m(() => ({
|
|
26
|
+
...k(a, "variant", "loading", "color"),
|
|
27
|
+
...s
|
|
28
|
+
})), e = u();
|
|
29
|
+
return r({
|
|
30
|
+
focus() {
|
|
31
|
+
var o;
|
|
32
|
+
(o = e.value) == null || o.focus();
|
|
33
|
+
},
|
|
34
|
+
blur() {
|
|
35
|
+
var o;
|
|
36
|
+
(o = e.value) == null || o.blur();
|
|
37
|
+
}
|
|
38
|
+
}), (o, A) => (d(), f(x, _(c.value, {
|
|
39
|
+
action: "",
|
|
40
|
+
ref_key: "buttonRef",
|
|
41
|
+
ref: e
|
|
42
|
+
}), b({ _: 2 }, [
|
|
43
|
+
g(Object.keys(o.$slots), (t) => ({
|
|
44
|
+
name: t,
|
|
45
|
+
fn: v((i) => [
|
|
46
|
+
I(o.$slots, t, B(O(i)))
|
|
47
|
+
])
|
|
48
|
+
}))
|
|
49
|
+
]), 1040));
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
export {
|
|
53
|
+
R as _
|
|
54
|
+
};
|
package/dist/Avatar/Avatar.d.ts
CHANGED
|
@@ -32,10 +32,10 @@ declare const __VLS_component: import('vue').DefineComponent<AvatarProps, {}, {}
|
|
|
32
32
|
}, string, import('vue').PublicProps, Readonly<AvatarProps> & Readonly<{
|
|
33
33
|
onLoadingStatusChange?: ((value: import('../../../../node_modules/radix-vue/dist/Avatar/utils.js', { with: { "resolution-mode": "import" } }).ImageLoadingStatus) => any) | undefined;
|
|
34
34
|
}>, {
|
|
35
|
-
icon: string;
|
|
36
|
-
src: string;
|
|
37
35
|
size: AvatarSize;
|
|
36
|
+
icon: string;
|
|
38
37
|
shape: AvatarShape;
|
|
38
|
+
src: string;
|
|
39
39
|
onlineColor: BadgeColor;
|
|
40
40
|
onlineAlignment: AvatarOnlineAlignment;
|
|
41
41
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
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-B3h6--NG.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-B62H7K8P.js");exports.Avatar=e._sfc_main;exports.AvatarOnlineAlignments=e.AvatarOnlineAlignments;exports.AvatarShapes=e.AvatarShapes;exports.AvatarSizes=e.AvatarSizes;exports.AvatarStrokes=e.AvatarStrokes;exports.default=e._sfc_main;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as E, useSlots as F, computed as n, createElementBlock as _, openBlock as i, normalizeClass as p, createVNode as I, h as z, createBlock as
|
|
1
|
+
import { defineComponent as E, useSlots as F, computed as n, createElementBlock as _, openBlock as i, normalizeClass as p, createVNode as I, h as z, createBlock as A, unref as t, withCtx as b, createCommentVNode as x, Fragment as M, mergeProps as R, renderSlot as B, createTextVNode as $, toDisplayString as G } from "vue";
|
|
2
2
|
import { createContext as T, useEmitAsProps as H, AvatarRoot as J, AvatarImage as K, AvatarFallback as Q } from "radix-vue";
|
|
3
3
|
import { 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-CCfVt5eZ.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-BVVc15Aa.js";
|
|
9
|
+
import { _ as X } from "./Indicator.vue_vue_type_script_setup_true_lang-DYFKQ-dL.js";
|
|
10
10
|
const [Y, Z] = T("AvatarGroup"), ue = /* @__PURE__ */ E({
|
|
11
11
|
...q("AvatarGroup"),
|
|
12
12
|
__name: "AvatarGroup",
|
|
@@ -15,11 +15,11 @@ const [Y, Z] = T("AvatarGroup"), ue = /* @__PURE__ */ E({
|
|
|
15
15
|
gutter: { type: Boolean },
|
|
16
16
|
size: {},
|
|
17
17
|
shape: {},
|
|
18
|
-
|
|
18
|
+
popoverCls: {},
|
|
19
19
|
maxCount: {}
|
|
20
20
|
},
|
|
21
|
-
setup(
|
|
22
|
-
const o =
|
|
21
|
+
setup(h) {
|
|
22
|
+
const o = h, d = F(), a = n(() => o.size), s = n(() => o.shape), y = O("avatar"), g = v(y, "group"), k = j(g, {
|
|
23
23
|
variants: {
|
|
24
24
|
gutter: f("gutter", g)
|
|
25
25
|
}
|
|
@@ -35,24 +35,24 @@ const [Y, Z] = T("AvatarGroup"), ue = /* @__PURE__ */ E({
|
|
|
35
35
|
), u = () => {
|
|
36
36
|
const l = d.default ? d.default() : [];
|
|
37
37
|
return r.value > 1 && l.length > r.value ? [
|
|
38
|
-
...l.filter((
|
|
38
|
+
...l.filter((C, m) => m < r.value - 1),
|
|
39
39
|
z(
|
|
40
40
|
U,
|
|
41
|
-
{},
|
|
41
|
+
{ containerCls: o.popoverCls },
|
|
42
42
|
{
|
|
43
43
|
default: () => z(ee, { text: `+${l.length - r.value + 1}` }),
|
|
44
44
|
content: () => z(
|
|
45
45
|
"div",
|
|
46
46
|
{ class: [c.value, o.class] },
|
|
47
47
|
{
|
|
48
|
-
default: () => l.filter((
|
|
48
|
+
default: () => l.filter((C, m) => m >= r.value - 1)
|
|
49
49
|
}
|
|
50
50
|
)
|
|
51
51
|
}
|
|
52
52
|
)
|
|
53
53
|
] : l;
|
|
54
54
|
};
|
|
55
|
-
return (l,
|
|
55
|
+
return (l, C) => (i(), _("div", {
|
|
56
56
|
class: p([c.value, o.class])
|
|
57
57
|
}, [
|
|
58
58
|
I(u, { maxCount: l.maxCount }, null, 8, ["maxCount"])
|
|
@@ -81,8 +81,8 @@ const [Y, Z] = T("AvatarGroup"), ue = /* @__PURE__ */ E({
|
|
|
81
81
|
delayMs: {}
|
|
82
82
|
},
|
|
83
83
|
emits: ["loadingStatusChange"],
|
|
84
|
-
setup(
|
|
85
|
-
const d = F(), a = O("avatar"), s =
|
|
84
|
+
setup(h, { emit: o }) {
|
|
85
|
+
const d = F(), a = O("avatar"), s = h, g = H(o), k = j(a, {
|
|
86
86
|
variants: {
|
|
87
87
|
size: f(P, a),
|
|
88
88
|
stroke: f(w, a),
|
|
@@ -103,7 +103,7 @@ const [Y, Z] = T("AvatarGroup"), ue = /* @__PURE__ */ E({
|
|
|
103
103
|
shape: D,
|
|
104
104
|
onlineAlignment: L
|
|
105
105
|
};
|
|
106
|
-
}),
|
|
106
|
+
}), C = n(() => {
|
|
107
107
|
switch (c.value) {
|
|
108
108
|
case "lg":
|
|
109
109
|
case "xlg":
|
|
@@ -125,13 +125,13 @@ const [Y, Z] = T("AvatarGroup"), ue = /* @__PURE__ */ E({
|
|
|
125
125
|
return "xsm";
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
|
-
return (e, S) => (i(),
|
|
128
|
+
return (e, S) => (i(), A(t(J), {
|
|
129
129
|
as: "div",
|
|
130
130
|
class: p([t(k)(l.value), s.class])
|
|
131
131
|
}, {
|
|
132
132
|
default: b(() => [
|
|
133
133
|
!d.default && !e.text ? (i(), _(M, { key: 0 }, [
|
|
134
|
-
e.src ? (i(),
|
|
134
|
+
e.src ? (i(), A(t(K), R({ key: 0 }, t(g), {
|
|
135
135
|
src: e.src,
|
|
136
136
|
alt: e.alt,
|
|
137
137
|
class: t(v)(t(a), "image")
|
|
@@ -141,7 +141,7 @@ const [Y, Z] = T("AvatarGroup"), ue = /* @__PURE__ */ E({
|
|
|
141
141
|
}, {
|
|
142
142
|
default: b(() => [
|
|
143
143
|
B(e.$slots, "fallback", {}, () => [
|
|
144
|
-
e.fallback ? x("", !0) : (i(),
|
|
144
|
+
e.fallback ? x("", !0) : (i(), A(t(W), {
|
|
145
145
|
key: 0,
|
|
146
146
|
icon: e.icon,
|
|
147
147
|
size: m.value
|
|
@@ -159,10 +159,10 @@ const [Y, Z] = T("AvatarGroup"), ue = /* @__PURE__ */ E({
|
|
|
159
159
|
$(G(e.text), 1)
|
|
160
160
|
])
|
|
161
161
|
], 2)),
|
|
162
|
-
e.online ? (i(),
|
|
162
|
+
e.online ? (i(), A(X, {
|
|
163
163
|
key: 2,
|
|
164
164
|
color: e.onlineColor,
|
|
165
|
-
size:
|
|
165
|
+
size: C.value,
|
|
166
166
|
class: p(t(v)(t(a), "online"))
|
|
167
167
|
}, null, 8, ["color", "size", "class"])) : x("", !0)
|
|
168
168
|
]),
|
|
@@ -0,0 +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-DyKW40kh.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-B62H7K8P.js");exports.AvatarGroup=t._sfc_main$1;exports.injectAvatarGroupContext=t.injectAvatarGroupContext;exports.provideAvatarGroupContext=t.provideAvatarGroupContext;
|
package/dist/Badge/Badge.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseBadgeSlots, BaseBadgeProps } from '../Base/BaseBadge/BaseBadge';
|
|
2
2
|
import { BadgeColor, BadgeColorSubtle } from '../Base/BaseBadge/BaseBadge.model.js';
|
|
3
|
-
export type BadgeProps = Partial<Pick<BaseBadgeProps, 'class' | 'text' | 'icon'>> & {
|
|
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;
|
|
6
6
|
};
|
package/dist/Badge/index.js.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Badge.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Badge.vue_vue_type_script_setup_true_lang-CrMJ4fbZ.js");exports.Badge=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as f, useAttrs as u, computed as l, createBlock as b, openBlock as d, mergeProps as y, createSlots as _, renderList as B, withCtx as C, renderSlot as O, normalizeProps as $, guardReactiveProps as j } from "vue";
|
|
2
|
-
import { o as k } from "./omit-
|
|
3
|
-
import { B as a, a as n, _ as E } from "./BaseBadge.vue_vue_type_style_index_0_lang-
|
|
2
|
+
import { o as k } from "./omit-gDFhewvU.js";
|
|
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";
|
|
6
6
|
const z = /* @__PURE__ */ f({
|
|
@@ -10,11 +10,12 @@ const z = /* @__PURE__ */ f({
|
|
|
10
10
|
class: {},
|
|
11
11
|
text: {},
|
|
12
12
|
icon: {},
|
|
13
|
+
flipOnDir: {},
|
|
13
14
|
size: {},
|
|
14
15
|
color: {}
|
|
15
16
|
},
|
|
16
17
|
setup(p) {
|
|
17
|
-
const o = p,
|
|
18
|
+
const o = p, i = u(), m = l(() => {
|
|
18
19
|
const t = [...n, ...a], c = {
|
|
19
20
|
...Object.fromEntries(n.map((e) => [e, r(`${e}-5`)])),
|
|
20
21
|
...Object.fromEntries(
|
|
@@ -37,9 +38,9 @@ const z = /* @__PURE__ */ f({
|
|
|
37
38
|
fg: r("primary-oncolor")
|
|
38
39
|
};
|
|
39
40
|
}), g = l(() => ({
|
|
40
|
-
...k(
|
|
41
|
+
...k(i, "type"),
|
|
41
42
|
...o,
|
|
42
|
-
...
|
|
43
|
+
...m.value
|
|
43
44
|
}));
|
|
44
45
|
return (t, c) => (d(), b(E, y(g.value, { type: "pill" }), _({ _: 2 }, [
|
|
45
46
|
B(Object.keys(t.$slots), (s) => ({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),u=require("./omit-C4BrcXKG.js"),t=require("./BaseBadge.vue_vue_type_style_index_0_lang-PmBe2V25.js"),m=require("./options-B4iSAKol.js"),r=require("@pantograph/tokens"),d=e.defineComponent({...m.getComponentOptions("Badge",!1),__name:"Badge",props:{class:{},text:{},icon:{},flipOnDir:{},size:{},color:{}},setup(l){const o=l,g=e.useAttrs(),i=e.computed(()=>{const a=[...t.BadgeColors,...t.BadgeColorsSubtle],c={...Object.fromEntries(t.BadgeColors.map(s=>[s,r.getCssVar(`${s}-5`)])),...Object.fromEntries(t.BadgeColorsSubtle.map(s=>[s,r.getCssVar(`${s.replace("-subtle","")}-0`)])),"gray-subtle":r.getCssVar("gray-1")},n={...Object.fromEntries(t.BadgeColors.map(s=>[s,r.getCssVar("grayscale-light-0")])),yellow:r.getCssVar("grayscale-dark-0"),...Object.fromEntries(t.BadgeColorsSubtle.map(s=>[s,r.getCssVar(`${s.replace("-subtle","")}-5`)])),"gray-subtle":r.getCssVar("gray-6")};return o.color&&a.includes(o.color)?{bg:c[o.color],fg:n[o.color]}:{bg:r.getCssVar("primary-5"),fg:r.getCssVar("primary-oncolor")}}),p=e.computed(()=>({...u.omit(g,"type"),...o,...i.value}));return(a,c)=>(e.openBlock(),e.createBlock(t._sfc_main,e.mergeProps(p.value,{type:"pill"}),e.createSlots({_:2},[e.renderList(Object.keys(a.$slots),n=>({name:n,fn:e.withCtx(s=>[e.renderSlot(a.$slots,n,e.normalizeProps(e.guardReactiveProps(s)))])}))]),1040))}});exports._sfc_main=d;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Class } from '../../types';
|
|
2
2
|
import { BadgeColor, BadgeColorSubtle, BadgeSize, BadgeType } from './BaseBadge.model';
|
|
3
|
+
import { FlipOnDir } from '../../ConfigProvider';
|
|
3
4
|
export interface BaseBadgeProps {
|
|
4
5
|
size?: BadgeSize;
|
|
5
6
|
class?: Class;
|
|
@@ -9,6 +10,7 @@ export interface BaseBadgeProps {
|
|
|
9
10
|
br?: BadgeColor | BadgeColorSubtle | string;
|
|
10
11
|
type?: BadgeType;
|
|
11
12
|
icon?: string;
|
|
13
|
+
flipOnDir?: FlipOnDir;
|
|
12
14
|
}
|
|
13
15
|
export interface BaseBadgeSlots {
|
|
14
16
|
default?: () => never;
|
|
@@ -21,8 +23,8 @@ declare function __VLS_template(): {
|
|
|
21
23
|
};
|
|
22
24
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
23
25
|
declare const __VLS_component: import('vue').DefineComponent<BaseBadgeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BaseBadgeProps> & Readonly<{}>, {
|
|
24
|
-
size: BadgeSize;
|
|
25
26
|
type: BadgeType;
|
|
27
|
+
size: BadgeSize;
|
|
26
28
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
29
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
28
30
|
export default _default;
|
|
@@ -2,6 +2,7 @@ import { ButtonColor, ButtonSize, ButtonType, ButtonVariant } from './BaseButton
|
|
|
2
2
|
import { Class } from '../../types';
|
|
3
3
|
import { BadgeSize } from '../BaseBadge/BaseBadge.model';
|
|
4
4
|
import { BaseBadgeSlots } from '../BaseBadge/BaseBadge';
|
|
5
|
+
import { FlipOnDir } from '../../ConfigProvider';
|
|
5
6
|
export interface BaseButtonProps {
|
|
6
7
|
class?: Class;
|
|
7
8
|
text?: string | number;
|
|
@@ -17,6 +18,10 @@ export interface BaseButtonProps {
|
|
|
17
18
|
icon?: string;
|
|
18
19
|
preIcon?: string;
|
|
19
20
|
postIcon?: string;
|
|
21
|
+
flipOnDir?: FlipOnDir;
|
|
22
|
+
preIconFlipOnDir?: FlipOnDir;
|
|
23
|
+
postIconFlipOnDir?: FlipOnDir;
|
|
24
|
+
badgeIconFlipOnDir?: FlipOnDir;
|
|
20
25
|
}
|
|
21
26
|
export interface BaseButtonSlots {
|
|
22
27
|
default?: () => never;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { g as
|
|
3
|
-
import { cva as
|
|
4
|
-
import { g as
|
|
1
|
+
import { defineComponent as _, useSlots as h, computed as i, createElementBlock as u, openBlock as o, normalizeStyle as S, normalizeClass as D, unref as r, createCommentVNode as m, Fragment as O, createBlock as w, renderSlot as p, withCtx as V, createTextVNode as $, toDisplayString as F } from "vue";
|
|
2
|
+
import { g as I, a as l } from "./class-DziTeW9B.js";
|
|
3
|
+
import { cva as N } from "class-variance-authority";
|
|
4
|
+
import { g as T } from "./options-JBqnVZUl.js";
|
|
5
5
|
import "@iconify/vue";
|
|
6
|
-
import { _ as E } from "./Icon.vue_vue_type_style_index_0_lang-
|
|
7
|
-
|
|
6
|
+
import { _ as E } from "./Icon.vue_vue_type_style_index_0_lang-BVVc15Aa.js";
|
|
7
|
+
import { u as L } from "./index-iTlmMf0U.js";
|
|
8
|
+
const f = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], b = ["rect", "pill", "minify"], M = [
|
|
8
9
|
"primary",
|
|
9
10
|
"red",
|
|
10
11
|
"orange",
|
|
@@ -22,7 +23,7 @@ const b = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], d = ["rect", "pill", "m
|
|
|
22
23
|
"fuchsia",
|
|
23
24
|
"pink",
|
|
24
25
|
"gray"
|
|
25
|
-
],
|
|
26
|
+
], Q = [
|
|
26
27
|
"primary-subtle",
|
|
27
28
|
"red-subtle",
|
|
28
29
|
"orange-subtle",
|
|
@@ -40,8 +41,8 @@ const b = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], d = ["rect", "pill", "m
|
|
|
40
41
|
"fuchsia-subtle",
|
|
41
42
|
"pink-subtle",
|
|
42
43
|
"gray-subtle"
|
|
43
|
-
],
|
|
44
|
-
...
|
|
44
|
+
], R = /* @__PURE__ */ _({
|
|
45
|
+
...T("BaseBadge"),
|
|
45
46
|
__name: "BaseBadge",
|
|
46
47
|
props: {
|
|
47
48
|
size: { default: "md" },
|
|
@@ -51,22 +52,23 @@ const b = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], d = ["rect", "pill", "m
|
|
|
51
52
|
fg: {},
|
|
52
53
|
br: {},
|
|
53
54
|
type: { default: "pill" },
|
|
54
|
-
icon: {}
|
|
55
|
+
icon: {},
|
|
56
|
+
flipOnDir: {}
|
|
55
57
|
},
|
|
56
|
-
setup(
|
|
57
|
-
const n =
|
|
58
|
+
setup(d) {
|
|
59
|
+
const { getFlipOnDir: y } = L(), g = y("flipOnDir"), n = I("badge"), t = d, v = N(n, {
|
|
58
60
|
variants: {
|
|
59
|
-
size: l(
|
|
60
|
-
type: l(
|
|
61
|
+
size: l(f, n),
|
|
62
|
+
type: l(b, n),
|
|
61
63
|
text: l("text", n),
|
|
62
64
|
icon: l("icon", n),
|
|
63
65
|
br: l("br", n)
|
|
64
66
|
}
|
|
65
|
-
}),
|
|
66
|
-
let e =
|
|
67
|
+
}), a = h(), s = i(() => b.includes(t.type) ? t.type : "pill"), B = i(() => !!(t.text || a.default)), x = i(() => !!(t.icon || a.icon)), c = i(() => {
|
|
68
|
+
let e = f.includes(t.size) ? t.size : "md";
|
|
67
69
|
return e === "sm" && s.value !== "rect" ? s.value === "minify" ? e = "tiny" : s.value === "pill" && (e = "md") : s.value === "minify" && !["tiny", "tinier"].includes(e) ? e = "tiny" : s.value !== "minify" && ["tiny", "tinier"].includes(e) && (e = "md"), e;
|
|
68
|
-
}),
|
|
69
|
-
switch (
|
|
70
|
+
}), z = i(() => {
|
|
71
|
+
switch (c.value) {
|
|
70
72
|
case "sm":
|
|
71
73
|
return "xsm";
|
|
72
74
|
case "xsm":
|
|
@@ -77,47 +79,48 @@ const b = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], d = ["rect", "pill", "m
|
|
|
77
79
|
default:
|
|
78
80
|
return "sm";
|
|
79
81
|
}
|
|
80
|
-
}),
|
|
81
|
-
size:
|
|
82
|
+
}), k = i(() => ({
|
|
83
|
+
size: c.value,
|
|
82
84
|
// color,
|
|
83
85
|
type: s.value,
|
|
84
|
-
text:
|
|
85
|
-
icon:
|
|
86
|
+
text: B.value,
|
|
87
|
+
icon: x.value,
|
|
86
88
|
br: !!t.br
|
|
87
|
-
})),
|
|
88
|
-
const e =
|
|
89
|
-
return t.type === "rect" && (
|
|
89
|
+
})), C = i(() => {
|
|
90
|
+
const e = a.icon ?? t.icon;
|
|
91
|
+
return t.type === "rect" && (a.default || t.text) ? !1 : e;
|
|
90
92
|
});
|
|
91
|
-
return (e,
|
|
92
|
-
class:
|
|
93
|
-
style:
|
|
93
|
+
return (e, P) => (o(), u("div", {
|
|
94
|
+
class: D([r(v)(k.value), t.class]),
|
|
95
|
+
style: S({
|
|
94
96
|
"--ptc-badge-fg": t.fg,
|
|
95
97
|
"--ptc-badge-bg": t.bg,
|
|
96
98
|
"--ptc-badge-br": t.br
|
|
97
99
|
})
|
|
98
100
|
}, [
|
|
99
|
-
s.value !== "minify" ? (o(),
|
|
100
|
-
|
|
101
|
+
s.value !== "minify" ? (o(), u(O, { key: 0 }, [
|
|
102
|
+
C.value ? (o(), w(r(E), {
|
|
101
103
|
key: 0,
|
|
102
104
|
icon: e.icon,
|
|
103
|
-
size:
|
|
105
|
+
size: z.value,
|
|
106
|
+
flipOnDir: r(g)
|
|
104
107
|
}, {
|
|
105
108
|
default: V(() => [
|
|
106
109
|
p(e.$slots, "icon")
|
|
107
110
|
]),
|
|
108
111
|
_: 3
|
|
109
|
-
}, 8, ["icon", "size"])) : m("", !0),
|
|
112
|
+
}, 8, ["icon", "size", "flipOnDir"])) : m("", !0),
|
|
110
113
|
p(e.$slots, "default", {}, () => [
|
|
111
|
-
$(
|
|
114
|
+
$(F(e.text), 1)
|
|
112
115
|
])
|
|
113
116
|
], 64)) : m("", !0)
|
|
114
117
|
], 6));
|
|
115
118
|
}
|
|
116
119
|
});
|
|
117
120
|
export {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
b,
|
|
122
|
-
|
|
121
|
+
Q as B,
|
|
122
|
+
R as _,
|
|
123
|
+
M as a,
|
|
124
|
+
f as b,
|
|
125
|
+
b as c
|
|
123
126
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),l=require("./class-CjZYGZDW.js"),B=require("class-variance-authority"),C=require("./options-B4iSAKol.js");require("@iconify/vue");const _=require("./Icon.vue_vue_type_style_index_0_lang-c9NvwoHi.js"),x=require("./index-BBeDQiz4.js"),r=["2xsm","xsm","sm","md","tiny","tinier"],o=["rect","pill","minify"],z=["primary","red","orange","amber","yellow","lime","green","teal","cyan","sky","blue","ocean","violet","amethyst","fuchsia","pink","gray"],k=["primary-subtle","red-subtle","orange-subtle","amber-subtle","yellow-subtle","lime-subtle","green-subtle","teal-subtle","cyan-subtle","sky-subtle","blue-subtle","ocean-subtle","violet-subtle","amethyst-subtle","fuchsia-subtle","pink-subtle","gray-subtle"],S=e.defineComponent({...C.getComponentOptions("BaseBadge"),__name:"BaseBadge",props:{size:{default:"md"},class:{},text:{},bg:{},fg:{},br:{},type:{default:"pill"},icon:{},flipOnDir:{}},setup(u){const{getFlipOnDir:m}=x.useConfig(),d=m("flipOnDir"),i=l.getBemBlock("badge"),s=u,p=B.cva(i,{variants:{size:l.generateVariantClassList(r,i),type:l.generateVariantClassList(o,i),text:l.generateVariantClassList("text",i),icon:l.generateVariantClassList("icon",i),br:l.generateVariantClassList("br",i)}}),a=e.useSlots(),n=e.computed(()=>o.includes(s.type)?s.type:"pill"),f=e.computed(()=>!!(s.text||a.default)),g=e.computed(()=>!!(s.icon||a.icon)),c=e.computed(()=>{let t=r.includes(s.size)?s.size:"md";return t==="sm"&&n.value!=="rect"?n.value==="minify"?t="tiny":n.value==="pill"&&(t="md"):n.value==="minify"&&!["tiny","tinier"].includes(t)?t="tiny":n.value!=="minify"&&["tiny","tinier"].includes(t)&&(t="md"),t}),y=e.computed(()=>{switch(c.value){case"sm":return"xsm";case"xsm":return"2xsm";case"2xsm":return"3xsm";case"md":default:return"sm"}}),b=e.computed(()=>({size:c.value,type:n.value,text:f.value,icon:g.value,br:!!s.br})),v=e.computed(()=>{const t=a.icon??s.icon;return s.type==="rect"&&(a.default||s.text)?!1:t});return(t,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(p)(b.value),s.class]),style:e.normalizeStyle({"--ptc-badge-fg":s.fg,"--ptc-badge-bg":s.bg,"--ptc-badge-br":s.br})},[n.value!=="minify"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[v.value?(e.openBlock(),e.createBlock(e.unref(_._sfc_main),{key:0,icon:t.icon,size:y.value,flipOnDir:e.unref(d)},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"icon")]),_:3},8,["icon","size","flipOnDir"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)])],64)):e.createCommentVNode("",!0)],6))}});exports.BadgeColors=z;exports.BadgeColorsSubtle=k;exports.BadgeSizes=r;exports.BadgeTypes=o;exports._sfc_main=S;
|