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
@@ -0,0 +1,180 @@
1
+ export declare const StSplitterPanel: {
2
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
3
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").SplitterPanelProps & {
4
+ size?: number;
5
+ }> & Readonly<{
6
+ "onUpdate:size"?: (value: number) => any;
7
+ }>, {
8
+ panelId: import("vue").Ref<string, string>;
9
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ "update:size": (value: number) => any;
11
+ }, import("vue").PublicProps, {
12
+ flex: boolean;
13
+ visible: boolean;
14
+ minSize: number;
15
+ maxSize: number;
16
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
17
+ P: {};
18
+ B: {};
19
+ D: {};
20
+ C: {};
21
+ M: {};
22
+ Defaults: {};
23
+ }, Readonly<import("./types.d.ts").SplitterPanelProps & {
24
+ size?: number;
25
+ }> & Readonly<{
26
+ "onUpdate:size"?: (value: number) => any;
27
+ }>, {
28
+ panelId: import("vue").Ref<string, string>;
29
+ }, {}, {}, {}, {
30
+ flex: boolean;
31
+ visible: boolean;
32
+ minSize: number;
33
+ maxSize: number;
34
+ }>;
35
+ __isFragment?: never;
36
+ __isTeleport?: never;
37
+ __isSuspense?: never;
38
+ } & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").SplitterPanelProps & {
39
+ size?: number;
40
+ }> & Readonly<{
41
+ "onUpdate:size"?: (value: number) => any;
42
+ }>, {
43
+ panelId: import("vue").Ref<string, string>;
44
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
45
+ "update:size": (value: number) => any;
46
+ }, string, {
47
+ flex: boolean;
48
+ visible: boolean;
49
+ minSize: number;
50
+ maxSize: number;
51
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
52
+ $slots: {
53
+ default?: (props: {}) => any;
54
+ };
55
+ })>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
56
+ [x: string]: any;
57
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
58
+ P: {};
59
+ B: {};
60
+ D: {};
61
+ C: {};
62
+ M: {};
63
+ Defaults: {};
64
+ }, Readonly<import("vue").ExtractPropTypes<{
65
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").SplitterPanelProps & {
66
+ size?: number;
67
+ }> & Readonly<{
68
+ "onUpdate:size"?: (value: number) => any;
69
+ }>, {
70
+ panelId: import("vue").Ref<string, string>;
71
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
72
+ "update:size": (value: number) => any;
73
+ }, import("vue").PublicProps, {
74
+ flex: boolean;
75
+ visible: boolean;
76
+ minSize: number;
77
+ maxSize: number;
78
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
79
+ P: {};
80
+ B: {};
81
+ D: {};
82
+ C: {};
83
+ M: {};
84
+ Defaults: {};
85
+ }, Readonly<import("./types.d.ts").SplitterPanelProps & {
86
+ size?: number;
87
+ }> & Readonly<{
88
+ "onUpdate:size"?: (value: number) => any;
89
+ }>, {
90
+ panelId: import("vue").Ref<string, string>;
91
+ }, {}, {}, {}, {
92
+ flex: boolean;
93
+ visible: boolean;
94
+ minSize: number;
95
+ maxSize: number;
96
+ }>;
97
+ __isFragment?: never;
98
+ __isTeleport?: never;
99
+ __isSuspense?: never;
100
+ } & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").SplitterPanelProps & {
101
+ size?: number;
102
+ }> & Readonly<{
103
+ "onUpdate:size"?: (value: number) => any;
104
+ }>, {
105
+ panelId: import("vue").Ref<string, string>;
106
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
107
+ "update:size": (value: number) => any;
108
+ }, string, {
109
+ flex: boolean;
110
+ visible: boolean;
111
+ minSize: number;
112
+ maxSize: number;
113
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
114
+ $slots: {
115
+ default?: (props: {}) => any;
116
+ };
117
+ })>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, {
118
+ [x: string]: any;
119
+ }>;
120
+ __isFragment?: never;
121
+ __isTeleport?: never;
122
+ __isSuspense?: never;
123
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
124
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").SplitterPanelProps & {
125
+ size?: number;
126
+ }> & Readonly<{
127
+ "onUpdate:size"?: (value: number) => any;
128
+ }>, {
129
+ panelId: import("vue").Ref<string, string>;
130
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
131
+ "update:size": (value: number) => any;
132
+ }, import("vue").PublicProps, {
133
+ flex: boolean;
134
+ visible: boolean;
135
+ minSize: number;
136
+ maxSize: number;
137
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
138
+ P: {};
139
+ B: {};
140
+ D: {};
141
+ C: {};
142
+ M: {};
143
+ Defaults: {};
144
+ }, Readonly<import("./types.d.ts").SplitterPanelProps & {
145
+ size?: number;
146
+ }> & Readonly<{
147
+ "onUpdate:size"?: (value: number) => any;
148
+ }>, {
149
+ panelId: import("vue").Ref<string, string>;
150
+ }, {}, {}, {}, {
151
+ flex: boolean;
152
+ visible: boolean;
153
+ minSize: number;
154
+ maxSize: number;
155
+ }>;
156
+ __isFragment?: never;
157
+ __isTeleport?: never;
158
+ __isSuspense?: never;
159
+ } & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").SplitterPanelProps & {
160
+ size?: number;
161
+ }> & Readonly<{
162
+ "onUpdate:size"?: (value: number) => any;
163
+ }>, {
164
+ panelId: import("vue").Ref<string, string>;
165
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
166
+ "update:size": (value: number) => any;
167
+ }, string, {
168
+ flex: boolean;
169
+ visible: boolean;
170
+ minSize: number;
171
+ maxSize: number;
172
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
173
+ $slots: {
174
+ default?: (props: {}) => any;
175
+ };
176
+ })>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
177
+ [x: string]: any;
178
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & (import("vue").VNodeProps & (import("vue").AllowedComponentProps & (import("vue").ComponentCustomProps & import("vue").Plugin)));
179
+ export default StSplitterPanel;
180
+ export type * from './types.d.ts';
@@ -0,0 +1 @@
1
+ var e=require("./st-splitter-panel.vue_vue_type_script_setup_true_lang.cjs").default;exports.default=e;
@@ -0,0 +1,33 @@
1
+ import type { SplitterPanelProps } from './types.d.ts';
2
+ type __VLS_Props = SplitterPanelProps;
3
+ type __VLS_ModelProps = {
4
+ /**
5
+ * 面板尺寸双向绑定
6
+ * */
7
+ 'size'?: number;
8
+ };
9
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
+ declare var __VLS_1: {};
11
+ type __VLS_Slots = {} & {
12
+ default?: (props: typeof __VLS_1) => any;
13
+ };
14
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
15
+ panelId: import("vue").Ref<string, string>;
16
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
+ "update:size": (value: number) => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
19
+ "onUpdate:size"?: (value: number) => any;
20
+ }>, {
21
+ flex: boolean;
22
+ visible: boolean;
23
+ minSize: number;
24
+ maxSize: number;
25
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
26
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
29
+ type __VLS_WithSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
@@ -0,0 +1,5 @@
1
+ import e from "./st-splitter-panel.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/st-splitter-panel/st-splitter-panel.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1 @@
1
+ let e=require("vue");var t=[`data-active`],n=(0,e.defineComponent)({name:`StSplitterPanel`,inheritAttrs:!1,__name:`st-splitter-panel`,props:(0,e.mergeModels)({minSize:{default:0},maxSize:{default:1/0},flex:{type:Boolean,default:!1},visible:{type:Boolean,default:!0}},{size:{default:200},sizeModifiers:{}}),emits:[`update:size`],setup(n,{expose:r}){let i=(0,e.useAttrs)();function a(){return`panel-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function o(e){return .5-Math.cos(e*Math.PI)/2}function s(e){let{startSize:t,targetSize:n,duration:r=300,onUpdate:i,onComplete:a}=e,s=Date.now(),c=()=>{let e=Date.now()-s,l=Math.min(e/r,1);if(l>=1){i(n),a?.();return}let u=o(l);i(t+(n-t)*u),requestAnimationFrame(c)};requestAnimationFrame(c)}let c=n,l=(0,e.useModel)(n,`size`),u=(0,e.ref)(a()),d=(0,e.ref)(!1),f=(0,e.inject)(`splitterContext`);if(!f)throw Error(`st-splitter-panel must be used inside st-splitter`);let p=(0,e.computed)(()=>f.panels.value.filter(e=>e.visible).findIndex(e=>e.id===u.value)),m=(0,e.computed)(()=>{let e=f.panels.value.find(e=>e.id===u.value);if(!e||!e.visible)return{display:`none`};let t=f.direction.value===`horizontal`?`width`:`height`,n=e.size,r={[t]:`${n}px`,flexShrink:0,flexGrow:0,overflow:`hidden`},a=i.style;return a?{...a,...r}:r}),h=(0,e.computed)(()=>{let e=f.panels.value.filter(e=>e.visible),t=e.findIndex(e=>e.id===u.value);return t>=0&&t<e.length-1}),g=(0,e.computed)(()=>f.activeGutter.value===p.value),_=(0,e.ref)(!1),v=(0,e.useTemplateRef)(`gutterContainerRef`),y=(0,e.computed)(()=>{if(!f.mousePosition.value||!v.value)return{};let e=v.value.getBoundingClientRect(),{x:t,y:n}=f.mousePosition.value;if(f.direction.value===`horizontal`){let t=n-(e.top+e.height/2),r=e.height/2-40/2;return{transform:`translateY(${Math.max(-r,Math.min(r,t))}px)`}}let r=t-(e.left+e.width/2),i=e.width/2-40/2;return{transform:`translateX(${Math.max(-i,Math.min(i,r))}px)`}}),b=(0,e.computed)(()=>({[f.direction.value===`horizontal`?`width`:`height`]:`1px`,flexShrink:0})),x=e=>{let t=p.value;t>=0&&f.startResize(t,e)},S=e=>{_.value=!0,f.isHoveringGutter.value=p.value,f.mousePosition.value={x:e.clientX,y:e.clientY}},C=e=>{f.mousePosition.value={x:e.clientX,y:e.clientY}},w=()=>{_.value=!1,f.isHoveringGutter.value=null,f.mousePosition.value=null};return(0,e.onMounted)(()=>{l.value<c.minSize&&(l.value=Math.max(200,c.minSize));let e={id:u.value,size:l.value,minSize:c.minSize,maxSize:c.maxSize,flex:c.flex,visible:c.visible};f.registerPanel(e)}),(0,e.onUnmounted)(()=>{f.unregisterPanel(u.value)}),(0,e.watch)(()=>l.value,e=>{let t=f.panels.value.find(e=>e.id===u.value);t&&t.visible&&(t.size=e,t.desiredSize=e)}),(0,e.watch)(()=>c.visible,(e,t)=>{if(e===t)return;let n=f.panels.value.find(e=>e.id===u.value);if(n)if(e)n.visible=!0,n.size=0,n.desiredSize=l.value||200,s({startSize:0,targetSize:l.value||200,onUpdate:e=>{n.size=e,f.updateFlexPanelSize()},onComplete:()=>{f.updateFlexPanelSize()}});else{d.value=!0;let e=n.size;s({startSize:e,targetSize:0,onUpdate:e=>{n.size=e,f.updateFlexPanelSize()},onComplete:()=>{n.visible=!1,d.value=!1,f.updateFlexPanelSize()}})}}),(0,e.watch)(()=>f.panels.value.find(e=>e.id===u.value)?.size,e=>{let t=f.panels.value.find(e=>e.id===u.value);e!==void 0&&e!==l.value&&t?.visible&&!d.value&&(l.value=e)}),r({panelId:u}),(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([(0,e.unref)(i).class,`relative flex flex-col h-full box-border overflow-hidden`]),style:(0,e.normalizeStyle)(m.value)},[(0,e.renderSlot)(n.$slots,`default`)],6),h.value?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,ref_key:`gutterContainerRef`,ref:v,class:(0,e.normalizeClass)([`flex items-center justify-center select-none box-border relative z-1`,`bg-border`,(0,e.unref)(f).direction.value===`horizontal`?`cursor-ew-resize`:`cursor-ns-resize`]),style:(0,e.normalizeStyle)(b.value),onMousedown:x,onMouseenter:S,onMousemove:C,onMouseleave:w},[(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`absolute`,(0,e.unref)(f).direction.value===`horizontal`?`w-2 h-full -translate-x-1/2 left-1/2`:`h-2 w-full -translate-y-1/2 top-1/2`])},null,2),(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`rounded-radius transition-[opacity,height,width] duration-200`,(0,e.unref)(f).direction.value===`horizontal`?`w-0.5 h-6 data-[active=true]:h-10`:`h-0.5 w-6 data-[active=true]:w-10`,g.value||_.value?`opacity-100 bg-primary`:`opacity-0 bg-border`]),"data-active":g.value,style:(0,e.normalizeStyle)(y.value)},null,14,t)],38)):(0,e.createCommentVNode)(``,!0)],64))}});exports.default=n;
@@ -0,0 +1,164 @@
1
+ import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, inject as o, mergeModels as s, normalizeClass as c, normalizeStyle as l, onMounted as u, onUnmounted as d, openBlock as f, ref as p, renderSlot as m, unref as h, useAttrs as g, useModel as _, useTemplateRef as v, watch as y } from "vue";
2
+ //#region src/components/st-splitter-panel/st-splitter-panel.vue?vue&type=script&setup=true&lang.ts
3
+ var b = ["data-active"], x = /*@__PURE__*/ a({
4
+ name: "StSplitterPanel",
5
+ inheritAttrs: !1,
6
+ __name: "st-splitter-panel",
7
+ props: /*@__PURE__*/ s({
8
+ minSize: { default: 0 },
9
+ maxSize: { default: Infinity },
10
+ flex: {
11
+ type: Boolean,
12
+ default: !1
13
+ },
14
+ visible: {
15
+ type: Boolean,
16
+ default: !0
17
+ }
18
+ }, {
19
+ size: { default: 200 },
20
+ sizeModifiers: {}
21
+ }),
22
+ emits: ["update:size"],
23
+ setup(a, { expose: s }) {
24
+ let x = g();
25
+ function S() {
26
+ return `panel-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
27
+ }
28
+ function C(e) {
29
+ return .5 - Math.cos(e * Math.PI) / 2;
30
+ }
31
+ function w(e) {
32
+ let { startSize: t, targetSize: n, duration: r = 300, onUpdate: i, onComplete: a } = e, o = Date.now(), s = () => {
33
+ let e = Date.now() - o, c = Math.min(e / r, 1);
34
+ if (c >= 1) {
35
+ i(n), a?.();
36
+ return;
37
+ }
38
+ let l = C(c);
39
+ i(t + (n - t) * l), requestAnimationFrame(s);
40
+ };
41
+ requestAnimationFrame(s);
42
+ }
43
+ let T = a, E = _(a, "size"), D = p(S()), O = p(!1), k = o("splitterContext");
44
+ if (!k) throw Error("st-splitter-panel must be used inside st-splitter");
45
+ let A = t(() => k.panels.value.filter((e) => e.visible).findIndex((e) => e.id === D.value)), j = t(() => {
46
+ let e = k.panels.value.find((e) => e.id === D.value);
47
+ if (!e || !e.visible) return { display: "none" };
48
+ let t = k.direction.value === "horizontal" ? "width" : "height", n = e.size, r = {
49
+ [t]: `${n}px`,
50
+ flexShrink: 0,
51
+ flexGrow: 0,
52
+ overflow: "hidden"
53
+ }, i = x.style;
54
+ return i ? {
55
+ ...i,
56
+ ...r
57
+ } : r;
58
+ }), M = t(() => {
59
+ let e = k.panels.value.filter((e) => e.visible), t = e.findIndex((e) => e.id === D.value);
60
+ return t >= 0 && t < e.length - 1;
61
+ }), N = t(() => k.activeGutter.value === A.value), P = p(!1), F = v("gutterContainerRef"), I = t(() => {
62
+ if (!k.mousePosition.value || !F.value) return {};
63
+ let e = F.value.getBoundingClientRect(), { x: t, y: n } = k.mousePosition.value;
64
+ if (k.direction.value === "horizontal") {
65
+ let t = n - (e.top + e.height / 2), r = e.height / 2 - 40 / 2;
66
+ return { transform: `translateY(${Math.max(-r, Math.min(r, t))}px)` };
67
+ }
68
+ let r = t - (e.left + e.width / 2), i = e.width / 2 - 40 / 2;
69
+ return { transform: `translateX(${Math.max(-i, Math.min(i, r))}px)` };
70
+ }), L = t(() => ({
71
+ [k.direction.value === "horizontal" ? "width" : "height"]: "1px",
72
+ flexShrink: 0
73
+ })), R = (e) => {
74
+ let t = A.value;
75
+ t >= 0 && k.startResize(t, e);
76
+ }, z = (e) => {
77
+ P.value = !0, k.isHoveringGutter.value = A.value, k.mousePosition.value = {
78
+ x: e.clientX,
79
+ y: e.clientY
80
+ };
81
+ }, B = (e) => {
82
+ k.mousePosition.value = {
83
+ x: e.clientX,
84
+ y: e.clientY
85
+ };
86
+ }, V = () => {
87
+ P.value = !1, k.isHoveringGutter.value = null, k.mousePosition.value = null;
88
+ };
89
+ return u(() => {
90
+ E.value < T.minSize && (E.value = Math.max(200, T.minSize));
91
+ let e = {
92
+ id: D.value,
93
+ size: E.value,
94
+ minSize: T.minSize,
95
+ maxSize: T.maxSize,
96
+ flex: T.flex,
97
+ visible: T.visible
98
+ };
99
+ k.registerPanel(e);
100
+ }), d(() => {
101
+ k.unregisterPanel(D.value);
102
+ }), y(() => E.value, (e) => {
103
+ let t = k.panels.value.find((e) => e.id === D.value);
104
+ t && t.visible && (t.size = e, t.desiredSize = e);
105
+ }), y(() => T.visible, (e, t) => {
106
+ if (e === t) return;
107
+ let n = k.panels.value.find((e) => e.id === D.value);
108
+ if (n) if (e) n.visible = !0, n.size = 0, n.desiredSize = E.value || 200, w({
109
+ startSize: 0,
110
+ targetSize: E.value || 200,
111
+ onUpdate: (e) => {
112
+ n.size = e, k.updateFlexPanelSize();
113
+ },
114
+ onComplete: () => {
115
+ k.updateFlexPanelSize();
116
+ }
117
+ });
118
+ else {
119
+ O.value = !0;
120
+ let e = n.size;
121
+ w({
122
+ startSize: e,
123
+ targetSize: 0,
124
+ onUpdate: (e) => {
125
+ n.size = e, k.updateFlexPanelSize();
126
+ },
127
+ onComplete: () => {
128
+ n.visible = !1, O.value = !1, k.updateFlexPanelSize();
129
+ }
130
+ });
131
+ }
132
+ }), y(() => k.panels.value.find((e) => e.id === D.value)?.size, (e) => {
133
+ let t = k.panels.value.find((e) => e.id === D.value);
134
+ e !== void 0 && e !== E.value && t?.visible && !O.value && (E.value = e);
135
+ }), s({ panelId: D }), (t, a) => (f(), r(e, null, [i("div", {
136
+ class: c([h(x).class, "relative flex flex-col h-full box-border overflow-hidden"]),
137
+ style: l(j.value)
138
+ }, [m(t.$slots, "default")], 6), M.value ? (f(), r("div", {
139
+ key: 0,
140
+ ref_key: "gutterContainerRef",
141
+ ref: F,
142
+ class: c([
143
+ "flex items-center justify-center select-none box-border relative z-1",
144
+ "bg-border",
145
+ h(k).direction.value === "horizontal" ? "cursor-ew-resize" : "cursor-ns-resize"
146
+ ]),
147
+ style: l(L.value),
148
+ onMousedown: R,
149
+ onMouseenter: z,
150
+ onMousemove: B,
151
+ onMouseleave: V
152
+ }, [i("div", { class: c(["absolute", h(k).direction.value === "horizontal" ? "w-2 h-full -translate-x-1/2 left-1/2" : "h-2 w-full -translate-y-1/2 top-1/2"]) }, null, 2), i("div", {
153
+ class: c([
154
+ "rounded-radius transition-[opacity,height,width] duration-200",
155
+ h(k).direction.value === "horizontal" ? "w-0.5 h-6 data-[active=true]:h-10" : "h-0.5 w-6 data-[active=true]:w-10",
156
+ N.value || P.value ? "opacity-100 bg-primary" : "opacity-0 bg-border"
157
+ ]),
158
+ "data-active": N.value,
159
+ style: l(I.value)
160
+ }, null, 14, b)], 38)) : n("", !0)], 64));
161
+ }
162
+ });
163
+ //#endregion
164
+ export { x as default };
@@ -0,0 +1,27 @@
1
+ import type { SplitterInternalContext, SplitterPanelConfig } from '../st-splitter/types.d.ts';
2
+
3
+ export type { SplitterInternalContext, SplitterPanelConfig };
4
+
5
+ /**
6
+ * 面板组件属性接口
7
+ * */
8
+ export interface SplitterPanelProps {
9
+ /**
10
+ * 最小尺寸
11
+ * */
12
+ minSize?: number;
13
+ /**
14
+ * 最大尺寸
15
+ * */
16
+ maxSize?: number;
17
+ /**
18
+ * 是否为弹性面板,自动填充剩余空间
19
+ * */
20
+ flex?: boolean;
21
+ /**
22
+ * 是否可见
23
+ * */
24
+ visible?: boolean;
25
+ }
26
+
27
+ 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-splitter-panel/st-splitter-panel.vue.cjs");var n=e.withInstall(t.default);exports.StSplitterPanel=n,exports.default=n;
@@ -0,0 +1,6 @@
1
+ import { withInstall as e } from "../utils/with-install.js";
2
+ import t from "./st-splitter-panel/st-splitter-panel.vue.js";
3
+ //#region src/components/st-splitter-panel/index.ts
4
+ var n = e(t);
5
+ //#endregion
6
+ export { n as StSplitterPanel, n as default };
@@ -0,0 +1 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../utils/with-install.cjs"),t=require("./st-splitter/useSplitter.cjs"),n=require("./st-splitter/st-splitter.vue.cjs");var r=e.withInstall(n.default);exports.StSplitter=r,exports.default=r,exports.useSplitter=t.useSplitter;
@@ -0,0 +1,7 @@
1
+ import { withInstall as e } from "../utils/with-install.js";
2
+ import { useSplitter as t } from "./st-splitter/useSplitter.js";
3
+ import n from "./st-splitter/st-splitter.vue.js";
4
+ //#region src/components/st-splitter/index.ts
5
+ var r = e(n);
6
+ //#endregion
7
+ export { r as StSplitter, r as default, t as useSplitter };
@@ -0,0 +1,159 @@
1
+ export declare const StToggle: {
2
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
3
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").ToggleProps> & Readonly<{
4
+ "onUpdate:modelValue"?: (value: boolean) => any;
5
+ "onPressed-change"?: (pressed: boolean) => any;
6
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ "update:modelValue": (value: boolean) => any;
8
+ "pressed-change": (pressed: boolean) => any;
9
+ }, import("vue").PublicProps, {
10
+ variant: import("./types.d.ts").ToggleVariant;
11
+ disabled: boolean;
12
+ modelValue: boolean;
13
+ defaultPressed: boolean;
14
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
15
+ P: {};
16
+ B: {};
17
+ D: {};
18
+ C: {};
19
+ M: {};
20
+ Defaults: {};
21
+ }, Readonly<import("./types.d.ts").ToggleProps> & Readonly<{
22
+ "onUpdate:modelValue"?: (value: boolean) => any;
23
+ "onPressed-change"?: (pressed: boolean) => any;
24
+ }>, {}, {}, {}, {}, {
25
+ variant: import("./types.d.ts").ToggleVariant;
26
+ disabled: boolean;
27
+ modelValue: boolean;
28
+ defaultPressed: boolean;
29
+ }>;
30
+ __isFragment?: never;
31
+ __isTeleport?: never;
32
+ __isSuspense?: never;
33
+ } & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").ToggleProps> & Readonly<{
34
+ "onUpdate:modelValue"?: (value: boolean) => any;
35
+ "onPressed-change"?: (pressed: boolean) => any;
36
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
37
+ "update:modelValue": (value: boolean) => any;
38
+ "pressed-change": (pressed: boolean) => any;
39
+ }, string, {
40
+ variant: import("./types.d.ts").ToggleVariant;
41
+ disabled: boolean;
42
+ modelValue: boolean;
43
+ defaultPressed: boolean;
44
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
45
+ $slots: {
46
+ default?: (props: {}) => any;
47
+ };
48
+ })>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
49
+ [x: string]: any;
50
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
51
+ P: {};
52
+ B: {};
53
+ D: {};
54
+ C: {};
55
+ M: {};
56
+ Defaults: {};
57
+ }, Readonly<import("vue").ExtractPropTypes<{
58
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").ToggleProps> & Readonly<{
59
+ "onUpdate:modelValue"?: (value: boolean) => any;
60
+ "onPressed-change"?: (pressed: boolean) => any;
61
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
62
+ "update:modelValue": (value: boolean) => any;
63
+ "pressed-change": (pressed: boolean) => any;
64
+ }, import("vue").PublicProps, {
65
+ variant: import("./types.d.ts").ToggleVariant;
66
+ disabled: boolean;
67
+ modelValue: boolean;
68
+ defaultPressed: boolean;
69
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
70
+ P: {};
71
+ B: {};
72
+ D: {};
73
+ C: {};
74
+ M: {};
75
+ Defaults: {};
76
+ }, Readonly<import("./types.d.ts").ToggleProps> & Readonly<{
77
+ "onUpdate:modelValue"?: (value: boolean) => any;
78
+ "onPressed-change"?: (pressed: boolean) => any;
79
+ }>, {}, {}, {}, {}, {
80
+ variant: import("./types.d.ts").ToggleVariant;
81
+ disabled: boolean;
82
+ modelValue: boolean;
83
+ defaultPressed: boolean;
84
+ }>;
85
+ __isFragment?: never;
86
+ __isTeleport?: never;
87
+ __isSuspense?: never;
88
+ } & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").ToggleProps> & Readonly<{
89
+ "onUpdate:modelValue"?: (value: boolean) => any;
90
+ "onPressed-change"?: (pressed: boolean) => any;
91
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
92
+ "update:modelValue": (value: boolean) => any;
93
+ "pressed-change": (pressed: boolean) => any;
94
+ }, string, {
95
+ variant: import("./types.d.ts").ToggleVariant;
96
+ disabled: boolean;
97
+ modelValue: boolean;
98
+ defaultPressed: boolean;
99
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
100
+ $slots: {
101
+ default?: (props: {}) => any;
102
+ };
103
+ })>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, {
104
+ [x: string]: any;
105
+ }>;
106
+ __isFragment?: never;
107
+ __isTeleport?: never;
108
+ __isSuspense?: never;
109
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
110
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").ToggleProps> & Readonly<{
111
+ "onUpdate:modelValue"?: (value: boolean) => any;
112
+ "onPressed-change"?: (pressed: boolean) => any;
113
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
114
+ "update:modelValue": (value: boolean) => any;
115
+ "pressed-change": (pressed: boolean) => any;
116
+ }, import("vue").PublicProps, {
117
+ variant: import("./types.d.ts").ToggleVariant;
118
+ disabled: boolean;
119
+ modelValue: boolean;
120
+ defaultPressed: 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").ToggleProps> & Readonly<{
129
+ "onUpdate:modelValue"?: (value: boolean) => any;
130
+ "onPressed-change"?: (pressed: boolean) => any;
131
+ }>, {}, {}, {}, {}, {
132
+ variant: import("./types.d.ts").ToggleVariant;
133
+ disabled: boolean;
134
+ modelValue: boolean;
135
+ defaultPressed: boolean;
136
+ }>;
137
+ __isFragment?: never;
138
+ __isTeleport?: never;
139
+ __isSuspense?: never;
140
+ } & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").ToggleProps> & Readonly<{
141
+ "onUpdate:modelValue"?: (value: boolean) => any;
142
+ "onPressed-change"?: (pressed: boolean) => any;
143
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
144
+ "update:modelValue": (value: boolean) => any;
145
+ "pressed-change": (pressed: boolean) => any;
146
+ }, string, {
147
+ variant: import("./types.d.ts").ToggleVariant;
148
+ disabled: boolean;
149
+ modelValue: boolean;
150
+ defaultPressed: boolean;
151
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
152
+ $slots: {
153
+ default?: (props: {}) => any;
154
+ };
155
+ })>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
156
+ [x: string]: any;
157
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & (import("vue").VNodeProps & (import("vue").AllowedComponentProps & (import("vue").ComponentCustomProps & import("vue").Plugin)));
158
+ export default StToggle;
159
+ export type * from './types.d.ts';
@@ -0,0 +1 @@
1
+ var e=require("./st-toggle.vue_vue_type_script_setup_true_lang.cjs").default;exports.default=e;
@@ -0,0 +1,25 @@
1
+ import type { ToggleProps, ToggleVariant } from './types.d.ts';
2
+ declare var __VLS_1: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_1) => any;
5
+ };
6
+ declare const __VLS_base: import("vue").DefineComponent<ToggleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ "update:modelValue": (value: boolean) => any;
8
+ "pressed-change": (pressed: boolean) => any;
9
+ }, string, import("vue").PublicProps, Readonly<ToggleProps> & Readonly<{
10
+ "onUpdate:modelValue"?: (value: boolean) => any;
11
+ "onPressed-change"?: (pressed: boolean) => any;
12
+ }>, {
13
+ variant: ToggleVariant;
14
+ disabled: boolean;
15
+ modelValue: boolean;
16
+ defaultPressed: boolean;
17
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
18
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,5 @@
1
+ import e from "./st-toggle.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/st-toggle/st-toggle.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`,`aria-pressed`],i=(0,n.defineComponent)({inheritAttrs:!1,__name:`st-toggle`,props:{variant:{default:`default`},disabled:{type:Boolean,default:!1},modelValue:{type:Boolean,default:void 0},defaultPressed:{type:Boolean,default:!1}},emits:[`update:modelValue`,`pressed-change`],setup(i,{emit:a}){let o={default:`bg-transparent text-muted-foreground`,outline:`bg-transparent text-muted-foreground border border-input`},s={default:`hover:bg-muted hover:text-muted-foreground`,outline:`hover:bg-muted hover:text-muted-foreground hover:border-muted-foreground/20`},c={default:`bg-accent text-accent-foreground`,outline:`bg-accent text-accent-foreground border-accent-foreground/30`},l=i,u=a,d=(0,n.useAttrs)(),f=(0,n.ref)(l.defaultPressed),p=(0,n.computed)(()=>l.modelValue===void 0?f.value:l.modelValue),m=(0,n.computed)(()=>l.disabled),h=t.cva({base:`inline-flex items-center justify-center rounded-radius font-default transition-all duration-150 ease-in-out outline-none select-none h-10 min-w-10 px-3 gap-2`,variants:{variant:{default:o.default,outline:o.outline},disabled:{true:`opacity-50 cursor-not-allowed`}},defaultVariants:{variant:`default`}}),g=(0,n.computed)(()=>e.cn(h({variant:l.variant,disabled:l.disabled}),!l.disabled&&!p.value?s[l.variant]:``,p.value?c[l.variant]:``,d.class)),_=()=>{if(m.value)return;let e=!p.value;l.modelValue===void 0&&(f.value=e),u(`update:modelValue`,e),u(`pressed-change`,e)};return(e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)(`button`,{class:(0,n.normalizeClass)(g.value),style:(0,n.normalizeStyle)((0,n.unref)(d).style),disabled:m.value,"aria-pressed":p.value,onClick:_},[(0,n.renderSlot)(e.$slots,`default`)],14,r))}});exports.default=i;