straw-ui-vue 0.1.24 → 0.1.25

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.
@@ -37,6 +37,93 @@ export declare const StButton: {
37
37
  loading: boolean;
38
38
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
39
39
  $slots: import('./types.d.ts').StButtonSlots;
40
+ }) & {
41
+ StButtonGroup: {
42
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types.d.ts').StButtonGroupProps> & Readonly<{
43
+ onClick?: (event: MouseEvent) => any;
44
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
45
+ click: (event: MouseEvent) => any;
46
+ }, import('vue').PublicProps, {
47
+ type: import('./types.d.ts').StButtonType;
48
+ variant: import('./types.d.ts').StButtonVariant;
49
+ disabled: boolean;
50
+ loading: boolean;
51
+ direction: import('./types.d.ts').StButtonGroupDirection;
52
+ }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
53
+ P: {};
54
+ B: {};
55
+ D: {};
56
+ C: {};
57
+ M: {};
58
+ Defaults: {};
59
+ }, Readonly<import('./types.d.ts').StButtonGroupProps> & Readonly<{
60
+ onClick?: (event: MouseEvent) => any;
61
+ }>, {}, {}, {}, {}, {
62
+ type: import('./types.d.ts').StButtonType;
63
+ variant: import('./types.d.ts').StButtonVariant;
64
+ disabled: boolean;
65
+ loading: boolean;
66
+ direction: import('./types.d.ts').StButtonGroupDirection;
67
+ }>;
68
+ __isFragment?: never;
69
+ __isTeleport?: never;
70
+ __isSuspense?: never;
71
+ } & import('vue').ComponentOptionsBase<Readonly<import('./types.d.ts').StButtonGroupProps> & Readonly<{
72
+ onClick?: (event: MouseEvent) => any;
73
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
74
+ click: (event: MouseEvent) => any;
75
+ }, string, {
76
+ type: import('./types.d.ts').StButtonType;
77
+ variant: import('./types.d.ts').StButtonVariant;
78
+ disabled: boolean;
79
+ loading: boolean;
80
+ direction: import('./types.d.ts').StButtonGroupDirection;
81
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
82
+ $slots: import('./types.d.ts').StButtonGroupSlots;
83
+ });
84
+ };
85
+ export declare const StButtonGroup: {
86
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types.d.ts').StButtonGroupProps> & Readonly<{
87
+ onClick?: (event: MouseEvent) => any;
88
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
89
+ click: (event: MouseEvent) => any;
90
+ }, import('vue').PublicProps, {
91
+ type: import('./types.d.ts').StButtonType;
92
+ variant: import('./types.d.ts').StButtonVariant;
93
+ disabled: boolean;
94
+ loading: boolean;
95
+ direction: import('./types.d.ts').StButtonGroupDirection;
96
+ }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
97
+ P: {};
98
+ B: {};
99
+ D: {};
100
+ C: {};
101
+ M: {};
102
+ Defaults: {};
103
+ }, Readonly<import('./types.d.ts').StButtonGroupProps> & Readonly<{
104
+ onClick?: (event: MouseEvent) => any;
105
+ }>, {}, {}, {}, {}, {
106
+ type: import('./types.d.ts').StButtonType;
107
+ variant: import('./types.d.ts').StButtonVariant;
108
+ disabled: boolean;
109
+ loading: boolean;
110
+ direction: import('./types.d.ts').StButtonGroupDirection;
111
+ }>;
112
+ __isFragment?: never;
113
+ __isTeleport?: never;
114
+ __isSuspense?: never;
115
+ } & import('vue').ComponentOptionsBase<Readonly<import('./types.d.ts').StButtonGroupProps> & Readonly<{
116
+ onClick?: (event: MouseEvent) => any;
117
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
118
+ click: (event: MouseEvent) => any;
119
+ }, string, {
120
+ type: import('./types.d.ts').StButtonType;
121
+ variant: import('./types.d.ts').StButtonVariant;
122
+ disabled: boolean;
123
+ loading: boolean;
124
+ direction: import('./types.d.ts').StButtonGroupDirection;
125
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
126
+ $slots: import('./types.d.ts').StButtonGroupSlots;
40
127
  });
41
128
  export default StButton;
42
129
  export type * from './types.d.ts';
@@ -0,0 +1,21 @@
1
+ import { StButtonGroupDirection, StButtonGroupProps, StButtonGroupSlots } from './types.d.ts';
2
+ type __VLS_Slots = StButtonGroupSlots;
3
+ declare const __VLS_base: import('vue').DefineComponent<StButtonGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
4
+ click: (event: MouseEvent) => any;
5
+ }, string, import('vue').PublicProps, Readonly<StButtonGroupProps> & Readonly<{
6
+ onClick?: (event: MouseEvent) => any;
7
+ }>, {
8
+ type: import('./types.d.ts').StButtonType;
9
+ variant: import('./types.d.ts').StButtonVariant;
10
+ disabled: boolean;
11
+ loading: boolean;
12
+ direction: StButtonGroupDirection;
13
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -1,63 +1,112 @@
1
- import type { ClassValue, StyleValue } from 'vue';
2
-
3
- /**
4
- * 按钮变体类型
5
- * */
6
- export type StButtonVariant = 'primary' | 'default' | 'ghost';
7
-
8
- /**
9
- * 按钮类型
10
- * */
11
- export type StButtonType = 'default' | 'icon';
12
-
13
- /**
14
- * 按钮组件属性
15
- * */
16
- export interface StButtonProps {
17
- /** 按钮变体类型 */
18
- variant?: StButtonVariant;
19
- /** 按钮类型 */
20
- type?: StButtonType;
21
- /** 是否禁用 */
22
- disabled?: boolean;
23
- /** 是否显示加载状态 */
24
- loading?: boolean;
25
- /** 前缀图标名称 */
26
- prefixIcon?: string;
27
- /** 后缀图标名称 */
28
- suffixIcon?: string;
29
- /** 前缀图标类名 */
30
- prefixIconClass?: ClassValue;
31
- /** 前缀图标样式 */
32
- prefixIconStyle?: StyleValue;
33
- /** 后缀图标类名 */
34
- suffixIconClass?: ClassValue;
35
- /** 后缀图标样式 */
36
- suffixIconStyle?: StyleValue;
37
- /** loading图标类名 */
38
- loadingIconClass?: ClassValue;
39
- /** loading图标样式 */
40
- loadingIconStyle?: StyleValue;
41
- }
42
-
43
- /**
44
- * 按钮组件插槽类型
45
- * */
46
- export interface StButtonSlots {
47
- /** 默认插槽 */
48
- default?: () => unknown;
49
- /** 前缀图标插槽 */
50
- prefixIcon?: () => unknown;
51
- /** 后缀图标插槽 */
52
- suffixIcon?: () => unknown;
53
- }
54
-
55
- /**
56
- * 按钮组件事件类型
57
- * */
58
- export interface StButtonEmits {
59
- /** 点击事件 */
60
- click: [event: MouseEvent];
61
- }
62
-
63
- export {};
1
+ import type { ClassValue, StyleValue } from 'vue';
2
+
3
+ /**
4
+ * 按钮变体类型
5
+ * */
6
+ export type StButtonVariant = 'primary' | 'default' | 'ghost';
7
+
8
+ /**
9
+ * 按钮类型
10
+ * */
11
+ export type StButtonType = 'default' | 'icon';
12
+
13
+ /**
14
+ * 按钮组件属性
15
+ * */
16
+ export interface StButtonProps {
17
+ /** 按钮变体类型 */
18
+ variant?: StButtonVariant;
19
+ /** 按钮类型 */
20
+ type?: StButtonType;
21
+ /** 是否禁用 */
22
+ disabled?: boolean;
23
+ /** 是否显示加载状态 */
24
+ loading?: boolean;
25
+ /** 前缀图标名称 */
26
+ prefixIcon?: string;
27
+ /** 后缀图标名称 */
28
+ suffixIcon?: string;
29
+ /** 前缀图标类名 */
30
+ prefixIconClass?: ClassValue;
31
+ /** 前缀图标样式 */
32
+ prefixIconStyle?: StyleValue;
33
+ /** 后缀图标类名 */
34
+ suffixIconClass?: ClassValue;
35
+ /** 后缀图标样式 */
36
+ suffixIconStyle?: StyleValue;
37
+ /** loading图标类名 */
38
+ loadingIconClass?: ClassValue;
39
+ /** loading图标样式 */
40
+ loadingIconStyle?: StyleValue;
41
+ }
42
+
43
+ /**
44
+ * 按钮组件插槽类型
45
+ * */
46
+ export interface StButtonSlots {
47
+ /** 默认插槽 */
48
+ default?: () => unknown;
49
+ /** 前缀图标插槽 */
50
+ prefixIcon?: () => unknown;
51
+ /** 后缀图标插槽 */
52
+ suffixIcon?: () => unknown;
53
+ }
54
+
55
+ /**
56
+ * 按钮组件事件类型
57
+ * */
58
+ export interface StButtonEmits {
59
+ /** 点击事件 */
60
+ click: [event: MouseEvent];
61
+ }
62
+
63
+ /**
64
+ * 按钮组排列方向类型
65
+ * */
66
+ export type StButtonGroupDirection = 'horizontal' | 'vertical';
67
+
68
+ /**
69
+ * 按钮组注入上下文接口
70
+ * */
71
+ export interface StButtonGroupContext {
72
+ variant: import('vue').ComputedRef<StButtonVariant>;
73
+ type: import('vue').ComputedRef<StButtonType>;
74
+ disabled: import('vue').ComputedRef<boolean>;
75
+ loading: import('vue').ComputedRef<boolean>;
76
+ inGroup: import('vue').ComputedRef<boolean>;
77
+ direction: import('vue').ComputedRef<StButtonGroupDirection>;
78
+ }
79
+
80
+ /**
81
+ * 按钮组组件属性
82
+ * */
83
+ export interface StButtonGroupProps {
84
+ /** 按钮变体类型 */
85
+ variant?: StButtonVariant;
86
+ /** 按钮类型 */
87
+ type?: StButtonType;
88
+ /** 是否禁用 */
89
+ disabled?: boolean;
90
+ /** 是否显示加载状态 */
91
+ loading?: boolean;
92
+ /** 排列方向 */
93
+ direction?: StButtonGroupDirection;
94
+ }
95
+
96
+ /**
97
+ * 按钮组组件插槽
98
+ * */
99
+ export interface StButtonGroupSlots {
100
+ /** 默认插槽 */
101
+ default?: () => unknown;
102
+ }
103
+
104
+ /**
105
+ * 按钮组组件事件
106
+ * */
107
+ export interface StButtonGroupEmits {
108
+ /** 点击事件 */
109
+ click: [event: MouseEvent];
110
+ }
111
+
112
+ export {};
@@ -0,0 +1,2 @@
1
+ import { StButtonGroupContext } from './types.d.ts';
2
+ export declare const useProvideButtonGroup: (context: StButtonGroupContext) => StButtonGroupContext, useInjectButtonGroup: () => StButtonGroupContext;
package/dist/global.d.ts CHANGED
@@ -3,6 +3,7 @@ import type * as Components from './index';
3
3
  declare module 'vue' {
4
4
  export interface GlobalComponents {
5
5
  StButton: typeof Components.StButton;
6
+ StButtonGroup: typeof Components.StButtonGroup;
6
7
  StCard: typeof Components.StCard;
7
8
  StCardGroup: typeof Components.StCardGroup;
8
9
  StCardGroupAction: typeof Components.StCardGroupAction;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Plugin } from 'vue';
2
- export { StButton } from './components/st-button/index.ts';
2
+ export { StButton, StButtonGroup } from './components/st-button/index.ts';
3
3
  export { StCard, StCardGroup, StCardGroupAction, StCardGroupContent, StCardGroupDescription, StCardGroupFooter, StCardGroupHeader, StCardGroupTitle, } from './components/st-card/index.ts';
4
4
  export { StCascade, StCascadePanel } from './components/st-cascade/index.ts';
5
5
  export { StCheckbox, StCheckboxGroup } from './components/st-checkbox/index.ts';
@@ -93,6 +93,7 @@ export default StrawUI;
93
93
 
94
94
  // --- GlobalComponents augmentation ---
95
95
  import type { StButton as _StButton } from './components/st-button/index.ts';
96
+ import type { StButtonGroup as _StButtonGroup } from './components/st-button/index.ts';
96
97
  import type { StCard as _StCard } from './components/st-card/index.ts';
97
98
  import type { StCardGroup as _StCardGroup } from './components/st-card/index.ts';
98
99
  import type { StCardGroupAction as _StCardGroupAction } from './components/st-card/index.ts';
@@ -195,6 +196,7 @@ import type { StTreeNode as _StTreeNode } from './components/st-tree/index.ts';
195
196
  declare module 'vue' {
196
197
  export interface GlobalComponents {
197
198
  StButton: typeof _StButton;
199
+ StButtonGroup: typeof _StButtonGroup;
198
200
  StCard: typeof _StCard;
199
201
  StCardGroup: typeof _StCardGroup;
200
202
  StCardGroupAction: typeof _StCardGroupAction;