straw-ui-vue 0.1.0 → 0.1.2

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.
Files changed (43) hide show
  1. package/README.md +184 -21
  2. package/dist/components/st-button/index.d.ts +2 -114
  3. package/dist/components/st-checkbox/index.d.ts +2 -108
  4. package/dist/components/st-checkbox/types.d.ts +18 -0
  5. package/dist/components/st-checkbox-group/index.d.ts +2 -120
  6. package/dist/components/st-checkbox-group/types.d.ts +18 -0
  7. package/dist/components/st-dialog/index.d.ts +2 -168
  8. package/dist/components/st-dialog/types.d.ts +26 -0
  9. package/dist/components/st-input/index.d.ts +2 -216
  10. package/dist/components/st-menu/index.d.ts +4 -158
  11. package/dist/components/st-menu/types.d.ts +20 -0
  12. package/dist/components/st-popover/index.d.ts +2 -168
  13. package/dist/components/st-radio/index.d.ts +2 -96
  14. package/dist/components/st-radio/types.d.ts +18 -0
  15. package/dist/components/st-radio-group/index.d.ts +2 -126
  16. package/dist/components/st-radio-group/types.d.ts +18 -0
  17. package/dist/components/st-select/index.d.ts +2 -210
  18. package/dist/components/st-sidebar/index.d.ts +2 -48
  19. package/dist/components/st-sidebar/types.d.ts +8 -0
  20. package/dist/components/st-sidebar-item/index.d.ts +3 -49
  21. package/dist/components/st-sidebar-item/st-sidebar-item.vue.d.ts +1 -1
  22. package/dist/components/st-sidebar-item/st-sidebar-item.vue_vue_type_script_setup_true_lang.cjs +1 -1
  23. package/dist/components/st-sidebar-item/st-sidebar-item.vue_vue_type_script_setup_true_lang.js +4 -1
  24. package/dist/components/st-sidebar-item/types.d.ts +10 -0
  25. package/dist/components/st-splitter/index.d.ts +3 -65
  26. package/dist/components/st-splitter/types.d.ts +28 -0
  27. package/dist/components/st-splitter-panel/index.d.ts +2 -126
  28. package/dist/components/st-splitter-panel/types.d.ts +26 -0
  29. package/dist/components/st-toggle/index.d.ts +2 -112
  30. package/dist/components/st-tooltip/index.d.ts +2 -128
  31. package/dist/components/st-tree/index.d.ts +2 -82
  32. package/dist/components/st-tree/types.d.ts +42 -0
  33. package/dist/generated-safelist.cjs +1 -0
  34. package/dist/generated-safelist.d.ts +7 -0
  35. package/dist/generated-safelist.js +4 -0
  36. package/dist/global-components.d.ts +49 -0
  37. package/dist/index.d.ts +60 -2115
  38. package/dist/unocss-preset.d.ts +72 -0
  39. package/dist/unocssPreset.cjs +1 -0
  40. package/dist/unocssPreset.js +66 -0
  41. package/dist/utils/with-install.d.ts +16 -3
  42. package/dist/variables.css +129 -0
  43. package/package.json +16 -8
package/README.md CHANGED
@@ -1,42 +1,205 @@
1
- # straw-ui
1
+ # Straw UI
2
2
 
3
- This template should help get you started developing with Vue 3 in Vite.
3
+ 一个基于 Vue 3 + TypeScript + UnoCSS 的现代组件库。
4
4
 
5
- ## Recommended IDE Setup
5
+ ## 特性
6
6
 
7
- [VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
7
+ - 🚀 **Vue 3 + TypeScript** - 完整的类型支持
8
+ - 🎨 **UnoCSS** - 原子化 CSS,按需生成
9
+ - 📦 **零运行时依赖** - 仅对等依赖 Vue 3
10
+ - 🔧 **按需导入** - 支持 tree-shaking
11
+ - 🌙 **暗色主题** - 内置暗色模式支持
8
12
 
9
- ## Recommended Browser Setup
13
+ ## 安装
10
14
 
11
- - Chromium-based browsers (Chrome, Edge, Brave, etc.):
12
- - [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
13
- - [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
14
- - Firefox:
15
- - [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
16
- - [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/)
15
+ ```bash
16
+ npm install straw-ui-vue
17
+ ```
18
+
19
+ ## 快速开始
20
+
21
+ ### 完整引入
22
+
23
+ ```ts
24
+ import { createApp } from 'vue';
25
+ import StrawUI from 'straw-ui-vue';
26
+ import 'straw-ui-vue/style.css';
27
+
28
+ const app = createApp(App);
29
+ app.use(StrawUI);
30
+ ```
31
+
32
+ ### 按需导入
33
+
34
+ ```vue
35
+ <script setup lang="ts">
36
+ import { StButton, StInput } from 'straw-ui-vue';
37
+ import 'straw-ui-vue/style.css';
38
+ </script>
39
+
40
+ <template>
41
+ <StButton>Click me</StButton>
42
+ <StInput v-model="value" placeholder="Type something" />
43
+ </template>
44
+ ```
45
+
46
+ ## UnoCSS 集成
47
+
48
+ Straw UI 基于 UnoCSS 构建,提供三种集成方案:
49
+
50
+ ### 方案一:使用预设(推荐)
51
+
52
+ ```ts
53
+ // uno.config.ts
54
+ import { defineConfig, presetWind4, presetIcons } from 'unocss';
55
+ import { presetStrawUI } from 'straw-ui-vue/unocss';
56
+
57
+ export default defineConfig({
58
+ presets: [
59
+ presetWind4(),
60
+ presetIcons(),
61
+ presetStrawUI(), // Straw UI 预设
62
+ ],
63
+ });
64
+ ```
65
+
66
+ ### 方案二:使用 safelist
67
+
68
+ ```ts
69
+ // uno.config.ts
70
+ import { defineConfig } from 'unocss';
71
+ import { getStrawUISafelist } from 'straw-ui-vue/unocss';
72
+
73
+ export default defineConfig({
74
+ safelist: [...getStrawUISafelist()],
75
+ });
76
+ ```
77
+
78
+ ### 方案三:仅引入样式
79
+
80
+ 不使用 UnoCSS 时,直接引入预编译的样式:
81
+
82
+ ```ts
83
+ import 'straw-ui-vue/style.css';
84
+ ```
85
+
86
+ 详细配置请参阅 [UnoCSS 集成文档](./docs/unocss.md)。
87
+
88
+ ## TypeScript 支持
89
+
90
+ Straw UI 提供完整的 TypeScript 类型支持。
17
91
 
18
- ## Type Support for `.vue` Imports in TS
92
+ ### 全局组件类型
19
93
 
20
- TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
94
+ ```json
95
+ // tsconfig.json
96
+ {
97
+ "compilerOptions": {
98
+ "types": ["straw-ui-vue/global-components"]
99
+ }
100
+ }
101
+ ```
102
+
103
+ 详细配置请参阅 [TypeScript 配置指南](./docs/typescript.md)。
104
+
105
+ ## 组件列表
106
+
107
+ | 组件 | 说明 |
108
+ |------|------|
109
+ | `StButton` | 按钮组件 |
110
+ | `StInput` | 输入框组件 |
111
+ | `StCheckbox` | 复选框组件 |
112
+ | `StCheckboxGroup` | 复选框组组件 |
113
+ | `StRadio` | 单选框组件 |
114
+ | `StRadioGroup` | 单选框组组件 |
115
+ | `StSelect` | 选择器组件 |
116
+ | `StDialog` | 对话框组件 |
117
+ | `StPopover` | 弹出框组件 |
118
+ | `StTooltip` | 提示框组件 |
119
+ | `StMenu` | 菜单组件 |
120
+ | `StSidebar` | 侧边栏组件 |
121
+ | `StSidebarItem` | 侧边栏项组件 |
122
+ | `StSplitter` | 分割器组件 |
123
+ | `StSplitterPanel` | 分割面板组件 |
124
+ | `StTree` | 树形组件 |
125
+ | `StToggle` | 开关组件 |
126
+
127
+ ## 自定义指令
128
+
129
+ | 指令 | 说明 |
130
+ |------|------|
131
+ | `v-intersection` | 元素可视区域监听 |
132
+ | `v-interval` | 定时器指令 |
133
+ | `v-move` | 元素拖拽移动 |
134
+ | `v-resize` | 元素尺寸变化监听 |
135
+
136
+ ## 主题定制
21
137
 
22
- ## Customize configuration
138
+ Straw UI 使用 CSS 变量定义主题,你可以通过覆盖变量来自定义主题:
23
139
 
24
- See [Vite Configuration Reference](https://vite.dev/config/).
140
+ ```css
141
+ :root {
142
+ --primary: #3b82f6;
143
+ --primary-foreground: #ffffff;
144
+ --radius: 0.5rem;
145
+ /* 更多变量... */
146
+ }
25
147
 
26
- ## Project Setup
148
+ [data-theme='dark'] {
149
+ --primary: #3b82f6;
150
+ /* 暗色主题变量... */
151
+ }
152
+ ```
153
+
154
+ 完整变量列表请参阅 [UnoCSS 集成文档](./docs/unocss.md#主题变量)。
155
+
156
+ ## 开发
157
+
158
+ ### 环境要求
159
+
160
+ - Node.js: `^20.19.0 || >=22.12.0`
161
+
162
+ ### 安装依赖
27
163
 
28
164
  ```sh
29
- bun install
165
+ npm install
30
166
  ```
31
167
 
32
- ### Compile and Hot-Reload for Development
168
+ ### 开发模式
33
169
 
34
170
  ```sh
35
- bun dev
171
+ npm run dev
36
172
  ```
37
173
 
38
- ### Type-Check, Compile and Minify for Production
174
+ ### 构建库
39
175
 
40
176
  ```sh
41
- bun run build
177
+ npm run build:lib
42
178
  ```
179
+
180
+ ### 类型检查
181
+
182
+ ```sh
183
+ npm run type-check
184
+ ```
185
+
186
+ ### 文档开发
187
+
188
+ ```sh
189
+ npm run docs:dev
190
+ ```
191
+
192
+ ## 文档
193
+
194
+ - [UnoCSS 集成](./docs/unocss.md)
195
+ - [TypeScript 配置](./docs/typescript.md)
196
+
197
+ ## 推荐 IDE 设置
198
+
199
+ - [VS Code](https://code.visualstudio.com/)
200
+ - [Vue - Official (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.volar)(禁用 Vetur)
201
+ - [UnoCSS](https://marketplace.visualstudio.com/items?itemName=antfu.unocss)
202
+
203
+ ## License
204
+
205
+ MIT
@@ -1,114 +1,4 @@
1
- export declare const StButton: {
2
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
3
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").ButtonProps> & Readonly<{
4
- onClick?: (event: MouseEvent) => any;
5
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
- click: (event: MouseEvent) => any;
7
- }, import("vue").PublicProps, {
8
- variant: import("./types.d.ts").ButtonVariant;
9
- type: import("./types.d.ts").ButtonType;
10
- disabled: boolean;
11
- loading: boolean;
12
- }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
13
- P: {};
14
- B: {};
15
- D: {};
16
- C: {};
17
- M: {};
18
- Defaults: {};
19
- }, Readonly<import("./types.d.ts").ButtonProps> & Readonly<{
20
- onClick?: (event: MouseEvent) => any;
21
- }>, {}, {}, {}, {}, {
22
- variant: import("./types.d.ts").ButtonVariant;
23
- type: import("./types.d.ts").ButtonType;
24
- disabled: boolean;
25
- loading: boolean;
26
- }>;
27
- __isFragment?: never;
28
- __isTeleport?: never;
29
- __isSuspense?: never;
30
- } & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").ButtonProps> & Readonly<{
31
- onClick?: (event: MouseEvent) => any;
32
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
33
- click: (event: MouseEvent) => any;
34
- }, string, {
35
- variant: import("./types.d.ts").ButtonVariant;
36
- type: import("./types.d.ts").ButtonType;
37
- disabled: boolean;
38
- loading: boolean;
39
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
40
- $slots: {
41
- default?: (props: {}) => any;
42
- } & {
43
- prefixIcon?: (props: {}) => any;
44
- } & {
45
- default?: (props: {}) => any;
46
- } & {
47
- suffixIcon?: (props: {}) => any;
48
- };
49
- })>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
50
- [x: string]: any;
51
- }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
52
- P: {};
53
- B: {};
54
- D: {};
55
- C: {};
56
- M: {};
57
- Defaults: {};
58
- }, Readonly<import("vue").ExtractPropTypes<{
59
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").ButtonProps> & Readonly<{
60
- onClick?: (event: MouseEvent) => any;
61
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
62
- click: (event: MouseEvent) => any;
63
- }, import("vue").PublicProps, {
64
- variant: import("./types.d.ts").ButtonVariant;
65
- type: import("./types.d.ts").ButtonType;
66
- disabled: boolean;
67
- loading: boolean;
68
- }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
69
- P: {};
70
- B: {};
71
- D: {};
72
- C: {};
73
- M: {};
74
- Defaults: {};
75
- }, Readonly<import("./types.d.ts").ButtonProps> & Readonly<{
76
- onClick?: (event: MouseEvent) => any;
77
- }>, {}, {}, {}, {}, {
78
- variant: import("./types.d.ts").ButtonVariant;
79
- type: import("./types.d.ts").ButtonType;
80
- disabled: boolean;
81
- loading: boolean;
82
- }>;
83
- __isFragment?: never;
84
- __isTeleport?: never;
85
- __isSuspense?: never;
86
- } & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").ButtonProps> & Readonly<{
87
- onClick?: (event: MouseEvent) => any;
88
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
89
- click: (event: MouseEvent) => any;
90
- }, string, {
91
- variant: import("./types.d.ts").ButtonVariant;
92
- type: import("./types.d.ts").ButtonType;
93
- disabled: boolean;
94
- loading: boolean;
95
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
96
- $slots: {
97
- default?: (props: {}) => any;
98
- } & {
99
- prefixIcon?: (props: {}) => any;
100
- } & {
101
- default?: (props: {}) => any;
102
- } & {
103
- suffixIcon?: (props: {}) => any;
104
- };
105
- })>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, {
106
- [x: string]: any;
107
- }>;
108
- __isFragment?: never;
109
- __isTeleport?: never;
110
- __isSuspense?: never;
111
- } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
1
+ export declare const StButton: import('../../utils/with-install.js').SFCWithInstall<{
112
2
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").ButtonProps> & Readonly<{
113
3
  onClick?: (event: MouseEvent) => any;
114
4
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -155,8 +45,6 @@ export declare const StButton: {
155
45
  } & {
156
46
  suffixIcon?: (props: {}) => any;
157
47
  };
158
- })>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
159
- [x: string]: any;
160
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & (import("vue").VNodeProps & (import("vue").AllowedComponentProps & (import("vue").ComponentCustomProps & import("vue").Plugin)));
48
+ })>;
161
49
  export default StButton;
162
50
  export type * from './types.d.ts';
@@ -1,108 +1,4 @@
1
- export declare const StCheckbox: {
2
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
3
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").CheckboxProps & {
4
- modelValue?: boolean | string | number;
5
- }> & Readonly<{
6
- "onUpdate:modelValue"?: (value: string | number | boolean) => any;
7
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
- "update:modelValue": (value: string | number | boolean) => any;
9
- }, import("vue").PublicProps, {
10
- disabled: boolean;
11
- trueValue: boolean | string | number;
12
- falseValue: boolean | string | number;
13
- }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
14
- P: {};
15
- B: {};
16
- D: {};
17
- C: {};
18
- M: {};
19
- Defaults: {};
20
- }, Readonly<import("./types.d.ts").CheckboxProps & {
21
- modelValue?: boolean | string | number;
22
- }> & Readonly<{
23
- "onUpdate:modelValue"?: (value: string | number | boolean) => any;
24
- }>, {}, {}, {}, {}, {
25
- disabled: boolean;
26
- trueValue: boolean | string | number;
27
- falseValue: boolean | string | number;
28
- }>;
29
- __isFragment?: never;
30
- __isTeleport?: never;
31
- __isSuspense?: never;
32
- } & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").CheckboxProps & {
33
- modelValue?: boolean | string | number;
34
- }> & Readonly<{
35
- "onUpdate:modelValue"?: (value: string | number | boolean) => any;
36
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
37
- "update:modelValue": (value: string | number | boolean) => any;
38
- }, string, {
39
- disabled: boolean;
40
- trueValue: boolean | string | number;
41
- falseValue: boolean | string | number;
42
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
43
- $slots: {
44
- default?: (props: {}) => any;
45
- };
46
- })>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
47
- [x: string]: any;
48
- }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
49
- P: {};
50
- B: {};
51
- D: {};
52
- C: {};
53
- M: {};
54
- Defaults: {};
55
- }, Readonly<import("vue").ExtractPropTypes<{
56
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").CheckboxProps & {
57
- modelValue?: boolean | string | number;
58
- }> & Readonly<{
59
- "onUpdate:modelValue"?: (value: string | number | boolean) => any;
60
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
61
- "update:modelValue": (value: string | number | boolean) => any;
62
- }, import("vue").PublicProps, {
63
- disabled: boolean;
64
- trueValue: boolean | string | number;
65
- falseValue: boolean | string | number;
66
- }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
67
- P: {};
68
- B: {};
69
- D: {};
70
- C: {};
71
- M: {};
72
- Defaults: {};
73
- }, Readonly<import("./types.d.ts").CheckboxProps & {
74
- modelValue?: boolean | string | number;
75
- }> & Readonly<{
76
- "onUpdate:modelValue"?: (value: string | number | boolean) => any;
77
- }>, {}, {}, {}, {}, {
78
- disabled: boolean;
79
- trueValue: boolean | string | number;
80
- falseValue: boolean | string | number;
81
- }>;
82
- __isFragment?: never;
83
- __isTeleport?: never;
84
- __isSuspense?: never;
85
- } & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").CheckboxProps & {
86
- modelValue?: boolean | string | number;
87
- }> & Readonly<{
88
- "onUpdate:modelValue"?: (value: string | number | boolean) => any;
89
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
90
- "update:modelValue": (value: string | number | boolean) => any;
91
- }, string, {
92
- disabled: boolean;
93
- trueValue: boolean | string | number;
94
- falseValue: boolean | string | number;
95
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
96
- $slots: {
97
- default?: (props: {}) => any;
98
- };
99
- })>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, {
100
- [x: string]: any;
101
- }>;
102
- __isFragment?: never;
103
- __isTeleport?: never;
104
- __isSuspense?: never;
105
- } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
1
+ export declare const StCheckbox: import('../../utils/with-install.js').SFCWithInstall<{
106
2
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").CheckboxProps & {
107
3
  modelValue?: boolean | string | number;
108
4
  }> & Readonly<{
@@ -146,8 +42,6 @@ export declare const StCheckbox: {
146
42
  $slots: {
147
43
  default?: (props: {}) => any;
148
44
  };
149
- })>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
150
- [x: string]: any;
151
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & (import("vue").VNodeProps & (import("vue").AllowedComponentProps & (import("vue").ComponentCustomProps & import("vue").Plugin)));
45
+ })>;
152
46
  export default StCheckbox;
153
47
  export type * from './types.d.ts';
@@ -17,4 +17,22 @@ export interface CheckboxProps {
17
17
  falseValue?: boolean | string | number;
18
18
  }
19
19
 
20
+ /**
21
+ * Checkbox 组件事件接口
22
+ */
23
+ export interface CheckboxEmits {
24
+ /** 更新绑定值事件 */
25
+ 'update:modelValue': [value: boolean | string | number];
26
+ /** 值改变事件 */
27
+ change: [value: boolean | string | number];
28
+ }
29
+
30
+ /**
31
+ * Checkbox 组件插槽接口
32
+ */
33
+ export interface CheckboxSlots {
34
+ /** 默认插槽(标签内容) */
35
+ default?: () => unknown;
36
+ }
37
+
20
38
  export {};
@@ -1,120 +1,4 @@
1
- export declare const StCheckboxGroup: {
2
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
3
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").CheckboxGroupProps & {
4
- modelValue?: (string | number | boolean)[];
5
- }> & Readonly<{
6
- "onUpdate:modelValue"?: (value: (string | number | boolean)[]) => any;
7
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
- "update:modelValue": (value: (string | number | boolean)[]) => any;
9
- }, import("vue").PublicProps, {
10
- disabled: boolean;
11
- list: import("./types.d.ts").CheckboxGroupItem[];
12
- labelKey: string;
13
- valueKey: string;
14
- direction: import("./types.d.ts").CheckboxGroupDirection;
15
- }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
16
- P: {};
17
- B: {};
18
- D: {};
19
- C: {};
20
- M: {};
21
- Defaults: {};
22
- }, Readonly<import("./types.d.ts").CheckboxGroupProps & {
23
- modelValue?: (string | number | boolean)[];
24
- }> & Readonly<{
25
- "onUpdate:modelValue"?: (value: (string | number | boolean)[]) => any;
26
- }>, {}, {}, {}, {}, {
27
- disabled: boolean;
28
- list: import("./types.d.ts").CheckboxGroupItem[];
29
- labelKey: string;
30
- valueKey: string;
31
- direction: import("./types.d.ts").CheckboxGroupDirection;
32
- }>;
33
- __isFragment?: never;
34
- __isTeleport?: never;
35
- __isSuspense?: never;
36
- } & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").CheckboxGroupProps & {
37
- modelValue?: (string | number | boolean)[];
38
- }> & Readonly<{
39
- "onUpdate:modelValue"?: (value: (string | number | boolean)[]) => any;
40
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
41
- "update:modelValue": (value: (string | number | boolean)[]) => any;
42
- }, string, {
43
- disabled: boolean;
44
- list: import("./types.d.ts").CheckboxGroupItem[];
45
- labelKey: string;
46
- valueKey: string;
47
- direction: import("./types.d.ts").CheckboxGroupDirection;
48
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
49
- $slots: {
50
- default?: (props: {}) => any;
51
- };
52
- })>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
53
- [x: string]: any;
54
- }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
55
- P: {};
56
- B: {};
57
- D: {};
58
- C: {};
59
- M: {};
60
- Defaults: {};
61
- }, Readonly<import("vue").ExtractPropTypes<{
62
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").CheckboxGroupProps & {
63
- modelValue?: (string | number | boolean)[];
64
- }> & Readonly<{
65
- "onUpdate:modelValue"?: (value: (string | number | boolean)[]) => any;
66
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
67
- "update:modelValue": (value: (string | number | boolean)[]) => any;
68
- }, import("vue").PublicProps, {
69
- disabled: boolean;
70
- list: import("./types.d.ts").CheckboxGroupItem[];
71
- labelKey: string;
72
- valueKey: string;
73
- direction: import("./types.d.ts").CheckboxGroupDirection;
74
- }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
75
- P: {};
76
- B: {};
77
- D: {};
78
- C: {};
79
- M: {};
80
- Defaults: {};
81
- }, Readonly<import("./types.d.ts").CheckboxGroupProps & {
82
- modelValue?: (string | number | boolean)[];
83
- }> & Readonly<{
84
- "onUpdate:modelValue"?: (value: (string | number | boolean)[]) => any;
85
- }>, {}, {}, {}, {}, {
86
- disabled: boolean;
87
- list: import("./types.d.ts").CheckboxGroupItem[];
88
- labelKey: string;
89
- valueKey: string;
90
- direction: import("./types.d.ts").CheckboxGroupDirection;
91
- }>;
92
- __isFragment?: never;
93
- __isTeleport?: never;
94
- __isSuspense?: never;
95
- } & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").CheckboxGroupProps & {
96
- modelValue?: (string | number | boolean)[];
97
- }> & Readonly<{
98
- "onUpdate:modelValue"?: (value: (string | number | boolean)[]) => any;
99
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
100
- "update:modelValue": (value: (string | number | boolean)[]) => any;
101
- }, string, {
102
- disabled: boolean;
103
- list: import("./types.d.ts").CheckboxGroupItem[];
104
- labelKey: string;
105
- valueKey: string;
106
- direction: import("./types.d.ts").CheckboxGroupDirection;
107
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
108
- $slots: {
109
- default?: (props: {}) => any;
110
- };
111
- })>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, {
112
- [x: string]: any;
113
- }>;
114
- __isFragment?: never;
115
- __isTeleport?: never;
116
- __isSuspense?: never;
117
- } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
1
+ export declare const StCheckboxGroup: import('../../utils/with-install.js').SFCWithInstall<{
118
2
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").CheckboxGroupProps & {
119
3
  modelValue?: (string | number | boolean)[];
120
4
  }> & Readonly<{
@@ -164,8 +48,6 @@ export declare const StCheckboxGroup: {
164
48
  $slots: {
165
49
  default?: (props: {}) => any;
166
50
  };
167
- })>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
168
- [x: string]: any;
169
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & (import("vue").VNodeProps & (import("vue").AllowedComponentProps & (import("vue").ComponentCustomProps & import("vue").Plugin)));
51
+ })>;
170
52
  export default StCheckboxGroup;
171
53
  export type * from './types.d.ts';
@@ -40,4 +40,22 @@ export interface CheckboxGroupItem {
40
40
  */
41
41
  export type CheckboxGroupDirection = 'horizontal' | 'vertical';
42
42
 
43
+ /**
44
+ * CheckboxGroup 组件事件接口
45
+ */
46
+ export interface CheckboxGroupEmits {
47
+ /** 更新绑定值事件 */
48
+ 'update:modelValue': [value: (string | number | boolean)[]];
49
+ /** 值改变事件 */
50
+ change: [value: (string | number | boolean)[]];
51
+ }
52
+
53
+ /**
54
+ * CheckboxGroup 组件插槽接口
55
+ */
56
+ export interface CheckboxGroupSlots {
57
+ /** 默认插槽 */
58
+ default?: () => unknown;
59
+ }
60
+
43
61
  export {};