vlite3 0.5.7 → 0.5.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.
- package/components/Badge.vue.d.ts +3 -3
- package/components/Badge.vue.js +27 -16
- package/components/Breadcrumb/Breadcrumb.vue.js +2 -2
- package/components/Chip/Chip.vue.d.ts +6 -3
- package/components/Chip/Chip.vue.js +48 -40
- package/components/CommandPaletteContent.vue.d.ts +1 -0
- package/components/CommandPaletteContent.vue.js +1 -1
- package/components/CommandPaletteContent.vue2.js +129 -105
- package/components/NavbarCommandPalette.vue.d.ts +7 -2
- package/components/NavbarCommandPalette.vue.js +52 -43
- package/components/PermissionMatrix/PermissionMatrix.vue.js +2 -2
- package/components/Screen/Screen.vue.js +35 -34
- package/components/StatusChip/StatusChip.vue.d.ts +21 -0
- package/components/StatusChip/StatusChip.vue.js +28 -0
- package/components/StatusChip/StatusChip.vue2.js +4 -0
- package/components/StatusChip/index.d.ts +3 -0
- package/components/StatusChip/status-map.d.ts +23 -0
- package/components/StatusChip/status-map.js +112 -0
- package/index.d.ts +1 -0
- package/index.js +101 -95
- package/package.json +1 -1
- package/style.css +184 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as De, computed as o, ref as x, provide as Z, watch as q, resolveComponent as Pe, openBlock as a, createElementBlock as c, normalizeClass as O, createElementVNode as g, renderSlot as B, toDisplayString as
|
|
1
|
+
import { defineComponent as De, computed as o, ref as x, provide as Z, watch as q, resolveComponent as Pe, openBlock as a, createElementBlock as c, normalizeClass as O, createElementVNode as g, renderSlot as B, toDisplayString as m, createBlock as s, withCtx as d, createVNode as u, createCommentVNode as f, unref as w, resolveDynamicComponent as z, Fragment as D, mergeProps as h, createTextVNode as p, renderList as Ie } from "vue";
|
|
2
2
|
import Se from "../Input.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import v from "../Button.vue.js";
|
|
@@ -148,10 +148,10 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
148
148
|
}), ue = o(() => {
|
|
149
149
|
const e = r("vlite.screen.confirmDeleteTitle");
|
|
150
150
|
return e !== "vlite.screen.confirmDeleteTitle" ? e : "Confirm Deletion";
|
|
151
|
-
}),
|
|
151
|
+
}), me = o(() => {
|
|
152
152
|
const e = r("vlite.screen.confirmDeleteDesc", { count: j.value.length });
|
|
153
153
|
return e !== "vlite.screen.confirmDeleteDesc" ? e : `Are you sure you want to delete the selected ${j.value.length > 1 ? "items" : "item"}?`;
|
|
154
|
-
}),
|
|
154
|
+
}), fe = o(() => {
|
|
155
155
|
const e = r("vlite.screen.confirmDeleteBtn");
|
|
156
156
|
return e !== "vlite.screen.confirmDeleteBtn" ? e : "Delete";
|
|
157
157
|
}), ve = o(() => {
|
|
@@ -220,11 +220,12 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
220
220
|
g("div", Me, [
|
|
221
221
|
B(e.$slots, "title", {}, () => [
|
|
222
222
|
Q.value ? (a(), c("div", Ue, [
|
|
223
|
-
g("h1", qe,
|
|
223
|
+
g("h1", qe, m(Q.value), 1),
|
|
224
224
|
t.info || t.infoI18n ? (a(), s($e, {
|
|
225
225
|
key: 0,
|
|
226
226
|
content: t.info,
|
|
227
|
-
"content-i18n": t.infoI18n
|
|
227
|
+
"content-i18n": t.infoI18n,
|
|
228
|
+
placement: "right"
|
|
228
229
|
}, {
|
|
229
230
|
default: d(() => [
|
|
230
231
|
u(R, {
|
|
@@ -233,11 +234,11 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
233
234
|
})
|
|
234
235
|
]),
|
|
235
236
|
_: 1
|
|
236
|
-
}, 8, ["content", "content-i18n"])) :
|
|
237
|
-
])) :
|
|
237
|
+
}, 8, ["content", "content-i18n"])) : f("", !0)
|
|
238
|
+
])) : f("", !0)
|
|
238
239
|
]),
|
|
239
240
|
B(e.$slots, "description", {}, () => [
|
|
240
|
-
G.value ? (a(), c("p", ze,
|
|
241
|
+
G.value ? (a(), c("p", ze, m(G.value), 1)) : f("", !0)
|
|
241
242
|
])
|
|
242
243
|
]),
|
|
243
244
|
g("div", He, [
|
|
@@ -249,7 +250,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
249
250
|
icon: "lucide:trash-2",
|
|
250
251
|
title: ie.value,
|
|
251
252
|
onClick: l[0] || (l[0] = (i) => N(b.value))
|
|
252
|
-
}, null, 8, ["title"])) :
|
|
253
|
+
}, null, 8, ["title"])) : f("", !0),
|
|
253
254
|
t.table && t.list ? (a(), c("div", Ke, [
|
|
254
255
|
g("button", {
|
|
255
256
|
onClick: l[1] || (l[1] = (i) => I.value = "list"),
|
|
@@ -275,7 +276,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
275
276
|
class: "w-4 h-4"
|
|
276
277
|
})
|
|
277
278
|
], 10, Ge)
|
|
278
|
-
])) :
|
|
279
|
+
])) : f("", !0),
|
|
279
280
|
B(e.$slots, "before-search"),
|
|
280
281
|
t.showRefresh ? (a(), s(v, {
|
|
281
282
|
key: 2,
|
|
@@ -286,7 +287,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
286
287
|
title: se.value,
|
|
287
288
|
disabled: t.loading,
|
|
288
289
|
onClick: C
|
|
289
|
-
}, null, 8, ["title", "disabled"])) :
|
|
290
|
+
}, null, 8, ["title", "disabled"])) : f("", !0),
|
|
290
291
|
t.filterSchema && t.filterSchema.length > 0 ? (a(), s(Ae, {
|
|
291
292
|
key: 3,
|
|
292
293
|
schema: t.filterSchema,
|
|
@@ -294,7 +295,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
294
295
|
modelValue: T.value,
|
|
295
296
|
"onUpdate:modelValue": l[3] || (l[3] = (i) => T.value = i),
|
|
296
297
|
onChange: C
|
|
297
|
-
}, null, 8, ["schema", "type", "modelValue"])) :
|
|
298
|
+
}, null, 8, ["schema", "type", "modelValue"])) : f("", !0),
|
|
298
299
|
t.canSearch ? (a(), c("div", We, [
|
|
299
300
|
u(Se, {
|
|
300
301
|
lazy: "",
|
|
@@ -306,7 +307,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
306
307
|
class: "bg-background w-full",
|
|
307
308
|
"show-clear-button": !0
|
|
308
309
|
}, null, 8, ["modelValue", "placeholder"])
|
|
309
|
-
])) :
|
|
310
|
+
])) : f("", !0)
|
|
310
311
|
]),
|
|
311
312
|
g("div", Xe, [
|
|
312
313
|
B(e.$slots, "actions", {}, () => [
|
|
@@ -328,7 +329,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
328
329
|
variant: t.addBtn.variant || "primary"
|
|
329
330
|
}, t.addBtn.buttonProps), {
|
|
330
331
|
default: d(() => [
|
|
331
|
-
p(
|
|
332
|
+
p(m(y.value), 1)
|
|
332
333
|
]),
|
|
333
334
|
_: 1
|
|
334
335
|
}, 16, ["icon", "variant"])
|
|
@@ -346,7 +347,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
346
347
|
variant: t.addBtn.variant || "primary"
|
|
347
348
|
}, t.addBtn.buttonProps), {
|
|
348
349
|
default: d(() => [
|
|
349
|
-
p(
|
|
350
|
+
p(m(y.value), 1)
|
|
350
351
|
]),
|
|
351
352
|
_: 1
|
|
352
353
|
}, 16, ["icon", "variant"])
|
|
@@ -364,7 +365,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
364
365
|
variant: t.addBtn.variant || "primary"
|
|
365
366
|
}, t.addBtn.buttonProps), {
|
|
366
367
|
default: d(() => [
|
|
367
|
-
p(
|
|
368
|
+
p(m(y.value), 1)
|
|
368
369
|
]),
|
|
369
370
|
_: 1
|
|
370
371
|
}, 16, ["icon", "variant"])
|
|
@@ -377,7 +378,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
377
378
|
onClick: l[5] || (l[5] = (i) => t.addBtn.onClick ? t.addBtn.onClick() : e.$emit("add"))
|
|
378
379
|
}), {
|
|
379
380
|
default: d(() => [
|
|
380
|
-
p(
|
|
381
|
+
p(m(y.value), 1)
|
|
381
382
|
]),
|
|
382
383
|
_: 1
|
|
383
384
|
}, 16, ["icon", "variant"]))
|
|
@@ -389,11 +390,11 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
389
390
|
onClick: l[6] || (l[6] = (i) => e.$emit("add"))
|
|
390
391
|
}, {
|
|
391
392
|
default: d(() => [
|
|
392
|
-
p(
|
|
393
|
+
p(m(y.value), 1)
|
|
393
394
|
]),
|
|
394
395
|
_: 1
|
|
395
396
|
}))
|
|
396
|
-
], 64)) :
|
|
397
|
+
], 64)) : f("", !0)
|
|
397
398
|
]),
|
|
398
399
|
W.value ? (a(), s(Ee, {
|
|
399
400
|
key: 0,
|
|
@@ -411,7 +412,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
411
412
|
}, null, 8, ["title"])
|
|
412
413
|
]),
|
|
413
414
|
_: 1
|
|
414
|
-
}, 8, ["options"])) :
|
|
415
|
+
}, 8, ["options"])) : f("", !0),
|
|
415
416
|
B(e.$slots, "after-add")
|
|
416
417
|
])
|
|
417
418
|
])
|
|
@@ -442,7 +443,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
442
443
|
class: "px-6!"
|
|
443
444
|
}, t.addBtn.buttonProps), {
|
|
444
445
|
default: d(() => [
|
|
445
|
-
p(
|
|
446
|
+
p(m(y.value), 1)
|
|
446
447
|
]),
|
|
447
448
|
_: 1
|
|
448
449
|
}, 16, ["icon", "variant"])
|
|
@@ -459,7 +460,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
459
460
|
variant: t.addBtn.variant || "outline"
|
|
460
461
|
}, t.addBtn.buttonProps), {
|
|
461
462
|
default: d(() => [
|
|
462
|
-
p(
|
|
463
|
+
p(m(y.value), 1)
|
|
463
464
|
]),
|
|
464
465
|
_: 1
|
|
465
466
|
}, 16, ["icon", "variant"])
|
|
@@ -476,7 +477,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
476
477
|
variant: t.addBtn.variant || "outline"
|
|
477
478
|
}, t.addBtn.buttonProps), {
|
|
478
479
|
default: d(() => [
|
|
479
|
-
p(
|
|
480
|
+
p(m(y.value), 1)
|
|
480
481
|
]),
|
|
481
482
|
_: 1
|
|
482
483
|
}, 16, ["icon", "variant"])
|
|
@@ -488,7 +489,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
488
489
|
onClick: l[7] || (l[7] = (i) => t.addBtn.onClick ? t.addBtn.onClick() : e.$emit("add"))
|
|
489
490
|
}), {
|
|
490
491
|
default: d(() => [
|
|
491
|
-
p(
|
|
492
|
+
p(m(y.value), 1)
|
|
492
493
|
]),
|
|
493
494
|
_: 1
|
|
494
495
|
}, 16, ["icon", "variant"]))
|
|
@@ -499,11 +500,11 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
499
500
|
onClick: l[8] || (l[8] = (i) => e.$emit("add"))
|
|
500
501
|
}, {
|
|
501
502
|
default: d(() => [
|
|
502
|
-
p(
|
|
503
|
+
p(m(y.value), 1)
|
|
503
504
|
]),
|
|
504
505
|
_: 1
|
|
505
506
|
}))
|
|
506
|
-
], 64)) :
|
|
507
|
+
], 64)) : f("", !0)
|
|
507
508
|
]),
|
|
508
509
|
_: 1
|
|
509
510
|
}, 8, ["title", "titleI18n", "description", "descriptionI18n", "icon"])
|
|
@@ -517,7 +518,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
517
518
|
"onUpdate:selectedRows": l[9] || (l[9] = (i) => b.value = i),
|
|
518
519
|
delete: N,
|
|
519
520
|
onDelete: ne
|
|
520
|
-
}, null, 40, ["data", "loading", "refetch", "selectedRows"])) : (a(), c("div", _e,
|
|
521
|
+
}, null, 40, ["data", "loading", "refetch", "selectedRows"])) : (a(), c("div", _e, m(he.value), 1))
|
|
521
522
|
], 64))
|
|
522
523
|
], 2),
|
|
523
524
|
t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (a(), c("div", et, [
|
|
@@ -529,13 +530,13 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
529
530
|
onChange: ae,
|
|
530
531
|
"onUpdate:itemsPerPage": le
|
|
531
532
|
}), null, 16, ["current-page", "total-pages", "total-items"])
|
|
532
|
-
])) :
|
|
533
|
+
])) : f("", !0),
|
|
533
534
|
u(Te, {
|
|
534
535
|
show: $.value,
|
|
535
536
|
"onUpdate:show": l[10] || (l[10] = (i) => $.value = i),
|
|
536
537
|
title: ue.value,
|
|
537
|
-
description:
|
|
538
|
-
"confirm-text":
|
|
538
|
+
description: me.value,
|
|
539
|
+
"confirm-text": fe.value,
|
|
539
540
|
"cancel-text": ve.value,
|
|
540
541
|
variant: "danger",
|
|
541
542
|
onConfirm: te,
|
|
@@ -561,7 +562,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
561
562
|
class: "hidden!"
|
|
562
563
|
}), null, 16, ["data", "fields", "mode", "title"]),
|
|
563
564
|
g("div", tt, [
|
|
564
|
-
g("h6", nt,
|
|
565
|
+
g("h6", nt, m(w(r)("vlite.exportData.selectFormat") !== "vlite.exportData.selectFormat" ? w(r)("vlite.exportData.selectFormat") : "Select Export Format"), 1),
|
|
565
566
|
g("div", at, [
|
|
566
567
|
(a(!0), c(D, null, Ie(M.value?.availableFormats || [
|
|
567
568
|
{ value: "excel", label: "Excel (.xlsx)", icon: "lucide:file-spreadsheet" },
|
|
@@ -578,7 +579,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
578
579
|
icon: E.icon,
|
|
579
580
|
class: "text-muted-foreground h-5 w-5"
|
|
580
581
|
}, null, 8, ["icon"]),
|
|
581
|
-
g("span", null,
|
|
582
|
+
g("span", null, m(E.label), 1)
|
|
582
583
|
]),
|
|
583
584
|
_: 2
|
|
584
585
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -586,7 +587,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
586
587
|
])
|
|
587
588
|
]),
|
|
588
589
|
_: 1
|
|
589
|
-
}, 8, ["show", "title"])) :
|
|
590
|
+
}, 8, ["show", "title"])) : f("", !0),
|
|
590
591
|
W.value ? (a(), c("div", lt, [
|
|
591
592
|
u(Re, h({
|
|
592
593
|
show: U.value,
|
|
@@ -600,7 +601,7 @@ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex
|
|
|
600
601
|
title: X.value,
|
|
601
602
|
class: "hidden!"
|
|
602
603
|
}), null, 16, ["show", "fields", "title"])
|
|
603
|
-
])) :
|
|
604
|
+
])) : f("", !0)
|
|
604
605
|
]);
|
|
605
606
|
};
|
|
606
607
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ChipProps } from '../Chip/types';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** The status value (e.g. 'in_progress', 'Approved', 'CANCELLED') */
|
|
4
|
+
status: string;
|
|
5
|
+
/** Override resolved label (falls back to status if not provided) */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** i18n key for the label */
|
|
8
|
+
labelI18n?: string;
|
|
9
|
+
/** Hide the icon even when one is resolved */
|
|
10
|
+
hideIcon?: boolean;
|
|
11
|
+
/** Override chip size */
|
|
12
|
+
size?: ChipProps['size'];
|
|
13
|
+
/** Extra classes */
|
|
14
|
+
class?: string;
|
|
15
|
+
}
|
|
16
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
17
|
+
size: ChipProps["size"];
|
|
18
|
+
class: string;
|
|
19
|
+
hideIcon: boolean;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineComponent as o, computed as s, openBlock as r, createBlock as i, unref as c, normalizeClass as u } from "vue";
|
|
2
|
+
import f from "../Chip/Chip.vue.js";
|
|
3
|
+
import { resolveStatus as p } from "./status-map.js";
|
|
4
|
+
import { $t as m } from "../../utils/i18n.js";
|
|
5
|
+
const _ = /* @__PURE__ */ o({
|
|
6
|
+
__name: "StatusChip",
|
|
7
|
+
props: {
|
|
8
|
+
status: {},
|
|
9
|
+
label: {},
|
|
10
|
+
labelI18n: {},
|
|
11
|
+
hideIcon: { type: Boolean, default: !1 },
|
|
12
|
+
size: { default: "small" },
|
|
13
|
+
class: { default: "" }
|
|
14
|
+
},
|
|
15
|
+
setup(a) {
|
|
16
|
+
const e = a, t = s(() => p(e.status)), n = s(() => e.labelI18n ? m(e.labelI18n) : e.label ? e.label : e.status.replace(/[_\-]+/g, " ").replace(/\b\w/g, (l) => l.toUpperCase()));
|
|
17
|
+
return (l, d) => (r(), i(c(f), {
|
|
18
|
+
text: n.value,
|
|
19
|
+
variant: t.value.variant,
|
|
20
|
+
icon: a.hideIcon ? void 0 : t.value.icon,
|
|
21
|
+
size: a.size,
|
|
22
|
+
class: u(e.class)
|
|
23
|
+
}, null, 8, ["text", "variant", "icon", "size", "class"]));
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
_ as default
|
|
28
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ChipVariant } from '../Chip/types';
|
|
2
|
+
export interface StatusConfig {
|
|
3
|
+
variant: ChipVariant | string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Canonical status → chip config map.
|
|
9
|
+
* Keys are normalized (lowercase, no spaces/underscores/hyphens).
|
|
10
|
+
* The `label` field overrides the displayed text when set.
|
|
11
|
+
*/
|
|
12
|
+
export declare const STATUS_MAP: Record<string, StatusConfig>;
|
|
13
|
+
/**
|
|
14
|
+
* Normalizes a status string to a canonical lookup key.
|
|
15
|
+
* Strips spaces, underscores, hyphens, and lowercases the result.
|
|
16
|
+
* e.g. 'In Progress' → 'inprogress', 'in_progress' → 'inprogress'
|
|
17
|
+
*/
|
|
18
|
+
export declare function normalizeStatus(status: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Resolves a status string to its StatusConfig.
|
|
21
|
+
* Falls back to a secondary chip with the raw label if not found.
|
|
22
|
+
*/
|
|
23
|
+
export declare function resolveStatus(status: string): StatusConfig;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
// ── Active / Positive ──────────────────────────────────────────────────────
|
|
3
|
+
active: { variant: "success", icon: "lucide:check-circle-2" },
|
|
4
|
+
activated: { variant: "success", icon: "lucide:check-circle-2" },
|
|
5
|
+
approved: { variant: "success", icon: "lucide:check-circle-2" },
|
|
6
|
+
completed: { variant: "success", icon: "lucide:check-circle-2" },
|
|
7
|
+
complete: { variant: "success", icon: "lucide:check-circle-2" },
|
|
8
|
+
done: { variant: "success", icon: "lucide:check-circle-2" },
|
|
9
|
+
delivered: { variant: "teal", icon: "lucide:check-circle-2" },
|
|
10
|
+
paid: { variant: "success", icon: "lucide:check-circle-2" },
|
|
11
|
+
confirmed: { variant: "success", icon: "lucide:check-circle-2" },
|
|
12
|
+
verified: { variant: "success", icon: "lucide:shield-check" },
|
|
13
|
+
accepted: { variant: "success", icon: "lucide:thumbs-up" },
|
|
14
|
+
resolved: { variant: "success", icon: "lucide:check-circle-2" },
|
|
15
|
+
closed: { variant: "secondary", icon: "lucide:lock" },
|
|
16
|
+
enabled: { variant: "success", icon: "lucide:toggle-right" },
|
|
17
|
+
open: { variant: "success", icon: "lucide:unlock" },
|
|
18
|
+
available: { variant: "teal", icon: "lucide:circle-check" },
|
|
19
|
+
present: { variant: "success", icon: "lucide:user-check" },
|
|
20
|
+
shipped: { variant: "teal", icon: "lucide:truck" },
|
|
21
|
+
published: { variant: "success", icon: "lucide:globe" },
|
|
22
|
+
online: { variant: "success", icon: "lucide:wifi" },
|
|
23
|
+
success: { variant: "success", icon: "lucide:check-circle-2" },
|
|
24
|
+
passed: { variant: "success", icon: "lucide:check-circle-2" },
|
|
25
|
+
instock: { variant: "success", icon: "lucide:package-check" },
|
|
26
|
+
fulfilled: { variant: "success", icon: "lucide:package-check" },
|
|
27
|
+
// ── In Progress / Processing / Transit ─────────────────────────────────────
|
|
28
|
+
inprogress: { variant: "info", icon: "lucide:loader-2" },
|
|
29
|
+
processing: { variant: "info", icon: "lucide:loader-2" },
|
|
30
|
+
running: { variant: "indigo", icon: "lucide:play-circle" },
|
|
31
|
+
started: { variant: "indigo", icon: "lucide:play-circle" },
|
|
32
|
+
ongoing: { variant: "info", icon: "lucide:activity" },
|
|
33
|
+
inreview: { variant: "indigo", icon: "lucide:eye" },
|
|
34
|
+
reviewing: { variant: "indigo", icon: "lucide:eye" },
|
|
35
|
+
underreview: { variant: "indigo", icon: "lucide:eye" },
|
|
36
|
+
submitted: { variant: "indigo", icon: "lucide:send" },
|
|
37
|
+
sent: { variant: "cyan", icon: "lucide:send" },
|
|
38
|
+
scheduled: { variant: "cyan", icon: "lucide:calendar-clock" },
|
|
39
|
+
syncing: { variant: "purple", icon: "lucide:refresh-cw" },
|
|
40
|
+
uploading: { variant: "purple", icon: "lucide:upload" },
|
|
41
|
+
loading: { variant: "info", icon: "lucide:loader-2" },
|
|
42
|
+
info: { variant: "info", icon: "lucide:info" },
|
|
43
|
+
intransit: { variant: "purple", icon: "lucide:truck" },
|
|
44
|
+
dispatched: { variant: "cyan", icon: "lucide:truck" },
|
|
45
|
+
partial: { variant: "cyan", icon: "lucide:git-commit" },
|
|
46
|
+
partiallypaid: { variant: "cyan", icon: "lucide:coins" },
|
|
47
|
+
// ── Pending / Warning ──────────────────────────────────────────────────────
|
|
48
|
+
pending: { variant: "warning", icon: "lucide:clock" },
|
|
49
|
+
waiting: { variant: "warning", icon: "lucide:clock" },
|
|
50
|
+
onhold: { variant: "orange", icon: "lucide:pause-circle" },
|
|
51
|
+
hold: { variant: "orange", icon: "lucide:pause-circle" },
|
|
52
|
+
paused: { variant: "orange", icon: "lucide:pause-circle" },
|
|
53
|
+
draft: { variant: "secondary", icon: "lucide:file-edit" },
|
|
54
|
+
unpaid: { variant: "warning", icon: "lucide:circle-dollar-sign" },
|
|
55
|
+
overdue: { variant: "orange", icon: "lucide:alarm-clock" },
|
|
56
|
+
expiring: { variant: "orange", icon: "lucide:timer" },
|
|
57
|
+
expiringsoon: { variant: "orange", icon: "lucide:timer" },
|
|
58
|
+
low: { variant: "orange", icon: "lucide:arrow-down" },
|
|
59
|
+
lowstock: { variant: "orange", icon: "lucide:package" },
|
|
60
|
+
warning: { variant: "warning", icon: "lucide:alert-triangle" },
|
|
61
|
+
late: { variant: "orange", icon: "lucide:alarm-clock" },
|
|
62
|
+
partiallyapproved: { variant: "orange", icon: "lucide:check" },
|
|
63
|
+
awaitingapproval: { variant: "warning", icon: "lucide:clock" },
|
|
64
|
+
// ── Error / Danger / Alternative Warnings ──────────────────────────────────
|
|
65
|
+
inactive: { variant: "secondary", icon: "lucide:circle-slash" },
|
|
66
|
+
deactivated: { variant: "secondary", icon: "lucide:circle-slash" },
|
|
67
|
+
rejected: { variant: "danger", icon: "lucide:x-circle" },
|
|
68
|
+
failed: { variant: "danger", icon: "lucide:x-circle" },
|
|
69
|
+
cancelled: { variant: "pink", icon: "lucide:ban" },
|
|
70
|
+
canceled: { variant: "pink", icon: "lucide:ban" },
|
|
71
|
+
terminated: { variant: "danger", icon: "lucide:ban" },
|
|
72
|
+
suspended: { variant: "pink", icon: "lucide:ban" },
|
|
73
|
+
blocked: { variant: "danger", icon: "lucide:shield-off" },
|
|
74
|
+
banned: { variant: "danger", icon: "lucide:shield-off" },
|
|
75
|
+
error: { variant: "danger", icon: "lucide:x-circle" },
|
|
76
|
+
expired: { variant: "danger", icon: "lucide:calendar-x" },
|
|
77
|
+
deleted: { variant: "danger", icon: "lucide:trash-2" },
|
|
78
|
+
archived: { variant: "secondary", icon: "lucide:archive" },
|
|
79
|
+
disabled: { variant: "secondary", icon: "lucide:toggle-left" },
|
|
80
|
+
void: { variant: "secondary", icon: "lucide:ban" },
|
|
81
|
+
refunded: { variant: "pink", icon: "lucide:corner-up-left" },
|
|
82
|
+
outofstock: { variant: "danger", icon: "lucide:package-x" },
|
|
83
|
+
lost: { variant: "danger", icon: "lucide:x-circle" },
|
|
84
|
+
absent: { variant: "danger", icon: "lucide:user-x" },
|
|
85
|
+
offline: { variant: "secondary", icon: "lucide:wifi-off" },
|
|
86
|
+
danger: { variant: "danger", icon: "lucide:alert-circle" },
|
|
87
|
+
declined: { variant: "danger", icon: "lucide:thumbs-down" },
|
|
88
|
+
// ── Neutral / Secondary ────────────────────────────────────────────────────
|
|
89
|
+
new: { variant: "secondary", icon: "lucide:sparkles" },
|
|
90
|
+
unassigned: { variant: "secondary", icon: "lucide:user-x" },
|
|
91
|
+
unverified: { variant: "secondary", icon: "lucide:shield" },
|
|
92
|
+
unknown: { variant: "secondary", icon: "lucide:help-circle" },
|
|
93
|
+
notstarted: { variant: "secondary", icon: "lucide:minus-circle" },
|
|
94
|
+
todo: { variant: "secondary", icon: "lucide:circle" },
|
|
95
|
+
queued: { variant: "secondary", icon: "lucide:list-ordered" },
|
|
96
|
+
requested: { variant: "secondary", icon: "lucide:send" },
|
|
97
|
+
invited: { variant: "secondary", icon: "lucide:mail" },
|
|
98
|
+
default: { variant: "secondary" },
|
|
99
|
+
none: { variant: "secondary" }
|
|
100
|
+
};
|
|
101
|
+
function n(i) {
|
|
102
|
+
return i.toLowerCase().replace(/[\s_\-]+/g, "");
|
|
103
|
+
}
|
|
104
|
+
function a(i) {
|
|
105
|
+
const c = n(i);
|
|
106
|
+
return e[c] ?? { variant: "secondary" };
|
|
107
|
+
}
|
|
108
|
+
export {
|
|
109
|
+
e as STATUS_MAP,
|
|
110
|
+
n as normalizeStatus,
|
|
111
|
+
a as resolveStatus
|
|
112
|
+
};
|
package/index.d.ts
CHANGED