vlite3 0.4.8 → 0.5.2
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 +201 -100
- package/_virtual/Barcode.js +4 -0
- package/_virtual/CODE128.js +4 -0
- package/_virtual/CODE128A.js +4 -0
- package/_virtual/CODE128B.js +4 -0
- package/_virtual/CODE128C.js +4 -0
- package/_virtual/CODE128_AUTO.js +4 -0
- package/_virtual/CODE93.js +4 -0
- package/_virtual/CODE93FullASCII.js +4 -0
- package/_virtual/EAN.js +4 -0
- package/_virtual/EAN13.js +4 -0
- package/_virtual/EAN2.js +4 -0
- package/_virtual/EAN5.js +4 -0
- package/_virtual/EAN8.js +4 -0
- package/_virtual/ErrorHandler.js +4 -0
- package/_virtual/FileSaver.min.js +5 -0
- package/_virtual/FileSaver.min2.js +4 -0
- package/_virtual/ITF.js +4 -0
- package/_virtual/ITF14.js +4 -0
- package/_virtual/JsBarcode.js +7 -0
- package/_virtual/MSI.js +4 -0
- package/_virtual/MSI10.js +4 -0
- package/_virtual/MSI1010.js +4 -0
- package/_virtual/MSI11.js +4 -0
- package/_virtual/MSI1110.js +4 -0
- package/_virtual/UPC.js +4 -0
- package/_virtual/UPCE.js +4 -0
- package/_virtual/_commonjsHelpers.js +8 -0
- package/_virtual/alignment-pattern.js +4 -0
- package/_virtual/auto.js +4 -0
- package/_virtual/browser.js +7 -0
- package/_virtual/browser2.js +4 -0
- package/_virtual/canvas.js +4 -0
- package/_virtual/canvas2.js +4 -0
- package/_virtual/checksums.js +4 -0
- package/_virtual/constants.js +4 -0
- package/_virtual/constants2.js +4 -0
- package/_virtual/constants3.js +4 -0
- package/_virtual/constants4.js +4 -0
- package/_virtual/defaults.js +4 -0
- package/_virtual/dijkstra.js +4 -0
- package/_virtual/encoder.js +4 -0
- package/_virtual/error-correction-code.js +4 -0
- package/_virtual/error-correction-level.js +4 -0
- package/_virtual/exceptions.js +4 -0
- package/_virtual/finder-pattern.js +4 -0
- package/_virtual/fixOptions.js +4 -0
- package/_virtual/format-info.js +4 -0
- package/_virtual/galois-field.js +4 -0
- package/_virtual/getOptionsFromElement.js +4 -0
- package/_virtual/getRenderProperties.js +4 -0
- package/_virtual/index.js +4 -0
- package/_virtual/index10.js +4 -0
- package/_virtual/index11.js +4 -0
- package/_virtual/index2.js +4 -0
- package/_virtual/index3.js +4 -0
- package/_virtual/index4.js +4 -0
- package/_virtual/index5.js +4 -0
- package/_virtual/index6.js +4 -0
- package/_virtual/index7.js +4 -0
- package/_virtual/index8.js +4 -0
- package/_virtual/index9.js +4 -0
- package/_virtual/linearizeEncodings.js +4 -0
- package/_virtual/mask-pattern.js +4 -0
- package/_virtual/merge.js +4 -0
- package/_virtual/mode.js +4 -0
- package/_virtual/object.js +4 -0
- package/_virtual/optionsFromStrings.js +4 -0
- package/_virtual/papaparse.min.js +7 -0
- package/_virtual/papaparse.min2.js +4 -0
- package/_virtual/polynomial.js +4 -0
- package/_virtual/qrcode.js +4 -0
- package/_virtual/regex.js +4 -0
- package/_virtual/segments.js +4 -0
- package/_virtual/shared.js +4 -0
- package/_virtual/svg-tag.js +4 -0
- package/_virtual/svg.js +4 -0
- package/_virtual/utils.js +4 -0
- package/_virtual/utils2.js +4 -0
- package/_virtual/version-check.js +4 -0
- package/_virtual/version.js +4 -0
- package/components/Accordion/Accordion.vue.d.ts +7 -7
- package/components/Accordion/AccordionItem.vue.d.ts +4 -4
- package/components/Accordion/AccordionTrigger.vue.d.ts +2 -2
- package/components/Alert.vue.d.ts +1 -1
- package/components/Avatar.vue.d.ts +2 -2
- package/components/Avatar.vue.js +2 -2
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +5 -5
- package/components/Badge.vue.d.ts +1 -1
- package/components/Barcode/Barcode.vue.d.ts +22 -0
- package/components/Barcode/Barcode.vue.js +58 -0
- package/components/Barcode/Barcode.vue2.js +4 -0
- package/components/Barcode/index.d.ts +2 -0
- package/components/Barcode/types.d.ts +5 -0
- package/components/Barcode/types.js +15 -0
- package/components/Breadcrumb/Breadcrumb.vue.d.ts +23 -0
- package/components/Breadcrumb/Breadcrumb.vue.js +7 -0
- package/components/Breadcrumb/Breadcrumb.vue2.js +84 -0
- package/components/Breadcrumb/BreadcrumbItem.vue.d.ts +27 -0
- package/components/Breadcrumb/BreadcrumbItem.vue.js +7 -0
- package/components/Breadcrumb/BreadcrumbItem.vue2.js +50 -0
- package/components/Breadcrumb/index.d.ts +3 -0
- package/components/Breadcrumb/types.d.ts +19 -0
- package/components/Button.vue.d.ts +4 -4
- package/components/Button.vue.js +32 -29
- package/components/ButtonGroup.vue.d.ts +1 -1
- package/components/Carousel/Carousel.vue.d.ts +58 -58
- package/components/CheckBox.vue.d.ts +2 -2
- package/components/Chip/Chip.vue.d.ts +3 -3
- package/components/ChoiceBox/ChoiceBox.vue.d.ts +4 -4
- package/components/ColorPicker/ColorPicker.vue.d.ts +3 -3
- package/components/ColorPicker/index.d.ts +1 -0
- package/components/CommandPaletteContent.vue.d.ts +15 -0
- package/components/CommandPaletteContent.vue.js +7 -0
- package/components/CommandPaletteContent.vue2.js +287 -0
- package/components/ConfirmationModal.vue.js +12 -10
- package/components/DataList/DataList.vue.d.ts +2 -2
- package/components/DataTable/DataTable.vue.d.ts +6 -6
- package/components/DataTable/DataTableRow.vue.d.ts +3 -3
- package/components/DatePicker.vue.d.ts +2 -2
- package/components/DatePicker.vue.js +7 -7
- package/components/DateRangePicker.vue.d.ts +29 -0
- package/components/DateRangePicker.vue.js +231 -0
- package/components/DateRangePicker.vue2.js +4 -0
- package/components/Dropdown/Dropdown.vue.d.ts +11 -6
- package/components/Dropdown/Dropdown.vue.js +147 -109
- package/components/Dropdown/DropdownBooleanItem.vue.js +9 -8
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
- package/components/Dropdown/DropdownGroupedLayout.vue.js +35 -34
- package/components/Dropdown/DropdownItem.vue.js +11 -10
- package/components/Dropdown/DropdownMenu.vue.d.ts +5 -3
- package/components/Dropdown/DropdownMenu.vue.js +114 -111
- package/components/Dropdown/DropdownTrigger.vue.d.ts +2 -0
- package/components/Dropdown/DropdownTrigger.vue.js +9 -7
- package/components/ExportData/ExportData.vue.d.ts +16 -0
- package/components/ExportData/ExportData.vue.js +135 -0
- package/components/ExportData/ExportData.vue2.js +4 -0
- package/components/ExportData/index.d.ts +2 -0
- package/components/ExportData/types.d.ts +17 -0
- package/components/FilePicker/FilePicker.vue.d.ts +5 -5
- package/components/Form/CustomFields.vue.d.ts +6 -6
- package/components/Form/CustomFields.vue.js +1 -1
- package/components/Form/Form.vue.d.ts +4 -5
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +221 -178
- package/components/Form/FormField.vue.d.ts +4 -3
- package/components/Form/FormField.vue.js +70 -62
- package/components/Form/FormFields.vue.d.ts +3 -1
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +105 -59
- package/components/GoogleLogin.vue.d.ts +2 -2
- package/components/Icon.vue.d.ts +2 -0
- package/components/Icon.vue.js +12 -11
- package/components/ImportData/ImportData.vue.d.ts +31 -0
- package/components/ImportData/ImportData.vue.js +242 -0
- package/components/ImportData/ImportData.vue2.js +4 -0
- package/components/ImportData/ImportStep1.vue.d.ts +23 -0
- package/components/ImportData/ImportStep1.vue.js +162 -0
- package/components/ImportData/ImportStep1.vue2.js +4 -0
- package/components/ImportData/ImportStep2.vue.d.ts +20 -0
- package/components/ImportData/ImportStep2.vue.js +98 -0
- package/components/ImportData/ImportStep2.vue2.js +4 -0
- package/components/ImportData/ImportStep3.vue.d.ts +6 -0
- package/components/ImportData/ImportStep3.vue.js +98 -0
- package/components/ImportData/ImportStep3.vue2.js +4 -0
- package/components/ImportData/ImportStep4.vue.d.ts +6 -0
- package/components/ImportData/ImportStep4.vue.js +139 -0
- package/components/ImportData/ImportStep4.vue2.js +4 -0
- package/components/ImportData/index.d.ts +2 -0
- package/components/ImportData/types.d.ts +51 -0
- package/components/Input.vue.d.ts +9 -9
- package/components/Input.vue.js +137 -120
- package/components/List/List.vue.d.ts +18 -0
- package/components/List/List.vue.js +189 -0
- package/components/List/List.vue2.js +4 -0
- package/components/List/ListFieldRow.vue.d.ts +35 -0
- package/components/List/ListFieldRow.vue.js +119 -0
- package/components/List/ListFieldRow.vue2.js +4 -0
- package/components/List/index.d.ts +4 -0
- package/components/List/types.d.ts +1 -0
- package/components/List/utils.d.ts +9 -0
- package/components/List/utils.js +64 -0
- package/components/Masonry/Masonry.vue.d.ts +2 -2
- package/components/Modal.vue.js +5 -122
- package/components/Modal.vue2.js +133 -2
- package/components/MultiSelect/MultiSelect.vue.d.ts +12 -9
- package/components/MultiSelect/MultiSelect.vue.js +101 -64
- package/components/Navbar/Navbar.vue.d.ts +48 -9
- package/components/Navbar/Navbar.vue.js +418 -146
- package/components/Navbar/NavbarItem.vue.d.ts +2 -2
- package/components/Navbar/NavbarTabs.vue.d.ts +21 -0
- package/components/Navbar/NavbarTabs.vue.js +179 -0
- package/components/Navbar/NavbarTabs.vue3.js +5 -0
- package/components/Navbar/index.d.ts +3 -0
- package/components/NavbarCommandPalette.vue.d.ts +48 -0
- package/components/NumberInput.vue.d.ts +8 -8
- package/components/OTPInput/OTPInput.vue.d.ts +7 -7
- package/components/Pagination/Pagination.vue.d.ts +1 -1
- package/components/PermissionMatrix/PermissionEditor.vue.d.ts +36 -0
- package/components/PermissionMatrix/PermissionEditor.vue.js +323 -0
- package/components/PermissionMatrix/PermissionEditor.vue2.js +4 -0
- package/components/PermissionMatrix/PermissionMatrix.vue.d.ts +15 -0
- package/components/PermissionMatrix/PermissionMatrix.vue.js +7 -0
- package/components/PermissionMatrix/PermissionMatrix.vue2.js +245 -0
- package/components/PermissionMatrix/index.d.ts +3 -0
- package/components/PermissionMatrix/types.d.ts +59 -0
- package/components/PricingPlan/PricingPlan.vue.d.ts +3 -3
- package/components/ProgressBar/ProgressBar.vue.d.ts +3 -3
- package/components/QRCode/QRCode.vue.d.ts +15 -0
- package/components/QRCode/QRCode.vue.js +38 -0
- package/components/QRCode/QRCode.vue2.js +4 -0
- package/components/QRCode/index.d.ts +1 -0
- package/components/Screen/Screen.vue.d.ts +232 -5
- package/components/Screen/Screen.vue.js +423 -271
- package/components/Screen/ScreenFilter.vue.d.ts +2 -2
- package/components/Screen/ScreenFilter.vue.js +9 -9
- package/components/Screen/types.d.ts +12 -0
- package/components/SidePanel.vue.d.ts +2 -2
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +15 -2
- package/components/SidebarMenu/SidebarMenu.vue.js +117 -47
- package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +2 -0
- package/components/SidebarMenu/SidebarMenuItem.vue.js +192 -175
- package/components/SidebarMenu/types.d.ts +32 -5
- package/components/Slider.vue.d.ts +2 -2
- package/components/Spinner/Spinner.vue.d.ts +2 -2
- package/components/Stats/Stats.vue.d.ts +14 -0
- package/components/Stats/Stats.vue.js +307 -0
- package/components/Stats/Stats.vue2.js +4 -0
- package/components/Stats/index.d.ts +2 -0
- package/components/Stats/types.d.ts +32 -0
- package/components/Switch.vue.d.ts +2 -1
- package/components/Switch.vue.js +4 -2
- package/components/Tabes/Tabes.vue.d.ts +3 -3
- package/components/Tabes/Tabes.vue.js +60 -57
- package/components/Tabes/types.d.ts +5 -0
- package/components/Textarea.vue.d.ts +3 -3
- package/components/{Timeline.vue.d.ts → Timeline/Timeline.vue.d.ts} +23 -2
- package/components/Timeline/Timeline.vue.js +92 -0
- package/components/Timeline/TimelineIndicator.vue.d.ts +9 -0
- package/components/Timeline/TimelineIndicator.vue.js +68 -0
- package/components/Timeline/TimelineIndicator.vue2.js +4 -0
- package/components/Timeline/TimelineItem.vue.d.ts +56 -0
- package/components/Timeline/TimelineItem.vue.js +173 -0
- package/components/Timeline/TimelineItem.vue2.js +4 -0
- package/components/Timeline/index.d.ts +3 -0
- package/components/Tooltip.vue.d.ts +2 -2
- package/components/Workbook/Sheet.vue.d.ts +2 -2
- package/components/Workbook/Workbook.vue.d.ts +3 -3
- package/components/index.d.ts +62 -0
- package/composables/useBreadcrumb.d.ts +17 -0
- package/composables/useBreadcrumb.js +27 -0
- package/core/config.d.ts +34 -0
- package/core/config.js +10 -7
- package/core/index.js +15 -8
- package/index.d.ts +55 -44
- package/index.js +243 -200
- package/package.json +12 -2
- package/router.d.ts +2 -0
- package/style.css +7 -5
- package/types/button.d.ts +1 -1
- package/types/config.type.d.ts +35 -0
- package/types/form.type.d.ts +3 -1
- package/types/index.d.ts +2 -1
- package/types/list.type.d.ts +57 -0
- package/types/navbar.type.d.ts +38 -1
- package/types/timeline.type.d.ts +14 -4
- package/components/Timeline.vue.js +0 -160
- /package/components/{Timeline.vue2.js → Timeline/Timeline.vue2.js} +0 -0
package/types/config.type.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InputVariant, InputSize, InputRounded } from './form.type';
|
|
1
2
|
/**
|
|
2
3
|
* Interface for the file upload handler function.
|
|
3
4
|
* This allows users to replace the default upload logic with their own API.
|
|
@@ -26,6 +27,16 @@ export interface VLiteServices {
|
|
|
26
27
|
* Used by components to support i18n.
|
|
27
28
|
*/
|
|
28
29
|
t?: TranslationHandler;
|
|
30
|
+
/**
|
|
31
|
+
* Global import API handler.
|
|
32
|
+
* Used by the generic Screen component for the `ImportData` process.
|
|
33
|
+
*/
|
|
34
|
+
importApi?: (entity: string, payload: any) => Promise<any>;
|
|
35
|
+
/**
|
|
36
|
+
* Global export API handler.
|
|
37
|
+
* Used by the generic Screen component for the `ExportData` process in backend mode.
|
|
38
|
+
*/
|
|
39
|
+
exportApi?: (entity: string, payload: any) => Promise<any>;
|
|
29
40
|
}
|
|
30
41
|
/**
|
|
31
42
|
* Main configuration object for the VLite plugin.
|
|
@@ -35,4 +46,28 @@ export interface VLiteConfig {
|
|
|
35
46
|
* Service registry for dependency injection.
|
|
36
47
|
*/
|
|
37
48
|
services?: VLiteServices;
|
|
49
|
+
/**
|
|
50
|
+
* ImportData specific configs.
|
|
51
|
+
*/
|
|
52
|
+
importData?: {
|
|
53
|
+
batchMode?: boolean;
|
|
54
|
+
batchSize?: number;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* ExportData specific configs.
|
|
58
|
+
*/
|
|
59
|
+
exportData?: {
|
|
60
|
+
mode?: 'frontend' | 'backend';
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Global UI Components configuration
|
|
64
|
+
*/
|
|
65
|
+
components?: {
|
|
66
|
+
form?: {
|
|
67
|
+
variant?: InputVariant;
|
|
68
|
+
size?: InputSize;
|
|
69
|
+
rounded?: InputRounded;
|
|
70
|
+
showRequiredAsterisk?: boolean;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
38
73
|
}
|
package/types/form.type.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type InputType = 'text' | 'password' | 'email' | 'number' | 'date' | 'tel' | 'url' | 'search' | 'textarea';
|
|
2
|
-
export type InputVariant = 'solid' | 'outline' | 'outline-b' | 'transparent';
|
|
2
|
+
export type InputVariant = 'solid' | 'outline' | 'outline-b' | 'transparent' | 'floating';
|
|
3
3
|
export type InputSize = 'sm' | 'md' | 'lg';
|
|
4
4
|
export type InputRounded = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full' | string;
|
|
5
5
|
export type LabelPosition = 'top' | 'left' | 'right';
|
|
@@ -14,7 +14,9 @@ export interface InputProps {
|
|
|
14
14
|
loading?: boolean;
|
|
15
15
|
error?: string;
|
|
16
16
|
icon?: string;
|
|
17
|
+
iconClass?: string;
|
|
17
18
|
iconRight?: string;
|
|
19
|
+
iconRightClass?: string;
|
|
18
20
|
showClearButton?: boolean;
|
|
19
21
|
autofocus?: boolean;
|
|
20
22
|
class?: string;
|
package/types/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './avatar.type';
|
|
|
5
5
|
export * from './sidepanel.type';
|
|
6
6
|
export * from './alert.type';
|
|
7
7
|
export * from './timeline.type';
|
|
8
|
-
export * from './navbar.type';
|
|
9
8
|
export * from './styles.ts';
|
|
10
9
|
export * from './config.type';
|
|
10
|
+
export * from './list.type';
|
|
11
|
+
export * from './progressbar.ts';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export type ListVariant = 'default' | 'striped' | 'card' | 'minimal' | 'compact' | 'bordered-rows';
|
|
2
|
+
export type ListColumns = 1 | 2 | 3;
|
|
3
|
+
export type ListFieldType = 'text' | 'date' | 'dateTime' | 'time' | 'price' | 'image' | 'badge' | 'boolean' | 'number' | 'html';
|
|
4
|
+
export interface ListField {
|
|
5
|
+
/** Unique key to resolve value from data (dot-notation supported, e.g. 'location.city') */
|
|
6
|
+
key: string;
|
|
7
|
+
/** Display label */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** i18n key for the label */
|
|
10
|
+
titleI18n?: string;
|
|
11
|
+
/** Iconify icon shown beside label */
|
|
12
|
+
icon?: string;
|
|
13
|
+
/** Force item to span full-width row */
|
|
14
|
+
lineByLine?: boolean;
|
|
15
|
+
/** Only render when value is truthy */
|
|
16
|
+
whenTrue?: boolean;
|
|
17
|
+
/** Conditional render: receives resolved value and full data, returns boolean */
|
|
18
|
+
when?: (value: any, data: any) => boolean;
|
|
19
|
+
/** Custom formatter — receives (value, data), returns a string or HTML string */
|
|
20
|
+
format?: (value: any, data: any) => string;
|
|
21
|
+
/** Mask value and show eye-toggle button */
|
|
22
|
+
isSensitive?: boolean;
|
|
23
|
+
/** Apply semantic status color to the value */
|
|
24
|
+
addStatusColor?: boolean;
|
|
25
|
+
/** A built-in type for automatic rendering */
|
|
26
|
+
type?: ListFieldType;
|
|
27
|
+
/** Static class or dynamic class function for the value cell */
|
|
28
|
+
class?: string | ((value: any, data: any) => string);
|
|
29
|
+
/** Render a Vue component instead of a value; receives { data, value } props */
|
|
30
|
+
component?: any;
|
|
31
|
+
/** Fallback text when value is empty/null */
|
|
32
|
+
emptyText?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ListProps {
|
|
35
|
+
/** Array of field definitions (schema) */
|
|
36
|
+
fields: ListField[];
|
|
37
|
+
/** The data record to display */
|
|
38
|
+
data: Record<string, any>;
|
|
39
|
+
/** Optional section title */
|
|
40
|
+
title?: string;
|
|
41
|
+
/** i18n key for the title */
|
|
42
|
+
titleI18n?: string;
|
|
43
|
+
/** Iconify icon shown beside the section title */
|
|
44
|
+
titleIcon?: string;
|
|
45
|
+
/** Number of columns for field layout */
|
|
46
|
+
columns?: ListColumns;
|
|
47
|
+
/** Visual variant */
|
|
48
|
+
variant?: ListVariant;
|
|
49
|
+
/** Extra class on root element */
|
|
50
|
+
class?: string;
|
|
51
|
+
/** Show label colon */
|
|
52
|
+
showColon?: boolean;
|
|
53
|
+
/** Loading skeleton state */
|
|
54
|
+
loading?: boolean;
|
|
55
|
+
/** Number of skeleton rows while loading */
|
|
56
|
+
skeletonRows?: number;
|
|
57
|
+
}
|
package/types/navbar.type.d.ts
CHANGED
|
@@ -11,6 +11,17 @@ export interface NavbarItemProps {
|
|
|
11
11
|
onClick?: (e: MouseEvent) => void;
|
|
12
12
|
class?: string;
|
|
13
13
|
}
|
|
14
|
+
export interface NavbarTabItem {
|
|
15
|
+
label: string;
|
|
16
|
+
labelI18n?: string;
|
|
17
|
+
value?: string | number;
|
|
18
|
+
icon?: string;
|
|
19
|
+
iconRight?: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
to?: any;
|
|
22
|
+
href?: string;
|
|
23
|
+
exact?: boolean;
|
|
24
|
+
}
|
|
14
25
|
export interface NavbarProps {
|
|
15
26
|
variant?: NavbarVariant;
|
|
16
27
|
position?: NavbarPosition;
|
|
@@ -20,8 +31,8 @@ export interface NavbarProps {
|
|
|
20
31
|
floating?: boolean;
|
|
21
32
|
class?: string;
|
|
22
33
|
height?: string;
|
|
23
|
-
width?: string;
|
|
24
34
|
compact?: boolean;
|
|
35
|
+
renderNestedTabs?: boolean;
|
|
25
36
|
logo?: string;
|
|
26
37
|
logoAlt?: string;
|
|
27
38
|
mobileBreakpoint?: 'sm' | 'md' | 'lg' | 'xl';
|
|
@@ -31,4 +42,30 @@ export interface NavbarProps {
|
|
|
31
42
|
rightClass?: string;
|
|
32
43
|
mobileTriggerClass?: string;
|
|
33
44
|
mobileMenuVariant?: 'sidepanel' | 'dropdown';
|
|
45
|
+
/**
|
|
46
|
+
* When true (Layout Mode only), renders a bars toggle button before the logo
|
|
47
|
+
* in the #header slot area on large screens. Allows users to show/hide the
|
|
48
|
+
* sidebar. Preference is persisted in localStorage.
|
|
49
|
+
* Mobile breakpoint behavior is completely unaffected.
|
|
50
|
+
*/
|
|
51
|
+
sidebarToggle?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* When true, automatically renders a Breadcrumb inside the #main slot area
|
|
54
|
+
* based on the current route path. Works in Layout Mode.
|
|
55
|
+
*/
|
|
56
|
+
breadcrumb?: boolean;
|
|
57
|
+
/** Where to render the breadcrumb: 'header' renders as a slim bar inside the header, 'main' renders above the main content (default: 'header') */
|
|
58
|
+
breadcrumbPosition?: 'header' | 'main';
|
|
59
|
+
/** Breadcrumb visual variant (default: 'default') */
|
|
60
|
+
breadcrumbVariant?: import('../components/Breadcrumb/types').BreadcrumbVariant;
|
|
61
|
+
/** Breadcrumb separator style (default: 'chevron') */
|
|
62
|
+
breadcrumbSeparator?: import('../components/Breadcrumb/types').BreadcrumbSeparator;
|
|
63
|
+
/** Breadcrumb size (default: 'sm') */
|
|
64
|
+
breadcrumbSize?: import('../components/Breadcrumb/types').BreadcrumbSize;
|
|
65
|
+
/** Override auto-generated labels by path, e.g. { '/settings': 'Preferences' } */
|
|
66
|
+
breadcrumbLabels?: Record<string, string>;
|
|
67
|
+
/** Home icon (default: 'lucide:home') */
|
|
68
|
+
breadcrumbHomeIcon?: string;
|
|
69
|
+
/** Extra CSS classes for the breadcrumb wrapper */
|
|
70
|
+
breadcrumbClass?: string;
|
|
34
71
|
}
|
package/types/timeline.type.d.ts
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
|
+
export type TimelineProgressStatus = 'completed' | 'current' | 'upcoming';
|
|
2
|
+
export type TimelineDirection = 'horizontal' | 'vertical';
|
|
3
|
+
export type TimelineTextPosition = 'bottom' | 'right';
|
|
4
|
+
export type TimelineLineStyle = 'solid' | 'dashed';
|
|
5
|
+
export type TimelineIndicatorType = 'icon' | 'number' | 'dot';
|
|
1
6
|
export interface TimelineStep {
|
|
2
7
|
id: string | number;
|
|
3
|
-
title
|
|
8
|
+
title?: string;
|
|
4
9
|
titleI18n?: string;
|
|
10
|
+
subtitle?: string;
|
|
11
|
+
subtitleI18n?: string;
|
|
5
12
|
description?: string;
|
|
6
13
|
descriptionI18n?: string;
|
|
14
|
+
date?: string;
|
|
7
15
|
icon?: string;
|
|
8
|
-
status?:
|
|
16
|
+
status?: string;
|
|
17
|
+
progressStatus?: TimelineProgressStatus;
|
|
18
|
+
component?: any;
|
|
19
|
+
componentProps?: Record<string, any>;
|
|
20
|
+
[key: string]: any;
|
|
9
21
|
}
|
|
10
|
-
export type TimelineDirection = 'horizontal' | 'vertical';
|
|
11
|
-
export type TimelineTextPosition = 'bottom' | 'right';
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { defineComponent as S, computed as g, openBlock as l, createElementBlock as r, normalizeClass as a, createElementVNode as c, normalizeStyle as b, createCommentVNode as u, Fragment as z, renderList as j, createVNode as $, createBlock as v, renderSlot as C, toDisplayString as x } from "vue";
|
|
2
|
-
import f from "./Icon.vue.js";
|
|
3
|
-
import { $t as y } from "../utils/i18n.js";
|
|
4
|
-
const I = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "absolute top-4 left-4 right-4 h-0.5 bg-border",
|
|
7
|
-
"aria-hidden": "true"
|
|
8
|
-
}, B = {
|
|
9
|
-
key: 1,
|
|
10
|
-
class: "absolute top-4 left-4 right-4 h-0.5 bg-border block sm:hidden",
|
|
11
|
-
"aria-hidden": "true"
|
|
12
|
-
}, V = ["onClick"], N = {
|
|
13
|
-
class: "flex h-9 w-9 items-center justify-center shrink-0 bg-background z-10",
|
|
14
|
-
"aria-hidden": "true"
|
|
15
|
-
}, D = {
|
|
16
|
-
key: 0,
|
|
17
|
-
class: "relative z-10 flex h-8 w-8 items-center justify-center rounded-full bg-primary hover:bg-primary-dark transition-colors"
|
|
18
|
-
}, E = {
|
|
19
|
-
key: 1,
|
|
20
|
-
class: "relative z-10 flex h-8 w-8 items-center justify-center rounded-full border-2 border-primary bg-background"
|
|
21
|
-
}, T = {
|
|
22
|
-
key: 1,
|
|
23
|
-
class: "h-2.5 w-2.5 rounded-full bg-primary"
|
|
24
|
-
}, F = {
|
|
25
|
-
key: 2,
|
|
26
|
-
class: "relative z-10 flex h-8 w-8 items-center justify-center rounded-full border-2 bg-background group-hover:border-muted-foreground transition-colors"
|
|
27
|
-
}, L = {
|
|
28
|
-
key: 1,
|
|
29
|
-
class: "h-2.5 w-2.5 rounded-full bg-transparent group-hover:bg-muted"
|
|
30
|
-
}, M = {
|
|
31
|
-
key: 0,
|
|
32
|
-
class: "text-xs text-muted-foreground mt-1"
|
|
33
|
-
}, q = {
|
|
34
|
-
key: 0,
|
|
35
|
-
class: "hidden sm:block flex-1 h-0.5 bg-border ml-2",
|
|
36
|
-
"aria-hidden": "true"
|
|
37
|
-
}, K = /* @__PURE__ */ S({
|
|
38
|
-
__name: "Timeline",
|
|
39
|
-
props: {
|
|
40
|
-
steps: {},
|
|
41
|
-
activeStep: { default: 0 },
|
|
42
|
-
direction: { default: "horizontal" },
|
|
43
|
-
textPosition: { default: "bottom" },
|
|
44
|
-
clickable: { type: Boolean, default: !1 },
|
|
45
|
-
class: { default: "" }
|
|
46
|
-
},
|
|
47
|
-
emits: ["step-click"],
|
|
48
|
-
setup(t, { emit: k }) {
|
|
49
|
-
const s = t, w = k, d = (o, m) => m.status ? m.status : o < s.activeStep ? "completed" : o === s.activeStep ? "current" : "upcoming", e = g(() => s.direction === "vertical"), h = g(() => s.steps.length <= 1 ? 0 : Math.min(s.activeStep, s.steps.length - 1) / (s.steps.length - 1) * 100), p = (o) => o.titleI18n ? y(o.titleI18n) : o.title, P = (o) => o.descriptionI18n ? y(o.descriptionI18n) : o.description;
|
|
50
|
-
return (o, m) => (l(), r("nav", {
|
|
51
|
-
"aria-label": "Progress",
|
|
52
|
-
class: a(["w-full", s.class])
|
|
53
|
-
}, [
|
|
54
|
-
c("ol", {
|
|
55
|
-
role: "list",
|
|
56
|
-
class: a([
|
|
57
|
-
"relative flex",
|
|
58
|
-
e.value ? "flex-col space-y-0" : "",
|
|
59
|
-
!e.value && t.textPosition === "bottom" ? "flex-row w-full justify-between items-center" : "",
|
|
60
|
-
!e.value && t.textPosition === "right" ? "flex-row w-full" : ""
|
|
61
|
-
])
|
|
62
|
-
}, [
|
|
63
|
-
!e.value && t.textPosition === "bottom" ? (l(), r("div", I, [
|
|
64
|
-
c("div", {
|
|
65
|
-
class: "h-full bg-primary transition-all duration-300 ease-in-out",
|
|
66
|
-
style: b({ width: `${h.value}%` })
|
|
67
|
-
}, null, 4)
|
|
68
|
-
])) : u("", !0),
|
|
69
|
-
!e.value && t.textPosition === "right" ? (l(), r("div", B, [
|
|
70
|
-
c("div", {
|
|
71
|
-
class: "h-full bg-primary transition-all duration-300 ease-in-out",
|
|
72
|
-
style: b({ width: `${h.value}%` })
|
|
73
|
-
}, null, 4)
|
|
74
|
-
])) : u("", !0),
|
|
75
|
-
(l(!0), r(z, null, j(t.steps, (i, n) => (l(), r("li", {
|
|
76
|
-
key: i.id,
|
|
77
|
-
onClick: (A) => t.clickable ? w("step-click", i, n) : null,
|
|
78
|
-
class: a([
|
|
79
|
-
"relative",
|
|
80
|
-
t.clickable ? "cursor-pointer" : "",
|
|
81
|
-
e.value ? "w-full pb-10 last:pb-0" : "",
|
|
82
|
-
!e.value && t.textPosition === "bottom" ? "flex-none w-8" : "",
|
|
83
|
-
!e.value && t.textPosition === "right" ? "flex-1 last:flex-none" : ""
|
|
84
|
-
])
|
|
85
|
-
}, [
|
|
86
|
-
e.value && n !== t.steps.length - 1 ? (l(), r("div", {
|
|
87
|
-
key: 0,
|
|
88
|
-
class: a(["hidden sm:block absolute top-4 left-4 -ml-px h-full w-0.5 bg-border", { "bg-primary": n < t.activeStep }]),
|
|
89
|
-
"aria-hidden": "true"
|
|
90
|
-
}, null, 2)) : u("", !0),
|
|
91
|
-
c("div", {
|
|
92
|
-
class: a([
|
|
93
|
-
"group relative flex",
|
|
94
|
-
e.value ? "flex-col items-center text-center sm:flex-row sm:items-start sm:text-left" : "",
|
|
95
|
-
!e.value && t.textPosition === "bottom" ? "flex-col items-center justify-center" : "",
|
|
96
|
-
!e.value && t.textPosition === "right" ? "flex-col items-center sm:flex-row sm:items-center sm:gap-2 w-full" : ""
|
|
97
|
-
])
|
|
98
|
-
}, [
|
|
99
|
-
c("span", N, [
|
|
100
|
-
d(n, i) === "completed" ? (l(), r("span", D, [
|
|
101
|
-
$(f, {
|
|
102
|
-
icon: "lucide:check",
|
|
103
|
-
class: "h-5 w-5 text-primary-foreground"
|
|
104
|
-
})
|
|
105
|
-
])) : d(n, i) === "current" ? (l(), r("span", E, [
|
|
106
|
-
i.icon ? (l(), v(f, {
|
|
107
|
-
key: 0,
|
|
108
|
-
icon: i.icon,
|
|
109
|
-
class: "h-4 w-4 text-primary"
|
|
110
|
-
}, null, 8, ["icon"])) : (l(), r("span", T))
|
|
111
|
-
])) : (l(), r("span", F, [
|
|
112
|
-
i.icon ? (l(), v(f, {
|
|
113
|
-
key: 0,
|
|
114
|
-
icon: i.icon,
|
|
115
|
-
class: "h-4 w-4 text-muted-foreground"
|
|
116
|
-
}, null, 8, ["icon"])) : (l(), r("span", L))
|
|
117
|
-
]))
|
|
118
|
-
]),
|
|
119
|
-
c("span", {
|
|
120
|
-
class: a([
|
|
121
|
-
"min-w-[max-content] flex-col",
|
|
122
|
-
"hidden sm:flex",
|
|
123
|
-
e.value ? "sm:ml-4 sm:pt-1.5" : "",
|
|
124
|
-
!e.value && t.textPosition === "bottom" ? "absolute top-10 text-center" : "",
|
|
125
|
-
!e.value && t.textPosition === "bottom" && n === 0 ? "left-0 text-left items-start" : "",
|
|
126
|
-
!e.value && t.textPosition === "bottom" && n === t.steps.length - 1 ? "right-0 text-right items-end" : "",
|
|
127
|
-
!e.value && t.textPosition === "bottom" && n > 0 && n < t.steps.length - 1 ? "left-1/2 -translate-x-1/2 items-center" : "",
|
|
128
|
-
(!e.value && t.textPosition === "right", "")
|
|
129
|
-
])
|
|
130
|
-
}, [
|
|
131
|
-
C(o.$slots, "content", {
|
|
132
|
-
step: i,
|
|
133
|
-
index: n
|
|
134
|
-
}, () => [
|
|
135
|
-
c("span", {
|
|
136
|
-
class: a([
|
|
137
|
-
"text-sm font-medium leading-tight",
|
|
138
|
-
d(n, i) === "upcoming" ? "text-muted-foreground" : "text-primary"
|
|
139
|
-
])
|
|
140
|
-
}, x(p(i)), 3),
|
|
141
|
-
i.description || i.descriptionI18n ? (l(), r("span", M, x(P(i)), 1)) : u("", !0)
|
|
142
|
-
])
|
|
143
|
-
], 2),
|
|
144
|
-
!e.value && t.textPosition === "right" && n !== t.steps.length - 1 ? (l(), r("div", q, [
|
|
145
|
-
c("div", {
|
|
146
|
-
class: a([
|
|
147
|
-
"h-full bg-primary transition-all duration-300",
|
|
148
|
-
n < t.activeStep ? "w-full" : "w-0"
|
|
149
|
-
])
|
|
150
|
-
}, null, 2)
|
|
151
|
-
])) : u("", !0)
|
|
152
|
-
], 2)
|
|
153
|
-
], 10, V))), 128))
|
|
154
|
-
], 2)
|
|
155
|
-
], 2));
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
export {
|
|
159
|
-
K as default
|
|
160
|
-
};
|
|
File without changes
|