vlite3 1.1.1 → 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 +2 -17
- package/components/AttachmentsList/AttachmentsList.vue.js +273 -175
- package/components/Avatar.vue.js +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
- package/components/Button.vue.d.ts +1 -1
- package/components/Button.vue.js +30 -28
- package/components/Calendar/Calendar.vue.d.ts +6 -6
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue.d.ts +12 -3
- package/components/CategoryManager/CategoryManager.vue.js +204 -145
- package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
- package/components/CategoryManager/CategoryNode.vue.js +93 -88
- package/components/CategoryManager/types.d.ts +14 -0
- package/components/Chat/ChatBubble.vue.js +22 -22
- package/components/CheckBox.vue.js +29 -28
- package/components/Chip/Chip.vue.d.ts +2 -2
- package/components/ConfirmationModal.vue.d.ts +2 -2
- 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/CustomFieldsDisplay/CustomFieldsDisplay.vue.d.ts +1 -1
- package/components/DataTable/DataTable.vue.d.ts +3 -3
- 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 +5 -2
- package/components/Dropdown/Dropdown.vue.js +117 -115
- package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
- package/components/Dropdown/DropdownItem.vue.js +21 -20
- package/components/Dropdown/DropdownMenu.vue.d.ts +1 -1
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +13 -12
- package/components/Dropdown/DropdownTrigger.vue.d.ts +3 -1
- 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.d.ts +1 -1
- package/components/FilePicker/FilePicker.vue.js +93 -90
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +230 -238
- package/components/Form/FormField.vue.d.ts +1 -1
- 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.d.ts +3 -3
- package/components/Input.vue.js +64 -62
- package/components/Invoice/Invoice.vue.d.ts +1 -4
- package/components/Invoice/Invoice.vue.js +22 -13
- 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 +6 -1
- package/components/Invoice/InvoiceVariant1.vue.js +304 -271
- package/components/Invoice/InvoiceVariant2.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant2.vue.js +168 -181
- package/components/Invoice/InvoiceVariant3.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant3.vue.js +215 -182
- package/components/Invoice/InvoiceVariant4.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant4.vue.js +281 -238
- package/components/Invoice/index.d.ts +1 -0
- package/components/Invoice/types.d.ts +26 -0
- package/components/List/List.vue.d.ts +1 -9
- package/components/List/List.vue.js +166 -165
- package/components/List/ListFieldRow.vue.d.ts +2 -2
- package/components/List/ListFieldRow.vue.js +50 -50
- 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.d.ts +1 -1
- package/components/MultiSelect/MultiSelect.vue.js +47 -46
- package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
- package/components/Navbar/NavbarItem.vue.d.ts +1 -1
- package/components/NumberInput.vue.d.ts +2 -2
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +121 -116
- package/components/OTPInput/OTPInput.vue.d.ts +1 -1
- package/components/PricingPlan/PricingPlan.vue.d.ts +2 -2
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +58 -52
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
- package/components/Stats/StatItem.vue.js +96 -91
- package/components/Stats/Stats.vue.d.ts +1 -1
- package/components/Stats/types.d.ts +1 -0
- package/components/StatusChip/status-map.js +27 -7
- 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.d.ts +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
- package/components/Workbook/Workbook.vue.d.ts +3 -3
- package/core/config.d.ts +112 -0
- package/core/index.js +17 -5
- package/index.d.ts +2 -0
- package/index.js +279 -271
- package/package.json +1 -1
- package/style.css +617 -2
- package/types/button.d.ts +1 -1
- package/types/config.type.d.ts +6 -0
- package/types/list.type.d.ts +6 -0
- package/types/styles.d.ts +1 -0
- package/utils/configUtils.d.ts +9 -0
- package/utils/configUtils.js +7 -0
- package/utils/functions.js +9 -9
- package/utils/index.d.ts +1 -0
package/types/button.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ButtonVariant = 'primary' | 'primary-light' | 'secondary' | 'danger' | 'danger-light' | 'warning' | 'warning-light' | 'info' | 'info-light' | 'success' | 'success-light' | 'outline' | 'outline-floating' | 'outline-primary' | 'outline-danger' | 'outline-warning' | 'outline-info' | 'outline-success' | 'ghost' | 'link';
|
|
1
|
+
export type ButtonVariant = 'primary' | 'primary-light' | 'secondary' | 'danger' | 'danger-light' | 'warning' | 'warning-light' | 'info' | 'info-light' | 'success' | 'success-light' | 'outline' | 'outline-floating' | 'outline-primary' | 'outline-danger' | 'outline-warning' | 'outline-info' | 'outline-success' | 'ghost' | 'transparent' | 'link';
|
|
2
2
|
export type ButtonSize = 'xs' | 'sm' | 'sm2' | 'md' | 'lg' | 'xl';
|
|
3
3
|
export type ButtonRounded = 'none' | 'sm' | 'sm2' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
|
|
4
4
|
export interface ButtonProps {
|
package/types/config.type.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { EmptyVariant } from '../components/Empty';
|
|
2
2
|
import { InputVariant, InputSize, InputRounded } from './form.type';
|
|
3
3
|
import { ChipVariant } from '../components/Chip/types';
|
|
4
|
+
import { AttachmentsListProps } from '../components/AttachmentsList/types';
|
|
5
|
+
import { ListProps } from './list.type';
|
|
6
|
+
import { InvoiceProps } from '../components/Invoice/types';
|
|
4
7
|
/**
|
|
5
8
|
* Interface for the file upload handler function.
|
|
6
9
|
* This allows users to replace the default upload logic with their own API.
|
|
@@ -94,5 +97,8 @@ export interface VLiteConfig {
|
|
|
94
97
|
hideIcon?: boolean;
|
|
95
98
|
customStatuses?: Record<string, CustomStatusConfig>;
|
|
96
99
|
};
|
|
100
|
+
attachmentsList?: Omit<AttachmentsListProps, 'attachments'>;
|
|
101
|
+
list?: Omit<ListProps, 'fields' | 'data'>;
|
|
102
|
+
invoice?: Omit<InvoiceProps, 'data'>;
|
|
97
103
|
};
|
|
98
104
|
}
|
package/types/list.type.d.ts
CHANGED
|
@@ -19,6 +19,12 @@ export interface ListField {
|
|
|
19
19
|
icon?: string;
|
|
20
20
|
/** Force item to span full-width row */
|
|
21
21
|
lineByLine?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Layout mode for the field when it is in block/full-width mode.
|
|
24
|
+
* - `'block'` — Label on top, value below (default for lineByLine: true or long text).
|
|
25
|
+
* - `'inline'` — Label and value on the same line (standard horizontal row).
|
|
26
|
+
*/
|
|
27
|
+
lineByLineLayout?: 'block' | 'inline';
|
|
22
28
|
/** Only render when value is truthy */
|
|
23
29
|
whenTrue?: boolean;
|
|
24
30
|
/** Conditional render: receives resolved value and full data, returns boolean */
|
package/types/styles.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VLiteConfig } from '../types/config.type';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves the global configuration for a specific component from createVLite configuration.
|
|
4
|
+
* If no configuration is provided globally, it returns null.
|
|
5
|
+
*
|
|
6
|
+
* @param componentKey - The key of the component configured in VLiteConfig.components
|
|
7
|
+
* @returns The component configuration object or null
|
|
8
|
+
*/
|
|
9
|
+
export declare function getComponentConfig<K extends keyof NonNullable<VLiteConfig['components']>>(componentKey: K): NonNullable<VLiteConfig['components']>[K] | null;
|
package/utils/functions.js
CHANGED
|
@@ -59,9 +59,9 @@ const P = (t) => typeof t != "string" ? "" : t.normalize("NFD").replace(/[\u0300
|
|
|
59
59
|
const o = t.slice(0, n), s = o.lastIndexOf(" ");
|
|
60
60
|
return (s > 0 ? o.slice(0, s) : o) + r;
|
|
61
61
|
}, E = (t, e = "en-US", r) => {
|
|
62
|
-
if (!Number.isFinite(t)) return "";
|
|
62
|
+
if (console.log("amount", t), !Number.isFinite(t)) return "";
|
|
63
63
|
const n = r || m?.components?.price?.currency || "USD";
|
|
64
|
-
return new Intl.NumberFormat(e, {
|
|
64
|
+
return console.log("resolvedCurrency", n), new Intl.NumberFormat(e, {
|
|
65
65
|
style: "currency",
|
|
66
66
|
currency: n
|
|
67
67
|
}).format(t);
|
|
@@ -80,7 +80,7 @@ const P = (t) => typeof t != "string" ? "" : t.normalize("NFD").replace(/[\u0300
|
|
|
80
80
|
} catch {
|
|
81
81
|
return !1;
|
|
82
82
|
}
|
|
83
|
-
},
|
|
83
|
+
}, v = (t = "month", e, r = i()) => {
|
|
84
84
|
let n = r, o, s = r;
|
|
85
85
|
switch (["week", "month", "3-months", "6-months", "year"].includes(t) && r.date() <= 7 && (s = r.subtract(1, "month")), t) {
|
|
86
86
|
case "last-week":
|
|
@@ -119,7 +119,7 @@ const P = (t) => typeof t != "string" ? "" : t.normalize("NFD").replace(/[\u0300
|
|
|
119
119
|
if (!e || !r) return t;
|
|
120
120
|
const n = i().hour(Number(e)).minute(Number(r));
|
|
121
121
|
return n.isValid() ? n.format("hh:mm A") : t;
|
|
122
|
-
},
|
|
122
|
+
}, R = (t, e, r) => {
|
|
123
123
|
const n = m?.components?.datetime?.format || "MMM DD, YYYY", o = t ? i(t).format(n) : "";
|
|
124
124
|
let s = e;
|
|
125
125
|
if (e) {
|
|
@@ -131,7 +131,7 @@ const P = (t) => typeof t != "string" ? "" : t.normalize("NFD").replace(/[\u0300
|
|
|
131
131
|
}
|
|
132
132
|
let a = r;
|
|
133
133
|
return r && (a = S(r)), !e && !r ? o : o ? `${o} • ${s} - ${a}` : `${s} - ${a}`;
|
|
134
|
-
},
|
|
134
|
+
}, U = (t) => i(t || void 0).toISOString(), V = (t) => i(t || void 0).format("YYYY-MM-DDTHH:mm:ss.SSSZ"), L = () => i().toISOString(), x = () => i().subtract(1, "day").toISOString(), T = () => i().add(1, "day").toISOString(), z = (t = 7) => i().add(t, "day").toISOString(), H = () => i().add(1, "month").toISOString(), B = () => i().subtract(1, "month").toISOString(), G = () => i().toISOString(), X = () => i().add(1, "year").toISOString(), _ = () => i().subtract(1, "year").toISOString(), h = /^([01]?\d|2[0-3]):([0-5]\d)(:([0-5]\d))?$/, g = /^(0?[1-9]|1[0-2]):([0-5]\d)(:([0-5]\d))?\s*(AM|PM|am|pm)$/, f = (t) => {
|
|
135
135
|
const e = t.trim();
|
|
136
136
|
return h.test(e) || g.test(e);
|
|
137
137
|
}, q = (t, e, r) => {
|
|
@@ -184,8 +184,8 @@ export {
|
|
|
184
184
|
S as formatAmPm,
|
|
185
185
|
E as formatCurrency,
|
|
186
186
|
q as formatDate,
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
R as formatSchedule,
|
|
188
|
+
v as getDefaultDateRange,
|
|
189
189
|
H as getNextMonth,
|
|
190
190
|
X as getNextYear,
|
|
191
191
|
B as getPrevMonth,
|
|
@@ -205,7 +205,7 @@ export {
|
|
|
205
205
|
p as removeExtraProperties,
|
|
206
206
|
P as slugify,
|
|
207
207
|
N as throttle,
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
U as toISO,
|
|
209
|
+
V as toLocalISO,
|
|
210
210
|
C as truncate
|
|
211
211
|
};
|
package/utils/index.d.ts
CHANGED