vlite3 0.9.9 → 1.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.
package/README.md CHANGED
@@ -224,84 +224,73 @@ Override these variables in `:root` or within a `.dark` class (when using class-
224
224
 
225
225
  ### Extended Color Variants
226
226
 
227
- For more complex components, vlite3 provides extended variants for main semantic colors (`primary`, `danger`, `warning`, `info`, `success`). These are useful for building nuanced UIs with subtle backgrounds, hover states, and accessible text.
227
+ For more complex components, **vlite3** provides extended variants for main semantic colors (`primary`, `danger`, `warning`, `info`, `success`). These help create nuanced UIs with subtle backgrounds, hover states, and accessible text.
228
228
 
229
- | Base Color | Variant Variables | Usage Description |
230
- | ----------- | --------------------------- | ----------------- |
231
- | **Primary** | `--color-primary-light`<br> |
232
-
233
- <br>`--color-primary-dark`<br>
234
-
235
- <br>`--color-primary-fg`<br>
236
-
237
- <br>`--color-primary-fg-light` | **Light**: Subtle background (e.g., 10% opacity).<br>
238
-
239
- <br>**Dark**: Hover state for the main color.<br>
240
-
241
- <br>**Fg**: Text color on top of the _main_ color.<br>
242
-
243
- <br>**Fg-Light**: Text color on top of the _light_ variant. |
244
- | **Danger** | `--color-danger-light`<br>
245
-
246
- <br>`--color-danger-dark`<br>
247
-
248
- <br>`--color-danger-fg`<br>
249
-
250
- <br>`--color-danger-fg-light` | **Light**: Error backgrounds (alerts).<br>
251
-
252
- <br>**Dark**: Hover state for destructive buttons.<br>
253
-
254
- <br>**Fg**: Text on destructive buttons.<br>
255
-
256
- <br>**Fg-Light**: Text on error alerts. |
257
- | **Warning** | `--color-warning-light`<br>
258
-
259
- <br>`--color-warning-dark`<br>
260
-
261
- <br>`--color-warning-fg`<br>
262
-
263
- <br>`--color-warning-fg-light` | **Light**: Warning backgrounds.<br>
229
+ ---
264
230
 
265
- <br>**Dark**: Active/Determined warning states.<br>
231
+ #### Primary
266
232
 
267
- <br>**Fg**: Text on warning badges.<br>
233
+ | Variable | Description |
234
+ | -------------------------- | -------------------------------------- |
235
+ | `--color-primary-light` | Subtle background (e.g., 10% opacity) |
236
+ | `--color-primary-dark` | Hover state for the main color |
237
+ | `--color-primary-fg` | Text color on top of the main color |
238
+ | `--color-primary-fg-light` | Text color on top of the light variant |
268
239
 
269
- <br>**Fg-Light**: Text on warning backgrounds. |
270
- | **Success** | `--color-success-light`<br>
240
+ ---
271
241
 
272
- <br>`--color-success-dark`<br>
242
+ #### Danger
273
243
 
274
- <br>`--color-success-fg`<br>
244
+ | Variable | Description |
245
+ | ------------------------- | ----------------------------------- |
246
+ | `--color-danger-light` | Error backgrounds (alerts) |
247
+ | `--color-danger-dark` | Hover state for destructive buttons |
248
+ | `--color-danger-fg` | Text on destructive buttons |
249
+ | `--color-danger-fg-light` | Text on error alerts |
275
250
 
276
- <br>`--color-success-fg-light` | **Light**: Success backgrounds (toasts).<br>
251
+ ---
277
252
 
278
- <br>**Dark**: Hover/Active success actions.<br>
253
+ #### Warning
279
254
 
280
- <br>**Fg**: Text on success buttons.<br>
255
+ | Variable | Description |
256
+ | -------------------------- | ----------------------------------- |
257
+ | `--color-warning-light` | Warning backgrounds |
258
+ | `--color-warning-dark` | Active or emphasized warning states |
259
+ | `--color-warning-fg` | Text on warning badges |
260
+ | `--color-warning-fg-light` | Text on warning backgrounds |
281
261
 
282
- <br>**Fg-Light**: Text on success backgrounds. |
283
- | **Info** | `--color-info-light`<br>
262
+ ---
284
263
 
285
- <br>`--color-info-dark`<br>
264
+ #### Success
286
265
 
287
- <br>`--color-info-fg`<br>
266
+ | Variable | Description |
267
+ | -------------------------- | ------------------------------- |
268
+ | `--color-success-light` | Success backgrounds (toasts) |
269
+ | `--color-success-dark` | Hover or active success actions |
270
+ | `--color-success-fg` | Text on success buttons |
271
+ | `--color-success-fg-light` | Text on success backgrounds |
288
272
 
289
- <br>`--color-info-fg-light` | **Light**: Info backgrounds.<br>
273
+ ---
290
274
 
291
- <br>**Dark**: Hover/Active info actions.<br>
275
+ #### Info
292
276
 
293
- <br>**Fg**: Text on info buttons.<br>
277
+ | Variable | Description |
278
+ | ----------------------- | ---------------------------- |
279
+ | `--color-info-light` | Info backgrounds |
280
+ | `--color-info-dark` | Hover or active info actions |
281
+ | `--color-info-fg` | Text on info buttons |
282
+ | `--color-info-fg-light` | Text on info backgrounds |
294
283
 
295
- <br>**Fg-Light**: Text on info backgrounds. |
284
+ ---
296
285
 
297
- **Example Usage:**
286
+ ### Example Usage
298
287
 
299
288
  ```html
300
289
  <div class="bg-success-light text-success-fg-light border border-success/20">
301
290
  Operation Completed
302
291
  </div>
303
292
 
304
- <button class="bg-danger text-danger-fg hover:bg-danger-dark">Delete</button>
293
+ <button class="bg-danger text-danger-fg hover:bg-dang
305
294
  ```
306
295
 
307
296
  ### Additional Colors
@@ -404,16 +393,19 @@ Follow these rules strictly to ensure visual consistency and predictable styling
404
393
  - [x] **Label**
405
394
  - [x] **Badge**
406
395
  - [x] **Chip**
396
+ - [x] **StatusChip**
407
397
  - [x] **Logo**
408
398
  - [x] **Navbar**
409
399
  - [x] **SidebarMenu**
410
400
  - [x] **SidePanel**
411
401
  - [x] **Breadcrumb**
412
402
  - [x] **List**
403
+ - [x] **AttachmentsList**
413
404
  - [x] **Masonry Grid**
414
405
  - [x] **Stats**
415
406
  - [x] **ThemeToggle**
416
407
  - [x] **Screen**
408
+ - [x] **ChatInterface**
417
409
 
418
410
  ### Inputs & Forms
419
411
 
@@ -454,11 +446,14 @@ Follow these rules strictly to ensure visual consistency and predictable styling
454
446
  - [x] **Tabes**
455
447
  - [x] **Masonry**
456
448
  - [x] **Stats**
449
+ - [x] **Price**
450
+ - [x] **Date**
457
451
 
458
452
  ### Feedback & Overlays
459
453
 
460
454
  - [x] **Alert**
461
455
  - [x] **Modal**
456
+ - [x] **Empty**
462
457
  - [x] **ConfirmationModal**
463
458
  - [x] **ToastNotification**
464
459
  - [x] **Tooltip**
@@ -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
  };
@@ -6,8 +6,8 @@ import O from "../Input.vue.js";
6
6
  import "../../core/config.js";
7
7
  /* empty css */
8
8
  import y from "../Button.vue.js";
9
- import E from "./ColorIro.vue2.js";
10
- /* empty css */
9
+ import E from "./ColorIro.vue.js";
10
+ /* empty css */
11
11
  import { useEyeDropper as P } from "@vueuse/core";
12
12
  const I = {
13
13
  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.vue2.js";
7
+ import ee from "./CommandPaletteItem.vue.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/60 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 {
@@ -1,13 +1,13 @@
1
- import { defineComponent as T, computed as d, openBlock as x, createBlock as w, unref as o, withCtx as u, createElementVNode as z, createVNode as m, renderSlot as $, mergeProps as k } from "vue";
2
- import P from "./Button.vue.js";
3
- import B from "./Dropdown/Dropdown.vue.js";
1
+ import { defineComponent as z, computed as m, openBlock as x, createBlock as k, unref as D, withCtx as h, createElementVNode as L, createVNode as g, renderSlot as B, mergeProps as P } from "vue";
2
+ import V from "./Button.vue.js";
3
+ import U from "./Dropdown/Dropdown.vue.js";
4
4
  import "@iconify/vue";
5
- import { $t as S } from "../utils/i18n.js";
5
+ import { $t as I } from "../utils/i18n.js";
6
6
  /* empty css */
7
7
  /* empty css */
8
8
  import j, { TimePicker as C } from "v-datepicker-lite";
9
9
  import "v-datepicker-lite/style.css";
10
- const U = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ T({
10
+ const F = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ z({
11
11
  __name: "DatePicker",
12
12
  props: {
13
13
  placeholder: {},
@@ -29,34 +29,53 @@ const U = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ T({
29
29
  readonly: { type: Boolean }
30
30
  },
31
31
  emits: ["update:modelValue", "change"],
32
- setup(t, { emit: V }) {
33
- const l = t, s = V, a = d({
34
- get: () => l.modelValue ?? l.value,
32
+ setup(t, { emit: N }) {
33
+ const r = t, y = N, a = m({
34
+ get: () => r.modelValue ?? r.value,
35
35
  set: (e) => {
36
- s("update:modelValue", e), s("change", e);
36
+ y("update:modelValue", e), y("change", e);
37
37
  }
38
- }), I = (e) => e instanceof Date ? e.getHours() !== 0 || e.getMinutes() !== 0 : typeof e == "string" ? e.includes("T") || /\d{2}:\d{2}/.test(e) : !1, c = (e) => {
38
+ }), T = (e) => e instanceof Date ? e.getHours() !== 0 || e.getMinutes() !== 0 : typeof e == "string" ? e.includes("T") || /\d{2}:\d{2}/.test(e) : !1, u = (e) => {
39
+ if (!e) return null;
40
+ if (e instanceof Date)
41
+ return isNaN(e.getTime()) ? null : new Date(e.getFullYear(), e.getMonth(), e.getDate());
42
+ if (typeof e == "string") {
43
+ if (/^\d{4}-\d{2}-\d{2}$/.test(e)) {
44
+ const [l, d, o] = e.split("-").map(Number);
45
+ return new Date(l, d - 1, o);
46
+ }
47
+ if (e.includes("T")) {
48
+ const l = e.split("T")[0], [d, o, s] = l.split("-").map(Number);
49
+ return new Date(d, o - 1, s);
50
+ }
51
+ const i = new Date(e);
52
+ return isNaN(i.getTime()) ? null : i;
53
+ }
54
+ return null;
55
+ }, c = (e) => {
56
+ const n = e.getFullYear(), i = String(e.getMonth() + 1).padStart(2, "0"), l = String(e.getDate()).padStart(2, "0");
57
+ return `${n}-${i}-${l}`;
58
+ }, b = (e) => {
39
59
  try {
40
60
  if (e && typeof e == "object") {
41
- const h = e.startDate || e.start, b = e.endDate || e.end;
42
- if (h && b) {
43
- const y = new Date(h), g = new Date(b);
44
- if (!isNaN(y.getTime()) && !isNaN(g.getTime()))
45
- return { startDate: y, endDate: g };
61
+ const d = e.startDate || e.start, o = e.endDate || e.end;
62
+ if (d && o) {
63
+ const s = u(d), w = u(o);
64
+ if (s && w) return { startDate: s, endDate: w };
46
65
  }
47
66
  }
48
- const n = new Date(e);
49
- if (isNaN(n.getTime())) return null;
50
- const i = new Date(n), D = new Date(n);
51
- return D.setDate(i.getDate() + 6), { startDate: i, endDate: D };
67
+ const n = u(e);
68
+ if (!n) return null;
69
+ const i = new Date(n), l = new Date(n);
70
+ return l.setDate(i.getDate() + 6), { startDate: i, endDate: l };
52
71
  } catch {
53
72
  return null;
54
73
  }
55
- }, r = d(() => {
74
+ }, f = m(() => {
56
75
  if (!a.value) return "";
57
- if (l.mode === "time") return a.value;
58
- if (l.mode === "week") {
59
- const e = c(a.value);
76
+ if (r.mode === "time") return a.value;
77
+ if (r.mode === "week") {
78
+ const e = b(a.value);
60
79
  if (!e) return "";
61
80
  const n = e.startDate.toLocaleDateString("en-US", {
62
81
  month: "short",
@@ -70,34 +89,52 @@ const U = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ T({
70
89
  return `${n} - ${i}`;
71
90
  }
72
91
  try {
92
+ if (r.mode === "date" || r.mode === "month") {
93
+ const i = u(a.value);
94
+ return i ? i.toLocaleDateString("en-US", {
95
+ month: "short",
96
+ day: "numeric",
97
+ year: "numeric"
98
+ }) : String(a.value);
99
+ }
73
100
  const e = new Date(a.value);
74
101
  if (isNaN(e.getTime())) return String(a.value);
75
- const n = l.mode === "dateTime" && I(a.value);
102
+ const n = r.mode === "dateTime" && T(a.value);
76
103
  return e.toLocaleDateString("en-US", {
77
104
  month: "short",
78
105
  day: "numeric",
79
106
  year: "numeric",
80
- ...n ? { hour: "2-digit", minute: "2-digit", hour12: l.timeFormat === "12h" } : {}
107
+ ...n ? { hour: "2-digit", minute: "2-digit", hour12: r.timeFormat === "12h" } : {}
81
108
  });
82
109
  } catch {
83
110
  return String(a.value);
84
111
  }
85
- }), f = d(() => {
86
- if (l.placeholderI18n) return S(l.placeholderI18n);
87
- if (l.placeholder !== void 0) return l.placeholder;
88
- const e = S("vlite.datePicker.placeholder");
112
+ }), v = m(() => {
113
+ if (r.placeholderI18n) return I(r.placeholderI18n);
114
+ if (r.placeholder !== void 0) return r.placeholder;
115
+ const e = I("vlite.datePicker.placeholder");
89
116
  return e !== "vlite.datePicker.placeholder" ? e : "Select date";
90
- }), v = (e) => {
91
- if (l.mode === "week") {
92
- const n = c(e);
117
+ }), S = (e) => {
118
+ if (r.mode === "week") {
119
+ const n = b(e);
120
+ if (n) {
121
+ a.value = {
122
+ startDate: c(n.startDate),
123
+ endDate: c(n.endDate)
124
+ };
125
+ return;
126
+ }
127
+ }
128
+ if (r.mode === "date" || r.mode === "month") {
129
+ const n = u(e);
93
130
  if (n) {
94
- a.value = { startDate: n.startDate, endDate: n.endDate };
131
+ a.value = c(n);
95
132
  return;
96
133
  }
97
134
  }
98
135
  a.value = e;
99
- }, N = d(() => l.mode === "week" && a.value && typeof a.value == "object" && (a.value.startDate || a.value.start) || a.value);
100
- return (e, n) => t.mode !== "time" ? (x(), w(o(B), {
136
+ }, $ = m(() => r.mode === "week" && a.value && typeof a.value == "object" && (a.value.startDate || a.value.start) || a.value);
137
+ return (e, n) => t.mode !== "time" ? (x(), k(D(U), {
101
138
  key: 0,
102
139
  position: "bottom-start",
103
140
  class: "w-full",
@@ -105,13 +142,13 @@ const U = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ T({
105
142
  teleport: t.teleport,
106
143
  disabled: t.disabled || t.readonly
107
144
  }, {
108
- trigger: u(() => [
109
- $(e.$slots, "default", {
145
+ trigger: h(() => [
146
+ B(e.$slots, "default", {
110
147
  value: a.value,
111
- displayValue: r.value
148
+ displayValue: f.value
112
149
  }, () => [
113
- m(P, k({
114
- text: r.value?.replace("-", "—") || f.value,
150
+ g(V, P({
151
+ text: f.value?.replace("-", "—") || v.value,
115
152
  variant: t.variant || "outline",
116
153
  size: t.size || "md",
117
154
  icon: t.icon || "lucide:calendar",
@@ -119,10 +156,10 @@ const U = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ T({
119
156
  }, t.btnProps, { class: "w-full justify-start text-left font-normal" }), null, 16, ["text", "variant", "size", "icon", "disabled"])
120
157
  ])
121
158
  ]),
122
- default: u(() => [
123
- z("div", U, [
124
- m(o(j), {
125
- value: N.value,
159
+ default: h(() => [
160
+ L("div", F, [
161
+ g(D(j), {
162
+ value: $.value,
126
163
  mode: t.mode,
127
164
  "min-date": t.minDate,
128
165
  "max-date": t.maxDate,
@@ -132,17 +169,17 @@ const U = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ T({
132
169
  "time-format": "12h",
133
170
  disabled: t.disabled,
134
171
  readonly: t.readonly,
135
- onChange: v
172
+ onChange: S
136
173
  }, null, 8, ["value", "mode", "min-date", "max-date", "disabled-dates", "minuteInterval", "disabled", "readonly"])
137
174
  ])
138
175
  ]),
139
176
  _: 3
140
- }, 8, ["teleport", "disabled"])) : (x(), w(o(C), {
177
+ }, 8, ["teleport", "disabled"])) : (x(), k(D(C), {
141
178
  key: 1,
142
179
  "model-value": a.value,
143
180
  "onUpdate:modelValue": [
144
181
  n[0] || (n[0] = (i) => a.value = i),
145
- v
182
+ S
146
183
  ],
147
184
  mode: t.mode,
148
185
  "min-date": t.minDate,
@@ -154,9 +191,9 @@ const U = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ T({
154
191
  disabled: t.disabled,
155
192
  readonly: t.readonly
156
193
  }, {
157
- default: u(() => [
158
- m(P, k({
159
- text: r.value || f.value,
194
+ default: h(() => [
195
+ g(V, P({
196
+ text: f.value || v.value,
160
197
  variant: t.variant || "outline",
161
198
  size: t.size || "md",
162
199
  icon: t.icon || (t.mode === "time" ? "lucide:clock" : "lucide:calendar"),
@@ -1,7 +1,7 @@
1
1
  import o from "./CustomFields.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3674ca13"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3e1f26ae"]]);
5
5
  export {
6
- s as default
6
+ r as default
7
7
  };