vlite3 1.1.6 → 1.1.8

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 (37) hide show
  1. package/README.md +1 -0
  2. package/components/Chart/GaugeChart.vue.d.ts +120 -0
  3. package/components/Chart/PieChart.vue.d.ts +1 -1
  4. package/components/Chart/index.d.ts +2 -1
  5. package/components/Chart/types.d.ts +60 -1
  6. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  7. package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
  8. package/components/DataTable/DataTable.vue.d.ts +1 -0
  9. package/components/DataTable/DataTable.vue.js +142 -132
  10. package/components/DataTable/DataTableHeader.vue.d.ts +1 -0
  11. package/components/DataTable/DataTableHeader.vue.js +17 -16
  12. package/components/DataTable/DataTableRow.vue.d.ts +1 -0
  13. package/components/DataTable/DataTableRow.vue.js +29 -25
  14. package/components/DataTable/types.d.ts +1 -0
  15. package/components/Dropdown/Dropdown.vue.d.ts +2 -1
  16. package/components/Dropdown/Dropdown.vue.js +37 -34
  17. package/components/Dropdown/DropdownMenu.vue.d.ts +3 -0
  18. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  19. package/components/Dropdown/DropdownMenu.vue2.js +83 -72
  20. package/components/Dropdown/DropdownTrigger.vue.js +8 -4
  21. package/components/MultiSelect/MultiSelect.vue.d.ts +26 -1
  22. package/components/MultiSelect/MultiSelect.vue.js +135 -100
  23. package/components/NavbarCommandPalette.vue.js +1 -1
  24. package/components/Skeleton/Skeleton.vue.d.ts +30 -0
  25. package/components/Skeleton/Skeleton.vue.js +215 -0
  26. package/components/Skeleton/Skeleton.vue2.js +4 -0
  27. package/components/Skeleton/extract.d.ts +5 -0
  28. package/components/Skeleton/extract.js +83 -0
  29. package/components/Skeleton/index.d.ts +4 -0
  30. package/components/Skeleton/shared.d.ts +14 -0
  31. package/components/Skeleton/shared.js +29 -0
  32. package/components/Skeleton/types.d.ts +59 -0
  33. package/components/Skeleton/types.js +6 -0
  34. package/index.d.ts +1 -0
  35. package/index.js +217 -207
  36. package/package.json +1 -1
  37. package/style.css +1 -1
@@ -1,6 +1,6 @@
1
- import { defineComponent as S, computed as z, openBlock as c, createElementBlock as m, normalizeClass as u, withModifiers as B, createElementVNode as a, createVNode as M, createCommentVNode as W, Fragment as N, renderList as V, normalizeStyle as h, renderSlot as F, createBlock as f } from "vue";
2
- import L from "../CheckBox.vue.js";
3
- import $ from "../Price/Price.vue.js";
1
+ import { defineComponent as S, computed as B, openBlock as o, createElementBlock as r, normalizeClass as a, withModifiers as z, createElementVNode as u, createVNode as $, createCommentVNode as M, Fragment as W, renderList as N, normalizeStyle as V, renderSlot as h, createBlock as f } from "vue";
2
+ import F from "../CheckBox.vue.js";
3
+ import L from "../Price/Price.vue.js";
4
4
  import T from "../DateTime/DateTime.vue.js";
5
5
  const E = ["data-state"], H = { class: "flex items-center justify-center" }, I = { class: "max-h-[80px] overflow-y-auto w-full" }, R = ["title", "innerHTML"], q = /* @__PURE__ */ S({
6
6
  __name: "DataTableRow",
@@ -14,11 +14,12 @@ const E = ["data-state"], H = { class: "flex items-center justify-center" }, I =
14
14
  hoverable: { type: Boolean, default: !0 },
15
15
  striped: { type: Boolean, default: !1 },
16
16
  compact: { type: Boolean, default: !1 },
17
- size: { default: "md" }
17
+ size: { default: "md" },
18
+ cellBordered: { type: Boolean }
18
19
  },
19
20
  emits: ["select", "rowClick"],
20
21
  setup(i, { emit: w }) {
21
- const o = i, r = w, n = (e, l) => {
22
+ const c = i, m = w, n = (e, l) => {
22
23
  if (!(!e || !l))
23
24
  return l.includes(".") ? l.split(".").reduce((t, s) => t?.[s], e) : e[l];
24
25
  }, x = (e, l, t) => e.format ? e.format(l, t) : l == null ? "-" : e.type === "number" ? new Intl.NumberFormat("en-US").format(Number(l)) : String(l), g = (e, l, t) => {
@@ -49,17 +50,20 @@ const E = ["data-state"], H = { class: "flex items-center justify-center" }, I =
49
50
  low: "text-muted-foreground"
50
51
  }, t = String(e).toLowerCase().replace(/[-_\s]/g, "");
51
52
  return l[t] || "";
52
- }, b = (e) => ({
53
+ }, p = (e) => ({
53
54
  left: "text-left",
54
55
  center: "text-center",
55
56
  right: "text-right"
56
- })[e.align || "left"], p = z(() => n(o.row, o.keyField)), k = () => o.size === "xs" || o.compact ? "py-1.5! -text-fs-1.5! pr-3 max-sm:pr-10!" : o.size === "sm" ? "py-2! -text-fs-1.5! pr-4 max-sm:pr-10!" : o.size === "lg" ? "py-4! text-base pr-6 max-sm:pr-12!" : "py-3! pr-5! max-sm:pr-10! -text-fs-1.5!", v = () => {
57
- r("rowClick", { row: o.row, index: o.index });
57
+ })[e.align || "left"], b = B(() => n(c.row, c.keyField)), k = () => {
58
+ const { size: e, compact: l, cellBordered: t } = c;
59
+ return e === "xs" || l ? `py-1.5! -text-fs-1.5! ${t ? "px-3!" : "pr-3 max-sm:pr-10!"}` : e === "sm" ? `py-2! -text-fs-1.5! ${t ? "px-3!" : "pr-4 max-sm:pr-10!"}` : e === "lg" ? `py-4! text-base ${t ? "px-4!" : "pr-6 max-sm:pr-12!"}` : `py-3! -text-fs-1.5! ${t ? "px-3.5!" : "pr-5! max-sm:pr-10!"}`;
60
+ }, v = () => {
61
+ m("rowClick", { row: c.row, index: c.index });
58
62
  }, C = () => {
59
- r("select", p.value);
63
+ m("select", b.value);
60
64
  };
61
- return (e, l) => (c(), m("tr", {
62
- class: u(["border-b data-[state=selected]:bg-muted h-full", [
65
+ return (e, l) => (o(), r("tr", {
66
+ class: a(["border-b data-[state=selected]:bg-muted h-full", [
63
67
  i.hoverable ? "hover:bg-muted/20" : "",
64
68
  i.striped && i.index % 2 === 1 ? "bg-muted/20" : "bg-background",
65
69
  i.isSelected ? "bg-muted! hover:bg-muted/30" : "",
@@ -68,51 +72,51 @@ const E = ["data-state"], H = { class: "flex items-center justify-center" }, I =
68
72
  "data-state": i.isSelected ? "selected" : void 0,
69
73
  onClick: v
70
74
  }, [
71
- i.selectable ? (c(), m("td", {
75
+ i.selectable ? (o(), r("td", {
72
76
  key: 0,
73
77
  class: "px-0! py-1! align-middle text-center",
74
- onClick: l[0] || (l[0] = B(() => {
78
+ onClick: l[0] || (l[0] = z(() => {
75
79
  }, ["stop"]))
76
80
  }, [
77
- a("div", H, [
78
- M(L, {
81
+ u("div", H, [
82
+ $(F, {
79
83
  "model-value": i.isSelected,
80
84
  size: "xs",
81
85
  "onUpdate:modelValue": C
82
86
  }, null, 8, ["model-value"])
83
87
  ])
84
- ])) : W("", !0),
85
- (c(!0), m(N, null, V(i.headers, (t) => (c(), m("td", {
88
+ ])) : M("", !0),
89
+ (o(!0), r(W, null, N(i.headers, (t) => (o(), r("td", {
86
90
  key: t.field,
87
- class: u(["align-middle overflow-hidden max-w-[400px] whitespace-normal wrap-break-word", [
91
+ class: a(["align-middle overflow-hidden max-w-[400px] whitespace-normal wrap-break-word", [
88
92
  k(),
89
- b(t),
93
+ p(t),
90
94
  t.hideOnMobile ? "hidden md:table-cell" : "",
91
95
  g(t, n(i.row, t.field), i.row)
92
96
  ]]),
93
- style: h({
97
+ style: V({
94
98
  ...t.width && !/(?:^|\s|:)w-/.test(t.width) ? { width: t.width } : {},
95
99
  ...t.minWidth && !/(?:^|\s|:)min-w-/.test(t.minWidth) ? { minWidth: t.minWidth } : {}
96
100
  })
97
101
  }, [
98
- a("div", I, [
99
- F(e.$slots, t.field, {
102
+ u("div", I, [
103
+ h(e.$slots, t.field, {
100
104
  value: n(i.row, t.field),
101
105
  row: i.row,
102
106
  index: i.index,
103
107
  field: t.field
104
108
  }, () => [
105
- t.type === "price" ? (c(), f($, {
109
+ t.type === "price" ? (o(), f(L, {
106
110
  key: 0,
107
111
  value: n(i.row, t.field),
108
112
  class: "block",
109
113
  title: String(n(i.row, t.field))
110
- }, null, 8, ["value", "title"])) : t.type === "date" ? (c(), f(T, {
114
+ }, null, 8, ["value", "title"])) : t.type === "date" ? (o(), f(T, {
111
115
  key: 1,
112
116
  value: n(i.row, t.field),
113
117
  class: "block",
114
118
  title: String(n(i.row, t.field))
115
- }, null, 8, ["value", "title"])) : (c(), m("span", {
119
+ }, null, 8, ["value", "title"])) : (o(), r("span", {
116
120
  key: 2,
117
121
  class: "block",
118
122
  title: String(n(i.row, t.field)),
@@ -65,6 +65,7 @@ export interface DataTableProps {
65
65
  striped?: boolean;
66
66
  hoverable?: boolean;
67
67
  bordered?: boolean;
68
+ cellBordered?: boolean;
68
69
  compact?: boolean;
69
70
  tableClass?: string;
70
71
  class?: string;
@@ -5,6 +5,7 @@ type __VLS_Props = {
5
5
  modelValue?: any;
6
6
  className?: string;
7
7
  emptyMessage?: string;
8
+ searchEmptyMessage?: string;
8
9
  position?: TooltTipPlacement;
9
10
  closeOnSelect?: boolean;
10
11
  toggleSelection?: boolean;
@@ -100,10 +101,10 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
100
101
  searchable: boolean;
101
102
  remote: boolean;
102
103
  debounceTime: number;
104
+ emptyMessage: string;
103
105
  canCloseOutside: boolean;
104
106
  closeOnSelect: boolean;
105
107
  toggleSelection: boolean;
106
- emptyMessage: string;
107
108
  offset: [number, number];
108
109
  isOpen: boolean;
109
110
  teleport: boolean;
@@ -1,8 +1,8 @@
1
- import { defineComponent as oe, ref as i, computed as f, inject as ae, onMounted as ie, onUnmounted as se, watch as P, provide as R, reactive as re, toRefs as de, openBlock as x, createElementBlock as z, normalizeStyle as ue, createVNode as M, unref as u, withCtx as m, renderSlot as v, createCommentVNode as E, createBlock as ce, normalizeClass as fe, createSlots as me, normalizeProps as j, guardReactiveProps as U } from "vue";
1
+ import { defineComponent as oe, ref as i, computed as f, inject as ae, onMounted as ie, onUnmounted as se, watch as M, provide as V, reactive as re, toRefs as de, openBlock as P, createElementBlock as R, normalizeStyle as ue, createVNode as x, unref as u, withCtx as m, renderSlot as v, createCommentVNode as z, createBlock as ce, normalizeClass as fe, createSlots as me, normalizeProps as j, guardReactiveProps as U } from "vue";
2
2
  import ve from "v-tooltip-lite";
3
3
  import "v-tooltip-lite/style.css";
4
- import he from "./DropdownMenu.vue.js";
5
- import ye from "./DropdownTrigger.vue.js";
4
+ import ye from "./DropdownMenu.vue.js";
5
+ import he from "./DropdownTrigger.vue.js";
6
6
  import ge from "../ConfirmationModal.vue.js";
7
7
  import { useDropdownIds as pe } from "./composables/useDropdownIds.js";
8
8
  import { useDropdownSelection as be } from "./composables/useDropdownSelection.js";
@@ -17,6 +17,7 @@ const Oe = {
17
17
  modelValue: {},
18
18
  className: {},
19
19
  emptyMessage: { default: "No options found" },
20
+ searchEmptyMessage: {},
20
21
  position: {},
21
22
  closeOnSelect: { type: Boolean, default: !0 },
22
23
  toggleSelection: { type: Boolean, default: !0 },
@@ -53,7 +54,7 @@ const Oe = {
53
54
  },
54
55
  emits: ["onSelect", "update:modelValue", "onOpen", "onClose", "update:isOpen", "load-more", "search"],
55
56
  setup(t, { emit: q }) {
56
- const l = t, h = q, p = i(!1), y = i(null), r = i({
57
+ const l = t, y = q, p = i(!1), h = i(null), r = i({
57
58
  title: "Confirm Selection",
58
59
  description: "Are you sure you want to select this option?",
59
60
  confirmText: "Confirm",
@@ -68,7 +69,7 @@ const Oe = {
68
69
  s?.registerChildId && s.registerChildId(`#${w.value}`);
69
70
  }), se(() => {
70
71
  s?.unregisterChildId && s.unregisterChildId(`#${w.value}`);
71
- }), P(
72
+ }), M(
72
73
  () => l.isOpen,
73
74
  (e) => {
74
75
  if (e !== void 0) {
@@ -79,25 +80,25 @@ const Oe = {
79
80
  );
80
81
  const N = (e) => {
81
82
  if (l.disabled || l.readonly) {
82
- b.value = !1, h("update:isOpen", !1);
83
+ b.value = !1, y("update:isOpen", !1);
83
84
  return;
84
85
  }
85
- b.value = e, h("update:isOpen", e), h(e ? "onOpen" : "onClose"), s?.onChildToggle?.(e);
86
+ b.value = e, y("update:isOpen", e), y(e ? "onOpen" : "onClose"), s?.onChildToggle?.(e);
86
87
  }, O = () => {
87
88
  N(!1);
88
89
  }, W = (e) => {
89
90
  e ? C.value++ : C.value = Math.max(0, C.value - 1);
90
91
  };
91
- R("dropdown-context", {
92
+ V("dropdown-context", {
92
93
  close: O,
93
94
  onChildToggle: (e) => {
94
95
  W(e), s?.onChildToggle?.(e);
95
96
  },
96
97
  registerChildId: K,
97
98
  unregisterChildId: Q
98
- }), R("modal-context", null);
99
- const I = f(() => l.options ? l.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), S = i([]), A = i(!1), $ = i(!1);
100
- P(
99
+ }), V("modal-context", null);
100
+ const I = f(() => l.options ? l.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), S = i([]), E = i(!1), $ = i(!1);
101
+ M(
101
102
  I,
102
103
  (e) => {
103
104
  if (e) {
@@ -108,8 +109,8 @@ const Oe = {
108
109
  }), S.value = o;
109
110
  } else
110
111
  S.value = e;
111
- !A.value && e.length > 0 && (A.value = !0, setTimeout(() => {
112
- $.value = !0, H(B.value);
112
+ !E.value && e.length > 0 && (E.value = !0, setTimeout(() => {
113
+ $.value = !0, A(B.value);
113
114
  }, 10));
114
115
  }
115
116
  },
@@ -120,30 +121,30 @@ const Oe = {
120
121
  return k.value.forEach((n, d) => {
121
122
  o.has(d) || (e.unshift(n), o.add(d));
122
123
  }), e;
123
- }), { selectedBuffer: k, isHydrating: X, hydrateSelected: H } = Ce({
124
+ }), { selectedBuffer: k, isHydrating: X, hydrateSelected: A } = Ce({
124
125
  fetchSelected: l.fetchSelected,
125
126
  getAvailableOptions: () => c.value,
126
127
  isReady: () => $.value
127
128
  }), { getAllRecursiveIds: Y } = pe(), Z = re({
128
129
  ...de(l),
129
130
  options: c
130
- }), { currentValue: B, selectedLabel: D, selectedIcon: L, selectOption: _ } = be(
131
+ }), { currentValue: B, selectedLabel: H, selectedIcon: D, selectOption: _ } = be(
131
132
  Z,
132
- h
133
+ y
133
134
  ), ee = f(() => {
134
135
  const e = l.ignoreClickOutside || [], o = Y(c.value);
135
136
  return [.../* @__PURE__ */ new Set([...e, ...o, ...g.value])];
136
137
  });
137
- P(
138
+ M(
138
139
  () => B.value,
139
140
  (e) => {
140
- $.value && H(e);
141
+ $.value && A(e);
141
142
  },
142
143
  { deep: !0 }
143
144
  );
144
145
  const te = (e) => {
145
146
  if (l.disabled || l.readonly || e.disabled) return;
146
- l.doubleConfirmation || !!e.confirmation ? (y.value = e, typeof e.confirmation == "object" ? r.value = {
147
+ l.doubleConfirmation || !!e.confirmation ? (h.value = e, typeof e.confirmation == "object" ? r.value = {
147
148
  title: e.confirmation.title || "Confirm Selection",
148
149
  description: e.confirmation.description || "Are you sure you want to select this option?",
149
150
  confirmText: e.confirmation.confirmText || "Confirm",
@@ -155,8 +156,8 @@ const Oe = {
155
156
  confirmText: "Confirm",
156
157
  cancelText: "Cancel",
157
158
  variant: "primary"
158
- }, p.value = !0, O()) : (V(e), l.closeOnSelect && O());
159
- }, V = (e) => {
159
+ }, p.value = !0, O()) : (L(e), l.closeOnSelect && O());
160
+ }, L = (e) => {
160
161
  if (l.disabled || l.readonly || e.disabled) return;
161
162
  const o = e.value ?? e.label;
162
163
  k.value.has(o) || k.value.set(o, e);
@@ -173,15 +174,15 @@ const Oe = {
173
174
  });
174
175
  }
175
176
  }, le = () => {
176
- y.value && (V(y.value), y.value = null, p.value = !1);
177
+ h.value && (L(h.value), h.value = null, p.value = !1);
177
178
  }, ne = () => {
178
- y.value = null, p.value = !1;
179
+ h.value = null, p.value = !1;
179
180
  };
180
- return (e, o) => (x(), z("div", {
181
+ return (e, o) => (P(), R("div", {
181
182
  class: "relative inline-block text-left",
182
183
  style: ue({ direction: t.direction })
183
184
  }, [
184
- M(u(ve), {
185
+ x(u(ve), {
185
186
  content: "",
186
187
  trigger: "click",
187
188
  arrow: !1,
@@ -201,10 +202,10 @@ const Oe = {
201
202
  styles: { padding: "0" }
202
203
  }, {
203
204
  trigger: m(({ isOpen: n }) => [
204
- v(e.$slots, "trigger", j(U({ selectedLabel: u(D), selectedIcon: t.showSelectedIcon ? u(L) : void 0, isOpen: n })), () => [
205
- M(ye, {
206
- "selected-label": u(D),
207
- "selected-icon": t.showSelectedIcon ? u(L) : void 0,
205
+ v(e.$slots, "trigger", j(U({ selectedLabel: u(H), selectedIcon: t.showSelectedIcon ? u(D) : void 0, isOpen: n })), () => [
206
+ x(he, {
207
+ "selected-label": u(H),
208
+ "selected-icon": t.showSelectedIcon ? u(D) : void 0,
208
209
  "is-open": n,
209
210
  direction: t.direction,
210
211
  disabled: t.disabled,
@@ -215,14 +216,16 @@ const Oe = {
215
216
  ])
216
217
  ]),
217
218
  default: m(() => [
218
- e.$slots?.default ? (x(), z("span", Oe, [
219
+ e.$slots?.default ? (P(), R("span", Oe, [
219
220
  v(e.$slots, "default")
220
- ])) : E("", !0),
221
- !(t.disabled || t.readonly) && (I.value.length || c.value.length || e.$slots.menu || e.$slots.item || t.remote || t.searchable) ? (x(), ce(he, {
221
+ ])) : z("", !0),
222
+ !(t.disabled || t.readonly) && (I.value.length || c.value.length || e.$slots.menu || e.$slots.item || t.remote || t.searchable) ? (P(), ce(ye, {
222
223
  key: 1,
223
224
  options: I.value,
224
225
  cachedOptions: c.value,
225
226
  class: fe(t.className),
227
+ emptyMessage: t.emptyMessage,
228
+ searchEmptyMessage: t.searchEmptyMessage,
226
229
  selected: u(B),
227
230
  selectedIndex: t.selectedIndex,
228
231
  maxHeight: t.maxHeight,
@@ -270,11 +273,11 @@ const Oe = {
270
273
  ]),
271
274
  key: "3"
272
275
  } : void 0
273
- ]), 1032, ["options", "cachedOptions", "class", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) : E("", !0)
276
+ ]), 1032, ["options", "cachedOptions", "class", "emptyMessage", "searchEmptyMessage", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) : z("", !0)
274
277
  ]),
275
278
  _: 3
276
279
  }, 8, ["teleport", "offset", "placement", "isOpen", "keepAlive", "menuId", "ignoreClickOutside", "className"]),
277
- M(ge, {
280
+ x(ge, {
278
281
  show: p.value,
279
282
  title: r.value.title,
280
283
  description: r.value.description,
@@ -17,6 +17,8 @@ interface Props {
17
17
  remote?: boolean;
18
18
  debounceTime?: number;
19
19
  direction?: 'ltr' | 'rtl';
20
+ emptyMessage?: string;
21
+ searchEmptyMessage?: string;
20
22
  }
21
23
  declare function __VLS_template(): {
22
24
  attrs: Partial<{}>;
@@ -63,6 +65,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
63
65
  searchable: boolean;
64
66
  remote: boolean;
65
67
  debounceTime: number;
68
+ emptyMessage: string;
66
69
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
67
70
  containerRef: HTMLDivElement;
68
71
  }, HTMLDivElement>;
@@ -1,7 +1,7 @@
1
1
  import o from "./DropdownMenu.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-77113fbb"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-b2017bca"]]);
5
5
  export {
6
6
  m as default
7
7
  };