vlite3 0.4.4 → 0.4.7
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/Accordion/AccordionItem.vue.js +33 -32
- package/components/Accordion/types.d.ts +2 -0
- package/components/Alert.vue.d.ts +2 -0
- package/components/Alert.vue.js +38 -36
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.js +25 -24
- package/components/Button.vue.d.ts +1 -1
- package/components/Button.vue.js +37 -35
- package/components/CheckBox.vue.d.ts +1 -0
- package/components/CheckBox.vue.js +40 -40
- package/components/Chip/Chip.vue.js +55 -55
- package/components/Chip/types.d.ts +1 -0
- package/components/ChoiceBox/ChoiceBox.vue.d.ts +5 -0
- package/components/ChoiceBox/ChoiceBox.vue.js +61 -58
- package/components/ColorPicker/ColorPicker.vue.js +3 -2
- package/components/ConfirmationModal.vue.d.ts +4 -2
- package/components/ConfirmationModal.vue.js +48 -33
- package/components/DataList/DataList.vue.d.ts +0 -2
- package/components/DataList/DataList.vue.js +39 -35
- package/components/DataList/types.d.ts +2 -0
- package/components/DataTable/DataTable.vue.d.ts +0 -5
- package/components/DataTable/DataTable.vue.js +177 -158
- package/components/DataTable/DataTableHeader.vue.js +15 -14
- package/components/DataTable/DataTableToolbar.vue.d.ts +1 -1
- package/components/DataTable/DataTableToolbar.vue.js +30 -23
- package/components/DataTable/types.d.ts +4 -0
- package/components/DatePicker.vue.d.ts +1 -0
- package/components/DatePicker.vue.js +32 -25
- package/components/Dropdown/DropdownBooleanItem.vue.js +18 -17
- package/components/Dropdown/DropdownGroupedLayout.vue.js +28 -27
- package/components/Dropdown/DropdownItem.vue.js +24 -23
- package/components/Dropdown/DropdownMenu.vue.js +100 -91
- package/components/Dropdown/composables/useDropdownNavigation.js +24 -23
- package/components/Dropdown/composables/useDropdownSelection.js +19 -17
- package/components/Empty/Empty.vue.d.ts +2 -2
- package/components/Empty/Empty.vue.js +32 -18
- package/components/FilePicker/FilePicker.vue.d.ts +3 -1
- package/components/FilePicker/FilePicker.vue.js +140 -127
- package/components/FileTree/FileTree.vue.js +68 -58
- package/components/FileTree/FileTreeNode.vue.js +35 -34
- package/components/FileTree/types.d.ts +3 -0
- package/components/Form/CustomFields.vue.d.ts +3 -1
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/CustomFields.vue2.js +92 -80
- package/components/Form/Form.vue.d.ts +1 -1
- package/components/Form/FormField.vue.d.ts +1 -1
- package/components/Form/FormField.vue.js +60 -59
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +58 -57
- package/components/Form/composables/useForm.js +91 -88
- package/components/Form/types.d.ts +4 -0
- package/components/Form/utils/form.utils.js +104 -98
- package/components/GoogleLogin.vue.d.ts +1 -1
- package/components/GoogleLogin.vue.js +39 -32
- package/components/Heatmap/Heatmap.vue2.js +3 -2
- package/components/IconPicker.vue.d.ts +2 -0
- package/components/IconPicker.vue.js +37 -29
- package/components/Input.vue.d.ts +1 -1
- package/components/Input.vue.js +96 -98
- package/components/Kanban/KanbanBoard.vue.js +1 -1
- package/components/Kanban/KanbanBoard.vue2.js +55 -54
- package/components/Kanban/types.d.ts +1 -0
- package/components/Masonry/Masonry.vue2.js +3 -2
- package/components/Modal.vue.d.ts +2 -0
- package/components/Modal.vue.js +62 -57
- package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
- package/components/MultiSelect/MultiSelect.vue.js +61 -54
- package/components/Navbar/Navbar.vue.js +46 -46
- package/components/Pagination/Pagination.vue.js +116 -97
- package/components/PricingPlan/PricingPlanItem.vue.js +60 -47
- package/components/PricingPlan/types.d.ts +5 -0
- package/components/Screen/Screen.vue.d.ts +0 -4
- package/components/Screen/Screen.vue.js +231 -189
- package/components/Screen/ScreenFilter.vue.js +73 -63
- package/components/Screen/types.d.ts +5 -0
- package/components/SidePanel.vue.d.ts +2 -0
- package/components/SidePanel.vue.js +140 -5
- package/components/SidePanel.vue2.js +2 -135
- package/components/SidebarMenu/SidebarMenuItem.vue.js +131 -130
- package/components/SidebarMenu/types.d.ts +1 -0
- package/components/Slider.vue.d.ts +1 -0
- package/components/Slider.vue.js +71 -69
- package/components/Switch.vue.d.ts +1 -0
- package/components/Switch.vue.js +23 -18
- package/components/Tabes/Tabes.vue.js +20 -19
- package/components/Tabes/types.d.ts +1 -0
- package/components/Textarea.vue.d.ts +1 -0
- package/components/Textarea.vue.js +18 -16
- package/components/ThemeToggle.vue.js +24 -14
- package/components/Timeline.vue.js +68 -82
- package/components/ToastNotification.vue.js +2 -2
- package/components/Tooltip.vue.d.ts +4 -3
- package/components/Tooltip.vue.js +17 -15
- package/components/Workbook/Sheet.vue.js +80 -71
- package/components/Workbook/WorkbookAddButton.vue.js +14 -10
- package/components/Workbook/types.d.ts +1 -0
- package/core/config.d.ts +2 -0
- package/index.d.ts +1 -0
- package/index.js +28 -26
- package/package.json +1 -1
- package/style.css +1 -2
- package/types/button.d.ts +1 -0
- package/types/config.type.d.ts +10 -0
- package/types/form.type.d.ts +2 -0
- package/types/styles.d.ts +3 -0
- package/types/timeline.type.d.ts +2 -0
- package/utils/i18n.d.ts +8 -0
- package/utils/i18n.js +5 -0
- package/utils/index.d.ts +1 -0
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as S, computed as g, openBlock as l, createElementBlock as r, normalizeClass as a, createElementVNode as c, normalizeStyle as b, createCommentVNode as u, Fragment as z, renderList as j, createVNode as $, createBlock as v, renderSlot as C, toDisplayString as x } from "vue";
|
|
2
2
|
import f from "./Icon.vue.js";
|
|
3
|
-
|
|
3
|
+
import { $t as y } from "../utils/i18n.js";
|
|
4
|
+
const I = {
|
|
4
5
|
key: 0,
|
|
5
6
|
class: "absolute top-4 left-4 right-4 h-0.5 bg-border",
|
|
6
7
|
"aria-hidden": "true"
|
|
7
|
-
},
|
|
8
|
+
}, B = {
|
|
8
9
|
key: 1,
|
|
9
10
|
class: "absolute top-4 left-4 right-4 h-0.5 bg-border block sm:hidden",
|
|
10
11
|
"aria-hidden": "true"
|
|
11
|
-
},
|
|
12
|
+
}, V = ["onClick"], N = {
|
|
12
13
|
class: "flex h-9 w-9 items-center justify-center shrink-0 bg-background z-10",
|
|
13
14
|
"aria-hidden": "true"
|
|
14
|
-
},
|
|
15
|
+
}, D = {
|
|
15
16
|
key: 0,
|
|
16
17
|
class: "relative z-10 flex h-8 w-8 items-center justify-center rounded-full bg-primary hover:bg-primary-dark transition-colors"
|
|
17
|
-
},
|
|
18
|
+
}, E = {
|
|
18
19
|
key: 1,
|
|
19
20
|
class: "relative z-10 flex h-8 w-8 items-center justify-center rounded-full border-2 border-primary bg-background"
|
|
20
|
-
},
|
|
21
|
+
}, T = {
|
|
21
22
|
key: 1,
|
|
22
23
|
class: "h-2.5 w-2.5 rounded-full bg-primary"
|
|
23
|
-
},
|
|
24
|
+
}, F = {
|
|
24
25
|
key: 2,
|
|
25
26
|
class: "relative z-10 flex h-8 w-8 items-center justify-center rounded-full border-2 bg-background group-hover:border-muted-foreground transition-colors"
|
|
26
|
-
},
|
|
27
|
+
}, L = {
|
|
27
28
|
key: 1,
|
|
28
29
|
class: "h-2.5 w-2.5 rounded-full bg-transparent group-hover:bg-muted"
|
|
29
|
-
},
|
|
30
|
+
}, M = {
|
|
30
31
|
key: 0,
|
|
31
32
|
class: "text-xs text-muted-foreground mt-1"
|
|
32
|
-
},
|
|
33
|
+
}, q = {
|
|
33
34
|
key: 0,
|
|
34
35
|
class: "hidden sm:block flex-1 h-0.5 bg-border ml-2",
|
|
35
36
|
"aria-hidden": "true"
|
|
36
|
-
},
|
|
37
|
+
}, K = /* @__PURE__ */ S({
|
|
37
38
|
__name: "Timeline",
|
|
38
39
|
props: {
|
|
39
40
|
steps: {},
|
|
@@ -44,131 +45,116 @@ const j = {
|
|
|
44
45
|
class: { default: "" }
|
|
45
46
|
},
|
|
46
47
|
emits: ["step-click"],
|
|
47
|
-
setup(
|
|
48
|
-
const
|
|
49
|
-
return (
|
|
48
|
+
setup(t, { emit: k }) {
|
|
49
|
+
const s = t, w = k, d = (o, m) => m.status ? m.status : o < s.activeStep ? "completed" : o === s.activeStep ? "current" : "upcoming", e = g(() => s.direction === "vertical"), h = g(() => s.steps.length <= 1 ? 0 : Math.min(s.activeStep, s.steps.length - 1) / (s.steps.length - 1) * 100), p = (o) => o.titleI18n ? y(o.titleI18n) : o.title, P = (o) => o.descriptionI18n ? y(o.descriptionI18n) : o.description;
|
|
50
|
+
return (o, m) => (l(), r("nav", {
|
|
50
51
|
"aria-label": "Progress",
|
|
51
|
-
class:
|
|
52
|
+
class: a(["w-full", s.class])
|
|
52
53
|
}, [
|
|
53
|
-
|
|
54
|
+
c("ol", {
|
|
54
55
|
role: "list",
|
|
55
|
-
class:
|
|
56
|
+
class: a([
|
|
56
57
|
"relative flex",
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
!t.value && e.textPosition === "bottom" ? "flex-row w-full justify-between items-center" : "",
|
|
61
|
-
// Horizontal: Right Text -> Standard Flex
|
|
62
|
-
!t.value && e.textPosition === "right" ? "flex-row w-full" : ""
|
|
58
|
+
e.value ? "flex-col space-y-0" : "",
|
|
59
|
+
!e.value && t.textPosition === "bottom" ? "flex-row w-full justify-between items-center" : "",
|
|
60
|
+
!e.value && t.textPosition === "right" ? "flex-row w-full" : ""
|
|
63
61
|
])
|
|
64
62
|
}, [
|
|
65
|
-
!
|
|
66
|
-
|
|
63
|
+
!e.value && t.textPosition === "bottom" ? (l(), r("div", I, [
|
|
64
|
+
c("div", {
|
|
67
65
|
class: "h-full bg-primary transition-all duration-300 ease-in-out",
|
|
68
66
|
style: b({ width: `${h.value}%` })
|
|
69
67
|
}, null, 4)
|
|
70
68
|
])) : u("", !0),
|
|
71
|
-
!
|
|
72
|
-
|
|
69
|
+
!e.value && t.textPosition === "right" ? (l(), r("div", B, [
|
|
70
|
+
c("div", {
|
|
73
71
|
class: "h-full bg-primary transition-all duration-300 ease-in-out",
|
|
74
72
|
style: b({ width: `${h.value}%` })
|
|
75
73
|
}, null, 4)
|
|
76
74
|
])) : u("", !0),
|
|
77
|
-
(l(!0),
|
|
75
|
+
(l(!0), r(z, null, j(t.steps, (i, n) => (l(), r("li", {
|
|
78
76
|
key: i.id,
|
|
79
|
-
onClick: (
|
|
80
|
-
class:
|
|
77
|
+
onClick: (A) => t.clickable ? w("step-click", i, n) : null,
|
|
78
|
+
class: a([
|
|
81
79
|
"relative",
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
!t.value && e.textPosition === "bottom" ? "flex-none w-8" : "",
|
|
87
|
-
// Horizontal Right: Flex-1 to spread out (Desktop), Mobile acts as fixed width
|
|
88
|
-
!t.value && e.textPosition === "right" ? "flex-1 last:flex-none" : ""
|
|
80
|
+
t.clickable ? "cursor-pointer" : "",
|
|
81
|
+
e.value ? "w-full pb-10 last:pb-0" : "",
|
|
82
|
+
!e.value && t.textPosition === "bottom" ? "flex-none w-8" : "",
|
|
83
|
+
!e.value && t.textPosition === "right" ? "flex-1 last:flex-none" : ""
|
|
89
84
|
])
|
|
90
85
|
}, [
|
|
91
|
-
|
|
86
|
+
e.value && n !== t.steps.length - 1 ? (l(), r("div", {
|
|
92
87
|
key: 0,
|
|
93
|
-
class:
|
|
88
|
+
class: a(["hidden sm:block absolute top-4 left-4 -ml-px h-full w-0.5 bg-border", { "bg-primary": n < t.activeStep }]),
|
|
94
89
|
"aria-hidden": "true"
|
|
95
90
|
}, null, 2)) : u("", !0),
|
|
96
|
-
|
|
97
|
-
class:
|
|
91
|
+
c("div", {
|
|
92
|
+
class: a([
|
|
98
93
|
"group relative flex",
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
!t.value && e.textPosition === "bottom" ? "flex-col items-center justify-center" : "",
|
|
103
|
-
// Horizontal Right (Desktop) -> Row with gap
|
|
104
|
-
// Mobile -> Fallback to Col (Icon Only effectively)
|
|
105
|
-
!t.value && e.textPosition === "right" ? "flex-col items-center sm:flex-row sm:items-center sm:gap-2 w-full" : ""
|
|
94
|
+
e.value ? "flex-col items-center text-center sm:flex-row sm:items-start sm:text-left" : "",
|
|
95
|
+
!e.value && t.textPosition === "bottom" ? "flex-col items-center justify-center" : "",
|
|
96
|
+
!e.value && t.textPosition === "right" ? "flex-col items-center sm:flex-row sm:items-center sm:gap-2 w-full" : ""
|
|
106
97
|
])
|
|
107
98
|
}, [
|
|
108
|
-
|
|
109
|
-
d(
|
|
110
|
-
|
|
99
|
+
c("span", N, [
|
|
100
|
+
d(n, i) === "completed" ? (l(), r("span", D, [
|
|
101
|
+
$(f, {
|
|
111
102
|
icon: "lucide:check",
|
|
112
103
|
class: "h-5 w-5 text-primary-foreground"
|
|
113
104
|
})
|
|
114
|
-
])) : d(
|
|
105
|
+
])) : d(n, i) === "current" ? (l(), r("span", E, [
|
|
115
106
|
i.icon ? (l(), v(f, {
|
|
116
107
|
key: 0,
|
|
117
108
|
icon: i.icon,
|
|
118
109
|
class: "h-4 w-4 text-primary"
|
|
119
|
-
}, null, 8, ["icon"])) : (l(),
|
|
120
|
-
])) : (l(),
|
|
110
|
+
}, null, 8, ["icon"])) : (l(), r("span", T))
|
|
111
|
+
])) : (l(), r("span", F, [
|
|
121
112
|
i.icon ? (l(), v(f, {
|
|
122
113
|
key: 0,
|
|
123
114
|
icon: i.icon,
|
|
124
115
|
class: "h-4 w-4 text-muted-foreground"
|
|
125
|
-
}, null, 8, ["icon"])) : (l(),
|
|
116
|
+
}, null, 8, ["icon"])) : (l(), r("span", L))
|
|
126
117
|
]))
|
|
127
118
|
]),
|
|
128
|
-
|
|
129
|
-
class:
|
|
119
|
+
c("span", {
|
|
120
|
+
class: a([
|
|
130
121
|
"min-w-[max-content] flex-col",
|
|
131
122
|
"hidden sm:flex",
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
!
|
|
137
|
-
|
|
138
|
-
!t.value && e.textPosition === "bottom" && o === 0 ? "left-0 text-left items-start" : "",
|
|
139
|
-
!t.value && e.textPosition === "bottom" && o === e.steps.length - 1 ? "right-0 text-right items-end" : "",
|
|
140
|
-
!t.value && e.textPosition === "bottom" && o > 0 && o < e.steps.length - 1 ? "left-1/2 -translate-x-1/2 items-center" : "",
|
|
141
|
-
// Horizontal Right: No absolute, just flow
|
|
142
|
-
(!t.value && e.textPosition === "right", "")
|
|
123
|
+
e.value ? "sm:ml-4 sm:pt-1.5" : "",
|
|
124
|
+
!e.value && t.textPosition === "bottom" ? "absolute top-10 text-center" : "",
|
|
125
|
+
!e.value && t.textPosition === "bottom" && n === 0 ? "left-0 text-left items-start" : "",
|
|
126
|
+
!e.value && t.textPosition === "bottom" && n === t.steps.length - 1 ? "right-0 text-right items-end" : "",
|
|
127
|
+
!e.value && t.textPosition === "bottom" && n > 0 && n < t.steps.length - 1 ? "left-1/2 -translate-x-1/2 items-center" : "",
|
|
128
|
+
(!e.value && t.textPosition === "right", "")
|
|
143
129
|
])
|
|
144
130
|
}, [
|
|
145
|
-
|
|
131
|
+
C(o.$slots, "content", {
|
|
146
132
|
step: i,
|
|
147
|
-
index:
|
|
133
|
+
index: n
|
|
148
134
|
}, () => [
|
|
149
|
-
|
|
150
|
-
class:
|
|
135
|
+
c("span", {
|
|
136
|
+
class: a([
|
|
151
137
|
"text-sm font-medium leading-tight",
|
|
152
|
-
d(
|
|
138
|
+
d(n, i) === "upcoming" ? "text-muted-foreground" : "text-primary"
|
|
153
139
|
])
|
|
154
|
-
}, x(i
|
|
155
|
-
i.description ? (l(),
|
|
140
|
+
}, x(p(i)), 3),
|
|
141
|
+
i.description || i.descriptionI18n ? (l(), r("span", M, x(P(i)), 1)) : u("", !0)
|
|
156
142
|
])
|
|
157
143
|
], 2),
|
|
158
|
-
!
|
|
159
|
-
|
|
160
|
-
class:
|
|
144
|
+
!e.value && t.textPosition === "right" && n !== t.steps.length - 1 ? (l(), r("div", q, [
|
|
145
|
+
c("div", {
|
|
146
|
+
class: a([
|
|
161
147
|
"h-full bg-primary transition-all duration-300",
|
|
162
|
-
|
|
148
|
+
n < t.activeStep ? "w-full" : "w-0"
|
|
163
149
|
])
|
|
164
150
|
}, null, 2)
|
|
165
151
|
])) : u("", !0)
|
|
166
152
|
], 2)
|
|
167
|
-
], 10,
|
|
153
|
+
], 10, V))), 128))
|
|
168
154
|
], 2)
|
|
169
155
|
], 2));
|
|
170
156
|
}
|
|
171
157
|
});
|
|
172
158
|
export {
|
|
173
|
-
|
|
159
|
+
K as default
|
|
174
160
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ToastNotification.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-dc3a3b49"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { TooltTipProps } from 'v-tooltip-lite/types';
|
|
2
|
-
|
|
2
|
+
interface Props extends TooltTipProps {
|
|
3
3
|
disabled?: boolean;
|
|
4
|
-
|
|
4
|
+
contentI18n?: string;
|
|
5
|
+
}
|
|
5
6
|
declare function __VLS_template(): {
|
|
6
7
|
attrs: Partial<{}>;
|
|
7
8
|
slots: {
|
|
@@ -13,7 +14,7 @@ declare function __VLS_template(): {
|
|
|
13
14
|
rootEl: any;
|
|
14
15
|
};
|
|
15
16
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
17
18
|
disabled: boolean;
|
|
18
19
|
triggerClass: string;
|
|
19
20
|
contentClass: string;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as r, computed as c, openBlock as l, createElementBlock as i, renderSlot as n, createBlock as d, unref as p, mergeProps as u, withCtx as a } from "vue";
|
|
2
|
+
import f from "v-tooltip-lite";
|
|
3
3
|
import "v-tooltip-lite/style.css";
|
|
4
|
-
|
|
4
|
+
import { $t as m } from "../utils/i18n.js";
|
|
5
|
+
const g = {
|
|
5
6
|
key: 0,
|
|
6
7
|
class: "contents"
|
|
7
|
-
},
|
|
8
|
+
}, b = /* @__PURE__ */ r({
|
|
8
9
|
__name: "Tooltip",
|
|
9
10
|
props: {
|
|
11
|
+
disabled: { type: Boolean, default: !1 },
|
|
12
|
+
contentI18n: {},
|
|
10
13
|
content: {},
|
|
11
14
|
placement: { default: "top" },
|
|
12
15
|
offset: {},
|
|
@@ -19,27 +22,26 @@ const f = {
|
|
|
19
22
|
styles: {},
|
|
20
23
|
ignoreClickOutside: {},
|
|
21
24
|
isOpen: { type: Boolean },
|
|
22
|
-
menuId: {}
|
|
23
|
-
disabled: { type: Boolean, default: !1 }
|
|
25
|
+
menuId: {}
|
|
24
26
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const s = e;
|
|
27
|
-
return (
|
|
28
|
-
o
|
|
29
|
-
])) : (l(),
|
|
27
|
+
setup(t) {
|
|
28
|
+
const e = t, s = c(() => e.contentI18n ? m(e.contentI18n) : e.content);
|
|
29
|
+
return (o, y) => t.disabled ? (l(), i("div", g, [
|
|
30
|
+
n(o.$slots, "default")
|
|
31
|
+
])) : (l(), d(p(f), u({ key: 1 }, { ...e, content: s.value }, {
|
|
30
32
|
class: "inline-block",
|
|
31
|
-
"class-name": `basic-tooltip ${
|
|
33
|
+
"class-name": `basic-tooltip ${t.className}`
|
|
32
34
|
}), {
|
|
33
35
|
trigger: a(() => [
|
|
34
|
-
o
|
|
36
|
+
n(o.$slots, "default")
|
|
35
37
|
]),
|
|
36
38
|
default: a(() => [
|
|
37
|
-
o
|
|
39
|
+
n(o.$slots, "content")
|
|
38
40
|
]),
|
|
39
41
|
_: 3
|
|
40
42
|
}, 16, ["class-name"]));
|
|
41
43
|
}
|
|
42
44
|
});
|
|
43
45
|
export {
|
|
44
|
-
|
|
46
|
+
b as default
|
|
45
47
|
};
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { defineComponent as N, ref as g, computed as v, openBlock as a, createElementBlock as d, normalizeClass as D, createElementVNode as c, withModifiers as p, createBlock as y, withCtx as h, createVNode as u, createCommentVNode as w, withDirectives as O, vModelText as j, toDisplayString as C, unref as M, createTextVNode as R, nextTick as z } from "vue";
|
|
2
|
+
import m from "../Icon.vue.js";
|
|
3
|
+
import A from "../Dropdown/Dropdown.vue.js";
|
|
4
|
+
import { $t as s } from "../../utils/i18n.js";
|
|
5
|
+
import K from "../IconPicker.vue.js";
|
|
6
|
+
const U = {
|
|
6
7
|
type: "button",
|
|
7
8
|
class: "flex items-center justify-center rounded hover:bg-accent transition-colors p-0.5 outline-none focus-visible:ring-2 focus-visible:ring-primary/20 mt-1"
|
|
8
|
-
},
|
|
9
|
+
}, q = {
|
|
9
10
|
key: 1,
|
|
10
11
|
class: "flex items-center justify-center p-0.5"
|
|
11
|
-
},
|
|
12
|
+
}, F = { class: "flex-1 min-w-0 pr-1" }, G = {
|
|
12
13
|
key: 1,
|
|
13
14
|
class: "block truncate text-sm font-medium leading-normal"
|
|
14
|
-
},
|
|
15
|
+
}, H = { class: "p-1 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors" }, J = {
|
|
15
16
|
class: /* @__PURE__ */ D(["flex items-center"])
|
|
16
|
-
},
|
|
17
|
+
}, Y = /* @__PURE__ */ N({
|
|
17
18
|
__name: "Sheet",
|
|
18
19
|
props: {
|
|
19
20
|
sheet: {},
|
|
@@ -28,24 +29,32 @@ const A = {
|
|
|
28
29
|
inactiveItemClass: { default: "" }
|
|
29
30
|
},
|
|
30
31
|
emits: ["select", "update:title", "update:icon", "edit-start", "edit-end", "duplicate", "delete"],
|
|
31
|
-
setup(
|
|
32
|
-
const e =
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
setup(o, { emit: E }) {
|
|
33
|
+
const e = o, n = E, f = g(null), r = g(e.sheet.title), T = v(() => e.sheet.titleI18n ? s(e.sheet.titleI18n) : e.sheet.title), k = () => {
|
|
34
|
+
r.value = e.sheet.title, n("edit-start", e.sheet.id), z(() => {
|
|
35
|
+
f.value?.focus(), f.value?.select();
|
|
35
36
|
});
|
|
36
|
-
},
|
|
37
|
+
}, b = () => {
|
|
37
38
|
if (!e.isEditing) return;
|
|
38
|
-
const t =
|
|
39
|
-
t ?
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
t.key === "Enter" &&
|
|
44
|
-
},
|
|
45
|
-
{ label: "Rename", value: "rename", icon: "lucide:pencil" },
|
|
46
|
-
{ label: "Duplicate", value: "duplicate", icon: "lucide:copy" },
|
|
39
|
+
const t = r.value.trim();
|
|
40
|
+
t ? n("update:title", e.sheet.id, t) : r.value = e.sheet.title, n("edit-end", e.sheet.id);
|
|
41
|
+
}, B = () => {
|
|
42
|
+
r.value = e.sheet.title, n("edit-end", e.sheet.id);
|
|
43
|
+
}, I = (t) => {
|
|
44
|
+
t.key === "Enter" && b(), t.key === "Escape" && B();
|
|
45
|
+
}, $ = v(() => [
|
|
47
46
|
{
|
|
48
|
-
label: "
|
|
47
|
+
label: s("vlite.workbook.rename") !== "vlite.workbook.rename" ? s("vlite.workbook.rename") : "Rename",
|
|
48
|
+
value: "rename",
|
|
49
|
+
icon: "lucide:pencil"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: s("vlite.workbook.duplicate") !== "vlite.workbook.duplicate" ? s("vlite.workbook.duplicate") : "Duplicate",
|
|
53
|
+
value: "duplicate",
|
|
54
|
+
icon: "lucide:copy"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
label: s("vlite.workbook.delete") !== "vlite.workbook.delete" ? s("vlite.workbook.delete") : "Delete",
|
|
49
58
|
value: "delete",
|
|
50
59
|
icon: "lucide:trash-2",
|
|
51
60
|
class: "text-danger",
|
|
@@ -57,101 +66,101 @@ const A = {
|
|
|
57
66
|
cancelText: e.confirmDeleteTexts?.cancel,
|
|
58
67
|
variant: "danger",
|
|
59
68
|
onConfirm: () => {
|
|
60
|
-
e.canDelete &&
|
|
69
|
+
e.canDelete && n("delete", e.sheet.id);
|
|
61
70
|
}
|
|
62
71
|
} : void 0
|
|
63
72
|
}
|
|
64
|
-
]),
|
|
65
|
-
if (t.value === "rename" &&
|
|
73
|
+
]), S = (t) => {
|
|
74
|
+
if (t.value === "rename" && k(), t.value === "duplicate" && n("duplicate", e.sheet.id), t.value === "delete") {
|
|
66
75
|
if (!e.canDelete || e.confirmDelete) return;
|
|
67
|
-
|
|
76
|
+
n("delete", e.sheet.id);
|
|
68
77
|
}
|
|
69
78
|
}, x = (t) => {
|
|
70
|
-
t && t.value && t.value !== "delete" || e.canDelete &&
|
|
71
|
-
},
|
|
79
|
+
t && t.value && t.value !== "delete" || e.canDelete && n("delete", e.sheet.id);
|
|
80
|
+
}, V = v(() => [
|
|
72
81
|
"group relative flex items-center min-w-[120px] max-w-[240px] h-9 px-3 border-r border-border select-none cursor-pointer transition-all duration-200 ease-out",
|
|
73
82
|
e.itemClass,
|
|
74
83
|
e.isActive ? `bg-muted text-foreground ring-1 ring-border ring-b-0 z-10 ${e.activeItemClass}` : `text-muted-foreground hover:bg-accent/50 ${e.inactiveItemClass}`,
|
|
75
84
|
e.isEditing ? "cursor-text" : ""
|
|
76
85
|
].filter(Boolean).join(" "));
|
|
77
|
-
return (t,
|
|
78
|
-
class: D(
|
|
79
|
-
onClick:
|
|
80
|
-
onDblclick:
|
|
86
|
+
return (t, i) => (a(), d("div", {
|
|
87
|
+
class: D(V.value),
|
|
88
|
+
onClick: i[5] || (i[5] = (l) => n("select", o.sheet.id)),
|
|
89
|
+
onDblclick: k
|
|
81
90
|
}, [
|
|
82
|
-
|
|
83
|
-
onClick:
|
|
91
|
+
c("div", {
|
|
92
|
+
onClick: i[1] || (i[1] = p(() => {
|
|
84
93
|
}, ["stop"])),
|
|
85
94
|
class: "mr-2 flex items-center shrink-0"
|
|
86
95
|
}, [
|
|
87
|
-
(
|
|
96
|
+
(o.sheet.icon || o.isEditing) && o.allowIconChange ? (a(), y(K, {
|
|
88
97
|
key: 0,
|
|
89
|
-
value:
|
|
98
|
+
value: o.sheet.icon || "lucide:file",
|
|
90
99
|
position: "bottom-start",
|
|
91
|
-
onOnSelect:
|
|
100
|
+
onOnSelect: i[0] || (i[0] = (l) => n("update:icon", o.sheet.id, l))
|
|
92
101
|
}, {
|
|
93
|
-
default:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
icon:
|
|
102
|
+
default: h(() => [
|
|
103
|
+
c("button", U, [
|
|
104
|
+
u(m, {
|
|
105
|
+
icon: o.sheet.icon || "lucide:file",
|
|
97
106
|
class: "w-4 h-4 opacity-70 hover:opacity-100 transition-opacity"
|
|
98
107
|
}, null, 8, ["icon"])
|
|
99
108
|
])
|
|
100
109
|
]),
|
|
101
110
|
_: 1
|
|
102
|
-
}, 8, ["value"])) :
|
|
103
|
-
|
|
104
|
-
icon:
|
|
111
|
+
}, 8, ["value"])) : o.sheet.icon ? (a(), d("div", q, [
|
|
112
|
+
u(m, {
|
|
113
|
+
icon: o.sheet.icon,
|
|
105
114
|
class: "w-4 h-4 opacity-70"
|
|
106
115
|
}, null, 8, ["icon"])
|
|
107
|
-
])) :
|
|
116
|
+
])) : w("", !0)
|
|
108
117
|
]),
|
|
109
|
-
|
|
110
|
-
|
|
118
|
+
c("div", F, [
|
|
119
|
+
o.isEditing ? O((a(), d("input", {
|
|
111
120
|
key: 0,
|
|
112
121
|
ref_key: "inputRef",
|
|
113
|
-
ref:
|
|
114
|
-
"onUpdate:modelValue":
|
|
122
|
+
ref: f,
|
|
123
|
+
"onUpdate:modelValue": i[2] || (i[2] = (l) => r.value = l),
|
|
115
124
|
type: "text",
|
|
116
125
|
class: "w-full bg-transparent border-none outline-none p-0 text-sm font-medium text-foreground placeholder-muted-foreground focus:ring-0",
|
|
117
|
-
onBlur:
|
|
118
|
-
onKeydown:
|
|
119
|
-
onClick:
|
|
126
|
+
onBlur: b,
|
|
127
|
+
onKeydown: I,
|
|
128
|
+
onClick: i[3] || (i[3] = p(() => {
|
|
120
129
|
}, ["stop"]))
|
|
121
130
|
}, null, 544)), [
|
|
122
|
-
[
|
|
123
|
-
]) : (a(),
|
|
131
|
+
[j, r.value]
|
|
132
|
+
]) : (a(), d("span", G, C(T.value), 1))
|
|
124
133
|
]),
|
|
125
|
-
|
|
134
|
+
c("div", {
|
|
126
135
|
class: "opacity-0 group-hover:opacity-100 transition-opacity ml-auto pl-1 flex items-center bg-inherit",
|
|
127
|
-
onClick:
|
|
136
|
+
onClick: i[4] || (i[4] = p(() => {
|
|
128
137
|
}, ["stop"]))
|
|
129
138
|
}, [
|
|
130
|
-
|
|
131
|
-
options:
|
|
139
|
+
u(M(A), {
|
|
140
|
+
options: $.value,
|
|
132
141
|
position: "bottom-end",
|
|
133
142
|
width: "140px",
|
|
134
143
|
teleport: !0,
|
|
135
|
-
onOnSelect:
|
|
144
|
+
onOnSelect: S,
|
|
136
145
|
onOnConfirm: x,
|
|
137
146
|
onConfirm: x
|
|
138
147
|
}, {
|
|
139
|
-
trigger:
|
|
140
|
-
|
|
141
|
-
|
|
148
|
+
trigger: h(() => [
|
|
149
|
+
c("button", H, [
|
|
150
|
+
u(m, {
|
|
142
151
|
icon: "lucide:more-vertical",
|
|
143
152
|
class: "w-3.5 h-3.5"
|
|
144
153
|
})
|
|
145
154
|
])
|
|
146
155
|
]),
|
|
147
|
-
item:
|
|
148
|
-
|
|
149
|
-
|
|
156
|
+
item: h(({ option: l }) => [
|
|
157
|
+
c("div", J, [
|
|
158
|
+
l?.icon ? (a(), y(m, {
|
|
150
159
|
key: 0,
|
|
151
|
-
icon:
|
|
160
|
+
icon: l?.icon,
|
|
152
161
|
class: "w-3.5 h-3.5 mr-2 opacity-70"
|
|
153
|
-
}, null, 8, ["icon"])) :
|
|
154
|
-
|
|
162
|
+
}, null, 8, ["icon"])) : w("", !0),
|
|
163
|
+
R(" " + C(l?.label), 1)
|
|
155
164
|
])
|
|
156
165
|
]),
|
|
157
166
|
_: 1
|
|
@@ -161,5 +170,5 @@ const A = {
|
|
|
161
170
|
}
|
|
162
171
|
});
|
|
163
172
|
export {
|
|
164
|
-
|
|
173
|
+
Y as default
|
|
165
174
|
};
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { defineComponent as c, computed as l, openBlock as m, createBlock as s } from "vue";
|
|
2
|
+
import d from "../Button.vue.js";
|
|
3
|
+
import { $t as u } from "../../utils/i18n.js";
|
|
4
|
+
const f = /* @__PURE__ */ c({
|
|
4
5
|
__name: "WorkbookAddButton",
|
|
5
6
|
emits: ["click"],
|
|
6
|
-
setup(
|
|
7
|
-
const
|
|
8
|
-
|
|
7
|
+
setup(k, { emit: o }) {
|
|
8
|
+
const n = o, i = l(() => {
|
|
9
|
+
const t = u("vlite.workbook.addSheet");
|
|
10
|
+
return t !== "vlite.workbook.addSheet" ? t : "Add New Sheet";
|
|
11
|
+
});
|
|
12
|
+
return (t, e) => (m(), s(d, {
|
|
9
13
|
variant: "ghost",
|
|
10
14
|
size: "sm",
|
|
11
15
|
icon: "lucide:plus",
|
|
12
|
-
title:
|
|
16
|
+
title: i.value,
|
|
13
17
|
rounded: "none",
|
|
14
|
-
onClick: e[0] || (e[0] = (
|
|
15
|
-
}));
|
|
18
|
+
onClick: e[0] || (e[0] = (r) => n("click", r))
|
|
19
|
+
}, null, 8, ["title"]));
|
|
16
20
|
}
|
|
17
21
|
});
|
|
18
22
|
export {
|
|
19
|
-
|
|
23
|
+
f as default
|
|
20
24
|
};
|
package/core/config.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare const VLITE_CONFIG_KEY: InjectionKey<VLiteConfig>;
|
|
|
12
12
|
export declare const configState: {
|
|
13
13
|
services?: {
|
|
14
14
|
upload?: import('..').FileUploadHandler;
|
|
15
|
+
t?: import('..').TranslationHandler;
|
|
15
16
|
};
|
|
16
17
|
};
|
|
17
18
|
/**
|
|
@@ -25,5 +26,6 @@ export declare function updateConfig(updates: Partial<VLiteConfig>): void;
|
|
|
25
26
|
export declare function useVLiteConfig(): {
|
|
26
27
|
services?: {
|
|
27
28
|
upload?: import('..').FileUploadHandler;
|
|
29
|
+
t?: import('..').TranslationHandler;
|
|
28
30
|
};
|
|
29
31
|
};
|
package/index.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export * from './directives/vScrollReveal';
|
|
|
54
54
|
export { createVLite, useVLiteConfig } from './core';
|
|
55
55
|
export { GoogleSignInPlugin };
|
|
56
56
|
export * from './utils';
|
|
57
|
+
export { $t } from './utils/i18n';
|
|
57
58
|
export * from './types';
|
|
58
59
|
export * from './components/DataList';
|
|
59
60
|
export * from './components/Screen';
|