vlite3 0.0.1

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 (228) hide show
  1. package/README.md +72 -0
  2. package/_virtual/_plugin-vue_export-helper.js +9 -0
  3. package/components/Accordion/Accordion.vue.d.ts +42 -0
  4. package/components/Accordion/Accordion.vue.js +102 -0
  5. package/components/Accordion/Accordion.vue2.js +4 -0
  6. package/components/Accordion/AccordionContent.vue.d.ts +22 -0
  7. package/components/Accordion/AccordionContent.vue.js +7 -0
  8. package/components/Accordion/AccordionContent.vue2.js +47 -0
  9. package/components/Accordion/AccordionItem.vue.d.ts +54 -0
  10. package/components/Accordion/AccordionItem.vue.js +102 -0
  11. package/components/Accordion/AccordionItem.vue2.js +4 -0
  12. package/components/Accordion/AccordionTrigger.vue.d.ts +40 -0
  13. package/components/Accordion/AccordionTrigger.vue.js +72 -0
  14. package/components/Accordion/AccordionTrigger.vue2.js +4 -0
  15. package/components/Accordion/index.d.ts +5 -0
  16. package/components/Accordion/types.d.ts +30 -0
  17. package/components/Alert.vue.d.ts +36 -0
  18. package/components/Alert.vue.js +84 -0
  19. package/components/Alert.vue2.js +4 -0
  20. package/components/Avatar.vue.d.ts +32 -0
  21. package/components/Avatar.vue.js +78 -0
  22. package/components/Avatar.vue2.js +4 -0
  23. package/components/AvatarUploader/AvatarUploader.vue.d.ts +31 -0
  24. package/components/AvatarUploader/AvatarUploader.vue.js +104 -0
  25. package/components/AvatarUploader/AvatarUploader.vue2.js +4 -0
  26. package/components/AvatarUploader/index.d.ts +2 -0
  27. package/components/Badge.vue.d.ts +25 -0
  28. package/components/Badge.vue.js +31 -0
  29. package/components/Badge.vue2.js +4 -0
  30. package/components/Button.vue.d.ts +26 -0
  31. package/components/Button.vue.js +108 -0
  32. package/components/Button.vue2.js +4 -0
  33. package/components/ButtonGroup.vue.d.ts +29 -0
  34. package/components/ButtonGroup.vue.js +7 -0
  35. package/components/ButtonGroup.vue2.js +33 -0
  36. package/components/CheckBox.vue.d.ts +28 -0
  37. package/components/CheckBox.vue.js +114 -0
  38. package/components/CheckBox.vue2.js +4 -0
  39. package/components/Chip/Chip.vue.d.ts +33 -0
  40. package/components/Chip/Chip.vue.js +118 -0
  41. package/components/Chip/Chip.vue2.js +4 -0
  42. package/components/Chip/index.d.ts +2 -0
  43. package/components/Chip/types.d.ts +12 -0
  44. package/components/ChoiceBox/ChoiceBox.vue.d.ts +32 -0
  45. package/components/ChoiceBox/ChoiceBox.vue.js +141 -0
  46. package/components/ChoiceBox/ChoiceBox.vue2.js +4 -0
  47. package/components/ChoiceBox/index.d.ts +2 -0
  48. package/components/ColorPicker/ColorIro.vue.d.ts +18 -0
  49. package/components/ColorPicker/ColorIro.vue.js +142 -0
  50. package/components/ColorPicker/ColorIro.vue3.js +5 -0
  51. package/components/ColorPicker/ColorPicker.vue.d.ts +22 -0
  52. package/components/ColorPicker/ColorPicker.vue.js +55 -0
  53. package/components/ColorPicker/ColorPicker.vue2.js +4 -0
  54. package/components/ConfirmationModal.vue.d.ts +23 -0
  55. package/components/ConfirmationModal.vue.js +50 -0
  56. package/components/ConfirmationModal.vue2.js +4 -0
  57. package/components/DatePicker.vue.d.ts +44 -0
  58. package/components/DatePicker.vue.js +88 -0
  59. package/components/DatePicker.vue2.js +4 -0
  60. package/components/Dropdown/Dropdown.vue.d.ts +104 -0
  61. package/components/Dropdown/Dropdown.vue.js +200 -0
  62. package/components/Dropdown/Dropdown.vue2.js +4 -0
  63. package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +21 -0
  64. package/components/Dropdown/DropdownGroupedLayout.vue.js +73 -0
  65. package/components/Dropdown/DropdownGroupedLayout.vue2.js +4 -0
  66. package/components/Dropdown/DropdownItem.vue.d.ts +35 -0
  67. package/components/Dropdown/DropdownItem.vue.js +56 -0
  68. package/components/Dropdown/DropdownItem.vue2.js +4 -0
  69. package/components/Dropdown/DropdownMenu.vue.d.ts +71 -0
  70. package/components/Dropdown/DropdownMenu.vue.js +211 -0
  71. package/components/Dropdown/DropdownMenu.vue2.js +4 -0
  72. package/components/Dropdown/DropdownTrigger.vue.d.ts +13 -0
  73. package/components/Dropdown/DropdownTrigger.vue.js +24 -0
  74. package/components/Dropdown/DropdownTrigger.vue2.js +4 -0
  75. package/components/Dropdown/composables/useDropdownIds.d.ts +5 -0
  76. package/components/Dropdown/composables/useDropdownIds.js +20 -0
  77. package/components/Dropdown/composables/useDropdownNavigation.d.ts +19 -0
  78. package/components/Dropdown/composables/useDropdownNavigation.js +53 -0
  79. package/components/Dropdown/composables/useDropdownSelection.d.ts +16 -0
  80. package/components/Dropdown/composables/useDropdownSelection.js +41 -0
  81. package/components/Dropdown/index.d.ts +6 -0
  82. package/components/FilePicker/FilePicker.vue.d.ts +57 -0
  83. package/components/FilePicker/FilePicker.vue.js +205 -0
  84. package/components/FilePicker/FilePicker.vue2.js +4 -0
  85. package/components/FilePicker/index.d.ts +2 -0
  86. package/components/FileTree/FileTree.vue.d.ts +20 -0
  87. package/components/FileTree/FileTree.vue.js +143 -0
  88. package/components/FileTree/FileTree.vue2.js +4 -0
  89. package/components/FileTree/FileTreeNode.vue.d.ts +28 -0
  90. package/components/FileTree/FileTreeNode.vue.js +157 -0
  91. package/components/FileTree/FileTreeNode.vue2.js +4 -0
  92. package/components/FileTree/index.d.ts +2 -0
  93. package/components/FileTree/types.d.ts +28 -0
  94. package/components/FileTree/useTreeSelection.d.ts +12 -0
  95. package/components/Heatmap/Heatmap.vue.d.ts +26 -0
  96. package/components/Heatmap/Heatmap.vue.js +7 -0
  97. package/components/Heatmap/Heatmap.vue2.js +338 -0
  98. package/components/Heatmap/index.d.ts +2 -0
  99. package/components/Heatmap/types.d.ts +66 -0
  100. package/components/Icon.vue.d.ts +7 -0
  101. package/components/Icon.vue.js +34 -0
  102. package/components/Icon.vue2.js +4 -0
  103. package/components/IconPicker.vue.d.ts +38 -0
  104. package/components/IconPicker.vue.js +124 -0
  105. package/components/IconPicker.vue2.js +4 -0
  106. package/components/Input.vue.d.ts +54 -0
  107. package/components/Input.vue.js +250 -0
  108. package/components/Input.vue2.js +4 -0
  109. package/components/Label.vue.d.ts +23 -0
  110. package/components/Label.vue.js +23 -0
  111. package/components/Label.vue2.js +4 -0
  112. package/components/Logo.vue.d.ts +2 -0
  113. package/components/Logo.vue.js +10 -0
  114. package/components/Logo.vue2.js +4 -0
  115. package/components/Masonry/Masonry.vue.d.ts +31 -0
  116. package/components/Masonry/Masonry.vue.js +7 -0
  117. package/components/Masonry/Masonry.vue2.js +77 -0
  118. package/components/Masonry/index.d.ts +2 -0
  119. package/components/Masonry/types.d.ts +33 -0
  120. package/components/Masonry/types.js +10 -0
  121. package/components/Modal.vue.d.ts +43 -0
  122. package/components/Modal.vue.js +100 -0
  123. package/components/Modal.vue2.js +4 -0
  124. package/components/MultiSelect/MultiSelect.vue.d.ts +40 -0
  125. package/components/MultiSelect/MultiSelect.vue.js +126 -0
  126. package/components/MultiSelect/MultiSelect.vue2.js +4 -0
  127. package/components/MultiSelect/index.d.ts +1 -0
  128. package/components/Navbar/Navbar.vue.d.ts +50 -0
  129. package/components/Navbar/Navbar.vue.js +201 -0
  130. package/components/Navbar/Navbar.vue2.js +4 -0
  131. package/components/Navbar/NavbarGroup.vue.d.ts +24 -0
  132. package/components/Navbar/NavbarGroup.vue.js +23 -0
  133. package/components/Navbar/NavbarGroup.vue2.js +4 -0
  134. package/components/Navbar/NavbarItem.vue.d.ts +40 -0
  135. package/components/Navbar/NavbarItem.vue.js +92 -0
  136. package/components/Navbar/NavbarItem.vue2.js +4 -0
  137. package/components/Navbar/index.d.ts +3 -0
  138. package/components/OTPInput/OTPInput.vue.d.ts +33 -0
  139. package/components/OTPInput/OTPInput.vue.js +123 -0
  140. package/components/OTPInput/OTPInput.vue2.js +4 -0
  141. package/components/OTPInput/index.d.ts +1 -0
  142. package/components/Pagination/Pagination.vue.d.ts +34 -0
  143. package/components/Pagination/Pagination.vue.js +198 -0
  144. package/components/Pagination/Pagination.vue2.js +4 -0
  145. package/components/Pagination/index.d.ts +1 -0
  146. package/components/PricingPlan/PricingPlan.vue.d.ts +22 -0
  147. package/components/PricingPlan/PricingPlan.vue.js +55 -0
  148. package/components/PricingPlan/PricingPlan.vue2.js +4 -0
  149. package/components/PricingPlan/PricingPlanItem.vue.d.ts +17 -0
  150. package/components/PricingPlan/PricingPlanItem.vue.js +92 -0
  151. package/components/PricingPlan/PricingPlanItem.vue2.js +4 -0
  152. package/components/PricingPlan/index.d.ts +3 -0
  153. package/components/PricingPlan/types.d.ts +25 -0
  154. package/components/SidePanel.vue.d.ts +58 -0
  155. package/components/SidePanel.vue.js +7 -0
  156. package/components/SidePanel.vue2.js +123 -0
  157. package/components/SidebarMenu/SidebarMenu.vue.d.ts +9 -0
  158. package/components/SidebarMenu/SidebarMenu.vue.js +65 -0
  159. package/components/SidebarMenu/SidebarMenu.vue2.js +4 -0
  160. package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +9 -0
  161. package/components/SidebarMenu/SidebarMenuItem.vue.js +7 -0
  162. package/components/SidebarMenu/SidebarMenuItem.vue2.js +222 -0
  163. package/components/SidebarMenu/index.d.ts +3 -0
  164. package/components/SidebarMenu/types.d.ts +52 -0
  165. package/components/Slider.vue.d.ts +29 -0
  166. package/components/Slider.vue.js +124 -0
  167. package/components/Slider.vue2.js +4 -0
  168. package/components/Switch.vue.d.ts +16 -0
  169. package/components/Switch.vue.js +43 -0
  170. package/components/Switch.vue2.js +4 -0
  171. package/components/Tabes/Tabes.vue.d.ts +20 -0
  172. package/components/Tabes/Tabes.vue.js +86 -0
  173. package/components/Tabes/Tabes.vue2.js +4 -0
  174. package/components/Tabes/index.d.ts +2 -0
  175. package/components/Tabes/types.d.ts +8 -0
  176. package/components/Textarea.vue.d.ts +22 -0
  177. package/components/Textarea.vue.js +34 -0
  178. package/components/Textarea.vue2.js +4 -0
  179. package/components/ThemeToggle.vue.d.ts +2 -0
  180. package/components/ThemeToggle.vue.js +18 -0
  181. package/components/ThemeToggle.vue2.js +4 -0
  182. package/components/Timeline.vue.d.ts +39 -0
  183. package/components/Timeline.vue.js +174 -0
  184. package/components/Timeline.vue2.js +4 -0
  185. package/components/ToastNotification.vue.d.ts +7 -0
  186. package/components/ToastNotification.vue.js +7 -0
  187. package/components/ToastNotification.vue2.js +163 -0
  188. package/components/Tooltip.vue.d.ts +25 -0
  189. package/components/Tooltip.vue.js +39 -0
  190. package/components/Tooltip.vue2.js +4 -0
  191. package/components/Workbook/Sheet.vue.d.ts +38 -0
  192. package/components/Workbook/Sheet.vue.js +141 -0
  193. package/components/Workbook/Sheet.vue2.js +4 -0
  194. package/components/Workbook/Workbook.vue.d.ts +54 -0
  195. package/components/Workbook/Workbook.vue.js +7 -0
  196. package/components/Workbook/Workbook.vue2.js +146 -0
  197. package/components/Workbook/WorkbookAddButton.vue.d.ts +6 -0
  198. package/components/Workbook/WorkbookAddButton.vue.js +20 -0
  199. package/components/Workbook/WorkbookAddButton.vue2.js +4 -0
  200. package/components/Workbook/index.d.ts +3 -0
  201. package/components/Workbook/types.d.ts +34 -0
  202. package/composables/useKeyStroke.d.ts +21 -0
  203. package/composables/useKeyStroke.js +37 -0
  204. package/composables/useNotifications.d.ts +93 -0
  205. package/composables/useNotifications.js +88 -0
  206. package/composables/useTheme.d.ts +6 -0
  207. package/composables/useTheme.js +32 -0
  208. package/directives/vRipple.d.ts +4 -0
  209. package/directives/vRipple.js +17 -0
  210. package/index.css +1 -0
  211. package/index.d.ts +40 -0
  212. package/index.js +110 -0
  213. package/package.json +57 -0
  214. package/types/alert.type.d.ts +10 -0
  215. package/types/avatar.type.d.ts +10 -0
  216. package/types/button.d.ts +15 -0
  217. package/types/buttongroup.type.d.ts +1 -0
  218. package/types/form.type.d.ts +45 -0
  219. package/types/index.d.ts +9 -0
  220. package/types/navbar.type.d.ts +26 -0
  221. package/types/sidepanel.type.d.ts +13 -0
  222. package/types/styles.d.ts +28 -0
  223. package/types/timeline.type.d.ts +9 -0
  224. package/utils/functions.d.ts +9 -0
  225. package/utils/functions.js +11 -0
  226. package/utils/index.d.ts +2 -0
  227. package/utils/object.d.ts +6 -0
  228. package/utils/object.js +14 -0
@@ -0,0 +1,163 @@
1
+ import { defineComponent as M, ref as O, openBlock as r, createElementBlock as l, Fragment as g, renderList as x, createElementVNode as i, normalizeClass as c, createVNode as h, TransitionGroup as A, withCtx as v, normalizeStyle as L, toDisplayString as u, createCommentVNode as y, createBlock as G, createTextVNode as P } from "vue";
2
+ import Y from "./Icon.vue.js";
3
+ import { useNotifications as F } from "../composables/useNotifications.js";
4
+ import q from "./Button.vue.js";
5
+ const H = {
6
+ class: "toast-provider pointer-events-none fixed inset-0 z-[9999] overflow-hidden",
7
+ "aria-live": "polite"
8
+ }, J = ["data-index", "data-pos"], K = { class: "flex-1 min-w-0" }, Q = { class: "text-sm font-medium text-foreground leading-tight" }, R = {
9
+ key: 0,
10
+ class: "text-sm text-muted-foreground mt-1 leading-relaxed"
11
+ }, U = 3, b = 14, re = /* @__PURE__ */ M({
12
+ __name: "ToastNotification",
13
+ props: {
14
+ position: {},
15
+ expand: { type: Boolean }
16
+ },
17
+ setup(W) {
18
+ const { notifications: _, removeToast: w, globalConfig: k, pauseTimers: T, resumeTimers: C } = F(), d = O(!1), z = [
19
+ "top-left",
20
+ "top-center",
21
+ "top-right",
22
+ "bottom-left",
23
+ "bottom-center",
24
+ "bottom-right"
25
+ ], m = (e) => _.value.filter((t) => t.position === e).slice().reverse(), $ = {
26
+ "top-left": "top-0 left-0 py-4",
27
+ "top-center": "top-0 left-1/2 -translate-x-1/2 py-4",
28
+ "top-right": "top-0 right-0 py-4",
29
+ "bottom-left": "bottom-0 left-0",
30
+ "bottom-center": "bottom-0 left-1/2 -translate-x-1/2",
31
+ "bottom-right": "bottom-0 right-0"
32
+ }, B = (e, o, t) => {
33
+ const s = t.includes("bottom"), n = d.value || k.value.expand;
34
+ if (!(e < U) && !n)
35
+ return {
36
+ opacity: 0,
37
+ pointerEvents: "none",
38
+ transform: s ? "translateY(20px) scale(0.9)" : "translateY(-20px) scale(0.9)",
39
+ zIndex: -1
40
+ };
41
+ if (n)
42
+ return {
43
+ transform: `translate3d(0, ${e * ((s ? -1 : 1) * (100 + b))}%, 0) scale(1)`,
44
+ opacity: 1,
45
+ zIndex: o - e
46
+ };
47
+ const j = 1 - e * 0.05, D = s ? -1 : 1;
48
+ return {
49
+ transform: `translate3d(0, ${e * b * D}px, -${e}px) scale(${j})`,
50
+ opacity: 1,
51
+ zIndex: o - e
52
+ };
53
+ }, N = (e) => {
54
+ e.action && (e.action.onClick(), w(e.id));
55
+ }, f = {
56
+ error: "lucide:octagon-x",
57
+ success: "lucide:circle-check",
58
+ info: "lucide:info",
59
+ warning: "lucide:triangle-alert",
60
+ default: "lucide:bell"
61
+ }, p = {
62
+ // Sonner-like: Minimalist, white/black bg, colored icons
63
+ error: "text-red-600",
64
+ success: "text-green-600",
65
+ info: "text-blue-600",
66
+ warning: "text-amber-500",
67
+ default: "text-foreground"
68
+ };
69
+ let a = null;
70
+ const V = () => {
71
+ a && (clearTimeout(a), a = null), d.value = !0, T();
72
+ }, E = () => {
73
+ a = setTimeout(() => {
74
+ d.value = !1, C();
75
+ }, 400);
76
+ }, S = (e) => {
77
+ if (e.includes("center")) return "bottom center";
78
+ const o = e.includes("bottom") ? "bottom" : "top", t = e.includes("right") ? "right" : e.includes("left") ? "left" : "center";
79
+ return `${o} ${t}`;
80
+ };
81
+ return (e, o) => (r(), l("div", H, [
82
+ (r(), l(g, null, x(z, (t) => i("div", {
83
+ key: t,
84
+ class: c(["absolute px-4 flex flex-col gap-2 transition-all duration-300 max-w-full sm:max-w-[420px]", [
85
+ $[t],
86
+ // Align outer container
87
+ t.includes("center") ? "items-center" : t.includes("right") ? "items-end" : "items-start"
88
+ ]]),
89
+ onMouseenter: V,
90
+ onMouseleave: E
91
+ }, [
92
+ i("div", {
93
+ class: c(["relative w-full transition-all pointer-events-auto", [
94
+ { "flex-col-reverse": t.includes("top") }
95
+ // We use grid, so flex-col-reverse on wrapper doesn't matter for stack order,
96
+ // but logic is handled by z-index and transform in getToastStyle.
97
+ ]])
98
+ }, [
99
+ h(A, {
100
+ "enter-active-class": "transition-all duration-300 ease-out-spring",
101
+ "leave-active-class": "transition-all duration-200 ease-in",
102
+ "enter-from-class": "opacity-0 scale-90 translate-y-2",
103
+ "leave-to-class": "opacity-0 scale-90 translate-y-2",
104
+ "move-class": "transition-all duration-500 ease-spring",
105
+ tag: "div",
106
+ class: c(["w-full grid grid-cols-1 grid-rows-1", [
107
+ t.includes("center") ? "justify-items-center" : t.includes("right") ? "justify-items-end" : "justify-items-start"
108
+ ]]),
109
+ style: { "min-height": "20px" }
110
+ }, {
111
+ default: v(() => [
112
+ (r(!0), l(g, null, x(m(t), (s, n) => (r(), l("div", {
113
+ key: s.id,
114
+ "data-index": n,
115
+ "data-pos": t,
116
+ class: "col-start-1 row-start-1 w-auto min-w-[300px] max-w-[calc(100vw-32px)] bg-white dark:bg-zinc-950 border border-border rounded-xl shadow-lg p-4 flex gap-3 items-start transition-all duration-300 ease-[cubic-bezier(0.16,1,0.3,1)] transform-gpu will-change-transform object-cover",
117
+ style: L([
118
+ B(
119
+ n,
120
+ m(t).length,
121
+ t
122
+ ),
123
+ {
124
+ "--hover-offset": t.includes("bottom") ? "-5px" : "5px",
125
+ "transform-origin": S(t)
126
+ }
127
+ ])
128
+ }, [
129
+ h(Y, {
130
+ icon: f[s.type] || f.default,
131
+ class: c([[
132
+ p[s.type] || p.default
133
+ ], "w-5 h-5 shrink-0 mt-0.5"])
134
+ }, null, 8, ["icon", "class"]),
135
+ i("div", K, [
136
+ i("p", Q, u(s.message), 1),
137
+ s.description ? (r(), l("p", R, u(s.description), 1)) : y("", !0)
138
+ ]),
139
+ s.action ? (r(), G(q, {
140
+ key: 0,
141
+ type: "button",
142
+ size: "xs",
143
+ variant: "outline",
144
+ class: "ml-2 shrink-0 h-8 px-3 text-xs",
145
+ onClick: (I) => N(s)
146
+ }, {
147
+ default: v(() => [
148
+ P(u(s.action.label), 1)
149
+ ]),
150
+ _: 2
151
+ }, 1032, ["onClick"])) : y("", !0)
152
+ ], 12, J))), 128))
153
+ ]),
154
+ _: 2
155
+ }, 1032, ["class"])
156
+ ], 2)
157
+ ], 34)), 64))
158
+ ]));
159
+ }
160
+ });
161
+ export {
162
+ re as default
163
+ };
@@ -0,0 +1,25 @@
1
+ import { TooltTipProps } from 'v-tooltip-lite/types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ content?(_: {}): any;
7
+ };
8
+ refs: {};
9
+ rootEl: any;
10
+ };
11
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
+ declare const __VLS_component: import('vue').DefineComponent<TooltTipProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TooltTipProps> & Readonly<{}>, {
13
+ triggerClass: string;
14
+ contentClass: string;
15
+ teleport: boolean;
16
+ placement: import('v-tooltip-lite/types').TooltTipPlacement;
17
+ arrow: boolean;
18
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
19
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
+ export default _default;
21
+ type __VLS_WithTemplateSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,39 @@
1
+ import { defineComponent as n, openBlock as s, createBlock as a, unref as p, mergeProps as i, withCtx as t, renderSlot as o } from "vue";
2
+ import c from "v-tooltip-lite";
3
+ import "v-tooltip-lite/style.css";
4
+ const g = /* @__PURE__ */ n({
5
+ __name: "Tooltip",
6
+ props: {
7
+ content: {},
8
+ placement: { default: "top" },
9
+ offset: {},
10
+ trigger: {},
11
+ arrow: { type: Boolean, default: !0 },
12
+ triggerClass: { default: "" },
13
+ className: {},
14
+ contentClass: { default: "max-w-[350px]" },
15
+ teleport: { type: Boolean, default: !0 },
16
+ styles: {},
17
+ ignoreClickOutside: {},
18
+ isOpen: { type: Boolean },
19
+ menuId: {}
20
+ },
21
+ setup(l) {
22
+ const r = l;
23
+ return (e, u) => (s(), a(p(c), i(r, {
24
+ class: "inline-block",
25
+ "class-name": "basic-tooltip"
26
+ }), {
27
+ trigger: t(() => [
28
+ o(e.$slots, "default")
29
+ ]),
30
+ default: t(() => [
31
+ o(e.$slots, "content")
32
+ ]),
33
+ _: 3
34
+ }, 16));
35
+ }
36
+ });
37
+ export {
38
+ g as default
39
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./Tooltip.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,38 @@
1
+ import { WorkbookSheet } from './types';
2
+ interface Props {
3
+ sheet: WorkbookSheet;
4
+ isActive: boolean;
5
+ isEditing?: boolean;
6
+ canDelete?: boolean;
7
+ confirmDelete?: boolean;
8
+ confirmDeleteTexts?: {
9
+ title?: string;
10
+ description?: string;
11
+ confirm?: string;
12
+ cancel?: string;
13
+ };
14
+ }
15
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
16
+ select: (id: string) => any;
17
+ delete: (id: string) => any;
18
+ "update:title": (id: string, newTitle: string) => any;
19
+ "update:icon": (id: string, newIcon: string) => any;
20
+ "edit-start": (id: string) => any;
21
+ "edit-end": (id: string) => any;
22
+ duplicate: (id: string) => any;
23
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
24
+ onSelect?: (id: string) => any;
25
+ onDelete?: (id: string) => any;
26
+ "onUpdate:title"?: (id: string, newTitle: string) => any;
27
+ "onUpdate:icon"?: (id: string, newIcon: string) => any;
28
+ "onEdit-start"?: (id: string) => any;
29
+ "onEdit-end"?: (id: string) => any;
30
+ onDuplicate?: (id: string) => any;
31
+ }>, {
32
+ isEditing: boolean;
33
+ canDelete: boolean;
34
+ confirmDelete: boolean;
35
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
36
+ inputRef: HTMLInputElement;
37
+ }, HTMLDivElement>;
38
+ export default _default;
@@ -0,0 +1,141 @@
1
+ import { defineComponent as V, ref as h, computed as x, openBlock as c, createElementBlock as d, normalizeClass as D, createElementVNode as r, withModifiers as g, createBlock as b, withCtx as u, createVNode as m, createCommentVNode as y, withDirectives as N, vModelText as $, toDisplayString as k, unref as M, createTextVNode as O, nextTick as R } from "vue";
2
+ import f from "../Icon.vue.js";
3
+ import j from "../Dropdown/Dropdown.vue.js";
4
+ import z from "../IconPicker.vue.js";
5
+ const A = {
6
+ type: "button",
7
+ class: "flex items-center justify-center rounded hover:bg-accent transition-colors p-0.5 outline-none focus-visible:ring-2 focus-visible:ring-primary/20"
8
+ }, K = { class: "flex-1 min-w-0 pr-1" }, U = {
9
+ key: 1,
10
+ class: "block truncate text-sm font-medium leading-normal"
11
+ }, _ = { class: "opacity-0 group-hover:opacity-100 transition-opacity ml-auto pl-1 flex items-center bg-inherit" }, q = { class: "p-1 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors" }, F = {
12
+ class: /* @__PURE__ */ D(["flex items-center"])
13
+ }, L = /* @__PURE__ */ V({
14
+ __name: "Sheet",
15
+ props: {
16
+ sheet: {},
17
+ isActive: { type: Boolean },
18
+ isEditing: { type: Boolean, default: !1 },
19
+ canDelete: { type: Boolean, default: !0 },
20
+ confirmDelete: { type: Boolean, default: !1 },
21
+ confirmDeleteTexts: {}
22
+ },
23
+ emits: ["select", "update:title", "update:icon", "edit-start", "edit-end", "duplicate", "delete"],
24
+ setup(n, { emit: w }) {
25
+ const e = n, o = w, a = h(null), s = h(e.sheet.title), p = () => {
26
+ s.value = e.sheet.title, o("edit-start", e.sheet.id), R(() => {
27
+ a.value?.focus(), a.value?.select();
28
+ });
29
+ }, v = () => {
30
+ if (!e.isEditing) return;
31
+ const t = s.value.trim();
32
+ t ? o("update:title", e.sheet.id, t) : s.value = e.sheet.title, o("edit-end", e.sheet.id);
33
+ }, E = () => {
34
+ s.value = e.sheet.title, o("edit-end", e.sheet.id);
35
+ }, T = (t) => {
36
+ t.key === "Enter" && v(), t.key === "Escape" && E();
37
+ }, B = x(() => [
38
+ { label: "Rename", value: "rename", icon: "lucide:pencil" },
39
+ { label: "Duplicate", value: "duplicate", icon: "lucide:copy" },
40
+ {
41
+ label: "Delete",
42
+ value: "delete",
43
+ icon: "lucide:trash-2",
44
+ class: "text-danger",
45
+ disabled: !e.canDelete,
46
+ confirmation: e.confirmDelete ? {
47
+ title: e.confirmDeleteTexts?.title,
48
+ description: e.confirmDeleteTexts?.description,
49
+ confirmText: e.confirmDeleteTexts?.confirm,
50
+ cancelText: e.confirmDeleteTexts?.cancel,
51
+ variant: "danger"
52
+ } : void 0
53
+ }
54
+ ]), C = (t) => {
55
+ if (t.value === "rename" && p(), t.value === "duplicate" && o("duplicate", e.sheet.id), t.value === "delete") {
56
+ if (!e.canDelete) return;
57
+ o("delete", e.sheet.id);
58
+ }
59
+ }, S = x(() => [
60
+ "group relative flex items-center min-w-[120px] max-w-[240px] h-9 px-3 border-r border-border select-none cursor-pointer transition-all duration-200 ease-out",
61
+ e.isActive ? "bg-muted text-foreground ring-1 ring-border ring-b-0 z-10" : "text-muted-foreground hover:bg-accent/50",
62
+ e.isEditing ? "cursor-text" : ""
63
+ ].join(" "));
64
+ return (t, i) => (c(), d("div", {
65
+ class: D(S.value),
66
+ onClick: i[4] || (i[4] = (l) => o("select", n.sheet.id)),
67
+ onDblclick: p
68
+ }, [
69
+ r("div", {
70
+ onClick: i[1] || (i[1] = g(() => {
71
+ }, ["stop"])),
72
+ class: "mr-2 flex items-center shrink-0"
73
+ }, [
74
+ n.sheet.icon || n.isEditing ? (c(), b(z, {
75
+ key: 0,
76
+ value: n.sheet.icon || "lucide:file",
77
+ position: "bottom-start",
78
+ onOnSelect: i[0] || (i[0] = (l) => o("update:icon", n.sheet.id, l))
79
+ }, {
80
+ default: u(() => [
81
+ r("button", A, [
82
+ m(f, {
83
+ icon: n.sheet.icon || "lucide:file",
84
+ class: "w-4 h-4 opacity-70 hover:opacity-100 transition-opacity"
85
+ }, null, 8, ["icon"])
86
+ ])
87
+ ]),
88
+ _: 1
89
+ }, 8, ["value"])) : y("", !0)
90
+ ]),
91
+ r("div", K, [
92
+ n.isEditing ? N((c(), d("input", {
93
+ key: 0,
94
+ ref_key: "inputRef",
95
+ ref: a,
96
+ "onUpdate:modelValue": i[2] || (i[2] = (l) => s.value = l),
97
+ type: "text",
98
+ class: "w-full bg-transparent border-none outline-none p-0 text-sm font-medium text-foreground placeholder-muted-foreground focus:ring-0",
99
+ onBlur: v,
100
+ onKeydown: T,
101
+ onClick: i[3] || (i[3] = g(() => {
102
+ }, ["stop"]))
103
+ }, null, 544)), [
104
+ [$, s.value]
105
+ ]) : (c(), d("span", U, k(n.sheet.title), 1))
106
+ ]),
107
+ r("div", _, [
108
+ m(M(j), {
109
+ options: B.value,
110
+ position: "bottom-end",
111
+ width: "140px",
112
+ teleport: !0,
113
+ onOnSelect: C
114
+ }, {
115
+ trigger: u(() => [
116
+ r("button", q, [
117
+ m(f, {
118
+ icon: "lucide:more-vertical",
119
+ class: "w-3.5 h-3.5"
120
+ })
121
+ ])
122
+ ]),
123
+ item: u(({ option: l }) => [
124
+ r("div", F, [
125
+ l?.icon ? (c(), b(f, {
126
+ key: 0,
127
+ icon: l?.icon,
128
+ class: "w-3.5 h-3.5 mr-2 opacity-70"
129
+ }, null, 8, ["icon"])) : y("", !0),
130
+ O(" " + k(l?.label), 1)
131
+ ])
132
+ ]),
133
+ _: 1
134
+ }, 8, ["options"])
135
+ ])
136
+ ], 34));
137
+ }
138
+ });
139
+ export {
140
+ L as default
141
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./Sheet.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,54 @@
1
+ import { WorkbookSheet, WorkbookProps, AddButtonPosition } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ 'left-addons'?(_: {}): any;
6
+ 'right-addons'?(_: {}): any;
7
+ default?(_: {}): any;
8
+ };
9
+ refs: {
10
+ scrollContainer: HTMLDivElement;
11
+ parent: HTMLDivElement;
12
+ };
13
+ rootEl: HTMLDivElement;
14
+ };
15
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
+ declare const __VLS_component: import('vue').DefineComponent<WorkbookProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
17
+ "update:modelValue": (id: string) => any;
18
+ change: (id: string) => any;
19
+ delete: (id: string) => any;
20
+ add: () => any;
21
+ "edit-start": (id: string) => any;
22
+ "edit-end": (id: string) => any;
23
+ duplicate: (id: string) => any;
24
+ "update:sheets": (sheets: WorkbookSheet[]) => any;
25
+ }, string, import('vue').PublicProps, Readonly<WorkbookProps> & Readonly<{
26
+ "onUpdate:modelValue"?: (id: string) => any;
27
+ onChange?: (id: string) => any;
28
+ onDelete?: (id: string) => any;
29
+ onAdd?: () => any;
30
+ "onEdit-start"?: (id: string) => any;
31
+ "onEdit-end"?: (id: string) => any;
32
+ onDuplicate?: (id: string) => any;
33
+ "onUpdate:sheets"?: (sheets: WorkbookSheet[]) => any;
34
+ }>, {
35
+ variant: "chrome" | "folder" | "simple" | "card";
36
+ modelValue: string;
37
+ editable: boolean;
38
+ confirmDelete: boolean;
39
+ sheets: WorkbookSheet[];
40
+ addable: boolean;
41
+ draggable: boolean;
42
+ addButtonPosition: AddButtonPosition;
43
+ maxSheets: number;
44
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
45
+ scrollContainer: HTMLDivElement;
46
+ parent: HTMLDivElement;
47
+ }, HTMLDivElement>;
48
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
49
+ export default _default;
50
+ type __VLS_WithTemplateSlots<T, S> = T & {
51
+ new (): {
52
+ $slots: S;
53
+ };
54
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./Workbook.vue2.js";
2
+ /* empty css */
3
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-4ab90ea8"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,146 @@
1
+ import { defineComponent as N, ref as g, watch as p, nextTick as T, computed as U, openBlock as a, createElementBlock as i, createElementVNode as r, renderSlot as m, createCommentVNode as u, Fragment as A, renderList as L, unref as P, createBlock as J, createVNode as x } from "vue";
2
+ import { useDragAndDrop as O } from "@formkit/drag-and-drop/vue";
3
+ import { animations as W } from "@formkit/drag-and-drop";
4
+ import Y from "./Sheet.vue.js";
5
+ import b from "./WorkbookAddButton.vue.js";
6
+ const z = { class: "flex flex-col w-full font-sans" }, F = { class: "flex items-end w-full border-b px-1 gap-2" }, M = {
7
+ key: 0,
8
+ class: "flex items-center mb-1 mr-2"
9
+ }, j = {
10
+ key: 0,
11
+ class: "shrink-0 mb-1"
12
+ }, q = { class: "flex items-center mb-0.5 z-20 sticky right-0 ml-auto box-decoration-clone" }, G = { key: 0 }, H = { key: 1 }, K = { class: "flex-1 relative bg-white w-full" }, te = /* @__PURE__ */ N({
13
+ __name: "Workbook",
14
+ props: {
15
+ modelValue: { default: "" },
16
+ sheets: { default: () => [] },
17
+ editable: { type: Boolean, default: !0 },
18
+ addable: { type: Boolean, default: !0 },
19
+ draggable: { type: Boolean, default: !0 },
20
+ addButtonPosition: { default: "fixed-right" },
21
+ maxSheets: { default: 50 },
22
+ variant: { default: "chrome" },
23
+ class: {},
24
+ confirmDelete: { type: Boolean, default: !1 },
25
+ confirmDeleteTexts: {}
26
+ },
27
+ emits: ["update:modelValue", "update:sheets", "change", "add", "delete", "duplicate", "edit-start", "edit-end"],
28
+ setup(o, { emit: k }) {
29
+ const l = o, s = k, f = g(null), c = g(null), [y, h] = O(l.sheets, {
30
+ plugins: [W()],
31
+ draggable: (e) => l.draggable && !c.value,
32
+ onSort: (e) => {
33
+ s("update:sheets", e.values);
34
+ }
35
+ });
36
+ p(
37
+ () => l.sheets,
38
+ (e) => {
39
+ JSON.stringify(e) !== JSON.stringify(h.value) && (h.value = [...e]);
40
+ },
41
+ { deep: !0 }
42
+ );
43
+ const S = (e) => {
44
+ s("update:modelValue", e), s("change", e);
45
+ }, v = () => {
46
+ l.sheets.length >= l.maxSheets || s("add");
47
+ }, w = (e, d) => {
48
+ const t = l.sheets.findIndex((n) => n.id === e);
49
+ if (t !== -1) {
50
+ const n = [...l.sheets];
51
+ n[t] = { ...n[t], title: d }, s("update:sheets", n);
52
+ }
53
+ }, D = (e, d) => {
54
+ const t = l.sheets.findIndex((n) => n.id === e);
55
+ if (t !== -1) {
56
+ const n = [...l.sheets];
57
+ n[t] = { ...n[t], icon: d }, s("update:sheets", n);
58
+ }
59
+ }, B = (e) => {
60
+ c.value = e, s("edit-start", e);
61
+ }, V = (e) => {
62
+ c.value = null, s("edit-end", e);
63
+ }, E = (e) => {
64
+ s("duplicate", e);
65
+ }, I = (e) => {
66
+ const d = l.sheets.findIndex((n) => n.id === e);
67
+ if (d === -1) return;
68
+ const t = [...l.sheets];
69
+ if (t.splice(d, 1), s("update:sheets", t), s("delete", e), l.modelValue === e) {
70
+ let n = "";
71
+ if (t.length > 0) {
72
+ const C = Math.min(d, t.length - 1);
73
+ n = t[C].id;
74
+ }
75
+ s("update:modelValue", n), s("change", n);
76
+ }
77
+ };
78
+ p(
79
+ () => l.sheets.length,
80
+ (e, d) => {
81
+ e > d && l.addable && T(() => {
82
+ const t = l.sheets[l.sheets.length - 1];
83
+ t.id === l.modelValue && (c.value = t.id);
84
+ });
85
+ }
86
+ );
87
+ const _ = (e) => {
88
+ f.value && e.deltaY !== 0 && (f.value.scrollLeft += e.deltaY, e.preventDefault());
89
+ }, $ = U(() => l.sheets.length > 1);
90
+ return (e, d) => (a(), i("div", z, [
91
+ r("div", F, [
92
+ e.$slots["left-addons"] ? (a(), i("div", M, [
93
+ m(e.$slots, "left-addons", {}, void 0, !0)
94
+ ])) : u("", !0),
95
+ r("div", {
96
+ ref_key: "scrollContainer",
97
+ ref: f,
98
+ class: "flex-1 flex items-end overflow-x-auto scrollbar-none overscroll-contain",
99
+ style: { "scrollbar-width": "none", "-ms-overflow-style": "none" },
100
+ onWheel: _
101
+ }, [
102
+ r("div", {
103
+ ref_key: "parent",
104
+ ref: y,
105
+ class: "flex items-end"
106
+ }, [
107
+ (a(!0), i(A, null, L(P(h), (t) => (a(), J(Y, {
108
+ key: t.id,
109
+ sheet: t,
110
+ "is-active": o.modelValue === t.id,
111
+ "is-editing": c.value === t.id,
112
+ "can-delete": $.value,
113
+ "confirm-delete": o.confirmDelete,
114
+ "confirm-delete-texts": o.confirmDeleteTexts,
115
+ onSelect: S,
116
+ "onUpdate:title": w,
117
+ "onUpdate:icon": D,
118
+ onEditStart: B,
119
+ onEditEnd: V,
120
+ onDuplicate: E,
121
+ onDelete: I
122
+ }, null, 8, ["sheet", "is-active", "is-editing", "can-delete", "confirm-delete", "confirm-delete-texts"]))), 128))
123
+ ], 512),
124
+ o.addable && o.addButtonPosition === "attached" ? (a(), i("div", j, [
125
+ x(b, { onClick: v })
126
+ ])) : u("", !0),
127
+ d[0] || (d[0] = r("div", { class: "w-1 shrink-0" }, null, -1))
128
+ ], 544),
129
+ r("div", q, [
130
+ o.addable && o.addButtonPosition === "fixed-right" ? (a(), i("div", G, [
131
+ x(b, { onClick: v })
132
+ ])) : u("", !0),
133
+ e.$slots["right-addons"] ? (a(), i("div", H, [
134
+ m(e.$slots, "right-addons", {}, void 0, !0)
135
+ ])) : u("", !0)
136
+ ])
137
+ ]),
138
+ r("div", K, [
139
+ m(e.$slots, "default", {}, void 0, !0)
140
+ ])
141
+ ]));
142
+ }
143
+ });
144
+ export {
145
+ te as default
146
+ };
@@ -0,0 +1,6 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
2
+ click: (event: MouseEvent) => any;
3
+ }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
4
+ onClick?: (event: MouseEvent) => any;
5
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLButtonElement>;
6
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import { defineComponent as i, openBlock as r, createBlock as c } from "vue";
2
+ import m from "../Button.vue.js";
3
+ const u = /* @__PURE__ */ i({
4
+ __name: "WorkbookAddButton",
5
+ emits: ["click"],
6
+ setup(s, { emit: o }) {
7
+ const t = o;
8
+ return (d, e) => (r(), c(m, {
9
+ variant: "ghost",
10
+ size: "sm",
11
+ icon: "lucide:plus",
12
+ title: "Add New Sheet",
13
+ rounded: "none",
14
+ onClick: e[0] || (e[0] = (n) => t("click", n))
15
+ }));
16
+ }
17
+ });
18
+ export {
19
+ u as default
20
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./WorkbookAddButton.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,3 @@
1
+ export { default as Workbook } from './Workbook.vue';
2
+ export { default as Sheet } from './Sheet.vue';
3
+ export * from './types';