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
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import { defineComponent as j, computed as w, openBlock as r, createElementBlock as s, normalizeClass as t, Fragment as y, renderList as M, normalizeStyle as b, createElementVNode as l, toDisplayString as c, unref as h, createVNode as g, createCommentVNode as d } from "vue";
|
|
2
|
+
import f from "../Icon.vue.js";
|
|
3
|
+
import { $t as v } from "../../utils/i18n.js";
|
|
4
|
+
const N = { class: "flex items-end justify-between w-full mt-3" }, V = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "mt-1 flex items-center gap-1 text-sm"
|
|
7
|
+
}, E = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "text-muted-foreground truncate"
|
|
10
|
+
}, L = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "flex items-center gap-1 text-sm"
|
|
13
|
+
}, O = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "mt-2 flex items-center gap-1.5 text-sm"
|
|
16
|
+
}, D = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "text-muted-foreground truncate"
|
|
19
|
+
}, F = {
|
|
20
|
+
key: 3,
|
|
21
|
+
class: "flex-1 flex flex-col justify-center min-w-0"
|
|
22
|
+
}, q = {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "mt-1 flex items-center gap-1 text-sm"
|
|
25
|
+
}, A = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "text-muted-foreground truncate"
|
|
28
|
+
}, G = { class: "flex-1 flex flex-col justify-center min-w-0" }, H = { class: "flex items-baseline gap-2 mt-1" }, J = {
|
|
29
|
+
key: 0,
|
|
30
|
+
class: "mt-2 flex items-center gap-1.5 text-sm"
|
|
31
|
+
}, K = {
|
|
32
|
+
key: 0,
|
|
33
|
+
class: "text-muted-foreground truncate"
|
|
34
|
+
}, U = /* @__PURE__ */ j({
|
|
35
|
+
__name: "Stats",
|
|
36
|
+
props: {
|
|
37
|
+
items: {},
|
|
38
|
+
variant: { default: "outline" },
|
|
39
|
+
layout: { default: "icon-left" },
|
|
40
|
+
columns: { default: 4 },
|
|
41
|
+
attached: { type: Boolean, default: !1 },
|
|
42
|
+
titleSize: { default: "" },
|
|
43
|
+
valueSize: { default: "" },
|
|
44
|
+
iconSize: { default: "" },
|
|
45
|
+
iconBoxShape: { default: "rounded" },
|
|
46
|
+
iconBoxStyle: { default: "transparent" },
|
|
47
|
+
class: { default: "" }
|
|
48
|
+
},
|
|
49
|
+
setup(n) {
|
|
50
|
+
const a = n, S = w(() => {
|
|
51
|
+
const i = Number(a.columns) || 4;
|
|
52
|
+
return i === 1 ? "grid-cols-1" : i === 2 ? "grid-cols-1 sm:grid-cols-2" : i === 3 ? "grid-cols-1 sm:grid-cols-3" : i === 4 ? "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4" : i === 5 ? "grid-cols-1 sm:grid-cols-3 lg:grid-cols-5" : i === 6 ? "grid-cols-1 sm:grid-cols-3 lg:grid-cols-6" : "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4";
|
|
53
|
+
}), z = w(() => [
|
|
54
|
+
"grid",
|
|
55
|
+
S.value,
|
|
56
|
+
a.attached ? "gap-0 border-t border-l overflow-hidden" : "gap-3 sm:gap-4.5",
|
|
57
|
+
a.variant === "shadow" && a.attached ? "shadow-md" : "",
|
|
58
|
+
a.class
|
|
59
|
+
].join(" ")), C = (i, o) => {
|
|
60
|
+
const e = "flex p-5 relative transition-all duration-200", u = {
|
|
61
|
+
"icon-left": "flex-row items-center gap-3 text-left",
|
|
62
|
+
"icon-right": "flex-row items-center justify-between gap-3 text-left",
|
|
63
|
+
"icon-top": "flex-col items-start gap-3 text-left",
|
|
64
|
+
// title top, value bottom-left, icon bottom-right
|
|
65
|
+
"title-top-icon-bottom-right": "flex-col items-start gap-0 text-left",
|
|
66
|
+
// centered: value on top (bigger/bold), title below — no icon
|
|
67
|
+
"centered-value-title": "flex-col items-center justify-center text-center gap-1",
|
|
68
|
+
// floating icon overlapping card top-right corner
|
|
69
|
+
"floating-icon": "flex-col items-start gap-1 text-left",
|
|
70
|
+
// split-bar: colored left border accent with stacked text
|
|
71
|
+
"split-bar": "flex-row items-center gap-3 text-left border-l-4"
|
|
72
|
+
}, $ = u[a.layout] || u["icon-left"];
|
|
73
|
+
let x = "";
|
|
74
|
+
if (a.attached)
|
|
75
|
+
x = "border-b border-r hover:bg-muted/30", a.variant !== "transparent" && (x += " bg-card");
|
|
76
|
+
else {
|
|
77
|
+
switch (a.variant) {
|
|
78
|
+
case "solid": {
|
|
79
|
+
const B = i.color || "primary", m = {
|
|
80
|
+
primary: "bg-primary-light",
|
|
81
|
+
secondary: "bg-secondary",
|
|
82
|
+
success: "bg-success-light",
|
|
83
|
+
warning: "bg-warning-light",
|
|
84
|
+
danger: "bg-danger-light",
|
|
85
|
+
info: "bg-info-light"
|
|
86
|
+
};
|
|
87
|
+
x = `${m[B] || m.primary}`;
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
case "outline":
|
|
91
|
+
x = "bg-body border";
|
|
92
|
+
break;
|
|
93
|
+
case "shadow":
|
|
94
|
+
x = "bg-body shadow-md border border-border/50";
|
|
95
|
+
break;
|
|
96
|
+
case "transparent":
|
|
97
|
+
x = "bg-transparent";
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
x += " rounded-lg";
|
|
101
|
+
}
|
|
102
|
+
return [e, $, x].join(" ");
|
|
103
|
+
}, P = (i) => {
|
|
104
|
+
if (a.variant === "solid" && !a.attached) {
|
|
105
|
+
const o = i.color;
|
|
106
|
+
if (o && !["primary", "secondary", "success", "warning", "danger", "info"].includes(o))
|
|
107
|
+
return { backgroundColor: `${o}15` };
|
|
108
|
+
}
|
|
109
|
+
if (a.layout === "split-bar") {
|
|
110
|
+
const o = i.color, e = {
|
|
111
|
+
primary: "var(--color-primary)",
|
|
112
|
+
secondary: "var(--color-secondary)",
|
|
113
|
+
success: "var(--color-success)",
|
|
114
|
+
warning: "var(--color-warning)",
|
|
115
|
+
danger: "var(--color-danger)",
|
|
116
|
+
info: "var(--color-info)"
|
|
117
|
+
};
|
|
118
|
+
if (o)
|
|
119
|
+
return { borderLeftColor: e[o] || o };
|
|
120
|
+
}
|
|
121
|
+
return {};
|
|
122
|
+
}, I = w(() => a.iconBoxShape === "full-rounded" ? "rounded-full" : a.iconBoxShape === "none" ? "rounded-none" : "rounded-lg"), p = (i) => {
|
|
123
|
+
const o = `flex items-center justify-center shrink-0 ${I.value} p-3`, e = i.color || "primary";
|
|
124
|
+
if (a.iconBoxStyle === "transparent")
|
|
125
|
+
return `${o} bg-transparent ${{
|
|
126
|
+
primary: "text-primary",
|
|
127
|
+
secondary: "text-secondary-foreground",
|
|
128
|
+
success: "text-success-dark",
|
|
129
|
+
warning: "text-warning-dark",
|
|
130
|
+
danger: "text-danger-dark",
|
|
131
|
+
info: "text-info-dark"
|
|
132
|
+
}[e] || "text-primary"}`;
|
|
133
|
+
if (a.variant === "solid" && !a.attached) {
|
|
134
|
+
const u = {
|
|
135
|
+
primary: "bg-primary text-primary-fg",
|
|
136
|
+
secondary: "bg-foreground text-background",
|
|
137
|
+
success: "bg-success text-success-fg",
|
|
138
|
+
warning: "bg-warning text-warning-fg",
|
|
139
|
+
danger: "bg-danger text-danger-fg",
|
|
140
|
+
info: "bg-info text-info-fg"
|
|
141
|
+
};
|
|
142
|
+
return `${o} ${u[e] || u.primary}`;
|
|
143
|
+
} else {
|
|
144
|
+
const u = {
|
|
145
|
+
primary: "bg-primary-light text-primary",
|
|
146
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
147
|
+
success: "bg-success-light text-success-dark",
|
|
148
|
+
warning: "bg-warning-light text-warning-dark",
|
|
149
|
+
danger: "bg-danger-light text-danger-dark",
|
|
150
|
+
info: "bg-info-light text-info-dark"
|
|
151
|
+
};
|
|
152
|
+
return `${o} ${u[e] || u.primary}`;
|
|
153
|
+
}
|
|
154
|
+
}, k = (i) => {
|
|
155
|
+
const o = i.color;
|
|
156
|
+
return o && !["primary", "secondary", "success", "warning", "danger", "info"].includes(o) ? a.iconBoxStyle === "transparent" ? { color: o } : a.variant === "solid" && !a.attached ? { backgroundColor: o, color: "#fff" } : { color: o, backgroundColor: `${o}20` } : {};
|
|
157
|
+
};
|
|
158
|
+
return (i, o) => (r(), s("div", {
|
|
159
|
+
class: t(z.value)
|
|
160
|
+
}, [
|
|
161
|
+
(r(!0), s(y, null, M(n.items, (e, u) => (r(), s("div", {
|
|
162
|
+
key: e.id || u,
|
|
163
|
+
class: t(C(e)),
|
|
164
|
+
style: b(P(e))
|
|
165
|
+
}, [
|
|
166
|
+
n.layout === "title-top-icon-bottom-right" ? (r(), s(y, { key: 0 }, [
|
|
167
|
+
l("h3", {
|
|
168
|
+
class: t(n.titleSize || "text-sm font-medium text-muted-foreground truncate w-full")
|
|
169
|
+
}, c(e.titleI18n ? h(v)(e.titleI18n) : e.title), 3),
|
|
170
|
+
l("div", N, [
|
|
171
|
+
l("div", null, [
|
|
172
|
+
l("p", {
|
|
173
|
+
class: t(n.valueSize || "text-2xl font-bold text-foreground truncate")
|
|
174
|
+
}, c(e.value), 3),
|
|
175
|
+
e.trend ? (r(), s("div", V, [
|
|
176
|
+
g(f, {
|
|
177
|
+
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
178
|
+
class: t([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
|
|
179
|
+
}, null, 8, ["icon", "class"]),
|
|
180
|
+
l("span", {
|
|
181
|
+
class: t([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium whitespace-nowrap"])
|
|
182
|
+
}, c(e.trend.value), 3),
|
|
183
|
+
e.trend.label ? (r(), s("span", E, c(e.trend.label), 1)) : d("", !0)
|
|
184
|
+
])) : d("", !0)
|
|
185
|
+
]),
|
|
186
|
+
e.icon ? (r(), s("div", {
|
|
187
|
+
key: 0,
|
|
188
|
+
class: t(p(e)),
|
|
189
|
+
style: b(k(e))
|
|
190
|
+
}, [
|
|
191
|
+
g(f, {
|
|
192
|
+
icon: e.icon,
|
|
193
|
+
class: t(n.iconSize || "w-6 h-6")
|
|
194
|
+
}, null, 8, ["icon", "class"])
|
|
195
|
+
], 6)) : d("", !0)
|
|
196
|
+
])
|
|
197
|
+
], 64)) : n.layout === "centered-value-title" ? (r(), s(y, { key: 1 }, [
|
|
198
|
+
l("p", {
|
|
199
|
+
class: t(n.valueSize || "text-3xl font-bold text-foreground")
|
|
200
|
+
}, c(e.value), 3),
|
|
201
|
+
l("h3", {
|
|
202
|
+
class: t(n.titleSize || "text-sm font-medium text-muted-foreground")
|
|
203
|
+
}, c(e.titleI18n ? h(v)(e.titleI18n) : e.title), 3),
|
|
204
|
+
e.trend ? (r(), s("div", L, [
|
|
205
|
+
g(f, {
|
|
206
|
+
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
207
|
+
class: t([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
|
|
208
|
+
}, null, 8, ["icon", "class"]),
|
|
209
|
+
l("span", {
|
|
210
|
+
class: t([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium"])
|
|
211
|
+
}, c(e.trend.value), 3)
|
|
212
|
+
])) : d("", !0)
|
|
213
|
+
], 64)) : n.layout === "floating-icon" ? (r(), s(y, { key: 2 }, [
|
|
214
|
+
e.icon ? (r(), s("div", {
|
|
215
|
+
key: 0,
|
|
216
|
+
class: t([p(e), "absolute top-4 right-4"]),
|
|
217
|
+
style: b(k(e))
|
|
218
|
+
}, [
|
|
219
|
+
g(f, {
|
|
220
|
+
icon: e.icon,
|
|
221
|
+
class: t(n.iconSize || "w-6 h-6")
|
|
222
|
+
}, null, 8, ["icon", "class"])
|
|
223
|
+
], 6)) : d("", !0),
|
|
224
|
+
l("h3", {
|
|
225
|
+
class: t(n.titleSize || "text-sm font-medium text-muted-foreground truncate pr-12")
|
|
226
|
+
}, c(e.titleI18n ? h(v)(e.titleI18n) : e.title), 3),
|
|
227
|
+
l("p", {
|
|
228
|
+
class: t(n.valueSize || "text-2xl font-bold text-foreground truncate mt-1")
|
|
229
|
+
}, c(e.value), 3),
|
|
230
|
+
e.trend ? (r(), s("div", O, [
|
|
231
|
+
g(f, {
|
|
232
|
+
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
233
|
+
class: t([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
|
|
234
|
+
}, null, 8, ["icon", "class"]),
|
|
235
|
+
l("span", {
|
|
236
|
+
class: t([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium whitespace-nowrap"])
|
|
237
|
+
}, c(e.trend.value), 3),
|
|
238
|
+
e.trend.label ? (r(), s("span", D, c(e.trend.label), 1)) : d("", !0)
|
|
239
|
+
])) : d("", !0)
|
|
240
|
+
], 64)) : n.layout === "split-bar" ? (r(), s("div", F, [
|
|
241
|
+
l("h3", {
|
|
242
|
+
class: t(
|
|
243
|
+
n.titleSize || "text-xs font-semibold uppercase tracking-widest text-muted-foreground truncate"
|
|
244
|
+
)
|
|
245
|
+
}, c(e.titleI18n ? h(v)(e.titleI18n) : e.title), 3),
|
|
246
|
+
l("p", {
|
|
247
|
+
class: t(n.valueSize || "text-3xl font-black text-foreground truncate mt-0.5")
|
|
248
|
+
}, c(e.value), 3),
|
|
249
|
+
e.trend ? (r(), s("div", q, [
|
|
250
|
+
g(f, {
|
|
251
|
+
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
252
|
+
class: t([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
|
|
253
|
+
}, null, 8, ["icon", "class"]),
|
|
254
|
+
l("span", {
|
|
255
|
+
class: t([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium whitespace-nowrap"])
|
|
256
|
+
}, c(e.trend.value), 3),
|
|
257
|
+
e.trend.label ? (r(), s("span", A, c(e.trend.label), 1)) : d("", !0)
|
|
258
|
+
])) : d("", !0)
|
|
259
|
+
])) : (r(), s(y, { key: 4 }, [
|
|
260
|
+
e.icon && n.layout !== "icon-right" ? (r(), s("div", {
|
|
261
|
+
key: 0,
|
|
262
|
+
class: t(p(e)),
|
|
263
|
+
style: b(k(e))
|
|
264
|
+
}, [
|
|
265
|
+
g(f, {
|
|
266
|
+
icon: e.icon,
|
|
267
|
+
class: t(n.iconSize || "w-6 h-6")
|
|
268
|
+
}, null, 8, ["icon", "class"])
|
|
269
|
+
], 6)) : d("", !0),
|
|
270
|
+
l("div", G, [
|
|
271
|
+
l("h3", {
|
|
272
|
+
class: t(n.titleSize || "text-sm font-medium text-muted-foreground truncate")
|
|
273
|
+
}, c(e.titleI18n ? h(v)(e.titleI18n) : e.title), 3),
|
|
274
|
+
l("div", H, [
|
|
275
|
+
l("p", {
|
|
276
|
+
class: t(n.valueSize || "text-2xl font-bold text-foreground truncate")
|
|
277
|
+
}, c(e.value), 3)
|
|
278
|
+
]),
|
|
279
|
+
e.trend ? (r(), s("div", J, [
|
|
280
|
+
g(f, {
|
|
281
|
+
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
282
|
+
class: t([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
|
|
283
|
+
}, null, 8, ["icon", "class"]),
|
|
284
|
+
l("span", {
|
|
285
|
+
class: t([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium whitespace-nowrap"])
|
|
286
|
+
}, c(e.trend.value), 3),
|
|
287
|
+
e.trend.label ? (r(), s("span", K, c(e.trend.label), 1)) : d("", !0)
|
|
288
|
+
])) : d("", !0)
|
|
289
|
+
]),
|
|
290
|
+
e.icon && n.layout === "icon-right" ? (r(), s("div", {
|
|
291
|
+
key: 1,
|
|
292
|
+
class: t(p(e)),
|
|
293
|
+
style: b(k(e))
|
|
294
|
+
}, [
|
|
295
|
+
g(f, {
|
|
296
|
+
icon: e.icon,
|
|
297
|
+
class: t(n.iconSize || "w-6 h-6")
|
|
298
|
+
}, null, 8, ["icon", "class"])
|
|
299
|
+
], 6)) : d("", !0)
|
|
300
|
+
], 64))
|
|
301
|
+
], 6))), 128))
|
|
302
|
+
], 2));
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
export {
|
|
306
|
+
U as default
|
|
307
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type StatsVariant = 'solid' | 'outline' | 'shadow' | 'transparent';
|
|
2
|
+
export type StatsLayout = 'icon-left' | 'icon-right' | 'icon-top' | 'title-top-icon-bottom-right' | 'centered-value-title' | 'floating-icon' | 'split-bar';
|
|
3
|
+
export type IconBoxShape = 'rounded' | 'full-rounded' | 'none';
|
|
4
|
+
export type IconBoxStyle = 'filled' | 'transparent';
|
|
5
|
+
export interface StatTrend {
|
|
6
|
+
value: string | number;
|
|
7
|
+
isPositive?: boolean;
|
|
8
|
+
label?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface StatItemSchema {
|
|
11
|
+
id: string | number;
|
|
12
|
+
title: string;
|
|
13
|
+
titleI18n?: string;
|
|
14
|
+
value: string | number;
|
|
15
|
+
icon?: string;
|
|
16
|
+
color?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | string;
|
|
17
|
+
trend?: StatTrend;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}
|
|
20
|
+
export interface StatsProps {
|
|
21
|
+
items: StatItemSchema[];
|
|
22
|
+
variant?: StatsVariant;
|
|
23
|
+
layout?: StatsLayout;
|
|
24
|
+
columns?: number | string;
|
|
25
|
+
attached?: boolean;
|
|
26
|
+
titleSize?: string;
|
|
27
|
+
valueSize?: string;
|
|
28
|
+
iconSize?: string;
|
|
29
|
+
iconBoxShape?: IconBoxShape;
|
|
30
|
+
iconBoxStyle?: IconBoxStyle;
|
|
31
|
+
class?: string;
|
|
32
|
+
}
|
|
@@ -4,14 +4,15 @@ interface Props {
|
|
|
4
4
|
label?: string;
|
|
5
5
|
labelI18n?: string;
|
|
6
6
|
class?: string;
|
|
7
|
+
id?: string;
|
|
7
8
|
}
|
|
8
9
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
9
10
|
"update:modelValue": (value: boolean) => any;
|
|
10
11
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
11
12
|
"onUpdate:modelValue"?: (value: boolean) => any;
|
|
12
13
|
}>, {
|
|
13
|
-
disabled: boolean;
|
|
14
14
|
class: string;
|
|
15
|
+
disabled: boolean;
|
|
15
16
|
modelValue: boolean;
|
|
16
17
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
17
18
|
export default _default;
|
package/components/Switch.vue.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { defineComponent as u, computed as c, openBlock as n, createElementBlock as i, createElementVNode as r, normalizeClass as t, toDisplayString as m, createCommentVNode as b } from "vue";
|
|
2
2
|
import { $t as f } from "../utils/i18n.js";
|
|
3
|
-
const p = { class: "flex items-center gap-2" }, g = ["aria-checked", "aria-label", "disabled"], v = /* @__PURE__ */ u({
|
|
3
|
+
const p = { class: "flex items-center gap-2" }, g = ["id", "aria-checked", "aria-label", "disabled"], v = /* @__PURE__ */ u({
|
|
4
4
|
__name: "Switch",
|
|
5
5
|
props: {
|
|
6
6
|
modelValue: { type: Boolean, default: !1 },
|
|
7
7
|
disabled: { type: Boolean, default: !1 },
|
|
8
8
|
label: {},
|
|
9
9
|
labelI18n: {},
|
|
10
|
-
class: { default: "" }
|
|
10
|
+
class: { default: "" },
|
|
11
|
+
id: {}
|
|
11
12
|
},
|
|
12
13
|
emits: ["update:modelValue"],
|
|
13
14
|
setup(e, { emit: s }) {
|
|
@@ -16,6 +17,7 @@ const p = { class: "flex items-center gap-2" }, g = ["aria-checked", "aria-label
|
|
|
16
17
|
}, a = c(() => l.labelI18n ? f(l.labelI18n) : l.label);
|
|
17
18
|
return (h, k) => (n(), i("div", p, [
|
|
18
19
|
r("button", {
|
|
20
|
+
id: e.id,
|
|
19
21
|
type: "button",
|
|
20
22
|
role: "switch",
|
|
21
23
|
"aria-checked": e.modelValue,
|
|
@@ -8,14 +8,14 @@ interface Props {
|
|
|
8
8
|
textClass?: string;
|
|
9
9
|
}
|
|
10
10
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
11
|
-
"update:modelValue": (value: string | number) => any;
|
|
12
11
|
change: (value: string | number) => any;
|
|
12
|
+
"update:modelValue": (value: string | number) => any;
|
|
13
13
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
14
|
-
"onUpdate:modelValue"?: (value: string | number) => any;
|
|
15
14
|
onChange?: (value: string | number) => any;
|
|
15
|
+
"onUpdate:modelValue"?: (value: string | number) => any;
|
|
16
16
|
}>, {
|
|
17
|
-
size: TabesSize;
|
|
18
17
|
variant: TabesVariant;
|
|
18
|
+
size: TabesSize;
|
|
19
19
|
block: boolean;
|
|
20
20
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
21
21
|
containerRef: HTMLDivElement;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useResizeObserver as
|
|
3
|
-
import
|
|
4
|
-
import { $t as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as E, ref as b, watch as l, onMounted as _, computed as g, openBlock as i, createElementBlock as p, normalizeClass as c, normalizeStyle as D, createCommentVNode as y, Fragment as N, renderList as O, createBlock as x, resolveDynamicComponent as P, mergeProps as T, withCtx as F, createElementVNode as q, toDisplayString as G, nextTick as H } from "vue";
|
|
2
|
+
import { useResizeObserver as J } from "@vueuse/core";
|
|
3
|
+
import K from "../Icon.vue.js";
|
|
4
|
+
import { $t as Q } from "../../utils/i18n.js";
|
|
5
|
+
const Z = /* @__PURE__ */ E({
|
|
6
6
|
__name: "Tabes",
|
|
7
7
|
props: {
|
|
8
8
|
options: {},
|
|
@@ -13,33 +13,33 @@ const H = ["aria-selected", "disabled", "onClick"], U = /* @__PURE__ */ M({
|
|
|
13
13
|
textClass: {}
|
|
14
14
|
},
|
|
15
15
|
emits: ["update:modelValue", "change"],
|
|
16
|
-
setup(s, { emit:
|
|
17
|
-
const
|
|
18
|
-
e ?
|
|
19
|
-
},
|
|
16
|
+
setup(s, { emit: h }) {
|
|
17
|
+
const n = s, v = h, u = b(null), d = b(/* @__PURE__ */ new Map()), k = (e, a) => {
|
|
18
|
+
e ? d.value.set(a, e) : d.value.delete(a);
|
|
19
|
+
}, f = b({
|
|
20
20
|
width: "0px",
|
|
21
21
|
height: "0px",
|
|
22
22
|
transform: "translate(0px, 0px)",
|
|
23
23
|
opacity: 0
|
|
24
24
|
}), o = async () => {
|
|
25
|
-
await
|
|
26
|
-
const e =
|
|
27
|
-
if (!e || !
|
|
28
|
-
|
|
25
|
+
await H();
|
|
26
|
+
const e = u.value, a = d.value.get(n.modelValue);
|
|
27
|
+
if (!e || !a) {
|
|
28
|
+
f.value.opacity = 0;
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
width: `${
|
|
34
|
-
height: `${
|
|
35
|
-
transform: `translate(${m}px, ${
|
|
31
|
+
const r = e.getBoundingClientRect(), t = a.getBoundingClientRect(), m = t.left - r.left, M = t.top - r.top, j = t.width, A = t.height;
|
|
32
|
+
f.value = {
|
|
33
|
+
width: `${j}px`,
|
|
34
|
+
height: `${A}px`,
|
|
35
|
+
transform: `translate(${m}px, ${M}px)`,
|
|
36
36
|
opacity: 1
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
const
|
|
39
|
+
J(u, o), l(() => n.modelValue, o), l(() => n.options, o, { deep: !0 }), l(() => n.size, o), l(() => n.block, o), _(o);
|
|
40
|
+
const C = (e) => {
|
|
41
41
|
e.disabled || (v("update:modelValue", e.value), v("change", e.value));
|
|
42
|
-
},
|
|
42
|
+
}, w = g(() => ["inline-flex rounded-lg relative isolate", {
|
|
43
43
|
surface: "bg-secondary/80 p-1",
|
|
44
44
|
primary: "bg-secondary p-1",
|
|
45
45
|
secondary: "bg-secondary p-1",
|
|
@@ -47,18 +47,18 @@ const H = ["aria-selected", "disabled", "onClick"], U = /* @__PURE__ */ M({
|
|
|
47
47
|
success: "bg-success/10 p-1",
|
|
48
48
|
outline: "bg-transparent border border-border p-1",
|
|
49
49
|
line: "bg-transparent gap-6 rounded-none p-0 border-b border-border w-full"
|
|
50
|
-
}[
|
|
50
|
+
}[n.variant], n.block ? "flex w-full" : ""]), z = {
|
|
51
51
|
sm: "text-xs px-2.5 py-1",
|
|
52
52
|
md: "-text-fs-2 px-3 py-1",
|
|
53
53
|
lg: "-text-fs-1 px-4 py-1"
|
|
54
|
-
},
|
|
55
|
-
const
|
|
54
|
+
}, V = g(() => [n.variant === "line" ? "relative z-10 flex items-center justify-center gap-2 font-medium transition-colors duration-50 ease-out cursor-pointer select-none outline-none focus-visible:ring-2 focus-visible:ring-primary/50 pb-2 border-b-2 border-transparent hover:text-foreground" : "relative z-10 flex-1 flex items-center justify-center gap-2 font-medium transition-colors duration-50 ease-out cursor-pointer select-none rounded-md outline-none focus-visible:ring-2 focus-visible:ring-primary/50"]), $ = (e) => {
|
|
55
|
+
const a = e.value === n.modelValue, r = n.variant === "line";
|
|
56
56
|
let t = "";
|
|
57
|
-
if (
|
|
58
|
-
if (
|
|
57
|
+
if (a)
|
|
58
|
+
if (r)
|
|
59
59
|
t = "text-primary";
|
|
60
60
|
else
|
|
61
|
-
switch (
|
|
61
|
+
switch (n.variant) {
|
|
62
62
|
case "surface":
|
|
63
63
|
t = "text-foreground";
|
|
64
64
|
break;
|
|
@@ -81,12 +81,12 @@ const H = ["aria-selected", "disabled", "onClick"], U = /* @__PURE__ */ M({
|
|
|
81
81
|
t = "text-foreground";
|
|
82
82
|
}
|
|
83
83
|
else
|
|
84
|
-
t =
|
|
84
|
+
t = r ? "text-muted-foreground" : "text-muted-foreground hover:text-foreground/80";
|
|
85
85
|
const m = e.disabled ? "opacity-50 cursor-not-allowed" : "";
|
|
86
|
-
return [
|
|
87
|
-
}, R =
|
|
86
|
+
return [V.value, t, m].join(" ");
|
|
87
|
+
}, R = g(() => {
|
|
88
88
|
const e = "absolute left-0 top-0 transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)] z-0 pointer-events-none";
|
|
89
|
-
return
|
|
89
|
+
return n.variant === "line" ? `${e} !h-[2px] !top-auto bottom-0` : `${e} rounded-md shadow-sm`;
|
|
90
90
|
}), S = () => ({
|
|
91
91
|
surface: "bg-background",
|
|
92
92
|
primary: "bg-primary",
|
|
@@ -95,41 +95,44 @@ const H = ["aria-selected", "disabled", "onClick"], U = /* @__PURE__ */ M({
|
|
|
95
95
|
success: "bg-success",
|
|
96
96
|
outline: "bg-accent/50 ring-1 ring-border",
|
|
97
97
|
line: "bg-primary"
|
|
98
|
-
})[
|
|
99
|
-
return (e,
|
|
98
|
+
})[n.variant], B = (e) => e.labelI18n ? Q(e.labelI18n) : e.label, I = (e) => e.to ? "router-link" : e.href ? "a" : "button", L = (e) => e.to ? { to: e.to } : e.href ? { href: e.href, target: "_blank", rel: "noopener noreferrer" } : { type: "button" };
|
|
99
|
+
return (e, a) => (i(), p("div", {
|
|
100
100
|
ref_key: "containerRef",
|
|
101
|
-
ref:
|
|
102
|
-
class:
|
|
101
|
+
ref: u,
|
|
102
|
+
class: c(w.value),
|
|
103
103
|
role: "tablist"
|
|
104
104
|
}, [
|
|
105
|
-
s.modelValue !== void 0 ? (i(),
|
|
105
|
+
s.modelValue !== void 0 ? (i(), p("div", {
|
|
106
106
|
key: 0,
|
|
107
|
-
class:
|
|
108
|
-
style:
|
|
107
|
+
class: c([R.value, S()]),
|
|
108
|
+
style: D(f.value)
|
|
109
109
|
}, null, 6)) : y("", !0),
|
|
110
|
-
(i(!0),
|
|
111
|
-
key:
|
|
110
|
+
(i(!0), p(N, null, O(s.options, (r) => (i(), x(P(I(r)), T({
|
|
111
|
+
key: r.value,
|
|
112
112
|
ref_for: !0,
|
|
113
|
-
ref: (t) =>
|
|
113
|
+
ref: (t) => k(t?.$el || t, r.value),
|
|
114
114
|
role: "tab",
|
|
115
|
-
"aria-selected": s.modelValue ===
|
|
116
|
-
disabled:
|
|
117
|
-
class:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
115
|
+
"aria-selected": s.modelValue === r.value,
|
|
116
|
+
disabled: r.disabled,
|
|
117
|
+
class: [$(r), z[n.size]]
|
|
118
|
+
}, { ref_for: !0 }, L(r), {
|
|
119
|
+
onClick: (t) => C(r)
|
|
120
|
+
}), {
|
|
121
|
+
default: F(() => [
|
|
122
|
+
r.icon ? (i(), x(K, {
|
|
123
|
+
key: 0,
|
|
124
|
+
icon: r.icon,
|
|
125
|
+
class: c(s.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4")
|
|
126
|
+
}, null, 8, ["icon", "class"])) : y("", !0),
|
|
127
|
+
q("span", {
|
|
128
|
+
class: c(["whitespace-nowrap z-20 relative", s.textClass])
|
|
129
|
+
}, G(B(r)), 3)
|
|
130
|
+
]),
|
|
131
|
+
_: 2
|
|
132
|
+
}, 1040, ["aria-selected", "disabled", "class", "onClick"]))), 128))
|
|
130
133
|
], 2));
|
|
131
134
|
}
|
|
132
135
|
});
|
|
133
136
|
export {
|
|
134
|
-
|
|
137
|
+
Z as default
|
|
135
138
|
};
|
|
@@ -4,6 +4,11 @@ export interface TabesOption {
|
|
|
4
4
|
value: string | number;
|
|
5
5
|
icon?: string;
|
|
6
6
|
disabled?: boolean;
|
|
7
|
+
to?: string | {
|
|
8
|
+
path: string;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
};
|
|
11
|
+
href?: string;
|
|
7
12
|
}
|
|
8
13
|
export type TabesSize = 'sm' | 'md' | 'lg';
|
|
9
14
|
export type TabesVariant = 'surface' | 'primary' | 'secondary' | 'danger' | 'success' | 'outline' | 'line';
|
|
@@ -7,16 +7,16 @@ interface Props {
|
|
|
7
7
|
class?: string;
|
|
8
8
|
}
|
|
9
9
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
10
|
-
"update:modelValue": (value: string) => any;
|
|
11
10
|
blur: (event: FocusEvent) => any;
|
|
12
11
|
focus: (event: FocusEvent) => any;
|
|
12
|
+
"update:modelValue": (value: string) => any;
|
|
13
13
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
14
|
-
"onUpdate:modelValue"?: (value: string) => any;
|
|
15
14
|
onBlur?: (event: FocusEvent) => any;
|
|
16
15
|
onFocus?: (event: FocusEvent) => any;
|
|
16
|
+
"onUpdate:modelValue"?: (value: string) => any;
|
|
17
17
|
}>, {
|
|
18
|
-
disabled: boolean;
|
|
19
18
|
class: string;
|
|
19
|
+
disabled: boolean;
|
|
20
20
|
modelValue: string;
|
|
21
21
|
rows: number;
|
|
22
22
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLTextAreaElement>;
|