@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.
Files changed (101) hide show
  1. package/docs/components/menu/DocsMenu.vue +1 -0
  2. package/docs/pages/component/form/usage.vue +2 -0
  3. package/docs/pages/component/menu/usage.vue +2 -0
  4. package/docs/pages/component/select/index.vue +7 -0
  5. package/docs/pages/component/select/multiple.vue +42 -0
  6. package/docs/pages/component/select/usage.vue +8 -12
  7. package/docs/pages/component/table/virtual.vue +19 -6
  8. package/docs/pages/component/toggle/index.vue +1 -1
  9. package/docs/pages/component/tooltip/index.vue +1 -1
  10. package/docs/pages/component/upload/index.vue +29 -0
  11. package/docs/pages/component/upload/usage.vue +115 -0
  12. package/docs/search/components.json +1 -1
  13. package/lib/common/icons.d.ts +2 -0
  14. package/lib/common/icons.js +17 -15
  15. package/lib/components/button/theme/Button.base.theme.js +30 -27
  16. package/lib/components/checkbox/Checkbox.vue2.js +9 -9
  17. package/lib/components/datepicker/Datepicker.vue.d.ts +4 -4
  18. package/lib/components/datepicker/Datepicker.vue.js +1 -1
  19. package/lib/components/drawer/Drawer.vue.js +1 -17
  20. package/lib/components/form/Form.vue.d.ts +4 -4
  21. package/lib/components/form/Form.vue.js +34 -34
  22. package/lib/components/formGroup/FormGroup.vue.d.ts +1 -1
  23. package/lib/components/formGroup/FormGroup.vue.js +39 -37
  24. package/lib/components/index.d.ts +1 -0
  25. package/lib/components/index.js +68 -66
  26. package/lib/components/label/theme/Label.base.theme.js +7 -7
  27. package/lib/components/menu/Menu.vue.d.ts +2 -0
  28. package/lib/components/menu/MenuItem.vue.d.ts +15 -3
  29. package/lib/components/menu/MenuItem.vue.js +1 -1
  30. package/lib/components/menu/MenuItem.vue2.js +43 -37
  31. package/lib/components/modal/Modal.vue.d.ts +4 -4
  32. package/lib/components/modal/Modal.vue.js +38 -34
  33. package/lib/components/notifications/Notifications.vue.d.ts +15 -0
  34. package/lib/components/notifications/Notifications.vue.js +149 -127
  35. package/lib/components/progress/Progress.vue.d.ts +4 -4
  36. package/lib/components/progress/Progress.vue.js +7 -7
  37. package/lib/components/scroll/Scroll.vue2.js +1 -1
  38. package/lib/components/select/Select.vue.d.ts +43 -1
  39. package/lib/components/select/Select.vue.js +358 -258
  40. package/lib/components/select/theme/Select.base.theme.js +1 -0
  41. package/lib/components/tab/Tab.vue.js +1 -1
  42. package/lib/components/tab/TabGroup.vue.js +2 -2
  43. package/lib/components/table/TableCell.vue.d.ts +1 -1
  44. package/lib/components/table/theme/TableHead.base.theme.js +1 -1
  45. package/lib/components/table/theme/TableHeader.base.theme.js +1 -1
  46. package/lib/components/tag/Tag.vue.js +23 -21
  47. package/lib/components/textarea/Textarea.vue.js +1 -1
  48. package/lib/components/upload/Upload.vue.d.ts +195 -0
  49. package/lib/components/upload/Upload.vue.js +264 -0
  50. package/lib/components/upload/Upload.vue2.js +4 -0
  51. package/lib/components/upload/__tests__/Upload.spec.d.ts +1 -0
  52. package/lib/components/upload/index.d.ts +2 -0
  53. package/lib/components/upload/theme/Upload.base.theme.d.ts +3 -0
  54. package/lib/components/upload/theme/Upload.base.theme.js +8 -0
  55. package/lib/components/upload/theme/Upload.carbon.theme.d.ts +3 -0
  56. package/lib/components/upload/theme/Upload.carbon.theme.js +5 -0
  57. package/lib/composables/useVirtualList.js +56 -53
  58. package/lib/index.js +43 -41
  59. package/lib/index.umd.js +4 -4
  60. 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
  61. 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
  62. package/lib/theme.d.ts +2 -1
  63. package/lib/themes/base/components.d.ts +1 -0
  64. package/lib/themes/base/components.js +23 -21
  65. package/lib/themes/carbon/components.d.ts +1 -0
  66. package/lib/themes/carbon/components.js +23 -21
  67. package/lib/version.d.ts +1 -1
  68. package/lib/version.js +1 -1
  69. package/package.json +3 -3
  70. package/src/common/icons.ts +2 -0
  71. package/src/components/button/theme/Button.base.theme.ts +6 -3
  72. package/src/components/checkbox/Checkbox.vue +5 -5
  73. package/src/components/drawer/Drawer.vue +0 -16
  74. package/src/components/form/Form.vue +10 -4
  75. package/src/components/formGroup/FormGroup.vue +2 -0
  76. package/src/components/index.ts +1 -0
  77. package/src/components/label/theme/Label.base.theme.ts +7 -5
  78. package/src/components/menu/Menu.vue +2 -0
  79. package/src/components/menu/MenuItem.vue +8 -6
  80. package/src/components/modal/Modal.vue +6 -1
  81. package/src/components/notifications/Notifications.vue +34 -4
  82. package/src/components/progress/Progress.vue +2 -2
  83. package/src/components/select/Select.vue +166 -68
  84. package/src/components/select/theme/Select.base.theme.ts +2 -0
  85. package/src/components/table/theme/TableHead.base.theme.ts +1 -1
  86. package/src/components/table/theme/TableHeader.base.theme.ts +1 -1
  87. package/src/components/tag/Tag.vue +12 -10
  88. package/src/components/upload/Upload.vue +365 -0
  89. package/src/components/upload/__tests__/Upload.spec.ts +11 -0
  90. package/src/components/upload/index.ts +2 -0
  91. package/src/components/upload/theme/Upload.base.theme.ts +9 -0
  92. package/src/components/upload/theme/Upload.carbon.theme.ts +7 -0
  93. package/src/composables/useInputtable.ts +1 -1
  94. package/src/composables/useVirtualList.ts +8 -5
  95. package/src/theme.ts +2 -0
  96. package/src/themes/base/components.ts +1 -0
  97. package/src/themes/carbon/components.ts +1 -0
  98. package/src/version.ts +1 -1
  99. package/volar.d.ts +1 -0
  100. 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
  101. 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 f, provide as O, watch as $, openBlock as a, createElementBlock as m, Fragment as K, renderSlot as q, createBlock as k, Teleport as J, createElementVNode as x, normalizeStyle as A, unref as l, normalizeClass as b, createVNode as D, TransitionGroup as Q, withCtx as U, renderList as W, createCommentVNode as g, toDisplayString as C } from "vue";
2
- import { injectNotificationKey as Y } from "../../composables/keys.js";
3
- import { useColors as H } from "../../composables/useColors.js";
4
- import { useCSS as Z } from "../../composables/useCSS.js";
5
- import { useTheme as ee } from "../../composables/useTheme.js";
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 E from "../icon/Icon.vue.js";
8
- import te from "../spacer/Spacer.js";
9
- const se = { class: "flex items-center flex-wrap" }, re = {
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
- }, ae = ["onClick"], le = {
13
- ...H.props("primary"),
12
+ }, ne = ["onClick"], ie = {
13
+ ...A.props("primary"),
14
14
  align: {
15
15
  type: String,
16
16
  default: "right",
17
- validator: (n) => _.align.includes(n)
17
+ validator: (c) => M.align.includes(c)
18
18
  },
19
19
  position: {
20
20
  type: String,
21
21
  default: "bottom",
22
- validator: (n) => _.position.includes(n)
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: Y
38
+ default: Z
35
39
  }
36
- }, _ = {
40
+ }, M = {
37
41
  align: ["left", "right"],
38
42
  position: ["bottom", "top"]
39
- }, ne = {
43
+ }, ce = {
40
44
  name: "XNotifications",
41
- validators: _
42
- }, ge = /* @__PURE__ */ I({
43
- ...ne,
44
- props: le,
45
- setup(n, { expose: L }) {
46
- const s = n, i = f(s.align), r = f(s.position), p = f([]), z = f(null), R = Z("notification"), M = H();
47
- O(s.injectKey, {
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: S,
50
- warn: d,
51
- error: P,
52
- warning: d,
53
- success: N
54
- }), $(() => s.align, (o) => {
55
- i.value = o;
56
- }), $(() => s.position, (o) => {
57
- r.value = o;
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(o) {
60
- const t = typeof o == "string", e = {
61
- message: t ? o : void 0
63
+ function w(e) {
64
+ const o = typeof e == "string", t = {
65
+ message: o ? e : void 0
62
66
  };
63
- c(t ? e : {
64
- ...e,
65
- ...o
67
+ m(o ? t : {
68
+ ...t,
69
+ ...e
66
70
  });
67
71
  }
68
- function S(o) {
69
- const t = typeof o == "string", e = {
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: t ? o : void 0
76
+ message: o ? e : void 0
73
77
  };
74
- c(t ? e : {
75
- ...e,
76
- ...o
78
+ m(o ? t : {
79
+ ...t,
80
+ ...e
77
81
  });
78
82
  }
79
- function N(o) {
80
- const t = typeof o == "string", e = {
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: t ? o : void 0
87
+ message: o ? e : void 0
84
88
  };
85
- c(t ? e : {
86
- ...e,
87
- ...o
89
+ m(o ? t : {
90
+ ...t,
91
+ ...e
88
92
  });
89
93
  }
90
- function d(o) {
91
- const t = typeof o == "string", e = {
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: t ? o : void 0
98
+ message: o ? e : void 0
95
99
  };
96
- c(t ? e : {
97
- ...e,
98
- ...o
100
+ m(o ? t : {
101
+ ...t,
102
+ ...e
99
103
  });
100
104
  }
101
- function P(o) {
102
- const t = typeof o == "string", e = {
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: t ? o : void 0
109
+ message: o ? e : void 0
106
110
  };
107
- c(t ? e : {
108
- ...e,
109
- ...o
111
+ m(o ? t : {
112
+ ...t,
113
+ ...e
110
114
  });
111
115
  }
112
- function c(o) {
113
- var V, j;
114
- const e = {
116
+ function m(e) {
117
+ var $;
118
+ const t = {
115
119
  ...{
116
120
  id: Date.now(),
117
- iconColor: s.color,
118
- timeout: s.timeout,
119
- align: i.value,
120
- position: r.value,
121
- removable: s.removable
121
+ iconColor: r.color,
122
+ timeout: r.timeout,
123
+ align: u.value,
124
+ position: s.value,
125
+ removable: r.removable
122
126
  },
123
- ...o
127
+ ...e
124
128
  };
125
- i.value = e.align, r.value = e.position;
126
- const u = M.getPalette(e.iconColor), v = M.getPalette(((V = e.action) == null ? void 0 : V.color) || "primary"), T = R.variables({
127
- icon: u[400],
128
- action: v[400],
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: v[500]
134
+ action: f[500]
131
135
  },
132
136
  dark: {
133
- icon: u[500],
134
- action: v[500],
137
+ icon: l[500],
138
+ action: f[500],
135
139
  hover: {
136
- action: v[600]
140
+ action: f[600]
137
141
  }
138
142
  }
139
143
  });
140
- e.style = Object.keys(T).map((B) => `${B}: ${T[B]}`).join(";"), p.value.push(e), (j = z.value) == null || j.scrollTo({ top: 0, behavior: "smooth" }), e.timeout && X(e, e.timeout);
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 y(o) {
143
- p.value = p.value.filter((t) => t.id !== o.id);
161
+ function R(e) {
162
+ r.pauseOnHover && e.timer && (clearTimeout(e.timer), e.timer = void 0);
144
163
  }
145
- function X(o, t) {
146
- setTimeout(() => {
147
- y(o);
148
- }, t);
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: h, className: G } = ee("Notifications", {}, s);
151
- return L({ log: w, info: S, success: N, warn: d, warning: d, error: P }), (o, t) => (a(), m(K, null, [
152
- q(o.$slots, "default"),
153
- (a(), k(J, { to: "body" }, [
154
- x("div", {
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: A(l(F)),
158
- class: b([
159
- l(G),
160
- l(h).wrapper,
177
+ style: D(i(F)),
178
+ class: _([
179
+ i(G),
180
+ i(k).wrapper,
161
181
  {
162
182
  // align
163
- "left-0": i.value === "left",
164
- "right-0": i.value === "right",
183
+ "left-0": u.value === "left",
184
+ "right-0": u.value === "right",
165
185
  // position
166
- "top-0": r.value === "top",
167
- "bottom-0": r.value === "bottom"
186
+ "top-0": s.value === "top",
187
+ "bottom-0": s.value === "bottom"
168
188
  }
169
189
  ])
170
190
  }, [
171
- D(Q, {
191
+ O(U, {
172
192
  tag: "ul",
173
- class: b([
174
- l(h).list,
175
- { "flex-col-reverse": r.value }
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: U(() => [
186
- (a(!0), m(K, null, W(p.value, (e) => (a(), m("li", {
187
- key: e.id,
188
- class: b([
189
- l(h).item,
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": r.value === "bottom",
192
- "mt-2": r.value === "top"
211
+ "mb-2": s.value === "bottom",
212
+ "mt-2": s.value === "top"
193
213
  }
194
214
  ]),
195
- style: A(e.style)
215
+ style: D(t.style),
216
+ onMouseenter: (l) => R(t),
217
+ onMouseleave: (l) => X(t)
196
218
  }, [
197
- e.icon ? (a(), k(E, {
219
+ t.icon ? (a(), x(K, {
198
220
  key: 0,
199
221
  filled: "",
200
- icon: e.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"])) : g("", !0),
204
- x("div", se, [
205
- e.title ? (a(), m("span", re, C(e.title), 1)) : g("", !0),
206
- x("span", null, C(e.message), 1)
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
- D(l(te)),
209
- e.action ? (a(), m("button", {
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 u;
215
- (u = e.action) == null || u.onClick(), y(e);
236
+ var l;
237
+ (l = t.action) == null || l.onClick(), h(t);
216
238
  }
217
- }, C(e.action.label), 9, ae)) : g("", !0),
218
- e.removable ? (a(), k(E, {
239
+ }, C(t.action.label), 9, ne)) : y("", !0),
240
+ t.removable ? (a(), x(K, {
219
241
  key: 2,
220
- icon: l(oe),
242
+ icon: i(oe),
221
243
  class: "text-secondary-400 hover:text-secondary-500 ml-3 cursor-pointer",
222
244
  onClick: () => {
223
- y(e);
245
+ h(t);
224
246
  }
225
- }, null, 8, ["icon", "onClick"])) : g("", !0)
226
- ], 6))), 128))
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
- ge as default
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 c, createCommentVNode as u } from "vue";
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" }, v = /* @__PURE__ */ m({
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
- c("div", {
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)) : u("", !0)
44
+ }, null, 6)) : c("", !0)
45
45
  ], 6));
46
46
  }
47
47
  });
48
48
  export {
49
- v as default
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@10.2.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
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
  }>;