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,62 @@
1
+ import { cn as e } from "../../utils/cn.js";
2
+ import { cva as t } from "../../utils/cva/index.js";
3
+ import { computed as n, createElementBlock as r, defineComponent as i, normalizeClass as a, normalizeStyle as o, openBlock as s, ref as c, renderSlot as l, unref as u, useAttrs as d } from "vue";
4
+ //#region src/components/st-toggle/st-toggle.vue?vue&type=script&setup=true&lang.ts
5
+ var f = ["disabled", "aria-pressed"], p = /*@__PURE__*/ i({
6
+ inheritAttrs: !1,
7
+ __name: "st-toggle",
8
+ props: {
9
+ variant: { default: "default" },
10
+ disabled: {
11
+ type: Boolean,
12
+ default: !1
13
+ },
14
+ modelValue: {
15
+ type: Boolean,
16
+ default: void 0
17
+ },
18
+ defaultPressed: {
19
+ type: Boolean,
20
+ default: !1
21
+ }
22
+ },
23
+ emits: ["update:modelValue", "pressed-change"],
24
+ setup(i, { emit: p }) {
25
+ let m = {
26
+ default: "bg-transparent text-muted-foreground",
27
+ outline: "bg-transparent text-muted-foreground border border-input"
28
+ }, h = {
29
+ default: "hover:bg-muted hover:text-muted-foreground",
30
+ outline: "hover:bg-muted hover:text-muted-foreground hover:border-muted-foreground/20"
31
+ }, g = {
32
+ default: "bg-accent text-accent-foreground",
33
+ outline: "bg-accent text-accent-foreground border-accent-foreground/30"
34
+ }, _ = i, v = p, y = d(), b = c(_.defaultPressed), x = n(() => _.modelValue === void 0 ? b.value : _.modelValue), S = n(() => _.disabled), C = t({
35
+ 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",
36
+ variants: {
37
+ variant: {
38
+ default: m.default,
39
+ outline: m.outline
40
+ },
41
+ disabled: { true: "opacity-50 cursor-not-allowed" }
42
+ },
43
+ defaultVariants: { variant: "default" }
44
+ }), w = n(() => e(C({
45
+ variant: _.variant,
46
+ disabled: _.disabled
47
+ }), !_.disabled && !x.value ? h[_.variant] : "", x.value ? g[_.variant] : "", y.class)), T = () => {
48
+ if (S.value) return;
49
+ let e = !x.value;
50
+ _.modelValue === void 0 && (b.value = e), v("update:modelValue", e), v("pressed-change", e);
51
+ };
52
+ return (e, t) => (s(), r("button", {
53
+ class: a(w.value),
54
+ style: o(u(y).style),
55
+ disabled: S.value,
56
+ "aria-pressed": x.value,
57
+ onClick: T
58
+ }, [l(e.$slots, "default")], 14, f));
59
+ }
60
+ });
61
+ //#endregion
62
+ export { p as default };
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Toggle 组件变体类型
3
+ */
4
+ export type ToggleVariant = 'default' | 'outline';
5
+
6
+ /**
7
+ * Toggle 组件属性
8
+ */
9
+ export interface ToggleProps {
10
+ /** 按钮变体类型 */
11
+ variant?: ToggleVariant;
12
+ /** 是否禁用 */
13
+ disabled?: boolean;
14
+ /** 是否按下(用于 v-model) */
15
+ modelValue?: boolean;
16
+ /** 默认按下状态 */
17
+ defaultPressed?: boolean;
18
+ }
19
+
20
+ /**
21
+ * Toggle 组件插槽类型
22
+ */
23
+ export interface ToggleSlots {
24
+ /** 默认插槽 */
25
+ default?: () => unknown;
26
+ }
27
+
28
+ /**
29
+ * Toggle 组件事件类型
30
+ */
31
+ export interface ToggleEmits {
32
+ /** 更新 modelValue 事件 */
33
+ 'update:modelValue': [value: boolean];
34
+ /** 按下状态变化事件 */
35
+ 'pressed-change': [pressed: boolean];
36
+ }
37
+
38
+ 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-toggle/st-toggle.vue.cjs");var n=e.withInstall(t.default);exports.StToggle=n,exports.default=n;
@@ -0,0 +1,6 @@
1
+ import { withInstall as e } from "../utils/with-install.js";
2
+ import t from "./st-toggle/st-toggle.vue.js";
3
+ //#region src/components/st-toggle/index.ts
4
+ var n = e(t);
5
+ //#endregion
6
+ export { n as StToggle, n as default };
@@ -0,0 +1,183 @@
1
+ export declare const StTooltip: {
2
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
3
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").TooltipProps> & Readonly<{
4
+ "onUpdate:visible"?: (value: boolean) => any;
5
+ onVisibleChange?: (value: boolean) => any;
6
+ }>, import("./types.d.ts").TooltipExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ "update:visible": (value: boolean) => any;
8
+ visibleChange: (value: boolean) => any;
9
+ }, import("vue").PublicProps, {
10
+ content: string;
11
+ disabled: boolean;
12
+ trigger: import("./types.d.ts").TooltipTrigger;
13
+ placement: import("./types.d.ts").TooltipPlacement;
14
+ visible: boolean;
15
+ offset: 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").TooltipProps> & Readonly<{
24
+ "onUpdate:visible"?: (value: boolean) => any;
25
+ onVisibleChange?: (value: boolean) => any;
26
+ }>, import("./types.d.ts").TooltipExpose, {}, {}, {}, {
27
+ content: string;
28
+ disabled: boolean;
29
+ trigger: import("./types.d.ts").TooltipTrigger;
30
+ placement: import("./types.d.ts").TooltipPlacement;
31
+ visible: boolean;
32
+ offset: number;
33
+ }>;
34
+ __isFragment?: never;
35
+ __isTeleport?: never;
36
+ __isSuspense?: never;
37
+ } & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").TooltipProps> & Readonly<{
38
+ "onUpdate:visible"?: (value: boolean) => any;
39
+ onVisibleChange?: (value: boolean) => any;
40
+ }>, import("./types.d.ts").TooltipExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
41
+ "update:visible": (value: boolean) => any;
42
+ visibleChange: (value: boolean) => any;
43
+ }, string, {
44
+ content: string;
45
+ disabled: boolean;
46
+ trigger: import("./types.d.ts").TooltipTrigger;
47
+ placement: import("./types.d.ts").TooltipPlacement;
48
+ visible: boolean;
49
+ offset: number;
50
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
51
+ $slots: {
52
+ default?: (props: {}) => any;
53
+ } & {
54
+ content?: (props: {}) => any;
55
+ };
56
+ })>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
57
+ [x: string]: any;
58
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
59
+ P: {};
60
+ B: {};
61
+ D: {};
62
+ C: {};
63
+ M: {};
64
+ Defaults: {};
65
+ }, Readonly<import("vue").ExtractPropTypes<{
66
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").TooltipProps> & Readonly<{
67
+ "onUpdate:visible"?: (value: boolean) => any;
68
+ onVisibleChange?: (value: boolean) => any;
69
+ }>, import("./types.d.ts").TooltipExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
70
+ "update:visible": (value: boolean) => any;
71
+ visibleChange: (value: boolean) => any;
72
+ }, import("vue").PublicProps, {
73
+ content: string;
74
+ disabled: boolean;
75
+ trigger: import("./types.d.ts").TooltipTrigger;
76
+ placement: import("./types.d.ts").TooltipPlacement;
77
+ visible: boolean;
78
+ offset: number;
79
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
80
+ P: {};
81
+ B: {};
82
+ D: {};
83
+ C: {};
84
+ M: {};
85
+ Defaults: {};
86
+ }, Readonly<import("./types.d.ts").TooltipProps> & Readonly<{
87
+ "onUpdate:visible"?: (value: boolean) => any;
88
+ onVisibleChange?: (value: boolean) => any;
89
+ }>, import("./types.d.ts").TooltipExpose, {}, {}, {}, {
90
+ content: string;
91
+ disabled: boolean;
92
+ trigger: import("./types.d.ts").TooltipTrigger;
93
+ placement: import("./types.d.ts").TooltipPlacement;
94
+ visible: boolean;
95
+ offset: number;
96
+ }>;
97
+ __isFragment?: never;
98
+ __isTeleport?: never;
99
+ __isSuspense?: never;
100
+ } & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").TooltipProps> & Readonly<{
101
+ "onUpdate:visible"?: (value: boolean) => any;
102
+ onVisibleChange?: (value: boolean) => any;
103
+ }>, import("./types.d.ts").TooltipExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
104
+ "update:visible": (value: boolean) => any;
105
+ visibleChange: (value: boolean) => any;
106
+ }, string, {
107
+ content: string;
108
+ disabled: boolean;
109
+ trigger: import("./types.d.ts").TooltipTrigger;
110
+ placement: import("./types.d.ts").TooltipPlacement;
111
+ visible: boolean;
112
+ offset: 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
+ content?: (props: {}) => any;
118
+ };
119
+ })>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, {
120
+ [x: string]: any;
121
+ }>;
122
+ __isFragment?: never;
123
+ __isTeleport?: never;
124
+ __isSuspense?: never;
125
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
126
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").TooltipProps> & Readonly<{
127
+ "onUpdate:visible"?: (value: boolean) => any;
128
+ onVisibleChange?: (value: boolean) => any;
129
+ }>, import("./types.d.ts").TooltipExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
130
+ "update:visible": (value: boolean) => any;
131
+ visibleChange: (value: boolean) => any;
132
+ }, import("vue").PublicProps, {
133
+ content: string;
134
+ disabled: boolean;
135
+ trigger: import("./types.d.ts").TooltipTrigger;
136
+ placement: import("./types.d.ts").TooltipPlacement;
137
+ visible: boolean;
138
+ offset: number;
139
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
140
+ P: {};
141
+ B: {};
142
+ D: {};
143
+ C: {};
144
+ M: {};
145
+ Defaults: {};
146
+ }, Readonly<import("./types.d.ts").TooltipProps> & Readonly<{
147
+ "onUpdate:visible"?: (value: boolean) => any;
148
+ onVisibleChange?: (value: boolean) => any;
149
+ }>, import("./types.d.ts").TooltipExpose, {}, {}, {}, {
150
+ content: string;
151
+ disabled: boolean;
152
+ trigger: import("./types.d.ts").TooltipTrigger;
153
+ placement: import("./types.d.ts").TooltipPlacement;
154
+ visible: boolean;
155
+ offset: number;
156
+ }>;
157
+ __isFragment?: never;
158
+ __isTeleport?: never;
159
+ __isSuspense?: never;
160
+ } & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").TooltipProps> & Readonly<{
161
+ "onUpdate:visible"?: (value: boolean) => any;
162
+ onVisibleChange?: (value: boolean) => any;
163
+ }>, import("./types.d.ts").TooltipExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
164
+ "update:visible": (value: boolean) => any;
165
+ visibleChange: (value: boolean) => any;
166
+ }, string, {
167
+ content: string;
168
+ disabled: boolean;
169
+ trigger: import("./types.d.ts").TooltipTrigger;
170
+ placement: import("./types.d.ts").TooltipPlacement;
171
+ visible: boolean;
172
+ offset: number;
173
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
174
+ $slots: {
175
+ default?: (props: {}) => any;
176
+ } & {
177
+ content?: (props: {}) => any;
178
+ };
179
+ })>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
180
+ [x: string]: any;
181
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & (import("vue").VNodeProps & (import("vue").AllowedComponentProps & (import("vue").ComponentCustomProps & import("vue").Plugin)));
182
+ export default StTooltip;
183
+ export type * from './types.d.ts';
@@ -0,0 +1 @@
1
+ var e=require("./st-tooltip.vue_vue_type_script_setup_true_lang.cjs").default;exports.default=e;
@@ -0,0 +1,29 @@
1
+ import type { TooltipExpose, TooltipProps } from './types.d.ts';
2
+ declare var __VLS_13: {}, __VLS_16: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_13) => any;
5
+ } & {
6
+ content?: (props: typeof __VLS_16) => any;
7
+ };
8
+ declare const __VLS_base: import("vue").DefineComponent<TooltipProps, TooltipExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:visible": (value: boolean) => any;
10
+ visibleChange: (value: boolean) => any;
11
+ }, string, import("vue").PublicProps, Readonly<TooltipProps> & Readonly<{
12
+ "onUpdate:visible"?: (value: boolean) => any;
13
+ onVisibleChange?: (value: boolean) => any;
14
+ }>, {
15
+ content: string;
16
+ disabled: boolean;
17
+ trigger: import("./types.d.ts").TooltipTrigger;
18
+ placement: import("./types.d.ts").TooltipPlacement;
19
+ visible: boolean;
20
+ offset: number;
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-tooltip.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/st-tooltip/st-tooltip.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1 @@
1
+ const e=require("../../utils/cn.cjs"),t=require("../st-popover/st-popover.vue.cjs");let n=require("vue");var r={key:1},i=(0,n.defineComponent)({inheritAttrs:!1,__name:`st-tooltip`,props:{trigger:{default:`hover`},placement:{default:`top-center`},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:void 0},content:{default:``},offset:{default:8}},emits:[`update:visible`,`visibleChange`],setup(i,{expose:a,emit:o}){let s=(0,n.useAttrs)(),c=i,l=o,u=(0,n.useSlots)(),d=(0,n.ref)(null),f=(0,n.computed)(()=>!!u.content),p=e=>{l(`update:visible`,e)},m=e=>{l(`visibleChange`,e)};return a({show:()=>{d.value?.show()},hide:()=>{d.value?.hide()},toggle:()=>{d.value?.toggle()}}),(i,a)=>((0,n.openBlock)(),(0,n.createBlock)(t.default,{ref_key:`popoverRef`,ref:d,class:(0,n.normalizeClass)((0,n.unref)(e.cn)(``,(0,n.unref)(s).class)),style:(0,n.normalizeStyle)((0,n.unref)(s).style),"close-on-click-outside":c.trigger===`click`||c.trigger===`contextmenu`,"close-on-esc":!1,disabled:c.disabled,offset:c.offset,placement:c.placement,"show-arrow":!0,trigger:c.trigger,visible:c.visible,"onUpdate:visible":p,onVisibleChange:m},{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(i.$slots,`default`)]),content:(0,n.withCtx)(()=>[f.value?(0,n.renderSlot)(i.$slots,`content`,{key:0}):((0,n.openBlock)(),(0,n.createElementBlock)(`span`,r,(0,n.toDisplayString)(c.content),1))]),_:3},8,[`class`,`style`,`close-on-click-outside`,`disabled`,`offset`,`placement`,`trigger`,`visible`]))}});exports.default=i;
@@ -0,0 +1,71 @@
1
+ import { cn as e } from "../../utils/cn.js";
2
+ import t from "../st-popover/st-popover.vue.js";
3
+ import { computed as n, createBlock as r, createElementBlock as i, defineComponent as a, normalizeClass as o, normalizeStyle as s, openBlock as c, ref as l, renderSlot as u, toDisplayString as d, unref as f, useAttrs as p, useSlots as m, withCtx as h } from "vue";
4
+ //#region src/components/st-tooltip/st-tooltip.vue?vue&type=script&setup=true&lang.ts
5
+ var g = { key: 1 }, _ = /*@__PURE__*/ a({
6
+ inheritAttrs: !1,
7
+ __name: "st-tooltip",
8
+ props: {
9
+ trigger: { default: "hover" },
10
+ placement: { default: "top-center" },
11
+ disabled: {
12
+ type: Boolean,
13
+ default: !1
14
+ },
15
+ visible: {
16
+ type: Boolean,
17
+ default: void 0
18
+ },
19
+ content: { default: "" },
20
+ offset: { default: 8 }
21
+ },
22
+ emits: ["update:visible", "visibleChange"],
23
+ setup(a, { expose: _, emit: v }) {
24
+ let y = p(), b = a, x = v, S = m(), C = l(null), w = n(() => !!S.content), T = (e) => {
25
+ x("update:visible", e);
26
+ }, E = (e) => {
27
+ x("visibleChange", e);
28
+ };
29
+ return _({
30
+ show: () => {
31
+ C.value?.show();
32
+ },
33
+ hide: () => {
34
+ C.value?.hide();
35
+ },
36
+ toggle: () => {
37
+ C.value?.toggle();
38
+ }
39
+ }), (n, a) => (c(), r(t, {
40
+ ref_key: "popoverRef",
41
+ ref: C,
42
+ class: o(f(e)("", f(y).class)),
43
+ style: s(f(y).style),
44
+ "close-on-click-outside": b.trigger === "click" || b.trigger === "contextmenu",
45
+ "close-on-esc": !1,
46
+ disabled: b.disabled,
47
+ offset: b.offset,
48
+ placement: b.placement,
49
+ "show-arrow": !0,
50
+ trigger: b.trigger,
51
+ visible: b.visible,
52
+ "onUpdate:visible": T,
53
+ onVisibleChange: E
54
+ }, {
55
+ default: h(() => [u(n.$slots, "default")]),
56
+ content: h(() => [w.value ? u(n.$slots, "content", { key: 0 }) : (c(), i("span", g, d(b.content), 1))]),
57
+ _: 3
58
+ }, 8, [
59
+ "class",
60
+ "style",
61
+ "close-on-click-outside",
62
+ "disabled",
63
+ "offset",
64
+ "placement",
65
+ "trigger",
66
+ "visible"
67
+ ]));
68
+ }
69
+ });
70
+ //#endregion
71
+ export { _ as default };
@@ -0,0 +1,79 @@
1
+ import type { PopoverPlacement, PopoverTrigger } from '../st-popover/types.d.ts';
2
+
3
+ /**
4
+ * Tooltip 触发方式类型
5
+ * click: 点击触发
6
+ * focus: 聚焦触发
7
+ * hover: 悬停触发
8
+ * contextmenu: 右键菜单触发
9
+ */
10
+ export type TooltipTrigger = PopoverTrigger;
11
+
12
+ /**
13
+ * Tooltip 弹出方向类型
14
+ * top-left: 上方左侧对齐
15
+ * top-center: 上方居中对齐
16
+ * top-right: 上方右侧对齐
17
+ * bottom-left: 下方左侧对齐
18
+ * bottom-center: 下方居中对齐
19
+ * bottom-right: 下方右侧对齐
20
+ * left-top: 左侧顶部对齐
21
+ * left-center: 左侧居中对齐
22
+ * left-bottom: 左侧底部对齐
23
+ * right-top: 右侧顶部对齐
24
+ * right-center: 右侧居中对齐
25
+ * right-bottom: 右侧底部对齐
26
+ */
27
+ export type TooltipPlacement = PopoverPlacement;
28
+
29
+ /**
30
+ * Tooltip 组件属性接口
31
+ */
32
+ export interface TooltipProps {
33
+ /** 触发方式 */
34
+ trigger?: TooltipTrigger;
35
+ /** 弹出方向 */
36
+ placement?: TooltipPlacement;
37
+ /** 是否禁用 */
38
+ disabled?: boolean;
39
+ /** 是否可见 */
40
+ visible?: boolean;
41
+ /** 提示内容 */
42
+ content?: string;
43
+ /** 偏移距离 */
44
+ offset?: number;
45
+ }
46
+
47
+ /**
48
+ * Tooltip 组件事件接口
49
+ */
50
+ export interface TooltipEmits {
51
+ /** 更新可见状态事件 */
52
+ 'update:visible': [value: boolean];
53
+ /** 可见状态改变事件 */
54
+ visibleChange: [value: boolean];
55
+ }
56
+
57
+ /**
58
+ * Tooltip 组件插槽接口
59
+ */
60
+ export interface TooltipSlots {
61
+ /** 默认插槽 */
62
+ default?: () => any;
63
+ /** 提示内容插槽 */
64
+ content?: () => any;
65
+ }
66
+
67
+ /**
68
+ * Tooltip 暴露的方法接口
69
+ */
70
+ export interface TooltipExpose {
71
+ /** 显示提示 */
72
+ show: () => void;
73
+ /** 隐藏提示 */
74
+ hide: () => void;
75
+ /** 切换显示状态 */
76
+ toggle: () => void;
77
+ }
78
+
79
+ 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-tooltip/st-tooltip.vue.cjs");var n=e.withInstall(t.default);exports.StTooltip=n,exports.default=n;
@@ -0,0 +1,6 @@
1
+ import { withInstall as e } from "../utils/with-install.js";
2
+ import t from "./st-tooltip/st-tooltip.vue.js";
3
+ //#region src/components/st-tooltip/index.ts
4
+ var n = e(t);
5
+ //#endregion
6
+ export { n as StTooltip, n as default };
@@ -0,0 +1,114 @@
1
+ export declare const StTree: {
2
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<import("vue").DefineComponent<{
3
+ list: import("./types.d.ts").TreeListItem[];
4
+ labelKey?: string;
5
+ valueKey?: string;
6
+ childrenKey?: string;
7
+ indent?: number;
8
+ } & {
9
+ modelValue?: string | number | undefined;
10
+ expandedKeys?: (string | number)[];
11
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ select: (value: string | number) => any;
13
+ "update:modelValue": (value: string | number) => any;
14
+ "update:expandedKeys": (value: (string | number)[]) => any;
15
+ }, string, import("vue").PublicProps, Readonly<{
16
+ list: import("./types.d.ts").TreeListItem[];
17
+ labelKey?: string;
18
+ valueKey?: string;
19
+ childrenKey?: string;
20
+ indent?: number;
21
+ } & {
22
+ modelValue?: string | number | undefined;
23
+ expandedKeys?: (string | number)[];
24
+ }> & Readonly<{
25
+ onSelect?: (value: string | number) => any;
26
+ "onUpdate:modelValue"?: (value: string | number) => any;
27
+ "onUpdate:expandedKeys"?: (value: (string | number)[]) => any;
28
+ }>, {
29
+ indent: number;
30
+ labelKey: string;
31
+ valueKey: string;
32
+ childrenKey: string;
33
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
34
+ [x: string]: any;
35
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
36
+ P: {};
37
+ B: {};
38
+ D: {};
39
+ C: {};
40
+ M: {};
41
+ Defaults: {};
42
+ }, Readonly<import("vue").ExtractPropTypes<import("vue").DefineComponent<{
43
+ list: import("./types.d.ts").TreeListItem[];
44
+ labelKey?: string;
45
+ valueKey?: string;
46
+ childrenKey?: string;
47
+ indent?: number;
48
+ } & {
49
+ modelValue?: string | number | undefined;
50
+ expandedKeys?: (string | number)[];
51
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
52
+ select: (value: string | number) => any;
53
+ "update:modelValue": (value: string | number) => any;
54
+ "update:expandedKeys": (value: (string | number)[]) => any;
55
+ }, string, import("vue").PublicProps, Readonly<{
56
+ list: import("./types.d.ts").TreeListItem[];
57
+ labelKey?: string;
58
+ valueKey?: string;
59
+ childrenKey?: string;
60
+ indent?: number;
61
+ } & {
62
+ modelValue?: string | number | undefined;
63
+ expandedKeys?: (string | number)[];
64
+ }> & Readonly<{
65
+ onSelect?: (value: string | number) => any;
66
+ "onUpdate:modelValue"?: (value: string | number) => any;
67
+ "onUpdate:expandedKeys"?: (value: (string | number)[]) => any;
68
+ }>, {
69
+ indent: number;
70
+ labelKey: string;
71
+ valueKey: string;
72
+ childrenKey: string;
73
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, {
74
+ [x: string]: any;
75
+ }>;
76
+ __isFragment?: never;
77
+ __isTeleport?: never;
78
+ __isSuspense?: never;
79
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<import("vue").DefineComponent<{
80
+ list: import("./types.d.ts").TreeListItem[];
81
+ labelKey?: string;
82
+ valueKey?: string;
83
+ childrenKey?: string;
84
+ indent?: number;
85
+ } & {
86
+ modelValue?: string | number | undefined;
87
+ expandedKeys?: (string | number)[];
88
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
89
+ select: (value: string | number) => any;
90
+ "update:modelValue": (value: string | number) => any;
91
+ "update:expandedKeys": (value: (string | number)[]) => any;
92
+ }, string, import("vue").PublicProps, Readonly<{
93
+ list: import("./types.d.ts").TreeListItem[];
94
+ labelKey?: string;
95
+ valueKey?: string;
96
+ childrenKey?: string;
97
+ indent?: number;
98
+ } & {
99
+ modelValue?: string | number | undefined;
100
+ expandedKeys?: (string | number)[];
101
+ }> & Readonly<{
102
+ onSelect?: (value: string | number) => any;
103
+ "onUpdate:modelValue"?: (value: string | number) => any;
104
+ "onUpdate:expandedKeys"?: (value: (string | number)[]) => any;
105
+ }>, {
106
+ indent: number;
107
+ labelKey: string;
108
+ valueKey: string;
109
+ childrenKey: string;
110
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
111
+ [x: string]: any;
112
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & (import("vue").VNodeProps & (import("vue").AllowedComponentProps & (import("vue").ComponentCustomProps & import("vue").Plugin)));
113
+ export default StTree;
114
+ export type * from './types.d.ts';
@@ -0,0 +1 @@
1
+ var e=require("./st-tree-node.vue_vue_type_script_setup_true_lang.cjs").default;exports.default=e;
@@ -0,0 +1,4 @@
1
+ import type { StTreeNodeProps } from './types.d.ts';
2
+ declare const __VLS_export: import("vue").DefineComponent<StTreeNodeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<StTreeNodeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
+ declare const _default: typeof __VLS_export;
4
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import e from "./st-tree-node.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/st-tree/st-tree-node.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1 @@
1
+ let e=require("vue");var t={class:`flex-1 min-w-0 truncate`},n={key:0,class:`grid grid-rows-[1fr]`},r={class:`overflow-hidden`},i=(0,e.defineComponent)({inheritAttrs:!1,__name:`st-tree-node`,props:{node:{},level:{},indent:{},labelKey:{},valueKey:{},childrenKey:{},selectedValue:{},expandedKeys:{},onSelect:{type:Function},onToggle:{type:Function}},setup(i){let a=i,o=(0,e.useAttrs)();function s(e){return e[a.valueKey]}let c=(0,e.computed)(()=>s(a.node)),l=(0,e.computed)(()=>a.node[a.labelKey]),u=(0,e.computed)(()=>a.node[a.childrenKey]||[]),d=(0,e.computed)(()=>u.value.length===0),f=(0,e.computed)(()=>u.value.length>0),p=(0,e.computed)(()=>a.expandedKeys.includes(c.value)),m=(0,e.computed)(()=>a.selectedValue===c.value);function h(){a.onSelect(c.value)}function g(){d.value||a.onToggle(c.value)}return(a,c)=>{let _=(0,e.resolveComponent)(`StTreeNode`,!0);return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)((0,e.unref)(o).class)},[(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`flex items-center gap-2 px-3 py-1.25 rounded-radius cursor-pointer transition-colors duration-100 select-none whitespace-nowrap text-3.25 leading-5 text-foreground`,{"hover:bg-accent":!m.value,"bg-accent":m.value}]),style:(0,e.normalizeStyle)({paddingLeft:`${i.level*i.indent+12}px`}),onClick:h},[(0,e.createElementVNode)(`span`,{class:(0,e.normalizeClass)([`flex items-center justify-center flex-shrink-0 w-4.5 h-4.5 rounded-radius color-muted-foreground transition-all duration-200 ease-in-out`,{"rotate-90":p.value,invisible:d.value,"hover:bg-accent hover:color-foreground":!d.value}]),onClick:(0,e.withModifiers)(g,[`stop`])},[...c[0]||=[(0,e.createElementVNode)(`i`,{class:`i-ri-arrow-right-s-line text-3.5`},null,-1)]],2),(0,e.createElementVNode)(`p`,t,(0,e.toDisplayString)(l.value),1)],6),(0,e.createVNode)(e.Transition,{"enter-active-class":`transition-[grid-template-rows] duration-250 ease-[var(--animate-ease-menu)]`,"enter-from-class":`!grid-rows-[0fr]`,"enter-to-class":`grid-rows-[1fr]`,"leave-active-class":`transition-[grid-template-rows] duration-200 ease-[var(--animate-ease-menu)]`,"leave-from-class":`grid-rows-[1fr]`,"leave-to-class":`!grid-rows-[0fr]`},{default:(0,e.withCtx)(()=>[f.value&&p.value?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,n,[(0,e.createElementVNode)(`div`,r,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(u.value,t=>((0,e.openBlock)(),(0,e.createBlock)(_,{key:s(t),"children-key":i.childrenKey,"expanded-keys":i.expandedKeys,indent:i.indent,"label-key":i.labelKey,level:i.level+1,node:t,"on-select":i.onSelect,"on-toggle":i.onToggle,"selected-value":i.selectedValue,"value-key":i.valueKey},null,8,[`children-key`,`expanded-keys`,`indent`,`label-key`,`level`,`node`,`on-select`,`on-toggle`,`selected-value`,`value-key`]))),128))])])):(0,e.createCommentVNode)(``,!0)]),_:1})],2)}}});exports.default=i;