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/components/Input.vue.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { $t as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as Q, computed as r, useSlots as X, ref as p, onMounted as Y, nextTick as M, openBlock as d, createElementBlock as u, normalizeClass as a, createBlock as B, withCtx as Z, createTextVNode as j, toDisplayString as y, createCommentVNode as s, createElementVNode as z, renderSlot as N, createVNode as h } from "vue";
|
|
2
|
+
import m from "./Icon.vue.js";
|
|
3
|
+
import _ from "./Label.vue.js";
|
|
4
|
+
import ee from "./Textarea.vue.js";
|
|
5
|
+
import { $t as T } from "../utils/i18n.js";
|
|
6
|
+
const te = ["for"], ne = ["type", "value", "placeholder", "disabled", "min", "max"], oe = { class: "absolute right-3 top-1/2 -translate-y-1/2 flex items-center justify-center gap-2 z-20" }, ie = /* @__PURE__ */ Q({
|
|
7
7
|
__name: "Input",
|
|
8
8
|
props: {
|
|
9
9
|
modelValue: { default: "" },
|
|
@@ -16,7 +16,9 @@ const ee = ["type", "value", "placeholder", "disabled", "min", "max"], ne = { cl
|
|
|
16
16
|
loading: { type: Boolean, default: !1 },
|
|
17
17
|
error: {},
|
|
18
18
|
icon: {},
|
|
19
|
+
iconClass: {},
|
|
19
20
|
iconRight: {},
|
|
21
|
+
iconRightClass: {},
|
|
20
22
|
showClearButton: { type: Boolean, default: !0 },
|
|
21
23
|
autofocus: { type: Boolean, default: !1 },
|
|
22
24
|
class: { default: "" },
|
|
@@ -35,26 +37,29 @@ const ee = ["type", "value", "placeholder", "disabled", "min", "max"], ne = { cl
|
|
|
35
37
|
max: {}
|
|
36
38
|
},
|
|
37
39
|
emits: ["update:modelValue", "focus", "blur", "change", "click:icon", "click:icon-right"],
|
|
38
|
-
setup(
|
|
39
|
-
const e =
|
|
40
|
+
setup(t, { emit: E }) {
|
|
41
|
+
const e = t, i = E, f = r(() => e.labelI18n ? T(e.labelI18n) : e.label), R = r(
|
|
42
|
+
() => e.placeholderI18n ? T(e.placeholderI18n) : e.placeholder
|
|
43
|
+
), b = X(), w = p(null), v = p(!1), D = r(() => e.type === "password" && v.value ? "text" : e.type), C = r(() => e.modelValue !== "" && e.modelValue !== null && e.modelValue !== void 0), g = r(() => !!e.addonLeft || !!b["addon-left"]), k = r(() => !!e.addonRight || !!b["addon-right"]), H = r(() => [
|
|
40
44
|
"relative w-full",
|
|
41
45
|
e.class,
|
|
42
46
|
e.labelPosition === "left" ? "flex items-center gap-4" : "",
|
|
43
47
|
e.labelPosition === "right" ? "flex flex-row-reverse items-center gap-4" : "space-y-2"
|
|
44
|
-
].join(" ")),
|
|
48
|
+
].join(" ")), U = r(() => ["relative flex w-full items-stretch", e.labelPosition !== "top" ? "flex-1" : ""].join(
|
|
45
49
|
" "
|
|
46
|
-
)), $ =
|
|
47
|
-
const
|
|
50
|
+
)), $ = r(() => {
|
|
51
|
+
const n = "block w-full bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground/50 disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none relative focus:z-10", o = {
|
|
48
52
|
solid: "bg-muted border-transparent focus-visible:border-primary",
|
|
49
53
|
outline: "border border-input focus-visible:border-primary",
|
|
50
54
|
"outline-b": "border-b border-input bg-transparent rounded-none focus-visible:border-primary",
|
|
51
|
-
transparent: "border-none bg-transparent shadow-none"
|
|
52
|
-
|
|
55
|
+
transparent: "border-none bg-transparent shadow-none",
|
|
56
|
+
floating: "border border-input focus-visible:border-primary"
|
|
57
|
+
}, c = {
|
|
53
58
|
sm: "h-7.5 text-xs",
|
|
54
59
|
md: "h-9 text-sm",
|
|
55
60
|
lg: "h-10 text-base"
|
|
56
61
|
};
|
|
57
|
-
let
|
|
62
|
+
let l = {
|
|
58
63
|
none: "rounded-none",
|
|
59
64
|
sm: "rounded-sm",
|
|
60
65
|
md: "rounded-md",
|
|
@@ -63,36 +68,40 @@ const ee = ["type", "value", "placeholder", "disabled", "min", "max"], ne = { cl
|
|
|
63
68
|
"2xl": "rounded-2xl",
|
|
64
69
|
full: "rounded-full"
|
|
65
70
|
}[e.rounded];
|
|
66
|
-
|
|
67
|
-
const A = e.variant === "outline-b" || e.variant === "transparent";
|
|
71
|
+
g.value && (e.rounded === "md" ? l = "rounded-r-md rounded-l-none" : e.rounded === "sm" ? l = "rounded-r-sm rounded-l-none" : e.rounded === "lg" ? l = "rounded-r-lg rounded-l-none" : e.rounded === "full" ? l = "rounded-r-full rounded-l-none" : e.rounded !== "none" && (l = l.replace("rounded-", "rounded-r-").replace("rounded-l-", ""))), k.value && (g.value ? l = "rounded-none" : e.rounded === "md" ? l = "rounded-l-md rounded-r-none" : e.rounded === "sm" ? l = "rounded-l-sm rounded-r-none" : e.rounded === "lg" ? l = "rounded-l-lg rounded-r-none" : e.rounded === "full" ? l = "rounded-l-full rounded-r-none" : e.rounded !== "none" && (l = l.replace("rounded-", "rounded-l-").replace("rounded-r-", ""))), e.variant === "outline-b" && (l = "rounded-none");
|
|
72
|
+
const A = e.variant === "outline-b" || e.variant === "transparent", F = e.variant === "floating";
|
|
68
73
|
return [
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
n,
|
|
75
|
+
o[e.variant],
|
|
76
|
+
e.type === "textarea" ? "" : c[e.size],
|
|
77
|
+
l,
|
|
73
78
|
e.error ? "border-destructive focus-visible:ring-destructive" : "",
|
|
74
|
-
e.icon ? "pl-9" : A && !
|
|
75
|
-
|
|
79
|
+
e.icon ? "pl-9" : A && !g.value ? "pl-0" : "",
|
|
80
|
+
F && e.type !== "textarea" ? "pt-3 pb-3" : "",
|
|
81
|
+
// Add padding for floating label but ignore for textarea
|
|
82
|
+
F && e.type === "textarea" ? "pt-3.5" : "",
|
|
83
|
+
// Textareas need top padding but normal bottom
|
|
84
|
+
e.showClearButton && C.value || e.type === "password" || e.loading || e.iconRight ? "pr-9" : A && !k.value ? "pr-0" : "",
|
|
76
85
|
e.inputClass
|
|
77
86
|
].join(" ");
|
|
78
87
|
}), I = {
|
|
79
88
|
sm: "text-xs",
|
|
80
89
|
md: "text-sm",
|
|
81
90
|
lg: "text-base"
|
|
82
|
-
}, L = (
|
|
83
|
-
const
|
|
91
|
+
}, L = (n) => {
|
|
92
|
+
const o = n === "left";
|
|
84
93
|
return [
|
|
85
94
|
"[&_button]:w-full [&_a]:w-full! [&_.v-btn]:w-full! [&_.tooltip-trigger]:w-full",
|
|
86
|
-
|
|
95
|
+
o ? "[&_button]:rounded-r-none [&_a]:rounded-r-none [&_.v-btn]:rounded-r-none" : "[&_button]:rounded-l-none [&_a]:rounded-l-none [&_.v-btn]:rounded-l-none",
|
|
87
96
|
"[&_button]:relative [&_button]:focus:z-20",
|
|
88
|
-
|
|
97
|
+
o ? "-mr-px" : "-ml-px",
|
|
89
98
|
"z-10"
|
|
90
99
|
].join(" ");
|
|
91
|
-
},
|
|
92
|
-
const
|
|
100
|
+
}, W = r(() => {
|
|
101
|
+
const n = !!b["addon-left"];
|
|
93
102
|
return [
|
|
94
103
|
"flex items-center justify-center whitespace-nowrap",
|
|
95
|
-
|
|
104
|
+
n ? `border-none ${L("left")}` : `bg-muted border border-input border-r-0! px-3 text-muted-foreground ${{
|
|
96
105
|
sm: "rounded-l-sm",
|
|
97
106
|
md: "rounded-l-md",
|
|
98
107
|
lg: "rounded-l-lg",
|
|
@@ -101,15 +110,15 @@ const ee = ["type", "value", "placeholder", "disabled", "min", "max"], ne = { cl
|
|
|
101
110
|
xl: "rounded-l-xl",
|
|
102
111
|
"2xl": "rounded-l-2xl"
|
|
103
112
|
}[e.rounded] || "rounded-l-md"}`,
|
|
104
|
-
|
|
113
|
+
n ? "" : I[e.size],
|
|
105
114
|
e.addonLeftClass,
|
|
106
115
|
e.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
107
116
|
].join(" ");
|
|
108
|
-
}),
|
|
109
|
-
const
|
|
117
|
+
}), q = r(() => {
|
|
118
|
+
const n = !!b["addon-right"];
|
|
110
119
|
return [
|
|
111
120
|
"flex items-center justify-center whitespace-nowrap",
|
|
112
|
-
|
|
121
|
+
n ? `border-none ${L("right")}` : `bg-muted border border-input border-l-0! px-3 text-muted-foreground ${{
|
|
113
122
|
sm: "rounded-r-sm",
|
|
114
123
|
md: "rounded-r-md",
|
|
115
124
|
lg: "rounded-r-lg",
|
|
@@ -118,156 +127,164 @@ const ee = ["type", "value", "placeholder", "disabled", "min", "max"], ne = { cl
|
|
|
118
127
|
xl: "rounded-r-xl",
|
|
119
128
|
"2xl": "rounded-r-2xl"
|
|
120
129
|
}[e.rounded] || "rounded-r-md"}`,
|
|
121
|
-
|
|
130
|
+
n ? "" : I[e.size],
|
|
122
131
|
e.addonRightClass,
|
|
123
132
|
e.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
124
133
|
].join(" ");
|
|
125
|
-
}),
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
},
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
}, J = () => {
|
|
132
|
-
b.value = !b.value;
|
|
134
|
+
}), G = (n) => {
|
|
135
|
+
const o = n.target;
|
|
136
|
+
i("update:modelValue", o.value);
|
|
137
|
+
}, J = (n) => {
|
|
138
|
+
const o = n.target;
|
|
139
|
+
i("change", o.value);
|
|
133
140
|
}, K = () => {
|
|
134
|
-
|
|
135
|
-
|
|
141
|
+
v.value = !v.value;
|
|
142
|
+
}, O = () => {
|
|
143
|
+
i("update:modelValue", ""), M(() => {
|
|
144
|
+
w.value?.focus();
|
|
136
145
|
});
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
}, S = (
|
|
140
|
-
|
|
146
|
+
}, x = p(!1), V = p(!1), P = (n) => {
|
|
147
|
+
x.value = !0, i("focus", n);
|
|
148
|
+
}, S = (n) => {
|
|
149
|
+
x.value = !1, i("blur", n);
|
|
141
150
|
};
|
|
142
|
-
return
|
|
143
|
-
e.autofocus &&
|
|
144
|
-
|
|
151
|
+
return Y(() => {
|
|
152
|
+
e.autofocus && M(() => {
|
|
153
|
+
w.value?.focus();
|
|
145
154
|
});
|
|
146
|
-
}), (
|
|
147
|
-
class: a(
|
|
155
|
+
}), (n, o) => (d(), u("div", {
|
|
156
|
+
class: a(H.value)
|
|
148
157
|
}, [
|
|
149
|
-
|
|
158
|
+
f.value && t.variant !== "floating" ? (d(), B(_, {
|
|
150
159
|
key: 0,
|
|
151
|
-
for:
|
|
152
|
-
class: a(["mb-1.5",
|
|
160
|
+
for: f.value,
|
|
161
|
+
class: a(["mb-1.5", t.labelPosition !== "top" ? "mb-0" : ""].join(" "))
|
|
153
162
|
}, {
|
|
154
|
-
default:
|
|
155
|
-
|
|
163
|
+
default: Z(() => [
|
|
164
|
+
j(y(f.value), 1)
|
|
156
165
|
]),
|
|
157
166
|
_: 1
|
|
158
|
-
}, 8, ["for", "class"])) :
|
|
159
|
-
|
|
160
|
-
class: a(
|
|
167
|
+
}, 8, ["for", "class"])) : s("", !0),
|
|
168
|
+
z("div", {
|
|
169
|
+
class: a(U.value)
|
|
161
170
|
}, [
|
|
162
|
-
|
|
171
|
+
g.value ? (d(), u("div", {
|
|
163
172
|
key: 0,
|
|
164
|
-
class: a(
|
|
173
|
+
class: a(W.value)
|
|
165
174
|
}, [
|
|
166
|
-
|
|
167
|
-
|
|
175
|
+
N(n.$slots, "addon-left", {}, () => [
|
|
176
|
+
j(y(t.addonLeft), 1)
|
|
168
177
|
])
|
|
169
|
-
], 2)) :
|
|
170
|
-
|
|
178
|
+
], 2)) : s("", !0),
|
|
179
|
+
z("div", {
|
|
171
180
|
class: "relative w-full",
|
|
172
|
-
onMouseenter:
|
|
173
|
-
onMouseleave:
|
|
181
|
+
onMouseenter: o[2] || (o[2] = (c) => V.value = !0),
|
|
182
|
+
onMouseleave: o[3] || (o[3] = (c) => V.value = !1)
|
|
174
183
|
}, [
|
|
175
|
-
|
|
184
|
+
f.value && t.variant === "floating" ? (d(), u("label", {
|
|
176
185
|
key: 0,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
186
|
+
for: f.value,
|
|
187
|
+
class: a([
|
|
188
|
+
"absolute transition-all duration-200 ease-in-out pointer-events-none z-20",
|
|
189
|
+
x.value || C.value ? "-top-2.5 left-3 text-xs bg-background px-1 text-primary shadow-[0_4px_4px_-4px_bg-background]" : `top-2.5 text-sm text-muted-foreground/70 ${t.icon ? "left-9" : "left-3"}`
|
|
190
|
+
])
|
|
191
|
+
}, y(f.value), 11, te)) : s("", !0),
|
|
192
|
+
t.type === "textarea" ? (d(), B(ee, {
|
|
193
|
+
key: 1,
|
|
194
|
+
"model-value": String(t.modelValue),
|
|
195
|
+
placeholder: R.value,
|
|
196
|
+
disabled: t.disabled,
|
|
197
|
+
rows: t.rows,
|
|
181
198
|
class: a($.value),
|
|
182
|
-
"onUpdate:modelValue":
|
|
199
|
+
"onUpdate:modelValue": o[0] || (o[0] = (c) => i("update:modelValue", c)),
|
|
183
200
|
onBlur: S,
|
|
184
201
|
onFocus: P
|
|
185
|
-
}, null, 8, ["model-value", "placeholder", "disabled", "rows", "class"])) : (
|
|
186
|
-
key:
|
|
202
|
+
}, null, 8, ["model-value", "placeholder", "disabled", "rows", "class"])) : (d(), u("input", {
|
|
203
|
+
key: 2,
|
|
187
204
|
ref_key: "inputRef",
|
|
188
|
-
ref:
|
|
189
|
-
type:
|
|
190
|
-
value:
|
|
191
|
-
placeholder:
|
|
192
|
-
disabled:
|
|
193
|
-
min:
|
|
194
|
-
max:
|
|
205
|
+
ref: w,
|
|
206
|
+
type: D.value,
|
|
207
|
+
value: t.modelValue,
|
|
208
|
+
placeholder: R.value,
|
|
209
|
+
disabled: t.disabled,
|
|
210
|
+
min: t.min,
|
|
211
|
+
max: t.max,
|
|
195
212
|
class: a($.value),
|
|
196
|
-
onInput:
|
|
197
|
-
onChange:
|
|
213
|
+
onInput: G,
|
|
214
|
+
onChange: J,
|
|
198
215
|
onBlur: S,
|
|
199
216
|
onFocus: P
|
|
200
|
-
}, null, 42,
|
|
201
|
-
|
|
202
|
-
key:
|
|
217
|
+
}, null, 42, ne)),
|
|
218
|
+
t.icon ? (d(), u("div", {
|
|
219
|
+
key: 3,
|
|
203
220
|
tabindex: "-1",
|
|
204
221
|
class: a([
|
|
205
222
|
"absolute left-3 top-1/2 -translate-y-1/2 flex items-center justify-center text-muted-foreground z-20 pointer-events-none",
|
|
206
|
-
|
|
223
|
+
t.disabled ? "opacity-50" : ""
|
|
207
224
|
])
|
|
208
225
|
}, [
|
|
209
|
-
|
|
210
|
-
icon:
|
|
211
|
-
class: "h-4 w-4"
|
|
212
|
-
}, null, 8, ["icon"])
|
|
213
|
-
], 2)) :
|
|
214
|
-
|
|
215
|
-
|
|
226
|
+
h(m, {
|
|
227
|
+
icon: t.icon,
|
|
228
|
+
class: a(["h-4 w-4", t.iconClass])
|
|
229
|
+
}, null, 8, ["icon", "class"])
|
|
230
|
+
], 2)) : s("", !0),
|
|
231
|
+
z("div", oe, [
|
|
232
|
+
t.loading ? (d(), B(m, {
|
|
216
233
|
key: 0,
|
|
217
234
|
icon: "lucide:loader-2",
|
|
218
235
|
class: "h-4 w-4 animate-spin text-muted-foreground"
|
|
219
|
-
})) :
|
|
236
|
+
})) : t.iconRight ? (d(), u("div", {
|
|
220
237
|
key: 1,
|
|
221
238
|
tabindex: "-1",
|
|
222
239
|
class: a([
|
|
223
240
|
"flex items-center justify-center text-muted-foreground",
|
|
224
|
-
|
|
241
|
+
t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:text-foreground"
|
|
225
242
|
]),
|
|
226
|
-
onClick:
|
|
243
|
+
onClick: o[1] || (o[1] = (c) => !t.disabled && i("click:icon-right", c))
|
|
227
244
|
}, [
|
|
228
|
-
|
|
229
|
-
icon:
|
|
230
|
-
class: "h-4 w-4"
|
|
231
|
-
}, null, 8, ["icon"])
|
|
232
|
-
], 2)) :
|
|
233
|
-
|
|
245
|
+
h(m, {
|
|
246
|
+
icon: t.iconRight,
|
|
247
|
+
class: a(["h-4 w-4", t.iconRightClass])
|
|
248
|
+
}, null, 8, ["icon", "class"])
|
|
249
|
+
], 2)) : s("", !0),
|
|
250
|
+
t.type === "password" && !t.disabled ? (d(), u("button", {
|
|
234
251
|
key: 2,
|
|
235
252
|
type: "button",
|
|
236
253
|
tabindex: "-1",
|
|
237
254
|
class: "flex items-center justify-center text-muted-foreground hover:text-foreground focus:outline-none",
|
|
238
|
-
onClick:
|
|
255
|
+
onClick: K
|
|
239
256
|
}, [
|
|
240
|
-
|
|
241
|
-
icon:
|
|
257
|
+
h(m, {
|
|
258
|
+
icon: v.value ? "lucide:eye-off" : "lucide:eye",
|
|
242
259
|
class: "h-4 w-4"
|
|
243
260
|
}, null, 8, ["icon"])
|
|
244
|
-
])) :
|
|
245
|
-
|
|
261
|
+
])) : s("", !0),
|
|
262
|
+
t.showClearButton && C.value && !t.disabled && !t.loading && t.type !== "textarea" && t.type !== "password" && (x.value || V.value) ? (d(), u("button", {
|
|
246
263
|
key: 3,
|
|
247
264
|
type: "button",
|
|
248
265
|
tabindex: "-1",
|
|
249
266
|
class: "flex items-center justify-center text-muted-foreground hover:text-foreground focus:outline-none transition-opacity duration-200",
|
|
250
|
-
onClick:
|
|
267
|
+
onClick: O
|
|
251
268
|
}, [
|
|
252
|
-
|
|
269
|
+
h(m, {
|
|
253
270
|
icon: "lucide:x-circle",
|
|
254
271
|
class: "h-4 w-4"
|
|
255
272
|
})
|
|
256
|
-
])) :
|
|
273
|
+
])) : s("", !0)
|
|
257
274
|
])
|
|
258
275
|
], 32),
|
|
259
|
-
|
|
276
|
+
k.value ? (d(), u("div", {
|
|
260
277
|
key: 1,
|
|
261
|
-
class: a(
|
|
278
|
+
class: a(q.value)
|
|
262
279
|
}, [
|
|
263
|
-
|
|
264
|
-
|
|
280
|
+
N(n.$slots, "addon-right", {}, () => [
|
|
281
|
+
j(y(t.addonRight), 1)
|
|
265
282
|
])
|
|
266
|
-
], 2)) :
|
|
283
|
+
], 2)) : s("", !0)
|
|
267
284
|
], 2)
|
|
268
285
|
], 2));
|
|
269
286
|
}
|
|
270
287
|
});
|
|
271
288
|
export {
|
|
272
|
-
|
|
289
|
+
ie as default
|
|
273
290
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ListProps } from './types';
|
|
2
|
+
declare function __VLS_template(): any;
|
|
3
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
4
|
+
declare const __VLS_component: import('vue').DefineComponent<ListProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ListProps> & Readonly<{}>, {
|
|
5
|
+
variant: import('./types').ListVariant;
|
|
6
|
+
class: string;
|
|
7
|
+
loading: boolean;
|
|
8
|
+
columns: import('./types').ListColumns;
|
|
9
|
+
showColon: boolean;
|
|
10
|
+
skeletonRows: number;
|
|
11
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { defineComponent as D, useSlots as E, computed as i, openBlock as r, createElementBlock as l, normalizeClass as v, renderSlot as g, createBlock as y, createCommentVNode as c, createElementVNode as b, toDisplayString as O, Fragment as m, renderList as f, createSlots as C, withCtx as I, mergeProps as $ } from "vue";
|
|
2
|
+
import R from "../Icon.vue.js";
|
|
3
|
+
import x from "./ListFieldRow.vue.js";
|
|
4
|
+
import { $t as T } from "../../utils/i18n.js";
|
|
5
|
+
import { getObjectValue as z } from "./utils.js";
|
|
6
|
+
const A = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "px-3 py-2.5 border-b border-border/70 flex items-center gap-2 bg-gray-50"
|
|
9
|
+
}, N = { class: "text-sm font-semibold text-gray-900 tracking-tight" }, P = { key: 1 }, q = { key: 2 }, G = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "px-3 py-8 text-center text-sm text-muted-foreground"
|
|
12
|
+
}, H = {
|
|
13
|
+
key: 3,
|
|
14
|
+
class: "border-t border-border/70 px-3 py-2.5"
|
|
15
|
+
}, X = /* @__PURE__ */ D({
|
|
16
|
+
__name: "List",
|
|
17
|
+
props: {
|
|
18
|
+
fields: {},
|
|
19
|
+
data: {},
|
|
20
|
+
title: {},
|
|
21
|
+
titleI18n: {},
|
|
22
|
+
titleIcon: {},
|
|
23
|
+
columns: { default: 2 },
|
|
24
|
+
variant: { default: "default" },
|
|
25
|
+
class: { default: "" },
|
|
26
|
+
showColon: { type: Boolean, default: !0 },
|
|
27
|
+
loading: { type: Boolean, default: !1 },
|
|
28
|
+
skeletonRows: { default: 6 }
|
|
29
|
+
},
|
|
30
|
+
setup(a) {
|
|
31
|
+
const o = a, F = E(), w = i(() => o.fields.filter((e) => {
|
|
32
|
+
const u = z(e.key, o.data);
|
|
33
|
+
return e.whenTrue && !u ? !1 : e.when ? e.when(u, o.data) : !0;
|
|
34
|
+
})), n = i(() => {
|
|
35
|
+
if (o.columns === 1)
|
|
36
|
+
return { left: [], right: [], full: w.value };
|
|
37
|
+
const e = [], u = [], d = [];
|
|
38
|
+
for (const s of w.value) {
|
|
39
|
+
if (s.lineByLine) {
|
|
40
|
+
d.push(s);
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
e.length <= u.length ? e.push(s) : u.push(s);
|
|
44
|
+
}
|
|
45
|
+
const t = Math.abs(e.length - u.length);
|
|
46
|
+
if (t >= 2) {
|
|
47
|
+
const s = e.length > u.length ? e : u, h = s.splice(s.length - Math.floor(t / 2));
|
|
48
|
+
d.unshift(...h);
|
|
49
|
+
}
|
|
50
|
+
return { left: e, right: u, full: d };
|
|
51
|
+
}), k = i(() => n.value.full.length > 0), M = i(
|
|
52
|
+
() => n.value.left.length > 0 || n.value.right.length > 0
|
|
53
|
+
), B = i(() => o.titleI18n ? T(o.titleI18n) : o.title ?? ""), V = i(() => {
|
|
54
|
+
const e = {
|
|
55
|
+
default: "border border-border rounded",
|
|
56
|
+
card: "border border-border rounded-xl bg-card shadow-sm",
|
|
57
|
+
minimal: "rounded",
|
|
58
|
+
striped: "border border-border rounded",
|
|
59
|
+
compact: "border border-border rounded",
|
|
60
|
+
"bordered-rows": "rounded border border-border"
|
|
61
|
+
};
|
|
62
|
+
return [
|
|
63
|
+
"list-component w-full overflow-hidden",
|
|
64
|
+
e[o.variant] ?? e.default,
|
|
65
|
+
o.class
|
|
66
|
+
].join(" ");
|
|
67
|
+
}), j = i(() => o.columns === 1 ? "grid grid-cols-1" : o.columns === 3 ? "grid grid-cols-1 md:grid-cols-3" : "grid grid-cols-1 md:grid-cols-2"), S = i(() => o.columns === 1 ? "" : (o.columns === 3, "border-r border-border/70")), p = i(
|
|
68
|
+
() => Object.keys(F).filter((e) => !["title", "header", "footer"].includes(e))
|
|
69
|
+
), L = i(() => Array.from({ length: o.skeletonRows }));
|
|
70
|
+
return (e, u) => (r(), l("div", {
|
|
71
|
+
class: v(V.value),
|
|
72
|
+
role: "table",
|
|
73
|
+
"aria-label": "Information list"
|
|
74
|
+
}, [
|
|
75
|
+
B.value || a.titleIcon || e.$slots.title ? (r(), l("div", A, [
|
|
76
|
+
g(e.$slots, "title", {}, () => [
|
|
77
|
+
a.titleIcon ? (r(), y(R, {
|
|
78
|
+
key: 0,
|
|
79
|
+
icon: a.titleIcon,
|
|
80
|
+
class: "w-4 h-4 text-muted-foreground shrink-0"
|
|
81
|
+
}, null, 8, ["icon"])) : c("", !0),
|
|
82
|
+
b("h3", N, O(B.value), 1)
|
|
83
|
+
])
|
|
84
|
+
])) : c("", !0),
|
|
85
|
+
a.loading ? (r(), l("div", {
|
|
86
|
+
key: 1,
|
|
87
|
+
class: v(j.value)
|
|
88
|
+
}, [
|
|
89
|
+
b("div", null, [
|
|
90
|
+
(r(!0), l(m, null, f(L.value, (d, t) => (r(), l("div", {
|
|
91
|
+
key: "sk-l-" + t,
|
|
92
|
+
class: "flex justify-between gap-3 px-3 py-2.5 border-b border-border/70 last:border-b-0"
|
|
93
|
+
}, [...u[0] || (u[0] = [
|
|
94
|
+
b("div", { class: "h-4 w-1/3 rounded bg-muted animate-pulse" }, null, -1),
|
|
95
|
+
b("div", { class: "h-4 w-2/5 rounded bg-muted/60 animate-pulse" }, null, -1)
|
|
96
|
+
])]))), 128))
|
|
97
|
+
]),
|
|
98
|
+
a.columns !== 1 ? (r(), l("div", {
|
|
99
|
+
key: 0,
|
|
100
|
+
class: v(S.value)
|
|
101
|
+
}, [
|
|
102
|
+
(r(!0), l(m, null, f(L.value, (d, t) => (r(), l("div", {
|
|
103
|
+
key: "sk-r-" + t,
|
|
104
|
+
class: "flex justify-between gap-3 px-3 py-2.5 border-b border-border/70 last:border-b-0"
|
|
105
|
+
}, [...u[1] || (u[1] = [
|
|
106
|
+
b("div", { class: "h-4 w-1/3 rounded bg-muted animate-pulse" }, null, -1),
|
|
107
|
+
b("div", { class: "h-4 w-2/5 rounded bg-muted/60 animate-pulse" }, null, -1)
|
|
108
|
+
])]))), 128))
|
|
109
|
+
], 2)) : c("", !0)
|
|
110
|
+
], 2)) : (r(), l(m, { key: 2 }, [
|
|
111
|
+
b("div", {
|
|
112
|
+
class: v(j.value)
|
|
113
|
+
}, [
|
|
114
|
+
n.value.left.length > 0 ? (r(), l("div", {
|
|
115
|
+
key: 0,
|
|
116
|
+
class: v(S.value)
|
|
117
|
+
}, [
|
|
118
|
+
(r(!0), l(m, null, f(n.value.left, (d, t) => (r(), y(x, {
|
|
119
|
+
key: d.key + t,
|
|
120
|
+
field: d,
|
|
121
|
+
data: o.data,
|
|
122
|
+
index: t,
|
|
123
|
+
variant: a.variant,
|
|
124
|
+
"show-colon": a.showColon,
|
|
125
|
+
"is-last": t === n.value.left.length - 1,
|
|
126
|
+
"show-border-bottom": t < n.value.left.length - 1 || t === n.value.left.length - 1 && !k.value
|
|
127
|
+
}, C({ _: 2 }, [
|
|
128
|
+
f(p.value, (s) => ({
|
|
129
|
+
name: s,
|
|
130
|
+
fn: I((h) => [
|
|
131
|
+
g(e.$slots, s, $({ ref_for: !0 }, h))
|
|
132
|
+
])
|
|
133
|
+
}))
|
|
134
|
+
]), 1032, ["field", "data", "index", "variant", "show-colon", "is-last", "show-border-bottom"]))), 128))
|
|
135
|
+
], 2)) : c("", !0),
|
|
136
|
+
a.columns !== 1 && n.value.right.length > 0 ? (r(), l("div", P, [
|
|
137
|
+
(r(!0), l(m, null, f(n.value.right, (d, t) => (r(), y(x, {
|
|
138
|
+
key: d.key + t,
|
|
139
|
+
field: d,
|
|
140
|
+
data: o.data,
|
|
141
|
+
index: t,
|
|
142
|
+
variant: a.variant,
|
|
143
|
+
"show-colon": a.showColon,
|
|
144
|
+
"is-last": t === n.value.right.length - 1,
|
|
145
|
+
"show-border-bottom": t < n.value.right.length - 1 || t === n.value.right.length - 1 && !k.value
|
|
146
|
+
}, C({ _: 2 }, [
|
|
147
|
+
f(p.value, (s) => ({
|
|
148
|
+
name: s,
|
|
149
|
+
fn: I((h) => [
|
|
150
|
+
g(e.$slots, s, $({ ref_for: !0 }, h))
|
|
151
|
+
])
|
|
152
|
+
}))
|
|
153
|
+
]), 1032, ["field", "data", "index", "variant", "show-colon", "is-last", "show-border-bottom"]))), 128))
|
|
154
|
+
])) : c("", !0),
|
|
155
|
+
a.columns === 3 ? (r(), l("div", q)) : c("", !0)
|
|
156
|
+
], 2),
|
|
157
|
+
k.value ? (r(), l("div", {
|
|
158
|
+
key: 0,
|
|
159
|
+
class: v(M.value ? "border-t border-border" : "")
|
|
160
|
+
}, [
|
|
161
|
+
(r(!0), l(m, null, f(n.value.full, (d, t) => (r(), y(x, {
|
|
162
|
+
key: d.key + t,
|
|
163
|
+
field: d,
|
|
164
|
+
data: o.data,
|
|
165
|
+
index: t,
|
|
166
|
+
variant: a.variant,
|
|
167
|
+
"show-colon": a.showColon,
|
|
168
|
+
"is-last": t === n.value.full.length - 1,
|
|
169
|
+
"show-border-bottom": t < n.value.full.length - 1
|
|
170
|
+
}, C({ _: 2 }, [
|
|
171
|
+
f(p.value, (s) => ({
|
|
172
|
+
name: s,
|
|
173
|
+
fn: I((h) => [
|
|
174
|
+
g(e.$slots, s, $({ ref_for: !0 }, h))
|
|
175
|
+
])
|
|
176
|
+
}))
|
|
177
|
+
]), 1032, ["field", "data", "index", "variant", "show-colon", "is-last", "show-border-bottom"]))), 128))
|
|
178
|
+
], 2)) : c("", !0),
|
|
179
|
+
w.value.length === 0 ? (r(), l("div", G, " No information to display. ")) : c("", !0)
|
|
180
|
+
], 64)),
|
|
181
|
+
e.$slots.footer ? (r(), l("div", H, [
|
|
182
|
+
g(e.$slots, "footer")
|
|
183
|
+
])) : c("", !0)
|
|
184
|
+
], 2));
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
export {
|
|
188
|
+
X as default
|
|
189
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ListField } from './types';
|
|
2
|
+
interface Props {
|
|
3
|
+
field: ListField;
|
|
4
|
+
data: Record<string, any>;
|
|
5
|
+
isLast?: boolean;
|
|
6
|
+
showBorderBottom?: boolean;
|
|
7
|
+
variant?: string;
|
|
8
|
+
showColon?: boolean;
|
|
9
|
+
index?: number;
|
|
10
|
+
}
|
|
11
|
+
declare function __VLS_template(): {
|
|
12
|
+
attrs: Partial<{}>;
|
|
13
|
+
slots: Partial<Record<string, (_: {
|
|
14
|
+
value: any;
|
|
15
|
+
resolved: string;
|
|
16
|
+
data: Record<string, any>;
|
|
17
|
+
}) => any>>;
|
|
18
|
+
refs: {};
|
|
19
|
+
rootEl: HTMLDivElement;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
23
|
+
variant: string;
|
|
24
|
+
index: number;
|
|
25
|
+
isLast: boolean;
|
|
26
|
+
showBorderBottom: boolean;
|
|
27
|
+
showColon: boolean;
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
29
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|