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,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as P, ref as k, computed as s, watch as M, openBlock as r, createBlock as m, unref as h, withCtx as p, createCommentVNode as f, createElementVNode as g, withKeys as I, withModifiers as y, normalizeClass as c, createElementBlock as v, toDisplayString as S, Fragment as T, renderList as R, createVNode as L, createTextVNode as U } from "vue";
|
|
2
|
-
import
|
|
2
|
+
import $ from "../Icon.vue.js";
|
|
3
3
|
import q from "../Dropdown/Dropdown.vue.js";
|
|
4
4
|
import G from "../Dropdown/DropdownMenu.vue.js";
|
|
5
|
-
import { $t as
|
|
5
|
+
import { $t as C } from "../../utils/i18n.js";
|
|
6
6
|
import N from "../Badge.vue.js";
|
|
7
7
|
import { useMultiSelectHydration as J } from "./composables/useMultiSelectHydration.js";
|
|
8
|
-
const Q = ["tabindex"], W = {
|
|
8
|
+
const Q = ["tabindex", "data-testid"], W = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "text-muted-foreground pl-0.5 truncate"
|
|
11
11
|
}, X = { class: "truncate min-w-0" }, Y = ["onClick"], Z = {
|
|
@@ -35,64 +35,64 @@ const Q = ["tabindex"], W = {
|
|
|
35
35
|
},
|
|
36
36
|
emits: ["update:modelValue", "change", "load-more", "search"],
|
|
37
37
|
setup(l, { emit: j }) {
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
if (
|
|
41
|
-
const
|
|
42
|
-
return
|
|
43
|
-
}), x = s(() =>
|
|
38
|
+
const t = l, i = j, o = k(!1), D = s(() => {
|
|
39
|
+
if (t.placeholderI18n) return C(t.placeholderI18n);
|
|
40
|
+
if (t.placeholder) return t.placeholder;
|
|
41
|
+
const e = C("vlite.multiSelect.placeholder");
|
|
42
|
+
return e !== "vlite.multiSelect.placeholder" ? e : "Select items...";
|
|
43
|
+
}), x = s(() => t.options ? t.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), B = k(!1), w = k(!1);
|
|
44
44
|
M(
|
|
45
45
|
x,
|
|
46
|
-
(
|
|
47
|
-
!B.value &&
|
|
48
|
-
w.value = !0, d.hydrateSelected(
|
|
46
|
+
(e) => {
|
|
47
|
+
!B.value && e.length > 0 && (B.value = !0, setTimeout(() => {
|
|
48
|
+
w.value = !0, d.hydrateSelected(t.modelValue || []);
|
|
49
49
|
}, 10));
|
|
50
50
|
},
|
|
51
51
|
{ immediate: !0 }
|
|
52
52
|
);
|
|
53
53
|
const V = s(() => {
|
|
54
|
-
const
|
|
54
|
+
const e = [...x.value], a = new Set(e.map((n) => n.value ?? n.label));
|
|
55
55
|
return d.selectedBuffer.value.forEach((n, u) => {
|
|
56
|
-
a.has(u) || (
|
|
57
|
-
}),
|
|
56
|
+
a.has(u) || (e.unshift(n), a.add(u));
|
|
57
|
+
}), e;
|
|
58
58
|
}), d = J({
|
|
59
|
-
fetchSelected:
|
|
60
|
-
getValues: () =>
|
|
59
|
+
fetchSelected: t.fetchSelected,
|
|
60
|
+
getValues: () => t.modelValue || [],
|
|
61
61
|
getOptions: () => V.value,
|
|
62
62
|
isInitialLoadDone: () => w.value
|
|
63
63
|
});
|
|
64
64
|
M(
|
|
65
|
-
() =>
|
|
66
|
-
(
|
|
67
|
-
w.value && d.hydrateSelected(
|
|
65
|
+
() => t.modelValue,
|
|
66
|
+
(e) => {
|
|
67
|
+
w.value && d.hydrateSelected(e || []);
|
|
68
68
|
},
|
|
69
69
|
{ deep: !0 }
|
|
70
70
|
);
|
|
71
|
-
const b = s(() => V.value.filter((
|
|
72
|
-
const a =
|
|
73
|
-
return
|
|
74
|
-
})), E = s(() => b.value.slice(0,
|
|
75
|
-
if (
|
|
76
|
-
const a =
|
|
77
|
-
d.selectedBuffer.value.has(a) || d.selectedBuffer.value.set(a,
|
|
78
|
-
const n = [...
|
|
71
|
+
const b = s(() => V.value.filter((e) => {
|
|
72
|
+
const a = e.value ?? e.label;
|
|
73
|
+
return t.modelValue.includes(a);
|
|
74
|
+
})), E = s(() => b.value.slice(0, t.maxVisible)), O = s(() => b.value.length - t.maxVisible), H = (e) => {
|
|
75
|
+
if (t.disabled) return;
|
|
76
|
+
const a = e.value ?? e.label;
|
|
77
|
+
d.selectedBuffer.value.has(a) || d.selectedBuffer.value.set(a, e);
|
|
78
|
+
const n = [...t.modelValue], u = n.indexOf(a);
|
|
79
79
|
u === -1 ? n.push(a) : n.splice(u, 1), i("update:modelValue", n), i("change", n);
|
|
80
|
-
}, K = (
|
|
81
|
-
if (
|
|
82
|
-
const a =
|
|
80
|
+
}, K = (e) => {
|
|
81
|
+
if (t.disabled) return;
|
|
82
|
+
const a = t.modelValue.filter((n) => n !== e);
|
|
83
83
|
i("update:modelValue", a), i("change", a);
|
|
84
84
|
}, A = () => {
|
|
85
|
-
|
|
85
|
+
t.disabled || (i("update:modelValue", []), i("change", []));
|
|
86
86
|
}, F = s(() => {
|
|
87
|
-
const
|
|
87
|
+
const e = t.rounded === "none" ? "rounded-none" : `rounded-${t.rounded}`, a = t.variant === "transparent" ? "px-2 py-0" : "px-3 py-1.5", n = t.variant === "transparent" ? "h-full min-h-[40px]" : "min-h-[40px]";
|
|
88
88
|
return [
|
|
89
|
-
`flex items-center justify-between w-full ${a} ${n} ${
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
o.value &&
|
|
89
|
+
`flex items-center justify-between w-full ${a} ${n} ${e} border text-sm transition-colors cursor-pointer outline-none`,
|
|
90
|
+
t.disabled ? "opacity-50 cursor-not-allowed bg-muted" : t.variant === "floating" || t.variant === "transparent" ? "bg-transparent text-foreground" : "bg-background hover:bg-gray-50/70",
|
|
91
|
+
t.variant === "outline" || t.variant === "floating" ? "border-input focus-visible:ring-1 focus-visible:ring-primary" : t.variant === "transparent" ? "border-transparent" : "border-transparent bg-muted",
|
|
92
|
+
o.value && t.variant !== "transparent" ? "border-primary/20 ring-1 ring-primary/20" : ""
|
|
93
93
|
].join(" ");
|
|
94
|
-
}), z = s(() =>
|
|
95
|
-
return (
|
|
94
|
+
}), z = s(() => t.size === "sm" ? "xs" : "sm");
|
|
95
|
+
return (e, a) => (r(), m(h(q), {
|
|
96
96
|
isOpen: o.value,
|
|
97
97
|
"onUpdate:isOpen": a[5] || (a[5] = (n) => o.value = n),
|
|
98
98
|
"close-on-select": !1,
|
|
@@ -106,7 +106,8 @@ const Q = ["tabindex"], W = {
|
|
|
106
106
|
onKeydown: [
|
|
107
107
|
a[0] || (a[0] = I(y((n) => !l.disabled && (o.value = !o.value), ["prevent"]), ["enter"])),
|
|
108
108
|
a[1] || (a[1] = I(y((n) => !l.disabled && (o.value = !o.value), ["prevent"]), ["space"]))
|
|
109
|
-
]
|
|
109
|
+
],
|
|
110
|
+
"data-testid": e.$attrs["data-testid"] || (e.$attrs.name ? `multiselect-${e.$attrs.name}` : "multiselect")
|
|
110
111
|
}, [
|
|
111
112
|
g("div", {
|
|
112
113
|
class: c(["flex gap-1.5 items-center flex-1 min-w-0", [l.wrap ? "flex-wrap py-0.5" : "flex-nowrap overflow-hidden py-1"]])
|
|
@@ -123,7 +124,7 @@ const Q = ["tabindex"], W = {
|
|
|
123
124
|
]])
|
|
124
125
|
}, {
|
|
125
126
|
default: p(() => [
|
|
126
|
-
g("span", X, S(n.labelI18n ? h(
|
|
127
|
+
g("span", X, S(n.labelI18n ? h(C)(n.labelI18n) : n.label), 1),
|
|
127
128
|
l.disabled ? f("", !0) : (r(), v("button", {
|
|
128
129
|
key: 0,
|
|
129
130
|
type: "button",
|
|
@@ -133,7 +134,7 @@ const Q = ["tabindex"], W = {
|
|
|
133
134
|
l.variant === "transparent" ? "text-muted-foreground hover:bg-black/10 hover:text-foreground" : "hover:bg-destructive/10 hover:text-destructive p-0.5 rounded-full"
|
|
134
135
|
])
|
|
135
136
|
}, [
|
|
136
|
-
L(
|
|
137
|
+
L($, {
|
|
137
138
|
icon: "lucide:x",
|
|
138
139
|
class: "w-3 h-3"
|
|
139
140
|
})
|
|
@@ -159,14 +160,14 @@ const Q = ["tabindex"], W = {
|
|
|
159
160
|
], 64))
|
|
160
161
|
], 2),
|
|
161
162
|
l.showControls ? (r(), v("div", Z, [
|
|
162
|
-
b.value.length > 0 && !l.disabled ? (r(), m(
|
|
163
|
+
b.value.length > 0 && !l.disabled ? (r(), m($, {
|
|
163
164
|
key: 0,
|
|
164
165
|
icon: "lucide:x",
|
|
165
166
|
class: "w-4 h-4 hover:text-foreground transition-colors",
|
|
166
167
|
onClick: y(A, ["stop"])
|
|
167
168
|
})) : f("", !0),
|
|
168
169
|
a[6] || (a[6] = g("div", { class: "w-px h-4 bg-border mx-0.5" }, null, -1)),
|
|
169
|
-
L(
|
|
170
|
+
L($, {
|
|
170
171
|
icon: "lucide:chevron-down",
|
|
171
172
|
class: c(["w-4 h-4 transition-transform duration-200", { "rotate-180": o.value }])
|
|
172
173
|
}, null, 8, ["class"])
|
|
@@ -188,8 +189,8 @@ const Q = ["tabindex"], W = {
|
|
|
188
189
|
layout: l.layout,
|
|
189
190
|
onSelect: H,
|
|
190
191
|
onClose: a[2] || (a[2] = (n) => o.value = !1),
|
|
191
|
-
onLoadMore: a[3] || (a[3] = (n) =>
|
|
192
|
-
onSearch: a[4] || (a[4] = (n) =>
|
|
192
|
+
onLoadMore: a[3] || (a[3] = (n) => e.$emit("load-more")),
|
|
193
|
+
onSearch: a[4] || (a[4] = (n) => e.$emit("search", n))
|
|
193
194
|
}, null, 8, ["options", "cachedOptions", "selected", "loading", "hasMore", "searchable", "remote", "debounceTime", "layout"]))
|
|
194
195
|
]),
|
|
195
196
|
_: 1
|
|
@@ -19,6 +19,7 @@ export declare function useMultiSelectHydration(opts: UseMultiSelectHydrationOpt
|
|
|
19
19
|
description?: string;
|
|
20
20
|
descriptionI18n?: string;
|
|
21
21
|
icon?: string;
|
|
22
|
+
badge?: string;
|
|
22
23
|
emoji?: string;
|
|
23
24
|
disabled?: {
|
|
24
25
|
valueOf: () => boolean;
|
|
@@ -59,6 +60,7 @@ export declare function useMultiSelectHydration(opts: UseMultiSelectHydrationOpt
|
|
|
59
60
|
description?: string;
|
|
60
61
|
descriptionI18n?: string;
|
|
61
62
|
icon?: string;
|
|
63
|
+
badge?: string;
|
|
62
64
|
emoji?: string;
|
|
63
65
|
disabled?: {
|
|
64
66
|
valueOf: () => boolean;
|
|
@@ -27,9 +27,9 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
27
27
|
}>, {
|
|
28
28
|
class: string;
|
|
29
29
|
variant: "default" | "pill" | "underline" | "ghost";
|
|
30
|
+
orientation: "horizontal" | "vertical";
|
|
30
31
|
disabled: boolean;
|
|
31
32
|
active: boolean;
|
|
32
|
-
orientation: "horizontal" | "vertical";
|
|
33
33
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
34
34
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
35
35
|
export default _default;
|
|
@@ -15,13 +15,13 @@ export interface NumberInputProps {
|
|
|
15
15
|
}
|
|
16
16
|
declare const _default: import('vue').DefineComponent<NumberInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
17
17
|
blur: (event: FocusEvent) => any;
|
|
18
|
-
change: (value: number) => any;
|
|
19
18
|
focus: (event: FocusEvent) => any;
|
|
19
|
+
change: (value: number) => any;
|
|
20
20
|
"update:modelValue": (value: number) => any;
|
|
21
21
|
}, string, import('vue').PublicProps, Readonly<NumberInputProps> & Readonly<{
|
|
22
22
|
onBlur?: (event: FocusEvent) => any;
|
|
23
|
-
onChange?: (value: number) => any;
|
|
24
23
|
onFocus?: (event: FocusEvent) => any;
|
|
24
|
+
onChange?: (value: number) => any;
|
|
25
25
|
"onUpdate:modelValue"?: (value: number) => any;
|
|
26
26
|
}>, {
|
|
27
27
|
mode: "solid" | "outline" | "ghost";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./NumberInput.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dc6c26b4"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as E, ref as k, watch as q, computed as
|
|
2
|
-
import
|
|
3
|
-
const M = ["disabled"], U = ["value", "min", "max", "step", "placeholder", "disabled", "readonly", "onKeydown"],
|
|
1
|
+
import { defineComponent as E, ref as k, watch as q, computed as u, onBeforeUnmount as L, openBlock as v, createElementBlock as y, normalizeClass as i, withModifiers as r, createVNode as h, createCommentVNode as P, createElementVNode as g, withKeys as z } from "vue";
|
|
2
|
+
import w from "./Icon.vue.js";
|
|
3
|
+
const M = ["disabled", "data-testid"], U = ["value", "min", "max", "step", "placeholder", "disabled", "readonly", "onKeydown", "data-testid"], A = ["disabled", "data-testid"], D = {
|
|
4
4
|
key: 2,
|
|
5
5
|
class: "flex flex-col justify-center h-full py-[3px] pr-[3px]"
|
|
6
|
-
},
|
|
6
|
+
}, G = { class: "flex flex-col h-full w-6 scale-80" }, H = ["disabled", "data-testid"], J = ["disabled", "data-testid"], W = /* @__PURE__ */ E({
|
|
7
7
|
__name: "NumberInput",
|
|
8
8
|
props: {
|
|
9
9
|
modelValue: { default: void 0 },
|
|
@@ -21,24 +21,24 @@ const M = ["disabled"], U = ["value", "min", "max", "step", "placeholder", "disa
|
|
|
21
21
|
rounded: { default: "md" }
|
|
22
22
|
},
|
|
23
23
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
24
|
-
setup(
|
|
25
|
-
const n =
|
|
24
|
+
setup(e, { emit: V }) {
|
|
25
|
+
const n = e, m = V, a = k(n.modelValue ?? "");
|
|
26
26
|
q(
|
|
27
27
|
() => n.modelValue,
|
|
28
|
-
(
|
|
29
|
-
|
|
28
|
+
(d) => {
|
|
29
|
+
d !== void 0 && (a.value = d);
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
|
-
const B = k(null), c =
|
|
33
|
-
const
|
|
32
|
+
const B = k(null), c = u(() => {
|
|
33
|
+
const d = {
|
|
34
34
|
xs: { h: "h-7", text: "text-xs", px: "px-2", icon: "w-3 h-3" },
|
|
35
35
|
sm: { h: "h-8", text: "text-xs", px: "px-2", icon: "w-3.5 h-3.5" },
|
|
36
36
|
md: { h: "h-9", text: "text-sm", px: "px-3", icon: "w-4 h-4" },
|
|
37
37
|
lg: { h: "h-10", text: "text-sm", px: "px-4", icon: "w-5 h-5" },
|
|
38
38
|
xl: { h: "h-12", text: "text-lg", px: "px-5", icon: "w-6 h-6" }
|
|
39
39
|
};
|
|
40
|
-
return
|
|
41
|
-
}), j =
|
|
40
|
+
return d[n.size] || d.md;
|
|
41
|
+
}), j = u(() => ({
|
|
42
42
|
none: "rounded-none",
|
|
43
43
|
sm: "rounded-sm",
|
|
44
44
|
md: "rounded-md",
|
|
@@ -46,7 +46,7 @@ const M = ["disabled"], U = ["value", "min", "max", "step", "placeholder", "disa
|
|
|
46
46
|
xl: "rounded-xl",
|
|
47
47
|
"2xl": "rounded-2xl",
|
|
48
48
|
full: "rounded-full"
|
|
49
|
-
})[n.rounded] || "rounded-md"), I =
|
|
49
|
+
})[n.rounded] || "rounded-md"), I = u(() => ({
|
|
50
50
|
none: "rounded-l-none",
|
|
51
51
|
sm: "rounded-l-sm",
|
|
52
52
|
md: "rounded-l-md",
|
|
@@ -54,7 +54,7 @@ const M = ["disabled"], U = ["value", "min", "max", "step", "placeholder", "disa
|
|
|
54
54
|
xl: "rounded-l-xl",
|
|
55
55
|
"2xl": "rounded-l-2xl",
|
|
56
56
|
full: "rounded-l-full"
|
|
57
|
-
})[n.rounded] || "rounded-l-md"), S =
|
|
57
|
+
})[n.rounded] || "rounded-l-md"), S = u(() => ({
|
|
58
58
|
none: "rounded-r-none",
|
|
59
59
|
sm: "rounded-r-sm",
|
|
60
60
|
md: "rounded-r-md",
|
|
@@ -62,7 +62,7 @@ const M = ["disabled"], U = ["value", "min", "max", "step", "placeholder", "disa
|
|
|
62
62
|
xl: "rounded-r-xl",
|
|
63
63
|
"2xl": "rounded-r-2xl",
|
|
64
64
|
full: "rounded-r-full"
|
|
65
|
-
})[n.rounded] || "rounded-r-md"), F =
|
|
65
|
+
})[n.rounded] || "rounded-r-md"), F = u(() => [
|
|
66
66
|
"flex items-center w-full relative transition-all duration-200",
|
|
67
67
|
n.disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
68
68
|
n.mode === "solid" ? "bg-muted" : "",
|
|
@@ -70,169 +70,174 @@ const M = ["disabled"], U = ["value", "min", "max", "step", "placeholder", "disa
|
|
|
70
70
|
n.mode === "ghost" ? "bg-transparent" : "",
|
|
71
71
|
c.value.h,
|
|
72
72
|
j.value
|
|
73
|
-
]), K =
|
|
73
|
+
]), K = u(() => [
|
|
74
74
|
"flex-1 w-full bg-transparent focus:outline-none appearance-none",
|
|
75
75
|
n.variant === "split" ? "text-center" : "text-left pl-3 pr-2",
|
|
76
76
|
"placeholder:text-muted-foreground/50",
|
|
77
77
|
c.value.text,
|
|
78
78
|
n.disabled ? "cursor-not-allowed" : ""
|
|
79
|
-
]), C =
|
|
80
|
-
const
|
|
79
|
+
]), C = u(() => {
|
|
80
|
+
const d = "flex items-center justify-center transition-colors active:scale-95 shrink-0 select-none", t = n.disabled ? "" : "hover:text-primary hover:bg-muted/50";
|
|
81
81
|
return n.size === "xs" || n.size, n.variant === "split" ? n.mode === "solid" ? [
|
|
82
|
-
|
|
82
|
+
d,
|
|
83
83
|
n.disabled ? "" : "hover:text-primary hover:bg-background/80",
|
|
84
84
|
"bg-background shadow-sm rounded-full mx-1 my-0.5 aspect-square self-center h-[calc(100%-12px)] w-auto max-w-[calc(100%-12px)] flex items-center justify-center"
|
|
85
|
-
] : [
|
|
86
|
-
}), s = (
|
|
85
|
+
] : [d, t, "h-full", "px-2"] : [d, t, "h-1/2 w-8 border-l border-input/50"];
|
|
86
|
+
}), s = (d) => {
|
|
87
87
|
if (n.disabled || n.readonly) return;
|
|
88
|
-
let
|
|
89
|
-
n.min !== void 0 &&
|
|
88
|
+
let t = d;
|
|
89
|
+
n.min !== void 0 && t < n.min && (t = n.min), n.max !== void 0 && t > n.max && (t = n.max), a.value = t, m("update:modelValue", t), m("change", t);
|
|
90
90
|
};
|
|
91
|
-
let
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
},
|
|
95
|
-
if (n.disabled || n.readonly || n.max !== void 0 && Number(
|
|
96
|
-
|
|
91
|
+
let b = null, x = null;
|
|
92
|
+
const l = () => {
|
|
93
|
+
b && clearTimeout(b), x && clearInterval(x), b = null, x = null;
|
|
94
|
+
}, $ = () => {
|
|
95
|
+
if (n.disabled || n.readonly || n.max !== void 0 && Number(a.value) >= n.max) {
|
|
96
|
+
l();
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
-
const
|
|
100
|
-
s(
|
|
99
|
+
const d = Number(a.value) || 0;
|
|
100
|
+
s(d + n.step);
|
|
101
101
|
}, N = () => {
|
|
102
|
-
if (n.disabled || n.readonly || n.min !== void 0 && Number(
|
|
103
|
-
|
|
102
|
+
if (n.disabled || n.readonly || n.min !== void 0 && Number(a.value) <= n.min) {
|
|
103
|
+
l();
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
const
|
|
107
|
-
s(
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
106
|
+
const d = Number(a.value) || 0;
|
|
107
|
+
s(d - n.step);
|
|
108
|
+
}, f = (d, t) => {
|
|
109
|
+
t.button !== 0 && t.pointerType === "mouse" || (l(), d === "inc" ? $() : N(), b = setTimeout(() => {
|
|
110
|
+
x = setInterval(() => {
|
|
111
|
+
d === "inc" ? $() : N();
|
|
112
112
|
}, 50);
|
|
113
113
|
}, 400));
|
|
114
|
-
}, R = (
|
|
115
|
-
const
|
|
116
|
-
if (isNaN(
|
|
117
|
-
|
|
114
|
+
}, R = (d) => {
|
|
115
|
+
const t = d.target, o = parseFloat(t.value);
|
|
116
|
+
if (isNaN(o)) {
|
|
117
|
+
a.value = t.value;
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
120
|
-
s(
|
|
121
|
-
}, T = (
|
|
122
|
-
m("blur",
|
|
123
|
-
const
|
|
124
|
-
isNaN(
|
|
120
|
+
s(o);
|
|
121
|
+
}, T = (d) => {
|
|
122
|
+
m("blur", d);
|
|
123
|
+
const t = parseFloat(String(a.value));
|
|
124
|
+
isNaN(t) ? s(n.min || 0) : s(t);
|
|
125
125
|
};
|
|
126
126
|
return L(() => {
|
|
127
|
-
|
|
128
|
-
}), (
|
|
129
|
-
class:
|
|
127
|
+
l();
|
|
128
|
+
}), (d, t) => (v(), y("div", {
|
|
129
|
+
class: i([F.value, "overflow-hidden"])
|
|
130
130
|
}, [
|
|
131
|
-
|
|
131
|
+
e.variant === "split" && !e.disabled && !e.readonly ? (v(), y("button", {
|
|
132
132
|
key: 0,
|
|
133
133
|
tabindex: "-1",
|
|
134
134
|
type: "button",
|
|
135
|
-
class:
|
|
135
|
+
class: i([
|
|
136
136
|
C.value,
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
e.mode === "outline" ? "border-r border-input" : "",
|
|
138
|
+
e.variant === "split" && e.mode !== "solid" ? I.value : ""
|
|
139
139
|
]),
|
|
140
|
-
disabled:
|
|
141
|
-
onPointerdown:
|
|
142
|
-
onPointerup:
|
|
143
|
-
onPointerleave:
|
|
144
|
-
onPointercancel:
|
|
145
|
-
onContextmenu:
|
|
146
|
-
}, ["prevent"]))
|
|
140
|
+
disabled: e.disabled || e.min !== void 0 && Number(a.value) <= e.min,
|
|
141
|
+
onPointerdown: t[0] || (t[0] = (o) => f("dec", o)),
|
|
142
|
+
onPointerup: l,
|
|
143
|
+
onPointerleave: l,
|
|
144
|
+
onPointercancel: l,
|
|
145
|
+
onContextmenu: t[1] || (t[1] = r(() => {
|
|
146
|
+
}, ["prevent"])),
|
|
147
|
+
"data-testid": d.$attrs["data-testid"] ? `${d.$attrs["data-testid"]}-dec` : e.name ? `number-${e.name}-dec` : e.id ? `number-${e.id}-dec` : "number-input-dec"
|
|
147
148
|
}, [
|
|
148
|
-
h(
|
|
149
|
+
h(w, {
|
|
149
150
|
icon: "lucide:minus",
|
|
150
|
-
class:
|
|
151
|
+
class: i(c.value.icon)
|
|
151
152
|
}, null, 8, ["class"])
|
|
152
153
|
], 42, M)) : P("", !0),
|
|
153
|
-
|
|
154
|
+
g("input", {
|
|
154
155
|
ref_key: "inputRef",
|
|
155
156
|
ref: B,
|
|
156
157
|
type: "number",
|
|
157
|
-
value:
|
|
158
|
-
min:
|
|
159
|
-
max:
|
|
160
|
-
step:
|
|
161
|
-
placeholder:
|
|
162
|
-
disabled:
|
|
163
|
-
readonly:
|
|
164
|
-
class:
|
|
158
|
+
value: a.value,
|
|
159
|
+
min: e.min,
|
|
160
|
+
max: e.max,
|
|
161
|
+
step: e.step,
|
|
162
|
+
placeholder: e.placeholder,
|
|
163
|
+
disabled: e.disabled,
|
|
164
|
+
readonly: e.readonly,
|
|
165
|
+
class: i(K.value),
|
|
165
166
|
onInput: R,
|
|
166
|
-
onFocus:
|
|
167
|
+
onFocus: t[2] || (t[2] = (o) => m("focus", o)),
|
|
167
168
|
onBlur: T,
|
|
168
169
|
onKeydown: [
|
|
169
|
-
z(
|
|
170
|
-
z(
|
|
171
|
-
]
|
|
170
|
+
z(r($, ["prevent"]), ["up"]),
|
|
171
|
+
z(r(N, ["prevent"]), ["down"])
|
|
172
|
+
],
|
|
173
|
+
"data-testid": d.$attrs["data-testid"] || (e.name ? `number-${e.name}` : e.id ? `number-${e.id}` : "number-input")
|
|
172
174
|
}, null, 42, U),
|
|
173
|
-
|
|
175
|
+
e.variant === "split" && !e.disabled && !e.readonly ? (v(), y("button", {
|
|
174
176
|
key: 1,
|
|
175
177
|
tabindex: "-1",
|
|
176
178
|
type: "button",
|
|
177
|
-
class:
|
|
179
|
+
class: i([
|
|
178
180
|
C.value,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
+
e.mode === "outline" ? "border-l border-input" : "",
|
|
182
|
+
e.variant === "split" && e.mode !== "solid" ? S.value : ""
|
|
181
183
|
]),
|
|
182
|
-
disabled:
|
|
183
|
-
onPointerdown:
|
|
184
|
-
onPointerup:
|
|
185
|
-
onPointerleave:
|
|
186
|
-
onPointercancel:
|
|
187
|
-
onContextmenu:
|
|
188
|
-
}, ["prevent"]))
|
|
184
|
+
disabled: e.disabled || e.max !== void 0 && Number(a.value) >= e.max,
|
|
185
|
+
onPointerdown: t[3] || (t[3] = (o) => f("inc", o)),
|
|
186
|
+
onPointerup: l,
|
|
187
|
+
onPointerleave: l,
|
|
188
|
+
onPointercancel: l,
|
|
189
|
+
onContextmenu: t[4] || (t[4] = r(() => {
|
|
190
|
+
}, ["prevent"])),
|
|
191
|
+
"data-testid": d.$attrs["data-testid"] ? `${d.$attrs["data-testid"]}-inc` : e.name ? `number-${e.name}-inc` : e.id ? `number-${e.id}-inc` : "number-input-inc"
|
|
189
192
|
}, [
|
|
190
|
-
h(
|
|
193
|
+
h(w, {
|
|
191
194
|
icon: "lucide:plus",
|
|
192
|
-
class:
|
|
195
|
+
class: i(c.value.icon)
|
|
193
196
|
}, null, 8, ["class"])
|
|
194
|
-
], 42,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
197
|
+
], 42, A)) : P("", !0),
|
|
198
|
+
e.variant === "stacked" && !e.disabled && !e.readonly ? (v(), y("div", D, [
|
|
199
|
+
g("div", G, [
|
|
200
|
+
g("button", {
|
|
198
201
|
tabindex: "-1",
|
|
199
202
|
type: "button",
|
|
200
203
|
class: "flex-1 flex items-center justify-center bg-gray-100 hover:bg-gray-200 text-muted-foreground hover:text-foreground rounded-t-[3px] border-b border-gray-300 transition-colors disabled:cursor-not-allowed",
|
|
201
|
-
disabled:
|
|
202
|
-
onPointerdown:
|
|
203
|
-
onPointerup:
|
|
204
|
-
onPointerleave:
|
|
205
|
-
onPointercancel:
|
|
206
|
-
onContextmenu:
|
|
207
|
-
}, ["prevent"]))
|
|
204
|
+
disabled: e.disabled || e.max !== void 0 && Number(a.value) >= e.max,
|
|
205
|
+
onPointerdown: t[5] || (t[5] = (o) => f("inc", o)),
|
|
206
|
+
onPointerup: l,
|
|
207
|
+
onPointerleave: l,
|
|
208
|
+
onPointercancel: l,
|
|
209
|
+
onContextmenu: t[6] || (t[6] = r(() => {
|
|
210
|
+
}, ["prevent"])),
|
|
211
|
+
"data-testid": d.$attrs["data-testid"] ? `${d.$attrs["data-testid"]}-inc` : e.name ? `number-${e.name}-inc` : e.id ? `number-${e.id}-inc` : "number-input-inc"
|
|
208
212
|
}, [
|
|
209
|
-
h(
|
|
210
|
-
class:
|
|
213
|
+
h(w, {
|
|
214
|
+
class: i(["text-gray-700/85!", e.size === "xs" || e.size === "sm" ? "w-3 h-3" : "w-3.5 h-3.5"]),
|
|
211
215
|
icon: "mynaui:chevron-up-solid"
|
|
212
216
|
}, null, 8, ["class"])
|
|
213
|
-
], 40,
|
|
214
|
-
|
|
217
|
+
], 40, H),
|
|
218
|
+
g("button", {
|
|
215
219
|
tabindex: "-1",
|
|
216
220
|
type: "button",
|
|
217
221
|
class: "flex-1 flex items-center justify-center bg-gray-100 hover:bg-gray-200 text-muted-foreground hover:text-foreground rounded-b-[3px] transition-colors disabled:cursor-not-allowed",
|
|
218
|
-
disabled:
|
|
219
|
-
onPointerdown:
|
|
220
|
-
onPointerup:
|
|
221
|
-
onPointerleave:
|
|
222
|
-
onPointercancel:
|
|
223
|
-
onContextmenu:
|
|
224
|
-
}, ["prevent"]))
|
|
222
|
+
disabled: e.disabled || e.min !== void 0 && Number(a.value) <= e.min,
|
|
223
|
+
onPointerdown: t[7] || (t[7] = (o) => f("dec", o)),
|
|
224
|
+
onPointerup: l,
|
|
225
|
+
onPointerleave: l,
|
|
226
|
+
onPointercancel: l,
|
|
227
|
+
onContextmenu: t[8] || (t[8] = r(() => {
|
|
228
|
+
}, ["prevent"])),
|
|
229
|
+
"data-testid": d.$attrs["data-testid"] ? `${d.$attrs["data-testid"]}-dec` : e.name ? `number-${e.name}-dec` : e.id ? `number-${e.id}-dec` : "number-input-dec"
|
|
225
230
|
}, [
|
|
226
|
-
h(
|
|
227
|
-
class:
|
|
231
|
+
h(w, {
|
|
232
|
+
class: i(["text-gray-700/85!", e.size === "xs" || e.size === "sm" ? "w-3 h-3" : "w-3.5 h-3.5"]),
|
|
228
233
|
icon: "mynaui:chevron-down-solid"
|
|
229
234
|
}, null, 8, ["class"])
|
|
230
|
-
], 40,
|
|
235
|
+
], 40, J)
|
|
231
236
|
])
|
|
232
237
|
])) : P("", !0)
|
|
233
238
|
], 2));
|
|
234
239
|
}
|
|
235
240
|
});
|
|
236
241
|
export {
|
|
237
|
-
|
|
242
|
+
W as default
|
|
238
243
|
};
|
|
@@ -26,9 +26,9 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
26
26
|
mask: boolean;
|
|
27
27
|
variant: "solid" | "outline" | "ghost";
|
|
28
28
|
size: "sm" | "md" | "lg";
|
|
29
|
+
placeholder: string;
|
|
29
30
|
error: boolean;
|
|
30
31
|
disabled: boolean;
|
|
31
|
-
placeholder: string;
|
|
32
32
|
modelValue: string;
|
|
33
33
|
autofocus: boolean;
|
|
34
34
|
attached: boolean;
|
|
@@ -14,9 +14,9 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
14
14
|
"onUpdate:modelValue"?: (value: string | number) => any;
|
|
15
15
|
}>, {
|
|
16
16
|
variant: PricingPlanVariant;
|
|
17
|
-
modelValue: string | number | null;
|
|
18
17
|
columns: number | string;
|
|
19
|
-
|
|
18
|
+
modelValue: string | number | null;
|
|
20
19
|
gap: number;
|
|
20
|
+
items: PricingPlanItemSchema[];
|
|
21
21
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
22
22
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SidePanel.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3446a690"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|