@pantograph/vue 0.27.7 → 0.27.9
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 +2 -0
- 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-DEtXFuT4.js +1 -0
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-D6GO-k30.js → ActionButton.vue_vue_type_script_setup_true_lang-v9gNXyn5.js} +7 -6
- 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-BAOHfQJ2.js → Alert.vue_vue_type_style_index_0_lang-C8MzfVOk.js} +1 -1
- package/dist/{Alert.vue_vue_type_style_index_0_lang-Drpe229t.js → Alert.vue_vue_type_style_index_0_lang-p4dL1Gko.js} +1 -1
- package/dist/Base/BaseButton/BaseButton.d.ts +22 -50
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-DPgYIiQ0.js +1 -0
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-D8UQiapO.js → BaseButton.vue_vue_type_style_index_0_lang-j05pPl4c.js} +70 -63
- package/dist/Button/Button.d.ts +2 -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-Mnltc7z6.js → Button.vue_vue_type_script_setup_true_lang-BQU4_Lua.js} +2 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang-Cl6tKGGP.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-CyER8GOv.js → ColorPicker.vue_vue_type_style_index_0_lang-RsIsAz7Q.js} +2 -2
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-M_Tlbw68.js → ColorPicker.vue_vue_type_style_index_0_lang-ZhSubRCW.js} +1 -1
- package/dist/ColorSwatch/index.js +1 -1
- package/dist/ColorSwatch/index.umd.cjs +1 -1
- package/dist/{ColorSwatch-CIE6Omwr.js → ColorSwatch-CUFAWu5f.js} +1 -1
- package/dist/{ColorSwatch-C78FvSId.js → ColorSwatch-cqNMaSvB.js} +1 -1
- package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-BuiXPjL9.js → ColorSwatch.vue_vue_type_style_index_0_lang-BGDS4VzJ.js} +1 -1
- package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-BlhGwucn.js → ColorSwatch.vue_vue_type_style_index_0_lang-ZdMYWeO7.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-BlraIbBp.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-BZzb0nJN.js} +2 -2
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-Ba9LhQWl.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-CVCppls5.js} +1 -1
- package/dist/Comment/CommentActions.d.ts +12 -8
- package/dist/Comment/CommentEditor.d.ts +24 -16
- package/dist/Comment/CommentReactions.d.ts +6 -4
- package/dist/Comment/index.js +4 -4
- package/dist/Comment/index.umd.cjs +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-DpLNsX2Z.js → DataTable.vue_vue_type_style_index_0_lang-B2ObeeJP.js} +2 -2
- package/dist/{DataTable.vue_vue_type_style_index_0_lang-CkgL-lAr.js → DataTable.vue_vue_type_style_index_0_lang-BUZ8G07U.js} +1 -1
- package/dist/DropZone/index.js +1 -1
- package/dist/DropZone/index.umd.cjs +1 -1
- package/dist/{DropZone.vue_vue_type_style_index_0_lang-D2U8rqTy.js → DropZone.vue_vue_type_style_index_0_lang-CIEiqOyg.js} +1 -1
- package/dist/{DropZone.vue_vue_type_style_index_0_lang-ZfmWjf5_.js → DropZone.vue_vue_type_style_index_0_lang-DAdn3SV-.js} +1 -1
- package/dist/FloatButton/FloatButton.d.ts +2 -0
- 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-C1bIx2Ad.js +1 -0
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-DH1hvvgb.js → FloatButton.vue_vue_type_script_setup_true_lang-Djn-mHpD.js} +2 -1
- package/dist/GOPicker/index.js +1 -1
- package/dist/GOPicker/index.umd.cjs +1 -1
- package/dist/{GOPicker.vue_vue_type_style_index_0_lang-Coc2r8FZ.js → GOPicker.vue_vue_type_style_index_0_lang-BM0Tln3s.js} +1 -1
- package/dist/{GOPicker.vue_vue_type_style_index_0_lang-CsxKAG7z.js → GOPicker.vue_vue_type_style_index_0_lang-CExz9-OC.js} +3 -3
- package/dist/IconButton/IconButton.d.ts +4 -2
- 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-ahPqU4HJ.js → IconButton.vue_vue_type_script_setup_true_lang-1WWZ64Us.js} +2 -1
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-EXpTHZs6.js +1 -0
- package/dist/Pagination/index.js +1 -1
- package/dist/Pagination/index.umd.cjs +1 -1
- package/dist/{Pagination.vue_vue_type_style_index_0_lang-B0_VsOAZ.js → Pagination.vue_vue_type_style_index_0_lang-CSHShI5C.js} +1 -1
- package/dist/{Pagination.vue_vue_type_style_index_0_lang-CLsI3KAW.js → Pagination.vue_vue_type_style_index_0_lang-D94Qn7sm.js} +1 -1
- package/dist/Select/index.js +1 -1
- package/dist/Select/index.umd.cjs +1 -1
- package/dist/Select.vue_vue_type_style_index_0_lang-BAKkMSd9.js +1 -0
- package/dist/{Select.vue_vue_type_style_index_0_lang-Dh-a0ASP.js → Select.vue_vue_type_style_index_0_lang-BVGpB085.js} +29 -29
- package/dist/{TabContent.vue_vue_type_script_setup_true_lang-B6GAPEdf.js → TabContent.vue_vue_type_script_setup_true_lang-CRNljMkW.js} +1 -1
- package/dist/{TabContent.vue_vue_type_script_setup_true_lang-B6gNekgT.js → TabContent.vue_vue_type_script_setup_true_lang-s7YRQosV.js} +1 -1
- package/dist/Tabs/index.js +1 -1
- package/dist/Tabs/index.umd.cjs +1 -1
- package/dist/Upload/index.js +1 -1
- package/dist/Upload/index.umd.cjs +1 -1
- package/dist/{Upload.vue_vue_type_style_index_0_lang-DJqvk1PP.js → Upload.vue_vue_type_style_index_0_lang-DAL-1Um6.js} +2 -2
- package/dist/{Upload.vue_vue_type_style_index_0_lang-cN55f5aO.js → Upload.vue_vue_type_style_index_0_lang-DY_iafpY.js} +1 -1
- package/dist/exports.d.ts +5 -5
- package/dist/index.js +263 -257
- package/dist/index.umd.cjs +1 -1
- package/dist/style/index.css +1 -1
- package/package.json +1 -1
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-D3TR9Ar1.js +0 -1
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-CJ5cQhLc.js +0 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang-jL1v7uqc.js +0 -1
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-Drvb_yGk.js +0 -1
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-Dk1TQJVA.js +0 -1
- package/dist/Select.vue_vue_type_style_index_0_lang-CiU2FQYW.js +0 -1
|
@@ -12,6 +12,7 @@ declare function __VLS_template(): {
|
|
|
12
12
|
$: import('vue').ComponentInternalInstance;
|
|
13
13
|
$data: {};
|
|
14
14
|
$props: {
|
|
15
|
+
readonly as?: import('reka-ui').AsTag | import('vue').Component | undefined;
|
|
15
16
|
readonly class?: import('clsx').ClassValue;
|
|
16
17
|
readonly text?: string | number | undefined;
|
|
17
18
|
readonly size?: import('..').ButtonSize | undefined;
|
|
@@ -149,6 +150,7 @@ declare const __VLS_component: import('vue').DefineComponent<ActionButtonProps,
|
|
|
149
150
|
$: import('vue').ComponentInternalInstance;
|
|
150
151
|
$data: {};
|
|
151
152
|
$props: {
|
|
153
|
+
readonly as?: import('reka-ui').AsTag | import('vue').Component | undefined;
|
|
152
154
|
readonly class?: import('clsx').ClassValue;
|
|
153
155
|
readonly text?: string | number | undefined;
|
|
154
156
|
readonly size?: import('..').ButtonSize | undefined;
|
|
@@ -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-DEtXFuT4.js");exports.ActionButton=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),p=require("es-toolkit"),u=require("./BaseButton.vue_vue_type_style_index_0_lang-DPgYIiQ0.js"),_=require("@pantograph/utils-vue"),f=e.defineComponent({..._.getComponentOptions("ActionButton",!1),__name:"ActionButton",props:{as:{},class:{},text:{},size:{},noRing:{type:Boolean},loading:{type:Boolean},active:{type:Boolean},badgeText:{},badgeIcon:{},icon:{},preIcon:{},postIcon:{},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 i=r,a=e.useAttrs(),c=e.computed(()=>({...p.omit(a,["color","type","variant","action"]),...i})),o=e.ref();return s({focus(){var t;(t=o.value)==null||t.focus()},blur(){var t;(t=o.value)==null||t.blur()}}),(t,d)=>(e.openBlock(),e.createBlock(u._sfc_main,e.mergeProps(c.value,{action:"",ref_key:"buttonRef",ref:o}),e.createSlots({_:2},[e.renderList(Object.keys(t.$slots),n=>({name:n,fn:e.withCtx(l=>[e.renderSlot(t.$slots,n,e.normalizeProps(e.guardReactiveProps(l)))])}))]),1040))}});exports._sfc_main=f;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { defineComponent as c, useAttrs as l, computed as f, ref as m, createBlock as u, openBlock as d, mergeProps as b, createSlots as y, renderList as g, withCtx as B, renderSlot as _, normalizeProps as v, guardReactiveProps as I } from "vue";
|
|
2
2
|
import { omit as O } from "es-toolkit";
|
|
3
|
-
import { _ as h } from "./BaseButton.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import { _ as h } from "./BaseButton.vue_vue_type_style_index_0_lang-j05pPl4c.js";
|
|
4
4
|
import { getComponentOptions as k } from "@pantograph/utils-vue";
|
|
5
5
|
const F = /* @__PURE__ */ c({
|
|
6
6
|
...k("ActionButton", !1),
|
|
7
7
|
__name: "ActionButton",
|
|
8
8
|
props: {
|
|
9
|
+
as: {},
|
|
9
10
|
class: {},
|
|
10
11
|
text: {},
|
|
11
12
|
size: {},
|
|
@@ -31,8 +32,8 @@ const F = /* @__PURE__ */ c({
|
|
|
31
32
|
variant: {}
|
|
32
33
|
},
|
|
33
34
|
setup(n, { expose: r }) {
|
|
34
|
-
const a = n,
|
|
35
|
-
...O(
|
|
35
|
+
const a = n, s = l(), i = f(() => ({
|
|
36
|
+
...O(s, ["color", "type", "variant", "action"]),
|
|
36
37
|
...a
|
|
37
38
|
})), o = m();
|
|
38
39
|
return r({
|
|
@@ -44,15 +45,15 @@ const F = /* @__PURE__ */ c({
|
|
|
44
45
|
var e;
|
|
45
46
|
(e = o.value) == null || e.blur();
|
|
46
47
|
}
|
|
47
|
-
}), (e, x) => (d(), u(h, b(
|
|
48
|
+
}), (e, x) => (d(), u(h, b(i.value, {
|
|
48
49
|
action: "",
|
|
49
50
|
ref_key: "buttonRef",
|
|
50
51
|
ref: o
|
|
51
52
|
}), y({ _: 2 }, [
|
|
52
53
|
g(Object.keys(e.$slots), (t) => ({
|
|
53
54
|
name: t,
|
|
54
|
-
fn: B((
|
|
55
|
-
_(e.$slots, t, v(I(
|
|
55
|
+
fn: B((p) => [
|
|
56
|
+
_(e.$slots, t, v(I(p)))
|
|
56
57
|
])
|
|
57
58
|
}))
|
|
58
59
|
]), 1040));
|
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-p4dL1Gko.js");exports.Alert=e._sfc_main;exports.AlertTypes=e.AlertTypes;exports.default=e._sfc_main;
|
|
@@ -2,7 +2,7 @@ import { defineComponent as h, useSlots as S, computed as V, createElementBlock
|
|
|
2
2
|
import { getBemBlock as T, generateVariantClassList as D, normCls as r, getBemElement as a } from "@pantograph/utils";
|
|
3
3
|
import { cva as L } from "class-variance-authority";
|
|
4
4
|
import { getComponentOptions as M } from "@pantograph/utils-vue";
|
|
5
|
-
import { _ as O } from "./IconButton.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as O } from "./IconButton.vue_vue_type_script_setup_true_lang-1WWZ64Us.js";
|
|
6
6
|
import { _ as R } from "./GraphicalObject.vue_vue_type_script_setup_true_lang-B0QyiUKw.js";
|
|
7
7
|
import { _ as j } from "./Link.vue_vue_type_style_index_0_lang-brdTffbT.js";
|
|
8
8
|
const q = ["info", "success", "danger", "warning", "hint"], W = /* @__PURE__ */ h({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),l=require("@pantograph/utils"),C=require("class-variance-authority"),g=require("@pantograph/utils-vue"),y=require("./IconButton.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";const e=require("vue"),l=require("@pantograph/utils"),C=require("class-variance-authority"),g=require("@pantograph/utils-vue"),y=require("./IconButton.vue_vue_type_script_setup_true_lang-EXpTHZs6.js"),B=require("./GraphicalObject.vue_vue_type_script_setup_true_lang-CxrU_AN6.js"),k=require("./Link.vue_vue_type_style_index_0_lang-B1uxGXxI.js"),i=["info","success","danger","warning","hint"],b=e.defineComponent({...g.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:u}){const r=c,m=u,n=l.getBemBlock("alert"),p=C.cva(n,{variants:{type:l.generateVariantClassList(i,n)}}),o=e.useSlots(),d={success:"tabler:circle-check",warning:"tabler:alert-triangle",danger:"tabler:circle-x",hint:"tabler:bulb",info:"tabler:info-circle"},s=e.computed(()=>r.icon??d[r.type]);return(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l.normCls)(e.unref(p)({type:t.type}),r.class)),style:e.normalizeStyle({"--ptc-alert-fg":t.fg,"--ptc-alert-bg":t.bg,"--ptc-alert-br":t.br})},[o.icon||s.value?(e.openBlock(),e.createBlock(B._sfc_main,{key:0,size:"md",icon:s.value,class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(n),"icon"),t.iconCls))},e.createSlots({_:2},[o.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(l.normCls)(e.unref(l.getBemElement)(e.unref(n),"body"),t.bodyCls))},[e.renderSlot(t.$slots,"default",{},()=>[t.title||o.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(t.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2)):e.createCommentVNode("",!0),t.description||o.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(t.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])],2)):e.createCommentVNode("",!0),t.link||o.link?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(l.getBemElement)(e.unref(n),"action"))},[e.renderSlot(t.$slots,"link",{},()=>[e.createVNode(e.unref(k._sfc_main),e.normalizeProps(e.guardReactiveProps(t.linkProps)),null,16)])],2)):e.createCommentVNode("",!0)])],2),r.closeable||o.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(t.$slots,"closeable",{},()=>[e.createVNode(y._sfc_main,{icon:"tabler:x",color:"neutral",type:"ghost",onClick:a[0]||(a[0]=f=>m("close",f))})])],2)):e.createCommentVNode("",!0)],6))}});exports.AlertTypes=i;exports._sfc_main=b;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BadgeSize } from '../BaseBadge/BaseBadge.model';
|
|
1
|
+
import { PrimitiveProps } from 'reka-ui';
|
|
3
2
|
import { BaseBadgeSlots } from '../BaseBadge/BaseBadge';
|
|
4
|
-
import { FlipOnDir } from '../../ConfigProvider';
|
|
5
3
|
import { ClassValue } from 'class-variance-authority/types';
|
|
4
|
+
import { ButtonColor, ButtonSize, ButtonType, ButtonVariant } from './BaseButton.model';
|
|
5
|
+
import { FlipOnDir } from '../../ConfigProvider';
|
|
6
|
+
import { BadgeSize } from '../BaseBadge/BaseBadge.model';
|
|
6
7
|
export interface BaseButtonProps {
|
|
8
|
+
as?: PrimitiveProps['as'];
|
|
7
9
|
class?: ClassValue;
|
|
8
10
|
text?: string | number;
|
|
9
11
|
size?: ButtonSize;
|
|
@@ -42,51 +44,22 @@ export interface BaseButtonSlots {
|
|
|
42
44
|
badgeIcon?: BaseBadgeSlots['icon'];
|
|
43
45
|
postIcon?: (data?: object) => never;
|
|
44
46
|
}
|
|
45
|
-
declare
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
asChild: boolean;
|
|
62
|
-
as: import('reka-ui').AsTag | import('vue').Component;
|
|
63
|
-
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
64
|
-
P: {};
|
|
65
|
-
B: {};
|
|
66
|
-
D: {};
|
|
67
|
-
C: {};
|
|
68
|
-
M: {};
|
|
69
|
-
Defaults: {};
|
|
70
|
-
}, Readonly<import('vue').ExtractPropTypes<{
|
|
71
|
-
asChild: {
|
|
72
|
-
type: BooleanConstructor;
|
|
73
|
-
default: boolean;
|
|
74
|
-
};
|
|
75
|
-
as: {
|
|
76
|
-
type: import('vue').PropType<import('reka-ui').AsTag | import('vue').Component>;
|
|
77
|
-
default: string;
|
|
78
|
-
};
|
|
79
|
-
}>> & Readonly<{}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
80
|
-
[key: string]: any;
|
|
81
|
-
}>, {}, {}, {}, {
|
|
82
|
-
asChild: boolean;
|
|
83
|
-
as: import('reka-ui').AsTag | import('vue').Component;
|
|
84
|
-
}> | null;
|
|
85
|
-
};
|
|
86
|
-
rootEl: any;
|
|
87
|
-
};
|
|
88
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
89
|
-
declare const __VLS_component: import('vue').DefineComponent<BaseButtonProps, {
|
|
47
|
+
export declare const buttonPrefix: string;
|
|
48
|
+
export declare const buttonVariantsClass: (props?: ({
|
|
49
|
+
size?: string | null | undefined;
|
|
50
|
+
type?: string | null | undefined;
|
|
51
|
+
color?: string | null | undefined;
|
|
52
|
+
variant?: string | null | undefined;
|
|
53
|
+
action?: string | null | undefined;
|
|
54
|
+
active?: string | null | undefined;
|
|
55
|
+
text?: string | null | undefined;
|
|
56
|
+
preIcon?: string | null | undefined;
|
|
57
|
+
postIcon?: string | null | undefined;
|
|
58
|
+
loading?: string | null | undefined;
|
|
59
|
+
block?: string | null | undefined;
|
|
60
|
+
noRing?: string | null | undefined;
|
|
61
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
62
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<BaseButtonProps, {
|
|
90
63
|
focus(): void;
|
|
91
64
|
blur(): void;
|
|
92
65
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
@@ -135,8 +108,7 @@ declare const __VLS_component: import('vue').DefineComponent<BaseButtonProps, {
|
|
|
135
108
|
asChild: boolean;
|
|
136
109
|
as: import('reka-ui').AsTag | import('vue').Component;
|
|
137
110
|
}> | null;
|
|
138
|
-
}, any>;
|
|
139
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
111
|
+
}, any>, Readonly<BaseButtonSlots> & BaseButtonSlots>;
|
|
140
112
|
export default _default;
|
|
141
113
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
142
114
|
new (): {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),B=require("./Icon.vue_vue_type_style_index_0_lang-CMFYMG-2.js"),N=require("./Spinner.vue_vue_type_style_index_0_lang-k30PU_tO.js"),$=require("./Badge.vue_vue_type_script_setup_true_lang-BP3OmkDG.js"),G=require("reka-ui"),s=require("./ButtonGroup.vue_vue_type_script_setup_true_lang-aMsUnJ9c.js"),i=require("@pantograph/utils"),A=require("./ConfigProvider.vue_vue_type_script_setup_true_lang-Dn5qxQ1y.js"),I=require("@pantograph/utils-vue"),j=require("class-variance-authority"),a=i.getBemBlock("button"),h=j.cva(a,{variants:{size:i.generateVariantClassList(s.ButtonSizes,a),type:i.generateVariantClassList(s.ButtonTypes,a),color:i.generateVariantClassList(s.ButtonColors,a),variant:i.generateVariantClassList(s.ButtonVariants,a),action:i.generateVariantClassList("action",a),active:i.generateVariantClassList("active",a),text:i.generateVariantClassList("text",a),preIcon:i.generateVariantClassList("preIcon",a),postIcon:i.generateVariantClassList("postIcon",a),loading:i.generateVariantClassList("loading",a),block:i.generateVariantClassList("block",a),noRing:i.generateVariantClassList("no-ring",a)}}),K=e.defineComponent({...I.getComponentOptions("BaseButton"),__name:"BaseButton",props:{as:{},class:{},text:{},size:{},color:{default:"primary"},noRing:{type:Boolean},type:{default:"fill"},variant:{},loading:{type:Boolean},action:{type:Boolean},active:{type:Boolean},badgeText:{},badgeIcon:{},icon:{},preIcon:{},postIcon:{},flipOnDir:{},preIconFlipOnDir:{},postIconFlipOnDir:{},badgeIconFlipOnDir:{},htmlType:{default:"button"},block:{type:Boolean},disabled:{type:Boolean,default:void 0},hover:{type:Boolean},href:{},target:{}},emits:["click"],setup(x,{expose:V,emit:D}){const t=x,{getFlipOnDir:p}=A.useConfig(),S=p("flipOnDir"),O=p("preIconFlipOnDir"),T=p("postIconFlipOnDir"),L=p("badgeIconFlipOnDir"),y=s.injectButtonGroupContext({size:e.computed(()=>t.size),variant:e.computed(()=>t.variant)}),d=e.computed(()=>t.variant??y.variant.value??"simple"),r=e.computed(()=>["icon","float"].includes(d.value)||(o.icon||t.icon)&&!(t.text||o.default||t.preIcon||o.preIcon||t.postIcon||o.postIcon)),o=e.useSlots(),{getDisabled:g,getSize:v}=I.useFormInput({getSize:()=>t.size??y.size.value}),q=e.computed(()=>{let n=s.ButtonTypes.includes(t.type)?t.type:"fill";const l=v.value,f=l&&s.ButtonSizes.includes(l)?l:"md";let c=t.color&&s.ButtonColors.includes(t.color)?t.color:"primary",u=d.value&&s.ButtonVariants.includes(d.value)?d.value:"simple";return t.action?((u==="float"||r.value)&&(u="icon"),n==="fill"&&(n="outline"),c=void 0):u==="float"&&(n==="ghost"&&(n="fill"),["primary","neutral"].includes(c)||(c="primary")),{size:f,type:n,color:c,variant:u,action:!!t.action,active:!!t.active,loading:!!t.loading,block:!!t.block,noRing:!!t.noRing,text:!r.value&&!!(t.text||o.default),preIcon:!r.value&&!!(t.preIcon||o.preIcon),postIcon:!r.value&&!!(t.postIcon||o.postIcon)}}),m=e.computed(()=>{switch(v.value){case"lg":return"sm";case"sm":return"2xsm";default:return"xsm"}}),F=e.computed(()=>{switch(v.value){case"sm":return"3xsm";case"lg":return"xsm";case"md":default:return"2xsm"}}),b="2xsm",k=e.ref(0),C=e.computed(()=>t.as?t.as:t.href?"a":"button");e.watch(C,()=>{k.value++});const P=e.computed(()=>{const n={disabled:g.value};return t.href&&(n.href=t.href,n.target=t.target),t.htmlType&&(n.type=t.htmlType),t.hover&&(n["data-hover"]=""),n}),_=e.ref();V({focus(){var n;(n=_.value)==null||n.focus()},blur(){var n;(n=_.value)==null||n.blur()}});const w=D,R=n=>{if(t.loading||t.disabled){n.preventDefault(),n.stopPropagation();return}w("click",n)};e.computed(()=>t.action&&t.active&&!r.value&&(t.badgeText||o.badgeText||t.badgeIcon||o.badgeIcon||o.badge));const E=()=>{var n,l,f;if(t.action&&t.active&&!r.value){const c=(n=o.badge)==null?void 0:n.call(o,{color:g.value?"gray":"primary",size:b});if(!I.isEmptyElement(c))return c;const u=(l=o.badgeText)==null?void 0:l.call(o,{}),z=(f=o.badgeIcon)==null?void 0:f.call(o,{});if(t.badgeText||u||t.badgeIcon||z)return e.h($._sfc_main,{text:t.badgeText,icon:t.badgeIcon,flipOnDir:L.value,color:g.value?"gray":"primary",size:b},{default:u?o.badgeText:void 0,icon:z?o.badgeIcon:void 0})}return null};return(n,l)=>(e.openBlock(),e.createBlock(e.unref(G.Primitive),e.mergeProps({as:C.value,key:String(k.value),class:e.unref(i.normCls)(e.unref(h)(q.value),t.class),ref_key:"buttonRef",ref:_},P.value,{onClick:R}),{default:e.withCtx(()=>[n.loading?(e.openBlock(),e.createBlock(N._sfc_main,{key:1,class:e.normalizeClass(e.unref(i.getBemElement)(e.unref(a),"loading")),size:m.value},null,8,["class","size"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(n.preIcon||o.preIcon)&&!r.value?(e.openBlock(),e.createBlock(B._sfc_main,{key:0,flipOnDir:e.unref(O),icon:n.preIcon,size:m.value},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"preIcon")]),_:3},8,["flipOnDir","icon","size"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(B._sfc_main,{key:1,icon:n.icon,size:F.value,flipOnDir:e.unref(S)},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon")]),_:3},8,["icon","size","flipOnDir"])):e.renderSlot(n.$slots,"default",{key:2},()=>[e.createTextVNode(e.toDisplayString(n.text),1)]),e.createVNode(E),(n.postIcon||o.postIcon)&&!r.value?(e.openBlock(),e.createBlock(B._sfc_main,{key:3,flipOnDir:e.unref(T),icon:n.postIcon,size:m.value},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"postIcon")]),_:3},8,["flipOnDir","icon","size"])):e.createCommentVNode("",!0)],64))]),_:3},16,["as","class"]))}});exports._sfc_main=K;exports.buttonPrefix=a;exports.buttonVariantsClass=h;
|
|
@@ -1,17 +1,33 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { Primitive as
|
|
6
|
-
import { B as
|
|
7
|
-
import { getBemBlock as
|
|
8
|
-
import { cva as pe } from "class-variance-authority";
|
|
1
|
+
import { defineComponent as M, computed as i, useSlots as Q, ref as T, watch as U, createBlock as f, openBlock as u, unref as r, mergeProps as W, withCtx as v, createElementBlock as X, Fragment as Y, createCommentVNode as C, renderSlot as I, createVNode as Z, createTextVNode as ee, toDisplayString as oe, normalizeClass as te, h as ne } from "vue";
|
|
2
|
+
import { _ as h } from "./Icon.vue_vue_type_style_index_0_lang-LLvjBJx0.js";
|
|
3
|
+
import { _ as ae } from "./Spinner.vue_vue_type_style_index_0_lang-COQRqpmY.js";
|
|
4
|
+
import { _ as ie } from "./Badge.vue_vue_type_script_setup_true_lang-CjM2eHxl.js";
|
|
5
|
+
import { Primitive as le } from "reka-ui";
|
|
6
|
+
import { B as _, b as F, a as P, c as $, i as re } from "./ButtonGroup.vue_vue_type_script_setup_true_lang-DGuzTQhm.js";
|
|
7
|
+
import { getBemBlock as se, generateVariantClassList as a, normCls as ce, getBemElement as pe } from "@pantograph/utils";
|
|
9
8
|
import { u as ue } from "./ConfigProvider.vue_vue_type_script_setup_true_lang-C-xm8OzO.js";
|
|
10
9
|
import { getComponentOptions as fe, useFormInput as de, isEmptyElement as me } from "@pantograph/utils-vue";
|
|
11
|
-
|
|
10
|
+
import { cva as ge } from "class-variance-authority";
|
|
11
|
+
const n = se("button"), ve = ge(n, {
|
|
12
|
+
variants: {
|
|
13
|
+
size: a($, n),
|
|
14
|
+
type: a(P, n),
|
|
15
|
+
color: a(F, n),
|
|
16
|
+
variant: a(_, n),
|
|
17
|
+
action: a("action", n),
|
|
18
|
+
active: a("active", n),
|
|
19
|
+
text: a("text", n),
|
|
20
|
+
preIcon: a("preIcon", n),
|
|
21
|
+
postIcon: a("postIcon", n),
|
|
22
|
+
loading: a("loading", n),
|
|
23
|
+
block: a("block", n),
|
|
24
|
+
noRing: a("no-ring", n)
|
|
25
|
+
}
|
|
26
|
+
}), Se = /* @__PURE__ */ M({
|
|
12
27
|
...fe("BaseButton"),
|
|
13
28
|
__name: "BaseButton",
|
|
14
29
|
props: {
|
|
30
|
+
as: {},
|
|
15
31
|
class: {},
|
|
16
32
|
text: {},
|
|
17
33
|
size: {},
|
|
@@ -39,31 +55,16 @@ const F = "2xsm", De = /* @__PURE__ */ K({
|
|
|
39
55
|
target: {}
|
|
40
56
|
},
|
|
41
57
|
emits: ["click"],
|
|
42
|
-
setup(
|
|
43
|
-
const e =
|
|
44
|
-
variants: {
|
|
45
|
-
size: a(_, n),
|
|
46
|
-
type: a(C, n),
|
|
47
|
-
color: a(T, n),
|
|
48
|
-
variant: a(S, n),
|
|
49
|
-
action: a("action", n),
|
|
50
|
-
active: a("active", n),
|
|
51
|
-
text: a("text", n),
|
|
52
|
-
preIcon: a("preIcon", n),
|
|
53
|
-
postIcon: a("postIcon", n),
|
|
54
|
-
loading: a("loading", n),
|
|
55
|
-
block: a("block", n),
|
|
56
|
-
noRing: a("no-ring", n)
|
|
57
|
-
}
|
|
58
|
-
}), h = le({
|
|
58
|
+
setup(R, { expose: V, emit: w }) {
|
|
59
|
+
const e = R, { getFlipOnDir: d } = ue(), E = d("flipOnDir"), N = d("preIconFlipOnDir"), G = d("postIconFlipOnDir"), j = d("badgeIconFlipOnDir"), k = re({
|
|
59
60
|
size: i(() => e.size),
|
|
60
61
|
variant: i(() => e.variant)
|
|
61
|
-
}), m = i(() => e.variant ??
|
|
62
|
+
}), m = i(() => e.variant ?? k.variant.value ?? "simple"), l = i(
|
|
62
63
|
() => ["icon", "float"].includes(m.value) || (t.icon || e.icon) && !(e.text || t.default || e.preIcon || t.preIcon || e.postIcon || t.postIcon)
|
|
63
|
-
), t =
|
|
64
|
-
let o =
|
|
65
|
-
const s = y.value, g = s &&
|
|
66
|
-
let c = e.color &&
|
|
64
|
+
), t = Q(), { getDisabled: b, getSize: y } = de({ getSize: () => e.size ?? k.size.value }), A = i(() => {
|
|
65
|
+
let o = P.includes(e.type) ? e.type : "fill";
|
|
66
|
+
const s = y.value, g = s && $.includes(s) ? s : "md";
|
|
67
|
+
let c = e.color && F.includes(e.color) ? e.color : "primary", p = m.value && _.includes(m.value) ? m.value : "simple";
|
|
67
68
|
return e.action ? ((p === "float" || l.value) && (p = "icon"), o === "fill" && (o = "outline"), c = void 0) : p === "float" && (o === "ghost" && (o = "fill"), ["primary", "neutral"].includes(c) || (c = "primary")), {
|
|
68
69
|
size: g,
|
|
69
70
|
type: o,
|
|
@@ -87,7 +88,7 @@ const F = "2xsm", De = /* @__PURE__ */ K({
|
|
|
87
88
|
default:
|
|
88
89
|
return "xsm";
|
|
89
90
|
}
|
|
90
|
-
}),
|
|
91
|
+
}), K = i(() => {
|
|
91
92
|
switch (y.value) {
|
|
92
93
|
case "sm":
|
|
93
94
|
return "3xsm";
|
|
@@ -97,13 +98,17 @@ const F = "2xsm", De = /* @__PURE__ */ K({
|
|
|
97
98
|
default:
|
|
98
99
|
return "2xsm";
|
|
99
100
|
}
|
|
100
|
-
}), x = i(() => e.href ? "a" : "button")
|
|
101
|
+
}), x = "2xsm", D = T(0), O = i(() => e.as ? e.as : e.href ? "a" : "button");
|
|
102
|
+
U(O, () => {
|
|
103
|
+
D.value++;
|
|
104
|
+
});
|
|
105
|
+
const L = i(() => {
|
|
101
106
|
const o = {
|
|
102
107
|
disabled: b.value
|
|
103
108
|
};
|
|
104
109
|
return e.href && (o.href = e.href, o.target = e.target), e.htmlType && (o.type = e.htmlType), e.hover && (o["data-hover"] = ""), o;
|
|
105
|
-
}), z =
|
|
106
|
-
|
|
110
|
+
}), z = T();
|
|
111
|
+
V({
|
|
107
112
|
focus() {
|
|
108
113
|
var o;
|
|
109
114
|
(o = z.value) == null || o.focus();
|
|
@@ -113,7 +118,7 @@ const F = "2xsm", De = /* @__PURE__ */ K({
|
|
|
113
118
|
(o = z.value) == null || o.blur();
|
|
114
119
|
}
|
|
115
120
|
});
|
|
116
|
-
const q =
|
|
121
|
+
const q = w, H = (o) => {
|
|
117
122
|
if (e.loading || e.disabled) {
|
|
118
123
|
o.preventDefault(), o.stopPropagation();
|
|
119
124
|
return;
|
|
@@ -126,44 +131,44 @@ const F = "2xsm", De = /* @__PURE__ */ K({
|
|
|
126
131
|
if (e.action && e.active && !l.value) {
|
|
127
132
|
const c = (o = t.badge) == null ? void 0 : o.call(t, {
|
|
128
133
|
color: b.value ? "gray" : "primary",
|
|
129
|
-
size:
|
|
134
|
+
size: x
|
|
130
135
|
});
|
|
131
136
|
if (!me(c)) return c;
|
|
132
|
-
const p = (s = t.badgeText) == null ? void 0 : s.call(t, {}),
|
|
133
|
-
if (e.badgeText || p || e.badgeIcon ||
|
|
134
|
-
return
|
|
135
|
-
|
|
137
|
+
const p = (s = t.badgeText) == null ? void 0 : s.call(t, {}), S = (g = t.badgeIcon) == null ? void 0 : g.call(t, {});
|
|
138
|
+
if (e.badgeText || p || e.badgeIcon || S)
|
|
139
|
+
return ne(
|
|
140
|
+
ie,
|
|
136
141
|
{
|
|
137
142
|
text: e.badgeText,
|
|
138
143
|
icon: e.badgeIcon,
|
|
139
|
-
flipOnDir:
|
|
144
|
+
flipOnDir: j.value,
|
|
140
145
|
color: b.value ? "gray" : "primary",
|
|
141
|
-
size:
|
|
146
|
+
size: x
|
|
142
147
|
},
|
|
143
148
|
{
|
|
144
149
|
default: p ? t.badgeText : void 0,
|
|
145
|
-
icon:
|
|
150
|
+
icon: S ? t.badgeIcon : void 0
|
|
146
151
|
}
|
|
147
152
|
);
|
|
148
153
|
}
|
|
149
154
|
return null;
|
|
150
155
|
};
|
|
151
|
-
return (o, s) => (u(), f(r(
|
|
152
|
-
as:
|
|
153
|
-
key: String(
|
|
154
|
-
class: r(
|
|
156
|
+
return (o, s) => (u(), f(r(le), W({
|
|
157
|
+
as: O.value,
|
|
158
|
+
key: String(D.value),
|
|
159
|
+
class: r(ce)(r(ve)(A.value), e.class),
|
|
155
160
|
ref_key: "buttonRef",
|
|
156
161
|
ref: z
|
|
157
162
|
}, L.value, { onClick: H }), {
|
|
158
163
|
default: v(() => [
|
|
159
|
-
o.loading ? (u(), f(
|
|
164
|
+
o.loading ? (u(), f(ae, {
|
|
160
165
|
key: 1,
|
|
161
|
-
class:
|
|
166
|
+
class: te(r(pe)(r(n), "loading")),
|
|
162
167
|
size: B.value
|
|
163
|
-
}, null, 8, ["class", "size"])) : (u(),
|
|
164
|
-
(o.preIcon || t.preIcon) && !l.value ? (u(), f(
|
|
168
|
+
}, null, 8, ["class", "size"])) : (u(), X(Y, { key: 0 }, [
|
|
169
|
+
(o.preIcon || t.preIcon) && !l.value ? (u(), f(h, {
|
|
165
170
|
key: 0,
|
|
166
|
-
flipOnDir: r(
|
|
171
|
+
flipOnDir: r(N),
|
|
167
172
|
icon: o.preIcon,
|
|
168
173
|
size: B.value
|
|
169
174
|
}, {
|
|
@@ -171,24 +176,24 @@ const F = "2xsm", De = /* @__PURE__ */ K({
|
|
|
171
176
|
I(o.$slots, "preIcon")
|
|
172
177
|
]),
|
|
173
178
|
_: 3
|
|
174
|
-
}, 8, ["flipOnDir", "icon", "size"])) :
|
|
175
|
-
l.value ? (u(), f(
|
|
179
|
+
}, 8, ["flipOnDir", "icon", "size"])) : C("", !0),
|
|
180
|
+
l.value ? (u(), f(h, {
|
|
176
181
|
key: 1,
|
|
177
182
|
icon: o.icon,
|
|
178
|
-
size:
|
|
179
|
-
flipOnDir: r(
|
|
183
|
+
size: K.value,
|
|
184
|
+
flipOnDir: r(E)
|
|
180
185
|
}, {
|
|
181
186
|
default: v(() => [
|
|
182
187
|
I(o.$slots, "icon")
|
|
183
188
|
]),
|
|
184
189
|
_: 3
|
|
185
190
|
}, 8, ["icon", "size", "flipOnDir"])) : I(o.$slots, "default", { key: 2 }, () => [
|
|
186
|
-
|
|
191
|
+
ee(oe(o.text), 1)
|
|
187
192
|
]),
|
|
188
|
-
|
|
189
|
-
(o.postIcon || t.postIcon) && !l.value ? (u(), f(
|
|
193
|
+
Z(J),
|
|
194
|
+
(o.postIcon || t.postIcon) && !l.value ? (u(), f(h, {
|
|
190
195
|
key: 3,
|
|
191
|
-
flipOnDir: r(
|
|
196
|
+
flipOnDir: r(G),
|
|
192
197
|
icon: o.postIcon,
|
|
193
198
|
size: B.value
|
|
194
199
|
}, {
|
|
@@ -196,7 +201,7 @@ const F = "2xsm", De = /* @__PURE__ */ K({
|
|
|
196
201
|
I(o.$slots, "postIcon")
|
|
197
202
|
]),
|
|
198
203
|
_: 3
|
|
199
|
-
}, 8, ["flipOnDir", "icon", "size"])) :
|
|
204
|
+
}, 8, ["flipOnDir", "icon", "size"])) : C("", !0)
|
|
200
205
|
], 64))
|
|
201
206
|
]),
|
|
202
207
|
_: 3
|
|
@@ -204,5 +209,7 @@ const F = "2xsm", De = /* @__PURE__ */ K({
|
|
|
204
209
|
}
|
|
205
210
|
});
|
|
206
211
|
export {
|
|
207
|
-
|
|
212
|
+
Se as _,
|
|
213
|
+
ve as a,
|
|
214
|
+
n as b
|
|
208
215
|
};
|
package/dist/Button/Button.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ declare function __VLS_template(): {
|
|
|
9
9
|
$: import('vue').ComponentInternalInstance;
|
|
10
10
|
$data: {};
|
|
11
11
|
$props: {
|
|
12
|
+
readonly as?: import('reka-ui').AsTag | import('vue').Component | undefined;
|
|
12
13
|
readonly class?: import('clsx').ClassValue;
|
|
13
14
|
readonly text?: string | number | undefined;
|
|
14
15
|
readonly size?: import('..').ButtonSize | undefined;
|
|
@@ -146,6 +147,7 @@ declare const __VLS_component: import('vue').DefineComponent<Partial<Omit<BaseBu
|
|
|
146
147
|
$: import('vue').ComponentInternalInstance;
|
|
147
148
|
$data: {};
|
|
148
149
|
$props: {
|
|
150
|
+
readonly as?: import('reka-ui').AsTag | import('vue').Component | undefined;
|
|
149
151
|
readonly class?: import('clsx').ClassValue;
|
|
150
152
|
readonly text?: string | number | undefined;
|
|
151
153
|
readonly size?: import('..').ButtonSize | undefined;
|
package/dist/Button/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Button.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Button.vue_vue_type_script_setup_true_lang-Cl6tKGGP.js");exports.Button=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { defineComponent as c, useAttrs as l, computed as m, ref as f, createBlock as u, openBlock as d, mergeProps as b, createSlots as g, renderList as _, withCtx as v, renderSlot as y, normalizeProps as B, guardReactiveProps as I } from "vue";
|
|
2
2
|
import { omit as O } from "es-toolkit";
|
|
3
|
-
import { _ as h } from "./BaseButton.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import { _ as h } from "./BaseButton.vue_vue_type_style_index_0_lang-j05pPl4c.js";
|
|
4
4
|
import { getComponentOptions as k } from "@pantograph/utils-vue";
|
|
5
5
|
const P = /* @__PURE__ */ c({
|
|
6
6
|
...k("Button", !1),
|
|
7
7
|
__name: "Button",
|
|
8
8
|
props: {
|
|
9
|
+
as: {},
|
|
9
10
|
class: {},
|
|
10
11
|
text: {},
|
|
11
12
|
size: {},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),p=require("es-toolkit"),u=require("./BaseButton.vue_vue_type_style_index_0_lang-DPgYIiQ0.js"),_=require("@pantograph/utils-vue"),f=e.defineComponent({..._.getComponentOptions("Button",!1),__name:"Button",props:{as:{},class:{},text:{},size:{},color:{},noRing:{type:Boolean},type:{},loading:{type:Boolean},preIcon:{},postIcon:{},preIconFlipOnDir:{},postIconFlipOnDir:{},htmlType:{},block:{type:Boolean},disabled:{type:Boolean,default:void 0},hover:{type:Boolean},href:{},target:{}},setup(r,{expose:s}){const i=r,a=e.useAttrs(),c=e.computed(()=>({...p.omit(a,["variant","action","active","badgeText","badgeIcon","icon","flipOnDir","badgeIconFlipOnDir"]),...i})),o=e.ref();return s({focus(){var t;(t=o.value)==null||t.focus()},blur(){var t;(t=o.value)==null||t.blur()}}),(t,d)=>(e.openBlock(),e.createBlock(u._sfc_main,e.mergeProps(c.value,{variant:"simple",ref_key:"buttonRef",ref:o}),e.createSlots({_:2},[e.renderList(Object.keys(t.$slots),n=>({name:n,fn:e.withCtx(l=>[e.renderSlot(t.$slots,n,e.normalizeProps(e.guardReactiveProps(l)))])}))]),1040))}});exports._sfc_main=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../ColorPicker.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../ColorPicker.vue_vue_type_style_index_0_lang-ZhSubRCW.js");exports.ColorPicker=e._sfc_main;exports.default=e._sfc_main;exports.injectColorPickerContext=e.injectColorPickerContext;exports.provideColorPickerContext=e.provideColorPickerContext;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { onUnmounted as d0, defineComponent as $t, onMounted as zt, onBeforeUnmount as c0, createElementBlock as Te, openBlock as K, normalizeClass as G, unref as _, createElementVNode as Ne, ref as en, computed as te, watch as h0, reactive as p0, createVNode as Wn, createCommentVNode as Bn, createBlock as nn, isRef as b0, Fragment as m0, renderList as g0 } from "vue";
|
|
2
|
-
import { _ as x0 } from "./ActionButton.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as x0 } from "./ActionButton.vue_vue_type_script_setup_true_lang-v9gNXyn5.js";
|
|
3
3
|
import { _ as Zn } from "./Input.vue_vue_type_script_setup_true_lang-8xzs2Ugc.js";
|
|
4
|
-
import { _ as M0 } from "./Select.vue_vue_type_style_index_0_lang-
|
|
4
|
+
import { _ as M0 } from "./Select.vue_vue_type_style_index_0_lang-BVGpB085.js";
|
|
5
5
|
import { getComponentOptions as y0, useVModel as Un } from "@pantograph/utils-vue";
|
|
6
6
|
import { createContext as v0 } from "reka-ui";
|
|
7
7
|
import { normCls as be, getBemElement as me, getBemBlock as k0, getBemModifier as Jn } from "@pantograph/utils";
|