vlite3 1.2.7 → 1.2.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/Barcode/Barcode.vue.d.ts +1 -1
- package/components/CategoryManager/CategoryManager.vue.js +1 -1
- package/components/Chip/Chip.vue.js +10 -9
- package/components/Chip/types.d.ts +1 -1
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/Dropdown/Dropdown.vue.d.ts +2 -0
- package/components/Dropdown/Dropdown.vue.js +35 -30
- package/components/Form/Form.vue.d.ts +10 -1
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +146 -132
- package/components/Screen/ScreenFilter.vue.js +26 -26
- package/components/Slider.vue.js +1 -1
- package/components/StatusChip/status-map.js +13 -0
- package/package.json +1 -1
- package/style.css +32 -1
- /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
|
@@ -12,10 +12,10 @@ declare const _default: import('vue').DefineComponent<BarcodeProps, {}, {}, {},
|
|
|
12
12
|
width: number;
|
|
13
13
|
height: number;
|
|
14
14
|
format: string;
|
|
15
|
+
background: string;
|
|
15
16
|
displayValue: boolean;
|
|
16
17
|
margin: number;
|
|
17
18
|
lineColor: string;
|
|
18
|
-
background: string;
|
|
19
19
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
20
20
|
barcodeRef: SVGSVGElement;
|
|
21
21
|
}, HTMLDivElement>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as C, computed as l, openBlock as n, createElementBlock as d, normalizeClass as
|
|
1
|
+
import { defineComponent as C, computed as l, openBlock as n, createElementBlock as d, normalizeClass as u, renderSlot as b, createBlock as f, createCommentVNode as c, createTextVNode as z, toDisplayString as B, withCtx as D, createVNode as I } from "vue";
|
|
2
2
|
import g from "../Icon.vue.js";
|
|
3
3
|
import S from "../Button.vue.js";
|
|
4
4
|
import { $t as N } from "../../utils/i18n.js";
|
|
@@ -38,7 +38,7 @@ const V = ["role", "tabindex"], j = {
|
|
|
38
38
|
}), y = l(() => {
|
|
39
39
|
if (e.disabled)
|
|
40
40
|
return "bg-muted text-muted-foreground border-transparent opacity-50 cursor-not-allowed";
|
|
41
|
-
const t = r.value ? "cursor-pointer hover:shadow-sm active:scale-[0.98]" : "cursor-default",
|
|
41
|
+
const t = r.value ? "cursor-pointer hover:shadow-sm active:scale-[0.98]" : "cursor-default", i = {
|
|
42
42
|
solid: `bg-primary text-primary-fg border-transparent ${r.value ? "hover:bg-primary/90" : ""}`,
|
|
43
43
|
outline: `bg-transparent border-input text-foreground ${r.value ? "hover:bg-accent hover:text-accent-foreground" : ""}`,
|
|
44
44
|
ghost: `bg-transparent border-transparent text-muted-foreground ${r.value ? "hover:bg-accent hover:text-accent-foreground" : ""}`,
|
|
@@ -55,9 +55,10 @@ const V = ["role", "tabindex"], j = {
|
|
|
55
55
|
indigo: `bg-indigo-subtle text-indigo-subtle-fg border-indigo-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
|
|
56
56
|
orange: `bg-orange-subtle text-orange-subtle-fg border-orange-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
|
|
57
57
|
pink: `bg-pink-subtle text-pink-subtle-fg border-pink-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
|
|
58
|
-
cyan: `bg-cyan-subtle text-cyan-subtle-fg border-cyan-subtle-border ${r.value ? "hover:opacity-80" : ""}
|
|
58
|
+
cyan: `bg-cyan-subtle text-cyan-subtle-fg border-cyan-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
|
|
59
|
+
blue: `bg-blue-200/40 text-blue-600 dark:text-blue-700 border-blue-200 ${r.value ? "hover:opacity-80" : ""}`
|
|
59
60
|
};
|
|
60
|
-
return `${
|
|
61
|
+
return `${i[e.variant] || i.subtle} ${t}`;
|
|
61
62
|
}), k = l(() => [E, x.value, y.value, e.class].join(" ")), $ = l(() => {
|
|
62
63
|
switch (e.size) {
|
|
63
64
|
case "small":
|
|
@@ -77,8 +78,8 @@ const V = ["role", "tabindex"], j = {
|
|
|
77
78
|
return "h-3 w-3";
|
|
78
79
|
}
|
|
79
80
|
});
|
|
80
|
-
return (t,
|
|
81
|
-
class:
|
|
81
|
+
return (t, i) => (n(), d("div", {
|
|
82
|
+
class: u(k.value),
|
|
82
83
|
role: a.clickable ? "button" : "status",
|
|
83
84
|
tabindex: r.value || a.deletable ? 0 : void 0,
|
|
84
85
|
onClick: p,
|
|
@@ -88,7 +89,7 @@ const V = ["role", "tabindex"], j = {
|
|
|
88
89
|
a.icon ? (n(), f(g, {
|
|
89
90
|
key: 0,
|
|
90
91
|
icon: a.icon,
|
|
91
|
-
class:
|
|
92
|
+
class: u([$.value, "shrink-0", o.value ? "-ml-0.5" : ""])
|
|
92
93
|
}, null, 8, ["icon", "class"])) : c("", !0)
|
|
93
94
|
]),
|
|
94
95
|
o.value || t.$slots.default ? (n(), d("span", j, [
|
|
@@ -102,13 +103,13 @@ const V = ["role", "tabindex"], j = {
|
|
|
102
103
|
size: "xs",
|
|
103
104
|
rounded: "full",
|
|
104
105
|
disabled: a.disabled,
|
|
105
|
-
class:
|
|
106
|
+
class: u(["ml-auto p-0.5! h-auto! w-auto! hover:bg-[#8282823c]", [o.value ? a.size === "small" ? "-mr-0.5" : "-mr-1" : ""]]),
|
|
106
107
|
onClick: m
|
|
107
108
|
}, {
|
|
108
109
|
default: D(() => [
|
|
109
110
|
I(g, {
|
|
110
111
|
icon: "lucide:x",
|
|
111
|
-
class:
|
|
112
|
+
class: u(w.value)
|
|
112
113
|
}, null, 8, ["class"])
|
|
113
114
|
]),
|
|
114
115
|
_: 1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ChipVariant = 'solid' | 'outline' | 'subtle' | 'ghost' | 'secondary' | 'success' | 'warning' | 'danger' | 'info';
|
|
1
|
+
export type ChipVariant = 'solid' | 'outline' | 'subtle' | 'ghost' | 'secondary' | 'success' | 'warning' | 'danger' | 'blue' | 'info';
|
|
2
2
|
export type ChipSize = 'small' | 'medium' | 'large';
|
|
3
3
|
export interface ChipProps {
|
|
4
4
|
text?: string;
|
|
@@ -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.
|
|
10
|
-
/* empty css
|
|
9
|
+
import E from "./ColorIro.vue2.js";
|
|
10
|
+
/* empty css */
|
|
11
11
|
import { useEyeDropper as P } from "@vueuse/core";
|
|
12
12
|
const I = {
|
|
13
13
|
key: 0,
|
|
@@ -39,6 +39,7 @@ type __VLS_Props = {
|
|
|
39
39
|
isNested?: boolean;
|
|
40
40
|
disabled?: boolean;
|
|
41
41
|
readonly?: boolean;
|
|
42
|
+
unstyled?: boolean;
|
|
42
43
|
};
|
|
43
44
|
declare function __VLS_template(): {
|
|
44
45
|
attrs: Partial<{}>;
|
|
@@ -112,6 +113,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
112
113
|
showSelectedIcon: boolean;
|
|
113
114
|
doubleConfirmation: boolean;
|
|
114
115
|
isNested: boolean;
|
|
116
|
+
unstyled: boolean;
|
|
115
117
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
116
118
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
117
119
|
export default _default;
|
|
@@ -4,9 +4,9 @@ import "v-tooltip-lite/style.css";
|
|
|
4
4
|
import ye from "./DropdownMenu.vue.js";
|
|
5
5
|
import he from "./DropdownTrigger.vue.js";
|
|
6
6
|
import ge from "../ConfirmationModal.vue.js";
|
|
7
|
-
import { useDropdownIds as
|
|
7
|
+
import { useDropdownIds as be } from "./composables/useDropdownIds.js";
|
|
8
8
|
import { useDropdownSelection as Ce } from "./composables/useDropdownSelection.js";
|
|
9
|
-
import { useDropdownHydration as
|
|
9
|
+
import { useDropdownHydration as pe } from "./composables/useDropdownHydration.js";
|
|
10
10
|
const Ne = /* @__PURE__ */ le({
|
|
11
11
|
__name: "Dropdown",
|
|
12
12
|
props: {
|
|
@@ -47,25 +47,26 @@ const Ne = /* @__PURE__ */ le({
|
|
|
47
47
|
direction: { default: "ltr" },
|
|
48
48
|
isNested: { type: Boolean, default: !1 },
|
|
49
49
|
disabled: { type: Boolean, default: !1 },
|
|
50
|
-
readonly: { type: Boolean, default: !1 }
|
|
50
|
+
readonly: { type: Boolean, default: !1 },
|
|
51
|
+
unstyled: { type: Boolean, default: !1 }
|
|
51
52
|
},
|
|
52
53
|
emits: ["onSelect", "update:modelValue", "onOpen", "onClose", "update:isOpen", "load-more", "search"],
|
|
53
54
|
setup(t, { emit: j }) {
|
|
54
|
-
const l = t, y = j,
|
|
55
|
+
const l = t, y = j, b = i(!1), h = i(null), r = i({
|
|
55
56
|
title: "Confirm Selection",
|
|
56
57
|
description: "Are you sure you want to select this option?",
|
|
57
58
|
confirmText: "Confirm",
|
|
58
59
|
cancelText: "Cancel",
|
|
59
60
|
variant: "primary"
|
|
60
|
-
}), U = f(() => l.position ? l.position : l.direction === "rtl" ? "bottom-end" : "bottom-start"), q = f(() => l.nestedPosition ? l.nestedPosition : l.direction === "rtl" ? "left-start" : "right-start"), C = i(l.isOpen || !1),
|
|
61
|
+
}), U = f(() => l.position ? l.position : l.direction === "rtl" ? "bottom-end" : "bottom-start"), q = f(() => l.nestedPosition ? l.nestedPosition : l.direction === "rtl" ? "left-start" : "right-start"), C = i(l.isOpen || !1), p = i(0), W = `dropdown-${Math.random().toString(36).substring(2, 9)}`, w = f(() => l.menuId || W), g = i([]), s = ne("dropdown-context", null), F = (e) => {
|
|
61
62
|
g.value.includes(e) || g.value.push(e), s?.registerChildId?.(e);
|
|
62
|
-
},
|
|
63
|
+
}, G = (e) => {
|
|
63
64
|
g.value = g.value.filter((o) => o !== e), s?.unregisterChildId?.(e);
|
|
64
65
|
};
|
|
65
66
|
oe(() => {
|
|
66
|
-
s?.registerChildId && s.registerChildId(`#${
|
|
67
|
+
s?.registerChildId && s.registerChildId(`#${w.value}`);
|
|
67
68
|
}), ae(() => {
|
|
68
|
-
s?.unregisterChildId && s.unregisterChildId(`#${
|
|
69
|
+
s?.unregisterChildId && s.unregisterChildId(`#${w.value}`);
|
|
69
70
|
}), M(
|
|
70
71
|
() => l.isOpen,
|
|
71
72
|
(e) => {
|
|
@@ -83,20 +84,20 @@ const Ne = /* @__PURE__ */ le({
|
|
|
83
84
|
C.value = e, y("update:isOpen", e), y(e ? "onOpen" : "onClose"), s?.onChildToggle?.(e);
|
|
84
85
|
}, O = () => {
|
|
85
86
|
N(!1);
|
|
86
|
-
},
|
|
87
|
-
e ?
|
|
87
|
+
}, J = (e) => {
|
|
88
|
+
e ? p.value++ : p.value = Math.max(0, p.value - 1);
|
|
88
89
|
};
|
|
89
90
|
L("dropdown-context", {
|
|
90
91
|
close: O,
|
|
91
92
|
onChildToggle: (e) => {
|
|
92
|
-
|
|
93
|
+
J(e), s?.onChildToggle?.(e);
|
|
93
94
|
},
|
|
94
|
-
registerChildId:
|
|
95
|
-
unregisterChildId:
|
|
95
|
+
registerChildId: F,
|
|
96
|
+
unregisterChildId: G
|
|
96
97
|
}), L("modal-context", null);
|
|
97
|
-
const
|
|
98
|
+
const $ = f(() => l.options ? l.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), S = i([]), x = i(!1), I = i(!1);
|
|
98
99
|
M(
|
|
99
|
-
|
|
100
|
+
$,
|
|
100
101
|
(e) => {
|
|
101
102
|
if (e) {
|
|
102
103
|
if (l.remote) {
|
|
@@ -118,18 +119,18 @@ const Ne = /* @__PURE__ */ le({
|
|
|
118
119
|
return k.value.forEach((n, d) => {
|
|
119
120
|
o.has(d) || (e.unshift(n), o.add(d));
|
|
120
121
|
}), e;
|
|
121
|
-
}), { selectedBuffer: k, isHydrating:
|
|
122
|
+
}), { selectedBuffer: k, isHydrating: K, hydrateSelected: E } = pe({
|
|
122
123
|
fetchSelected: l.fetchSelected,
|
|
123
124
|
getAvailableOptions: () => c.value,
|
|
124
125
|
isReady: () => I.value
|
|
125
|
-
}), { getAllRecursiveIds:
|
|
126
|
+
}), { getAllRecursiveIds: Q } = be(), X = ie({
|
|
126
127
|
...se(l),
|
|
127
128
|
options: c
|
|
128
129
|
}), { currentValue: B, selectedLabel: A, selectedIcon: H, selectOption: Y } = Ce(
|
|
129
130
|
X,
|
|
130
131
|
y
|
|
131
132
|
), Z = f(() => {
|
|
132
|
-
const e = l.ignoreClickOutside || [], o =
|
|
133
|
+
const e = l.ignoreClickOutside || [], o = Q(c.value);
|
|
133
134
|
return [.../* @__PURE__ */ new Set([...e, ...o, ...g.value])];
|
|
134
135
|
});
|
|
135
136
|
M(
|
|
@@ -153,7 +154,7 @@ const Ne = /* @__PURE__ */ le({
|
|
|
153
154
|
confirmText: "Confirm",
|
|
154
155
|
cancelText: "Cancel",
|
|
155
156
|
variant: "primary"
|
|
156
|
-
},
|
|
157
|
+
}, b.value = !0, O()) : (D(e), l.closeOnSelect && O());
|
|
157
158
|
}, D = (e) => {
|
|
158
159
|
if (l.disabled || l.readonly || e.disabled) return;
|
|
159
160
|
const o = e.value ?? e.label;
|
|
@@ -171,9 +172,9 @@ const Ne = /* @__PURE__ */ le({
|
|
|
171
172
|
});
|
|
172
173
|
}
|
|
173
174
|
}, ee = () => {
|
|
174
|
-
h.value && (D(h.value), h.value = null,
|
|
175
|
+
h.value && (D(h.value), h.value = null, b.value = !1);
|
|
175
176
|
}, te = () => {
|
|
176
|
-
h.value = null,
|
|
177
|
+
h.value = null, b.value = !1;
|
|
177
178
|
};
|
|
178
179
|
return (e, o) => (V(), re("div", {
|
|
179
180
|
class: "relative inline-block text-left",
|
|
@@ -187,16 +188,20 @@ const Ne = /* @__PURE__ */ le({
|
|
|
187
188
|
offset: t.offset,
|
|
188
189
|
placement: U.value,
|
|
189
190
|
isOpen: C.value,
|
|
190
|
-
keepAlive:
|
|
191
|
-
menuId:
|
|
191
|
+
keepAlive: p.value > 0,
|
|
192
|
+
menuId: w.value,
|
|
192
193
|
ignoreClickOutside: Z.value,
|
|
193
194
|
class: "w-full",
|
|
194
|
-
className: "dropdown " + (t.className || ""),
|
|
195
|
+
className: "dropdown " + (t.className || "") + (t.unstyled ? " unstyled-dropdown" : ""),
|
|
195
196
|
onOnShow: o[2] || (o[2] = (n) => e.$emit("onOpen")),
|
|
196
197
|
onOnHide: o[3] || (o[3] = (n) => e.$emit("onClose")),
|
|
197
198
|
"onUpdate:isOpen": N,
|
|
198
199
|
triggerClass: "w-full",
|
|
199
|
-
styles: {
|
|
200
|
+
styles: {
|
|
201
|
+
padding: "0",
|
|
202
|
+
...t.width ? { width: t.width, maxWidth: t.width } : {},
|
|
203
|
+
...t.unstyled ? { background: "transparent", border: "none", boxShadow: "none" } : {}
|
|
204
|
+
}
|
|
200
205
|
}, {
|
|
201
206
|
trigger: m(({ isOpen: n }) => [
|
|
202
207
|
v(e.$slots, "trigger", R(z({
|
|
@@ -217,9 +222,9 @@ const Ne = /* @__PURE__ */ le({
|
|
|
217
222
|
])
|
|
218
223
|
]),
|
|
219
224
|
default: m(() => [
|
|
220
|
-
!(t.disabled || t.readonly) && (
|
|
225
|
+
!(t.disabled || t.readonly) && ($.value.length || c.value.length || e.$slots.menu || e.$slots.item || e.$slots.default || t.remote || t.searchable) ? (V(), ue(ye, {
|
|
221
226
|
key: 0,
|
|
222
|
-
options:
|
|
227
|
+
options: $.value,
|
|
223
228
|
cachedOptions: c.value,
|
|
224
229
|
class: ce(t.className),
|
|
225
230
|
emptyMessage: t.emptyMessage,
|
|
@@ -234,7 +239,7 @@ const Ne = /* @__PURE__ */ le({
|
|
|
234
239
|
isCustomSlotMenu: !!e.$slots?.default || !!e.$slots?.menu,
|
|
235
240
|
layout: t.layout,
|
|
236
241
|
columns: t.columns,
|
|
237
|
-
loading: t.loading || u(
|
|
242
|
+
loading: t.loading || u(K),
|
|
238
243
|
hasMore: t.hasMore,
|
|
239
244
|
searchable: t.searchable,
|
|
240
245
|
remote: t.remote,
|
|
@@ -276,9 +281,9 @@ const Ne = /* @__PURE__ */ le({
|
|
|
276
281
|
]), 1032, ["options", "cachedOptions", "class", "emptyMessage", "searchEmptyMessage", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "isCustomSlotMenu", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) : me("", !0)
|
|
277
282
|
]),
|
|
278
283
|
_: 3
|
|
279
|
-
}, 8, ["teleport", "offset", "placement", "isOpen", "keepAlive", "menuId", "ignoreClickOutside", "className"]),
|
|
284
|
+
}, 8, ["teleport", "offset", "placement", "isOpen", "keepAlive", "menuId", "ignoreClickOutside", "className", "styles"]),
|
|
280
285
|
P(ge, {
|
|
281
|
-
show:
|
|
286
|
+
show: b.value,
|
|
282
287
|
title: r.value.title,
|
|
283
288
|
description: r.value.description,
|
|
284
289
|
"confirm-text": r.value.confirmText,
|
|
@@ -60,7 +60,16 @@ declare function __VLS_template(): {
|
|
|
60
60
|
rootEl: HTMLFormElement;
|
|
61
61
|
};
|
|
62
62
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
63
|
-
declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
63
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
64
|
+
formValues: import('vue').Ref<Record<string, any>, Record<string, any>>;
|
|
65
|
+
errors: import('vue').Ref<Record<string, string>, Record<string, string>>;
|
|
66
|
+
isSubmitting: import('vue').Ref<boolean, boolean>;
|
|
67
|
+
handleSubmit: () => Promise<void>;
|
|
68
|
+
validateAll: () => Promise<boolean>;
|
|
69
|
+
resetForm: () => void;
|
|
70
|
+
setFieldError: (name: string, error: string) => void;
|
|
71
|
+
clearErrors: () => void;
|
|
72
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
64
73
|
onSubmit: (payload: IFormSubmitPayload, close: () => void) => any;
|
|
65
74
|
onCancel: () => any;
|
|
66
75
|
onAddonAction: (action: string) => any;
|
|
@@ -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-
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-e758152a"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|