vlite3 1.1.1 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +2 -17
- package/components/AttachmentsList/AttachmentsList.vue.js +273 -175
- package/components/Avatar.vue.js +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
- package/components/Button.vue.d.ts +1 -1
- package/components/Button.vue.js +30 -28
- package/components/Calendar/Calendar.vue.d.ts +6 -6
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue.d.ts +12 -3
- package/components/CategoryManager/CategoryManager.vue.js +204 -145
- package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
- package/components/CategoryManager/CategoryNode.vue.js +93 -88
- package/components/CategoryManager/types.d.ts +14 -0
- package/components/Chat/ChatBubble.vue.js +22 -22
- package/components/CheckBox.vue.js +29 -28
- package/components/Chip/Chip.vue.d.ts +2 -2
- package/components/ConfirmationModal.vue.d.ts +2 -2
- package/components/ConfirmationModal.vue.js +30 -28
- package/components/CopyButton.vue.d.ts +50 -0
- package/components/CopyButton.vue.js +69 -0
- package/components/CopyButton.vue2.js +4 -0
- package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.d.ts +1 -1
- package/components/DataTable/DataTable.vue.d.ts +3 -3
- package/components/DataTable/DataTable.vue.js +44 -44
- package/components/DatePicker.vue.js +41 -35
- package/components/DateRangePicker.vue.js +18 -17
- package/components/Dropdown/Dropdown.vue.d.ts +5 -2
- package/components/Dropdown/Dropdown.vue.js +117 -115
- package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
- package/components/Dropdown/DropdownItem.vue.js +21 -20
- package/components/Dropdown/DropdownMenu.vue.d.ts +1 -1
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +13 -12
- package/components/Dropdown/DropdownTrigger.vue.d.ts +3 -1
- package/components/Dropdown/DropdownTrigger.vue.js +10 -6
- package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
- package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
- package/components/Dropdown/composables/useDropdownSelection.js +46 -31
- package/components/FilePicker/FilePicker.vue.d.ts +1 -1
- package/components/FilePicker/FilePicker.vue.js +93 -90
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +230 -238
- package/components/Form/FormField.vue.d.ts +1 -1
- package/components/Form/FormField.vue.js +204 -148
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +28 -27
- package/components/Form/types.d.ts +2 -2
- package/components/Form/utils/form.utils.d.ts +3 -3
- package/components/Form/utils/form.utils.js +37 -37
- package/components/Input.vue.d.ts +3 -3
- package/components/Input.vue.js +64 -62
- package/components/Invoice/Invoice.vue.d.ts +1 -4
- package/components/Invoice/Invoice.vue.js +22 -13
- package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
- package/components/Invoice/InvoiceTotals.vue.js +86 -0
- package/components/Invoice/InvoiceTotals.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant1.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant1.vue.js +304 -271
- package/components/Invoice/InvoiceVariant2.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant2.vue.js +168 -181
- package/components/Invoice/InvoiceVariant3.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant3.vue.js +215 -182
- package/components/Invoice/InvoiceVariant4.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant4.vue.js +281 -238
- package/components/Invoice/index.d.ts +1 -0
- package/components/Invoice/types.d.ts +26 -0
- package/components/List/List.vue.d.ts +1 -9
- package/components/List/List.vue.js +166 -165
- package/components/List/ListFieldRow.vue.d.ts +2 -2
- package/components/List/ListFieldRow.vue.js +50 -50
- package/components/Masonry/Masonry.vue.d.ts +1 -1
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +60 -54
- package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
- package/components/MultiSelect/MultiSelect.vue.js +47 -46
- package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
- package/components/Navbar/NavbarItem.vue.d.ts +1 -1
- package/components/NumberInput.vue.d.ts +2 -2
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +121 -116
- package/components/OTPInput/OTPInput.vue.d.ts +1 -1
- package/components/PricingPlan/PricingPlan.vue.d.ts +2 -2
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +58 -52
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
- package/components/Stats/StatItem.vue.js +96 -91
- package/components/Stats/Stats.vue.d.ts +1 -1
- package/components/Stats/types.d.ts +1 -0
- package/components/StatusChip/status-map.js +27 -7
- package/components/Switch.vue.d.ts +6 -1
- package/components/Switch.vue.js +61 -24
- package/components/TagInput/TagInput.vue.d.ts +187 -0
- package/components/TagInput/TagInput.vue.js +113 -0
- package/components/TagInput/TagInput.vue2.js +4 -0
- package/components/TagInput/index.d.ts +1 -0
- package/components/Textarea.vue.js +19 -18
- package/components/ThumbnailSelector/ThumbnailSelector.vue.d.ts +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
- package/components/Workbook/Workbook.vue.d.ts +3 -3
- package/core/config.d.ts +112 -0
- package/core/index.js +17 -5
- package/index.d.ts +2 -0
- package/index.js +279 -271
- package/package.json +1 -1
- package/style.css +617 -2
- package/types/button.d.ts +1 -1
- package/types/config.type.d.ts +6 -0
- package/types/list.type.d.ts +6 -0
- package/types/styles.d.ts +1 -0
- package/utils/configUtils.d.ts +9 -0
- package/utils/configUtils.js +7 -0
- package/utils/functions.js +9 -9
- package/utils/index.d.ts +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as M, ref as $, computed as v, openBlock as t, createElementBlock as a, normalizeClass as s, createElementVNode as c, createBlock as f, createCommentVNode as x, toDisplayString as b, renderSlot as w, resolveDynamicComponent as L, Fragment as m, createVNode as p } from "vue";
|
|
2
2
|
import g from "../Icon.vue.js";
|
|
3
3
|
import k from "../Price/Price.vue.js";
|
|
4
4
|
import { $t as j } from "../../utils/i18n.js";
|
|
@@ -23,7 +23,7 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
|
|
|
23
23
|
key: 1,
|
|
24
24
|
class: "text-sm text-gray-600 tracking-widest select-none",
|
|
25
25
|
"aria-hidden": "true"
|
|
26
|
-
},
|
|
26
|
+
}, ie = ["aria-label"], se = ["src", "alt"], oe = ["innerHTML"], ye = /* @__PURE__ */ M({
|
|
27
27
|
__name: "ListFieldRow",
|
|
28
28
|
props: {
|
|
29
29
|
field: {},
|
|
@@ -38,7 +38,7 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
|
|
|
38
38
|
autoLineByLineThreshold: { default: 50 }
|
|
39
39
|
},
|
|
40
40
|
setup(e) {
|
|
41
|
-
const l = e,
|
|
41
|
+
const l = e, i = $(!1), o = v(() => I(l.field.key, l.data)), r = v(() => {
|
|
42
42
|
const n = o.value;
|
|
43
43
|
if (l.field.format)
|
|
44
44
|
return l.field.format(n, l.data);
|
|
@@ -71,12 +71,12 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
|
|
|
71
71
|
} else
|
|
72
72
|
n.push(l.field.class);
|
|
73
73
|
return n.join(" ");
|
|
74
|
-
}),
|
|
75
|
-
return (n, u) =>
|
|
74
|
+
}), h = v(() => l.field.type === "image"), B = v(() => l.variant === "striped" && l.index % 2 !== 0), C = v(() => l.variant === "stacked"), S = v(() => l.field.lineByLineLayout === "inline" ? !1 : l.field.lineByLineLayout === "block" || l.field.lineByLine ? !0 : l.autoLineByLineThreshold > 0 ? String(r.value ?? "").length > l.autoLineByLineThreshold : !1), H = v(() => l.stackedBorderStyle === "divider" && l.stackedColIndex !== 0 ? "border-l border-border pl-4 pr-3.5 py-2" : "px-3.5 py-2");
|
|
75
|
+
return (n, u) => C.value ? (t(), a("div", {
|
|
76
76
|
key: 0,
|
|
77
|
-
class:
|
|
77
|
+
class: s([
|
|
78
78
|
"list-field-row list-field-row--stacked flex flex-col gap-0.5 min-w-0",
|
|
79
|
-
|
|
79
|
+
H.value
|
|
80
80
|
]),
|
|
81
81
|
role: "row"
|
|
82
82
|
}, [
|
|
@@ -85,8 +85,8 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
|
|
|
85
85
|
key: 0,
|
|
86
86
|
icon: e.field.icon,
|
|
87
87
|
class: "w-3 h-3 text-muted-foreground shrink-0"
|
|
88
|
-
}, null, 8, ["icon"])) :
|
|
89
|
-
c("span", F,
|
|
88
|
+
}, null, 8, ["icon"])) : x("", !0),
|
|
89
|
+
c("span", F, b(y.value), 1)
|
|
90
90
|
]),
|
|
91
91
|
c("div", O, [
|
|
92
92
|
n.$slots[e.field.key] ? w(n.$slots, e.field.key, {
|
|
@@ -99,29 +99,29 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
|
|
|
99
99
|
data: e.data,
|
|
100
100
|
value: o.value
|
|
101
101
|
}, null, 8, ["data", "value"])) : e.field.isSensitive ? (t(), a("div", z, [
|
|
102
|
-
|
|
102
|
+
i.value ? (t(), a(m, { key: 0 }, [
|
|
103
103
|
e.field.type === "price" ? (t(), f(k, {
|
|
104
104
|
key: 0,
|
|
105
105
|
value: o.value,
|
|
106
|
-
class:
|
|
106
|
+
class: s(["text-sm font-semibold text-foreground wrap-break-word leading-snug", d.value])
|
|
107
107
|
}, null, 8, ["value", "class"])) : (t(), a("span", {
|
|
108
108
|
key: 1,
|
|
109
|
-
class:
|
|
109
|
+
class: s(["text-sm font-semibold text-foreground wrap-break-word leading-snug", d.value]),
|
|
110
110
|
innerHTML: r.value
|
|
111
111
|
}, null, 10, R))
|
|
112
112
|
], 64)) : (t(), a("span", Y, " •••••••• ")),
|
|
113
113
|
c("button", {
|
|
114
114
|
type: "button",
|
|
115
115
|
class: "shrink-0 p-0.5 rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary/50",
|
|
116
|
-
"aria-label":
|
|
117
|
-
onClick: u[0] || (u[0] = (
|
|
116
|
+
"aria-label": i.value ? "Hide value" : "Show value",
|
|
117
|
+
onClick: u[0] || (u[0] = (T) => i.value = !i.value)
|
|
118
118
|
}, [
|
|
119
|
-
|
|
120
|
-
icon:
|
|
119
|
+
p(g, {
|
|
120
|
+
icon: i.value ? "lucide:eye-off" : "lucide:eye",
|
|
121
121
|
class: "w-3 h-3"
|
|
122
122
|
}, null, 8, ["icon"])
|
|
123
123
|
], 8, q)
|
|
124
|
-
])) :
|
|
124
|
+
])) : h.value ? (t(), a("img", {
|
|
125
125
|
key: 3,
|
|
126
126
|
src: r.value,
|
|
127
127
|
alt: y.value,
|
|
@@ -130,19 +130,19 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
|
|
|
130
130
|
e.field.type === "price" ? (t(), f(k, {
|
|
131
131
|
key: 0,
|
|
132
132
|
value: o.value,
|
|
133
|
-
class:
|
|
133
|
+
class: s(["text-sm font-semibold text-foreground wrap-break-word leading-snug", d.value])
|
|
134
134
|
}, null, 8, ["value", "class"])) : (t(), a("span", {
|
|
135
135
|
key: 1,
|
|
136
|
-
class:
|
|
136
|
+
class: s(["text-sm font-semibold text-foreground wrap-break-word leading-snug", d.value]),
|
|
137
137
|
innerHTML: r.value
|
|
138
138
|
}, null, 10, G))
|
|
139
139
|
], 64))
|
|
140
140
|
])
|
|
141
|
-
], 2)) :
|
|
141
|
+
], 2)) : S.value ? (t(), a("div", {
|
|
142
142
|
key: 1,
|
|
143
|
-
class:
|
|
143
|
+
class: s(["list-field-row list-field-row--block flex flex-col gap-y-1 px-3 py-2.5 transition-colors w-full", [
|
|
144
144
|
e.showBorderBottom && !e.isLast ? "border-b border-border" : "",
|
|
145
|
-
|
|
145
|
+
B.value ? "bg-muted/40" : "",
|
|
146
146
|
e.variant === "compact" ? "py-1.5!" : "",
|
|
147
147
|
e.variant === "minimal" ? "px-0!" : ""
|
|
148
148
|
]]),
|
|
@@ -153,8 +153,8 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
|
|
|
153
153
|
key: 0,
|
|
154
154
|
icon: e.field.icon,
|
|
155
155
|
class: "w-3.5 h-3.5 text-gray-800 shrink-0"
|
|
156
|
-
}, null, 8, ["icon"])) :
|
|
157
|
-
c("span", K,
|
|
156
|
+
}, null, 8, ["icon"])) : x("", !0),
|
|
157
|
+
c("span", K, b(y.value) + b(e.showColon ? ":" : ""), 1)
|
|
158
158
|
]),
|
|
159
159
|
c("div", P, [
|
|
160
160
|
n.$slots[e.field.key] ? w(n.$slots, e.field.key, {
|
|
@@ -167,29 +167,29 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
|
|
|
167
167
|
data: e.data,
|
|
168
168
|
value: o.value
|
|
169
169
|
}, null, 8, ["data", "value"])) : e.field.isSensitive ? (t(), a("div", Q, [
|
|
170
|
-
|
|
170
|
+
i.value ? (t(), a(m, { key: 0 }, [
|
|
171
171
|
e.field.type === "price" ? (t(), f(k, {
|
|
172
172
|
key: 0,
|
|
173
173
|
value: o.value,
|
|
174
|
-
class:
|
|
174
|
+
class: s(["text-sm text-gray-600 wrap-break-word leading-snug", d.value])
|
|
175
175
|
}, null, 8, ["value", "class"])) : (t(), a("span", {
|
|
176
176
|
key: 1,
|
|
177
|
-
class:
|
|
177
|
+
class: s(["text-sm text-gray-600 wrap-break-word leading-snug", d.value]),
|
|
178
178
|
innerHTML: r.value
|
|
179
179
|
}, null, 10, U))
|
|
180
180
|
], 64)) : (t(), a("span", W, " •••••••• ")),
|
|
181
181
|
c("button", {
|
|
182
182
|
type: "button",
|
|
183
183
|
class: "shrink-0 p-1 rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary/50",
|
|
184
|
-
"aria-label":
|
|
185
|
-
onClick: u[1] || (u[1] = (
|
|
184
|
+
"aria-label": i.value ? "Hide value" : "Show value",
|
|
185
|
+
onClick: u[1] || (u[1] = (T) => i.value = !i.value)
|
|
186
186
|
}, [
|
|
187
|
-
|
|
188
|
-
icon:
|
|
187
|
+
p(g, {
|
|
188
|
+
icon: i.value ? "lucide:eye-off" : "lucide:eye",
|
|
189
189
|
class: "w-3.5 h-3.5"
|
|
190
190
|
}, null, 8, ["icon"])
|
|
191
191
|
], 8, X)
|
|
192
|
-
])) :
|
|
192
|
+
])) : h.value ? (t(), a("img", {
|
|
193
193
|
key: 3,
|
|
194
194
|
src: r.value,
|
|
195
195
|
alt: y.value,
|
|
@@ -198,19 +198,19 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
|
|
|
198
198
|
e.field.type === "price" ? (t(), f(k, {
|
|
199
199
|
key: 0,
|
|
200
200
|
value: o.value,
|
|
201
|
-
class:
|
|
201
|
+
class: s(["text-sm text-gray-900 wrap-break-word leading-snug", d.value])
|
|
202
202
|
}, null, 8, ["value", "class"])) : (t(), a("span", {
|
|
203
203
|
key: 1,
|
|
204
|
-
class:
|
|
204
|
+
class: s(["text-sm text-gray-900 wrap-break-word leading-snug", d.value]),
|
|
205
205
|
innerHTML: r.value
|
|
206
206
|
}, null, 10, _))
|
|
207
207
|
], 64))
|
|
208
208
|
])
|
|
209
209
|
], 2)) : (t(), a("div", {
|
|
210
210
|
key: 2,
|
|
211
|
-
class:
|
|
211
|
+
class: s(["list-field-row flex justify-between gap-3 px-3 py-2.5 transition-colors", [
|
|
212
212
|
e.showBorderBottom && !e.isLast ? "border-b border-border" : "",
|
|
213
|
-
|
|
213
|
+
B.value ? "bg-muted/40" : "",
|
|
214
214
|
e.variant === "compact" ? "py-1.5!" : "",
|
|
215
215
|
e.variant === "minimal" ? "px-0!" : ""
|
|
216
216
|
]]),
|
|
@@ -221,8 +221,8 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
|
|
|
221
221
|
key: 0,
|
|
222
222
|
icon: e.field.icon,
|
|
223
223
|
class: "w-3.5 h-3.5 text-gray-800 shrink-0"
|
|
224
|
-
}, null, 8, ["icon"])) :
|
|
225
|
-
c("span", te,
|
|
224
|
+
}, null, 8, ["icon"])) : x("", !0),
|
|
225
|
+
c("span", te, b(y.value) + b(e.showColon ? ":" : ""), 1)
|
|
226
226
|
]),
|
|
227
227
|
c("div", le, [
|
|
228
228
|
n.$slots[e.field.key] ? w(n.$slots, e.field.key, {
|
|
@@ -235,41 +235,41 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
|
|
|
235
235
|
data: e.data,
|
|
236
236
|
value: o.value
|
|
237
237
|
}, null, 8, ["data", "value"])) : e.field.isSensitive ? (t(), a(m, { key: 2 }, [
|
|
238
|
-
|
|
238
|
+
i.value ? (t(), a(m, { key: 0 }, [
|
|
239
239
|
e.field.type === "price" ? (t(), f(k, {
|
|
240
240
|
key: 0,
|
|
241
241
|
value: o.value,
|
|
242
|
-
class:
|
|
242
|
+
class: s(["text-sm text-gray-600 text-right wrap-break-word", d.value])
|
|
243
243
|
}, null, 8, ["value", "class"])) : (t(), a("span", {
|
|
244
244
|
key: 1,
|
|
245
|
-
class:
|
|
245
|
+
class: s(["text-sm text-gray-600 text-right wrap-break-word", d.value]),
|
|
246
246
|
innerHTML: r.value
|
|
247
247
|
}, null, 10, ae))
|
|
248
248
|
], 64)) : (t(), a("span", ne, " •••••••• ")),
|
|
249
249
|
c("button", {
|
|
250
250
|
type: "button",
|
|
251
251
|
class: "shrink-0 p-1 rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary/50",
|
|
252
|
-
"aria-label":
|
|
253
|
-
onClick: u[2] || (u[2] = (
|
|
252
|
+
"aria-label": i.value ? "Hide value" : "Show value",
|
|
253
|
+
onClick: u[2] || (u[2] = (T) => i.value = !i.value)
|
|
254
254
|
}, [
|
|
255
|
-
|
|
256
|
-
icon:
|
|
255
|
+
p(g, {
|
|
256
|
+
icon: i.value ? "lucide:eye-off" : "lucide:eye",
|
|
257
257
|
class: "w-3.5 h-3.5"
|
|
258
258
|
}, null, 8, ["icon"])
|
|
259
|
-
], 8,
|
|
260
|
-
], 64)) :
|
|
259
|
+
], 8, ie)
|
|
260
|
+
], 64)) : h.value ? (t(), a("img", {
|
|
261
261
|
key: 3,
|
|
262
262
|
src: r.value,
|
|
263
263
|
alt: y.value,
|
|
264
264
|
class: "w-8 h-8 rounded-full object-cover border border-border"
|
|
265
|
-
}, null, 8,
|
|
265
|
+
}, null, 8, se)) : (t(), a(m, { key: 4 }, [
|
|
266
266
|
e.field.type === "price" ? (t(), f(k, {
|
|
267
267
|
key: 0,
|
|
268
268
|
value: o.value,
|
|
269
|
-
class:
|
|
269
|
+
class: s(["text-sm text-gray-900 text-right wrap-break-word leading-snug", d.value])
|
|
270
270
|
}, null, 8, ["value", "class"])) : (t(), a("span", {
|
|
271
271
|
key: 1,
|
|
272
|
-
class:
|
|
272
|
+
class: s(["text-sm text-gray-900 text-right wrap-break-word leading-snug", d.value]),
|
|
273
273
|
innerHTML: r.value
|
|
274
274
|
}, null, 10, oe))
|
|
275
275
|
], 64))
|
|
@@ -16,8 +16,8 @@ declare function __VLS_template(): {
|
|
|
16
16
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
17
|
declare const __VLS_component: import('vue').DefineComponent<MasonryProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MasonryProps> & Readonly<{}>, {
|
|
18
18
|
tag: string;
|
|
19
|
-
itemKey: string;
|
|
20
19
|
gap: number;
|
|
20
|
+
itemKey: string;
|
|
21
21
|
cols: number | Record<string | number, number>;
|
|
22
22
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
23
23
|
containerRef: unknown;
|
package/components/Modal.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Modal.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-350b61e5"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
package/components/Modal.vue2.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as P, ref as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as P, ref as f, inject as R, computed as h, markRaw as V, watch as T, provide as W, nextTick as K, onMounted as L, onUnmounted as A, openBlock as s, createElementBlock as d, Fragment as U, mergeProps as B, withModifiers as S, renderSlot as v, createCommentVNode as n, createBlock as I, Teleport as q, normalizeClass as i, createElementVNode as b, toDisplayString as z, createVNode as G, resolveDynamicComponent as H } from "vue";
|
|
2
|
+
import J from "./Button.vue.js";
|
|
3
3
|
import { useKeyStroke as Q } from "../composables/useKeyStroke.js";
|
|
4
|
-
import { $t as
|
|
5
|
-
const X = {
|
|
4
|
+
import { $t as F } from "../utils/i18n.js";
|
|
5
|
+
const X = ["data-testid"], Y = ["data-testid"], Z = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "flex-none flex flex-col space-y-1.5 pb-0 border-b border-border/90"
|
|
8
|
-
},
|
|
8
|
+
}, _ = { class: "text-lg font-semibold leading-none tracking-tight" }, ee = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "text-sm text-muted-foreground mb-3.5"
|
|
11
|
-
},
|
|
11
|
+
}, ae = /* @__PURE__ */ P({
|
|
12
12
|
inheritAttrs: !1,
|
|
13
13
|
__name: "Modal",
|
|
14
14
|
props: {
|
|
@@ -28,107 +28,113 @@ const X = {
|
|
|
28
28
|
bodyProps: {}
|
|
29
29
|
},
|
|
30
30
|
emits: ["close", "update:show", "onOpen"],
|
|
31
|
-
setup(t, { emit:
|
|
32
|
-
const o = t,
|
|
33
|
-
let
|
|
34
|
-
const y =
|
|
31
|
+
setup(t, { emit: O }) {
|
|
32
|
+
const o = t, u = O, l = f(o.show), k = f(!1), g = f(!1), C = f(null);
|
|
33
|
+
let c = null;
|
|
34
|
+
const y = f(!1), a = R("dropdown-context", null), w = h(() => o.body ? V(o.body) : void 0);
|
|
35
35
|
T(
|
|
36
36
|
() => o.show,
|
|
37
37
|
(e) => {
|
|
38
|
-
l.value = e, e && (
|
|
38
|
+
l.value = e, e && (u("onOpen"), a?.close());
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
|
-
const
|
|
42
|
-
l.value = !0,
|
|
41
|
+
const j = () => {
|
|
42
|
+
l.value = !0, a?.close();
|
|
43
43
|
}, D = (e) => {
|
|
44
|
-
|
|
44
|
+
k.value = e;
|
|
45
45
|
}, E = (e) => {
|
|
46
46
|
y.value = e;
|
|
47
|
-
},
|
|
48
|
-
if (
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
}, m = () => {
|
|
48
|
+
if (k.value) {
|
|
49
|
+
g.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
50
|
+
g.value = !1;
|
|
51
51
|
}, 1e3);
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
|
-
l.value = !1,
|
|
54
|
+
l.value = !1, u("update:show", !1), u("close");
|
|
55
55
|
}, p = () => {
|
|
56
|
-
l.value = !1,
|
|
56
|
+
l.value = !1, u("update:show", !1), u("close");
|
|
57
57
|
};
|
|
58
|
-
W("modal-context", { close:
|
|
58
|
+
W("modal-context", { close: m, setSubmitting: D, registerFormFooter: E });
|
|
59
59
|
const M = () => {
|
|
60
|
-
o.closeOutside &&
|
|
60
|
+
o.closeOutside && m();
|
|
61
61
|
}, { onKeyStroke: N } = Q();
|
|
62
|
-
N("Escape",
|
|
63
|
-
e ? (
|
|
62
|
+
N("Escape", m), T(l, async (e) => {
|
|
63
|
+
e ? (a?.onChildToggle?.(!0), document.body.style.overflow = "hidden", await K(), C.value?.focus()) : (document.body.style.overflow = "", a?.onChildToggle?.(!1), y.value = !1);
|
|
64
|
+
}), L(() => {
|
|
65
|
+
l.value && a?.onChildToggle?.(!0);
|
|
64
66
|
}), A(() => {
|
|
65
|
-
l.value &&
|
|
66
|
-
}), U(() => {
|
|
67
|
-
l.value && n?.onChildToggle?.(!1), document.body.style.overflow = "", u && clearTimeout(u);
|
|
67
|
+
l.value && a?.onChildToggle?.(!1), document.body.style.overflow = "", c && clearTimeout(c);
|
|
68
68
|
});
|
|
69
|
-
const
|
|
70
|
-
() => o.descriptionI18n ?
|
|
69
|
+
const r = h(() => o.titleI18n ? F(o.titleI18n) : o.title), x = h(
|
|
70
|
+
() => o.descriptionI18n ? F(o.descriptionI18n) : o.description
|
|
71
71
|
);
|
|
72
|
-
return (e, $) => (s(),
|
|
73
|
-
e.$slots?.trigger || e.$slots?.default ? (s(),
|
|
72
|
+
return (e, $) => (s(), d(U, null, [
|
|
73
|
+
e.$slots?.trigger || e.$slots?.default ? (s(), d("span", B({
|
|
74
74
|
key: 0,
|
|
75
|
-
onClick:
|
|
75
|
+
onClick: S(j, ["stop"]),
|
|
76
76
|
class: `${t.triggerClass}`
|
|
77
|
-
}, e.$attrs
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
}, e.$attrs, {
|
|
78
|
+
"data-testid": e.$attrs["data-testid"] ? `${e.$attrs["data-testid"]}-trigger` : r.value ? `modal-trigger-${r.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "modal-trigger"
|
|
79
|
+
}), [
|
|
80
|
+
v(e.$slots, "trigger", {}, () => [
|
|
81
|
+
t.body ? v(e.$slots, "default", { key: 0 }, void 0, !0) : n("", !0)
|
|
80
82
|
], !0)
|
|
81
|
-
], 16)) :
|
|
82
|
-
(s(),
|
|
83
|
-
l.value ? (s(),
|
|
83
|
+
], 16, X)) : n("", !0),
|
|
84
|
+
(s(), I(q, { to: "body" }, [
|
|
85
|
+
l.value ? (s(), d("div", {
|
|
84
86
|
key: 0,
|
|
85
87
|
class: i(["fixed inset-0 z-50 flex items-center justify-center p-4 v-modal-overlay", t.backdrop ? "v-modal-backdrop" : ""]),
|
|
86
88
|
onClick: M
|
|
87
89
|
}, [
|
|
88
90
|
b("div", {
|
|
89
91
|
ref_key: "modalRef",
|
|
90
|
-
ref:
|
|
92
|
+
ref: C,
|
|
91
93
|
tabindex: "-1",
|
|
94
|
+
role: "dialog",
|
|
95
|
+
"aria-modal": "true",
|
|
92
96
|
class: i(["modal-body relative w-full rounded border border-border/60 bg-body shadow-lg text-foreground flex flex-col max-h-[85vh] sm:max-h-[90vh] focus:outline-none", [t.maxWidth]]),
|
|
93
|
-
|
|
97
|
+
"data-testid": e.$attrs["data-testid"] || (r.value ? `modal-${r.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "modal"),
|
|
98
|
+
onClick: $[0] || ($[0] = S(() => {
|
|
94
99
|
}, ["stop"]))
|
|
95
100
|
}, [
|
|
96
|
-
|
|
101
|
+
r.value ? (s(), d("div", Z, [
|
|
97
102
|
b("div", {
|
|
98
103
|
class: i(["flex items-center justify-between py-2 px-4 rounded-t-md", t.headerClass])
|
|
99
104
|
}, [
|
|
100
|
-
b("h3",
|
|
101
|
-
|
|
105
|
+
b("h3", _, z(r.value), 1),
|
|
106
|
+
G(J, {
|
|
102
107
|
rounded: "full",
|
|
103
108
|
size: "sm",
|
|
104
109
|
icon: "lucide:x",
|
|
105
110
|
variant: "ghost",
|
|
106
|
-
class: i(["hover:bg-gray-250/25!", { "blink-bg":
|
|
107
|
-
|
|
111
|
+
class: i(["hover:bg-gray-250/25!", { "blink-bg": g.value }]),
|
|
112
|
+
"data-testid": "modal-close-btn",
|
|
113
|
+
onClick: m
|
|
108
114
|
}, null, 8, ["class"])
|
|
109
115
|
], 2)
|
|
110
|
-
])) :
|
|
116
|
+
])) : n("", !0),
|
|
111
117
|
b("div", {
|
|
112
118
|
class: i(["flex-1 overflow-y-auto px-4 pt-4 min-h-0 scrollbar-thin scrollbar-stable", [y.value ? "pb-0" : "pb-3.5", t.bodyClass]])
|
|
113
119
|
}, [
|
|
114
|
-
|
|
115
|
-
|
|
120
|
+
x.value ? (s(), d("p", ee, z(x.value), 1)) : n("", !0),
|
|
121
|
+
w.value ? (s(), I(H(w.value), B({ key: 1 }, { ...t.bodyProps, ...e.$attrs }, { close: p }), null, 16)) : v(e.$slots, "default", {
|
|
116
122
|
key: 2,
|
|
117
123
|
close: p
|
|
118
124
|
}, void 0, !0)
|
|
119
125
|
], 2),
|
|
120
|
-
e.$slots.footer ? (s(),
|
|
126
|
+
e.$slots.footer ? (s(), d("div", {
|
|
121
127
|
key: 1,
|
|
122
128
|
class: i([t.footerClass, "flex-none flex items-center px-4 py-3 border-t border-border/75 rounded-b-xl bg-body"])
|
|
123
129
|
}, [
|
|
124
|
-
|
|
125
|
-
], 2)) :
|
|
126
|
-
],
|
|
127
|
-
], 2)) :
|
|
130
|
+
v(e.$slots, "footer", { close: p }, void 0, !0)
|
|
131
|
+
], 2)) : n("", !0)
|
|
132
|
+
], 10, Y)
|
|
133
|
+
], 2)) : n("", !0)
|
|
128
134
|
]))
|
|
129
135
|
], 64));
|
|
130
136
|
}
|
|
131
137
|
});
|
|
132
138
|
export {
|
|
133
|
-
|
|
139
|
+
ae as default
|
|
134
140
|
};
|
|
@@ -33,8 +33,8 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
33
33
|
variant: "default" | "outline" | "solid" | "floating" | string;
|
|
34
34
|
size: "sm" | "md" | "lg";
|
|
35
35
|
rounded: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full" | string;
|
|
36
|
-
disabled: boolean;
|
|
37
36
|
loading: boolean;
|
|
37
|
+
disabled: boolean;
|
|
38
38
|
modelValue: any[];
|
|
39
39
|
options: (IDropdownOption | string | number)[];
|
|
40
40
|
layout: "default" | "grouped";
|