vlite3 0.8.11 → 0.9.2

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 (84) hide show
  1. package/components/AttachmentsList/AttachmentsList.vue.d.ts +6 -0
  2. package/components/AttachmentsList/AttachmentsList.vue.js +82 -0
  3. package/components/AttachmentsList/AttachmentsList.vue2.js +4 -0
  4. package/components/AttachmentsList/index.d.ts +2 -0
  5. package/components/AttachmentsList/types.d.ts +11 -0
  6. package/components/Button.vue.js +6 -6
  7. package/components/Chat/ChatBubble.vue.d.ts +18 -0
  8. package/components/Chat/ChatInterface.vue.d.ts +45 -0
  9. package/components/Chat/index.d.ts +2 -0
  10. package/components/DataList/DataList.vue.d.ts +1 -1
  11. package/components/DataTable/DataTable.vue.d.ts +3 -3
  12. package/components/DataTable/DataTable.vue.js +22 -22
  13. package/components/DataTable/types.d.ts +1 -1
  14. package/components/DatePicker.vue.d.ts +3 -2
  15. package/components/DatePicker.vue.js +1 -1
  16. package/components/Dropdown/Dropdown.vue.d.ts +2 -0
  17. package/components/Dropdown/Dropdown.vue.js +106 -90
  18. package/components/Dropdown/DropdownItem.vue.js +8 -8
  19. package/components/Dropdown/DropdownMenu.vue.js +2 -2
  20. package/components/Dropdown/DropdownMenu.vue2.js +1 -1
  21. package/components/ExportData/ExportData.vue.d.ts +1 -1
  22. package/components/FilePicker/FilePicker.vue.d.ts +4 -1
  23. package/components/FilePicker/FilePicker.vue.js +189 -139
  24. package/components/FilePreview/FilePreview.vue.d.ts +5 -0
  25. package/components/FilePreview/FilePreview.vue.js +27 -0
  26. package/components/FilePreview/FilePreview.vue2.js +4 -0
  27. package/components/FilePreview/index.d.ts +2 -0
  28. package/components/FilePreview/types.d.ts +5 -0
  29. package/components/Form/FormField.vue.js +3 -1
  30. package/components/Form/composables/useForm.js +50 -47
  31. package/components/Input.vue.d.ts +1 -0
  32. package/components/Input.vue.js +18 -15
  33. package/components/Modal.vue.js +2 -2
  34. package/components/Modal.vue2.js +31 -31
  35. package/components/MultiSelect/MultiSelect.vue.js +92 -84
  36. package/components/Navbar/Navbar.vue.js +61 -60
  37. package/components/Screen/Screen.vue.d.ts +200 -7
  38. package/components/Screen/Screen.vue.js +306 -502
  39. package/components/Screen/ScreenFilter.vue.js +45 -42
  40. package/components/Screen/components/ScreenAddAction.vue.d.ts +15 -0
  41. package/components/Screen/components/ScreenAddAction.vue.js +107 -0
  42. package/components/Screen/components/ScreenAddAction.vue2.js +4 -0
  43. package/components/Screen/components/ScreenEmptyState.vue.d.ts +14 -0
  44. package/components/Screen/components/ScreenEmptyState.vue.js +105 -0
  45. package/components/Screen/components/ScreenEmptyState.vue2.js +4 -0
  46. package/components/Screen/components/ScreenExportModal.vue.d.ts +49 -0
  47. package/components/Screen/components/ScreenExportModal.vue.js +83 -0
  48. package/components/Screen/components/ScreenExportModal.vue2.js +4 -0
  49. package/components/Screen/components/ScreenHeaderTitle.vue.d.ts +28 -0
  50. package/components/Screen/components/ScreenHeaderTitle.vue.js +57 -0
  51. package/components/Screen/components/ScreenHeaderTitle.vue2.js +4 -0
  52. package/components/Screen/components/ScreenOptionsDropdown.vue.d.ts +10 -0
  53. package/components/Screen/components/ScreenOptionsDropdown.vue.js +43 -0
  54. package/components/Screen/components/ScreenOptionsDropdown.vue2.js +4 -0
  55. package/components/Screen/components/ScreenQuickFilters.vue.d.ts +15 -0
  56. package/components/Screen/components/ScreenQuickFilters.vue.js +36 -0
  57. package/components/Screen/components/ScreenQuickFilters.vue2.js +4 -0
  58. package/components/Screen/components/ScreenViewToggle.vue.d.ts +9 -0
  59. package/components/Screen/components/ScreenViewToggle.vue.js +48 -0
  60. package/components/Screen/components/ScreenViewToggle.vue2.js +4 -0
  61. package/components/Screen/index.d.ts +1 -0
  62. package/components/Screen/types.d.ts +41 -2
  63. package/components/SidePanel.vue.js +1 -1
  64. package/components/SidePanel.vue2.js +7 -7
  65. package/components/SidebarMenu/SidebarMenu.vue.js +1 -1
  66. package/components/Stats/Stats.vue.js +50 -49
  67. package/components/StatusChip/StatusChip.vue.d.ts +2 -2
  68. package/components/StatusChip/StatusChip.vue.js +15 -14
  69. package/components/StatusChip/status-map.d.ts +2 -1
  70. package/components/StatusChip/status-map.js +16 -6
  71. package/components/Tabes/Tabes.vue.d.ts +1 -1
  72. package/components/Tabes/Tabes.vue.js +5 -143
  73. package/components/Tabes/Tabes.vue2.js +144 -2
  74. package/components/Timeline/TimelineIndicator.vue.js +6 -6
  75. package/components/Workbook/Sheet.vue.d.ts +1 -1
  76. package/core/config.d.ts +8 -0
  77. package/core/config.js +10 -6
  78. package/core/index.js +28 -20
  79. package/index.d.ts +2 -0
  80. package/index.js +209 -203
  81. package/package.json +3 -2
  82. package/style.css +80 -6
  83. package/types/config.type.d.ts +10 -0
  84. package/types/form.type.d.ts +1 -0
@@ -1,4 +1,146 @@
1
- import f from "./Tabes.vue.js";
1
+ import { defineComponent as E, ref as b, watch as l, onMounted as D, computed as g, openBlock as i, createElementBlock as p, normalizeClass as u, normalizeStyle as N, createCommentVNode as y, Fragment as O, renderList as P, createBlock as x, resolveDynamicComponent as T, mergeProps as F, withCtx as _, createElementVNode as q, toDisplayString as G, nextTick as H } from "vue";
2
+ import { useResizeObserver as J } from "@vueuse/core";
3
+ import K from "../Icon.vue.js";
4
+ import { $t as Q } from "../../utils/i18n.js";
5
+ const Z = /* @__PURE__ */ E({
6
+ __name: "Tabes",
7
+ props: {
8
+ options: {},
9
+ modelValue: {},
10
+ size: { default: "md" },
11
+ variant: { default: "surface" },
12
+ block: { type: Boolean, default: !1 },
13
+ textClass: {},
14
+ wrap: { type: Boolean, default: !1 }
15
+ },
16
+ emits: ["update:modelValue", "change"],
17
+ setup(s, { emit: h }) {
18
+ const a = s, v = h, d = b(null), f = b(/* @__PURE__ */ new Map()), k = (e, n) => {
19
+ e ? f.value.set(n, e) : f.value.delete(n);
20
+ }, m = b({
21
+ width: "0px",
22
+ height: "0px",
23
+ transform: "translate(0px, 0px)",
24
+ opacity: 0
25
+ }), o = async () => {
26
+ await H();
27
+ const e = d.value, n = f.value.get(a.modelValue);
28
+ if (!e || !n) {
29
+ m.value.opacity = 0;
30
+ return;
31
+ }
32
+ const t = e.getBoundingClientRect(), r = n.getBoundingClientRect(), c = r.left - t.left, M = r.top - t.top, j = r.width, A = r.height;
33
+ m.value = {
34
+ width: `${j}px`,
35
+ height: `${A}px`,
36
+ transform: `translate(${c}px, ${M}px)`,
37
+ opacity: 1
38
+ };
39
+ };
40
+ J(d, o), l(() => a.modelValue, o), l(() => a.options, o, { deep: !0 }), l(() => a.size, o), l(() => a.block, o), l(() => a.wrap, o), D(o);
41
+ const C = (e) => {
42
+ e.disabled || (v("update:modelValue", e.value), v("change", e.value));
43
+ }, w = g(() => {
44
+ const e = a.variant === "line", n = {
45
+ surface: "bg-secondary/80 p-1",
46
+ primary: "bg-secondary p-1",
47
+ secondary: "bg-secondary p-1",
48
+ danger: "bg-danger/10 p-1",
49
+ success: "bg-success/10 p-1",
50
+ outline: "bg-transparent border border-border p-1",
51
+ line: "bg-transparent gap-6 rounded-none p-0 border-b border-border"
52
+ }, t = a.wrap && !e ? "flex-wrap" : "";
53
+ return [`${a.block || e ? "flex w-full" : "inline-flex"} rounded-lg relative isolate ${t}`, n[a.variant]];
54
+ }), z = {
55
+ sm: "text-xs px-2.5 py-1",
56
+ md: "-text-fs-2 px-3 py-1",
57
+ lg: "-text-fs-1 px-4 py-1"
58
+ }, $ = g(() => {
59
+ const e = a.variant === "line", n = e ? "relative z-10 flex items-center justify-center gap-2 font-medium transition-colors duration-50 ease-out cursor-pointer select-none outline-none focus-visible:ring-2 focus-visible:ring-primary/50 pb-2 border-b-2 border-transparent hover:text-foreground" : "relative z-10 flex items-center justify-center gap-2 font-medium transition-colors duration-50 ease-out cursor-pointer select-none rounded-md outline-none focus-visible:ring-2 focus-visible:ring-primary/50", t = (a.block || a.wrap) && !e ? "flex-1" : "";
60
+ return [n, t];
61
+ }), V = (e) => {
62
+ const n = e.value === a.modelValue, t = a.variant === "line";
63
+ let r = "";
64
+ if (n)
65
+ if (t)
66
+ r = "text-primary";
67
+ else
68
+ switch (a.variant) {
69
+ case "surface":
70
+ r = "text-foreground";
71
+ break;
72
+ case "primary":
73
+ r = "text-primary-foreground";
74
+ break;
75
+ case "secondary":
76
+ r = "text-secondary";
77
+ break;
78
+ case "danger":
79
+ r = "text-danger-fg";
80
+ break;
81
+ case "success":
82
+ r = "text-success-fg";
83
+ break;
84
+ case "outline":
85
+ r = "text-accent-foreground";
86
+ break;
87
+ default:
88
+ r = "text-foreground";
89
+ }
90
+ else
91
+ r = t ? "text-muted-foreground" : "text-muted-foreground hover:text-foreground/80";
92
+ const c = e.disabled ? "opacity-50 cursor-not-allowed" : "";
93
+ return [$.value, r, c].join(" ");
94
+ }, R = g(() => {
95
+ const e = "absolute left-0 top-0 transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)] z-0 pointer-events-none";
96
+ return a.variant === "line" ? `${e} !h-[2px] !top-auto bottom-0` : `${e} rounded-md shadow-sm`;
97
+ }), B = () => ({
98
+ surface: "bg-background",
99
+ primary: "bg-primary",
100
+ secondary: "bg-secondary-foreground",
101
+ danger: "bg-danger",
102
+ success: "bg-success",
103
+ outline: "bg-accent/50 ring-1 ring-border",
104
+ line: "bg-primary"
105
+ })[a.variant], S = (e) => e.labelI18n ? Q(e.labelI18n) : e.label, I = (e) => e.to ? "router-link" : e.href ? "a" : "button", L = (e) => e.to ? { to: e.to } : e.href ? { href: e.href, target: "_blank", rel: "noopener noreferrer" } : { type: "button" };
106
+ return (e, n) => (i(), p("div", {
107
+ ref_key: "containerRef",
108
+ ref: d,
109
+ class: u(w.value),
110
+ role: "tablist",
111
+ "data-tabes": ""
112
+ }, [
113
+ s.modelValue !== void 0 && !s.wrap ? (i(), p("div", {
114
+ key: 0,
115
+ class: u([R.value, B()]),
116
+ style: N(m.value)
117
+ }, null, 6)) : y("", !0),
118
+ (i(!0), p(O, null, P(s.options, (t) => (i(), x(T(I(t)), F({
119
+ key: t.value,
120
+ ref_for: !0,
121
+ ref: (r) => k(r?.$el || r, t.value),
122
+ role: "tab",
123
+ "aria-selected": s.modelValue === t.value,
124
+ disabled: t.disabled,
125
+ class: [V(t), z[a.size]]
126
+ }, { ref_for: !0 }, L(t), {
127
+ onClick: (r) => C(t)
128
+ }), {
129
+ default: _(() => [
130
+ t.icon ? (i(), x(K, {
131
+ key: 0,
132
+ icon: t.icon,
133
+ class: u(s.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4")
134
+ }, null, 8, ["icon", "class"])) : y("", !0),
135
+ q("span", {
136
+ class: u(["whitespace-nowrap z-20 relative", s.textClass])
137
+ }, G(S(t)), 3)
138
+ ]),
139
+ _: 2
140
+ }, 1040, ["aria-selected", "disabled", "class", "onClick"]))), 128))
141
+ ], 2));
142
+ }
143
+ });
2
144
  export {
3
- f as default
145
+ Z as default
4
146
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as i, openBlock as t, createElementBlock as r, normalizeClass as n, toDisplayString as a, Fragment as c, createVNode as l, createBlock as o } from "vue";
1
+ import { defineComponent as o, openBlock as t, createElementBlock as r, normalizeClass as n, toDisplayString as a, Fragment as c, createVNode as l, createBlock as i } from "vue";
2
2
  import s from "../Icon.vue.js";
3
3
  const u = {
4
4
  key: 0,
@@ -11,11 +11,11 @@ const u = {
11
11
  class: "h-2.5 w-2.5 rounded-full bg-primary"
12
12
  }, f = {
13
13
  key: 2,
14
- class: "relative z-10 flex h-8 w-8 items-center justify-center rounded-full border-2 bg-background group-hover:border-muted-foreground transition-colors"
14
+ class: "relative z-10 flex h-8 w-8 items-center justify-center border-2 bg-background group-hover:border-muted-foreground transition-colors rounded-full!"
15
15
  }, y = {
16
16
  key: 1,
17
17
  class: "h-2.5 w-2.5 rounded-full bg-transparent group-hover:bg-muted"
18
- }, x = /* @__PURE__ */ i({
18
+ }, x = /* @__PURE__ */ o({
19
19
  __name: "TimelineIndicator",
20
20
  props: {
21
21
  status: {},
@@ -25,7 +25,7 @@ const u = {
25
25
  },
26
26
  setup(e) {
27
27
  return (g, h) => (t(), r("span", {
28
- class: n(["flex items-center justify-center shrink-0 bg-background z-10", [e.type === "dot" ? "h-5 w-5" : "h-9 w-9"]]),
28
+ class: n(["flex items-center justify-center shrink-0 z-10", [e.type === "dot" ? "h-5 w-5" : "h-9 w-9"]]),
29
29
  "aria-hidden": "true"
30
30
  }, [
31
31
  e.type === "number" ? (t(), r("span", {
@@ -47,13 +47,13 @@ const u = {
47
47
  class: "h-5 w-5 text-primary-foreground"
48
48
  })
49
49
  ])) : e.status === "current" ? (t(), r("span", d, [
50
- e.icon ? (t(), o(s, {
50
+ e.icon ? (t(), i(s, {
51
51
  key: 0,
52
52
  icon: e.icon,
53
53
  class: "h-4 w-4 text-primary"
54
54
  }, null, 8, ["icon"])) : (t(), r("span", m))
55
55
  ])) : (t(), r("span", f, [
56
- e.icon ? (t(), o(s, {
56
+ e.icon ? (t(), i(s, {
57
57
  key: 0,
58
58
  icon: e.icon,
59
59
  class: "h-4 w-4 text-muted-foreground"
@@ -33,9 +33,9 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
33
33
  "onEdit-end"?: (id: string) => any;
34
34
  onDuplicate?: (id: string) => any;
35
35
  }>, {
36
+ confirmDelete: boolean;
36
37
  isEditing: boolean;
37
38
  canDelete: boolean;
38
- confirmDelete: boolean;
39
39
  allowIconChange: boolean;
40
40
  itemClass: string;
41
41
  activeItemClass: string;
package/core/config.d.ts CHANGED
@@ -39,6 +39,10 @@ export declare const configState: {
39
39
  empty?: {
40
40
  variant?: import('..').EmptyVariant;
41
41
  };
42
+ statusChip?: {
43
+ hideIcon?: boolean;
44
+ customStatuses?: Record<string, import('..').CustomStatusConfig>;
45
+ };
42
46
  };
43
47
  };
44
48
  /**
@@ -80,5 +84,9 @@ export declare function useVLiteConfig(): {
80
84
  empty?: {
81
85
  variant?: import('..').EmptyVariant;
82
86
  };
87
+ statusChip?: {
88
+ hideIcon?: boolean;
89
+ customStatuses?: Record<string, import('..').CustomStatusConfig>;
90
+ };
83
91
  };
84
92
  };
package/core/config.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { reactive as n, inject as c } from "vue";
2
2
  import { deepMerge as i } from "../utils/object.js";
3
- const r = /* @__PURE__ */ Symbol("vlite-config"), f = {
3
+ const r = /* @__PURE__ */ Symbol("vlite-config"), s = {
4
4
  services: {},
5
5
  components: {
6
6
  form: {},
@@ -9,19 +9,23 @@ const r = /* @__PURE__ */ Symbol("vlite-config"), f = {
9
9
  },
10
10
  date: {
11
11
  format: "MM/DD/YYYY"
12
+ },
13
+ statusChip: {
14
+ hideIcon: !1,
15
+ customStatuses: {}
12
16
  }
13
17
  }
14
- }, e = n({ ...f });
15
- function g(t) {
18
+ }, e = n({ ...s });
19
+ function m(t) {
16
20
  const o = i(e, t);
17
21
  Object.assign(e, o);
18
22
  }
19
- function a() {
23
+ function u() {
20
24
  return c(r, e);
21
25
  }
22
26
  export {
23
27
  r as VLITE_CONFIG_KEY,
24
28
  e as configState,
25
- g as updateConfig,
26
- a as useVLiteConfig
29
+ m as updateConfig,
30
+ u as useVLiteConfig
27
31
  };
package/core/index.js CHANGED
@@ -1,35 +1,43 @@
1
- import { configState as e, VLITE_CONFIG_KEY as m } from "./config.js";
2
- import { updateConfig as p, useVLiteConfig as i } from "./config.js";
3
- function a(t = {}) {
1
+ import { configState as t, VLITE_CONFIG_KEY as s } from "./config.js";
2
+ import { updateConfig as n, useVLiteConfig as p } from "./config.js";
3
+ function o(e = {}) {
4
4
  return {
5
- install(r) {
6
- t && (t.services && (e.services = { ...e.services, ...t.services }), t.importData && (e.importData = { ...e.importData, ...t.importData }), t.exportData && (e.exportData = { ...e.exportData, ...t.exportData }), t.components && (e.components = {
7
- ...e.components,
5
+ install(m) {
6
+ e && (e.services && (t.services = { ...t.services, ...e.services }), e.importData && (t.importData = { ...t.importData, ...e.importData }), e.exportData && (t.exportData = { ...t.exportData, ...e.exportData }), e.components && (t.components = {
8
7
  ...t.components,
8
+ ...e.components,
9
9
  form: {
10
- ...e.components?.form || {},
11
- ...t.components.form || {}
10
+ ...t.components?.form || {},
11
+ ...e.components.form || {}
12
12
  },
13
13
  price: {
14
- ...e.components?.price || {},
15
- ...t.components.price || {}
14
+ ...t.components?.price || {},
15
+ ...e.components.price || {}
16
16
  },
17
17
  date: {
18
- ...e.components?.date || {},
19
- ...t.components.date || {}
18
+ ...t.components?.date || {},
19
+ ...e.components.date || {}
20
20
  },
21
21
  empty: {
22
- ...e.components?.empty || {},
23
- ...t.components.empty || {}
22
+ ...t.components?.empty || {},
23
+ ...e.components.empty || {}
24
+ },
25
+ statusChip: {
26
+ ...t.components?.statusChip || {},
27
+ ...e.components.statusChip || {},
28
+ customStatuses: {
29
+ ...t.components?.statusChip?.customStatuses || {},
30
+ ...e.components.statusChip?.customStatuses || {}
31
+ }
24
32
  }
25
- })), r.provide(m, e), r.config.globalProperties.$vlite = e;
33
+ })), m.provide(s, t), m.config.globalProperties.$vlite = t;
26
34
  }
27
35
  };
28
36
  }
29
37
  export {
30
- m as VLITE_CONFIG_KEY,
31
- e as configState,
32
- a as createVLite,
33
- p as updateConfig,
34
- i as useVLiteConfig
38
+ s as VLITE_CONFIG_KEY,
39
+ t as configState,
40
+ o as createVLite,
41
+ n as updateConfig,
42
+ p as useVLiteConfig
35
43
  };
package/index.d.ts CHANGED
@@ -40,6 +40,8 @@ export * from './directives/vScrollReveal';
40
40
  export * from './components/AvatarUploader';
41
41
  export * from './composables/useNotifications';
42
42
  export * from './components/Timeline';
43
+ export * from './components/FilePreview';
44
+ export * from './components/AttachmentsList';
43
45
  export { default as Icon } from './components/Icon.vue';
44
46
  export { default as Logo } from './components/Logo.vue';
45
47
  export { default as Alert } from './components/Alert.vue';