vlite3 1.1.2 → 1.1.4
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/AttachmentsList/AttachmentsList.vue.d.ts +1 -1
- package/components/AttachmentsList/AttachmentsList.vue.js +237 -163
- package/components/Avatar.vue.js +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
- package/components/Button.vue.js +30 -28
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue.d.ts +10 -2
- package/components/CategoryManager/CategoryManager.vue.js +137 -118
- package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
- package/components/CategoryManager/CategoryNode.vue.js +93 -88
- package/components/Chat/ChatBubble.vue.js +22 -22
- package/components/CheckBox.vue.js +29 -28
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- package/components/ConfirmationModal.vue.js +30 -28
- package/components/CopyButton.vue.d.ts +50 -0
- package/components/CopyButton.vue.js +69 -0
- package/components/CopyButton.vue2.js +4 -0
- package/components/DataTable/DataTable.vue.js +44 -44
- package/components/DatePicker.vue.js +41 -35
- package/components/DateRangePicker.vue.js +18 -17
- package/components/Dropdown/Dropdown.vue.d.ts +3 -0
- package/components/Dropdown/Dropdown.vue.js +117 -115
- package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
- package/components/Dropdown/DropdownItem.vue.js +21 -20
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +13 -12
- package/components/Dropdown/DropdownTrigger.vue.d.ts +2 -0
- package/components/Dropdown/DropdownTrigger.vue.js +10 -6
- package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
- package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
- package/components/Dropdown/composables/useDropdownSelection.js +46 -31
- package/components/FilePicker/FilePicker.vue.js +93 -90
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +68 -64
- package/components/Form/FormField.vue.js +204 -148
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +28 -27
- package/components/Form/types.d.ts +2 -2
- package/components/Form/utils/form.utils.d.ts +3 -3
- package/components/Form/utils/form.utils.js +37 -37
- package/components/Input.vue.js +64 -62
- package/components/Invoice/Invoice.vue.js +9 -7
- package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
- package/components/Invoice/InvoiceTotals.vue.js +86 -0
- package/components/Invoice/InvoiceTotals.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant1.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant1.vue.js +194 -207
- package/components/Invoice/InvoiceVariant2.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant2.vue.js +109 -118
- package/components/Invoice/InvoiceVariant3.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant3.vue.js +157 -167
- package/components/Invoice/InvoiceVariant4.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant4.vue.js +192 -202
- package/components/Invoice/index.d.ts +1 -0
- package/components/Invoice/types.d.ts +22 -0
- package/components/Masonry/Masonry.vue.d.ts +1 -1
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +60 -54
- package/components/MultiSelect/MultiSelect.vue.js +47 -46
- package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +121 -116
- package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +58 -52
- package/components/Stats/StatItem.vue.js +96 -91
- package/components/Stats/types.d.ts +1 -0
- package/components/Switch.vue.d.ts +6 -1
- package/components/Switch.vue.js +61 -24
- package/components/TagInput/TagInput.vue.d.ts +187 -0
- package/components/TagInput/TagInput.vue.js +113 -0
- package/components/TagInput/TagInput.vue2.js +4 -0
- package/components/TagInput/index.d.ts +1 -0
- package/components/Textarea.vue.js +19 -18
- package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
- package/core/config.d.ts +36 -0
- package/index.d.ts +2 -0
- package/index.js +130 -124
- package/package.json +1 -1
- package/style.css +616 -1
- package/types/button.d.ts +1 -1
- package/types/styles.d.ts +1 -0
- package/utils/functions.js +9 -9
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
modelValue?: string[];
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
placeholderI18n?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
maxTags?: number;
|
|
7
|
+
variant?: 'outline' | 'solid' | 'transparent' | 'outline-b' | 'floating';
|
|
8
|
+
size?: 'sm' | 'md' | 'lg';
|
|
9
|
+
rounded?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
|
|
10
|
+
error?: string;
|
|
11
|
+
class?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
14
|
+
change: (value: string[]) => any;
|
|
15
|
+
"update:modelValue": (value: string[]) => any;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
17
|
+
onChange?: (value: string[]) => any;
|
|
18
|
+
"onUpdate:modelValue"?: (value: string[]) => any;
|
|
19
|
+
}>, {
|
|
20
|
+
class: string;
|
|
21
|
+
variant: "outline" | "solid" | "transparent" | "outline-b" | "floating";
|
|
22
|
+
size: "sm" | "md" | "lg";
|
|
23
|
+
rounded: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full";
|
|
24
|
+
placeholder: string;
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
modelValue: string[];
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
28
|
+
inputRef: {
|
|
29
|
+
$: import('vue').ComponentInternalInstance;
|
|
30
|
+
$data: {};
|
|
31
|
+
$props: Partial<{
|
|
32
|
+
type: import('../..').InputType;
|
|
33
|
+
class: string;
|
|
34
|
+
variant: import('../..').InputVariant;
|
|
35
|
+
size: import('../..').InputSize;
|
|
36
|
+
rounded: import('../..').InputRounded;
|
|
37
|
+
loading: boolean;
|
|
38
|
+
readonly: boolean;
|
|
39
|
+
disabled: boolean;
|
|
40
|
+
modelValue: string | number;
|
|
41
|
+
rows: number;
|
|
42
|
+
showClearButton: boolean;
|
|
43
|
+
autofocus: boolean;
|
|
44
|
+
inputClass: string;
|
|
45
|
+
lazy: boolean;
|
|
46
|
+
labelPosition: import('../..').LabelPosition;
|
|
47
|
+
addonLeftClass: string;
|
|
48
|
+
addonRightClass: string;
|
|
49
|
+
}> & Omit<{
|
|
50
|
+
readonly modelValue?: string | number;
|
|
51
|
+
readonly type?: import('../..').InputType;
|
|
52
|
+
readonly label?: string;
|
|
53
|
+
readonly labelI18n?: string;
|
|
54
|
+
readonly placeholder?: string;
|
|
55
|
+
readonly placeholderI18n?: string;
|
|
56
|
+
readonly disabled?: boolean;
|
|
57
|
+
readonly readonly?: boolean;
|
|
58
|
+
readonly loading?: boolean;
|
|
59
|
+
readonly error?: string;
|
|
60
|
+
readonly icon?: string;
|
|
61
|
+
readonly iconClass?: string;
|
|
62
|
+
readonly iconRight?: string;
|
|
63
|
+
readonly iconRightClass?: string;
|
|
64
|
+
readonly showClearButton?: boolean;
|
|
65
|
+
readonly autofocus?: boolean;
|
|
66
|
+
readonly class?: string;
|
|
67
|
+
readonly inputClass?: string;
|
|
68
|
+
readonly rows?: number;
|
|
69
|
+
readonly lazy?: boolean;
|
|
70
|
+
readonly variant?: import('../..').InputVariant;
|
|
71
|
+
readonly size?: import('../..').InputSize;
|
|
72
|
+
readonly rounded?: import('../..').InputRounded;
|
|
73
|
+
readonly labelPosition?: import('../..').LabelPosition;
|
|
74
|
+
readonly addonLeft?: string | Record<string, any>;
|
|
75
|
+
readonly addonRight?: string | Record<string, any>;
|
|
76
|
+
readonly addonLeftClass?: string;
|
|
77
|
+
readonly addonRightClass?: string;
|
|
78
|
+
readonly min?: number;
|
|
79
|
+
readonly max?: number;
|
|
80
|
+
readonly onBlur?: (event: FocusEvent) => any;
|
|
81
|
+
readonly onFocus?: (event: FocusEvent) => any;
|
|
82
|
+
readonly onChange?: (value: string | number) => any;
|
|
83
|
+
readonly "onUpdate:modelValue"?: (value: string | number) => any;
|
|
84
|
+
readonly "onClick:icon"?: (event: MouseEvent) => any;
|
|
85
|
+
readonly "onClick:icon-right"?: (event: MouseEvent) => any;
|
|
86
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "type" | "class" | "variant" | "size" | "rounded" | "loading" | "readonly" | "disabled" | "modelValue" | "rows" | "showClearButton" | "autofocus" | "inputClass" | "lazy" | "labelPosition" | "addonLeftClass" | "addonRightClass">;
|
|
87
|
+
$attrs: {
|
|
88
|
+
[x: string]: unknown;
|
|
89
|
+
};
|
|
90
|
+
$refs: {
|
|
91
|
+
[x: string]: unknown;
|
|
92
|
+
} & {
|
|
93
|
+
inputRef: HTMLInputElement;
|
|
94
|
+
};
|
|
95
|
+
$slots: Readonly<{
|
|
96
|
+
[name: string]: import('vue').Slot<any>;
|
|
97
|
+
}>;
|
|
98
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
99
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
100
|
+
$host: Element | null;
|
|
101
|
+
$emit: ((event: "blur", event: FocusEvent) => void) & ((event: "focus", event: FocusEvent) => void) & ((event: "change", value: string | number) => void) & ((event: "update:modelValue", value: string | number) => void) & ((event: "click:icon", event: MouseEvent) => void) & ((event: "click:icon-right", event: MouseEvent) => void);
|
|
102
|
+
$el: HTMLDivElement;
|
|
103
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('../..').InputProps> & Readonly<{
|
|
104
|
+
onBlur?: (event: FocusEvent) => any;
|
|
105
|
+
onFocus?: (event: FocusEvent) => any;
|
|
106
|
+
onChange?: (value: string | number) => any;
|
|
107
|
+
"onUpdate:modelValue"?: (value: string | number) => any;
|
|
108
|
+
"onClick:icon"?: (event: MouseEvent) => any;
|
|
109
|
+
"onClick:icon-right"?: (event: MouseEvent) => any;
|
|
110
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
111
|
+
blur: (event: FocusEvent) => any;
|
|
112
|
+
focus: (event: FocusEvent) => any;
|
|
113
|
+
change: (value: string | number) => any;
|
|
114
|
+
"update:modelValue": (value: string | number) => any;
|
|
115
|
+
"click:icon": (event: MouseEvent) => any;
|
|
116
|
+
"click:icon-right": (event: MouseEvent) => any;
|
|
117
|
+
}, string, {
|
|
118
|
+
type: import('../..').InputType;
|
|
119
|
+
class: string;
|
|
120
|
+
variant: import('../..').InputVariant;
|
|
121
|
+
size: import('../..').InputSize;
|
|
122
|
+
rounded: import('../..').InputRounded;
|
|
123
|
+
loading: boolean;
|
|
124
|
+
readonly: boolean;
|
|
125
|
+
disabled: boolean;
|
|
126
|
+
modelValue: string | number;
|
|
127
|
+
rows: number;
|
|
128
|
+
showClearButton: boolean;
|
|
129
|
+
autofocus: boolean;
|
|
130
|
+
inputClass: string;
|
|
131
|
+
lazy: boolean;
|
|
132
|
+
labelPosition: import('../..').LabelPosition;
|
|
133
|
+
addonLeftClass: string;
|
|
134
|
+
addonRightClass: string;
|
|
135
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
136
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
137
|
+
created?: (() => void) | (() => void)[];
|
|
138
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
139
|
+
mounted?: (() => void) | (() => void)[];
|
|
140
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
141
|
+
updated?: (() => void) | (() => void)[];
|
|
142
|
+
activated?: (() => void) | (() => void)[];
|
|
143
|
+
deactivated?: (() => void) | (() => void)[];
|
|
144
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
145
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
146
|
+
destroyed?: (() => void) | (() => void)[];
|
|
147
|
+
unmounted?: (() => void) | (() => void)[];
|
|
148
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
149
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
150
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
151
|
+
};
|
|
152
|
+
$forceUpdate: () => void;
|
|
153
|
+
$nextTick: typeof import('vue').nextTick;
|
|
154
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
155
|
+
} & Readonly<{
|
|
156
|
+
type: import('../..').InputType;
|
|
157
|
+
class: string;
|
|
158
|
+
variant: import('../..').InputVariant;
|
|
159
|
+
size: import('../..').InputSize;
|
|
160
|
+
rounded: import('../..').InputRounded;
|
|
161
|
+
loading: boolean;
|
|
162
|
+
readonly: boolean;
|
|
163
|
+
disabled: boolean;
|
|
164
|
+
modelValue: string | number;
|
|
165
|
+
rows: number;
|
|
166
|
+
showClearButton: boolean;
|
|
167
|
+
autofocus: boolean;
|
|
168
|
+
inputClass: string;
|
|
169
|
+
lazy: boolean;
|
|
170
|
+
labelPosition: import('../..').LabelPosition;
|
|
171
|
+
addonLeftClass: string;
|
|
172
|
+
addonRightClass: string;
|
|
173
|
+
}> & Omit<Readonly<import('../..').InputProps> & Readonly<{
|
|
174
|
+
onBlur?: (event: FocusEvent) => any;
|
|
175
|
+
onFocus?: (event: FocusEvent) => any;
|
|
176
|
+
onChange?: (value: string | number) => any;
|
|
177
|
+
"onUpdate:modelValue"?: (value: string | number) => any;
|
|
178
|
+
"onClick:icon"?: (event: MouseEvent) => any;
|
|
179
|
+
"onClick:icon-right"?: (event: MouseEvent) => any;
|
|
180
|
+
}>, "type" | "class" | "variant" | "size" | "rounded" | "loading" | "readonly" | "disabled" | "modelValue" | "rows" | "showClearButton" | "autofocus" | "inputClass" | "lazy" | "labelPosition" | "addonLeftClass" | "addonRightClass"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
181
|
+
$slots: {
|
|
182
|
+
'addon-left'?(_: {}): any;
|
|
183
|
+
'addon-right'?(_: {}): any;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
}, HTMLDivElement>;
|
|
187
|
+
export default _default;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { defineComponent as k, ref as g, computed as z, openBlock as i, createElementBlock as c, normalizeClass as p, createVNode as h, Fragment as C, renderList as I, createTextVNode as D, toDisplayString as $, createElementVNode as B, withModifiers as E, createCommentVNode as N } from "vue";
|
|
2
|
+
import R from "../Icon.vue.js";
|
|
3
|
+
import M from "../Input.vue.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { $t as x } from "../../utils/i18n.js";
|
|
6
|
+
const P = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "flex flex-wrap gap-1.5 mt-2.5"
|
|
9
|
+
}, j = ["disabled", "onClick"], F = /* @__PURE__ */ k({
|
|
10
|
+
__name: "TagInput",
|
|
11
|
+
props: {
|
|
12
|
+
modelValue: { default: () => [] },
|
|
13
|
+
placeholder: { default: "Add tag..." },
|
|
14
|
+
placeholderI18n: {},
|
|
15
|
+
disabled: { type: Boolean, default: !1 },
|
|
16
|
+
maxTags: {},
|
|
17
|
+
variant: { default: "outline" },
|
|
18
|
+
size: { default: "md" },
|
|
19
|
+
rounded: { default: "md" },
|
|
20
|
+
error: {},
|
|
21
|
+
class: { default: "" }
|
|
22
|
+
},
|
|
23
|
+
emits: ["update:modelValue", "change"],
|
|
24
|
+
setup(l, { emit: v }) {
|
|
25
|
+
const e = l, d = v, r = g(""), u = g(null), m = (t, a, o) => {
|
|
26
|
+
const n = o ? x(t, o) : x(t);
|
|
27
|
+
return n !== t ? n : a;
|
|
28
|
+
}, V = z(() => e.maxTags && e.modelValue.length >= e.maxTags ? m("vlite.tagInput.maxTagsReached", "Max tags reached") : e.placeholderI18n ? m(e.placeholderI18n, e.placeholder) : e.placeholder), b = () => {
|
|
29
|
+
if (u.value) {
|
|
30
|
+
const t = u.value.$el || u.value, a = t instanceof HTMLElement ? t.querySelector("input") : null;
|
|
31
|
+
a && a.focus();
|
|
32
|
+
}
|
|
33
|
+
}, f = () => {
|
|
34
|
+
if (e.disabled) return;
|
|
35
|
+
const t = r.value.trim();
|
|
36
|
+
if (t) {
|
|
37
|
+
if (e.maxTags && e.modelValue.length >= e.maxTags) {
|
|
38
|
+
r.value = "";
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (!e.modelValue.includes(t)) {
|
|
42
|
+
const a = [...e.modelValue, t];
|
|
43
|
+
d("update:modelValue", a), d("change", a);
|
|
44
|
+
}
|
|
45
|
+
r.value = "", b();
|
|
46
|
+
}
|
|
47
|
+
}, T = (t) => {
|
|
48
|
+
if (e.disabled) return;
|
|
49
|
+
const a = [...e.modelValue];
|
|
50
|
+
a.splice(t, 1), d("update:modelValue", a), d("change", a);
|
|
51
|
+
}, y = (t) => {
|
|
52
|
+
(t.key === "Enter" || t.key === ",") && (t.preventDefault(), f());
|
|
53
|
+
}, w = (t) => {
|
|
54
|
+
if (e.disabled) return;
|
|
55
|
+
const a = t.clipboardData?.getData("text");
|
|
56
|
+
if (a && a.includes(",")) {
|
|
57
|
+
t.preventDefault();
|
|
58
|
+
const o = a.split(",").map((s) => s.trim()).filter(Boolean);
|
|
59
|
+
let n = [...e.modelValue];
|
|
60
|
+
for (const s of o) {
|
|
61
|
+
if (e.maxTags && n.length >= e.maxTags) break;
|
|
62
|
+
n.includes(s) || n.push(s);
|
|
63
|
+
}
|
|
64
|
+
d("update:modelValue", n), d("change", n), r.value = "";
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
return (t, a) => (i(), c("div", {
|
|
68
|
+
class: p(["w-full flex flex-col", e.class])
|
|
69
|
+
}, [
|
|
70
|
+
h(M, {
|
|
71
|
+
ref_key: "inputRef",
|
|
72
|
+
ref: u,
|
|
73
|
+
modelValue: r.value,
|
|
74
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => r.value = o),
|
|
75
|
+
placeholder: V.value,
|
|
76
|
+
disabled: l.disabled || (l.maxTags ? l.modelValue.length >= l.maxTags : !1),
|
|
77
|
+
variant: l.variant,
|
|
78
|
+
size: l.size,
|
|
79
|
+
rounded: l.rounded,
|
|
80
|
+
error: l.error,
|
|
81
|
+
"show-clear-button": !1,
|
|
82
|
+
"icon-right": "lucide:plus",
|
|
83
|
+
"onClick:iconRight": f,
|
|
84
|
+
onKeydown: y,
|
|
85
|
+
onPaste: w
|
|
86
|
+
}, null, 8, ["modelValue", "placeholder", "disabled", "variant", "size", "rounded", "error"]),
|
|
87
|
+
l.modelValue.length > 0 ? (i(), c("div", P, [
|
|
88
|
+
(i(!0), c(C, null, I(l.modelValue, (o, n) => (i(), c("span", {
|
|
89
|
+
key: o + n,
|
|
90
|
+
class: p(["inline-flex items-center justify-center gap-1 bg-accent text-accent-foreground border border-border whitespace-nowrap px-2 py-0.5", [
|
|
91
|
+
l.size === "sm" ? "text-[10px] rounded-sm" : l.size === "lg" ? "text-sm rounded-md px-2.5 py-1" : "text-xs rounded"
|
|
92
|
+
]])
|
|
93
|
+
}, [
|
|
94
|
+
D($(o) + " ", 1),
|
|
95
|
+
B("button", {
|
|
96
|
+
type: "button",
|
|
97
|
+
class: "hover:text-foreground focus:outline-none disabled:opacity-50 text-muted-foreground hover:text-destructive transition-colors flex items-center justify-center",
|
|
98
|
+
disabled: l.disabled,
|
|
99
|
+
onClick: E((s) => T(n), ["stop"])
|
|
100
|
+
}, [
|
|
101
|
+
h(R, {
|
|
102
|
+
icon: "lucide:x",
|
|
103
|
+
class: "w-3 h-3"
|
|
104
|
+
})
|
|
105
|
+
], 8, j)
|
|
106
|
+
], 2))), 128))
|
|
107
|
+
])) : N("", !0)
|
|
108
|
+
], 2));
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
export {
|
|
112
|
+
F as default
|
|
113
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TagInput } from './TagInput.vue';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as c, computed as r, openBlock as p, createElementBlock as m, normalizeClass as f } from "vue";
|
|
2
2
|
import { $t as b } from "../utils/i18n.js";
|
|
3
|
-
const
|
|
3
|
+
const h = ["value", "rows", "disabled", "placeholder", "data-testid"], g = /* @__PURE__ */ c({
|
|
4
4
|
__name: "Textarea",
|
|
5
5
|
props: {
|
|
6
6
|
modelValue: { default: "" },
|
|
@@ -11,26 +11,27 @@ const x = ["value", "rows", "disabled", "placeholder"], g = /* @__PURE__ */ i({
|
|
|
11
11
|
class: { default: "" }
|
|
12
12
|
},
|
|
13
13
|
emits: ["update:modelValue", "focus", "blur"],
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
14
|
+
setup(t, { emit: s }) {
|
|
15
|
+
const a = t, o = s, n = r(() => [
|
|
16
16
|
"flex min-h-[80px] w-full rounded-md border border-input px-3 py-2 text-sm placeholder:text-muted-foreground/50 focus-visible:outline-none focus-visible:border-black disabled:cursor-not-allowed disabled:opacity-50 bg-background text-foreground",
|
|
17
|
-
|
|
18
|
-
].join(" ")), u = (
|
|
19
|
-
const e =
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
() =>
|
|
17
|
+
a.class
|
|
18
|
+
].join(" ")), u = (l) => {
|
|
19
|
+
const e = l.target;
|
|
20
|
+
o("update:modelValue", e.value);
|
|
21
|
+
}, i = r(
|
|
22
|
+
() => a.placeholderI18n ? b(a.placeholderI18n) : a.placeholder
|
|
23
23
|
);
|
|
24
|
-
return (
|
|
25
|
-
value:
|
|
26
|
-
rows:
|
|
27
|
-
disabled:
|
|
28
|
-
placeholder:
|
|
24
|
+
return (l, e) => (p(), m("textarea", {
|
|
25
|
+
value: t.modelValue,
|
|
26
|
+
rows: t.rows,
|
|
27
|
+
disabled: t.disabled,
|
|
28
|
+
placeholder: i.value,
|
|
29
29
|
class: f(n.value),
|
|
30
30
|
onInput: u,
|
|
31
|
-
onFocus: e[0] || (e[0] = (
|
|
32
|
-
onBlur: e[1] || (e[1] = (
|
|
33
|
-
|
|
31
|
+
onFocus: e[0] || (e[0] = (d) => o("focus", d)),
|
|
32
|
+
onBlur: e[1] || (e[1] = (d) => o("blur", d)),
|
|
33
|
+
"data-testid": l.$attrs["data-testid"] || (l.$attrs.name ? `textarea-${l.$attrs.name}` : "textarea")
|
|
34
|
+
}, null, 42, h));
|
|
34
35
|
}
|
|
35
36
|
});
|
|
36
37
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ThumbnailSelector.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9fd1363d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as L, ref as w, watch as
|
|
1
|
+
import { defineComponent as L, ref as w, watch as k, computed as m, openBlock as i, createElementBlock as d, toDisplayString as p, createCommentVNode as g, createElementVNode as v, createVNode as f, unref as P, withCtx as _, Fragment as V, renderList as F, normalizeClass as S, withModifiers as C, createBlock as y } from "vue";
|
|
2
2
|
import h from "../Icon.vue.js";
|
|
3
3
|
import M from "../FilePicker/FilePicker.vue.js";
|
|
4
4
|
import { VueDraggable as O } from "vue-draggable-plus";
|
|
5
5
|
import { $t as z } from "../../utils/i18n.js";
|
|
6
|
-
const q =
|
|
6
|
+
const q = ["data-testid"], G = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "text-sm font-medium text-foreground"
|
|
9
9
|
}, H = {
|
|
@@ -27,14 +27,14 @@ const q = { class: "vl-thumbnail-selector flex flex-col gap-3" }, G = {
|
|
|
27
27
|
label: {}
|
|
28
28
|
},
|
|
29
29
|
emits: ["update:images", "update:thumbnail", "change"],
|
|
30
|
-
setup(l, { emit:
|
|
31
|
-
const c = l, n =
|
|
32
|
-
|
|
30
|
+
setup(l, { emit: $ }) {
|
|
31
|
+
const c = l, n = $, r = w([...c.images || []]), o = w(c.thumbnail ?? null);
|
|
32
|
+
k(
|
|
33
33
|
() => c.images,
|
|
34
34
|
(e) => {
|
|
35
35
|
r.value = [...e || []];
|
|
36
36
|
}
|
|
37
|
-
),
|
|
37
|
+
), k(
|
|
38
38
|
() => c.thumbnail,
|
|
39
39
|
(e) => {
|
|
40
40
|
o.value = e ?? null;
|
|
@@ -43,7 +43,7 @@ const q = { class: "vl-thumbnail-selector flex flex-col gap-3" }, G = {
|
|
|
43
43
|
const x = m(() => o.value || r.value[0] || null), b = (e, u, t) => {
|
|
44
44
|
const a = t ? z(e, t) : z(e);
|
|
45
45
|
return a !== e ? a : u;
|
|
46
|
-
},
|
|
46
|
+
}, j = m(() => b("vlite.thumbnailSelector.preview", "Thumbnail preview")), T = m(() => b("vlite.thumbnailSelector.noImageSelected", "No image selected")), U = m(() => b("vlite.thumbnailSelector.image", "Image")), I = m(() => b("vlite.thumbnailSelector.removeImage", "Remove image")), R = m(() => b("vlite.thumbnailSelector.upload", "Upload")), B = m(() => b("vlite.thumbnailSelector.dragToReorder", "Drag to reorder")), D = (e) => {
|
|
47
47
|
c.disabled || c.loading || (o.value = e, n("update:thumbnail", e), n("change", { images: r.value, thumbnail: e }));
|
|
48
48
|
}, N = (e, u) => {
|
|
49
49
|
if (u.stopPropagation(), c.disabled || c.loading) return;
|
|
@@ -68,20 +68,23 @@ const q = { class: "vl-thumbnail-selector flex flex-col gap-3" }, G = {
|
|
|
68
68
|
}, E = (e) => {
|
|
69
69
|
r.value = e, n("update:images", e), n("change", { images: e, thumbnail: o.value });
|
|
70
70
|
};
|
|
71
|
-
return (e, u) => (i(), d("div",
|
|
71
|
+
return (e, u) => (i(), d("div", {
|
|
72
|
+
class: "vl-thumbnail-selector flex flex-col gap-3",
|
|
73
|
+
"data-testid": e.$attrs["data-testid"] || (e.$attrs.name ? `thumbnail-${e.$attrs.name}` : "thumbnail-selector")
|
|
74
|
+
}, [
|
|
72
75
|
l.label ? (i(), d("p", G, p(l.label), 1)) : g("", !0),
|
|
73
76
|
v("div", H, [
|
|
74
77
|
x.value ? (i(), d("img", {
|
|
75
78
|
key: 0,
|
|
76
79
|
src: x.value,
|
|
77
80
|
class: "w-full h-full object-cover",
|
|
78
|
-
alt:
|
|
81
|
+
alt: j.value
|
|
79
82
|
}, null, 8, J)) : (i(), d("div", K, [
|
|
80
83
|
f(h, {
|
|
81
84
|
icon: "lucide:image",
|
|
82
85
|
class: "w-10 h-10"
|
|
83
86
|
}),
|
|
84
|
-
v("span", Q, p(
|
|
87
|
+
v("span", Q, p(T.value), 1)
|
|
85
88
|
]))
|
|
86
89
|
]),
|
|
87
90
|
f(P(O), {
|
|
@@ -96,7 +99,7 @@ const q = { class: "vl-thumbnail-selector flex flex-col gap-3" }, G = {
|
|
|
96
99
|
class: "vl-thumbnail-selector__grid grid grid-cols-3 sm:grid-cols-4 gap-2",
|
|
97
100
|
style: { "will-change": "transform", contain: "layout style" }
|
|
98
101
|
}, {
|
|
99
|
-
default:
|
|
102
|
+
default: _(() => [
|
|
100
103
|
(i(!0), d(V, null, F(r.value, (t, a) => (i(), d("div", {
|
|
101
104
|
key: t,
|
|
102
105
|
class: S(["vl-thumbnail-selector__card relative rounded-md overflow-hidden cursor-pointer border-2 transition-all duration-150 w-full", [
|
|
@@ -109,7 +112,7 @@ const q = { class: "vl-thumbnail-selector flex flex-col gap-3" }, G = {
|
|
|
109
112
|
v("img", {
|
|
110
113
|
src: t,
|
|
111
114
|
class: "w-full h-full object-cover",
|
|
112
|
-
alt: `${
|
|
115
|
+
alt: `${U.value} ${a + 1}`
|
|
113
116
|
}, null, 8, X),
|
|
114
117
|
l.disabled ? g("", !0) : (i(), d("div", {
|
|
115
118
|
key: 0,
|
|
@@ -127,7 +130,7 @@ const q = { class: "vl-thumbnail-selector flex flex-col gap-3" }, G = {
|
|
|
127
130
|
key: 1,
|
|
128
131
|
type: "button",
|
|
129
132
|
class: "vl-thumbnail-selector__delete absolute top-0.5 right-0.5 z-10 w-5 h-5 flex items-center justify-center rounded-full bg-background/90 border border-border text-muted-foreground shadow-sm opacity-0 transition-opacity duration-150 hover:text-destructive hover:border-destructive",
|
|
130
|
-
title:
|
|
133
|
+
title: I.value,
|
|
131
134
|
onClick: C((s) => N(t, s), ["stop"])
|
|
132
135
|
}, [
|
|
133
136
|
f(h, {
|
|
@@ -152,7 +155,7 @@ const q = { class: "vl-thumbnail-selector flex flex-col gap-3" }, G = {
|
|
|
152
155
|
class: "vl-thumbnail-selector__filepicker-inline",
|
|
153
156
|
onChange: A
|
|
154
157
|
}, {
|
|
155
|
-
trigger:
|
|
158
|
+
trigger: _(({ trigger: t, isLoading: a }) => [
|
|
156
159
|
v("button", {
|
|
157
160
|
type: "button",
|
|
158
161
|
class: S(["vl-thumbnail-selector__upload flex flex-col items-center justify-center rounded-md border-2 border-dashed border-border text-muted-foreground/60 hover:border-primary/50 hover:text-primary/60 transition-all cursor-pointer w-full", a || l.loading ? "opacity-60 pointer-events-none" : ""]),
|
|
@@ -168,7 +171,7 @@ const q = { class: "vl-thumbnail-selector flex flex-col gap-3" }, G = {
|
|
|
168
171
|
icon: "lucide:plus",
|
|
169
172
|
class: "w-5 h-5"
|
|
170
173
|
})),
|
|
171
|
-
v("span", le, p(
|
|
174
|
+
v("span", le, p(R.value), 1)
|
|
172
175
|
], 10, te)
|
|
173
176
|
]),
|
|
174
177
|
_: 1
|
|
@@ -176,7 +179,7 @@ const q = { class: "vl-thumbnail-selector flex flex-col gap-3" }, G = {
|
|
|
176
179
|
]),
|
|
177
180
|
_: 1
|
|
178
181
|
}, 8, ["model-value", "disabled"])
|
|
179
|
-
]));
|
|
182
|
+
], 8, q));
|
|
180
183
|
}
|
|
181
184
|
});
|
|
182
185
|
export {
|
package/core/config.d.ts
CHANGED
|
@@ -80,6 +80,24 @@ export declare const configState: {
|
|
|
80
80
|
variant?: import('..').InvoiceVariant;
|
|
81
81
|
compact?: boolean;
|
|
82
82
|
displayBarcodeValue?: boolean;
|
|
83
|
+
labels?: {
|
|
84
|
+
invoice?: string;
|
|
85
|
+
invoiceNumber?: string;
|
|
86
|
+
issued?: string;
|
|
87
|
+
due?: string;
|
|
88
|
+
from?: string;
|
|
89
|
+
billedTo?: string;
|
|
90
|
+
status?: string;
|
|
91
|
+
item?: string;
|
|
92
|
+
price?: string;
|
|
93
|
+
qty?: string;
|
|
94
|
+
size?: string;
|
|
95
|
+
discount?: string;
|
|
96
|
+
total?: string;
|
|
97
|
+
notes?: string;
|
|
98
|
+
sku?: string;
|
|
99
|
+
taxId?: string;
|
|
100
|
+
};
|
|
83
101
|
};
|
|
84
102
|
};
|
|
85
103
|
};
|
|
@@ -163,6 +181,24 @@ export declare function useVLiteConfig(): {
|
|
|
163
181
|
variant?: import('..').InvoiceVariant;
|
|
164
182
|
compact?: boolean;
|
|
165
183
|
displayBarcodeValue?: boolean;
|
|
184
|
+
labels?: {
|
|
185
|
+
invoice?: string;
|
|
186
|
+
invoiceNumber?: string;
|
|
187
|
+
issued?: string;
|
|
188
|
+
due?: string;
|
|
189
|
+
from?: string;
|
|
190
|
+
billedTo?: string;
|
|
191
|
+
status?: string;
|
|
192
|
+
item?: string;
|
|
193
|
+
price?: string;
|
|
194
|
+
qty?: string;
|
|
195
|
+
size?: string;
|
|
196
|
+
discount?: string;
|
|
197
|
+
total?: string;
|
|
198
|
+
notes?: string;
|
|
199
|
+
sku?: string;
|
|
200
|
+
taxId?: string;
|
|
201
|
+
};
|
|
166
202
|
};
|
|
167
203
|
};
|
|
168
204
|
};
|
package/index.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export * from './components/CustomFieldsDisplay';
|
|
|
47
47
|
export * from './components/Invoice';
|
|
48
48
|
export * from './components/CategoryManager';
|
|
49
49
|
export * from './components/ThumbnailSelector';
|
|
50
|
+
export * from './components/TagInput';
|
|
50
51
|
export * from './components/Calendar';
|
|
51
52
|
export { default as Icon } from './components/Icon.vue';
|
|
52
53
|
export { default as Logo } from './components/Logo.vue';
|
|
@@ -58,6 +59,7 @@ export { default as Modal } from './components/Modal.vue';
|
|
|
58
59
|
export { default as Avatar } from './components/Avatar.vue';
|
|
59
60
|
export { default as Button } from './components/Button.vue';
|
|
60
61
|
export { default as BackButton } from './components/BackButton.vue';
|
|
62
|
+
export { default as CopyButton } from './components/CopyButton.vue';
|
|
61
63
|
export { default as Slider } from './components/Slider.vue';
|
|
62
64
|
export { default as Switch } from './components/Switch.vue';
|
|
63
65
|
export { default as Tooltip } from './components/Tooltip.vue';
|