vlite3 0.5.10 → 0.6.3

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as v, computed as s, openBlock as l, createElementBlock as f, createElementVNode as g, normalizeClass as d, createVNode as w, Transition as C, withCtx as h, createBlock as o, createCommentVNode as r, createTextVNode as V, toDisplayString as z } from "vue";
1
+ import { defineComponent as v, computed as s, openBlock as l, createElementBlock as f, createElementVNode as g, normalizeClass as i, createVNode as w, Transition as C, withCtx as h, createBlock as o, createCommentVNode as r, createTextVNode as V, toDisplayString as z } from "vue";
2
2
  import p from "./Icon.vue.js";
3
3
  import B from "./Label.vue.js";
4
4
  import { $t as N } from "../utils/i18n.js";
@@ -23,8 +23,8 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
23
23
  setup(t, { emit: b }) {
24
24
  const e = t, c = b, u = s(() => e.labelI18n ? N(e.labelI18n) : e.label), m = () => {
25
25
  if (e.disabled) return;
26
- const i = !(e.modelValue || e.checked);
27
- c("update:modelValue", i), c("update:checked", i);
26
+ const d = !(e.modelValue || e.checked);
27
+ c("update:modelValue", d), c("update:checked", d);
28
28
  }, k = {
29
29
  xs: "h-3.5 w-3.5",
30
30
  sm: "h-4 w-4",
@@ -37,7 +37,7 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
37
37
  md: "h-3.5 w-3.5",
38
38
  lg: "h-4 w-4",
39
39
  xl: "h-5 w-5"
40
- }, x = {
40
+ }, y = {
41
41
  none: "rounded-none",
42
42
  xs: "rounded-[3px]",
43
43
  sm: "rounded-[4px]",
@@ -46,29 +46,30 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
46
46
  xl: "rounded-lg",
47
47
  "2xl": "rounded-xl",
48
48
  full: "rounded-full"
49
- }, y = s(() => [
50
- "peer shrink-0 border border-primary transition-all duration-200 ease-in-out",
49
+ }, a = s(() => e.indeterminate ? "indeterminate" : e.modelValue || e.checked ? "checked" : "unchecked"), x = s(() => [
50
+ "peer shrink-0 border transition-all duration-200 ease-in-out",
51
51
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
52
52
  "disabled:cursor-not-allowed disabled:opacity-50",
53
53
  "data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
54
54
  "data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground",
55
55
  "cursor-pointer bg-transparent",
56
56
  k[e.size],
57
- x[e.rounded || e.size],
57
+ y[e.rounded || e.size],
58
+ a.value === "checked" ? "border-primary!" : "border-gray-400!",
58
59
  e.class
59
- ].join(" ")), a = s(() => e.indeterminate ? "indeterminate" : e.modelValue || e.checked ? "checked" : "unchecked");
60
+ ].join(" "));
60
61
  return s(() => [
61
62
  "transition-transform duration-200",
62
63
  a.value === "checked" || a.value === "indeterminate" ? "scale-100" : "scale-0",
63
64
  n[e.size]
64
- ].join(" ")), (i, $) => (l(), f("div", _, [
65
+ ].join(" ")), (d, $) => (l(), f("div", _, [
65
66
  g("button", {
66
67
  type: "button",
67
68
  role: "checkbox",
68
69
  "aria-checked": t.indeterminate ? "mixed" : t.modelValue,
69
70
  "data-state": a.value,
70
71
  disabled: t.disabled,
71
- class: d(y.value),
72
+ class: i(x.value),
72
73
  id: t.id,
73
74
  onClick: m
74
75
  }, [
@@ -85,11 +86,11 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
85
86
  a.value === "checked" ? (l(), o(p, {
86
87
  key: 0,
87
88
  icon: "lucide:check",
88
- class: d(n[t.size])
89
+ class: i(n[t.size])
89
90
  }, null, 8, ["class"])) : a.value === "indeterminate" ? (l(), o(p, {
90
91
  key: 1,
91
92
  icon: "lucide:minus",
92
- class: d(n[t.size])
93
+ class: i(n[t.size])
93
94
  }, null, 8, ["class"])) : r("", !0)
94
95
  ]),
95
96
  _: 1
@@ -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
  };
@@ -5,8 +5,8 @@ import O from "../Input.vue.js";
5
5
  /* empty css */
6
6
  import "../../core/config.js";
7
7
  import y from "../Button.vue.js";
8
- import E from "./ColorIro.vue2.js";
9
- /* empty css */
8
+ import E from "./ColorIro.vue.js";
9
+ /* empty css */
10
10
  import { useEyeDropper as P } from "@vueuse/core";
11
11
  const I = {
12
12
  key: 0,
@@ -1,7 +1,7 @@
1
1
  import t from "./CommandPaletteContent.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-6b4a4b96"]]);
4
+ const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-e919f56b"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -255,7 +255,7 @@ const se = { class: "command-palette-content flex flex-col w-full h-full max-h-[
255
255
  "aria-disabled": e.disabled || void 0,
256
256
  "data-active": x(r, l) === a.value,
257
257
  class: T(["command-palette-item w-full flex items-center gap-3 px-3! py-2.5 mx-1 rounded-lg text-sm transition-colors duration-100 text-left cursor-pointer select-none focus-visible:outline-none", [
258
- x(r, l) === a.value ? "bg-gray-200 text-foreground" : "text-muted-foreground hover:bg-muted/70 hover:text-foreground",
258
+ x(r, l) === a.value ? "bg-gray-200/80 text-foreground" : "text-muted-foreground hover:bg-muted/70 hover:text-foreground",
259
259
  e.disabled ? "opacity-40 cursor-not-allowed" : ""
260
260
  ]]),
261
261
  style: { width: "calc(100% - 8px)" },
@@ -265,7 +265,7 @@ const se = { class: "command-palette-content flex flex-col w-full h-full max-h-[
265
265
  s("span", {
266
266
  class: T([
267
267
  "shrink-0 flex items-center justify-center w-7 h-7 rounded-md",
268
- x(r, l) === a.value ? "bg-gray-300 text-primary" : "bg-muted/80 text-muted-foreground"
268
+ x(r, l) === a.value ? "bg-gray-300/80 text-gray-900" : "bg-muted/80 text-muted-foreground"
269
269
  ])
270
270
  }, [
271
271
  w(h, {
@@ -14,6 +14,7 @@ type __VLS_Props = {
14
14
  size?: ButtonSize;
15
15
  variant?: ButtonVariant;
16
16
  showQuickRanges?: boolean;
17
+ triggerClass?: string;
17
18
  };
18
19
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
19
20
  change: (...args: any[]) => void;
@@ -6,10 +6,10 @@ import { $t as l } from "../utils/i18n.js";
6
6
  import P from "./Button.vue.js";
7
7
  import p from "v-datepicker-lite";
8
8
  import "v-datepicker-lite/style.css";
9
- const $ = { class: "flex items-center gap-2" }, H = { class: "flex flex-col sm:flex-row bg-background rounded-md" }, Q = {
9
+ const $ = { class: "flex items-center justify-between gap-2 w-full" }, j = { class: "flex flex-col sm:flex-row bg-background rounded-md" }, H = {
10
10
  key: 0,
11
11
  class: "flex flex-col gap-1 sm:pr-3 py-2 sm:border-r border-border max-h-[280px]"
12
- }, j = { class: "flex flex-col sm:flex-row items-center gap-4 py-2 p-3" }, O = { class: "border border-border rounded-md overflow-hidden bg-background" }, I = { class: "flex items-center justify-center shrink-0" }, U = { class: "border border-border rounded-md overflow-hidden bg-background" }, ee = /* @__PURE__ */ V({
12
+ }, Q = { class: "flex flex-col sm:flex-row items-center gap-4 py-2 p-3" }, O = { class: "border border-border rounded-md overflow-hidden bg-background" }, I = { class: "flex items-center justify-center shrink-0" }, U = { class: "border border-border rounded-md overflow-hidden bg-background" }, ee = /* @__PURE__ */ V({
13
13
  __name: "DateRangePicker",
14
14
  props: {
15
15
  modelValue: {},
@@ -21,18 +21,19 @@ const $ = { class: "flex items-center gap-2" }, H = { class: "flex flex-col sm:f
21
21
  readonly: { type: Boolean },
22
22
  size: {},
23
23
  variant: {},
24
- showQuickRanges: { type: Boolean, default: !0 }
24
+ showQuickRanges: { type: Boolean, default: !0 },
25
+ triggerClass: {}
25
26
  },
26
27
  emits: ["update:modelValue", "change"],
27
28
  setup(r, { emit: M }) {
28
- const v = r, D = M, o = w(!1), c = w(0);
29
+ const v = r, b = M, o = w(!1), c = w(0);
29
30
  L(o, (t) => {
30
31
  t && c.value++;
31
32
  });
32
33
  const n = u({
33
34
  get: () => v.modelValue || { start: null, end: null },
34
35
  set: (t) => {
35
- D("update:modelValue", t), D("change", t);
36
+ b("update:modelValue", t), b("change", t);
36
37
  }
37
38
  }), Y = (t) => {
38
39
  n.value = { ...n.value, start: t };
@@ -44,13 +45,13 @@ const $ = { class: "flex items-center gap-2" }, H = { class: "flex flex-col sm:f
44
45
  if (!isNaN(t.getTime())) return t.toISOString();
45
46
  }
46
47
  return v.maxDate;
47
- }), N = u(() => {
48
+ }), C = u(() => {
48
49
  if (n.value.start) {
49
50
  const t = new Date(n.value.start);
50
51
  if (!isNaN(t.getTime())) return t.toISOString();
51
52
  }
52
53
  return v.minDate;
53
- }), b = (t) => {
54
+ }), D = (t) => {
54
55
  if (!t) return "";
55
56
  try {
56
57
  const e = new Date(t);
@@ -58,7 +59,7 @@ const $ = { class: "flex items-center gap-2" }, H = { class: "flex flex-col sm:f
58
59
  } catch {
59
60
  return "";
60
61
  }
61
- }, C = u(() => [
62
+ }, N = u(() => [
62
63
  {
63
64
  label: l("vlite.dateRangePicker.today") !== "vlite.dateRangePicker.today" ? l("vlite.dateRangePicker.today") : "Today",
64
65
  value: "today",
@@ -152,30 +153,30 @@ const $ = { class: "flex items-center gap-2" }, H = { class: "flex flex-col sm:f
152
153
  variant: r.variant || "outline",
153
154
  size: r.size || "md",
154
155
  disabled: r.disabled,
155
- class: k(["w-full sm:min-w-[280px] justify-start text-left font-normal", { "ring-2 ring-ring ring-offset-2": a }])
156
+ class: k(["w-max justify-between text-left font-normal", [r.triggerClass, { "ring-1 ring-ring ring-offset-[1]": a }]])
156
157
  }, {
157
158
  default: y(() => [
158
159
  i("div", $, [
159
160
  i("span", {
160
161
  class: k({ "text-muted-foreground": !n.value.start })
161
- }, R(n.value.start ? b(n.value.start) : r.placeholderStart), 3),
162
+ }, R(n.value.start ? D(n.value.start) : r.placeholderStart), 3),
162
163
  g(f, {
163
164
  icon: "lucide:arrow-right",
164
- class: "w-4 h-4 text-muted-foreground opacity-50 shrink-0"
165
+ class: "w-4 h-4 text-muted-foreground opacity-60 shrink-0"
165
166
  }),
166
167
  i("span", {
167
168
  class: k({ "text-muted-foreground": !n.value.end })
168
- }, R(n.value.end ? b(n.value.end) : r.placeholderEnd), 3)
169
+ }, R(n.value.end ? D(n.value.end) : r.placeholderEnd), 3)
169
170
  ])
170
171
  ]),
171
172
  _: 1
172
173
  }, 8, ["variant", "size", "disabled", "class"])
173
174
  ]),
174
175
  menu: y(() => [
175
- i("div", H, [
176
- r.showQuickRanges ? (d(), x("div", Q, [
176
+ i("div", j, [
177
+ r.showQuickRanges ? (d(), x("div", H, [
177
178
  e[1] || (e[1] = i("div", { class: "text-xs pl-2 pb-2 font-semibold text-muted-foreground uppercase tracking-wider" }, " Quick Ranges ", -1)),
178
- (d(!0), x(z, null, B(C.value, (a) => (d(), m(P, {
179
+ (d(!0), x(z, null, B(N.value, (a) => (d(), m(P, {
179
180
  key: a.value,
180
181
  text: a.label,
181
182
  icon: a.icon,
@@ -185,7 +186,7 @@ const $ = { class: "flex items-center gap-2" }, H = { class: "flex flex-col sm:f
185
186
  onClick: (s) => F(a)
186
187
  }, null, 8, ["text", "icon", "onClick"]))), 128))
187
188
  ])) : E("", !0),
188
- i("div", j, [
189
+ i("div", Q, [
189
190
  i("div", O, [
190
191
  (d(), m(h(p), {
191
192
  key: "start-" + c.value,
@@ -214,7 +215,7 @@ const $ = { class: "flex items-center gap-2" }, H = { class: "flex flex-col sm:f
214
215
  value: n.value.end,
215
216
  onChange: _,
216
217
  mode: "date",
217
- "min-date": N.value,
218
+ "min-date": C.value,
218
219
  "max-date": r.maxDate,
219
220
  disabled: r.disabled,
220
221
  readonly: r.readonly
@@ -1,52 +1,29 @@
1
1
  import { IForm, IFormStep, IFormSubmitPayload } from './types';
2
2
  import { InputVariant, InputSize, InputRounded, TimelineTextPosition, ButtonProps } from '../../types';
3
3
  interface Props {
4
- /** Schema - single array or grouped arrays */
5
4
  schema: IForm[] | IForm[][];
6
- /** Initial/bound values */
7
5
  values?: Record<string, any>;
8
- /** Input variant applied to all fields */
9
6
  variant?: InputVariant;
10
- /** Input size applied to all fields */
11
7
  size?: InputSize;
12
- /** Input rounded applied to all fields */
13
8
  rounded?: InputRounded;
14
- /** Loading state during submit */
15
9
  loading?: boolean;
16
- /** Show/hide default footer with submit button */
17
10
  footer?: boolean;
18
- /** Headings for grouped schemas */
19
11
  groupsHeadings?: string[];
20
- /** Descriptions for grouped schemas */
21
12
  groupHeadingsDescription?: string[];
22
- /** Timeline steps for multi-step form mode */
23
13
  tabs?: IFormStep[];
24
- /** Submit button text */
25
14
  submitText?: string;
26
15
  submitProps?: ButtonProps;
27
- /** Cancel button text */
28
16
  cancelText?: string;
29
- /** Show cancel button */
30
17
  showCancel?: boolean;
31
- /** Whether this is an update operation */
32
18
  isUpdate?: boolean;
33
- /** Folder ID for file uploads */
34
19
  folderId?: string;
35
- /** Custom class for form element */
36
20
  class?: string;
37
- /** Custom class for the grid layout (overrides columns) */
38
21
  className?: string;
39
- /** Custom class for group containers */
40
22
  groupClass?: string;
41
- /** Custom class for group/step headers */
42
23
  headerClass?: string;
43
- /** Custom class for the footer area */
44
24
  footerClass?: string;
45
- /** Timeline text position */
46
25
  timelineTextPosition?: TimelineTextPosition;
47
- /** Fields to explicitly include in the submit payload */
48
26
  emitFields?: string[];
49
- /** Show asterisk for required fields */
50
27
  showRequiredAsterisk?: boolean;
51
28
  }
52
29
  declare function __VLS_template(): {
@@ -1,7 +1,7 @@
1
1
  import o from "./Form.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-655cd96c"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-78f87e2c"]]);
5
5
  export {
6
6
  p as default
7
7
  };