vlite3 1.4.5 → 1.4.7

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 (67) hide show
  1. package/README.md +1 -0
  2. package/components/AppShell/AppShellLayoutStorefront.vue.d.ts +4 -17
  3. package/components/AppShell/AppShellLayoutStorefront.vue.js +116 -152
  4. package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
  5. package/components/AvatarUploader/AvatarUploader.vue.js +1 -1
  6. package/components/CategoryManager/CategoryManager.vue2.js +2 -2
  7. package/components/Chat/ChatInterface.vue.js +1 -1
  8. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  9. package/components/ColorPicker/ColorPicker.vue.js +2 -2
  10. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  11. package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
  12. package/components/Comment/CommentEditor.vue.js +1 -1
  13. package/components/FilePicker/FilePickerDropzone.vue.d.ts +27 -0
  14. package/components/FilePicker/FilePickerDropzone.vue.js +117 -0
  15. package/components/FilePicker/FilePickerDropzone.vue2.js +4 -0
  16. package/components/FilePicker/FilePickerInput.vue.d.ts +22 -0
  17. package/components/FilePicker/FilePickerInput.vue.js +147 -0
  18. package/components/FilePicker/FilePickerInput.vue2.js +4 -0
  19. package/components/FilePicker/FilePreview.vue.d.ts +21 -0
  20. package/components/FilePicker/FilePreview.vue.js +95 -0
  21. package/components/FilePicker/FilePreview.vue2.js +4 -0
  22. package/components/FilePicker/composables/useFileProcessing.d.ts +65 -0
  23. package/components/FilePicker/composables/useFileProcessing.js +141 -0
  24. package/components/FilePicker/index.d.ts +2 -2
  25. package/components/FilePicker/{FilePicker.vue.d.ts → index.vue.d.ts} +11 -18
  26. package/components/FilePicker/index.vue.js +131 -0
  27. package/components/FilePicker/index.vue2.js +4 -0
  28. package/components/FilePicker/types.d.ts +17 -0
  29. package/components/FilePicker/utils.d.ts +23 -0
  30. package/components/FilePicker/utils.js +37 -0
  31. package/components/Form/AccordionView.vue.d.ts +26 -0
  32. package/components/Form/AccordionView.vue.js +219 -0
  33. package/components/Form/AccordionView.vue2.js +4 -0
  34. package/components/Form/FormField.vue.js +2 -2
  35. package/components/Form/FormFields.vue.js +2 -2
  36. package/components/Form/TableRow.vue.d.ts +18 -0
  37. package/components/Form/TableRow.vue.js +88 -0
  38. package/components/Form/TableRow.vue2.js +4 -0
  39. package/components/Form/TableView.vue.d.ts +23 -0
  40. package/components/Form/TableView.vue.js +88 -0
  41. package/components/Form/TableView.vue2.js +4 -0
  42. package/components/Form/composables/useCustomFieldRows.d.ts +52 -0
  43. package/components/Form/composables/useCustomFieldRows.js +77 -0
  44. package/components/Form/index.d.ts +1 -1
  45. package/components/Form/{CustomFields.vue.d.ts → index.vue.d.ts} +5 -6
  46. package/components/Form/index.vue.js +7 -0
  47. package/components/Form/index.vue2.js +141 -0
  48. package/components/Form/rowHelpers.d.ts +45 -0
  49. package/components/Form/rowHelpers.js +40 -0
  50. package/components/IconPicker.vue.d.ts +2 -2
  51. package/components/ImageMagnifier.vue.d.ts +18 -0
  52. package/components/ImageMagnifier.vue.js +73 -0
  53. package/components/ImageMagnifier.vue2.js +4 -0
  54. package/components/NavbarCommandPalette.vue.js +1 -1
  55. package/components/Screen/ScreenFilter.vue.js +2 -2
  56. package/components/ThumbnailSelector/ThumbnailSelector.vue.js +1 -1
  57. package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +1 -1
  58. package/components/index.d.ts +2 -1
  59. package/index.d.ts +1 -0
  60. package/index.js +107 -105
  61. package/package.json +1 -1
  62. package/style.css +1 -1
  63. package/components/FilePicker/FilePicker.vue.js +0 -437
  64. package/components/FilePicker/FilePicker.vue2.js +0 -4
  65. package/components/Form/CustomFields.vue.js +0 -7
  66. package/components/Form/CustomFields.vue2.js +0 -465
  67. /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
package/README.md CHANGED
@@ -463,6 +463,7 @@ Follow these rules strictly to ensure visual consistency and predictable styling
463
463
  - [x] **Charts**
464
464
  - [x] **GanttChart**
465
465
  - [x] **ImageComparison**
466
+ - [x] **ImageMagnifier**
466
467
 
467
468
  ### Feedback & Overlays
468
469
 
@@ -7,31 +7,18 @@ declare function __VLS_template(): {
7
7
  toggle: () => boolean;
8
8
  }): any;
9
9
  left?(_: {}): any;
10
- left?(_: {}): any;
11
- nav?(_: {}): any;
12
- nav?(_: {}): any;
13
- logo?(_: {}): any;
14
- logo?(_: {}): any;
15
- center?(_: {}): any;
16
10
  center?(_: {}): any;
17
- search?(_: {}): any;
18
- search?(_: {}): any;
19
- actions?(_: {}): any;
20
- actions?(_: {}): any;
21
11
  right?(_: {}): any;
22
- right?(_: {}): any;
23
- 'mobile-search'?(_: {}): any;
24
- categories?(_: {
25
- categoryRoutePrefix: string;
26
- }): any;
12
+ 'mobile-bottom'?(_: {}): any;
27
13
  categories?(_: {
28
14
  categoryRoutePrefix: string;
29
15
  }): any;
30
16
  main?(_: {}): any;
31
17
  footer?(_: {}): any;
32
18
  'mobile-sidebar-header'?(_: {}): any;
33
- 'mobile-sidebar'?(_: {}): any;
34
- 'mobile-nav'?(_: {}): any;
19
+ 'mobile-sidebar'?(_: {
20
+ categoryRoutePrefix: string;
21
+ }): any;
35
22
  'mobile-sidebar-footer'?(_: {}): any;
36
23
  };
37
24
  refs: {
@@ -1,215 +1,179 @@
1
- import { defineComponent as T, inject as P, computed as v, openBlock as r, createElementBlock as t, renderSlot as o, createCommentVNode as i, createElementVNode as d, normalizeClass as a, unref as s, createVNode as b, isRef as y, createSlots as R, withCtx as $ } from "vue";
2
- import V from "../Icon.vue.js";
3
- import j from "../SidePanel.vue.js";
4
- import x from "../Navbar/NavbarTabs.vue.js";
1
+ import { defineComponent as z, inject as T, computed as v, openBlock as t, createElementBlock as i, renderSlot as l, createCommentVNode as d, createElementVNode as a, normalizeClass as n, unref as e, createVNode as f, isRef as y, createSlots as _, withCtx as w } from "vue";
2
+ import R from "../Icon.vue.js";
3
+ import P from "../SidePanel.vue.js";
4
+ import V from "../Navbar/NavbarTabs.vue.js";
5
5
  /* empty css */
6
- import N from "../Breadcrumb/Breadcrumb.vue.js";
6
+ import j from "../Breadcrumb/Breadcrumb.vue.js";
7
7
  /* empty css */
8
- import { APPSHELL_LAYOUT_KEY as B } from "./useAppShell.js";
9
- import { normalizeRoutePrefix as E } from "../CategoryMenu/utils.js";
10
- const L = { class: "vlite-app-layout flex flex-col w-full h-full min-h-0 bg-body text-foreground overflow-hidden" }, M = {
8
+ import { APPSHELL_LAYOUT_KEY as N } from "./useAppShell.js";
9
+ import { normalizeRoutePrefix as B } from "../CategoryMenu/utils.js";
10
+ const E = { class: "vlite-app-layout flex flex-col w-full h-full min-h-0 bg-body text-foreground overflow-hidden" }, L = {
11
11
  key: 0,
12
12
  class: "shrink-0 w-full"
13
- }, O = { class: "w-full mx-auto max-w-7xl px-3 sm:px-4 md:px-6 lg:px-8" }, A = { class: "flex items-center gap-2 min-w-0" }, U = ["aria-label"], Y = { class: "w-full min-w-0 max-w-7xl mx-auto overflow-hidden px-3 sm:px-4 md:px-6 lg:px-8" }, D = {
13
+ }, M = { class: "w-full mx-auto max-w-7xl px-3 sm:px-4 md:px-6 lg:px-8" }, O = ["aria-label"], A = {
14
+ key: 0,
15
+ class: "flex items-center justify-center min-w-0 flex-1 px-2"
16
+ }, U = { class: "w-full min-w-0 max-w-7xl mx-auto overflow-hidden px-3 sm:px-4 md:px-6 lg:px-8" }, Y = {
14
17
  key: 0,
15
18
  class: "shrink-0 w-full"
16
- }, H = {
19
+ }, D = {
17
20
  key: 2,
18
21
  class: "shrink-0 w-full border-t border-border bg-background"
19
- }, I = { class: "flex flex-col h-full" }, K = {
22
+ }, H = { class: "flex flex-col h-full" }, I = {
20
23
  class: "flex-1 overflow-y-auto px-3.5 py-4 space-y-4 scrollbar-thin scrollbar-stable",
21
24
  style: { "will-change": "transform", contain: "layout style" }
22
- }, q = {
25
+ }, K = {
23
26
  key: 0,
24
27
  class: "mt-auto border-t border-border px-3.5 py-3"
25
- }, te = /* @__PURE__ */ T({
28
+ }, te = /* @__PURE__ */ z({
26
29
  __name: "AppShellLayoutStorefront",
27
- setup(F) {
28
- const w = P(B), {
29
- props: l,
30
- isMobileMenuOpen: n,
31
- isSidebarVisible: G,
32
- toggleSidebar: J,
33
- pageTitle: Q,
34
- breadcrumbData: g,
35
- breakpointClasses: m,
36
- nestedTabsItems: p,
30
+ setup(q) {
31
+ const k = T(N), {
32
+ props: s,
33
+ isMobileMenuOpen: r,
34
+ isSidebarVisible: F,
35
+ toggleSidebar: G,
36
+ pageTitle: J,
37
+ breadcrumbData: p,
38
+ breakpointClasses: u,
39
+ nestedTabsItems: g,
37
40
  activeNestedTab: c,
38
- handleNestedTabClick: k,
39
- mainScrollRef: C,
40
- layoutMainRef: S
41
- } = w, z = v(() => [
41
+ handleNestedTabClick: x,
42
+ mainScrollRef: $,
43
+ layoutMainRef: C
44
+ } = k, S = v(() => [
42
45
  "w-full shrink-0 bg-background transition-shadow duration-200",
43
46
  {
44
47
  fixed: "fixed top-0 left-0 z-50",
45
48
  sticky: "sticky top-0 z-50",
46
49
  relative: "relative z-20",
47
50
  absolute: "absolute top-0 left-0 w-full z-50"
48
- }[l.position || "sticky"],
49
- l.border ? "border-b border-border" : "",
50
- l.glass ? "bg-background/90 backdrop-blur-md" : "",
51
- l.floating ? "m-3 rounded-lg border border-border shadow-sm overflow-hidden" : "",
52
- l.class
53
- ].filter(Boolean).join(" ")), h = v(() => E(l.categoryRoutePrefix));
54
- return (e, u) => (r(), t("div", L, [
55
- e.$slots.announcement ? (r(), t("div", M, [
56
- o(e.$slots, "announcement")
57
- ])) : i("", !0),
58
- d("header", {
59
- class: a(z.value)
51
+ }[s.position || "sticky"],
52
+ s.border ? "border-b border-border" : "",
53
+ s.glass ? "bg-background/90 backdrop-blur-md" : "",
54
+ s.floating ? "m-3 rounded-lg border border-border shadow-sm overflow-hidden" : "",
55
+ s.class
56
+ ].filter(Boolean).join(" ")), h = v(() => B(s.categoryRoutePrefix));
57
+ return (o, m) => (t(), i("div", E, [
58
+ o.$slots.announcement ? (t(), i("div", L, [
59
+ l(o.$slots, "announcement")
60
+ ])) : d("", !0),
61
+ a("header", {
62
+ class: n(S.value)
60
63
  }, [
61
- d("div", O, [
62
- d("div", {
63
- class: a(["grid w-full grid-cols-[auto_minmax(0,1fr)_auto] md:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3", s(l).height])
64
+ a("div", M, [
65
+ a("div", {
66
+ class: n(["flex w-full items-center justify-between gap-3 md:gap-6", e(s).height])
64
67
  }, [
65
- d("div", A, [
66
- o(e.$slots, "mobile-trigger", {
67
- isOpen: s(n),
68
- toggle: () => n.value = !s(n)
68
+ a("div", {
69
+ class: n(["flex items-center gap-2 sm:gap-4 min-w-0 shrink-0", { "flex-1": !o.$slots.center }])
70
+ }, [
71
+ l(o.$slots, "mobile-trigger", {
72
+ isOpen: e(r),
73
+ toggle: () => r.value = !e(r)
69
74
  }, () => [
70
- d("button", {
75
+ a("button", {
71
76
  type: "button",
72
- class: a(["inline-flex items-center justify-center w-9 h-9 rounded-md text-muted-foreground hover:text-foreground hover:bg-accent", [s(m).mobileTrigger, s(l).mobileTriggerClass]]),
73
- "aria-label": s(n) ? "Close menu" : "Open menu",
74
- onClick: u[0] || (u[0] = (f) => n.value = !s(n))
77
+ class: n(["inline-flex items-center justify-center w-9 h-9 rounded-md text-muted-foreground hover:text-foreground hover:bg-accent", [e(u).mobileTrigger, e(s).mobileTriggerClass]]),
78
+ "aria-label": e(r) ? "Close menu" : "Open menu",
79
+ onClick: m[0] || (m[0] = (b) => r.value = !e(r))
75
80
  }, [
76
- b(V, {
77
- icon: s(n) ? "lucide:x" : "lucide:menu",
81
+ f(R, {
82
+ icon: e(r) ? "lucide:x" : "lucide:menu",
78
83
  class: "w-5 h-5"
79
84
  }, null, 8, ["icon"])
80
- ], 10, U)
85
+ ], 10, O)
81
86
  ]),
82
- e.$slots.left ? (r(), t("div", {
83
- key: 0,
84
- class: a(["items-center gap-2 min-w-0", s(m).desktopContent])
85
- }, [
86
- o(e.$slots, "left")
87
- ], 2)) : i("", !0),
88
- e.$slots.nav ? (r(), t("nav", {
89
- key: 1,
90
- class: a(["items-center gap-1 min-w-0", s(m).desktopContent]),
91
- "aria-label": "Primary navigation"
92
- }, [
93
- o(e.$slots, "nav")
94
- ], 2)) : i("", !0)
95
- ]),
96
- e.$slots.logo || e.$slots.center ? (r(), t("div", {
97
- key: 0,
98
- class: a(["min-w-0 justify-self-center flex items-center justify-center", s(l).logoClass])
99
- }, [
100
- o(e.$slots, "logo", {}, () => [
101
- o(e.$slots, "center")
102
- ])
103
- ], 2)) : i("", !0),
104
- d("div", {
105
- class: a(["flex items-center justify-end gap-2 min-w-0 justify-self-end", s(l).rightClass])
87
+ l(o.$slots, "left")
88
+ ], 2),
89
+ o.$slots.center ? (t(), i("div", A, [
90
+ l(o.$slots, "center")
91
+ ])) : d("", !0),
92
+ a("div", {
93
+ class: n(["flex items-center justify-end gap-2 sm:gap-4 min-w-0 shrink-0", [e(s).rightClass, { "flex-1": !o.$slots.center }]])
106
94
  }, [
107
- e.$slots.search ? (r(), t("div", {
108
- key: 0,
109
- class: a(["items-center min-w-0 w-full max-w-sm", s(m).desktopContent])
110
- }, [
111
- o(e.$slots, "search")
112
- ], 2)) : i("", !0),
113
- o(e.$slots, "actions", {}, () => [
114
- o(e.$slots, "right")
115
- ])
95
+ l(o.$slots, "right")
116
96
  ], 2)
117
97
  ], 2),
118
- e.$slots["mobile-search"] || e.$slots.search ? (r(), t("div", {
98
+ o.$slots["mobile-bottom"] ? (t(), i("div", {
119
99
  key: 0,
120
- class: a(["pb-3", s(m).mobileTrigger])
100
+ class: n(["pb-3 w-full", e(u).mobileTrigger])
121
101
  }, [
122
- o(e.$slots, "mobile-search", {}, () => [
123
- o(e.$slots, "search")
124
- ])
125
- ], 2)) : i("", !0)
102
+ l(o.$slots, "mobile-bottom")
103
+ ], 2)) : d("", !0)
126
104
  ]),
127
- e.$slots.categories ? (r(), t("div", {
105
+ o.$slots.categories ? (t(), i("div", {
128
106
  key: 0,
129
- class: a(["w-full min-w-0 overflow-hidden border-t border-border bg-background", [s(m).desktopContent, s(l).menuClass]])
107
+ class: n(["w-full min-w-0 overflow-hidden border-t border-border bg-background", [e(u).desktopContent, e(s).menuClass]])
130
108
  }, [
131
- d("div", Y, [
132
- o(e.$slots, "categories", { categoryRoutePrefix: h.value })
109
+ a("div", U, [
110
+ l(o.$slots, "categories", { categoryRoutePrefix: h.value })
133
111
  ])
134
- ], 2)) : i("", !0)
112
+ ], 2)) : d("", !0)
135
113
  ], 2),
136
- e.$slots.main ? (r(), t("main", {
114
+ o.$slots.main ? (t(), i("main", {
137
115
  key: 1,
138
116
  ref_key: "layoutMainRef",
139
- ref: S,
117
+ ref: C,
140
118
  class: "flex-1 overflow-hidden w-full relative flex flex-col min-h-0"
141
119
  }, [
142
- s(l).renderNestedTabs && s(p).length > 0 ? (r(), t("div", D, [
143
- b(x, {
144
- modelValue: s(c),
145
- "onUpdate:modelValue": u[1] || (u[1] = (f) => y(c) ? c.value = f : null),
146
- onChange: s(k),
147
- items: s(p)
120
+ e(s).renderNestedTabs && e(g).length > 0 ? (t(), i("div", Y, [
121
+ f(V, {
122
+ modelValue: e(c),
123
+ "onUpdate:modelValue": m[1] || (m[1] = (b) => y(c) ? c.value = b : null),
124
+ onChange: e(x),
125
+ items: e(g)
148
126
  }, null, 8, ["modelValue", "onChange", "items"])
149
- ])) : i("", !0),
150
- s(l).breadcrumb && s(l).breadcrumbPosition === "main" && s(g).items.value.length > 1 ? (r(), t("div", {
127
+ ])) : d("", !0),
128
+ e(s).breadcrumb && e(s).breadcrumbPosition === "main" && e(p).items.value.length > 1 ? (t(), i("div", {
151
129
  key: 1,
152
- class: a(["shrink-0 w-full border-b border-border px-6 py-2", s(l).breadcrumbClass])
130
+ class: n(["shrink-0 w-full border-b border-border px-6 py-2", e(s).breadcrumbClass])
153
131
  }, [
154
- b(s(N), {
155
- items: s(g).items.value,
156
- variant: s(l).breadcrumbVariant,
157
- separator: s(l).breadcrumbSeparator,
158
- size: s(l).breadcrumbSize
132
+ f(e(j), {
133
+ items: e(p).items.value,
134
+ variant: e(s).breadcrumbVariant,
135
+ separator: e(s).breadcrumbSeparator,
136
+ size: e(s).breadcrumbSize
159
137
  }, null, 8, ["items", "variant", "separator", "size"])
160
- ], 2)) : i("", !0),
161
- d("div", {
138
+ ], 2)) : d("", !0),
139
+ a("div", {
162
140
  ref_key: "mainScrollRef",
163
- ref: C,
141
+ ref: $,
164
142
  style: { "will-change": "transform", contain: "layout style" },
165
- class: a(["flex-1 overflow-y-auto w-full relative h-full scrollbar-thin scrollbar-stable", s(l).contentClass])
143
+ class: n(["flex-1 overflow-y-auto w-full relative h-full scrollbar-thin scrollbar-stable", e(s).contentClass])
166
144
  }, [
167
- o(e.$slots, "main")
145
+ l(o.$slots, "main")
168
146
  ], 2)
169
- ], 512)) : i("", !0),
170
- e.$slots.footer ? (r(), t("footer", H, [
171
- o(e.$slots, "footer")
172
- ])) : i("", !0),
173
- b(j, {
174
- show: s(n),
175
- "onUpdate:show": u[2] || (u[2] = (f) => y(n) ? n.value = f : null),
147
+ ], 512)) : d("", !0),
148
+ o.$slots.footer ? (t(), i("footer", D, [
149
+ l(o.$slots, "footer")
150
+ ])) : d("", !0),
151
+ f(P, {
152
+ show: e(r),
153
+ "onUpdate:show": m[2] || (m[2] = (b) => y(r) ? r.value = b : null),
176
154
  position: "left",
177
155
  size: "sm",
178
- triggerClass: s(m).mobileTrigger,
179
- class: a(["z-60", s(m).mobileTrigger]),
156
+ triggerClass: e(u).mobileTrigger,
157
+ class: n(["z-60", e(u).mobileTrigger]),
180
158
  headerClass: "pl-3! pr-4.5! py-3!",
181
159
  bodyClass: "p-0!"
182
- }, R({
183
- default: $(() => [
184
- d("div", I, [
185
- d("div", K, [
186
- o(e.$slots, "mobile-sidebar", {}, () => [
187
- o(e.$slots, "mobile-nav", {}, () => [
188
- o(e.$slots, "nav")
189
- ]),
190
- o(e.$slots, "categories", { categoryRoutePrefix: h.value }),
191
- o(e.$slots, "left")
192
- ])
160
+ }, _({
161
+ default: w(() => [
162
+ a("div", H, [
163
+ a("div", I, [
164
+ l(o.$slots, "mobile-sidebar", { categoryRoutePrefix: h.value })
193
165
  ]),
194
- e.$slots["mobile-sidebar-footer"] || e.$slots.actions || e.$slots.right ? (r(), t("div", q, [
195
- o(e.$slots, "mobile-sidebar-footer", {}, () => [
196
- o(e.$slots, "actions", {}, () => [
197
- o(e.$slots, "right")
198
- ])
199
- ])
200
- ])) : i("", !0)
166
+ o.$slots["mobile-sidebar-footer"] ? (t(), i("div", K, [
167
+ l(o.$slots, "mobile-sidebar-footer")
168
+ ])) : d("", !0)
201
169
  ])
202
170
  ]),
203
171
  _: 2
204
172
  }, [
205
- e.$slots["mobile-sidebar-header"] || e.$slots.logo || e.$slots.center ? {
173
+ o.$slots["mobile-sidebar-header"] ? {
206
174
  name: "header",
207
- fn: $(() => [
208
- o(e.$slots, "mobile-sidebar-header", {}, () => [
209
- o(e.$slots, "logo", {}, () => [
210
- o(e.$slots, "center")
211
- ])
212
- ])
175
+ fn: w(() => [
176
+ l(o.$slots, "mobile-sidebar-header")
213
177
  ]),
214
178
  key: "0"
215
179
  } : void 0
@@ -1,4 +1,4 @@
1
- import { FilePickerValue } from '../FilePicker/FilePicker.vue';
1
+ import { FilePickerValue } from '../FilePicker/types';
2
2
  import { AvatarSize, AvatarRounded } from '../../types';
3
3
  export interface Props {
4
4
  modelValue?: any;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as x, ref as w, computed as z, openBlock as i, createElementBlock as n, createElementVNode as b, normalizeClass as r, createVNode as o, withCtx as V, createCommentVNode as g, withModifiers as C } from "vue";
2
2
  import c from "../Icon.vue.js";
3
- import U from "../FilePicker/FilePicker.vue.js";
3
+ import U from "../FilePicker/index.vue.js";
4
4
  import $ from "../Avatar.vue.js";
5
5
  const A = ["data-testid"], R = ["onClick"], F = /* @__PURE__ */ x({
6
6
  name: "AvatarUploader",
@@ -17,10 +17,10 @@ import "v-datepicker-lite";
17
17
  import "v-datepicker-lite/style.css";
18
18
  import "@jaames/iro";
19
19
  import "@vueuse/core";
20
- /* empty css */
20
+ /* empty css */
21
21
  import qe from "../IconPicker.vue.js";
22
22
  /* empty css */
23
- /* empty css */
23
+ /* empty css */
24
24
  /* empty css */
25
25
  /* empty css */
26
26
  /* empty css */
@@ -2,7 +2,7 @@ import { defineComponent as te, ref as p, computed as w, onMounted as le, onUnmo
2
2
  import ce from "./ChatBubble.vue.js";
3
3
  import V from "../Button.vue.js";
4
4
  import K from "../Icon.vue.js";
5
- import ue from "../FilePicker/FilePicker.vue.js";
5
+ import ue from "../FilePicker/index.vue.js";
6
6
  import { useFileUpload as fe } from "../Form/composables/useFileUpload.js";
7
7
  import { $t as u } from "../../utils/i18n.js";
8
8
  const me = { class: "flex flex-col w-full h-full flex-1 min-h-0 bg-transparent" }, ve = {
@@ -1,5 +1,5 @@
1
- import o from "./ColorIro.vue2.js";
2
- /* empty css */
1
+ import o from "./ColorIro.vue.js";
2
+ /* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -7,8 +7,8 @@ import "../../core/config.js";
7
7
  /* empty css */
8
8
  /* empty css */
9
9
  import E from "../Button.vue.js";
10
- import _ from "./ColorIro.vue2.js";
11
- /* empty css */
10
+ import _ from "./ColorIro.vue.js";
11
+ /* empty css */
12
12
  import { useEyeDropper as I } from "@vueuse/core";
13
13
  const N = { class: "absolute left-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center z-20 pointer-events-none" }, j = {
14
14
  key: 0,
@@ -4,7 +4,7 @@ import k from "../Icon.vue.js";
4
4
  import { $t as E } from "../../utils/i18n.js";
5
5
  import { useCommandPaletteItems as Y } from "./useCommandPaletteItems.js";
6
6
  import { useCommandPaletteNav as Z } from "./useCommandPaletteNav.js";
7
- import ee from "./CommandPaletteItem.vue.js";
7
+ import ee from "./CommandPaletteItem.vue2.js";
8
8
  const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3 border-b border-border/80 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
9
9
  key: 0,
10
10
  class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
@@ -1,5 +1,5 @@
1
1
  import t from "./CommandPaletteItem.vue3.js";
2
- /* empty css */
2
+ /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-66b1ae06"]]);
5
5
  export {
@@ -3,7 +3,7 @@ import { $t as k } from "../../utils/i18n.js";
3
3
  import C from "../Button.vue.js";
4
4
  import w from "../Icon.vue.js";
5
5
  import O from "../Avatar.vue.js";
6
- import Q from "../FilePicker/FilePicker.vue.js";
6
+ import Q from "../FilePicker/index.vue.js";
7
7
  import { useFileUpload as W } from "../Form/composables/useFileUpload.js";
8
8
  const X = { class: "flex-1 min-w-0 flex flex-col gap-2" }, Y = {
9
9
  key: 0,
@@ -0,0 +1,27 @@
1
+ import { FilePickerValue } from './types';
2
+ interface Props {
3
+ displayFiles: FilePickerValue[];
4
+ hasValue: boolean;
5
+ multiSelect: boolean;
6
+ maxFiles?: number;
7
+ loading: boolean;
8
+ isProcessing: boolean;
9
+ disabled: boolean;
10
+ allowRename: boolean;
11
+ fileTypes: string[];
12
+ displayText: string;
13
+ dragAndDropLabel: string;
14
+ enterFileNameLabel: string;
15
+ renameFileLabel: string;
16
+ addMoreLabel: string;
17
+ dataTestid: string;
18
+ getPreviewSrc: (file: FilePickerValue) => string;
19
+ onTrigger: () => void;
20
+ onRemove: (index: number) => void;
21
+ onRename: (index: number, newName: string) => void;
22
+ onDrop: (fileList: FileList) => void;
23
+ }
24
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
25
+ containerRef: HTMLDivElement;
26
+ }, HTMLDivElement>;
27
+ export default _default;
@@ -0,0 +1,117 @@
1
+ import { defineComponent as F, ref as u, computed as D, openBlock as n, createElementBlock as t, normalizeClass as k, createElementVNode as o, createBlock as s, toDisplayString as d, createTextVNode as T, createCommentVNode as g, Fragment as w, renderList as L, unref as B, createVNode as P } from "vue";
2
+ import f from "../Icon.vue.js";
3
+ import R from "../Button.vue.js";
4
+ import p from "./FilePreview.vue.js";
5
+ import { isImageFile as C } from "./utils.js";
6
+ const N = ["data-testid"], S = { class: "p-3 bg-muted rounded-full text-muted-foreground" }, V = { class: "space-y-1" }, z = { class: "text-sm font-medium text-foreground" }, A = { class: "text-primary hover:underline" }, M = {
7
+ key: 0,
8
+ class: "text-xs text-muted-foreground"
9
+ }, $ = {
10
+ key: 1,
11
+ class: "space-y-2"
12
+ }, j = {
13
+ key: 0,
14
+ class: "flex gap-2"
15
+ }, H = /* @__PURE__ */ F({
16
+ __name: "FilePickerDropzone",
17
+ props: {
18
+ displayFiles: {},
19
+ hasValue: { type: Boolean },
20
+ multiSelect: { type: Boolean },
21
+ maxFiles: {},
22
+ loading: { type: Boolean },
23
+ isProcessing: { type: Boolean },
24
+ disabled: { type: Boolean },
25
+ allowRename: { type: Boolean },
26
+ fileTypes: {},
27
+ displayText: {},
28
+ dragAndDropLabel: {},
29
+ enterFileNameLabel: {},
30
+ renameFileLabel: {},
31
+ addMoreLabel: {},
32
+ dataTestid: {},
33
+ getPreviewSrc: { type: Function },
34
+ onTrigger: { type: Function },
35
+ onRemove: { type: Function },
36
+ onRename: { type: Function },
37
+ onDrop: { type: Function }
38
+ },
39
+ setup(e) {
40
+ const a = e, l = u(!1), y = u(null), b = (i) => {
41
+ i.preventDefault(), !(a.disabled || a.loading) && (l.value = !0);
42
+ }, v = (i) => {
43
+ i.preventDefault(), l.value = !1;
44
+ }, x = (i) => {
45
+ i.preventDefault(), l.value = !1, !(a.disabled || a.loading || a.isProcessing) && i.dataTransfer?.files && a.onDrop(i.dataTransfer.files);
46
+ }, h = D(() => a.multiSelect ? a.maxFiles ? a.displayFiles.length < a.maxFiles : !0 : !1);
47
+ return (i, c) => (n(), t("div", {
48
+ ref_key: "containerRef",
49
+ ref: y,
50
+ class: "relative",
51
+ "data-testid": e.dataTestid,
52
+ onDragover: b,
53
+ onDragleave: v,
54
+ onDrop: x
55
+ }, [
56
+ e.hasValue ? (n(), t("div", $, [
57
+ (n(!0), t(w, null, L(e.displayFiles, (r, m) => (n(), s(p, {
58
+ key: m,
59
+ file: r,
60
+ index: m,
61
+ "allow-rename": e.allowRename,
62
+ disabled: e.disabled,
63
+ loading: e.loading,
64
+ "is-processing": e.isProcessing,
65
+ "multi-select": e.multiSelect,
66
+ "enter-file-name-label": e.enterFileNameLabel,
67
+ "rename-file-label": e.renameFileLabel,
68
+ "get-preview-src": e.getPreviewSrc,
69
+ "is-image": B(C),
70
+ "on-remove": e.onRemove,
71
+ "on-rename": e.onRename,
72
+ "on-trigger": e.onTrigger
73
+ }, null, 8, ["file", "index", "allow-rename", "disabled", "loading", "is-processing", "multi-select", "enter-file-name-label", "rename-file-label", "get-preview-src", "is-image", "on-remove", "on-rename", "on-trigger"]))), 128)),
74
+ h.value ? (n(), t("div", j, [
75
+ P(R, {
76
+ size: "sm",
77
+ variant: "outline",
78
+ icon: "lucide:plus",
79
+ text: e.addMoreLabel,
80
+ disabled: e.disabled || e.loading || e.isProcessing,
81
+ onClick: e.onTrigger
82
+ }, null, 8, ["text", "disabled", "onClick"])
83
+ ])) : g("", !0)
84
+ ])) : (n(), t("div", {
85
+ key: 0,
86
+ class: k(["border-2 bg-body border-dashed border-border rounded-lg p-6 transition-all duration-200 ease-in-out cursor-pointer flex flex-col items-center justify-center text-center gap-2", [
87
+ l.value ? "border-primary bg-primary/5" : "hover:border-primary/50",
88
+ e.disabled || e.loading || e.isProcessing ? "opacity-50 cursor-not-allowed" : ""
89
+ ]]),
90
+ onClick: c[0] || (c[0] = //@ts-ignore
91
+ (...r) => e.onTrigger && e.onTrigger(...r))
92
+ }, [
93
+ o("div", S, [
94
+ e.loading || e.isProcessing ? (n(), s(f, {
95
+ key: 0,
96
+ icon: "lucide:loader-2",
97
+ class: "w-6 h-6 animate-spin"
98
+ })) : (n(), s(f, {
99
+ key: 1,
100
+ icon: "lucide:upload-cloud",
101
+ class: "w-6 h-6"
102
+ }))
103
+ ]),
104
+ o("div", V, [
105
+ o("p", z, [
106
+ o("span", A, d(e.displayText), 1),
107
+ T(" " + d(e.dragAndDropLabel), 1)
108
+ ]),
109
+ e.fileTypes.length ? (n(), t("p", M, d(e.fileTypes.join(", ")), 1)) : g("", !0)
110
+ ])
111
+ ], 2))
112
+ ], 40, N));
113
+ }
114
+ });
115
+ export {
116
+ H as default
117
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./FilePickerDropzone.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,22 @@
1
+ import { FilePickerValue } from './types';
2
+ import { InputSize, InputRounded } from '../../types';
3
+ interface Props {
4
+ displayFiles: FilePickerValue[];
5
+ firstDisplayFile?: FilePickerValue;
6
+ hasValue: boolean;
7
+ multiSelect: boolean;
8
+ loading: boolean;
9
+ isProcessing: boolean;
10
+ disabled: boolean;
11
+ displayPlaceholder: string;
12
+ acceptedFileSummary: string;
13
+ size: InputSize;
14
+ rounded: InputRounded;
15
+ getPreviewSrc: (file: FilePickerValue) => string;
16
+ dataTestid: string;
17
+ triggerAriaLabel: string;
18
+ onTrigger: () => void;
19
+ onClear: () => void;
20
+ }
21
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
22
+ export default _default;