straw-ui-vue 0.1.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.
Files changed (200) hide show
  1. package/README.md +42 -0
  2. package/dist/_virtual/_plugin-vue_export-helper.cjs +1 -0
  3. package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
  4. package/dist/components/st-button/index.d.ts +162 -0
  5. package/dist/components/st-button/st-button.vue.cjs +1 -0
  6. package/dist/components/st-button/st-button.vue.d.ts +29 -0
  7. package/dist/components/st-button/st-button.vue.js +5 -0
  8. package/dist/components/st-button/st-button.vue_vue_type_script_setup_true_lang.cjs +1 -0
  9. package/dist/components/st-button/st-button.vue_vue_type_script_setup_true_lang.js +81 -0
  10. package/dist/components/st-button/types.d.ts +49 -0
  11. package/dist/components/st-button.cjs +1 -0
  12. package/dist/components/st-button.js +6 -0
  13. package/dist/components/st-checkbox/index.d.ts +153 -0
  14. package/dist/components/st-checkbox/st-checkbox.vue.cjs +1 -0
  15. package/dist/components/st-checkbox/st-checkbox.vue.d.ts +27 -0
  16. package/dist/components/st-checkbox/st-checkbox.vue.js +5 -0
  17. package/dist/components/st-checkbox/st-checkbox.vue_vue_type_script_setup_true_lang.cjs +1 -0
  18. package/dist/components/st-checkbox/st-checkbox.vue_vue_type_script_setup_true_lang.js +109 -0
  19. package/dist/components/st-checkbox/types.d.ts +20 -0
  20. package/dist/components/st-checkbox-group/index.d.ts +171 -0
  21. package/dist/components/st-checkbox-group/st-checkbox-group.vue.cjs +1 -0
  22. package/dist/components/st-checkbox-group/st-checkbox-group.vue.d.ts +29 -0
  23. package/dist/components/st-checkbox-group/st-checkbox-group.vue.js +5 -0
  24. package/dist/components/st-checkbox-group/st-checkbox-group.vue_vue_type_script_setup_true_lang.cjs +1 -0
  25. package/dist/components/st-checkbox-group/st-checkbox-group.vue_vue_type_script_setup_true_lang.js +63 -0
  26. package/dist/components/st-checkbox-group/types.d.ts +43 -0
  27. package/dist/components/st-checkbox-group.cjs +1 -0
  28. package/dist/components/st-checkbox-group.js +6 -0
  29. package/dist/components/st-checkbox.cjs +1 -0
  30. package/dist/components/st-checkbox.js +6 -0
  31. package/dist/components/st-dialog/index.d.ts +243 -0
  32. package/dist/components/st-dialog/st-dialog.vue.cjs +1 -0
  33. package/dist/components/st-dialog/st-dialog.vue.d.ts +41 -0
  34. package/dist/components/st-dialog/st-dialog.vue.js +5 -0
  35. package/dist/components/st-dialog/st-dialog.vue_vue_type_script_setup_true_lang.cjs +1 -0
  36. package/dist/components/st-dialog/st-dialog.vue_vue_type_script_setup_true_lang.js +175 -0
  37. package/dist/components/st-dialog/types.d.ts +29 -0
  38. package/dist/components/st-dialog.cjs +1 -0
  39. package/dist/components/st-dialog.js +6 -0
  40. package/dist/components/st-input/index.d.ts +315 -0
  41. package/dist/components/st-input/st-input.vue.cjs +1 -0
  42. package/dist/components/st-input/st-input.vue.d.ts +48 -0
  43. package/dist/components/st-input/st-input.vue.js +7 -0
  44. package/dist/components/st-input/st-input.vue_vue_type_script_setup_true_lang.cjs +1 -0
  45. package/dist/components/st-input/st-input.vue_vue_type_script_setup_true_lang.js +146 -0
  46. package/dist/components/st-input/types.d.ts +68 -0
  47. package/dist/components/st-input.cjs +1 -0
  48. package/dist/components/st-input.js +6 -0
  49. package/dist/components/st-menu/index.d.ts +217 -0
  50. package/dist/components/st-menu/st-menu-node.vue.cjs +1 -0
  51. package/dist/components/st-menu/st-menu-node.vue.d.ts +14 -0
  52. package/dist/components/st-menu/st-menu-node.vue.js +5 -0
  53. package/dist/components/st-menu/st-menu-node.vue_vue_type_script_setup_true_lang.cjs +1 -0
  54. package/dist/components/st-menu/st-menu-node.vue_vue_type_script_setup_true_lang.js +107 -0
  55. package/dist/components/st-menu/st-menu.vue.cjs +1 -0
  56. package/dist/components/st-menu/st-menu.vue.d.ts +26 -0
  57. package/dist/components/st-menu/st-menu.vue.js +5 -0
  58. package/dist/components/st-menu/st-menu.vue_vue_type_script_setup_true_lang.cjs +1 -0
  59. package/dist/components/st-menu/st-menu.vue_vue_type_script_setup_true_lang.js +86 -0
  60. package/dist/components/st-menu/types.d.ts +82 -0
  61. package/dist/components/st-menu.cjs +1 -0
  62. package/dist/components/st-menu.js +7 -0
  63. package/dist/components/st-popover/index.d.ts +243 -0
  64. package/dist/components/st-popover/st-popover.vue.cjs +1 -0
  65. package/dist/components/st-popover/st-popover.vue.d.ts +37 -0
  66. package/dist/components/st-popover/st-popover.vue.js +5 -0
  67. package/dist/components/st-popover/st-popover.vue_vue_type_script_setup_true_lang.cjs +1 -0
  68. package/dist/components/st-popover/st-popover.vue_vue_type_script_setup_true_lang.js +355 -0
  69. package/dist/components/st-popover/types.d.ts +103 -0
  70. package/dist/components/st-popover.cjs +1 -0
  71. package/dist/components/st-popover.js +6 -0
  72. package/dist/components/st-radio/index.d.ts +135 -0
  73. package/dist/components/st-radio/st-radio.vue.cjs +1 -0
  74. package/dist/components/st-radio/st-radio.vue.d.ts +28 -0
  75. package/dist/components/st-radio/st-radio.vue.js +5 -0
  76. package/dist/components/st-radio/st-radio.vue_vue_type_script_setup_true_lang.cjs +1 -0
  77. package/dist/components/st-radio/st-radio.vue_vue_type_script_setup_true_lang.js +88 -0
  78. package/dist/components/st-radio/types.d.ts +15 -0
  79. package/dist/components/st-radio-group/index.d.ts +180 -0
  80. package/dist/components/st-radio-group/st-radio-group.vue.cjs +1 -0
  81. package/dist/components/st-radio-group/st-radio-group.vue.d.ts +35 -0
  82. package/dist/components/st-radio-group/st-radio-group.vue.js +5 -0
  83. package/dist/components/st-radio-group/st-radio-group.vue_vue_type_script_setup_true_lang.cjs +1 -0
  84. package/dist/components/st-radio-group/st-radio-group.vue_vue_type_script_setup_true_lang.js +66 -0
  85. package/dist/components/st-radio-group/types.d.ts +43 -0
  86. package/dist/components/st-radio-group.cjs +1 -0
  87. package/dist/components/st-radio-group.js +6 -0
  88. package/dist/components/st-radio.cjs +1 -0
  89. package/dist/components/st-radio.js +6 -0
  90. package/dist/components/st-select/index.d.ts +306 -0
  91. package/dist/components/st-select/st-select.vue.cjs +1 -0
  92. package/dist/components/st-select/st-select.vue.d.ts +47 -0
  93. package/dist/components/st-select/st-select.vue.js +5 -0
  94. package/dist/components/st-select/st-select.vue_vue_type_script_setup_true_lang.cjs +1 -0
  95. package/dist/components/st-select/st-select.vue_vue_type_script_setup_true_lang.js +200 -0
  96. package/dist/components/st-select/types.d.ts +85 -0
  97. package/dist/components/st-select.cjs +1 -0
  98. package/dist/components/st-select.js +6 -0
  99. package/dist/components/st-sidebar/index.d.ts +63 -0
  100. package/dist/components/st-sidebar/st-sidebar.vue.cjs +1 -0
  101. package/dist/components/st-sidebar/st-sidebar.vue.d.ts +11 -0
  102. package/dist/components/st-sidebar/st-sidebar.vue.js +5 -0
  103. package/dist/components/st-sidebar/st-sidebar.vue_vue_type_script_setup_true_lang.cjs +1 -0
  104. package/dist/components/st-sidebar/st-sidebar.vue_vue_type_script_setup_true_lang.js +108 -0
  105. package/dist/components/st-sidebar/types.d.ts +56 -0
  106. package/dist/components/st-sidebar-item/index.d.ts +63 -0
  107. package/dist/components/st-sidebar-item/st-sidebar-item.vue.cjs +1 -0
  108. package/dist/components/st-sidebar-item/st-sidebar-item.vue.d.ts +11 -0
  109. package/dist/components/st-sidebar-item/st-sidebar-item.vue.js +5 -0
  110. package/dist/components/st-sidebar-item/st-sidebar-item.vue_vue_type_script_setup_true_lang.cjs +1 -0
  111. package/dist/components/st-sidebar-item/st-sidebar-item.vue_vue_type_script_setup_true_lang.js +38 -0
  112. package/dist/components/st-sidebar-item/types.d.ts +19 -0
  113. package/dist/components/st-sidebar-item.cjs +1 -0
  114. package/dist/components/st-sidebar-item.js +6 -0
  115. package/dist/components/st-sidebar.cjs +1 -0
  116. package/dist/components/st-sidebar.js +6 -0
  117. package/dist/components/st-splitter/index.d.ts +88 -0
  118. package/dist/components/st-splitter/st-splitter.vue.cjs +1 -0
  119. package/dist/components/st-splitter/st-splitter.vue.d.ts +16 -0
  120. package/dist/components/st-splitter/st-splitter.vue.js +5 -0
  121. package/dist/components/st-splitter/st-splitter.vue_vue_type_script_setup_true_lang.cjs +1 -0
  122. package/dist/components/st-splitter/st-splitter.vue_vue_type_script_setup_true_lang.js +29 -0
  123. package/dist/components/st-splitter/types.d.ts +192 -0
  124. package/dist/components/st-splitter/useSplitter.cjs +1 -0
  125. package/dist/components/st-splitter/useSplitter.d.ts +24 -0
  126. package/dist/components/st-splitter/useSplitter.js +129 -0
  127. package/dist/components/st-splitter-panel/index.d.ts +180 -0
  128. package/dist/components/st-splitter-panel/st-splitter-panel.vue.cjs +1 -0
  129. package/dist/components/st-splitter-panel/st-splitter-panel.vue.d.ts +33 -0
  130. package/dist/components/st-splitter-panel/st-splitter-panel.vue.js +5 -0
  131. package/dist/components/st-splitter-panel/st-splitter-panel.vue_vue_type_script_setup_true_lang.cjs +1 -0
  132. package/dist/components/st-splitter-panel/st-splitter-panel.vue_vue_type_script_setup_true_lang.js +164 -0
  133. package/dist/components/st-splitter-panel/types.d.ts +27 -0
  134. package/dist/components/st-splitter-panel.cjs +1 -0
  135. package/dist/components/st-splitter-panel.js +6 -0
  136. package/dist/components/st-splitter.cjs +1 -0
  137. package/dist/components/st-splitter.js +7 -0
  138. package/dist/components/st-toggle/index.d.ts +159 -0
  139. package/dist/components/st-toggle/st-toggle.vue.cjs +1 -0
  140. package/dist/components/st-toggle/st-toggle.vue.d.ts +25 -0
  141. package/dist/components/st-toggle/st-toggle.vue.js +5 -0
  142. package/dist/components/st-toggle/st-toggle.vue_vue_type_script_setup_true_lang.cjs +1 -0
  143. package/dist/components/st-toggle/st-toggle.vue_vue_type_script_setup_true_lang.js +62 -0
  144. package/dist/components/st-toggle/types.d.ts +38 -0
  145. package/dist/components/st-toggle.cjs +1 -0
  146. package/dist/components/st-toggle.js +6 -0
  147. package/dist/components/st-tooltip/index.d.ts +183 -0
  148. package/dist/components/st-tooltip/st-tooltip.vue.cjs +1 -0
  149. package/dist/components/st-tooltip/st-tooltip.vue.d.ts +29 -0
  150. package/dist/components/st-tooltip/st-tooltip.vue.js +5 -0
  151. package/dist/components/st-tooltip/st-tooltip.vue_vue_type_script_setup_true_lang.cjs +1 -0
  152. package/dist/components/st-tooltip/st-tooltip.vue_vue_type_script_setup_true_lang.js +71 -0
  153. package/dist/components/st-tooltip/types.d.ts +79 -0
  154. package/dist/components/st-tooltip.cjs +1 -0
  155. package/dist/components/st-tooltip.js +6 -0
  156. package/dist/components/st-tree/index.d.ts +114 -0
  157. package/dist/components/st-tree/st-tree-node.vue.cjs +1 -0
  158. package/dist/components/st-tree/st-tree-node.vue.d.ts +4 -0
  159. package/dist/components/st-tree/st-tree-node.vue.js +5 -0
  160. package/dist/components/st-tree/st-tree-node.vue_vue_type_script_setup_true_lang.cjs +1 -0
  161. package/dist/components/st-tree/st-tree-node.vue_vue_type_script_setup_true_lang.js +87 -0
  162. package/dist/components/st-tree/st-tree.vue.cjs +1 -0
  163. package/dist/components/st-tree/st-tree.vue.d.ts +50 -0
  164. package/dist/components/st-tree/st-tree.vue.js +5 -0
  165. package/dist/components/st-tree/st-tree.vue_vue_type_script_setup_true_lang.cjs +1 -0
  166. package/dist/components/st-tree/st-tree.vue_vue_type_script_setup_true_lang.js +59 -0
  167. package/dist/components/st-tree/types.d.ts +87 -0
  168. package/dist/components/st-tree.cjs +1 -0
  169. package/dist/components/st-tree.js +6 -0
  170. package/dist/components/types.d.ts +41 -0
  171. package/dist/index.cjs +1 -0
  172. package/dist/index.css +2 -0
  173. package/dist/index.d.ts +3005 -0
  174. package/dist/index.js +47 -0
  175. package/dist/utils/cn.cjs +1 -0
  176. package/dist/utils/cn.d.ts +11 -0
  177. package/dist/utils/cn.js +8 -0
  178. package/dist/utils/cva/index.cjs +1 -0
  179. package/dist/utils/cva/index.d.ts +9 -0
  180. package/dist/utils/cva/index.js +25 -0
  181. package/dist/utils/cva/types.d.ts +45 -0
  182. package/dist/utils/directive/index.cjs +1 -0
  183. package/dist/utils/directive/index.d.ts +4 -0
  184. package/dist/utils/directive/index.js +10 -0
  185. package/dist/utils/directive/intersection.cjs +1 -0
  186. package/dist/utils/directive/intersection.d.ts +6 -0
  187. package/dist/utils/directive/intersection.js +20 -0
  188. package/dist/utils/directive/interval.cjs +1 -0
  189. package/dist/utils/directive/interval.d.ts +6 -0
  190. package/dist/utils/directive/interval.js +14 -0
  191. package/dist/utils/directive/move.cjs +1 -0
  192. package/dist/utils/directive/move.d.ts +6 -0
  193. package/dist/utils/directive/move.js +42 -0
  194. package/dist/utils/directive/resize.cjs +1 -0
  195. package/dist/utils/directive/resize.d.ts +6 -0
  196. package/dist/utils/directive/resize.js +17 -0
  197. package/dist/utils/with-install.cjs +1 -0
  198. package/dist/utils/with-install.d.ts +4 -0
  199. package/dist/utils/with-install.js +10 -0
  200. package/package.json +87 -0
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # straw-ui
2
+
3
+ This template should help get you started developing with Vue 3 in Vite.
4
+
5
+ ## Recommended IDE Setup
6
+
7
+ [VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
8
+
9
+ ## Recommended Browser Setup
10
+
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/)
17
+
18
+ ## Type Support for `.vue` Imports in TS
19
+
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.
21
+
22
+ ## Customize configuration
23
+
24
+ See [Vite Configuration Reference](https://vite.dev/config/).
25
+
26
+ ## Project Setup
27
+
28
+ ```sh
29
+ bun install
30
+ ```
31
+
32
+ ### Compile and Hot-Reload for Development
33
+
34
+ ```sh
35
+ bun dev
36
+ ```
37
+
38
+ ### Type-Check, Compile and Minify for Production
39
+
40
+ ```sh
41
+ bun run build
42
+ ```
@@ -0,0 +1 @@
1
+ var e=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};exports.default=e;
@@ -0,0 +1,8 @@
1
+ //#region \0plugin-vue:export-helper
2
+ var e = (e, t) => {
3
+ let n = e.__vccOpts || e;
4
+ for (let [e, r] of t) n[e] = r;
5
+ return n;
6
+ };
7
+ //#endregion
8
+ export { e as default };
@@ -0,0 +1,162 @@
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<{
112
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").ButtonProps> & Readonly<{
113
+ onClick?: (event: MouseEvent) => any;
114
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
115
+ click: (event: MouseEvent) => any;
116
+ }, import("vue").PublicProps, {
117
+ variant: import("./types.d.ts").ButtonVariant;
118
+ type: import("./types.d.ts").ButtonType;
119
+ disabled: boolean;
120
+ loading: boolean;
121
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
122
+ P: {};
123
+ B: {};
124
+ D: {};
125
+ C: {};
126
+ M: {};
127
+ Defaults: {};
128
+ }, Readonly<import("./types.d.ts").ButtonProps> & Readonly<{
129
+ onClick?: (event: MouseEvent) => any;
130
+ }>, {}, {}, {}, {}, {
131
+ variant: import("./types.d.ts").ButtonVariant;
132
+ type: import("./types.d.ts").ButtonType;
133
+ disabled: boolean;
134
+ loading: boolean;
135
+ }>;
136
+ __isFragment?: never;
137
+ __isTeleport?: never;
138
+ __isSuspense?: never;
139
+ } & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").ButtonProps> & Readonly<{
140
+ onClick?: (event: MouseEvent) => any;
141
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
142
+ click: (event: MouseEvent) => any;
143
+ }, string, {
144
+ variant: import("./types.d.ts").ButtonVariant;
145
+ type: import("./types.d.ts").ButtonType;
146
+ disabled: boolean;
147
+ loading: boolean;
148
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
149
+ $slots: {
150
+ default?: (props: {}) => any;
151
+ } & {
152
+ prefixIcon?: (props: {}) => any;
153
+ } & {
154
+ default?: (props: {}) => any;
155
+ } & {
156
+ suffixIcon?: (props: {}) => any;
157
+ };
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)));
161
+ export default StButton;
162
+ export type * from './types.d.ts';
@@ -0,0 +1 @@
1
+ var e=require("./st-button.vue_vue_type_script_setup_true_lang.cjs").default;exports.default=e;
@@ -0,0 +1,29 @@
1
+ import type { ButtonProps, ButtonType, ButtonVariant } from './types.d.ts';
2
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_1) => any;
5
+ } & {
6
+ prefixIcon?: (props: typeof __VLS_3) => any;
7
+ } & {
8
+ default?: (props: typeof __VLS_5) => any;
9
+ } & {
10
+ suffixIcon?: (props: typeof __VLS_7) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ click: (event: MouseEvent) => any;
14
+ }, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{
15
+ onClick?: (event: MouseEvent) => any;
16
+ }>, {
17
+ variant: ButtonVariant;
18
+ type: ButtonType;
19
+ disabled: boolean;
20
+ loading: boolean;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
22
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -0,0 +1,5 @@
1
+ import e from "./st-button.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/st-button/st-button.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1 @@
1
+ const e=require("../../utils/cn.cjs"),t=require("../../utils/cva/index.cjs");let n=require("vue");var r=[`disabled`],i={key:0,class:`i-ri-loader-4-line animate-spin`},a=(0,n.defineComponent)({inheritAttrs:!1,__name:`st-button`,props:{variant:{default:`default`},type:{default:`default`},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},prefixIcon:{},suffixIcon:{}},emits:[`click`],setup(a,{emit:o}){let s={default:`h-9 px-4 text-3.5 gap-1.5`,icon:`w-9 h-9`},c={primary:`bg-primary text-primary-foreground`,default:`bg-secondary text-secondary-foreground`,ghost:`bg-transparent text-foreground`},l={primary:`hover:bg-primary/90`,default:`hover:bg-secondary/80`,ghost:`hover:bg-secondary/80`},u=a,d=(0,n.useAttrs)(),f=o,p=(0,n.useSlots)(),m=t.cva({base:`inline-flex items-center justify-center rounded-radius font-default transition-all duration-150 ease-in-out border-none outline-none select-none`,variants:{variant:{primary:c.primary,default:c.default,ghost:c.ghost},type:{default:s.default,icon:s.icon},disabled:{true:`opacity-50 cursor-not-allowed`},loading:{true:`cursor-not-allowed`}},defaultVariants:{variant:`default`,type:`default`}}),h=(0,n.computed)(()=>e.cn(m({variant:u.variant,type:u.type,disabled:u.disabled,loading:u.loading}),!u.disabled&&!u.loading?l[u.variant]:``,d.class)),g=(0,n.computed)(()=>u.type===`icon`),_=(0,n.computed)(()=>u.disabled||u.loading),v=(0,n.computed)(()=>u.prefixIcon||p.prefixIcon),y=(0,n.computed)(()=>u.suffixIcon||p.suffixIcon),b=e=>`i-ri-${e}`,x=e=>{_.value||f(`click`,e)};return(e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)(`button`,{class:(0,n.normalizeClass)(h.value),style:(0,n.normalizeStyle)((0,n.unref)(d).style),disabled:_.value,onClick:x},[u.loading?((0,n.openBlock)(),(0,n.createElementBlock)(`i`,i)):(0,n.createCommentVNode)(``,!0),g.value?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[u.prefixIcon?((0,n.openBlock)(),(0,n.createElementBlock)(`i`,{key:0,class:(0,n.normalizeClass)(b(u.prefixIcon))},null,2)):(0,n.renderSlot)(e.$slots,`default`,{key:1})],64)):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:2},[v.value?(0,n.renderSlot)(e.$slots,`prefixIcon`,{key:0},()=>[(0,n.createElementVNode)(`i`,{class:(0,n.normalizeClass)(b(u.prefixIcon))},null,2)]):(0,n.createCommentVNode)(``,!0),(0,n.renderSlot)(e.$slots,`default`),y.value?(0,n.renderSlot)(e.$slots,`suffixIcon`,{key:1},()=>[(0,n.createElementVNode)(`i`,{class:(0,n.normalizeClass)(b(u.suffixIcon))},null,2)]):(0,n.createCommentVNode)(``,!0)],64))],14,r))}});exports.default=a;
@@ -0,0 +1,81 @@
1
+ import { cn as e } from "../../utils/cn.js";
2
+ import { cva as t } from "../../utils/cva/index.js";
3
+ import { Fragment as n, computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, normalizeClass as c, normalizeStyle as l, openBlock as u, renderSlot as d, unref as f, useAttrs as p, useSlots as m } from "vue";
4
+ //#region src/components/st-button/st-button.vue?vue&type=script&setup=true&lang.ts
5
+ var h = ["disabled"], g = {
6
+ key: 0,
7
+ class: "i-ri-loader-4-line animate-spin"
8
+ }, _ = /*@__PURE__*/ s({
9
+ inheritAttrs: !1,
10
+ __name: "st-button",
11
+ props: {
12
+ variant: { default: "default" },
13
+ type: { default: "default" },
14
+ disabled: {
15
+ type: Boolean,
16
+ default: !1
17
+ },
18
+ loading: {
19
+ type: Boolean,
20
+ default: !1
21
+ },
22
+ prefixIcon: {},
23
+ suffixIcon: {}
24
+ },
25
+ emits: ["click"],
26
+ setup(s, { emit: _ }) {
27
+ let v = {
28
+ default: "h-9 px-4 text-3.5 gap-1.5",
29
+ icon: "w-9 h-9"
30
+ }, y = {
31
+ primary: "bg-primary text-primary-foreground",
32
+ default: "bg-secondary text-secondary-foreground",
33
+ ghost: "bg-transparent text-foreground"
34
+ }, b = {
35
+ primary: "hover:bg-primary/90",
36
+ default: "hover:bg-secondary/80",
37
+ ghost: "hover:bg-secondary/80"
38
+ }, x = s, S = p(), C = _, w = m(), T = t({
39
+ base: "inline-flex items-center justify-center rounded-radius font-default transition-all duration-150 ease-in-out border-none outline-none select-none",
40
+ variants: {
41
+ variant: {
42
+ primary: y.primary,
43
+ default: y.default,
44
+ ghost: y.ghost
45
+ },
46
+ type: {
47
+ default: v.default,
48
+ icon: v.icon
49
+ },
50
+ disabled: { true: "opacity-50 cursor-not-allowed" },
51
+ loading: { true: "cursor-not-allowed" }
52
+ },
53
+ defaultVariants: {
54
+ variant: "default",
55
+ type: "default"
56
+ }
57
+ }), E = r(() => e(T({
58
+ variant: x.variant,
59
+ type: x.type,
60
+ disabled: x.disabled,
61
+ loading: x.loading
62
+ }), !x.disabled && !x.loading ? b[x.variant] : "", S.class)), D = r(() => x.type === "icon"), O = r(() => x.disabled || x.loading), k = r(() => x.prefixIcon || w.prefixIcon), A = r(() => x.suffixIcon || w.suffixIcon), j = (e) => `i-ri-${e}`, M = (e) => {
63
+ O.value || C("click", e);
64
+ };
65
+ return (e, t) => (u(), a("button", {
66
+ class: c(E.value),
67
+ style: l(f(S).style),
68
+ disabled: O.value,
69
+ onClick: M
70
+ }, [x.loading ? (u(), a("i", g)) : i("", !0), D.value ? (u(), a(n, { key: 1 }, [x.prefixIcon ? (u(), a("i", {
71
+ key: 0,
72
+ class: c(j(x.prefixIcon))
73
+ }, null, 2)) : d(e.$slots, "default", { key: 1 })], 64)) : (u(), a(n, { key: 2 }, [
74
+ k.value ? d(e.$slots, "prefixIcon", { key: 0 }, () => [o("i", { class: c(j(x.prefixIcon)) }, null, 2)]) : i("", !0),
75
+ d(e.$slots, "default"),
76
+ A.value ? d(e.$slots, "suffixIcon", { key: 1 }, () => [o("i", { class: c(j(x.suffixIcon)) }, null, 2)]) : i("", !0)
77
+ ], 64))], 14, h));
78
+ }
79
+ });
80
+ //#endregion
81
+ export { _ as default };
@@ -0,0 +1,49 @@
1
+ /**
2
+ * 按钮变体类型
3
+ */
4
+ export type ButtonVariant = 'primary' | 'default' | 'ghost';
5
+
6
+ /**
7
+ * 按钮类型
8
+ */
9
+ export type ButtonType = 'default' | 'icon';
10
+
11
+ /**
12
+ * 按钮组件属性
13
+ */
14
+ export interface ButtonProps {
15
+ /** 按钮变体类型 */
16
+ variant?: ButtonVariant;
17
+ /** 按钮类型 */
18
+ type?: ButtonType;
19
+ /** 是否禁用 */
20
+ disabled?: boolean;
21
+ /** 是否显示加载状态 */
22
+ loading?: boolean;
23
+ /** 前缀图标名称(Remix Icon,不含 i-ri- 前缀) */
24
+ prefixIcon?: string;
25
+ /** 后缀图标名称(Remix Icon,不含 i-ri- 前缀) */
26
+ suffixIcon?: string;
27
+ }
28
+
29
+ /**
30
+ * 按钮组件插槽类型
31
+ */
32
+ export interface ButtonSlots {
33
+ /** 默认插槽 */
34
+ default?: () => unknown;
35
+ /** 前缀图标插槽 */
36
+ prefixIcon?: () => unknown;
37
+ /** 后缀图标插槽 */
38
+ suffixIcon?: () => unknown;
39
+ }
40
+
41
+ /**
42
+ * 按钮组件事件类型
43
+ */
44
+ export interface ButtonEmits {
45
+ /** 点击事件 */
46
+ click: [event: MouseEvent];
47
+ }
48
+
49
+ export {};
@@ -0,0 +1 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../utils/with-install.cjs"),t=require("./st-button/st-button.vue.cjs");var n=e.withInstall(t.default);exports.StButton=n,exports.default=n;
@@ -0,0 +1,6 @@
1
+ import { withInstall as e } from "../utils/with-install.js";
2
+ import t from "./st-button/st-button.vue.js";
3
+ //#region src/components/st-button/index.ts
4
+ var n = e(t);
5
+ //#endregion
6
+ export { n as StButton, n as default };
@@ -0,0 +1,153 @@
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<{
106
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").CheckboxProps & {
107
+ modelValue?: boolean | string | number;
108
+ }> & Readonly<{
109
+ "onUpdate:modelValue"?: (value: string | number | boolean) => any;
110
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
111
+ "update:modelValue": (value: string | number | boolean) => any;
112
+ }, import("vue").PublicProps, {
113
+ disabled: boolean;
114
+ trueValue: boolean | string | number;
115
+ falseValue: boolean | string | number;
116
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
117
+ P: {};
118
+ B: {};
119
+ D: {};
120
+ C: {};
121
+ M: {};
122
+ Defaults: {};
123
+ }, Readonly<import("./types.d.ts").CheckboxProps & {
124
+ modelValue?: boolean | string | number;
125
+ }> & Readonly<{
126
+ "onUpdate:modelValue"?: (value: string | number | boolean) => any;
127
+ }>, {}, {}, {}, {}, {
128
+ disabled: boolean;
129
+ trueValue: boolean | string | number;
130
+ falseValue: boolean | string | number;
131
+ }>;
132
+ __isFragment?: never;
133
+ __isTeleport?: never;
134
+ __isSuspense?: never;
135
+ } & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").CheckboxProps & {
136
+ modelValue?: boolean | string | number;
137
+ }> & Readonly<{
138
+ "onUpdate:modelValue"?: (value: string | number | boolean) => any;
139
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
140
+ "update:modelValue": (value: string | number | boolean) => any;
141
+ }, string, {
142
+ disabled: boolean;
143
+ trueValue: boolean | string | number;
144
+ falseValue: boolean | string | number;
145
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
146
+ $slots: {
147
+ default?: (props: {}) => any;
148
+ };
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)));
152
+ export default StCheckbox;
153
+ export type * from './types.d.ts';
@@ -0,0 +1 @@
1
+ var e=require("./st-checkbox.vue_vue_type_script_setup_true_lang.cjs").default;exports.default=e;
@@ -0,0 +1,27 @@
1
+ import type { CheckboxProps } from './types.d.ts';
2
+ type __VLS_Props = CheckboxProps;
3
+ type __VLS_ModelProps = {
4
+ modelValue?: boolean | string | number;
5
+ };
6
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
7
+ declare var __VLS_1: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_1) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ "update:modelValue": (value: string | number | boolean) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
14
+ "onUpdate:modelValue"?: (value: string | number | boolean) => any;
15
+ }>, {
16
+ disabled: boolean;
17
+ trueValue: boolean | string | number;
18
+ falseValue: boolean | string | number;
19
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
20
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
23
+ type __VLS_WithSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -0,0 +1,5 @@
1
+ import e from "./st-checkbox.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/st-checkbox/st-checkbox.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1 @@
1
+ const e=require("../../utils/cn.cjs"),t=require("../../utils/cva/index.cjs");let n=require("vue");var r=[`checked`,`disabled`],i=(0,n.defineComponent)({inheritAttrs:!1,__name:`st-checkbox`,props:(0,n.mergeModels)({disabled:{type:Boolean,default:!1},trueValue:{type:[Boolean,String,Number],default:!0},falseValue:{type:[Boolean,String,Number],default:!1}},{modelValue:{type:[Boolean,String,Number],default:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(i){let a=i,o=(0,n.useModel)(i,`modelValue`),s=(0,n.useSlots)(),c=(0,n.useAttrs)(),l=(0,n.inject)(`checkboxGroup`,null),u=(0,n.computed)(()=>!!s.default),d=(0,n.computed)(()=>l&&l.disabled.value||a.disabled),f=(0,n.computed)(()=>l?l.modelValue.value.includes(a.trueValue):o.value===a.trueValue),p=t.cva({base:`inline-flex items-center cursor-pointer select-none gap-2`,variants:{disabled:{true:`cursor-not-allowed opacity-50`,false:``}}}),m=(0,n.computed)(()=>e.cn(p({disabled:d.value}),c.class)),h=(0,n.computed)(()=>e.cn(`sr-only`)),g=t.cva({base:`flex items-center justify-center border-2 rounded-radius transition-all duration-200 w-5 h-5`,variants:{checked:{true:`bg-primary border-primary`,false:`bg-background border-input hover:border-ring`},disabled:{true:`cursor-not-allowed`,false:`cursor-pointer`}}}),_=(0,n.computed)(()=>g({checked:f.value,disabled:d.value})),v=(0,n.computed)(()=>e.cn(`text-primary-foreground w-2.5 h-2.5`)),y=(0,n.computed)(()=>e.cn(`w-full h-full`)),b=t.cva({base:`text-foreground text-sm`,variants:{disabled:{true:`text-muted-foreground`,false:``}}}),x=(0,n.computed)(()=>b({disabled:d.value})),S=e=>{d.value&&e.preventDefault()},C=()=>{d.value||(l?l.updateValue(a.trueValue,!f.value):o.value=f.value?a.falseValue:a.trueValue)};return(e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)(`label`,{class:(0,n.normalizeClass)(m.value),style:(0,n.normalizeStyle)((0,n.unref)(c).style),onClick:S},[(0,n.createElementVNode)(`input`,{checked:f.value,class:(0,n.normalizeClass)(h.value),disabled:d.value,type:`checkbox`,onChange:C},null,42,r),(0,n.createElementVNode)(`span`,{class:(0,n.normalizeClass)(_.value)},[f.value?((0,n.openBlock)(),(0,n.createElementBlock)(`span`,{key:0,class:(0,n.normalizeClass)(v.value)},[((0,n.openBlock)(),(0,n.createElementBlock)(`svg`,{class:(0,n.normalizeClass)(y.value),fill:`none`,viewBox:`0 0 12 12`,xmlns:`http://www.w3.org/2000/svg`},[...t[0]||=[(0,n.createElementVNode)(`path`,{d:`M2 6L5 9L10 3`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},null,-1)]],2))],2)):(0,n.createCommentVNode)(``,!0)],2),u.value?((0,n.openBlock)(),(0,n.createElementBlock)(`span`,{key:0,class:(0,n.normalizeClass)(x.value)},[(0,n.renderSlot)(e.$slots,`default`)],2)):(0,n.createCommentVNode)(``,!0)],6))}});exports.default=i;