@indielayer/ui 1.9.3 → 1.10.1
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/docs/components/menu/DocsMenu.vue +1 -0
- package/docs/pages/component/form/usage.vue +2 -0
- package/docs/pages/component/menu/usage.vue +2 -0
- package/docs/pages/component/select/index.vue +7 -0
- package/docs/pages/component/select/multiple.vue +42 -0
- package/docs/pages/component/select/usage.vue +8 -12
- package/docs/pages/component/table/virtual.vue +19 -6
- package/docs/pages/component/toggle/index.vue +1 -1
- package/docs/pages/component/tooltip/index.vue +1 -1
- package/docs/pages/component/upload/index.vue +29 -0
- package/docs/pages/component/upload/usage.vue +115 -0
- package/docs/search/components.json +1 -1
- package/lib/common/icons.d.ts +2 -0
- package/lib/common/icons.js +17 -15
- package/lib/components/button/theme/Button.base.theme.js +30 -27
- package/lib/components/checkbox/Checkbox.vue2.js +9 -9
- package/lib/components/datepicker/Datepicker.vue.d.ts +4 -4
- package/lib/components/datepicker/Datepicker.vue.js +1 -1
- package/lib/components/drawer/Drawer.vue.js +1 -17
- package/lib/components/form/Form.vue.d.ts +4 -4
- package/lib/components/form/Form.vue.js +34 -34
- package/lib/components/formGroup/FormGroup.vue.d.ts +1 -1
- package/lib/components/formGroup/FormGroup.vue.js +39 -37
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +68 -66
- package/lib/components/label/theme/Label.base.theme.js +7 -7
- package/lib/components/menu/Menu.vue.d.ts +2 -0
- package/lib/components/menu/MenuItem.vue.d.ts +15 -3
- package/lib/components/menu/MenuItem.vue.js +1 -1
- package/lib/components/menu/MenuItem.vue2.js +43 -37
- package/lib/components/modal/Modal.vue.d.ts +4 -4
- package/lib/components/modal/Modal.vue.js +38 -34
- package/lib/components/notifications/Notifications.vue.d.ts +15 -0
- package/lib/components/notifications/Notifications.vue.js +149 -127
- package/lib/components/progress/Progress.vue.d.ts +4 -4
- package/lib/components/progress/Progress.vue.js +7 -7
- package/lib/components/scroll/Scroll.vue2.js +1 -1
- package/lib/components/select/Select.vue.d.ts +43 -1
- package/lib/components/select/Select.vue.js +358 -258
- package/lib/components/select/theme/Select.base.theme.js +1 -0
- package/lib/components/tab/Tab.vue.js +1 -1
- package/lib/components/tab/TabGroup.vue.js +2 -2
- package/lib/components/table/TableCell.vue.d.ts +1 -1
- package/lib/components/table/theme/TableHead.base.theme.js +1 -1
- package/lib/components/table/theme/TableHeader.base.theme.js +1 -1
- package/lib/components/tag/Tag.vue.js +23 -21
- package/lib/components/textarea/Textarea.vue.js +1 -1
- package/lib/components/upload/Upload.vue.d.ts +195 -0
- package/lib/components/upload/Upload.vue.js +264 -0
- package/lib/components/upload/Upload.vue2.js +4 -0
- package/lib/components/upload/__tests__/Upload.spec.d.ts +1 -0
- package/lib/components/upload/index.d.ts +2 -0
- package/lib/components/upload/theme/Upload.base.theme.d.ts +3 -0
- package/lib/components/upload/theme/Upload.base.theme.js +8 -0
- package/lib/components/upload/theme/Upload.carbon.theme.d.ts +3 -0
- package/lib/components/upload/theme/Upload.carbon.theme.js +5 -0
- package/lib/composables/useVirtualList.js +56 -53
- package/lib/index.js +43 -41
- package/lib/index.umd.js +4 -4
- package/lib/node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/core/index.js +501 -0
- package/lib/node_modules/.pnpm/@vueuse_shared@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/shared/index.js +96 -0
- package/lib/theme.d.ts +2 -1
- package/lib/themes/base/components.d.ts +1 -0
- package/lib/themes/base/components.js +23 -21
- package/lib/themes/carbon/components.d.ts +1 -0
- package/lib/themes/carbon/components.js +23 -21
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/src/common/icons.ts +2 -0
- package/src/components/button/theme/Button.base.theme.ts +6 -3
- package/src/components/checkbox/Checkbox.vue +5 -5
- package/src/components/drawer/Drawer.vue +0 -16
- package/src/components/form/Form.vue +10 -4
- package/src/components/formGroup/FormGroup.vue +2 -0
- package/src/components/index.ts +1 -0
- package/src/components/label/theme/Label.base.theme.ts +7 -5
- package/src/components/menu/Menu.vue +2 -0
- package/src/components/menu/MenuItem.vue +8 -6
- package/src/components/modal/Modal.vue +6 -1
- package/src/components/notifications/Notifications.vue +34 -4
- package/src/components/progress/Progress.vue +2 -2
- package/src/components/select/Select.vue +166 -68
- package/src/components/select/theme/Select.base.theme.ts +2 -0
- package/src/components/table/theme/TableHead.base.theme.ts +1 -1
- package/src/components/table/theme/TableHeader.base.theme.ts +1 -1
- package/src/components/tag/Tag.vue +12 -10
- package/src/components/upload/Upload.vue +365 -0
- package/src/components/upload/__tests__/Upload.spec.ts +11 -0
- package/src/components/upload/index.ts +2 -0
- package/src/components/upload/theme/Upload.base.theme.ts +9 -0
- package/src/components/upload/theme/Upload.carbon.theme.ts +7 -0
- package/src/composables/useInputtable.ts +1 -1
- package/src/composables/useVirtualList.ts +8 -5
- package/src/theme.ts +2 -0
- package/src/themes/base/components.ts +1 -0
- package/src/themes/carbon/components.ts +1 -0
- package/src/version.ts +1 -1
- package/volar.d.ts +1 -0
- package/lib/node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/core/index.js +0 -412
- package/lib/node_modules/.pnpm/@vueuse_shared@10.2.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/shared/index.js +0 -90
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent as I, ref as
|
|
2
|
-
import { injectNotificationKey as
|
|
3
|
-
import { useColors as
|
|
4
|
-
import { useCSS as
|
|
5
|
-
import { useTheme as
|
|
1
|
+
import { defineComponent as I, ref as g, provide as q, watch as j, openBlock as a, createElementBlock as p, Fragment as H, renderSlot as J, createBlock as x, Teleport as Q, createElementVNode as b, normalizeStyle as D, unref as i, normalizeClass as _, createVNode as O, TransitionGroup as U, withCtx as W, renderList as Y, createCommentVNode as y, toDisplayString as C } from "vue";
|
|
2
|
+
import { injectNotificationKey as Z } from "../../composables/keys.js";
|
|
3
|
+
import { useColors as A } from "../../composables/useColors.js";
|
|
4
|
+
import { useCSS as ee } from "../../composables/useCSS.js";
|
|
5
|
+
import { useTheme as te } from "../../composables/useTheme.js";
|
|
6
6
|
import { closeIcon as oe } from "../../common/icons.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const se = { class: "flex items-center flex-wrap" },
|
|
7
|
+
import K from "../icon/Icon.vue.js";
|
|
8
|
+
import re from "../spacer/Spacer.js";
|
|
9
|
+
const se = ["onMouseenter", "onMouseleave"], ae = { class: "flex items-center flex-wrap" }, le = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "font-medium mr-2"
|
|
12
|
-
},
|
|
13
|
-
...
|
|
12
|
+
}, ne = ["onClick"], ie = {
|
|
13
|
+
...A.props("primary"),
|
|
14
14
|
align: {
|
|
15
15
|
type: String,
|
|
16
16
|
default: "right",
|
|
17
|
-
validator: (
|
|
17
|
+
validator: (c) => M.align.includes(c)
|
|
18
18
|
},
|
|
19
19
|
position: {
|
|
20
20
|
type: String,
|
|
21
21
|
default: "bottom",
|
|
22
|
-
validator: (
|
|
22
|
+
validator: (c) => M.position.includes(c)
|
|
23
23
|
},
|
|
24
24
|
timeout: {
|
|
25
25
|
type: Number,
|
|
@@ -29,150 +29,170 @@ const se = { class: "flex items-center flex-wrap" }, re = {
|
|
|
29
29
|
type: Boolean,
|
|
30
30
|
default: !0
|
|
31
31
|
},
|
|
32
|
+
pauseOnHover: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: !0
|
|
35
|
+
},
|
|
32
36
|
injectKey: {
|
|
33
37
|
type: [Symbol, String],
|
|
34
|
-
default:
|
|
38
|
+
default: Z
|
|
35
39
|
}
|
|
36
|
-
},
|
|
40
|
+
}, M = {
|
|
37
41
|
align: ["left", "right"],
|
|
38
42
|
position: ["bottom", "top"]
|
|
39
|
-
},
|
|
43
|
+
}, ce = {
|
|
40
44
|
name: "XNotifications",
|
|
41
|
-
validators:
|
|
42
|
-
},
|
|
43
|
-
...
|
|
44
|
-
props:
|
|
45
|
-
setup(
|
|
46
|
-
const
|
|
47
|
-
|
|
45
|
+
validators: M
|
|
46
|
+
}, he = /* @__PURE__ */ I({
|
|
47
|
+
...ce,
|
|
48
|
+
props: ie,
|
|
49
|
+
setup(c, { expose: E }) {
|
|
50
|
+
const r = c, u = g(r.align), s = g(r.position), d = g([]), z = g(null), L = ee("notification"), S = A();
|
|
51
|
+
q(r.injectKey, {
|
|
48
52
|
log: w,
|
|
49
|
-
info:
|
|
50
|
-
warn:
|
|
51
|
-
error:
|
|
52
|
-
warning:
|
|
53
|
-
success:
|
|
54
|
-
}),
|
|
55
|
-
|
|
56
|
-
}),
|
|
57
|
-
|
|
53
|
+
info: N,
|
|
54
|
+
warn: v,
|
|
55
|
+
error: B,
|
|
56
|
+
warning: v,
|
|
57
|
+
success: T
|
|
58
|
+
}), j(() => r.align, (e) => {
|
|
59
|
+
u.value = e;
|
|
60
|
+
}), j(() => r.position, (e) => {
|
|
61
|
+
s.value = e;
|
|
58
62
|
});
|
|
59
|
-
function w(
|
|
60
|
-
const
|
|
61
|
-
message:
|
|
63
|
+
function w(e) {
|
|
64
|
+
const o = typeof e == "string", t = {
|
|
65
|
+
message: o ? e : void 0
|
|
62
66
|
};
|
|
63
|
-
|
|
64
|
-
...
|
|
65
|
-
...
|
|
67
|
+
m(o ? t : {
|
|
68
|
+
...t,
|
|
69
|
+
...e
|
|
66
70
|
});
|
|
67
71
|
}
|
|
68
|
-
function
|
|
69
|
-
const
|
|
72
|
+
function N(e) {
|
|
73
|
+
const o = typeof e == "string", t = {
|
|
70
74
|
icon: '<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd" />',
|
|
71
75
|
iconColor: "sky",
|
|
72
|
-
message:
|
|
76
|
+
message: o ? e : void 0
|
|
73
77
|
};
|
|
74
|
-
|
|
75
|
-
...
|
|
76
|
-
...
|
|
78
|
+
m(o ? t : {
|
|
79
|
+
...t,
|
|
80
|
+
...e
|
|
77
81
|
});
|
|
78
82
|
}
|
|
79
|
-
function
|
|
80
|
-
const
|
|
83
|
+
function T(e) {
|
|
84
|
+
const o = typeof e == "string", t = {
|
|
81
85
|
icon: '<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" />',
|
|
82
86
|
iconColor: "success",
|
|
83
|
-
message:
|
|
87
|
+
message: o ? e : void 0
|
|
84
88
|
};
|
|
85
|
-
|
|
86
|
-
...
|
|
87
|
-
...
|
|
89
|
+
m(o ? t : {
|
|
90
|
+
...t,
|
|
91
|
+
...e
|
|
88
92
|
});
|
|
89
93
|
}
|
|
90
|
-
function
|
|
91
|
-
const
|
|
94
|
+
function v(e) {
|
|
95
|
+
const o = typeof e == "string", t = {
|
|
92
96
|
icon: '<path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd" />',
|
|
93
97
|
iconColor: "warning",
|
|
94
|
-
message:
|
|
98
|
+
message: o ? e : void 0
|
|
95
99
|
};
|
|
96
|
-
|
|
97
|
-
...
|
|
98
|
-
...
|
|
100
|
+
m(o ? t : {
|
|
101
|
+
...t,
|
|
102
|
+
...e
|
|
99
103
|
});
|
|
100
104
|
}
|
|
101
|
-
function
|
|
102
|
-
const
|
|
105
|
+
function B(e) {
|
|
106
|
+
const o = typeof e == "string", t = {
|
|
103
107
|
icon: '<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd" />',
|
|
104
108
|
iconColor: "error",
|
|
105
|
-
message:
|
|
109
|
+
message: o ? e : void 0
|
|
106
110
|
};
|
|
107
|
-
|
|
108
|
-
...
|
|
109
|
-
...
|
|
111
|
+
m(o ? t : {
|
|
112
|
+
...t,
|
|
113
|
+
...e
|
|
110
114
|
});
|
|
111
115
|
}
|
|
112
|
-
function
|
|
113
|
-
var
|
|
114
|
-
const
|
|
116
|
+
function m(e) {
|
|
117
|
+
var $;
|
|
118
|
+
const t = {
|
|
115
119
|
...{
|
|
116
120
|
id: Date.now(),
|
|
117
|
-
iconColor:
|
|
118
|
-
timeout:
|
|
119
|
-
align:
|
|
120
|
-
position:
|
|
121
|
-
removable:
|
|
121
|
+
iconColor: r.color,
|
|
122
|
+
timeout: r.timeout,
|
|
123
|
+
align: u.value,
|
|
124
|
+
position: s.value,
|
|
125
|
+
removable: r.removable
|
|
122
126
|
},
|
|
123
|
-
...
|
|
127
|
+
...e
|
|
124
128
|
};
|
|
125
|
-
|
|
126
|
-
const
|
|
127
|
-
icon:
|
|
128
|
-
action:
|
|
129
|
+
u.value = t.align, s.value = t.position;
|
|
130
|
+
const l = S.getPalette(t.iconColor), f = S.getPalette((($ = t.action) == null ? void 0 : $.color) || "primary"), V = L.variables({
|
|
131
|
+
icon: l[400],
|
|
132
|
+
action: f[400],
|
|
129
133
|
hover: {
|
|
130
|
-
action:
|
|
134
|
+
action: f[500]
|
|
131
135
|
},
|
|
132
136
|
dark: {
|
|
133
|
-
icon:
|
|
134
|
-
action:
|
|
137
|
+
icon: l[500],
|
|
138
|
+
action: f[500],
|
|
135
139
|
hover: {
|
|
136
|
-
action:
|
|
140
|
+
action: f[600]
|
|
137
141
|
}
|
|
138
142
|
}
|
|
139
143
|
});
|
|
140
|
-
|
|
144
|
+
if (t.style = Object.keys(V).map((n) => `${n}: ${V[n]}`).join(";"), t.timeout) {
|
|
145
|
+
const n = P(t, t.timeout);
|
|
146
|
+
t.timer = n, t.timerStart = Date.now();
|
|
147
|
+
}
|
|
148
|
+
d.value.push(t), setTimeout(() => {
|
|
149
|
+
var n;
|
|
150
|
+
(n = z.value) == null || n.scrollTo({ top: 0, behavior: "smooth" });
|
|
151
|
+
}, 0);
|
|
152
|
+
}
|
|
153
|
+
function h(e) {
|
|
154
|
+
d.value = d.value.filter((o) => o.id !== e.id);
|
|
155
|
+
}
|
|
156
|
+
function P(e, o) {
|
|
157
|
+
return setTimeout(() => {
|
|
158
|
+
h(e);
|
|
159
|
+
}, o);
|
|
141
160
|
}
|
|
142
|
-
function
|
|
143
|
-
|
|
161
|
+
function R(e) {
|
|
162
|
+
r.pauseOnHover && e.timer && (clearTimeout(e.timer), e.timer = void 0);
|
|
144
163
|
}
|
|
145
|
-
function X(
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
164
|
+
function X(e) {
|
|
165
|
+
if (r.pauseOnHover && e.timeout && e.timerStart) {
|
|
166
|
+
const o = Math.max(e.timeout - (Date.now() - e.timerStart), 1e3);
|
|
167
|
+
e.timer = P(e, o);
|
|
168
|
+
}
|
|
149
169
|
}
|
|
150
|
-
const { styles: F, classes:
|
|
151
|
-
return
|
|
152
|
-
|
|
153
|
-
(a(),
|
|
154
|
-
|
|
170
|
+
const { styles: F, classes: k, className: G } = te("Notifications", {}, r);
|
|
171
|
+
return E({ log: w, info: N, success: T, warn: v, warning: v, error: B }), (e, o) => (a(), p(H, null, [
|
|
172
|
+
J(e.$slots, "default"),
|
|
173
|
+
(a(), x(Q, { to: "body" }, [
|
|
174
|
+
b("div", {
|
|
155
175
|
ref_key: "listRef",
|
|
156
176
|
ref: z,
|
|
157
|
-
style:
|
|
158
|
-
class:
|
|
159
|
-
|
|
160
|
-
|
|
177
|
+
style: D(i(F)),
|
|
178
|
+
class: _([
|
|
179
|
+
i(G),
|
|
180
|
+
i(k).wrapper,
|
|
161
181
|
{
|
|
162
182
|
// align
|
|
163
|
-
"left-0":
|
|
164
|
-
"right-0":
|
|
183
|
+
"left-0": u.value === "left",
|
|
184
|
+
"right-0": u.value === "right",
|
|
165
185
|
// position
|
|
166
|
-
"top-0":
|
|
167
|
-
"bottom-0":
|
|
186
|
+
"top-0": s.value === "top",
|
|
187
|
+
"bottom-0": s.value === "bottom"
|
|
168
188
|
}
|
|
169
189
|
])
|
|
170
190
|
}, [
|
|
171
|
-
|
|
191
|
+
O(U, {
|
|
172
192
|
tag: "ul",
|
|
173
|
-
class:
|
|
174
|
-
|
|
175
|
-
{ "flex-col-reverse":
|
|
193
|
+
class: _([
|
|
194
|
+
i(k).list,
|
|
195
|
+
{ "flex-col-reverse": s.value }
|
|
176
196
|
]),
|
|
177
197
|
"enter-active-class": "transition ease-out duration-200",
|
|
178
198
|
"leave-active-class": "transition ease-out duration-100",
|
|
@@ -182,48 +202,50 @@ const se = { class: "flex items-center flex-wrap" }, re = {
|
|
|
182
202
|
"leave-to-class": "transform translate-y-2 opacity-0",
|
|
183
203
|
"move-class": "ease-in-out duration-200"
|
|
184
204
|
}, {
|
|
185
|
-
default:
|
|
186
|
-
(a(!0),
|
|
187
|
-
key:
|
|
188
|
-
class:
|
|
189
|
-
|
|
205
|
+
default: W(() => [
|
|
206
|
+
(a(!0), p(H, null, Y(d.value, (t) => (a(), p("li", {
|
|
207
|
+
key: t.id,
|
|
208
|
+
class: _([
|
|
209
|
+
i(k).item,
|
|
190
210
|
{
|
|
191
|
-
"mb-2":
|
|
192
|
-
"mt-2":
|
|
211
|
+
"mb-2": s.value === "bottom",
|
|
212
|
+
"mt-2": s.value === "top"
|
|
193
213
|
}
|
|
194
214
|
]),
|
|
195
|
-
style:
|
|
215
|
+
style: D(t.style),
|
|
216
|
+
onMouseenter: (l) => R(t),
|
|
217
|
+
onMouseleave: (l) => X(t)
|
|
196
218
|
}, [
|
|
197
|
-
|
|
219
|
+
t.icon ? (a(), x(K, {
|
|
198
220
|
key: 0,
|
|
199
221
|
filled: "",
|
|
200
|
-
icon:
|
|
222
|
+
icon: t.icon,
|
|
201
223
|
class: "mr-4 text-[color:var(--x-notification-icon)] dark:text-[color:var(--x-notification-dark-icon)]",
|
|
202
224
|
viewBox: "0 0 20 20"
|
|
203
|
-
}, null, 8, ["icon"])) :
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
225
|
+
}, null, 8, ["icon"])) : y("", !0),
|
|
226
|
+
b("div", ae, [
|
|
227
|
+
t.title ? (a(), p("span", le, C(t.title), 1)) : y("", !0),
|
|
228
|
+
b("span", null, C(t.message), 1)
|
|
207
229
|
]),
|
|
208
|
-
|
|
209
|
-
|
|
230
|
+
O(i(re)),
|
|
231
|
+
t.action ? (a(), p("button", {
|
|
210
232
|
key: 1,
|
|
211
233
|
type: "button",
|
|
212
234
|
class: "ml-3 font-medium cursor-pointer text-[color:var(--x-notification-action)] hover:text-[color:var(--x-notification-action-hover)] dark:text-[color:var(--x-notification-dark-action)] dark:hover:text-[color:var(--x-notification-dark-action-hover)]",
|
|
213
235
|
onClick: () => {
|
|
214
|
-
var
|
|
215
|
-
(
|
|
236
|
+
var l;
|
|
237
|
+
(l = t.action) == null || l.onClick(), h(t);
|
|
216
238
|
}
|
|
217
|
-
}, C(
|
|
218
|
-
|
|
239
|
+
}, C(t.action.label), 9, ne)) : y("", !0),
|
|
240
|
+
t.removable ? (a(), x(K, {
|
|
219
241
|
key: 2,
|
|
220
|
-
icon:
|
|
242
|
+
icon: i(oe),
|
|
221
243
|
class: "text-secondary-400 hover:text-secondary-500 ml-3 cursor-pointer",
|
|
222
244
|
onClick: () => {
|
|
223
|
-
|
|
245
|
+
h(t);
|
|
224
246
|
}
|
|
225
|
-
}, null, 8, ["icon", "onClick"])) :
|
|
226
|
-
],
|
|
247
|
+
}, null, 8, ["icon", "onClick"])) : y("", !0)
|
|
248
|
+
], 46, se))), 128))
|
|
227
249
|
]),
|
|
228
250
|
_: 1
|
|
229
251
|
}, 8, ["class"])
|
|
@@ -233,5 +255,5 @@ const se = { class: "flex items-center flex-wrap" }, re = {
|
|
|
233
255
|
}
|
|
234
256
|
});
|
|
235
257
|
export {
|
|
236
|
-
|
|
258
|
+
he as default
|
|
237
259
|
};
|
|
@@ -2,7 +2,7 @@ import type { ExtractPublicPropTypes } from 'vue';
|
|
|
2
2
|
import { type ThemeComponent } from '../../composables/useTheme';
|
|
3
3
|
declare const progressProps: {
|
|
4
4
|
percentage: {
|
|
5
|
-
type: NumberConstructor;
|
|
5
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
6
6
|
default: number;
|
|
7
7
|
validator: (value: number) => boolean;
|
|
8
8
|
};
|
|
@@ -23,7 +23,7 @@ export interface ProgressTheme extends ThemeComponent<ProgressProps, InternalCla
|
|
|
23
23
|
}
|
|
24
24
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
25
25
|
percentage: {
|
|
26
|
-
type: NumberConstructor;
|
|
26
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
27
27
|
default: number;
|
|
28
28
|
validator: (value: number) => boolean;
|
|
29
29
|
};
|
|
@@ -39,7 +39,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
39
39
|
};
|
|
40
40
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
41
41
|
percentage: {
|
|
42
|
-
type: NumberConstructor;
|
|
42
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
43
43
|
default: number;
|
|
44
44
|
validator: (value: number) => boolean;
|
|
45
45
|
};
|
|
@@ -55,7 +55,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
55
55
|
};
|
|
56
56
|
}>> & Readonly<{}>, {
|
|
57
57
|
color: string;
|
|
58
|
-
percentage: number;
|
|
58
|
+
percentage: string | number;
|
|
59
59
|
gradient: boolean;
|
|
60
60
|
animate: boolean;
|
|
61
61
|
thick: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as m, openBlock as s, createElementBlock as n, normalizeStyle as t, unref as o, normalizeClass as a, createElementVNode as
|
|
1
|
+
import { defineComponent as m, openBlock as s, createElementBlock as n, normalizeStyle as t, unref as o, normalizeClass as a, createElementVNode as u, createCommentVNode as c } from "vue";
|
|
2
2
|
import { useColors as g } from "../../composables/useColors.js";
|
|
3
3
|
import { useTheme as f } from "../../composables/useTheme.js";
|
|
4
4
|
const y = {
|
|
5
5
|
...g.props("primary"),
|
|
6
6
|
percentage: {
|
|
7
|
-
type: Number,
|
|
7
|
+
type: [Number, String],
|
|
8
8
|
default: 0,
|
|
9
9
|
validator: (r) => r >= 0 && r <= 100
|
|
10
10
|
},
|
|
@@ -14,7 +14,7 @@ const y = {
|
|
|
14
14
|
default: !0
|
|
15
15
|
},
|
|
16
16
|
thick: Boolean
|
|
17
|
-
}, h = { name: "XProgress" },
|
|
17
|
+
}, h = { name: "XProgress" }, N = /* @__PURE__ */ m({
|
|
18
18
|
...h,
|
|
19
19
|
props: y,
|
|
20
20
|
setup(r) {
|
|
@@ -26,7 +26,7 @@ const y = {
|
|
|
26
26
|
o(d).wrapper
|
|
27
27
|
])
|
|
28
28
|
}, [
|
|
29
|
-
|
|
29
|
+
u("div", {
|
|
30
30
|
class: a(["h-full", [
|
|
31
31
|
e.gradient ? "bg-gradient-to-r" : "bg-[color:var(--x-progress-bg)]",
|
|
32
32
|
{
|
|
@@ -39,12 +39,12 @@ const y = {
|
|
|
39
39
|
key: 0,
|
|
40
40
|
class: a(["absolute h-full bg-secondary-100 dark:bg-secondary-700 right-0 top-0", { "duration-150 transition-[width]": e.animate }]),
|
|
41
41
|
style: t({
|
|
42
|
-
width: `${100 - e.percentage}%`
|
|
42
|
+
width: `${100 - Number(e.percentage)}%`
|
|
43
43
|
})
|
|
44
|
-
}, null, 6)) :
|
|
44
|
+
}, null, 6)) : c("", !0)
|
|
45
45
|
], 6));
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
export {
|
|
49
|
-
|
|
49
|
+
N as default
|
|
50
50
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as v, ref as w, toRefs as y, openBlock as $, createElementBlock as z, normalizeClass as r, unref as o, normalizeStyle as E, createElementVNode as S, renderSlot as B } from "vue";
|
|
2
|
-
import { useScroll as b, useResizeObserver as g, useEventListener as k } from "../../node_modules/.pnpm/@vueuse_core@
|
|
2
|
+
import { useScroll as b, useResizeObserver as g, useEventListener as k } from "../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
|
|
3
3
|
import { useTheme as C } from "../../composables/useTheme.js";
|
|
4
4
|
const L = {
|
|
5
5
|
shadow: Boolean,
|
|
@@ -4,6 +4,7 @@ declare const selectProps: {
|
|
|
4
4
|
placeholder: StringConstructor;
|
|
5
5
|
options: PropType<SelectOption[]>;
|
|
6
6
|
multiple: BooleanConstructor;
|
|
7
|
+
truncate: BooleanConstructor;
|
|
7
8
|
flat: BooleanConstructor;
|
|
8
9
|
native: BooleanConstructor;
|
|
9
10
|
filterable: BooleanConstructor;
|
|
@@ -64,10 +65,12 @@ declare const selectProps: {
|
|
|
64
65
|
export type SelectOption = {
|
|
65
66
|
value: number | string;
|
|
66
67
|
label: string;
|
|
68
|
+
prefix?: string;
|
|
69
|
+
suffix?: string;
|
|
67
70
|
disabled?: boolean;
|
|
68
71
|
};
|
|
69
72
|
export type SelectProps = ExtractPublicPropTypes<typeof selectProps>;
|
|
70
|
-
type InternalClasses = 'wrapper' | 'box' | 'content' | 'search' | 'contentBody' | 'iconWrapper' | 'icon';
|
|
73
|
+
type InternalClasses = 'wrapper' | 'box' | 'truncateCounter' | 'content' | 'search' | 'contentBody' | 'iconWrapper' | 'icon';
|
|
71
74
|
type InternalExtraData = {
|
|
72
75
|
errorInternal: Ref<boolean>;
|
|
73
76
|
};
|
|
@@ -77,6 +80,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
|
|
|
77
80
|
placeholder: StringConstructor;
|
|
78
81
|
options: PropType<SelectOption[]>;
|
|
79
82
|
multiple: BooleanConstructor;
|
|
83
|
+
truncate: BooleanConstructor;
|
|
80
84
|
flat: BooleanConstructor;
|
|
81
85
|
native: BooleanConstructor;
|
|
82
86
|
filterable: BooleanConstructor;
|
|
@@ -143,6 +147,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
|
|
|
143
147
|
placeholder: StringConstructor;
|
|
144
148
|
options: PropType<SelectOption[]>;
|
|
145
149
|
multiple: BooleanConstructor;
|
|
150
|
+
truncate: BooleanConstructor;
|
|
146
151
|
flat: BooleanConstructor;
|
|
147
152
|
native: BooleanConstructor;
|
|
148
153
|
filterable: BooleanConstructor;
|
|
@@ -216,6 +221,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
|
|
|
216
221
|
rules: unknown[];
|
|
217
222
|
skipFormRegistry: boolean;
|
|
218
223
|
multiple: boolean;
|
|
224
|
+
truncate: boolean;
|
|
219
225
|
native: boolean;
|
|
220
226
|
filterable: boolean;
|
|
221
227
|
filterPlaceholder: string;
|
|
@@ -224,6 +230,42 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
|
|
|
224
230
|
virtualListOverscan: number;
|
|
225
231
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
226
232
|
"content-header"?(_: {}): any;
|
|
233
|
+
prefix?(_: {
|
|
234
|
+
item: {
|
|
235
|
+
value: string | number;
|
|
236
|
+
label: string;
|
|
237
|
+
active: boolean;
|
|
238
|
+
prefix: string | undefined;
|
|
239
|
+
suffix: string | undefined;
|
|
240
|
+
disabled: boolean | undefined;
|
|
241
|
+
iconRight: string | undefined;
|
|
242
|
+
onClick: () => void;
|
|
243
|
+
};
|
|
244
|
+
}): any;
|
|
245
|
+
label?(_: {
|
|
246
|
+
item: {
|
|
247
|
+
value: string | number;
|
|
248
|
+
label: string;
|
|
249
|
+
active: boolean;
|
|
250
|
+
prefix: string | undefined;
|
|
251
|
+
suffix: string | undefined;
|
|
252
|
+
disabled: boolean | undefined;
|
|
253
|
+
iconRight: string | undefined;
|
|
254
|
+
onClick: () => void;
|
|
255
|
+
};
|
|
256
|
+
}): any;
|
|
257
|
+
suffix?(_: {
|
|
258
|
+
item: {
|
|
259
|
+
value: string | number;
|
|
260
|
+
label: string;
|
|
261
|
+
active: boolean;
|
|
262
|
+
prefix: string | undefined;
|
|
263
|
+
suffix: string | undefined;
|
|
264
|
+
disabled: boolean | undefined;
|
|
265
|
+
iconRight: string | undefined;
|
|
266
|
+
onClick: () => void;
|
|
267
|
+
};
|
|
268
|
+
}): any;
|
|
227
269
|
"content-footer"?(_: {}): any;
|
|
228
270
|
icon?(_: {}): any;
|
|
229
271
|
}>;
|