@pantograph/vue 0.0.3 → 0.5.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/ActionButton.d.ts +148 -5
- package/dist/ActionButton/index.cjs.js +1 -1
- package/dist/ActionButton/index.es.js +1 -1
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-9sHS6TT0.js +52 -0
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-BRYxIFQL.js +1 -0
- package/dist/Avatar/Avatar.d.ts +1 -1
- package/dist/Avatar/index.cjs.js +1 -1
- package/dist/Avatar/index.es.js +1 -1
- package/dist/Avatar.vue_vue_type_style_index_0_lang-D72SN0zC.js +1 -0
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-BWeEmazM.js → Avatar.vue_vue_type_style_index_0_lang-RziDt5Qs.js} +19 -18
- package/dist/AvatarGroup/index.cjs.js +1 -1
- package/dist/AvatarGroup/index.es.js +1 -1
- package/dist/Badge/Badge.d.ts +3 -3
- package/dist/Badge/index.cjs.js +1 -1
- package/dist/Badge/index.es.js +1 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-DzkeQwzH.js +1 -0
- package/dist/Badge.vue_vue_type_script_setup_true_lang-LwccxMER.js +34 -0
- package/dist/Base/BaseBadge/BaseBadge.d.ts +6 -10
- package/dist/Base/BaseButton/BaseButton.d.ts +13 -15
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-B1Va5X21.js +1 -0
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-CHhhflIH.js +107 -0
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-BLGNTber.js +151 -0
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-HdsdAsR3.js +1 -0
- package/dist/Button/Button.d.ts +149 -5
- package/dist/Button/index.cjs.js +1 -1
- package/dist/Button/index.es.js +1 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang-DMOtqE4k.js +49 -0
- package/dist/Button.vue_vue_type_script_setup_true_lang-DNpM6F5j.js +1 -0
- package/dist/ButtonGroup/index.cjs.js +1 -1
- package/dist/ButtonGroup/index.es.js +1 -1
- package/dist/ButtonGroup.vue_vue_type_script_setup_true_lang-BSj1Y1j2.js +1 -0
- package/dist/{ButtonGroup.vue_vue_type_script_setup_true_lang-jtE0Gtp9.js → ButtonGroup.vue_vue_type_script_setup_true_lang-DBq7tYaO.js} +11 -10
- package/dist/Checkbox/Checkbox.d.ts +6 -14
- package/dist/Checkbox/Checkbox.model.d.ts +0 -2
- package/dist/Checkbox/index.cjs.js +1 -1
- package/dist/Checkbox/index.es.js +1 -1
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-BQeNpCYy.js +1 -0
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-gsOfYgHe.js +245 -0
- package/dist/CheckboxGroup/index.cjs.js +1 -1
- package/dist/CheckboxGroup/index.es.js +1 -1
- package/dist/ConfigProvider/index.cjs.js +1 -0
- package/dist/ConfigProvider/index.d.ts +40 -0
- package/dist/ConfigProvider/index.es.js +112 -0
- package/dist/ConfigProvider/utils.d.ts +4 -0
- package/dist/Divider/Divider.d.ts +27 -0
- package/dist/Divider/Divider.model.d.ts +2 -0
- package/dist/Divider/index.cjs.js +1 -0
- package/dist/Divider/index.d.ts +2 -0
- package/dist/Divider/index.es.js +6 -0
- package/dist/Divider.vue_vue_type_style_index_0_lang-C6Suy0tD.js +1 -0
- package/dist/Divider.vue_vue_type_style_index_0_lang-SBMg48di.js +40 -0
- package/dist/FloatButton/FloatButton.d.ts +149 -5
- package/dist/FloatButton/index.cjs.js +1 -1
- package/dist/FloatButton/index.es.js +1 -1
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-BD8KDs-3.js +1 -0
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-CLL_AR_I.js +47 -0
- package/dist/GraphicalObject/GraphicalObject.d.ts +3 -3
- package/dist/GraphicalObject/index.cjs.js +1 -1
- package/dist/GraphicalObject/index.es.js +1 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-BKYCNg9l.js +1 -0
- package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-CcI-aIS4.js → GraphicalObject.vue_vue_type_script_setup_true_lang-DqfDSUXz.js} +7 -6
- package/dist/Icon/Icon.d.ts +1 -1
- package/dist/Icon/index.cjs.js +1 -1
- package/dist/Icon/index.es.js +1 -1
- package/dist/Icon.vue_vue_type_style_index_0_lang-D-jaUivh.js +1 -0
- package/dist/Icon.vue_vue_type_style_index_0_lang-W7sippxn.js +48 -0
- package/dist/IconButton/IconButton.d.ts +149 -5
- package/dist/IconButton/index.cjs.js +1 -1
- package/dist/IconButton/index.es.js +1 -1
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-DCrUZOP9.js +47 -0
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-DVbz9uji.js +1 -0
- package/dist/Image/Image.d.ts +48 -0
- package/dist/Image/Image.model.d.ts +6 -0
- package/dist/Image/index.cjs.js +1 -0
- package/dist/Image/index.d.ts +2 -0
- package/dist/Image/index.es.js +117 -0
- package/dist/IndentLevel/IndentLevel.d.ts +35 -0
- package/dist/IndentLevel/IndentLevel.model.d.ts +4 -0
- package/dist/IndentLevel/index.cjs.js +1 -0
- package/dist/IndentLevel/index.d.ts +2 -0
- package/dist/IndentLevel/index.es.js +7 -0
- package/dist/IndentLevel.vue_vue_type_style_index_0_lang-B_x8tshB.js +1 -0
- package/dist/IndentLevel.vue_vue_type_style_index_0_lang-jaoDj9GA.js +103 -0
- package/dist/Indicator/Indicator.d.ts +1 -1
- package/dist/Indicator/index.cjs.js +1 -1
- package/dist/Indicator/index.es.js +1 -1
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-D2iFmRna.js +1 -0
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-jv3IND51.js +34 -0
- package/dist/Kbd/Kbd.d.ts +31 -0
- package/dist/Kbd/index.cjs.js +1 -0
- package/dist/Kbd/index.d.ts +1 -0
- package/dist/Kbd/index.es.js +5 -0
- package/dist/Kbd.vue_vue_type_style_index_0_lang-Br1eygIf.js +1 -0
- package/dist/Kbd.vue_vue_type_style_index_0_lang-D5D9tTsQ.js +60 -0
- package/dist/MenuItem/MenuItem.model.d.ts +2 -0
- package/dist/MenuItem/index.cjs.js +1 -0
- package/dist/MenuItem/index.d.ts +1 -0
- package/dist/MenuItem/index.es.js +1 -0
- package/dist/Popover/Popover.d.ts +6 -83
- package/dist/Popover/index.cjs.js +1 -1
- package/dist/Popover/index.es.js +1 -1
- package/dist/Popover.vue_vue_type_style_index_0_lang-BZMSPrfB.js +1 -0
- package/dist/{Popover.vue_vue_type_style_index_0_lang-Jf0LVKU_.js → Popover.vue_vue_type_style_index_0_lang-DTr33v9y.js} +31 -29
- package/dist/RadioGroup/RadioGroup.d.ts +32 -0
- package/dist/RadioGroup/RadioGroup.model.d.ts +2 -0
- package/dist/RadioGroup/RadioGroupItem.d.ts +16 -0
- package/dist/RadioGroup/index.cjs.js +1 -0
- package/dist/RadioGroup/index.d.ts +2 -0
- package/dist/RadioGroup/index.es.js +100 -0
- package/dist/Shortcut/Shortcut.d.ts +12 -0
- package/dist/Shortcut/index.cjs.js +1 -0
- package/dist/Shortcut/index.d.ts +1 -0
- package/dist/Shortcut/index.es.js +42 -0
- package/dist/Skeleton/index.cjs.js +1 -1
- package/dist/Skeleton/index.es.js +1 -1
- package/dist/{Skeleton.vue_vue_type_style_index_0_lang-C56TOumA.js → Skeleton.vue_vue_type_style_index_0_lang-BgVkwMj4.js} +10 -9
- package/dist/Skeleton.vue_vue_type_style_index_0_lang-PNNUgKOq.js +1 -0
- package/dist/Spinner/Spinner.d.ts +2 -10
- package/dist/Spinner/index.cjs.js +1 -1
- package/dist/Spinner/index.es.js +1 -1
- package/dist/Spinner.vue_vue_type_style_index_0_lang-BOXr-RUw.js +85 -0
- package/dist/Spinner.vue_vue_type_style_index_0_lang-DW5QRtWO.js +1 -0
- package/dist/Switch/Switch.d.ts +29 -0
- package/dist/Switch/Switch.model.d.ts +2 -0
- package/dist/Switch/index.cjs.js +1 -0
- package/dist/Switch/index.d.ts +2 -0
- package/dist/Switch/index.es.js +104 -0
- package/dist/Tree/Tree.d.ts +66 -0
- package/dist/Tree/Tree.model.d.ts +71 -0
- package/dist/Tree/TreeNode.d.ts +33 -0
- package/dist/Tree/index.cjs.js +1 -0
- package/dist/Tree/index.d.ts +2 -0
- package/dist/Tree/index.es.js +456 -0
- package/dist/class-CjZYGZDW.js +1 -0
- package/dist/class-DyU-Ox8D.js +24 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +27 -24
- package/dist/omit-C_ZXwm9T.js +1 -0
- package/dist/omit-DtumnYm5.js +760 -0
- package/dist/options-B4iSAKol.js +1 -0
- package/dist/options-JBqnVZUl.js +9 -0
- package/dist/style/index.css +1 -1
- package/dist/utils/element.d.ts +1 -1
- package/dist/utils/index.cjs.js +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.es.js +7 -4
- package/package.json +61 -16
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-Drb30rfG.js +0 -39
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-dxthnFw4.js +0 -1
- package/dist/Avatar.vue_vue_type_style_index_0_lang-BB-v9NHG.js +0 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-CXfdGkKV.js +0 -33
- package/dist/Badge.vue_vue_type_script_setup_true_lang-sx-dXgFD.js +0 -1
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-B-uDLmB_.js +0 -1
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-F50Tg7IQ.js +0 -151
- package/dist/Button.vue_vue_type_script_setup_true_lang-Crhe5sHQ.js +0 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang-XrPBGQq8.js +0 -36
- package/dist/ButtonGroup.vue_vue_type_script_setup_true_lang-DmShg2d-.js +0 -1
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-BRJhkPIY.js +0 -1
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-OQRmH46S.js +0 -194
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-Bu9Ndwxm.js +0 -1
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-CCfZsUxy.js +0 -34
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-BhMxC00o.js +0 -1
- package/dist/Icon.vue_vue_type_style_index_0_lang-CB4CYuWH.js +0 -47
- package/dist/Icon.vue_vue_type_style_index_0_lang-CV1YvIs-.js +0 -1
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-BTG_oQuF.js +0 -34
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-C93zhnQU.js +0 -1
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-Z02asVPa.js +0 -1
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-qIUYIdkm.js +0 -33
- package/dist/Logotype-Dark.svg +0 -3
- package/dist/Logotype-Light.svg +0 -3
- package/dist/Popover.vue_vue_type_style_index_0_lang-VH8LnLG9.js +0 -1
- package/dist/Skeleton.vue_vue_type_style_index_0_lang-B6-i0F1w.js +0 -1
- package/dist/Spinner.vue_vue_type_style_index_0_lang-B5byV1za.js +0 -75
- package/dist/Spinner.vue_vue_type_style_index_0_lang-Baaz0Dxb.js +0 -1
- package/dist/logo.svg +0 -4
- package/dist/omit-B0hUroNu.js +0 -1
- package/dist/omit-DU39EwuA.js +0 -851
- package/dist/options-B8SF1auT.js +0 -1
- package/dist/options-B8rT2fg0.js +0 -30
|
@@ -1,17 +1,160 @@
|
|
|
1
|
-
import { BaseButtonProps } from '../Base/BaseButton/BaseButton';
|
|
1
|
+
import { BaseButtonSlots, BaseButtonProps } from '../Base/BaseButton/BaseButton';
|
|
2
2
|
import { ButtonType, ButtonVariant } from '../Base/BaseButton/BaseButton.model';
|
|
3
|
-
export type ActionButtonProps = Pick<BaseButtonProps, 'as' | 'class' | 'preIcon' | 'postIcon' | 'size' | 'text' | 'icon' | 'active' | 'badgeText' | 'badgeIcon'
|
|
3
|
+
export type ActionButtonProps = Partial<Pick<BaseButtonProps, 'as' | 'class' | 'preIcon' | 'postIcon' | 'size' | 'text' | 'icon' | 'active' | 'badgeText' | 'badgeIcon'>> & {
|
|
4
4
|
type?: Exclude<ButtonType, 'fill'>;
|
|
5
5
|
variant?: Exclude<ButtonVariant, 'float'>;
|
|
6
6
|
};
|
|
7
7
|
declare function __VLS_template(): {
|
|
8
8
|
attrs: Partial<{}>;
|
|
9
|
-
slots:
|
|
10
|
-
refs: {
|
|
9
|
+
slots: Readonly<BaseButtonSlots> & BaseButtonSlots;
|
|
10
|
+
refs: {
|
|
11
|
+
buttonRef: ({
|
|
12
|
+
$: import('vue').ComponentInternalInstance;
|
|
13
|
+
$data: {};
|
|
14
|
+
$props: {
|
|
15
|
+
readonly class?: import('../index.ts', { with: { "resolution-mode": "import" } }).Class | undefined;
|
|
16
|
+
readonly text?: (string | number) | undefined;
|
|
17
|
+
readonly size?: import('../Base/BaseButton/BaseButton.model', { with: { "resolution-mode": "import" } }).ButtonSize | undefined;
|
|
18
|
+
readonly color?: import('../Base/BaseButton/BaseButton.model', { with: { "resolution-mode": "import" } }).ButtonColor | undefined;
|
|
19
|
+
readonly type?: ButtonType | undefined;
|
|
20
|
+
readonly variant?: ButtonVariant | undefined;
|
|
21
|
+
readonly loading?: boolean | undefined;
|
|
22
|
+
readonly action?: boolean | undefined;
|
|
23
|
+
readonly active?: boolean | undefined;
|
|
24
|
+
readonly badgeText?: string | undefined;
|
|
25
|
+
readonly badgeIcon?: string | undefined;
|
|
26
|
+
readonly icon?: string | undefined;
|
|
27
|
+
readonly preIcon?: string | undefined;
|
|
28
|
+
readonly postIcon?: string | undefined;
|
|
29
|
+
readonly as?: (import('radix-vue', { with: { "resolution-mode": "import" } }).AsTag | import('vue').Component) | undefined;
|
|
30
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
31
|
+
$attrs: {
|
|
32
|
+
[x: string]: unknown;
|
|
33
|
+
};
|
|
34
|
+
$refs: any;
|
|
35
|
+
$slots: Readonly<{
|
|
36
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
39
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
40
|
+
$host: Element | null;
|
|
41
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
42
|
+
$el: any;
|
|
43
|
+
$options: import('vue').ComponentOptionsBase<Readonly<BaseButtonProps> & Readonly<{}>, {
|
|
44
|
+
focus(): void;
|
|
45
|
+
blur(): void;
|
|
46
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
47
|
+
type: ButtonType;
|
|
48
|
+
color: import('../Base/BaseButton/BaseButton.model', { with: { "resolution-mode": "import" } }).ButtonColor;
|
|
49
|
+
as: import('radix-vue', { with: { "resolution-mode": "import" } }).AsTag | import('vue').Component;
|
|
50
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
51
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
52
|
+
created?: (() => void) | (() => void)[];
|
|
53
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
54
|
+
mounted?: (() => void) | (() => void)[];
|
|
55
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
56
|
+
updated?: (() => void) | (() => void)[];
|
|
57
|
+
activated?: (() => void) | (() => void)[];
|
|
58
|
+
deactivated?: (() => void) | (() => void)[];
|
|
59
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
60
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
61
|
+
destroyed?: (() => void) | (() => void)[];
|
|
62
|
+
unmounted?: (() => void) | (() => void)[];
|
|
63
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
64
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
65
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
66
|
+
};
|
|
67
|
+
$forceUpdate: () => void;
|
|
68
|
+
$nextTick: typeof import('vue').nextTick;
|
|
69
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
70
|
+
} & Readonly<{
|
|
71
|
+
type: ButtonType;
|
|
72
|
+
color: import('../Base/BaseButton/BaseButton.model', { with: { "resolution-mode": "import" } }).ButtonColor;
|
|
73
|
+
as: import('radix-vue', { with: { "resolution-mode": "import" } }).AsTag | import('vue').Component;
|
|
74
|
+
}> & Omit<Readonly<BaseButtonProps> & Readonly<{}>, "blur" | "focus" | ("type" | "color" | "as")> & import('vue').ShallowUnwrapRef<{
|
|
75
|
+
focus(): void;
|
|
76
|
+
blur(): void;
|
|
77
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
78
|
+
$slots: any;
|
|
79
|
+
}) | null;
|
|
80
|
+
};
|
|
11
81
|
rootEl: any;
|
|
12
82
|
};
|
|
13
83
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
-
declare const __VLS_component: import('vue').DefineComponent<ActionButtonProps, {
|
|
84
|
+
declare const __VLS_component: import('vue').DefineComponent<ActionButtonProps, {
|
|
85
|
+
focus(): void;
|
|
86
|
+
blur(): void;
|
|
87
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ActionButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
88
|
+
buttonRef: ({
|
|
89
|
+
$: import('vue').ComponentInternalInstance;
|
|
90
|
+
$data: {};
|
|
91
|
+
$props: {
|
|
92
|
+
readonly class?: import('../index.ts', { with: { "resolution-mode": "import" } }).Class | undefined;
|
|
93
|
+
readonly text?: (string | number) | undefined;
|
|
94
|
+
readonly size?: import('../Base/BaseButton/BaseButton.model', { with: { "resolution-mode": "import" } }).ButtonSize | undefined;
|
|
95
|
+
readonly color?: import('../Base/BaseButton/BaseButton.model', { with: { "resolution-mode": "import" } }).ButtonColor | undefined;
|
|
96
|
+
readonly type?: ButtonType | undefined;
|
|
97
|
+
readonly variant?: ButtonVariant | undefined;
|
|
98
|
+
readonly loading?: boolean | undefined;
|
|
99
|
+
readonly action?: boolean | undefined;
|
|
100
|
+
readonly active?: boolean | undefined;
|
|
101
|
+
readonly badgeText?: string | undefined;
|
|
102
|
+
readonly badgeIcon?: string | undefined;
|
|
103
|
+
readonly icon?: string | undefined;
|
|
104
|
+
readonly preIcon?: string | undefined;
|
|
105
|
+
readonly postIcon?: string | undefined;
|
|
106
|
+
readonly as?: (import('radix-vue', { with: { "resolution-mode": "import" } }).AsTag | import('vue').Component) | undefined;
|
|
107
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
108
|
+
$attrs: {
|
|
109
|
+
[x: string]: unknown;
|
|
110
|
+
};
|
|
111
|
+
$refs: any;
|
|
112
|
+
$slots: Readonly<{
|
|
113
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
114
|
+
}>;
|
|
115
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
116
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
117
|
+
$host: Element | null;
|
|
118
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
119
|
+
$el: any;
|
|
120
|
+
$options: import('vue').ComponentOptionsBase<Readonly<BaseButtonProps> & Readonly<{}>, {
|
|
121
|
+
focus(): void;
|
|
122
|
+
blur(): void;
|
|
123
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
124
|
+
type: ButtonType;
|
|
125
|
+
color: import('../Base/BaseButton/BaseButton.model', { with: { "resolution-mode": "import" } }).ButtonColor;
|
|
126
|
+
as: import('radix-vue', { with: { "resolution-mode": "import" } }).AsTag | import('vue').Component;
|
|
127
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
128
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
129
|
+
created?: (() => void) | (() => void)[];
|
|
130
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
131
|
+
mounted?: (() => void) | (() => void)[];
|
|
132
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
133
|
+
updated?: (() => void) | (() => void)[];
|
|
134
|
+
activated?: (() => void) | (() => void)[];
|
|
135
|
+
deactivated?: (() => void) | (() => void)[];
|
|
136
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
137
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
138
|
+
destroyed?: (() => void) | (() => void)[];
|
|
139
|
+
unmounted?: (() => void) | (() => void)[];
|
|
140
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
141
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
142
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
143
|
+
};
|
|
144
|
+
$forceUpdate: () => void;
|
|
145
|
+
$nextTick: typeof import('vue').nextTick;
|
|
146
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
147
|
+
} & Readonly<{
|
|
148
|
+
type: ButtonType;
|
|
149
|
+
color: import('../Base/BaseButton/BaseButton.model', { with: { "resolution-mode": "import" } }).ButtonColor;
|
|
150
|
+
as: import('radix-vue', { with: { "resolution-mode": "import" } }).AsTag | import('vue').Component;
|
|
151
|
+
}> & Omit<Readonly<BaseButtonProps> & Readonly<{}>, "blur" | "focus" | ("type" | "color" | "as")> & import('vue').ShallowUnwrapRef<{
|
|
152
|
+
focus(): void;
|
|
153
|
+
blur(): void;
|
|
154
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
155
|
+
$slots: any;
|
|
156
|
+
}) | null;
|
|
157
|
+
}, any>;
|
|
15
158
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
159
|
export default _default;
|
|
17
160
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -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-BRYxIFQL.js");exports.ActionButton=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineComponent as p, useAttrs as m, computed as u, ref as f, openBlock as l, createBlock as _, mergeProps as d, createSlots as b, renderList as g, withCtx as v, renderSlot as B, normalizeProps as k, guardReactiveProps as x } from "vue";
|
|
2
|
+
import { o as y } from "./omit-DtumnYm5.js";
|
|
3
|
+
import { _ as A } from "./BaseButton.vue_vue_type_style_index_0_lang-BLGNTber.js";
|
|
4
|
+
import { g as C } from "./options-JBqnVZUl.js";
|
|
5
|
+
const z = /* @__PURE__ */ p({
|
|
6
|
+
...C("ActionButton", !1),
|
|
7
|
+
__name: "ActionButton",
|
|
8
|
+
props: {
|
|
9
|
+
as: {},
|
|
10
|
+
class: {},
|
|
11
|
+
preIcon: {},
|
|
12
|
+
postIcon: {},
|
|
13
|
+
size: {},
|
|
14
|
+
text: {},
|
|
15
|
+
icon: {},
|
|
16
|
+
active: { type: Boolean },
|
|
17
|
+
badgeText: {},
|
|
18
|
+
badgeIcon: {},
|
|
19
|
+
type: {},
|
|
20
|
+
variant: {}
|
|
21
|
+
},
|
|
22
|
+
setup(n, { expose: r }) {
|
|
23
|
+
const s = n, a = m(), c = u(() => ({
|
|
24
|
+
...y(a, "variant", "loading", "color"),
|
|
25
|
+
...s
|
|
26
|
+
})), e = f();
|
|
27
|
+
return r({
|
|
28
|
+
focus() {
|
|
29
|
+
var o;
|
|
30
|
+
(o = e.value) == null || o.focus();
|
|
31
|
+
},
|
|
32
|
+
blur() {
|
|
33
|
+
var o;
|
|
34
|
+
(o = e.value) == null || o.blur();
|
|
35
|
+
}
|
|
36
|
+
}), (o, I) => (l(), _(A, d(c.value, {
|
|
37
|
+
action: "",
|
|
38
|
+
ref_key: "buttonRef",
|
|
39
|
+
ref: e
|
|
40
|
+
}), b({ _: 2 }, [
|
|
41
|
+
g(Object.keys(o.$slots), (t) => ({
|
|
42
|
+
name: t,
|
|
43
|
+
fn: v((i) => [
|
|
44
|
+
B(o.$slots, t, k(x(i)))
|
|
45
|
+
])
|
|
46
|
+
}))
|
|
47
|
+
]), 1040));
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
export {
|
|
51
|
+
z as _
|
|
52
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),p=require("./omit-C_ZXwm9T.js"),l=require("./BaseButton.vue_vue_type_style_index_0_lang-HdsdAsR3.js"),_=require("./options-B4iSAKol.js"),f=e.defineComponent({..._.getComponentOptions("ActionButton",!1),__name:"ActionButton",props:{as:{},class:{},preIcon:{},postIcon:{},size:{},text:{},icon:{},active:{type:Boolean},badgeText:{},badgeIcon:{},type:{},variant:{}},setup(s,{expose:r}){const c=s,a=e.useAttrs(),i=e.computed(()=>({...p.omit(a,"variant","loading","color"),...c})),o=e.ref();return r({focus(){var t;(t=o.value)==null||t.focus()},blur(){var t;(t=o.value)==null||t.blur()}}),(t,m)=>(e.openBlock(),e.createBlock(l._sfc_main,e.mergeProps(i.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;
|
package/dist/Avatar/Avatar.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AvatarFallbackProps, AvatarImageProps, AvatarRootProps } from 'radix-vue';
|
|
2
|
-
import { AvatarSize, AvatarStroke, AvatarShape, AvatarOnlineAlignment } from './Avatar.model';
|
|
3
2
|
import { Class } from '../types';
|
|
4
3
|
import { BadgeColor } from '../Base/BaseBadge/BaseBadge.model';
|
|
4
|
+
import { AvatarSize, AvatarStroke, AvatarShape, AvatarOnlineAlignment } from './Avatar.model';
|
|
5
5
|
type Avatar = AvatarRootProps & AvatarImageProps & AvatarFallbackProps;
|
|
6
6
|
export interface AvatarProps extends Omit<Avatar, 'asChild' | 'src'> {
|
|
7
7
|
src?: string;
|
package/dist/Avatar/index.cjs.js
CHANGED
|
@@ -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-D72SN0zC.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;
|
package/dist/Avatar/index.es.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-RziDt5Qs.js";
|
|
2
2
|
export {
|
|
3
3
|
t as Avatar,
|
|
4
4
|
r as AvatarOnlineAlignments,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),c=require("radix-vue"),s=require("./class-CjZYGZDW.js"),B=require("class-variance-authority"),z=require("./options-B4iSAKol.js"),E=require("./Popover.vue_vue_type_style_index_0_lang-BZMSPrfB.js");require("@iconify/vue");const P=require("./Icon.vue_vue_type_style_index_0_lang-D-jaUivh.js"),b=require("./Indicator.vue_vue_type_script_setup_true_lang-D2iFmRna.js"),[x,y]=c.createContext("AvatarGroup"),G=e.defineComponent({...z.getComponentOptions("AvatarGroup"),__name:"AvatarGroup",props:{as:{default:"div"},class:{},gutter:{type:Boolean},size:{},shape:{},popoverClass:{},maxCount:{}},setup(v){const o=v,n=e.computed(()=>o.size),a=e.computed(()=>o.shape),d=s.getBemBlock("avatar"),m=s.getBemElement(d,"group"),f=B.cva(m,{variants:{gutter:s.generateVariantClassList("gutter",m)}});y({size:n,shape:a});const u=e.useSlots(),r=e.computed(()=>o.maxCount?+o.maxCount:0),i=e.computed(()=>f({gutter:o.gutter})),g=()=>{const l=u.default?u.default():[];return r.value>1&&l.length>r.value?[...l.filter((p,t)=>t<r.value-1),e.h(E._sfc_main,{},{default:e.h(S,{text:`+${l.length-r.value+1}`}),content:e.h(c.Primitive,{class:[i.value,o.class],as:o.as},{default:()=>l.filter((p,t)=>t>=r.value-1)})})]:l};return(l,p)=>(e.openBlock(),e.createBlock(e.unref(c.Primitive),{as:l.as,class:e.normalizeClass([i.value,o.class])},{default:e.withCtx(()=>[e.createVNode(g,{maxCount:l.maxCount},null,8,["maxCount"])]),_:1},8,["as","class"]))}}),C=["2xsm","xsm","sm","md","lg","2xlg"],k=["gray","white"],_=["circle","square","rect"],A={start:"online-start",end:"online-end"},S=e.defineComponent({...z.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"},as:{},referrerPolicy:{},delayMs:{}},emits:["loadingStatusChange"],setup(v,{emit:o}){const n=s.getBemBlock("avatar"),a=v,d=o,m=c.useEmitAsProps(d),f=B.cva(n,{variants:{size:s.generateVariantClassList(C,n),stroke:s.generateVariantClassList(k,n),shape:s.generateVariantClassList(_,n),onlineAlignment:s.generateVariantClassList(A,n)}}),u=x({size:e.computed(()=>a.size),shape:e.computed(()=>a.shape)}),r=e.computed(()=>u.size.value??a.size),i=e.computed(()=>u.shape.value??a.shape),g=e.computed(()=>{const t=r.value&&C.includes(r.value)?r.value:"md",h=a.stroke&&k.includes(a.stroke)?a.stroke:"none",V=i.value&&_.includes(i.value)?i.value:"circle",q=A[a.onlineAlignment]?a.onlineAlignment:"start";return{size:t,stroke:h,shape:V,onlineAlignment:q}}),l=e.computed(()=>{switch(r.value){case"lg":case"2xlg":return"tiny";default:return"tinier"}}),p=e.computed(()=>{switch(r.value){case"lg":case"2xlg":return"sm";case"xsm":case"2xsm":return"3xsm";case"sm":case"md":default:return"xsm"}});return(t,h)=>(e.openBlock(),e.createBlock(e.unref(c.AvatarRoot),{as:t.as,class:e.normalizeClass([e.unref(f)(g.value),a.class])},{default:e.withCtx(()=>[!t.$slots.default&&!t.text?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.src?(e.openBlock(),e.createBlock(e.unref(c.AvatarImage),e.mergeProps({key:0},e.unref(m),{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(c.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(P._sfc_main),{key:0,icon:t.icon,size:p.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(b._sfc_main,{key:2,color:t.onlineColor,size:l.value,class:e.normalizeClass(e.unref(s.getBemElement)(e.unref(n),"online"))},null,8,["color","size","class"])):e.createCommentVNode("",!0)]),_:3},8,["as","class"]))}});exports.AvatarOnlineAlignments=A;exports.AvatarShapes=_;exports.AvatarSizes=C;exports.AvatarStrokes=k;exports._sfc_main=S;exports._sfc_main$1=G;exports.injectAvatarGroupContext=x;exports.provideAvatarGroupContext=y;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { defineComponent as N, computed as l, useSlots as L, openBlock as i, createBlock as m, unref as s, normalizeClass as p, withCtx as x, createVNode as F, h as k, createElementBlock as S, Fragment as M, mergeProps as R, createCommentVNode as z, renderSlot as b, createTextVNode as B, toDisplayString as $ } from "vue";
|
|
2
2
|
import { createContext as T, Primitive as P, useEmitAsProps as H, AvatarRoot as J, AvatarImage as K, AvatarFallback as Q } from "radix-vue";
|
|
3
|
+
import { g as v, a as f, b as I } from "./class-DyU-Ox8D.js";
|
|
4
|
+
import { cva as O } from "class-variance-authority";
|
|
5
|
+
import { g as j } from "./options-JBqnVZUl.js";
|
|
6
|
+
import { _ as U } from "./Popover.vue_vue_type_style_index_0_lang-DTr33v9y.js";
|
|
3
7
|
import "@iconify/vue";
|
|
4
|
-
import { _ as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { _ as X } from "./Indicator.vue_vue_type_script_setup_true_lang-qIUYIdkm.js";
|
|
9
|
-
const G = ["2xsm", "xsm", "sm", "md", "lg", "2xlg"], w = ["gray", "white"], V = ["circle", "square", "rect"], E = {
|
|
10
|
-
start: "online-start",
|
|
11
|
-
end: "online-end"
|
|
12
|
-
}, [Y, Z] = T("AvatarGroup"), ce = /* @__PURE__ */ N({
|
|
13
|
-
...I("AvatarGroup"),
|
|
8
|
+
import { _ as W } from "./Icon.vue_vue_type_style_index_0_lang-W7sippxn.js";
|
|
9
|
+
import { _ as X } from "./Indicator.vue_vue_type_script_setup_true_lang-jv3IND51.js";
|
|
10
|
+
const [Y, Z] = T("AvatarGroup"), ue = /* @__PURE__ */ N({
|
|
11
|
+
...j("AvatarGroup"),
|
|
14
12
|
__name: "AvatarGroup",
|
|
15
13
|
props: {
|
|
16
14
|
as: { default: "div" },
|
|
@@ -22,7 +20,7 @@ const G = ["2xsm", "xsm", "sm", "md", "lg", "2xlg"], w = ["gray", "white"], V =
|
|
|
22
20
|
maxCount: {}
|
|
23
21
|
},
|
|
24
22
|
setup(A) {
|
|
25
|
-
const o = A, t = l(() => o.size), a = l(() => o.shape), _ =
|
|
23
|
+
const o = A, t = l(() => o.size), a = l(() => o.shape), _ = I("avatar"), d = f(_, "group"), h = O(d, {
|
|
26
24
|
variants: {
|
|
27
25
|
gutter: v("gutter", d)
|
|
28
26
|
}
|
|
@@ -40,13 +38,13 @@ const G = ["2xsm", "xsm", "sm", "md", "lg", "2xlg"], w = ["gray", "white"], V =
|
|
|
40
38
|
return n.value > 1 && r.length > n.value ? [
|
|
41
39
|
...r.filter((g, e) => e < n.value - 1),
|
|
42
40
|
k(
|
|
43
|
-
|
|
41
|
+
U,
|
|
44
42
|
{},
|
|
45
43
|
{
|
|
46
44
|
default: k(ee, { text: `+${r.length - n.value + 1}` }),
|
|
47
45
|
content: k(
|
|
48
46
|
P,
|
|
49
|
-
{ class: [c, o.class], as: o.as },
|
|
47
|
+
{ class: [c.value, o.class], as: o.as },
|
|
50
48
|
{
|
|
51
49
|
default: () => r.filter((g, e) => e >= n.value - 1)
|
|
52
50
|
}
|
|
@@ -65,8 +63,11 @@ const G = ["2xsm", "xsm", "sm", "md", "lg", "2xlg"], w = ["gray", "white"], V =
|
|
|
65
63
|
_: 1
|
|
66
64
|
}, 8, ["as", "class"]));
|
|
67
65
|
}
|
|
68
|
-
}),
|
|
69
|
-
|
|
66
|
+
}), G = ["2xsm", "xsm", "sm", "md", "lg", "2xlg"], w = ["gray", "white"], V = ["circle", "square", "rect"], E = {
|
|
67
|
+
start: "online-start",
|
|
68
|
+
end: "online-end"
|
|
69
|
+
}, ee = /* @__PURE__ */ N({
|
|
70
|
+
...j("Avatar"),
|
|
70
71
|
__name: "Avatar",
|
|
71
72
|
props: {
|
|
72
73
|
src: { default: "" },
|
|
@@ -87,7 +88,7 @@ const G = ["2xsm", "xsm", "sm", "md", "lg", "2xlg"], w = ["gray", "white"], V =
|
|
|
87
88
|
},
|
|
88
89
|
emits: ["loadingStatusChange"],
|
|
89
90
|
setup(A, { emit: o }) {
|
|
90
|
-
const t =
|
|
91
|
+
const t = I("avatar"), a = A, d = H(o), h = O(t, {
|
|
91
92
|
variants: {
|
|
92
93
|
size: v(G, t),
|
|
93
94
|
stroke: v(w, t),
|
|
@@ -146,7 +147,7 @@ const G = ["2xsm", "xsm", "sm", "md", "lg", "2xlg"], w = ["gray", "white"], V =
|
|
|
146
147
|
}, {
|
|
147
148
|
default: x(() => [
|
|
148
149
|
b(e.$slots, "fallback", {}, () => [
|
|
149
|
-
e.fallback ? z("", !0) : (i(), m(s(
|
|
150
|
+
e.fallback ? z("", !0) : (i(), m(s(W), {
|
|
150
151
|
key: 0,
|
|
151
152
|
icon: e.icon,
|
|
152
153
|
size: g.value
|
|
@@ -181,7 +182,7 @@ export {
|
|
|
181
182
|
w as a,
|
|
182
183
|
V as b,
|
|
183
184
|
E as c,
|
|
184
|
-
|
|
185
|
+
ue as d,
|
|
185
186
|
Y as i,
|
|
186
187
|
Z as p
|
|
187
188
|
};
|
|
@@ -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-D72SN0zC.js");exports.AvatarGroup=t._sfc_main$1;exports.injectAvatarGroupContext=t.injectAvatarGroupContext;exports.provideAvatarGroupContext=t.provideAvatarGroupContext;
|
package/dist/Badge/Badge.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BaseBadgeProps } from '../Base/BaseBadge/BaseBadge';
|
|
2
|
-
export type BadgeProps = Pick<BaseBadgeProps, 'as' | 'class' | 'text' | 'mode' | 'icon'
|
|
1
|
+
import { BadgeSlots, BaseBadgeProps } from '../Base/BaseBadge/BaseBadge';
|
|
2
|
+
export type BadgeProps = Partial<Pick<BaseBadgeProps, 'as' | 'class' | 'text' | 'mode' | 'icon'>> & {
|
|
3
3
|
size?: Exclude<BaseBadgeProps['size'], 'sm' | 'tiny' | 'tinier'>;
|
|
4
4
|
color?: Exclude<BaseBadgeProps['color'], 'none'>;
|
|
5
5
|
};
|
|
6
6
|
declare function __VLS_template(): {
|
|
7
7
|
attrs: Partial<{}>;
|
|
8
|
-
slots:
|
|
8
|
+
slots: Readonly<BadgeSlots> & BadgeSlots;
|
|
9
9
|
refs: {};
|
|
10
10
|
rootEl: any;
|
|
11
11
|
};
|
package/dist/Badge/index.cjs.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-DzkeQwzH.js");exports.Badge=e._sfc_main;exports.default=e._sfc_main;
|
package/dist/Badge/index.es.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),a=require("./omit-C_ZXwm9T.js"),p=require("./BaseBadge.vue_vue_type_style_index_0_lang-B1Va5X21.js"),u=require("./options-B4iSAKol.js"),_=e.defineComponent({...u.getComponentOptions("Badge",!1),__name:"Badge",props:{as:{},class:{},text:{},mode:{},icon:{},size:{},color:{}},setup(o){const n=o,r=e.useAttrs(),c=e.computed(()=>({...a.omit(r,"type"),...n}));return(t,l)=>(e.openBlock(),e.createBlock(p._sfc_main,e.mergeProps(c.value,{type:"pill"}),e.createSlots({_:2},[e.renderList(Object.keys(t.$slots),s=>({name:s,fn:e.withCtx(i=>[e.renderSlot(t.$slots,s,e.normalizeProps(e.guardReactiveProps(i)))])}))]),1040))}});exports._sfc_main=_;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent as p, useAttrs as m, computed as i, openBlock as c, createBlock as l, mergeProps as d, createSlots as f, renderList as _, withCtx as u, renderSlot as g, normalizeProps as B, guardReactiveProps as k } from "vue";
|
|
2
|
+
import { o as y } from "./omit-DtumnYm5.js";
|
|
3
|
+
import { _ as C } from "./BaseBadge.vue_vue_type_style_index_0_lang-CHhhflIH.js";
|
|
4
|
+
import { g as P } from "./options-JBqnVZUl.js";
|
|
5
|
+
const z = /* @__PURE__ */ p({
|
|
6
|
+
...P("Badge", !1),
|
|
7
|
+
__name: "Badge",
|
|
8
|
+
props: {
|
|
9
|
+
as: {},
|
|
10
|
+
class: {},
|
|
11
|
+
text: {},
|
|
12
|
+
mode: {},
|
|
13
|
+
icon: {},
|
|
14
|
+
size: {},
|
|
15
|
+
color: {}
|
|
16
|
+
},
|
|
17
|
+
setup(t) {
|
|
18
|
+
const r = t, s = m(), n = i(() => ({
|
|
19
|
+
...y(s, "type"),
|
|
20
|
+
...r
|
|
21
|
+
}));
|
|
22
|
+
return (e, $) => (c(), l(C, d(n.value, { type: "pill" }), f({ _: 2 }, [
|
|
23
|
+
_(Object.keys(e.$slots), (o) => ({
|
|
24
|
+
name: o,
|
|
25
|
+
fn: u((a) => [
|
|
26
|
+
g(e.$slots, o, B(k(a)))
|
|
27
|
+
])
|
|
28
|
+
}))
|
|
29
|
+
]), 1040));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
z as _
|
|
34
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PrimitiveProps } from 'radix-vue';
|
|
2
|
-
import { BadgeColor, BadgeMode, BadgeSize, BadgeType } from './BaseBadge.model';
|
|
3
2
|
import { Class } from '../../types';
|
|
3
|
+
import { BadgeColor, BadgeMode, BadgeSize, BadgeType } from './BaseBadge.model';
|
|
4
4
|
export interface BaseBadgeProps extends Omit<PrimitiveProps, 'asChild'> {
|
|
5
5
|
size?: BadgeSize;
|
|
6
6
|
class?: Class;
|
|
@@ -10,15 +10,11 @@ export interface BaseBadgeProps extends Omit<PrimitiveProps, 'asChild'> {
|
|
|
10
10
|
mode?: BadgeMode;
|
|
11
11
|
icon?: string;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
refs: {};
|
|
20
|
-
rootEl: any;
|
|
21
|
-
};
|
|
13
|
+
export interface BadgeSlots {
|
|
14
|
+
default?: (props: object) => never;
|
|
15
|
+
icon?: (props: object) => never;
|
|
16
|
+
}
|
|
17
|
+
declare function __VLS_template(): any;
|
|
22
18
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
23
19
|
declare const __VLS_component: import('vue').DefineComponent<BaseBadgeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BaseBadgeProps> & Readonly<{}>, {
|
|
24
20
|
size: BadgeSize;
|
|
@@ -17,25 +17,23 @@ export interface BaseButtonProps extends Omit<PrimitiveProps, 'asChild'> {
|
|
|
17
17
|
preIcon?: string;
|
|
18
18
|
postIcon?: string;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
postIcon?(_: {}): any;
|
|
29
|
-
};
|
|
30
|
-
refs: {};
|
|
31
|
-
rootEl: any;
|
|
32
|
-
};
|
|
20
|
+
export interface BaseButtonSlots {
|
|
21
|
+
default?: (props: object) => never;
|
|
22
|
+
preIcon?: (props: object) => never;
|
|
23
|
+
icon?: (props: object) => never;
|
|
24
|
+
badge?: (props: object) => never;
|
|
25
|
+
postIcon?: (props: object) => never;
|
|
26
|
+
}
|
|
27
|
+
declare function __VLS_template(): any;
|
|
33
28
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
34
|
-
declare const __VLS_component: import('vue').DefineComponent<BaseButtonProps, {
|
|
29
|
+
declare const __VLS_component: import('vue').DefineComponent<BaseButtonProps, {
|
|
30
|
+
focus(): void;
|
|
31
|
+
blur(): void;
|
|
32
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BaseButtonProps> & Readonly<{}>, {
|
|
35
33
|
type: ButtonType;
|
|
36
34
|
color: ButtonColor;
|
|
37
35
|
as: import('radix-vue', { with: { "resolution-mode": "import" } }).AsTag | import('vue').Component;
|
|
38
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false,
|
|
36
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, any, any>;
|
|
39
37
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
40
38
|
export default _default;
|
|
41
39
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),C=require("radix-vue"),o=require("./class-CjZYGZDW.js"),z=require("class-variance-authority"),k=require("./Icon.vue_vue_type_style_index_0_lang-D-jaUivh.js"),V=require("./options-B4iSAKol.js"),l=["2xsm","xsm","sm","md","tiny","tinier"],c=["rect","pill","minify"],p=["primary","blue","red","orange","yellow","lime","violet","gray","teal","green","sky","cyan","pink","amber","fuchsia"],u=["bold","subtle"],S=e.defineComponent({...V.getComponentOptions("BaseBadge"),__name:"BaseBadge",props:{size:{default:"md"},class:{},text:{},color:{default:"primary"},type:{default:"pill"},mode:{default:"bold"},icon:{},as:{default:"div"}},setup(f){const a=o.getBemBlock("badge"),s=f,d=[...p,"none"],y=z.cva(a,{variants:{size:o.generateVariantClassList(l,a),type:o.generateVariantClassList(c,a),color:o.generateVariantClassList(d,a),mode:o.generateVariantClassList(u,a),text:o.generateVariantClassList("text",a),icon:o.generateVariantClassList("icon",a)}}),i=e.useSlots(),n=e.computed(()=>c.includes(s.type)?s.type:"pill"),g=e.computed(()=>!!(s.text||i.default)),v=e.computed(()=>!!(s.icon||i.icon)),m=e.computed(()=>{let t=l.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}),B=e.computed(()=>{switch(m.value){case"sm":return"xsm";case"xsm":return"2xsm";case"2xsm":return"3xsm";case"md":default:return"sm"}}),_=e.computed(()=>{const t=u.includes(s.mode)?s.mode:"bold";let r=d.includes(s.color)?s.color:"primary";return r==="none"&&n.value!=="rect"&&(r="primary"),{size:m.value,color:r,mode:t,type:n.value,text:g.value,icon:v.value}}),x=e.computed(()=>{const t=s.icon??i.icon;return s.type==="rect"&&(i.default||s.text)?!1:t});return(t,r)=>(e.openBlock(),e.createBlock(e.unref(C.Primitive),{as:t.as,class:e.normalizeClass([e.unref(y)(_.value),s.class])},{default:e.withCtx(()=>[n.value!=="minify"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[x.value?(e.openBlock(),e.createBlock(k._sfc_main,{key:0,icon:t.icon,size:B.value},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"icon")]),_:3},8,["icon","size"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)])],64)):e.createCommentVNode("",!0)]),_:3},8,["as","class"]))}});exports.BadgeColors=p;exports.BadgeModes=u;exports.BadgeSizes=l;exports.BadgeTypes=c;exports._sfc_main=S;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { defineComponent as h, useSlots as w, computed as n, openBlock as r, createBlock as u, unref as d, normalizeClass as V, withCtx as f, createElementBlock as $, Fragment as I, renderSlot as p, createCommentVNode as y, createTextVNode as N, toDisplayString as P } from "vue";
|
|
2
|
+
import { Primitive as T } from "radix-vue";
|
|
3
|
+
import { g as i, b as D } from "./class-DyU-Ox8D.js";
|
|
4
|
+
import { cva as E } from "class-variance-authority";
|
|
5
|
+
import { _ as F } from "./Icon.vue_vue_type_style_index_0_lang-W7sippxn.js";
|
|
6
|
+
import { g as L } from "./options-JBqnVZUl.js";
|
|
7
|
+
const v = ["2xsm", "xsm", "sm", "md", "tiny", "tinier"], g = ["rect", "pill", "minify"], M = [
|
|
8
|
+
"primary",
|
|
9
|
+
"blue",
|
|
10
|
+
"red",
|
|
11
|
+
"orange",
|
|
12
|
+
"yellow",
|
|
13
|
+
"lime",
|
|
14
|
+
"violet",
|
|
15
|
+
"gray",
|
|
16
|
+
"teal",
|
|
17
|
+
"green",
|
|
18
|
+
"sky",
|
|
19
|
+
"cyan",
|
|
20
|
+
"pink",
|
|
21
|
+
"amber",
|
|
22
|
+
"fuchsia"
|
|
23
|
+
], B = ["bold", "subtle"], J = /* @__PURE__ */ h({
|
|
24
|
+
...L("BaseBadge"),
|
|
25
|
+
__name: "BaseBadge",
|
|
26
|
+
props: {
|
|
27
|
+
size: { default: "md" },
|
|
28
|
+
class: {},
|
|
29
|
+
text: {},
|
|
30
|
+
color: { default: "primary" },
|
|
31
|
+
type: { default: "pill" },
|
|
32
|
+
mode: { default: "bold" },
|
|
33
|
+
icon: {},
|
|
34
|
+
as: { default: "div" }
|
|
35
|
+
},
|
|
36
|
+
setup(x) {
|
|
37
|
+
const o = D("badge"), t = x, c = [...M, "none"], z = E(o, {
|
|
38
|
+
variants: {
|
|
39
|
+
size: i(v, o),
|
|
40
|
+
type: i(g, o),
|
|
41
|
+
color: i(c, o),
|
|
42
|
+
mode: i(B, o),
|
|
43
|
+
text: i("text", o),
|
|
44
|
+
icon: i("icon", o)
|
|
45
|
+
}
|
|
46
|
+
}), a = w(), s = n(() => g.includes(t.type) ? t.type : "pill"), _ = n(() => !!(t.text || a.default)), b = n(() => !!(t.icon || a.icon)), m = n(() => {
|
|
47
|
+
let e = v.includes(t.size) ? t.size : "md";
|
|
48
|
+
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;
|
|
49
|
+
}), C = n(() => {
|
|
50
|
+
switch (m.value) {
|
|
51
|
+
case "sm":
|
|
52
|
+
return "xsm";
|
|
53
|
+
case "xsm":
|
|
54
|
+
return "2xsm";
|
|
55
|
+
case "2xsm":
|
|
56
|
+
return "3xsm";
|
|
57
|
+
case "md":
|
|
58
|
+
default:
|
|
59
|
+
return "sm";
|
|
60
|
+
}
|
|
61
|
+
}), k = n(() => {
|
|
62
|
+
const e = B.includes(t.mode) ? t.mode : "bold";
|
|
63
|
+
let l = c.includes(t.color) ? t.color : "primary";
|
|
64
|
+
return l === "none" && s.value !== "rect" && (l = "primary"), {
|
|
65
|
+
size: m.value,
|
|
66
|
+
color: l,
|
|
67
|
+
mode: e,
|
|
68
|
+
type: s.value,
|
|
69
|
+
text: _.value,
|
|
70
|
+
icon: b.value
|
|
71
|
+
};
|
|
72
|
+
}), S = n(() => {
|
|
73
|
+
const e = t.icon ?? a.icon;
|
|
74
|
+
return t.type === "rect" && (a.default || t.text) ? !1 : e;
|
|
75
|
+
});
|
|
76
|
+
return (e, l) => (r(), u(d(T), {
|
|
77
|
+
as: e.as,
|
|
78
|
+
class: V([d(z)(k.value), t.class])
|
|
79
|
+
}, {
|
|
80
|
+
default: f(() => [
|
|
81
|
+
s.value !== "minify" ? (r(), $(I, { key: 0 }, [
|
|
82
|
+
S.value ? (r(), u(F, {
|
|
83
|
+
key: 0,
|
|
84
|
+
icon: e.icon,
|
|
85
|
+
size: C.value
|
|
86
|
+
}, {
|
|
87
|
+
default: f(() => [
|
|
88
|
+
p(e.$slots, "icon")
|
|
89
|
+
]),
|
|
90
|
+
_: 3
|
|
91
|
+
}, 8, ["icon", "size"])) : y("", !0),
|
|
92
|
+
p(e.$slots, "default", {}, () => [
|
|
93
|
+
N(P(e.text), 1)
|
|
94
|
+
])
|
|
95
|
+
], 64)) : y("", !0)
|
|
96
|
+
]),
|
|
97
|
+
_: 3
|
|
98
|
+
}, 8, ["as", "class"]));
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
export {
|
|
102
|
+
v as B,
|
|
103
|
+
J as _,
|
|
104
|
+
g as a,
|
|
105
|
+
M as b,
|
|
106
|
+
B as c
|
|
107
|
+
};
|