@webx-ui/core 0.1.0 → 0.2.0

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/dist/index.js CHANGED
@@ -1,23 +1,23 @@
1
- import { defineComponent as E, computed as u, openBlock as n, createBlock as Q, resolveDynamicComponent as xe, mergeProps as K, withCtx as H, createElementBlock as d, renderSlot as P, createCommentVNode as W, useSlots as Ce, normalizeClass as U, createElementVNode as I, createTextVNode as ee, toDisplayString as N, inject as te, provide as ne, useModel as G, ref as D, onMounted as ke, watch as Z, unref as s, mergeModels as S, Fragment as X, renderList as q, createVNode as F, normalizeStyle as ae, withModifiers as le, createSlots as ue, normalizeProps as se, guardReactiveProps as de, toRef as oe, withDirectives as Ve, withKeys as Ie, vModelText as Te, nextTick as be } from "vue";
2
- import { VueDatePicker as ge } from "@vuepic/vue-datepicker";
3
- import { colorToHex as pe, getAreaBackgroundStyle as ze, getSliderBackgroundStyle as We, PopoverRoot as Se, PopoverAnchor as Ae, PopoverPortal as Le, PopoverContent as Re, ColorAreaRoot as He, ColorAreaArea as De, ColorAreaThumb as Fe, ColorSliderRoot as Pe, ColorSliderTrack as Ne, ColorSliderThumb as Ue, convertToHsb as he, parseColor as Ee, ComboboxRoot as Oe, ComboboxAnchor as je, ComboboxInput as Ge, ComboboxTrigger as qe, ComboboxPortal as Ke, ComboboxContent as Ye, ComboboxViewport as Xe, ComboboxEmpty as Qe, ComboboxItem as Je, ComboboxItemIndicator as Ze, SliderRoot as ea, SliderTrack as aa, SliderRange as la, SliderThumb as ta } from "reka-ui";
4
- import { useEditor as oa, EditorContent as ia } from "@tiptap/vue-3";
5
- import na from "@tiptap/starter-kit";
6
- import { TableKit as ua } from "@tiptap/extension-table";
7
- import sa from "@tiptap/extension-image";
8
- import da from "@tiptap/extension-youtube";
9
- import ra from "@tiptap/extension-file-handler";
10
- const ca = {
1
+ import { defineComponent as J, computed as d, openBlock as l, createBlock as ie, resolveDynamicComponent as Ge, mergeProps as te, withCtx as Y, createElementBlock as u, renderSlot as N, createCommentVNode as C, useSlots as qe, normalizeClass as F, createElementVNode as x, createTextVNode as ae, toDisplayString as D, inject as ce, provide as xe, useModel as G, ref as q, onMounted as Ce, watch as ne, unref as b, mergeModels as R, Fragment as K, renderList as X, createVNode as O, normalizeStyle as ee, withModifiers as de, createSlots as ge, normalizeProps as ke, guardReactiveProps as we, toRef as me, withDirectives as ma, withKeys as pa, vModelText as ha, onBeforeUnmount as ya, nextTick as Ue } from "vue";
2
+ import { VueDatePicker as Ye } from "@vuepic/vue-datepicker";
3
+ import { colorToHex as Ee, getAreaBackgroundStyle as xa, getSliderBackgroundStyle as ga, PopoverRoot as ka, PopoverAnchor as wa, PopoverPortal as $a, PopoverContent as _a, ColorAreaRoot as Ba, ColorAreaArea as Ma, ColorAreaThumb as Ca, ColorSliderRoot as Sa, ColorSliderTrack as Ta, ColorSliderThumb as Ia, convertToHsb as Oe, parseColor as Va, ComboboxRoot as za, ComboboxAnchor as Pa, ComboboxInput as Wa, ComboboxTrigger as Aa, ComboboxPortal as La, ComboboxContent as Ra, ComboboxViewport as Fa, ComboboxEmpty as Ha, ComboboxItem as Da, ComboboxItemIndicator as Na, SliderRoot as Ua, SliderTrack as Ea, SliderRange as Oa, SliderThumb as ja } from "reka-ui";
4
+ import { useEditor as Ka, EditorContent as Ga } from "@tiptap/vue-3";
5
+ import qa from "@tiptap/starter-kit";
6
+ import { TableKit as Ya } from "@tiptap/extension-table";
7
+ import Xa from "@tiptap/extension-image";
8
+ import Ja from "@tiptap/extension-youtube";
9
+ import Za from "@tiptap/extension-file-handler";
10
+ const Qa = {
11
11
  key: 0,
12
12
  class: "wx-button__spinner",
13
13
  "aria-hidden": "true"
14
- }, va = {
14
+ }, et = {
15
15
  key: 1,
16
16
  class: "wx-button__icon"
17
- }, fa = {
17
+ }, at = {
18
18
  key: 2,
19
19
  class: "wx-button__label"
20
- }, ma = /* @__PURE__ */ E({
20
+ }, tt = /* @__PURE__ */ J({
21
21
  name: "WxButton",
22
22
  inheritAttrs: !1,
23
23
  __name: "Button",
@@ -34,8 +34,8 @@ const ca = {
34
34
  nativeType: { default: "button" }
35
35
  },
36
36
  emits: ["click"],
37
- setup(e, { emit: y }) {
38
- const a = e, t = y, i = u(() => a.disabled || a.loading), l = u(() => a.href ? "a" : "button"), o = u(() => [
37
+ setup(e, { emit: _ }) {
38
+ const a = e, n = _, s = d(() => a.disabled || a.loading), t = d(() => a.href ? "a" : "button"), o = d(() => [
39
39
  "wx-button",
40
40
  `wx-button--${a.type}`,
41
41
  `wx-button--${a.variant}`,
@@ -44,61 +44,61 @@ const ca = {
44
44
  "wx-button--block": a.block,
45
45
  "wx-button--round": a.round,
46
46
  "wx-button--loading": a.loading,
47
- "is-disabled": i.value
47
+ "is-disabled": s.value
48
48
  }
49
- ]), v = u(
49
+ ]), c = d(
50
50
  () => a.href ? {
51
- href: i.value ? void 0 : a.href,
51
+ href: s.value ? void 0 : a.href,
52
52
  target: a.target,
53
53
  role: "button",
54
- "aria-disabled": i.value ? "true" : void 0,
55
- tabindex: i.value ? -1 : void 0
54
+ "aria-disabled": s.value ? "true" : void 0,
55
+ tabindex: s.value ? -1 : void 0
56
56
  } : {
57
57
  type: a.nativeType,
58
- disabled: i.value
58
+ disabled: s.value
59
59
  }
60
60
  );
61
- function m(b) {
62
- if (i.value) {
63
- b.preventDefault(), b.stopPropagation();
61
+ function p(h) {
62
+ if (s.value) {
63
+ h.preventDefault(), h.stopPropagation();
64
64
  return;
65
65
  }
66
- t("click", b);
66
+ n("click", h);
67
67
  }
68
- return (b, c) => (n(), Q(xe(l.value), K({ ...v.value, ...b.$attrs }, {
68
+ return (h, f) => (l(), ie(Ge(t.value), te({ ...c.value, ...h.$attrs }, {
69
69
  class: o.value,
70
70
  "aria-busy": e.loading || void 0,
71
- onClick: m
71
+ onClick: p
72
72
  }), {
73
- default: H(() => [
74
- e.loading ? (n(), d("span", ca)) : b.$slots.icon ? (n(), d("span", va, [
75
- P(b.$slots, "icon", {}, void 0, !0)
76
- ])) : W("", !0),
77
- b.$slots.default ? (n(), d("span", fa, [
78
- P(b.$slots, "default", {}, void 0, !0)
79
- ])) : W("", !0)
73
+ default: Y(() => [
74
+ e.loading ? (l(), u("span", Qa)) : h.$slots.icon ? (l(), u("span", et, [
75
+ N(h.$slots, "icon", {}, void 0, !0)
76
+ ])) : C("", !0),
77
+ h.$slots.default ? (l(), u("span", at, [
78
+ N(h.$slots, "default", {}, void 0, !0)
79
+ ])) : C("", !0)
80
80
  ]),
81
81
  _: 3
82
82
  }, 16, ["class", "aria-busy"]));
83
83
  }
84
- }), j = (e, y) => {
84
+ }), Q = (e, _) => {
85
85
  const a = e.__vccOpts || e;
86
- for (const [t, i] of y)
87
- a[t] = i;
86
+ for (const [n, s] of _)
87
+ a[n] = s;
88
88
  return a;
89
- }, ba = /* @__PURE__ */ j(ma, [["__scopeId", "data-v-11c2b24d"]]), pa = {
89
+ }, lt = /* @__PURE__ */ Q(tt, [["__scopeId", "data-v-11c2b24d"]]), ot = {
90
90
  key: 0,
91
91
  class: "wx-card__header"
92
- }, ha = { class: "wx-card__title" }, ya = {
92
+ }, it = { class: "wx-card__title" }, nt = {
93
93
  key: 0,
94
94
  class: "wx-card__extra"
95
- }, xa = { class: "wx-card__body" }, ka = {
95
+ }, st = { class: "wx-card__body" }, ut = {
96
96
  key: 0,
97
97
  class: "wx-card__layout"
98
- }, ga = { class: "wx-card__sidebar" }, wa = { class: "wx-card__content" }, $a = {
98
+ }, dt = { class: "wx-card__sidebar" }, rt = { class: "wx-card__content" }, ct = {
99
99
  key: 1,
100
100
  class: "wx-card__footer"
101
- }, _a = /* @__PURE__ */ E({
101
+ }, vt = /* @__PURE__ */ J({
102
102
  name: "WxCard",
103
103
  __name: "Card",
104
104
  props: {
@@ -108,88 +108,88 @@ const ca = {
108
108
  bordered: { type: Boolean, default: !1 }
109
109
  },
110
110
  setup(e) {
111
- const y = e, a = Ce(), t = u(() => !!(y.title || a.header || a.extra)), i = u(() => !!a.sidebar), l = u(() => [
111
+ const _ = e, a = qe(), n = d(() => !!(_.title || a.header || a.extra)), s = d(() => !!a.sidebar), t = d(() => [
112
112
  "wx-card",
113
- `wx-card--shadow-${y.shadow}`,
114
- `wx-card--padding-${y.padding}`,
113
+ `wx-card--shadow-${_.shadow}`,
114
+ `wx-card--padding-${_.padding}`,
115
115
  {
116
- "wx-card--bordered": y.bordered,
117
- "wx-card--with-sidebar": i.value
116
+ "wx-card--bordered": _.bordered,
117
+ "wx-card--with-sidebar": s.value
118
118
  }
119
119
  ]);
120
- return (o, v) => (n(), d("section", {
121
- class: U(l.value)
120
+ return (o, c) => (l(), u("section", {
121
+ class: F(t.value)
122
122
  }, [
123
- t.value ? (n(), d("header", pa, [
124
- I("div", ha, [
125
- P(o.$slots, "header", {}, () => [
126
- ee(N(e.title), 1)
123
+ n.value ? (l(), u("header", ot, [
124
+ x("div", it, [
125
+ N(o.$slots, "header", {}, () => [
126
+ ae(D(e.title), 1)
127
127
  ], !0)
128
128
  ]),
129
- o.$slots.extra ? (n(), d("div", ya, [
130
- P(o.$slots, "extra", {}, void 0, !0)
131
- ])) : W("", !0)
132
- ])) : W("", !0),
133
- I("div", xa, [
134
- i.value ? (n(), d("div", ka, [
135
- I("aside", ga, [
136
- P(o.$slots, "sidebar", {}, void 0, !0)
129
+ o.$slots.extra ? (l(), u("div", nt, [
130
+ N(o.$slots, "extra", {}, void 0, !0)
131
+ ])) : C("", !0)
132
+ ])) : C("", !0),
133
+ x("div", st, [
134
+ s.value ? (l(), u("div", ut, [
135
+ x("aside", dt, [
136
+ N(o.$slots, "sidebar", {}, void 0, !0)
137
137
  ]),
138
- I("div", wa, [
139
- P(o.$slots, "default", {}, void 0, !0)
138
+ x("div", rt, [
139
+ N(o.$slots, "default", {}, void 0, !0)
140
140
  ])
141
- ])) : P(o.$slots, "default", {}, void 0, !0, 1)
141
+ ])) : N(o.$slots, "default", {}, void 0, !0, 1)
142
142
  ]),
143
- o.$slots.footer ? (n(), d("footer", $a, [
144
- P(o.$slots, "footer", {}, void 0, !0)
145
- ])) : W("", !0)
143
+ o.$slots.footer ? (l(), u("footer", ct, [
144
+ N(o.$slots, "footer", {}, void 0, !0)
145
+ ])) : C("", !0)
146
146
  ], 2));
147
147
  }
148
- }), Ba = /* @__PURE__ */ j(_a, [["__scopeId", "data-v-604cd918"]]), ce = /* @__PURE__ */ Symbol("wx-form"), we = /* @__PURE__ */ Symbol("wx-form-item");
149
- let ye = 0;
150
- function ve(e = "wx") {
151
- return ye += 1, `${e}-${ye}`;
148
+ }), ft = /* @__PURE__ */ Q(vt, [["__scopeId", "data-v-604cd918"]]), Se = /* @__PURE__ */ Symbol("wx-form"), Xe = /* @__PURE__ */ Symbol("wx-form-item");
149
+ let je = 0;
150
+ function Te(e = "wx") {
151
+ return je += 1, `${e}-${je}`;
152
152
  }
153
- function Y(e) {
154
- const y = te(ce, null), a = te(we, null), t = ve("wx-control"), i = u(() => e.id ?? a?.id.value ?? t), l = u(
155
- () => e.disabled || a?.disabled.value || y?.disabled.value || !1
156
- ), o = u(
157
- () => e.size ?? a?.size.value ?? y?.size.value ?? "md"
158
- ), v = u(() => e.status && e.status !== "default" ? e.status : a?.status.value ?? "default"), m = u(() => a?.describedBy.value);
159
- return { id: i, disabled: l, size: o, status: v, describedBy: m, form: y, item: a };
153
+ function le(e) {
154
+ const _ = ce(Se, null), a = ce(Xe, null), n = Te("wx-control"), s = d(() => e.id ?? a?.id.value ?? n), t = d(
155
+ () => e.disabled || a?.disabled.value || _?.disabled.value || !1
156
+ ), o = d(
157
+ () => e.size ?? a?.size.value ?? _?.size.value ?? "md"
158
+ ), c = d(() => e.status && e.status !== "default" ? e.status : a?.status.value ?? "default"), p = d(() => a?.describedBy.value);
159
+ return { id: s, disabled: t, size: o, status: c, describedBy: p, form: _, item: a };
160
160
  }
161
- const $e = /* @__PURE__ */ Symbol("wx-checkbox-group"), _e = /* @__PURE__ */ Symbol("wx-radio-group");
162
- function Ma(e) {
163
- ne(we, e);
161
+ const Je = /* @__PURE__ */ Symbol("wx-checkbox-group"), Ze = /* @__PURE__ */ Symbol("wx-radio-group");
162
+ function bt(e) {
163
+ xe(Xe, e);
164
164
  }
165
- const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby"], Va = {
165
+ const mt = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby"], pt = {
166
166
  class: "wx-checkbox__box",
167
167
  "aria-hidden": "true"
168
- }, Ia = {
168
+ }, ht = {
169
169
  class: "wx-checkbox__mark",
170
170
  viewBox: "0 0 16 16",
171
171
  fill: "none"
172
- }, Ta = {
172
+ }, yt = {
173
173
  key: 0,
174
174
  d: "M4 8h8",
175
175
  stroke: "currentColor",
176
176
  "stroke-width": "2",
177
177
  "stroke-linecap": "round"
178
- }, za = {
178
+ }, xt = {
179
179
  key: 1,
180
180
  d: "M3.5 8.5l3 3 6-6",
181
181
  stroke: "currentColor",
182
182
  "stroke-width": "2",
183
183
  "stroke-linecap": "round",
184
184
  "stroke-linejoin": "round"
185
- }, Wa = {
185
+ }, gt = {
186
186
  key: 0,
187
187
  class: "wx-checkbox__label"
188
- }, Sa = /* @__PURE__ */ E({
188
+ }, kt = /* @__PURE__ */ J({
189
189
  name: "WxCheckbox",
190
190
  inheritAttrs: !1,
191
191
  __name: "Checkbox",
192
- props: /* @__PURE__ */ S({
192
+ props: /* @__PURE__ */ R({
193
193
  value: { type: [String, Number, Boolean, null], default: void 0 },
194
194
  label: { default: void 0 },
195
195
  indeterminate: { type: Boolean, default: !1 },
@@ -202,60 +202,60 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
202
202
  modelValue: { type: Boolean, default: !1 },
203
203
  modelModifiers: {}
204
204
  }),
205
- emits: /* @__PURE__ */ S(["change"], ["update:modelValue"]),
206
- setup(e, { emit: y }) {
207
- const a = e, t = y, i = G(e, "modelValue"), l = te($e, null), o = Y(a), v = D(null), m = u(
208
- () => l ? l.modelValue.value.includes(a.value ?? null) : i.value === !0
209
- ), b = u(() => a.disabled || l?.disabled.value || o.disabled.value), c = u(() => a.size ?? l?.size.value ?? o.size.value), r = u(() => [
205
+ emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
206
+ setup(e, { emit: _ }) {
207
+ const a = e, n = _, s = G(e, "modelValue"), t = ce(Je, null), o = le(a), c = q(null), p = d(
208
+ () => t ? t.modelValue.value.includes(a.value ?? null) : s.value === !0
209
+ ), h = d(() => a.disabled || t?.disabled.value || o.disabled.value), f = d(() => a.size ?? t?.size.value ?? o.size.value), m = d(() => [
210
210
  "wx-checkbox",
211
- `wx-checkbox--${c.value}`,
211
+ `wx-checkbox--${f.value}`,
212
212
  {
213
- "is-checked": m.value,
214
- "is-indeterminate": a.indeterminate && !m.value,
215
- "is-disabled": b.value
213
+ "is-checked": p.value,
214
+ "is-indeterminate": a.indeterminate && !p.value,
215
+ "is-disabled": h.value
216
216
  }
217
217
  ]);
218
- function h() {
219
- v.value && (v.value.indeterminate = a.indeterminate && !m.value);
218
+ function g() {
219
+ c.value && (c.value.indeterminate = a.indeterminate && !p.value);
220
220
  }
221
- ke(h), Z([() => a.indeterminate, m], h);
222
- function p(T) {
223
- const M = T.target.checked;
224
- l ? l.toggle(a.value ?? null, M) : i.value = M, t("change", M);
221
+ Ce(g), ne([() => a.indeterminate, p], g);
222
+ function y(P) {
223
+ const V = P.target.checked;
224
+ t ? t.toggle(a.value ?? null, V) : s.value = V, n("change", V);
225
225
  }
226
- return (T, M) => (n(), d("label", {
227
- class: U(r.value)
226
+ return (P, V) => (l(), u("label", {
227
+ class: F(m.value)
228
228
  }, [
229
- I("input", K({
230
- id: s(o).id.value,
229
+ x("input", te({
230
+ id: b(o).id.value,
231
231
  ref_key: "inputRef",
232
- ref: v
233
- }, T.$attrs, {
232
+ ref: c
233
+ }, P.$attrs, {
234
234
  class: "wx-checkbox__native",
235
235
  type: "checkbox",
236
- name: e.name ?? s(l)?.name.value,
237
- checked: m.value,
238
- disabled: b.value,
236
+ name: e.name ?? b(t)?.name.value,
237
+ checked: p.value,
238
+ disabled: h.value,
239
239
  "aria-label": e.ariaLabel,
240
- "aria-describedby": s(o).describedBy.value,
241
- onChange: p
242
- }), null, 16, Ca),
243
- I("span", Va, [
244
- (n(), d("svg", Ia, [
245
- e.indeterminate && !m.value ? (n(), d("path", Ta)) : (n(), d("path", za))
240
+ "aria-describedby": b(o).describedBy.value,
241
+ onChange: y
242
+ }), null, 16, mt),
243
+ x("span", pt, [
244
+ (l(), u("svg", ht, [
245
+ e.indeterminate && !p.value ? (l(), u("path", yt)) : (l(), u("path", xt))
246
246
  ]))
247
247
  ]),
248
- e.label || T.$slots.default ? (n(), d("span", Wa, [
249
- P(T.$slots, "default", {}, () => [
250
- ee(N(e.label), 1)
248
+ e.label || P.$slots.default ? (l(), u("span", gt, [
249
+ N(P.$slots, "default", {}, () => [
250
+ ae(D(e.label), 1)
251
251
  ], !0)
252
- ])) : W("", !0)
252
+ ])) : C("", !0)
253
253
  ], 2));
254
254
  }
255
- }), Be = /* @__PURE__ */ j(Sa, [["__scopeId", "data-v-c35cc837"]]), Aa = ["aria-labelledby", "aria-describedby"], La = /* @__PURE__ */ E({
255
+ }), ye = /* @__PURE__ */ Q(kt, [["__scopeId", "data-v-c35cc837"]]), wt = ["aria-labelledby", "aria-describedby"], $t = /* @__PURE__ */ J({
256
256
  name: "WxCheckboxGroup",
257
257
  __name: "CheckboxGroup",
258
- props: /* @__PURE__ */ S({
258
+ props: /* @__PURE__ */ R({
259
259
  options: { default: void 0 },
260
260
  disabled: { type: Boolean, default: void 0 },
261
261
  size: { default: void 0 },
@@ -267,52 +267,52 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
267
267
  modelValue: { default: () => [] },
268
268
  modelModifiers: {}
269
269
  }),
270
- emits: /* @__PURE__ */ S(["change"], ["update:modelValue"]),
271
- setup(e, { emit: y }) {
272
- const a = e, t = y, i = G(e, "modelValue"), l = Y(a);
273
- l.item?.registerLabelTarget(void 0);
274
- const o = u(() => a.disabled ?? l.disabled.value), v = u(() => a.size ?? l.size.value);
275
- function m(b, c) {
276
- const r = i.value ?? [];
277
- if (c) {
278
- if (r.includes(b) || a.max !== void 0 && r.length >= a.max) return;
279
- i.value = [...r, b];
270
+ emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
271
+ setup(e, { emit: _ }) {
272
+ const a = e, n = _, s = G(e, "modelValue"), t = le(a);
273
+ t.item?.registerLabelTarget(void 0);
274
+ const o = d(() => a.disabled ?? t.disabled.value), c = d(() => a.size ?? t.size.value);
275
+ function p(h, f) {
276
+ const m = s.value ?? [];
277
+ if (f) {
278
+ if (m.includes(h) || a.max !== void 0 && m.length >= a.max) return;
279
+ s.value = [...m, h];
280
280
  } else {
281
- if (a.min !== void 0 && r.length <= a.min) return;
282
- i.value = r.filter((h) => h !== b);
281
+ if (a.min !== void 0 && m.length <= a.min) return;
282
+ s.value = m.filter((g) => g !== h);
283
283
  }
284
- t("change", i.value);
284
+ n("change", s.value);
285
285
  }
286
- return ne($e, {
287
- name: u(() => a.name),
288
- modelValue: u(() => i.value ?? []),
286
+ return xe(Je, {
287
+ name: d(() => a.name),
288
+ modelValue: d(() => s.value ?? []),
289
289
  disabled: o,
290
- size: v,
291
- toggle: m
292
- }), (b, c) => (n(), d("div", {
293
- class: U(["wx-checkbox-group", { "wx-checkbox-group--inline": e.inline }]),
290
+ size: c,
291
+ toggle: p
292
+ }), (h, f) => (l(), u("div", {
293
+ class: F(["wx-checkbox-group", { "wx-checkbox-group--inline": e.inline }]),
294
294
  role: "group",
295
- "aria-labelledby": s(l).item ? `${s(l).item.id.value}-label` : void 0,
296
- "aria-describedby": s(l).describedBy.value
295
+ "aria-labelledby": b(t).item ? `${b(t).item.id.value}-label` : void 0,
296
+ "aria-describedby": b(t).describedBy.value
297
297
  }, [
298
- P(b.$slots, "default", {}, () => [
299
- (n(!0), d(X, null, q(e.options, (r) => (n(), Q(Be, {
300
- key: String(r.value),
301
- value: r.value,
302
- label: r.label,
303
- disabled: r.disabled
298
+ N(h.$slots, "default", {}, () => [
299
+ (l(!0), u(K, null, X(e.options, (m) => (l(), ie(ye, {
300
+ key: String(m.value),
301
+ value: m.value,
302
+ label: m.label,
303
+ disabled: m.disabled
304
304
  }, null, 8, ["value", "label", "disabled"]))), 128))
305
305
  ], !0)
306
- ], 10, Aa));
306
+ ], 10, wt));
307
307
  }
308
- }), Ra = /* @__PURE__ */ j(La, [["__scopeId", "data-v-8a0c916b"]]), Ha = ["disabled", "aria-label"], Da = ["id", "value", "name", "placeholder", "disabled", "readonly", "aria-label", "aria-describedby", "aria-invalid"], Fa = {
308
+ }), _t = /* @__PURE__ */ Q($t, [["__scopeId", "data-v-8a0c916b"]]), Bt = ["disabled", "aria-label"], Mt = ["id", "value", "name", "placeholder", "disabled", "readonly", "aria-label", "aria-describedby", "aria-invalid"], Ct = {
309
309
  key: 0,
310
310
  class: "wx-color-picker__presets"
311
- }, Pa = ["aria-label", "aria-pressed", "onClick"], Na = /* @__PURE__ */ E({
311
+ }, St = ["aria-label", "aria-pressed", "onClick"], Tt = /* @__PURE__ */ J({
312
312
  name: "WxColorPicker",
313
313
  inheritAttrs: !1,
314
314
  __name: "ColorPicker",
315
- props: /* @__PURE__ */ S({
315
+ props: /* @__PURE__ */ R({
316
316
  presets: { default: () => [] },
317
317
  clearable: { type: Boolean, default: !1 },
318
318
  placeholder: { default: "#000000" },
@@ -328,174 +328,174 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
328
328
  modelValue: { default: null },
329
329
  modelModifiers: {}
330
330
  }),
331
- emits: /* @__PURE__ */ S(["change"], ["update:modelValue"]),
332
- setup(e, { emit: y }) {
333
- const a = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i, t = e, i = y, l = G(e, "modelValue"), o = Y(t), v = D(!1), m = D(l.value ?? "");
334
- Z(l, (x) => {
335
- m.value = x ?? "";
331
+ emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
332
+ setup(e, { emit: _ }) {
333
+ const a = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i, n = e, s = _, t = G(e, "modelValue"), o = le(n), c = q(!1), p = q(t.value ?? "");
334
+ ne(t, (M) => {
335
+ p.value = M ?? "";
336
336
  });
337
- function b(x) {
338
- return he(Ee(x));
337
+ function h(M) {
338
+ return Oe(Va(M));
339
339
  }
340
- const c = D(
341
- b(l.value && a.test(l.value) ? l.value : "#427edd")
340
+ const f = q(
341
+ h(t.value && a.test(t.value) ? t.value : "#427edd")
342
342
  );
343
- Z(l, (x) => {
344
- const k = x && a.test(x) ? x : null;
345
- !k || k === pe(c.value).toLowerCase() || (c.value = b(k));
343
+ ne(t, (M) => {
344
+ const w = M && a.test(M) ? M : null;
345
+ !w || w === Ee(f.value).toLowerCase() || (f.value = h(w));
346
346
  });
347
- const r = u(
348
- () => ze(c.value, "saturation", "brightness", "hsb")
349
- ), h = u(() => We(c.value, "hue", "hsb")), p = u(() => l.value && a.test(l.value) ? l.value : null), T = u(() => [
347
+ const m = d(
348
+ () => xa(f.value, "saturation", "brightness", "hsb")
349
+ ), g = d(() => ga(f.value, "hue", "hsb")), y = d(() => t.value && a.test(t.value) ? t.value : null), P = d(() => [
350
350
  "wx-color-picker",
351
351
  `wx-color-picker--${o.size.value}`,
352
352
  {
353
353
  [`wx-color-picker--${o.status.value}`]: o.status.value !== "default",
354
- "is-open": v.value,
354
+ "is-open": c.value,
355
355
  "is-disabled": o.disabled.value
356
356
  }
357
357
  ]);
358
- function M(x) {
359
- l.value !== x && (l.value = x, i("change", x));
358
+ function V(M) {
359
+ t.value !== M && (t.value = M, s("change", M));
360
360
  }
361
- function g(x) {
362
- const k = x.target.value;
363
- m.value = k, a.test(k) ? M(k.toLowerCase()) : k === "" && M(null);
361
+ function B(M) {
362
+ const w = M.target.value;
363
+ p.value = w, a.test(w) ? V(w.toLowerCase()) : w === "" && V(null);
364
364
  }
365
- function C() {
366
- if (m.value === "") {
367
- M(null);
365
+ function $() {
366
+ if (p.value === "") {
367
+ V(null);
368
368
  return;
369
369
  }
370
- const x = m.value.startsWith("#") ? m.value : `#${m.value}`;
371
- a.test(x) ? (M(x.toLowerCase()), m.value = x.toLowerCase()) : m.value = l.value ?? "";
370
+ const M = p.value.startsWith("#") ? p.value : `#${p.value}`;
371
+ a.test(M) ? (V(M.toLowerCase()), p.value = M.toLowerCase()) : p.value = t.value ?? "";
372
372
  }
373
- function f(x) {
374
- c.value = he(x), M(pe(x).toLowerCase());
373
+ function r(M) {
374
+ f.value = Oe(M), V(Ee(M).toLowerCase());
375
375
  }
376
- function $(x) {
377
- const k = x.toLowerCase();
378
- c.value = b(k), M(k);
376
+ function S(M) {
377
+ const w = M.toLowerCase();
378
+ f.value = h(w), V(w);
379
379
  }
380
- function V() {
381
- M(null), m.value = "";
380
+ function z() {
381
+ V(null), p.value = "";
382
382
  }
383
- function L() {
384
- !o.disabled.value && !t.readonly && (v.value = !0);
383
+ function H() {
384
+ !o.disabled.value && !n.readonly && (c.value = !0);
385
385
  }
386
- return (x, k) => (n(), Q(s(Se), {
387
- open: v.value,
388
- "onUpdate:open": k[0] || (k[0] = (R) => v.value = R)
386
+ return (M, w) => (l(), ie(b(ka), {
387
+ open: c.value,
388
+ "onUpdate:open": w[0] || (w[0] = (E) => c.value = E)
389
389
  }, {
390
- default: H(() => [
391
- I("div", {
392
- class: U(T.value)
390
+ default: Y(() => [
391
+ x("div", {
392
+ class: F(P.value)
393
393
  }, [
394
- F(s(Ae), { "as-child": "" }, {
395
- default: H(() => [
396
- I("div", {
394
+ O(b(wa), { "as-child": "" }, {
395
+ default: Y(() => [
396
+ x("div", {
397
397
  class: "wx-color-picker__field",
398
- onClick: L
398
+ onClick: H
399
399
  }, [
400
- I("button", {
401
- class: U(["wx-color-picker__swatch", { "is-empty": !p.value }]),
400
+ x("button", {
401
+ class: F(["wx-color-picker__swatch", { "is-empty": !y.value }]),
402
402
  type: "button",
403
- disabled: s(o).disabled.value,
403
+ disabled: b(o).disabled.value,
404
404
  "aria-label": e.ariaLabel ?? "Pick a colour",
405
- style: ae(p.value ? { background: p.value } : void 0)
406
- }, null, 14, Ha),
407
- I("input", K({
408
- id: s(o).id.value
409
- }, x.$attrs, {
405
+ style: ee(y.value ? { background: y.value } : void 0)
406
+ }, null, 14, Bt),
407
+ x("input", te({
408
+ id: b(o).id.value
409
+ }, M.$attrs, {
410
410
  class: "wx-color-picker__input",
411
411
  type: "text",
412
412
  autocomplete: "off",
413
413
  spellcheck: "false",
414
- value: m.value,
414
+ value: p.value,
415
415
  name: e.name,
416
416
  placeholder: e.placeholder,
417
- disabled: s(o).disabled.value,
417
+ disabled: b(o).disabled.value,
418
418
  readonly: e.readonly,
419
419
  "aria-label": e.ariaLabel,
420
- "aria-describedby": s(o).describedBy.value,
421
- "aria-invalid": s(o).status.value === "error" || void 0,
422
- onInput: g,
423
- onBlur: C
424
- }), null, 16, Da),
425
- e.clearable && p.value && !s(o).disabled.value ? (n(), d("button", {
420
+ "aria-describedby": b(o).describedBy.value,
421
+ "aria-invalid": b(o).status.value === "error" || void 0,
422
+ onInput: B,
423
+ onBlur: $
424
+ }), null, 16, Mt),
425
+ e.clearable && y.value && !b(o).disabled.value ? (l(), u("button", {
426
426
  key: 0,
427
427
  class: "wx-color-picker__clear",
428
428
  type: "button",
429
429
  tabindex: "-1",
430
430
  "aria-label": "Clear",
431
- onClick: le(V, ["stop"])
432
- }, " ✕ ")) : W("", !0)
431
+ onClick: de(z, ["stop"])
432
+ }, " ✕ ")) : C("", !0)
433
433
  ])
434
434
  ]),
435
435
  _: 1
436
436
  }),
437
- F(s(Le), {
437
+ O(b($a), {
438
438
  disabled: !e.teleport
439
439
  }, {
440
- default: H(() => [
441
- F(s(Re), {
440
+ default: Y(() => [
441
+ O(b(_a), {
442
442
  class: "wx-color-picker__panel",
443
443
  "side-offset": 4,
444
444
  align: "start"
445
445
  }, {
446
- default: H(() => [
447
- F(s(He), {
446
+ default: Y(() => [
447
+ O(b(Ba), {
448
448
  class: "wx-color-picker__area",
449
449
  "color-space": "hsb",
450
450
  "x-channel": "saturation",
451
451
  "y-channel": "brightness",
452
- "model-value": c.value,
453
- "onUpdate:color": f
452
+ "model-value": f.value,
453
+ "onUpdate:color": r
454
454
  }, {
455
- default: H(() => [
456
- F(s(De), {
455
+ default: Y(() => [
456
+ O(b(Ma), {
457
457
  class: "wx-color-picker__area-surface",
458
- style: ae(r.value)
458
+ style: ee(m.value)
459
459
  }, {
460
- default: H(() => [
461
- F(s(Fe), { class: "wx-color-picker__thumb" })
460
+ default: Y(() => [
461
+ O(b(Ca), { class: "wx-color-picker__thumb" })
462
462
  ]),
463
463
  _: 1
464
464
  }, 8, ["style"])
465
465
  ]),
466
466
  _: 1
467
467
  }, 8, ["model-value"]),
468
- F(s(Pe), {
468
+ O(b(Sa), {
469
469
  class: "wx-color-picker__hue",
470
470
  "color-space": "hsb",
471
471
  channel: "hue",
472
- "model-value": c.value,
473
- "onUpdate:color": f
472
+ "model-value": f.value,
473
+ "onUpdate:color": r
474
474
  }, {
475
- default: H(() => [
476
- F(s(Ne), {
475
+ default: Y(() => [
476
+ O(b(Ta), {
477
477
  class: "wx-color-picker__hue-track",
478
- style: ae(h.value)
478
+ style: ee(g.value)
479
479
  }, {
480
- default: H(() => [
481
- F(s(Ue), { class: "wx-color-picker__thumb" })
480
+ default: Y(() => [
481
+ O(b(Ia), { class: "wx-color-picker__thumb" })
482
482
  ]),
483
483
  _: 1
484
484
  }, 8, ["style"])
485
485
  ]),
486
486
  _: 1
487
487
  }, 8, ["model-value"]),
488
- e.presets.length ? (n(), d("div", Fa, [
489
- (n(!0), d(X, null, q(e.presets, (R) => (n(), d("button", {
490
- key: R,
488
+ e.presets.length ? (l(), u("div", Ct, [
489
+ (l(!0), u(K, null, X(e.presets, (E) => (l(), u("button", {
490
+ key: E,
491
491
  class: "wx-color-picker__preset",
492
492
  type: "button",
493
- style: ae({ background: R }),
494
- "aria-label": R,
495
- "aria-pressed": l.value === R,
496
- onClick: (O) => $(R)
497
- }, null, 12, Pa))), 128))
498
- ])) : W("", !0)
493
+ style: ee({ background: E }),
494
+ "aria-label": E,
495
+ "aria-pressed": t.value === E,
496
+ onClick: (Z) => S(E)
497
+ }, null, 12, St))), 128))
498
+ ])) : C("", !0)
499
499
  ]),
500
500
  _: 1
501
501
  })
@@ -507,11 +507,11 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
507
507
  _: 1
508
508
  }, 8, ["open"]));
509
509
  }
510
- }), Ua = /* @__PURE__ */ j(Na, [["__scopeId", "data-v-aab2d65f"]]), fe = /* @__PURE__ */ E({
510
+ }), It = /* @__PURE__ */ Q(Tt, [["__scopeId", "data-v-aab2d65f"]]), Ie = /* @__PURE__ */ J({
511
511
  name: "WxDatePicker",
512
512
  inheritAttrs: !1,
513
513
  __name: "DatePicker",
514
- props: /* @__PURE__ */ S({
514
+ props: /* @__PURE__ */ R({
515
515
  type: { default: "date" },
516
516
  valueFormat: { default: void 0 },
517
517
  format: { default: void 0 },
@@ -537,53 +537,53 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
537
537
  modelValue: { default: null },
538
538
  modelModifiers: {}
539
539
  }),
540
- emits: /* @__PURE__ */ S(["change", "clear", "open", "close"], ["update:modelValue"]),
541
- setup(e, { emit: y }) {
542
- const a = e, t = y, i = G(e, "modelValue"), l = Y(a), o = u(() => a.type !== "date"), v = u(() => {
540
+ emits: /* @__PURE__ */ R(["change", "clear", "open", "close"], ["update:modelValue"]),
541
+ setup(e, { emit: _ }) {
542
+ const a = e, n = _, s = G(e, "modelValue"), t = le(a), o = d(() => a.type !== "date"), c = d(() => {
543
543
  if (a.valueFormat !== "date")
544
544
  return a.valueFormat ? a.valueFormat : a.type === "time" ? a.seconds ? "HH:mm:ss" : "HH:mm" : a.type === "datetime" ? a.seconds ? "yyyy-MM-dd HH:mm:ss" : "yyyy-MM-dd HH:mm" : "yyyy-MM-dd";
545
- }), m = u(() => {
545
+ }), p = d(() => {
546
546
  if (a.format) return a.format;
547
- const M = a.seconds ? "HH:mm:ss" : "HH:mm";
548
- return a.type === "time" ? M : a.type === "datetime" ? `dd.MM.yyyy ${M}` : "dd.MM.yyyy";
549
- }), b = u(() => a.type === "time" ? { modeHeight: 125 } : void 0), c = u(() => ({
547
+ const V = a.seconds ? "HH:mm:ss" : "HH:mm";
548
+ return a.type === "time" ? V : a.type === "datetime" ? `dd.MM.yyyy ${V}` : "dd.MM.yyyy";
549
+ }), h = d(() => a.type === "time" ? { modeHeight: 125 } : void 0), f = d(() => ({
550
550
  enableTimePicker: o.value,
551
551
  enableSeconds: a.seconds,
552
552
  is24: a.is24,
553
553
  minutesIncrement: a.minutesIncrement
554
- })), r = u(() => ({
555
- id: l.id.value,
554
+ })), m = d(() => ({
555
+ id: t.id.value,
556
556
  name: a.name,
557
557
  clearable: a.clearable,
558
558
  // The library reads `state: false` as invalid; leaving it undefined means neutral.
559
- state: l.status.value === "error" ? !1 : void 0,
559
+ state: t.status.value === "error" ? !1 : void 0,
560
560
  "aria-label": a.ariaLabel,
561
- "aria-describedby": l.describedBy.value
562
- })), h = u(() => [
561
+ "aria-describedby": t.describedBy.value
562
+ })), g = d(() => [
563
563
  "wx-datepicker",
564
- `wx-datepicker--${l.size.value}`,
564
+ `wx-datepicker--${t.size.value}`,
565
565
  {
566
- [`wx-datepicker--${l.status.value}`]: l.status.value !== "default",
567
- "is-disabled": l.disabled.value
566
+ [`wx-datepicker--${t.status.value}`]: t.status.value !== "default",
567
+ "is-disabled": t.disabled.value
568
568
  }
569
569
  ]);
570
- function p(M) {
571
- i.value = M, t("change", M);
570
+ function y(V) {
571
+ s.value = V, n("change", V);
572
572
  }
573
- function T() {
574
- i.value = null, t("change", null), t("clear");
573
+ function P() {
574
+ s.value = null, n("change", null), n("clear");
575
575
  }
576
- return (M, g) => (n(), d("div", {
577
- class: U(h.value)
576
+ return (V, B) => (l(), u("div", {
577
+ class: F(g.value)
578
578
  }, [
579
- F(s(ge), K({
580
- "model-value": i.value,
581
- "model-type": v.value,
582
- formats: { input: m.value },
579
+ O(b(Ye), te({
580
+ "model-value": s.value,
581
+ "model-type": c.value,
582
+ formats: { input: p.value },
583
583
  "time-picker": e.type === "time",
584
- "time-config": c.value,
585
- config: b.value,
586
- "input-attrs": r.value,
584
+ "time-config": f.value,
585
+ config: h.value,
586
+ "input-attrs": m.value,
587
587
  ui: { input: "wx-datepicker__input", menu: "wx-datepicker__menu" },
588
588
  placeholder: e.placeholder,
589
589
  "min-date": e.minDate,
@@ -592,28 +592,28 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
592
592
  "auto-apply": e.autoApply,
593
593
  "text-input": e.textInput,
594
594
  teleport: e.teleport,
595
- disabled: s(l).disabled.value,
595
+ disabled: b(t).disabled.value,
596
596
  readonly: e.readonly
597
- }, M.$attrs, {
598
- "onUpdate:modelValue": p,
599
- onCleared: T,
600
- onOpen: g[0] || (g[0] = (C) => t("open")),
601
- onClosed: g[1] || (g[1] = (C) => t("close"))
602
- }), ue({ _: 2 }, [
603
- q(M.$slots, (C, f) => ({
604
- name: f,
605
- fn: H(($) => [
606
- P(M.$slots, f, se(de($ ?? {})))
597
+ }, V.$attrs, {
598
+ "onUpdate:modelValue": y,
599
+ onCleared: P,
600
+ onOpen: B[0] || (B[0] = ($) => n("open")),
601
+ onClosed: B[1] || (B[1] = ($) => n("close"))
602
+ }), ge({ _: 2 }, [
603
+ X(V.$slots, ($, r) => ({
604
+ name: r,
605
+ fn: Y((S) => [
606
+ N(V.$slots, r, ke(we(S ?? {})))
607
607
  ])
608
608
  }))
609
609
  ]), 1040, ["model-value", "model-type", "formats", "time-picker", "time-config", "config", "input-attrs", "placeholder", "min-date", "max-date", "week-start", "auto-apply", "text-input", "teleport", "disabled", "readonly"])
610
610
  ], 2));
611
611
  }
612
- }), Ea = /* @__PURE__ */ E({
612
+ }), Vt = /* @__PURE__ */ J({
613
613
  name: "WxDateRangePicker",
614
614
  inheritAttrs: !1,
615
615
  __name: "DateRangePicker",
616
- props: /* @__PURE__ */ S({
616
+ props: /* @__PURE__ */ R({
617
617
  valueFormat: { default: void 0 },
618
618
  format: { default: void 0 },
619
619
  placeholder: { default: void 0 },
@@ -636,42 +636,42 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
636
636
  modelValue: { default: null },
637
637
  modelModifiers: {}
638
638
  }),
639
- emits: /* @__PURE__ */ S(["change", "clear", "open", "close"], ["update:modelValue"]),
640
- setup(e, { emit: y }) {
641
- const a = e, t = y, i = G(e, "modelValue"), l = Y(a), o = u(
639
+ emits: /* @__PURE__ */ R(["change", "clear", "open", "close"], ["update:modelValue"]),
640
+ setup(e, { emit: _ }) {
641
+ const a = e, n = _, s = G(e, "modelValue"), t = le(a), o = d(
642
642
  () => a.valueFormat === "date" ? void 0 : a.valueFormat ?? "yyyy-MM-dd"
643
- ), v = u(() => a.format ?? "dd.MM.yyyy"), m = u(() => ({
644
- id: l.id.value,
643
+ ), c = d(() => a.format ?? "dd.MM.yyyy"), p = d(() => ({
644
+ id: t.id.value,
645
645
  name: a.name,
646
646
  clearable: a.clearable,
647
- state: l.status.value === "error" ? !1 : void 0,
647
+ state: t.status.value === "error" ? !1 : void 0,
648
648
  "aria-label": a.ariaLabel,
649
- "aria-describedby": l.describedBy.value
650
- })), b = u(() => [
649
+ "aria-describedby": t.describedBy.value
650
+ })), h = d(() => [
651
651
  "wx-datepicker",
652
652
  "wx-datepicker--range",
653
- `wx-datepicker--${l.size.value}`,
653
+ `wx-datepicker--${t.size.value}`,
654
654
  {
655
- [`wx-datepicker--${l.status.value}`]: l.status.value !== "default",
656
- "is-disabled": l.disabled.value
655
+ [`wx-datepicker--${t.status.value}`]: t.status.value !== "default",
656
+ "is-disabled": t.disabled.value
657
657
  }
658
658
  ]);
659
- function c(h) {
660
- i.value = h, t("change", h);
659
+ function f(g) {
660
+ s.value = g, n("change", g);
661
661
  }
662
- function r() {
663
- i.value = null, t("change", null), t("clear");
662
+ function m() {
663
+ s.value = null, n("change", null), n("clear");
664
664
  }
665
- return (h, p) => (n(), d("div", {
666
- class: U(b.value)
665
+ return (g, y) => (l(), u("div", {
666
+ class: F(h.value)
667
667
  }, [
668
- F(s(ge), K({
668
+ O(b(Ye), te({
669
669
  range: "",
670
- "model-value": i.value,
670
+ "model-value": s.value,
671
671
  "model-type": o.value,
672
- formats: { input: v.value },
672
+ formats: { input: c.value },
673
673
  "multi-calendars": e.months,
674
- "input-attrs": m.value,
674
+ "input-attrs": p.value,
675
675
  ui: { input: "wx-datepicker__input", menu: "wx-datepicker__menu" },
676
676
  placeholder: e.placeholder,
677
677
  "min-date": e.minDate,
@@ -680,27 +680,27 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
680
680
  "auto-apply": e.autoApply,
681
681
  "text-input": e.textInput,
682
682
  teleport: e.teleport,
683
- disabled: s(l).disabled.value,
683
+ disabled: b(t).disabled.value,
684
684
  readonly: e.readonly
685
- }, h.$attrs, {
686
- "onUpdate:modelValue": c,
687
- onCleared: r,
688
- onOpen: p[0] || (p[0] = (T) => t("open")),
689
- onClosed: p[1] || (p[1] = (T) => t("close"))
690
- }), ue({ _: 2 }, [
691
- q(h.$slots, (T, M) => ({
692
- name: M,
693
- fn: H((g) => [
694
- P(h.$slots, M, se(de(g ?? {})))
685
+ }, g.$attrs, {
686
+ "onUpdate:modelValue": f,
687
+ onCleared: m,
688
+ onOpen: y[0] || (y[0] = (P) => n("open")),
689
+ onClosed: y[1] || (y[1] = (P) => n("close"))
690
+ }), ge({ _: 2 }, [
691
+ X(g.$slots, (P, V) => ({
692
+ name: V,
693
+ fn: Y((B) => [
694
+ N(g.$slots, V, ke(we(B ?? {})))
695
695
  ])
696
696
  }))
697
697
  ]), 1040, ["model-value", "model-type", "formats", "multi-calendars", "input-attrs", "placeholder", "min-date", "max-date", "week-start", "auto-apply", "text-input", "teleport", "disabled", "readonly"])
698
698
  ], 2));
699
699
  }
700
- }), Oa = /* @__PURE__ */ E({
700
+ }), zt = /* @__PURE__ */ J({
701
701
  name: "WxDateTimePicker",
702
702
  __name: "DateTimePicker",
703
- props: /* @__PURE__ */ S({
703
+ props: /* @__PURE__ */ R({
704
704
  valueFormat: { default: void 0 },
705
705
  format: { default: void 0 },
706
706
  placeholder: { default: void 0 },
@@ -727,21 +727,21 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
727
727
  }),
728
728
  emits: ["update:modelValue"],
729
729
  setup(e) {
730
- const y = G(e, "modelValue");
731
- return (a, t) => (n(), Q(fe, K({
732
- modelValue: y.value,
733
- "onUpdate:modelValue": t[0] || (t[0] = (i) => y.value = i),
730
+ const _ = G(e, "modelValue");
731
+ return (a, n) => (l(), ie(Ie, te({
732
+ modelValue: _.value,
733
+ "onUpdate:modelValue": n[0] || (n[0] = (s) => _.value = s),
734
734
  type: "datetime"
735
- }, a.$props), ue({ _: 2 }, [
736
- q(a.$slots, (i, l) => ({
737
- name: l,
738
- fn: H((o) => [
739
- P(a.$slots, l, se(de(o ?? {})))
735
+ }, a.$props), ge({ _: 2 }, [
736
+ X(a.$slots, (s, t) => ({
737
+ name: t,
738
+ fn: Y((o) => [
739
+ N(a.$slots, t, ke(we(o ?? {})))
740
740
  ])
741
741
  }))
742
742
  ]), 1040, ["modelValue"]));
743
743
  }
744
- }), ja = /* @__PURE__ */ E({
744
+ }), Pt = /* @__PURE__ */ J({
745
745
  name: "WxForm",
746
746
  __name: "Form",
747
747
  props: {
@@ -753,39 +753,39 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
753
753
  gap: { default: "md" }
754
754
  },
755
755
  emits: ["submit", "reset"],
756
- setup(e, { emit: y }) {
757
- const a = e, t = y, i = u(() => a.errors ?? {});
758
- ne(ce, {
759
- errors: i,
760
- disabled: oe(a, "disabled"),
761
- size: oe(a, "size"),
762
- labelPosition: oe(a, "labelPosition"),
763
- labelWidth: oe(a, "labelWidth")
756
+ setup(e, { emit: _ }) {
757
+ const a = e, n = _, s = d(() => a.errors ?? {});
758
+ xe(Se, {
759
+ errors: s,
760
+ disabled: me(a, "disabled"),
761
+ size: me(a, "size"),
762
+ labelPosition: me(a, "labelPosition"),
763
+ labelWidth: me(a, "labelWidth")
764
764
  });
765
- function l(v) {
766
- v.preventDefault(), t("submit", v);
765
+ function t(c) {
766
+ c.preventDefault(), n("submit", c);
767
767
  }
768
- function o(v) {
769
- t("reset", v);
768
+ function o(c) {
769
+ n("reset", c);
770
770
  }
771
- return (v, m) => (n(), d("form", {
772
- class: U(["wx-form", `wx-form--gap-${e.gap}`, `wx-form--label-${e.labelPosition}`]),
771
+ return (c, p) => (l(), u("form", {
772
+ class: F(["wx-form", `wx-form--gap-${e.gap}`, `wx-form--label-${e.labelPosition}`]),
773
773
  novalidate: "",
774
- onSubmit: l,
774
+ onSubmit: t,
775
775
  onReset: o
776
776
  }, [
777
- P(v.$slots, "default", {}, void 0, !0)
777
+ N(c.$slots, "default", {}, void 0, !0)
778
778
  ], 34));
779
779
  }
780
- }), Ga = /* @__PURE__ */ j(ja, [["__scopeId", "data-v-bfab857f"]]), qa = {
780
+ }), Wt = /* @__PURE__ */ Q(Pt, [["__scopeId", "data-v-bfab857f"]]), At = {
781
781
  key: 0,
782
782
  class: "wx-form-item__required",
783
783
  "aria-hidden": "true"
784
- }, Ka = { class: "wx-form-item__control" }, Ya = {
784
+ }, Lt = { class: "wx-form-item__control" }, Rt = {
785
785
  key: 2,
786
786
  class: "wx-form-item__error",
787
787
  "aria-hidden": "true"
788
- }, Xa = /* @__PURE__ */ E({
788
+ }, Ft = /* @__PURE__ */ J({
789
789
  name: "WxFormItem",
790
790
  __name: "FormItem",
791
791
  props: {
@@ -799,73 +799,73 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
799
799
  labelWidth: { default: void 0 },
800
800
  reserveErrorSpace: { type: Boolean, default: !1 }
801
801
  },
802
- setup(e, { expose: y }) {
803
- const a = e, t = te(ce, null), i = ve("wx-field"), l = `${i}-error`, o = `${i}-help`, v = D("control"), m = D(i);
804
- function b(f) {
805
- if (f === void 0) {
806
- v.value = "group";
802
+ setup(e, { expose: _ }) {
803
+ const a = e, n = ce(Se, null), s = Te("wx-field"), t = `${s}-error`, o = `${s}-help`, c = q("control"), p = q(s);
804
+ function h(r) {
805
+ if (r === void 0) {
806
+ c.value = "group";
807
807
  return;
808
808
  }
809
- v.value = "control", m.value = f;
810
- }
811
- const c = u(() => a.error !== void 0 ? Array.isArray(a.error) ? a.error : [a.error] : a.name && t ? t.errors.value[a.name] ?? [] : []), r = u(() => c.value.length > 0), h = u(() => r.value ? "error" : "default"), p = u(() => r.value ? l : a.help ? o : void 0), T = u(() => a.size), M = u(() => a.disabled), g = u(() => a.labelWidth ?? t?.labelWidth.value), C = u(() => t?.labelPosition.value === "left");
812
- return Ma({
813
- id: u(() => i),
814
- describedBy: p,
815
- status: h,
816
- disabled: M,
817
- size: T,
818
- registerLabelTarget: b
819
- }), y({ messages: c, hasError: r }), (f, $) => (n(), d("div", {
820
- class: U([
809
+ c.value = "control", p.value = r;
810
+ }
811
+ const f = d(() => a.error !== void 0 ? Array.isArray(a.error) ? a.error : [a.error] : a.name && n ? n.errors.value[a.name] ?? [] : []), m = d(() => f.value.length > 0), g = d(() => m.value ? "error" : "default"), y = d(() => m.value ? t : a.help ? o : void 0), P = d(() => a.size), V = d(() => a.disabled), B = d(() => a.labelWidth ?? n?.labelWidth.value), $ = d(() => n?.labelPosition.value === "left");
812
+ return bt({
813
+ id: d(() => s),
814
+ describedBy: y,
815
+ status: g,
816
+ disabled: V,
817
+ size: P,
818
+ registerLabelTarget: h
819
+ }), _({ messages: f, hasError: m }), (r, S) => (l(), u("div", {
820
+ class: F([
821
821
  "wx-form-item",
822
- { "wx-form-item--inline": C.value, "is-error": r.value, "is-required": e.required }
822
+ { "wx-form-item--inline": $.value, "is-error": m.value, "is-required": e.required }
823
823
  ]),
824
- style: ae(C.value && g.value ? { "--wx-form-item-label-width": g.value } : void 0)
824
+ style: ee($.value && B.value ? { "--wx-form-item-label-width": B.value } : void 0)
825
825
  }, [
826
- e.label || f.$slots.label ? (n(), Q(xe(v.value === "group" ? "span" : "label"), {
826
+ e.label || r.$slots.label ? (l(), ie(Ge(c.value === "group" ? "span" : "label"), {
827
827
  key: 0,
828
- id: `${s(i)}-label`,
828
+ id: `${b(s)}-label`,
829
829
  class: "wx-form-item__label",
830
- for: v.value === "group" ? void 0 : m.value
830
+ for: c.value === "group" ? void 0 : p.value
831
831
  }, {
832
- default: H(() => [
833
- P(f.$slots, "label", {}, () => [
834
- ee(N(e.label), 1)
832
+ default: Y(() => [
833
+ N(r.$slots, "label", {}, () => [
834
+ ae(D(e.label), 1)
835
835
  ], !0),
836
- e.required ? (n(), d("span", qa, "*")) : W("", !0)
836
+ e.required ? (l(), u("span", At, "*")) : C("", !0)
837
837
  ]),
838
838
  _: 3
839
- }, 8, ["id", "for"])) : W("", !0),
840
- I("div", Ka, [
841
- P(f.$slots, "default", {}, void 0, !0),
842
- r.value ? (n(), d("p", {
839
+ }, 8, ["id", "for"])) : C("", !0),
840
+ x("div", Lt, [
841
+ N(r.$slots, "default", {}, void 0, !0),
842
+ m.value ? (l(), u("p", {
843
843
  key: 0,
844
- id: l,
844
+ id: t,
845
845
  class: "wx-form-item__error",
846
846
  role: "alert"
847
- }, N(c.value[0]), 1)) : e.help ? (n(), d("p", {
847
+ }, D(f.value[0]), 1)) : e.help ? (l(), u("p", {
848
848
  key: 1,
849
849
  id: o,
850
850
  class: "wx-form-item__help"
851
- }, N(e.help), 1)) : e.reserveErrorSpace ? (n(), d("p", Ya, " ")) : W("", !0)
851
+ }, D(e.help), 1)) : e.reserveErrorSpace ? (l(), u("p", Rt, " ")) : C("", !0)
852
852
  ])
853
853
  ], 6));
854
854
  }
855
- }), Qa = /* @__PURE__ */ j(Xa, [["__scopeId", "data-v-0b8142de"]]), Ja = {
855
+ }), Ht = /* @__PURE__ */ Q(Ft, [["__scopeId", "data-v-0b8142de"]]), Dt = {
856
856
  key: 0,
857
857
  class: "wx-input__affix wx-input__affix--prefix"
858
- }, Za = ["id", "type", "value", "placeholder", "disabled", "readonly", "maxlength", "autocomplete", "aria-label", "aria-describedby", "aria-invalid"], el = {
858
+ }, Nt = ["id", "type", "value", "placeholder", "disabled", "readonly", "maxlength", "autocomplete", "aria-label", "aria-describedby", "aria-invalid"], Ut = {
859
859
  key: 2,
860
860
  class: "wx-input__count"
861
- }, al = {
861
+ }, Et = {
862
862
  key: 3,
863
863
  class: "wx-input__affix wx-input__affix--suffix"
864
- }, ll = /* @__PURE__ */ E({
864
+ }, Ot = /* @__PURE__ */ J({
865
865
  name: "WxInput",
866
866
  inheritAttrs: !1,
867
867
  __name: "Input",
868
- props: /* @__PURE__ */ S({
868
+ props: /* @__PURE__ */ R({
869
869
  id: { default: void 0 },
870
870
  type: { default: "text" },
871
871
  size: { default: void 0 },
@@ -882,89 +882,89 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
882
882
  modelValue: { default: "" },
883
883
  modelModifiers: {}
884
884
  }),
885
- emits: /* @__PURE__ */ S(["input", "change", "focus", "blur", "clear"], ["update:modelValue"]),
886
- setup(e, { expose: y, emit: a }) {
887
- const t = e, i = a, l = G(e, "modelValue"), o = Y(t), v = D(null), m = D(!1), b = u(() => l.value == null ? "" : String(l.value)), c = u(
888
- () => t.clearable && !o.disabled.value && !t.readonly && b.value.length > 0
889
- ), r = u(
890
- () => t.showCount && t.maxlength ? `${b.value.length}/${t.maxlength}` : null
891
- ), h = u(() => [
885
+ emits: /* @__PURE__ */ R(["input", "change", "focus", "blur", "clear"], ["update:modelValue"]),
886
+ setup(e, { expose: _, emit: a }) {
887
+ const n = e, s = a, t = G(e, "modelValue"), o = le(n), c = q(null), p = q(!1), h = d(() => t.value == null ? "" : String(t.value)), f = d(
888
+ () => n.clearable && !o.disabled.value && !n.readonly && h.value.length > 0
889
+ ), m = d(
890
+ () => n.showCount && n.maxlength ? `${h.value.length}/${n.maxlength}` : null
891
+ ), g = d(() => [
892
892
  "wx-input",
893
893
  `wx-input--${o.size.value}`,
894
894
  {
895
895
  [`wx-input--${o.status.value}`]: o.status.value !== "default",
896
- "is-focused": m.value,
896
+ "is-focused": p.value,
897
897
  "is-disabled": o.disabled.value,
898
- "is-readonly": t.readonly
898
+ "is-readonly": n.readonly
899
899
  }
900
900
  ]);
901
- function p(f) {
902
- const $ = f.target.value;
903
- l.value = $, i("input", $);
901
+ function y(r) {
902
+ const S = r.target.value;
903
+ t.value = S, s("input", S);
904
904
  }
905
- function T(f) {
906
- i("change", f.target.value);
905
+ function P(r) {
906
+ s("change", r.target.value);
907
907
  }
908
- function M(f) {
909
- m.value = !0, i("focus", f);
908
+ function V(r) {
909
+ p.value = !0, s("focus", r);
910
910
  }
911
- function g(f) {
912
- m.value = !1, i("blur", f);
911
+ function B(r) {
912
+ p.value = !1, s("blur", r);
913
913
  }
914
- function C() {
915
- l.value = "", i("input", ""), i("change", ""), i("clear"), v.value?.focus();
914
+ function $() {
915
+ t.value = "", s("input", ""), s("change", ""), s("clear"), c.value?.focus();
916
916
  }
917
- return y({
918
- focus: () => v.value?.focus(),
919
- blur: () => v.value?.blur(),
920
- select: () => v.value?.select(),
921
- input: v
922
- }), (f, $) => (n(), d("div", {
923
- class: U(h.value)
917
+ return _({
918
+ focus: () => c.value?.focus(),
919
+ blur: () => c.value?.blur(),
920
+ select: () => c.value?.select(),
921
+ input: c
922
+ }), (r, S) => (l(), u("div", {
923
+ class: F(g.value)
924
924
  }, [
925
- f.$slots.prefix ? (n(), d("span", Ja, [
926
- P(f.$slots, "prefix", {}, void 0, !0)
927
- ])) : W("", !0),
928
- I("input", K({
929
- id: s(o).id.value,
925
+ r.$slots.prefix ? (l(), u("span", Dt, [
926
+ N(r.$slots, "prefix", {}, void 0, !0)
927
+ ])) : C("", !0),
928
+ x("input", te({
929
+ id: b(o).id.value,
930
930
  ref_key: "inputRef",
931
- ref: v
932
- }, f.$attrs, {
931
+ ref: c
932
+ }, r.$attrs, {
933
933
  class: "wx-input__inner",
934
934
  type: e.type,
935
- value: b.value,
935
+ value: h.value,
936
936
  placeholder: e.placeholder,
937
- disabled: s(o).disabled.value,
937
+ disabled: b(o).disabled.value,
938
938
  readonly: e.readonly,
939
939
  maxlength: e.maxlength,
940
940
  autocomplete: e.autocomplete,
941
941
  "aria-label": e.ariaLabel,
942
- "aria-describedby": s(o).describedBy.value,
943
- "aria-invalid": s(o).status.value === "error" || void 0,
944
- onInput: p,
945
- onChange: T,
946
- onFocus: M,
947
- onBlur: g
948
- }), null, 16, Za),
949
- c.value ? (n(), d("button", {
942
+ "aria-describedby": b(o).describedBy.value,
943
+ "aria-invalid": b(o).status.value === "error" || void 0,
944
+ onInput: y,
945
+ onChange: P,
946
+ onFocus: V,
947
+ onBlur: B
948
+ }), null, 16, Nt),
949
+ f.value ? (l(), u("button", {
950
950
  key: 1,
951
951
  class: "wx-input__clear",
952
952
  type: "button",
953
953
  tabindex: "-1",
954
954
  "aria-label": "Clear",
955
- onClick: C
956
- }, " ✕ ")) : W("", !0),
957
- r.value ? (n(), d("span", el, N(r.value), 1)) : W("", !0),
958
- f.$slots.suffix ? (n(), d("span", al, [
959
- P(f.$slots, "suffix", {}, void 0, !0)
960
- ])) : W("", !0)
955
+ onClick: $
956
+ }, " ✕ ")) : C("", !0),
957
+ m.value ? (l(), u("span", Ut, D(m.value), 1)) : C("", !0),
958
+ r.$slots.suffix ? (l(), u("span", Et, [
959
+ N(r.$slots, "suffix", {}, void 0, !0)
960
+ ])) : C("", !0)
961
961
  ], 2));
962
962
  }
963
- }), tl = /* @__PURE__ */ j(ll, [["__scopeId", "data-v-82a546ac"]]), ol = ["disabled"], il = ["id", "name", "value", "placeholder", "disabled", "readonly", "aria-label", "aria-describedby", "aria-invalid", "aria-valuenow", "aria-valuemin", "aria-valuemax"], nl = ["disabled"], ul = /* @__PURE__ */ E({
963
+ }), Qe = /* @__PURE__ */ Q(Ot, [["__scopeId", "data-v-82a546ac"]]), jt = ["disabled"], Kt = ["id", "name", "value", "placeholder", "disabled", "readonly", "aria-label", "aria-describedby", "aria-invalid", "aria-valuenow", "aria-valuemin", "aria-valuemax"], Gt = ["disabled"], qt = /* @__PURE__ */ J({
964
964
  name: "WxInputNumber",
965
965
  inheritAttrs: !1,
966
966
  __name: "InputNumber",
967
- props: /* @__PURE__ */ S({
967
+ props: /* @__PURE__ */ R({
968
968
  min: { default: void 0 },
969
969
  max: { default: void 0 },
970
970
  step: { default: 1 },
@@ -984,169 +984,309 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
984
984
  modelValue: { default: null },
985
985
  modelModifiers: {}
986
986
  }),
987
- emits: /* @__PURE__ */ S(["change", "focus", "blur"], ["update:modelValue"]),
988
- setup(e, { expose: y, emit: a }) {
989
- const t = e, i = a, l = G(e, "modelValue"), o = Y(t), v = D(null), m = D(!1), b = u(() => {
990
- if (t.precision !== void 0) return t.precision;
991
- const [, B = ""] = String(t.step).split(".");
992
- return B.length;
987
+ emits: /* @__PURE__ */ R(["change", "focus", "blur"], ["update:modelValue"]),
988
+ setup(e, { expose: _, emit: a }) {
989
+ const n = e, s = a, t = G(e, "modelValue"), o = le(n), c = q(null), p = q(!1), h = d(() => {
990
+ if (n.precision !== void 0) return n.precision;
991
+ const [, W = ""] = String(n.step).split(".");
992
+ return W.length;
993
993
  });
994
- function c(B) {
995
- const A = 10 ** b.value;
996
- return Math.round((B + Number.EPSILON) * A) / A;
997
- }
998
- function r(B) {
999
- let A = B;
1000
- return t.min !== void 0 && (A = Math.max(A, t.min)), t.max !== void 0 && (A = Math.min(A, t.max)), c(A);
1001
- }
1002
- const h = u(
1003
- () => typeof l.value == "number" && Number.isFinite(l.value) ? l.value : null
1004
- ), p = D(h.value === null ? "" : h.value.toFixed(b.value));
1005
- Z(h, (B) => {
1006
- m.value || (p.value = B === null ? "" : B.toFixed(b.value));
994
+ function f(W) {
995
+ const U = 10 ** h.value;
996
+ return Math.round((W + Number.EPSILON) * U) / U;
997
+ }
998
+ function m(W) {
999
+ let U = W;
1000
+ return n.min !== void 0 && (U = Math.max(U, n.min)), n.max !== void 0 && (U = Math.min(U, n.max)), f(U);
1001
+ }
1002
+ const g = d(
1003
+ () => typeof t.value == "number" && Number.isFinite(t.value) ? t.value : null
1004
+ ), y = q(g.value === null ? "" : g.value.toFixed(h.value));
1005
+ ne(g, (W) => {
1006
+ p.value || (y.value = W === null ? "" : W.toFixed(h.value));
1007
1007
  });
1008
- const T = u(() => o.disabled.value), M = u(
1009
- () => !T.value && !t.readonly && (t.min === void 0 || (h.value ?? 0) > t.min)
1010
- ), g = u(
1011
- () => !T.value && !t.readonly && (t.max === void 0 || (h.value ?? 0) < t.max)
1012
- ), C = u(() => [
1008
+ const P = d(() => o.disabled.value), V = d(
1009
+ () => !P.value && !n.readonly && (n.min === void 0 || (g.value ?? 0) > n.min)
1010
+ ), B = d(
1011
+ () => !P.value && !n.readonly && (n.max === void 0 || (g.value ?? 0) < n.max)
1012
+ ), $ = d(() => [
1013
1013
  "wx-input-number",
1014
1014
  `wx-input-number--${o.size.value}`,
1015
- `wx-input-number--controls-${t.controls ? t.controlsPosition : "none"}`,
1015
+ `wx-input-number--controls-${n.controls ? n.controlsPosition : "none"}`,
1016
1016
  {
1017
1017
  [`wx-input-number--${o.status.value}`]: o.status.value !== "default",
1018
- "is-focused": m.value,
1019
- "is-disabled": T.value
1018
+ "is-focused": p.value,
1019
+ "is-disabled": P.value
1020
1020
  }
1021
1021
  ]);
1022
- function f(B) {
1023
- l.value !== B && (l.value = B, i("change", B));
1024
- }
1025
- function $(B) {
1026
- if (T.value || t.readonly) return;
1027
- const A = h.value ?? r(0), _ = r(A + B * t.step);
1028
- f(_), p.value = _.toFixed(b.value);
1029
- }
1030
- function V(B) {
1031
- p.value = B.target.value;
1032
- const A = Number.parseFloat(p.value);
1033
- p.value === "" ? f(null) : Number.isFinite(A) && f(c(A));
1034
- }
1035
- function L() {
1036
- if (p.value.trim() === "") {
1037
- f(null), p.value = "";
1022
+ function r(W) {
1023
+ t.value !== W && (t.value = W, s("change", W));
1024
+ }
1025
+ function S(W) {
1026
+ if (P.value || n.readonly) return;
1027
+ const U = g.value ?? m(0), T = m(U + W * n.step);
1028
+ r(T), y.value = T.toFixed(h.value);
1029
+ }
1030
+ function z(W) {
1031
+ y.value = W.target.value;
1032
+ const U = Number.parseFloat(y.value);
1033
+ y.value === "" ? r(null) : Number.isFinite(U) && r(f(U));
1034
+ }
1035
+ function H() {
1036
+ if (y.value.trim() === "") {
1037
+ r(null), y.value = "";
1038
1038
  return;
1039
1039
  }
1040
- const B = Number.parseFloat(p.value);
1041
- if (!Number.isFinite(B)) {
1042
- p.value = h.value === null ? "" : h.value.toFixed(b.value);
1040
+ const W = Number.parseFloat(y.value);
1041
+ if (!Number.isFinite(W)) {
1042
+ y.value = g.value === null ? "" : g.value.toFixed(h.value);
1043
1043
  return;
1044
1044
  }
1045
- const A = r(B);
1046
- f(A), p.value = A.toFixed(b.value);
1045
+ const U = m(W);
1046
+ r(U), y.value = U.toFixed(h.value);
1047
1047
  }
1048
- function x(B) {
1049
- m.value = !0, i("focus", B);
1048
+ function M(W) {
1049
+ p.value = !0, s("focus", W);
1050
1050
  }
1051
- function k(B) {
1052
- m.value = !1, L(), i("blur", B);
1051
+ function w(W) {
1052
+ p.value = !1, H(), s("blur", W);
1053
1053
  }
1054
- function R(B) {
1055
- !t.wheel || !m.value || T.value || t.readonly || (B.preventDefault(), $(B.deltaY < 0 ? 1 : -1));
1054
+ function E(W) {
1055
+ !n.wheel || !p.value || P.value || n.readonly || (W.preventDefault(), S(W.deltaY < 0 ? 1 : -1));
1056
1056
  }
1057
- function O(B) {
1058
- B.key === "ArrowUp" ? (B.preventDefault(), $(1)) : B.key === "ArrowDown" ? (B.preventDefault(), $(-1)) : B.key === "Enter" && L();
1057
+ function Z(W) {
1058
+ W.key === "ArrowUp" ? (W.preventDefault(), S(1)) : W.key === "ArrowDown" ? (W.preventDefault(), S(-1)) : W.key === "Enter" && H();
1059
1059
  }
1060
- return y({
1061
- focus: () => v.value?.focus(),
1062
- blur: () => v.value?.blur(),
1063
- increase: () => $(1),
1064
- decrease: () => $(-1),
1065
- input: v
1066
- }), (B, A) => (n(), d("div", {
1067
- class: U(C.value)
1060
+ return _({
1061
+ focus: () => c.value?.focus(),
1062
+ blur: () => c.value?.blur(),
1063
+ increase: () => S(1),
1064
+ decrease: () => S(-1),
1065
+ input: c
1066
+ }), (W, U) => (l(), u("div", {
1067
+ class: F($.value)
1068
1068
  }, [
1069
- e.controls ? (n(), d("button", {
1069
+ e.controls ? (l(), u("button", {
1070
1070
  key: 0,
1071
1071
  class: "wx-input-number__button wx-input-number__button--decrease",
1072
1072
  type: "button",
1073
1073
  tabindex: "-1",
1074
1074
  "aria-label": "Decrease",
1075
- disabled: !M.value,
1076
- onClick: A[0] || (A[0] = (_) => $(-1))
1077
- }, [...A[2] || (A[2] = [
1078
- I("svg", {
1075
+ disabled: !V.value,
1076
+ onClick: U[0] || (U[0] = (T) => S(-1))
1077
+ }, [...U[2] || (U[2] = [
1078
+ x("svg", {
1079
1079
  viewBox: "0 0 16 16",
1080
1080
  fill: "none",
1081
1081
  "aria-hidden": "true"
1082
1082
  }, [
1083
- I("path", {
1083
+ x("path", {
1084
1084
  d: "M3.5 8h9",
1085
1085
  stroke: "currentColor",
1086
1086
  "stroke-width": "1.5",
1087
1087
  "stroke-linecap": "round"
1088
1088
  })
1089
1089
  ], -1)
1090
- ])], 8, ol)) : W("", !0),
1091
- I("input", K({
1092
- id: s(o).id.value,
1090
+ ])], 8, jt)) : C("", !0),
1091
+ x("input", te({
1092
+ id: b(o).id.value,
1093
1093
  ref_key: "inputRef",
1094
- ref: v
1095
- }, B.$attrs, {
1094
+ ref: c
1095
+ }, W.$attrs, {
1096
1096
  class: "wx-input-number__inner",
1097
1097
  type: "text",
1098
1098
  inputmode: "decimal",
1099
1099
  autocomplete: "off",
1100
1100
  name: e.name,
1101
- value: p.value,
1101
+ value: y.value,
1102
1102
  placeholder: e.placeholder,
1103
- disabled: T.value,
1103
+ disabled: P.value,
1104
1104
  readonly: e.readonly,
1105
1105
  "aria-label": e.ariaLabel,
1106
- "aria-describedby": s(o).describedBy.value,
1107
- "aria-invalid": s(o).status.value === "error" || void 0,
1106
+ "aria-describedby": b(o).describedBy.value,
1107
+ "aria-invalid": b(o).status.value === "error" || void 0,
1108
1108
  role: "spinbutton",
1109
- "aria-valuenow": h.value ?? void 0,
1109
+ "aria-valuenow": g.value ?? void 0,
1110
1110
  "aria-valuemin": e.min,
1111
1111
  "aria-valuemax": e.max,
1112
- onInput: V,
1113
- onFocus: x,
1114
- onBlur: k,
1115
- onKeydown: O,
1116
- onWheel: R
1117
- }), null, 16, il),
1118
- e.controls ? (n(), d("button", {
1112
+ onInput: z,
1113
+ onFocus: M,
1114
+ onBlur: w,
1115
+ onKeydown: Z,
1116
+ onWheel: E
1117
+ }), null, 16, Kt),
1118
+ e.controls ? (l(), u("button", {
1119
1119
  key: 1,
1120
1120
  class: "wx-input-number__button wx-input-number__button--increase",
1121
1121
  type: "button",
1122
1122
  tabindex: "-1",
1123
1123
  "aria-label": "Increase",
1124
- disabled: !g.value,
1125
- onClick: A[1] || (A[1] = (_) => $(1))
1126
- }, [...A[3] || (A[3] = [
1127
- I("svg", {
1124
+ disabled: !B.value,
1125
+ onClick: U[1] || (U[1] = (T) => S(1))
1126
+ }, [...U[3] || (U[3] = [
1127
+ x("svg", {
1128
1128
  viewBox: "0 0 16 16",
1129
1129
  fill: "none",
1130
1130
  "aria-hidden": "true"
1131
1131
  }, [
1132
- I("path", {
1132
+ x("path", {
1133
1133
  d: "M8 3.5v9M3.5 8h9",
1134
1134
  stroke: "currentColor",
1135
1135
  "stroke-width": "1.5",
1136
1136
  "stroke-linecap": "round"
1137
1137
  })
1138
1138
  ], -1)
1139
- ])], 8, nl)) : W("", !0)
1139
+ ])], 8, Gt)) : C("", !0)
1140
1140
  ], 2));
1141
1141
  }
1142
- }), sl = /* @__PURE__ */ j(ul, [["__scopeId", "data-v-1dcbf297"]]), dl = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby"], rl = {
1142
+ }), Yt = /* @__PURE__ */ Q(qt, [["__scopeId", "data-v-1dcbf297"]]), Xt = ["aria-label"], Jt = {
1143
+ key: 0,
1144
+ class: "wx-pagination__total"
1145
+ }, Zt = { class: "wx-pagination__controls" }, Qt = {
1146
+ key: 0,
1147
+ class: "wx-pagination__per-page"
1148
+ }, el = ["value", "disabled"], al = ["value"], tl = { class: "wx-pagination__list" }, ll = ["disabled"], ol = {
1149
+ key: 0,
1150
+ class: "wx-pagination__gap",
1151
+ "aria-hidden": "true"
1152
+ }, il = ["disabled", "aria-current", "aria-label", "onClick"], nl = ["disabled"], sl = /* @__PURE__ */ J({
1153
+ name: "WxPagination",
1154
+ __name: "Pagination",
1155
+ props: /* @__PURE__ */ R({
1156
+ paginator: { default: null },
1157
+ total: { default: void 0 },
1158
+ lastPage: { default: void 0 },
1159
+ siblings: { default: 1 },
1160
+ perPageOptions: { default: () => [] },
1161
+ showTotal: { type: Boolean, default: !0 },
1162
+ disabled: { type: Boolean, default: !1 },
1163
+ size: { default: "md" },
1164
+ ariaLabel: { default: "Pagination" }
1165
+ }, {
1166
+ page: { default: void 0 },
1167
+ pageModifiers: {},
1168
+ perPage: { default: void 0 },
1169
+ perPageModifiers: {}
1170
+ }),
1171
+ emits: /* @__PURE__ */ R(["change"], ["update:page", "update:perPage"]),
1172
+ setup(e, { emit: _ }) {
1173
+ const a = e, n = _, s = G(e, "page"), t = G(e, "perPage"), o = d(() => t.value ?? a.paginator?.per_page ?? 15), c = d(() => a.total ?? a.paginator?.total ?? 0), p = d(() => a.lastPage !== void 0 ? Math.max(1, a.lastPage) : a.paginator ? Math.max(1, a.paginator.last_page) : Math.max(1, Math.ceil(c.value / o.value))), h = d(() => {
1174
+ const B = s.value ?? a.paginator?.current_page ?? 1;
1175
+ return Math.min(Math.max(1, B), p.value);
1176
+ }), f = d(() => a.paginator ? a.paginator.from : c.value === 0 ? null : (h.value - 1) * o.value + 1), m = d(() => a.paginator ? a.paginator.to : c.value === 0 ? null : Math.min(c.value, h.value * o.value)), g = d(() => {
1177
+ const B = p.value, $ = h.value, r = a.siblings, S = /* @__PURE__ */ new Set([1, B]);
1178
+ for (let w = $ - r; w <= $ + r; w++)
1179
+ w >= 1 && w <= B && S.add(w);
1180
+ const z = [...S].sort((w, E) => w - E), H = [];
1181
+ let M = 0;
1182
+ for (const w of z) {
1183
+ const E = w - M;
1184
+ M && E === 2 ? H.push({ type: "page", value: w - 1 }) : M && E > 2 && H.push({ type: "gap", value: `gap-${w}` }), H.push({ type: "page", value: w }), M = w;
1185
+ }
1186
+ return H;
1187
+ }), y = d(() => [
1188
+ "wx-pagination",
1189
+ `wx-pagination--${a.size}`,
1190
+ { "is-disabled": a.disabled }
1191
+ ]);
1192
+ function P(B) {
1193
+ const $ = Math.min(Math.max(1, B), p.value);
1194
+ a.disabled || $ === h.value || (s.value = $, n("change", { page: $, perPage: o.value }));
1195
+ }
1196
+ function V(B) {
1197
+ const $ = Number(B.target.value);
1198
+ !Number.isFinite($) || $ === o.value || (t.value = $, s.value = 1, n("change", { page: 1, perPage: $ }));
1199
+ }
1200
+ return (B, $) => (l(), u("nav", {
1201
+ class: F(y.value),
1202
+ "aria-label": e.ariaLabel
1203
+ }, [
1204
+ e.showTotal ? (l(), u("p", Jt, [
1205
+ N(B.$slots, "total", {
1206
+ from: f.value,
1207
+ to: m.value,
1208
+ total: c.value
1209
+ }, () => [
1210
+ f.value === null ? (l(), u(K, { key: 0 }, [
1211
+ ae("Nothing to show")
1212
+ ], 64)) : (l(), u(K, { key: 1 }, [
1213
+ ae(D(f.value) + "–" + D(m.value) + " of " + D(c.value), 1)
1214
+ ], 64))
1215
+ ], !0)
1216
+ ])) : C("", !0),
1217
+ x("div", Zt, [
1218
+ e.perPageOptions.length ? (l(), u("label", Qt, [
1219
+ $[2] || ($[2] = x("span", { class: "wx-pagination__per-page-label" }, "Per page", -1)),
1220
+ x("select", {
1221
+ class: "wx-pagination__select",
1222
+ value: o.value,
1223
+ disabled: e.disabled,
1224
+ onChange: V
1225
+ }, [
1226
+ (l(!0), u(K, null, X(e.perPageOptions, (r) => (l(), u("option", {
1227
+ key: r,
1228
+ value: r
1229
+ }, D(r), 9, al))), 128))
1230
+ ], 40, el)
1231
+ ])) : C("", !0),
1232
+ x("ul", tl, [
1233
+ x("li", null, [
1234
+ x("button", {
1235
+ class: "wx-pagination__button wx-pagination__button--arrow",
1236
+ type: "button",
1237
+ disabled: e.disabled || h.value <= 1,
1238
+ "aria-label": "Previous page",
1239
+ onClick: $[0] || ($[0] = (r) => P(h.value - 1))
1240
+ }, [...$[3] || ($[3] = [
1241
+ x("svg", {
1242
+ viewBox: "0 0 8 12",
1243
+ "aria-hidden": "true"
1244
+ }, [
1245
+ x("path", { d: "M6.5 1 1.5 6l5 5" })
1246
+ ], -1)
1247
+ ])], 8, ll)
1248
+ ]),
1249
+ (l(!0), u(K, null, X(g.value, (r) => (l(), u("li", {
1250
+ key: r.value
1251
+ }, [
1252
+ r.type === "gap" ? (l(), u("span", ol, "…")) : (l(), u("button", {
1253
+ key: 1,
1254
+ class: F(["wx-pagination__button", { "is-current": r.value === h.value }]),
1255
+ type: "button",
1256
+ disabled: e.disabled,
1257
+ "aria-current": r.value === h.value ? "page" : void 0,
1258
+ "aria-label": `Page ${r.value}`,
1259
+ onClick: (S) => P(r.value)
1260
+ }, D(r.value), 11, il))
1261
+ ]))), 128)),
1262
+ x("li", null, [
1263
+ x("button", {
1264
+ class: "wx-pagination__button wx-pagination__button--arrow",
1265
+ type: "button",
1266
+ disabled: e.disabled || h.value >= p.value,
1267
+ "aria-label": "Next page",
1268
+ onClick: $[1] || ($[1] = (r) => P(h.value + 1))
1269
+ }, [...$[4] || ($[4] = [
1270
+ x("svg", {
1271
+ viewBox: "0 0 8 12",
1272
+ "aria-hidden": "true"
1273
+ }, [
1274
+ x("path", { d: "M1.5 1 6.5 6l-5 5" })
1275
+ ], -1)
1276
+ ])], 8, nl)
1277
+ ])
1278
+ ])
1279
+ ])
1280
+ ], 10, Xt));
1281
+ }
1282
+ }), ea = /* @__PURE__ */ Q(sl, [["__scopeId", "data-v-5371c9ef"]]), ul = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby"], dl = {
1143
1283
  key: 0,
1144
1284
  class: "wx-radio__label"
1145
- }, cl = /* @__PURE__ */ E({
1285
+ }, rl = /* @__PURE__ */ J({
1146
1286
  name: "WxRadio",
1147
1287
  inheritAttrs: !1,
1148
1288
  __name: "Radio",
1149
- props: /* @__PURE__ */ S({
1289
+ props: /* @__PURE__ */ R({
1150
1290
  value: { type: [String, Number, Boolean, null] },
1151
1291
  label: { default: void 0 },
1152
1292
  disabled: { type: Boolean, default: void 0 },
@@ -1158,50 +1298,50 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
1158
1298
  modelValue: { type: [String, Number, Boolean, null], default: null },
1159
1299
  modelModifiers: {}
1160
1300
  }),
1161
- emits: /* @__PURE__ */ S(["change"], ["update:modelValue"]),
1162
- setup(e, { emit: y }) {
1163
- const a = e, t = y, i = G(e, "modelValue"), l = te(_e, null), o = Y(a), v = u(
1164
- () => l ? l.modelValue.value === a.value : i.value === a.value
1165
- ), m = u(() => a.disabled || l?.disabled.value || o.disabled.value), b = u(() => a.size ?? l?.size.value ?? o.size.value), c = u(() => [
1301
+ emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
1302
+ setup(e, { emit: _ }) {
1303
+ const a = e, n = _, s = G(e, "modelValue"), t = ce(Ze, null), o = le(a), c = d(
1304
+ () => t ? t.modelValue.value === a.value : s.value === a.value
1305
+ ), p = d(() => a.disabled || t?.disabled.value || o.disabled.value), h = d(() => a.size ?? t?.size.value ?? o.size.value), f = d(() => [
1166
1306
  "wx-radio",
1167
- `wx-radio--${b.value}`,
1168
- { "is-checked": v.value, "is-disabled": m.value }
1307
+ `wx-radio--${h.value}`,
1308
+ { "is-checked": c.value, "is-disabled": p.value }
1169
1309
  ]);
1170
- function r() {
1171
- l ? l.toggle(a.value, !0) : i.value = a.value, t("change", a.value);
1310
+ function m() {
1311
+ t ? t.toggle(a.value, !0) : s.value = a.value, n("change", a.value);
1172
1312
  }
1173
- return (h, p) => (n(), d("label", {
1174
- class: U(c.value)
1313
+ return (g, y) => (l(), u("label", {
1314
+ class: F(f.value)
1175
1315
  }, [
1176
- I("input", K({
1177
- id: s(o).id.value
1178
- }, h.$attrs, {
1316
+ x("input", te({
1317
+ id: b(o).id.value
1318
+ }, g.$attrs, {
1179
1319
  class: "wx-radio__native",
1180
1320
  type: "radio",
1181
- name: e.name ?? s(l)?.name.value,
1182
- checked: v.value,
1183
- disabled: m.value,
1321
+ name: e.name ?? b(t)?.name.value,
1322
+ checked: c.value,
1323
+ disabled: p.value,
1184
1324
  "aria-label": e.ariaLabel,
1185
- "aria-describedby": s(o).describedBy.value,
1186
- onChange: r
1187
- }), null, 16, dl),
1188
- p[0] || (p[0] = I("span", {
1325
+ "aria-describedby": b(o).describedBy.value,
1326
+ onChange: m
1327
+ }), null, 16, ul),
1328
+ y[0] || (y[0] = x("span", {
1189
1329
  class: "wx-radio__box",
1190
1330
  "aria-hidden": "true"
1191
1331
  }, [
1192
- I("span", { class: "wx-radio__dot" })
1332
+ x("span", { class: "wx-radio__dot" })
1193
1333
  ], -1)),
1194
- e.label || h.$slots.default ? (n(), d("span", rl, [
1195
- P(h.$slots, "default", {}, () => [
1196
- ee(N(e.label), 1)
1334
+ e.label || g.$slots.default ? (l(), u("span", dl, [
1335
+ N(g.$slots, "default", {}, () => [
1336
+ ae(D(e.label), 1)
1197
1337
  ], !0)
1198
- ])) : W("", !0)
1338
+ ])) : C("", !0)
1199
1339
  ], 2));
1200
1340
  }
1201
- }), Me = /* @__PURE__ */ j(cl, [["__scopeId", "data-v-a22bec4a"]]), vl = ["aria-labelledby", "aria-describedby"], fl = /* @__PURE__ */ E({
1341
+ }), aa = /* @__PURE__ */ Q(rl, [["__scopeId", "data-v-a22bec4a"]]), cl = ["aria-labelledby", "aria-describedby"], vl = /* @__PURE__ */ J({
1202
1342
  name: "WxRadioGroup",
1203
1343
  __name: "RadioGroup",
1204
- props: /* @__PURE__ */ S({
1344
+ props: /* @__PURE__ */ R({
1205
1345
  options: { default: void 0 },
1206
1346
  disabled: { type: Boolean, default: void 0 },
1207
1347
  size: { default: void 0 },
@@ -1211,44 +1351,44 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
1211
1351
  modelValue: { type: [String, Number, Boolean, null], default: null },
1212
1352
  modelModifiers: {}
1213
1353
  }),
1214
- emits: /* @__PURE__ */ S(["change"], ["update:modelValue"]),
1215
- setup(e, { emit: y }) {
1216
- const a = e, t = y, i = G(e, "modelValue"), l = Y(a), o = ve("wx-radio-group");
1217
- l.item?.registerLabelTarget(void 0);
1218
- const v = u(() => a.disabled ?? l.disabled.value), m = u(() => a.size ?? l.size.value), b = u(() => a.name ?? o);
1219
- function c(r) {
1220
- i.value !== r && (i.value = r, t("change", r));
1221
- }
1222
- return ne(_e, {
1223
- name: b,
1224
- modelValue: u(() => i.value),
1225
- disabled: v,
1226
- size: m,
1227
- toggle: c
1228
- }), (r, h) => (n(), d("div", {
1229
- class: U(["wx-radio-group", { "wx-radio-group--inline": e.inline }]),
1354
+ emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
1355
+ setup(e, { emit: _ }) {
1356
+ const a = e, n = _, s = G(e, "modelValue"), t = le(a), o = Te("wx-radio-group");
1357
+ t.item?.registerLabelTarget(void 0);
1358
+ const c = d(() => a.disabled ?? t.disabled.value), p = d(() => a.size ?? t.size.value), h = d(() => a.name ?? o);
1359
+ function f(m) {
1360
+ s.value !== m && (s.value = m, n("change", m));
1361
+ }
1362
+ return xe(Ze, {
1363
+ name: h,
1364
+ modelValue: d(() => s.value),
1365
+ disabled: c,
1366
+ size: p,
1367
+ toggle: f
1368
+ }), (m, g) => (l(), u("div", {
1369
+ class: F(["wx-radio-group", { "wx-radio-group--inline": e.inline }]),
1230
1370
  role: "radiogroup",
1231
- "aria-labelledby": s(l).item ? `${s(l).item.id.value}-label` : void 0,
1232
- "aria-describedby": s(l).describedBy.value
1371
+ "aria-labelledby": b(t).item ? `${b(t).item.id.value}-label` : void 0,
1372
+ "aria-describedby": b(t).describedBy.value
1233
1373
  }, [
1234
- P(r.$slots, "default", {}, () => [
1235
- (n(!0), d(X, null, q(e.options, (p) => (n(), Q(Me, {
1236
- key: String(p.value),
1237
- value: p.value,
1238
- label: p.label,
1239
- disabled: p.disabled
1374
+ N(m.$slots, "default", {}, () => [
1375
+ (l(!0), u(K, null, X(e.options, (y) => (l(), ie(aa, {
1376
+ key: String(y.value),
1377
+ value: y.value,
1378
+ label: y.label,
1379
+ disabled: y.disabled
1240
1380
  }, null, 8, ["value", "label", "disabled"]))), 128))
1241
1381
  ], !0)
1242
- ], 10, vl));
1382
+ ], 10, cl));
1243
1383
  }
1244
- }), ml = /* @__PURE__ */ j(fl, [["__scopeId", "data-v-dcd2686e"]]), bl = ["id", "tabindex", "aria-label", "aria-describedby", "aria-valuemax", "aria-valuenow", "aria-readonly", "aria-disabled"], pl = ["onClick", "onMousemove"], hl = {
1384
+ }), fl = /* @__PURE__ */ Q(vl, [["__scopeId", "data-v-dcd2686e"]]), bl = ["id", "tabindex", "aria-label", "aria-describedby", "aria-valuemax", "aria-valuenow", "aria-readonly", "aria-disabled"], ml = ["onClick", "onMousemove"], pl = {
1245
1385
  key: 0,
1246
1386
  class: "wx-rate__value"
1247
- }, yl = ["name", "value"], xl = /* @__PURE__ */ E({
1387
+ }, hl = ["name", "value"], yl = /* @__PURE__ */ J({
1248
1388
  name: "WxRate",
1249
1389
  inheritAttrs: !1,
1250
1390
  __name: "Rate",
1251
- props: /* @__PURE__ */ S({
1391
+ props: /* @__PURE__ */ R({
1252
1392
  max: { default: 5 },
1253
1393
  allowHalf: { type: Boolean, default: !1 },
1254
1394
  clearable: { type: Boolean, default: !0 },
@@ -1263,65 +1403,65 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
1263
1403
  modelValue: { default: 0 },
1264
1404
  modelModifiers: {}
1265
1405
  }),
1266
- emits: /* @__PURE__ */ S(["change"], ["update:modelValue"]),
1267
- setup(e, { emit: y }) {
1268
- const a = e, t = y, i = G(e, "modelValue"), l = Y(a), o = D(null), v = u(() => !l.disabled.value && !a.readonly), m = u(() => o.value ?? i.value ?? 0), b = u(
1269
- () => Array.from({ length: a.max }, (g, C) => {
1270
- const f = C + 1, $ = Math.min(Math.max(m.value - C, 0), 1);
1271
- return { position: f, full: $ >= 1, half: $ > 0 && $ < 1 };
1406
+ emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
1407
+ setup(e, { emit: _ }) {
1408
+ const a = e, n = _, s = G(e, "modelValue"), t = le(a), o = q(null), c = d(() => !t.disabled.value && !a.readonly), p = d(() => o.value ?? s.value ?? 0), h = d(
1409
+ () => Array.from({ length: a.max }, (B, $) => {
1410
+ const r = $ + 1, S = Math.min(Math.max(p.value - $, 0), 1);
1411
+ return { position: r, full: S >= 1, half: S > 0 && S < 1 };
1272
1412
  })
1273
- ), c = u(() => [
1413
+ ), f = d(() => [
1274
1414
  "wx-rate",
1275
- `wx-rate--${l.size.value}`,
1276
- { "is-disabled": l.disabled.value, "is-readonly": a.readonly }
1415
+ `wx-rate--${t.size.value}`,
1416
+ { "is-disabled": t.disabled.value, "is-readonly": a.readonly }
1277
1417
  ]);
1278
- function r(g, C) {
1279
- if (!a.allowHalf) return g;
1280
- const f = C.currentTarget, { left: $, width: V } = f.getBoundingClientRect();
1281
- return C.clientX - $ < V / 2 ? g - 0.5 : g;
1282
- }
1283
- function h(g, C = !1) {
1284
- const f = C && a.clearable && i.value === g ? 0 : g;
1285
- f !== i.value && (i.value = f, t("change", f));
1286
- }
1287
- function p(g, C) {
1288
- v.value && h(r(g, C), !0);
1289
- }
1290
- function T(g, C) {
1291
- v.value && (o.value = r(g, C));
1292
- }
1293
- function M(g) {
1294
- if (!v.value) return;
1295
- const C = a.allowHalf ? 0.5 : 1, f = i.value ?? 0;
1296
- g.key === "ArrowRight" || g.key === "ArrowUp" ? (g.preventDefault(), h(Math.min(f + C, a.max))) : g.key === "ArrowLeft" || g.key === "ArrowDown" ? (g.preventDefault(), h(Math.max(f - C, 0))) : g.key === "Home" ? (g.preventDefault(), h(0)) : g.key === "End" && (g.preventDefault(), h(a.max));
1297
- }
1298
- return (g, C) => (n(), d("div", K({
1299
- id: s(l).id.value
1300
- }, g.$attrs, {
1301
- class: c.value,
1418
+ function m(B, $) {
1419
+ if (!a.allowHalf) return B;
1420
+ const r = $.currentTarget, { left: S, width: z } = r.getBoundingClientRect();
1421
+ return $.clientX - S < z / 2 ? B - 0.5 : B;
1422
+ }
1423
+ function g(B, $ = !1) {
1424
+ const r = $ && a.clearable && s.value === B ? 0 : B;
1425
+ r !== s.value && (s.value = r, n("change", r));
1426
+ }
1427
+ function y(B, $) {
1428
+ c.value && g(m(B, $), !0);
1429
+ }
1430
+ function P(B, $) {
1431
+ c.value && (o.value = m(B, $));
1432
+ }
1433
+ function V(B) {
1434
+ if (!c.value) return;
1435
+ const $ = a.allowHalf ? 0.5 : 1, r = s.value ?? 0;
1436
+ B.key === "ArrowRight" || B.key === "ArrowUp" ? (B.preventDefault(), g(Math.min(r + $, a.max))) : B.key === "ArrowLeft" || B.key === "ArrowDown" ? (B.preventDefault(), g(Math.max(r - $, 0))) : B.key === "Home" ? (B.preventDefault(), g(0)) : B.key === "End" && (B.preventDefault(), g(a.max));
1437
+ }
1438
+ return (B, $) => (l(), u("div", te({
1439
+ id: b(t).id.value
1440
+ }, B.$attrs, {
1441
+ class: f.value,
1302
1442
  role: "slider",
1303
- tabindex: v.value ? 0 : -1,
1443
+ tabindex: c.value ? 0 : -1,
1304
1444
  "aria-label": e.ariaLabel,
1305
- "aria-describedby": s(l).describedBy.value,
1445
+ "aria-describedby": b(t).describedBy.value,
1306
1446
  "aria-valuemin": 0,
1307
1447
  "aria-valuemax": e.max,
1308
- "aria-valuenow": i.value ?? 0,
1448
+ "aria-valuenow": s.value ?? 0,
1309
1449
  "aria-readonly": e.readonly || void 0,
1310
- "aria-disabled": s(l).disabled.value || void 0,
1311
- onKeydown: M,
1312
- onMouseleave: C[0] || (C[0] = (f) => o.value = null)
1450
+ "aria-disabled": b(t).disabled.value || void 0,
1451
+ onKeydown: V,
1452
+ onMouseleave: $[0] || ($[0] = (r) => o.value = null)
1313
1453
  }), [
1314
- (n(!0), d(X, null, q(b.value, (f) => (n(), d("span", {
1315
- key: f.position,
1316
- class: U(["wx-rate__star", { "is-full": f.full, "is-half": f.half }]),
1317
- onClick: ($) => p(f.position, $),
1318
- onMousemove: ($) => T(f.position, $)
1319
- }, [...C[1] || (C[1] = [
1320
- I("svg", {
1454
+ (l(!0), u(K, null, X(h.value, (r) => (l(), u("span", {
1455
+ key: r.position,
1456
+ class: F(["wx-rate__star", { "is-full": r.full, "is-half": r.half }]),
1457
+ onClick: (S) => y(r.position, S),
1458
+ onMousemove: (S) => P(r.position, S)
1459
+ }, [...$[1] || ($[1] = [
1460
+ x("svg", {
1321
1461
  viewBox: "0 0 24 24",
1322
1462
  "aria-hidden": "true"
1323
1463
  }, [
1324
- I("path", {
1464
+ x("path", {
1325
1465
  class: "wx-rate__outline",
1326
1466
  d: "M12 3.5l2.6 5.3 5.9.9-4.2 4.1 1 5.8-5.3-2.8-5.3 2.8 1-5.8-4.2-4.1 5.9-.9z",
1327
1467
  fill: "none",
@@ -1329,23 +1469,23 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
1329
1469
  "stroke-width": "1.5",
1330
1470
  "stroke-linejoin": "round"
1331
1471
  }),
1332
- I("path", {
1472
+ x("path", {
1333
1473
  class: "wx-rate__fill",
1334
1474
  d: "M12 3.5l2.6 5.3 5.9.9-4.2 4.1 1 5.8-5.3-2.8-5.3 2.8 1-5.8-4.2-4.1 5.9-.9z",
1335
1475
  fill: "currentColor"
1336
1476
  })
1337
1477
  ], -1)
1338
- ])], 42, pl))), 128)),
1339
- e.showValue ? (n(), d("span", hl, N(i.value ?? 0), 1)) : W("", !0),
1340
- e.name ? (n(), d("input", {
1478
+ ])], 42, ml))), 128)),
1479
+ e.showValue ? (l(), u("span", pl, D(s.value ?? 0), 1)) : C("", !0),
1480
+ e.name ? (l(), u("input", {
1341
1481
  key: 1,
1342
1482
  type: "hidden",
1343
1483
  name: e.name,
1344
- value: i.value ?? 0
1345
- }, null, 8, yl)) : W("", !0)
1484
+ value: s.value ?? 0
1485
+ }, null, 8, hl)) : C("", !0)
1346
1486
  ], 16, bl));
1347
1487
  }
1348
- }), kl = /* @__PURE__ */ j(xl, [["__scopeId", "data-v-7cbc0034"]]), gl = {
1488
+ }), xl = /* @__PURE__ */ Q(yl, [["__scopeId", "data-v-7cbc0034"]]), gl = {
1349
1489
  bold: "M7 5h6a3.5 3.5 0 0 1 0 7H7zm0 7h7a3.5 3.5 0 0 1 0 7H7z",
1350
1490
  italic: "M15 5h-5M14 19H9M13.5 5 10.5 19",
1351
1491
  strike: "M5 12h14M8 8.5A3 3 0 0 1 11 6h2a3 3 0 0 1 3 2.5M16 15.5A3 3 0 0 1 13 18h-2a3 3 0 0 1-3-2.5",
@@ -1370,15 +1510,15 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
1370
1510
  mergeCells: "M4 6h16v12H4zM12 6v3M12 15v3M9 12h6M9 12l2-2M9 12l2 2",
1371
1511
  check: "m5 13 4 4L19 7",
1372
1512
  close: "M6 6l12 12M18 6 6 18"
1373
- }, wl = ["title", "aria-label", "aria-pressed", "disabled"], $l = {
1513
+ }, kl = ["title", "aria-label", "aria-pressed", "disabled"], wl = {
1374
1514
  key: 0,
1375
1515
  viewBox: "0 0 24 24",
1376
1516
  fill: "none",
1377
1517
  "aria-hidden": "true"
1378
- }, _l = ["d"], Bl = {
1518
+ }, $l = ["d"], _l = {
1379
1519
  key: 1,
1380
1520
  class: "wx-rich-text__tool-text"
1381
- }, Ml = /* @__PURE__ */ E({
1521
+ }, Bl = /* @__PURE__ */ J({
1382
1522
  name: "WxRichTextToolbarButton",
1383
1523
  __name: "ToolbarButton",
1384
1524
  props: {
@@ -1390,27 +1530,27 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
1390
1530
  },
1391
1531
  emits: ["click"],
1392
1532
  setup(e) {
1393
- return (y, a) => (n(), d("button", {
1533
+ return (_, a) => (l(), u("button", {
1394
1534
  type: "button",
1395
- class: U(["wx-rich-text__tool", { "is-active": e.active }]),
1535
+ class: F(["wx-rich-text__tool", { "is-active": e.active }]),
1396
1536
  title: e.label,
1397
1537
  "aria-label": e.label,
1398
1538
  "aria-pressed": e.active,
1399
1539
  disabled: e.disabled,
1400
- onClick: a[0] || (a[0] = (t) => y.$emit("click"))
1540
+ onClick: a[0] || (a[0] = (n) => _.$emit("click"))
1401
1541
  }, [
1402
- e.icon ? (n(), d("svg", $l, [
1403
- I("path", {
1404
- d: s(gl)[e.icon],
1542
+ e.icon ? (l(), u("svg", wl, [
1543
+ x("path", {
1544
+ d: b(gl)[e.icon],
1405
1545
  stroke: "currentColor",
1406
1546
  "stroke-width": "1.7",
1407
1547
  "stroke-linecap": "round",
1408
1548
  "stroke-linejoin": "round"
1409
- }, null, 8, _l)
1410
- ])) : (n(), d("span", Bl, N(e.text), 1))
1411
- ], 10, wl));
1549
+ }, null, 8, $l)
1550
+ ])) : (l(), u("span", _l, D(e.text), 1))
1551
+ ], 10, kl));
1412
1552
  }
1413
- }), ie = /* @__PURE__ */ j(Ml, [["__scopeId", "data-v-c8c7e143"]]), Cl = [
1553
+ }), pe = /* @__PURE__ */ Q(Bl, [["__scopeId", "data-v-c8c7e143"]]), Ml = [
1414
1554
  "bold",
1415
1555
  "italic",
1416
1556
  "strike",
@@ -1432,13 +1572,13 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
1432
1572
  "divider",
1433
1573
  "undo",
1434
1574
  "redo"
1435
- ], Vl = [
1575
+ ], Cl = [
1436
1576
  "image/png",
1437
1577
  "image/jpeg",
1438
1578
  "image/gif",
1439
1579
  "image/webp",
1440
1580
  "image/svg+xml"
1441
- ], re = {
1581
+ ], Me = {
1442
1582
  bold: { label: "Bold", icon: "bold" },
1443
1583
  italic: { label: "Italic", icon: "italic" },
1444
1584
  strike: { label: "Strikethrough", icon: "strike" },
@@ -1456,7 +1596,7 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
1456
1596
  youtube: { label: "YouTube video", icon: "youtube" },
1457
1597
  undo: { label: "Undo", icon: "undo" },
1458
1598
  redo: { label: "Redo", icon: "redo" }
1459
- }, Il = [
1599
+ }, Sl = [
1460
1600
  { key: "addRowAfter", label: "Row below", icon: "rowAfter" },
1461
1601
  { key: "addRowBefore", label: "Row above", icon: "rowBefore" },
1462
1602
  { key: "addColumnAfter", label: "Column after", icon: "columnAfter" },
@@ -1465,24 +1605,24 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
1465
1605
  { key: "deleteColumn", label: "Delete column", icon: "deleteColumn" },
1466
1606
  { key: "mergeOrSplit", label: "Merge or split cells", icon: "mergeCells" },
1467
1607
  { key: "deleteTable", label: "Delete table", icon: "deleteTable" }
1468
- ], Tl = ["aria-label"], zl = {
1608
+ ], Tl = ["aria-label"], Il = {
1469
1609
  key: 0,
1470
1610
  class: "wx-rich-text__divider",
1471
1611
  "aria-hidden": "true"
1472
- }, Wl = {
1612
+ }, Vl = {
1473
1613
  key: 0,
1474
1614
  class: "wx-rich-text__uploading"
1475
- }, Sl = {
1615
+ }, zl = {
1476
1616
  key: 0,
1477
1617
  class: "wx-rich-text__toolbar wx-rich-text__toolbar--table"
1478
- }, Al = ["for"], Ll = ["id", "placeholder"], Rl = {
1618
+ }, Pl = ["for"], Wl = ["id", "placeholder"], Al = {
1479
1619
  key: 0,
1480
1620
  class: "wx-rich-text__placeholder"
1481
- }, Hl = ["accept"], Dl = /* @__PURE__ */ E({
1621
+ }, Ll = ["accept"], Rl = /* @__PURE__ */ J({
1482
1622
  name: "WxRichText",
1483
1623
  inheritAttrs: !1,
1484
1624
  __name: "RichText",
1485
- props: /* @__PURE__ */ S({
1625
+ props: /* @__PURE__ */ R({
1486
1626
  placeholder: { default: void 0 },
1487
1627
  disabled: { type: Boolean, default: void 0 },
1488
1628
  readonly: { type: Boolean, default: !1 },
@@ -1491,292 +1631,292 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
1491
1631
  id: { default: void 0 },
1492
1632
  ariaLabel: { default: void 0 },
1493
1633
  minHeight: { default: "220px" },
1494
- tools: { default: () => Cl },
1634
+ tools: { default: () => Ml },
1495
1635
  upload: { type: Function, default: void 0 },
1496
1636
  pickImage: { type: Function, default: void 0 },
1497
- accept: { default: () => Vl }
1637
+ accept: { default: () => Cl }
1498
1638
  }, {
1499
1639
  modelValue: { default: "" },
1500
1640
  modelModifiers: {}
1501
1641
  }),
1502
- emits: /* @__PURE__ */ S(["change", "focus", "blur", "uploadError"], ["update:modelValue"]),
1503
- setup(e, { expose: y, emit: a }) {
1504
- const t = e, i = a, l = G(e, "modelValue"), o = Y(t), v = D(!1), m = D(0), b = D(null), c = D(null), r = u(() => !o.disabled.value && !t.readonly);
1505
- function h() {
1506
- const _ = p.value;
1507
- return !_ || _.isEmpty ? "" : _.getHTML();
1508
- }
1509
- const p = oa({
1510
- content: l.value ?? "",
1511
- editable: r.value,
1642
+ emits: /* @__PURE__ */ R(["change", "focus", "blur", "uploadError"], ["update:modelValue"]),
1643
+ setup(e, { expose: _, emit: a }) {
1644
+ const n = e, s = a, t = G(e, "modelValue"), o = le(n), c = q(!1), p = q(0), h = q(null), f = q(null), m = d(() => !o.disabled.value && !n.readonly);
1645
+ function g() {
1646
+ const T = y.value;
1647
+ return !T || T.isEmpty ? "" : T.getHTML();
1648
+ }
1649
+ const y = Ka({
1650
+ content: t.value ?? "",
1651
+ editable: m.value,
1512
1652
  extensions: [
1513
- na.configure({
1653
+ qa.configure({
1514
1654
  link: {
1515
1655
  openOnClick: !1,
1516
1656
  autolink: !0,
1517
1657
  HTMLAttributes: { rel: "noopener noreferrer nofollow", target: "_blank" }
1518
1658
  }
1519
1659
  }),
1520
- ua.configure({ table: { resizable: !0 } }),
1521
- sa.configure({ HTMLAttributes: { class: "wx-rich-text__image" } }),
1522
- da.configure({ nocookie: !0, width: 640, height: 360 }),
1523
- ra.configure({
1524
- allowedMimeTypes: t.accept,
1525
- onDrop: (_, z, w) => {
1526
- f(z, w);
1660
+ Ya.configure({ table: { resizable: !0 } }),
1661
+ Xa.configure({ HTMLAttributes: { class: "wx-rich-text__image" } }),
1662
+ Ja.configure({ nocookie: !0, width: 640, height: 360 }),
1663
+ Za.configure({
1664
+ allowedMimeTypes: n.accept,
1665
+ onDrop: (T, A, I) => {
1666
+ r(A, I);
1527
1667
  },
1528
- onPaste: (_, z) => {
1529
- f(z);
1668
+ onPaste: (T, A) => {
1669
+ r(A);
1530
1670
  }
1531
1671
  })
1532
1672
  ],
1533
1673
  onUpdate: () => {
1534
- const _ = h();
1535
- l.value = _, i("change", _);
1674
+ const T = g();
1675
+ t.value = T, s("change", T);
1536
1676
  },
1537
1677
  onFocus: () => {
1538
- v.value = !0, i("focus");
1678
+ c.value = !0, s("focus");
1539
1679
  },
1540
1680
  onBlur: () => {
1541
- v.value = !1, i("blur");
1681
+ c.value = !1, s("blur");
1542
1682
  }
1543
1683
  });
1544
- Z(l, (_) => {
1545
- const z = p.value;
1546
- z && (_ ?? "") !== h() && z.commands.setContent(_ ?? "", { emitUpdate: !1 });
1547
- }), Z(r, (_) => p.value?.setEditable(_));
1548
- const T = u(() => p.value?.isEmpty ?? !0), M = u(() => p.value?.isActive("table") ?? !1), g = u(() => [
1684
+ ne(t, (T) => {
1685
+ const A = y.value;
1686
+ A && (T ?? "") !== g() && A.commands.setContent(T ?? "", { emitUpdate: !1 });
1687
+ }), ne(m, (T) => y.value?.setEditable(T));
1688
+ const P = d(() => y.value?.isEmpty ?? !0), V = d(() => y.value?.isActive("table") ?? !1), B = d(() => [
1549
1689
  "wx-rich-text",
1550
1690
  `wx-rich-text--${o.size.value}`,
1551
1691
  {
1552
1692
  [`wx-rich-text--${o.status.value}`]: o.status.value !== "default",
1553
- "is-focused": v.value,
1693
+ "is-focused": c.value,
1554
1694
  "is-disabled": o.disabled.value,
1555
- "is-readonly": t.readonly
1695
+ "is-readonly": n.readonly
1556
1696
  }
1557
1697
  ]);
1558
- function C(_, z, w) {
1559
- const J = p.value;
1560
- if (!J) return;
1561
- const me = w ?? J.state.selection.anchor;
1562
- J.chain().focus().insertContentAt(me, { type: "image", attrs: { src: _, alt: z } }).run();
1563
- }
1564
- async function f(_, z) {
1565
- if (t.upload)
1566
- for (const w of _) {
1567
- m.value += 1;
1698
+ function $(T, A, I) {
1699
+ const oe = y.value;
1700
+ if (!oe) return;
1701
+ const ue = I ?? oe.state.selection.anchor;
1702
+ oe.chain().focus().insertContentAt(ue, { type: "image", attrs: { src: T, alt: A } }).run();
1703
+ }
1704
+ async function r(T, A) {
1705
+ if (n.upload)
1706
+ for (const I of T) {
1707
+ p.value += 1;
1568
1708
  try {
1569
- const J = await t.upload(w);
1570
- C(J.url, J.alt, z);
1571
- } catch (J) {
1572
- i("uploadError", J, w);
1709
+ const oe = await n.upload(I);
1710
+ $(oe.url, oe.alt, A);
1711
+ } catch (oe) {
1712
+ s("uploadError", oe, I);
1573
1713
  } finally {
1574
- m.value -= 1;
1714
+ p.value -= 1;
1575
1715
  }
1576
1716
  }
1577
1717
  }
1578
- async function $() {
1579
- if (t.pickImage) {
1580
- const _ = await t.pickImage();
1581
- _ && C(_);
1718
+ async function S() {
1719
+ if (n.pickImage) {
1720
+ const T = await n.pickImage();
1721
+ T && $(T);
1582
1722
  return;
1583
1723
  }
1584
- b.value?.click();
1585
- }
1586
- function V(_) {
1587
- const z = _.target, w = Array.from(z.files ?? []);
1588
- z.value = "", f(w);
1589
- }
1590
- function L(_) {
1591
- const z = _ === "link" ? p.value?.getAttributes("link").href ?? "" : "";
1592
- c.value = { kind: _, value: String(z) };
1593
- }
1594
- function x() {
1595
- const _ = p.value, z = c.value;
1596
- if (!_ || !z) return;
1597
- const w = z.value.trim();
1598
- z.kind === "link" ? w ? _.chain().focus().extendMarkRange("link").setLink({ href: w }).run() : _.chain().focus().extendMarkRange("link").unsetLink().run() : w && _.commands.setYoutubeVideo({ src: w }), c.value = null;
1599
- }
1600
- function k(_) {
1601
- return _ === "image" ? !!(t.upload || t.pickImage) : !0;
1602
- }
1603
- const R = u(() => t.tools.filter(k));
1604
- function O(_) {
1605
- const z = p.value;
1606
- if (!z) return !1;
1607
- switch (_) {
1724
+ h.value?.click();
1725
+ }
1726
+ function z(T) {
1727
+ const A = T.target, I = Array.from(A.files ?? []);
1728
+ A.value = "", r(I);
1729
+ }
1730
+ function H(T) {
1731
+ const A = T === "link" ? y.value?.getAttributes("link").href ?? "" : "";
1732
+ f.value = { kind: T, value: String(A) };
1733
+ }
1734
+ function M() {
1735
+ const T = y.value, A = f.value;
1736
+ if (!T || !A) return;
1737
+ const I = A.value.trim();
1738
+ A.kind === "link" ? I ? T.chain().focus().extendMarkRange("link").setLink({ href: I }).run() : T.chain().focus().extendMarkRange("link").unsetLink().run() : I && T.commands.setYoutubeVideo({ src: I }), f.value = null;
1739
+ }
1740
+ function w(T) {
1741
+ return T === "image" ? !!(n.upload || n.pickImage) : !0;
1742
+ }
1743
+ const E = d(() => n.tools.filter(w));
1744
+ function Z(T) {
1745
+ const A = y.value;
1746
+ if (!A) return !1;
1747
+ switch (T) {
1608
1748
  case "h2":
1609
- return z.isActive("heading", { level: 2 });
1749
+ return A.isActive("heading", { level: 2 });
1610
1750
  case "h3":
1611
- return z.isActive("heading", { level: 3 });
1751
+ return A.isActive("heading", { level: 3 });
1612
1752
  case "h4":
1613
- return z.isActive("heading", { level: 4 });
1753
+ return A.isActive("heading", { level: 4 });
1614
1754
  default:
1615
- return z.isActive(_);
1755
+ return A.isActive(T);
1616
1756
  }
1617
1757
  }
1618
- function B(_) {
1619
- const z = p.value;
1620
- if (!z) return;
1621
- const w = z.chain().focus();
1622
- switch (_) {
1758
+ function W(T) {
1759
+ const A = y.value;
1760
+ if (!A) return;
1761
+ const I = A.chain().focus();
1762
+ switch (T) {
1623
1763
  case "bold":
1624
- w.toggleBold().run();
1764
+ I.toggleBold().run();
1625
1765
  break;
1626
1766
  case "italic":
1627
- w.toggleItalic().run();
1767
+ I.toggleItalic().run();
1628
1768
  break;
1629
1769
  case "strike":
1630
- w.toggleStrike().run();
1770
+ I.toggleStrike().run();
1631
1771
  break;
1632
1772
  case "code":
1633
- w.toggleCode().run();
1773
+ I.toggleCode().run();
1634
1774
  break;
1635
1775
  case "h2":
1636
- w.toggleHeading({ level: 2 }).run();
1776
+ I.toggleHeading({ level: 2 }).run();
1637
1777
  break;
1638
1778
  case "h3":
1639
- w.toggleHeading({ level: 3 }).run();
1779
+ I.toggleHeading({ level: 3 }).run();
1640
1780
  break;
1641
1781
  case "h4":
1642
- w.toggleHeading({ level: 4 }).run();
1782
+ I.toggleHeading({ level: 4 }).run();
1643
1783
  break;
1644
1784
  case "bulletList":
1645
- w.toggleBulletList().run();
1785
+ I.toggleBulletList().run();
1646
1786
  break;
1647
1787
  case "orderedList":
1648
- w.toggleOrderedList().run();
1788
+ I.toggleOrderedList().run();
1649
1789
  break;
1650
1790
  case "blockquote":
1651
- w.toggleBlockquote().run();
1791
+ I.toggleBlockquote().run();
1652
1792
  break;
1653
1793
  case "hr":
1654
- w.setHorizontalRule().run();
1794
+ I.setHorizontalRule().run();
1655
1795
  break;
1656
1796
  case "undo":
1657
- w.undo().run();
1797
+ I.undo().run();
1658
1798
  break;
1659
1799
  case "redo":
1660
- w.redo().run();
1800
+ I.redo().run();
1661
1801
  break;
1662
1802
  case "table":
1663
- w.insertTable({ rows: 3, cols: 3, withHeaderRow: !0 }).run();
1803
+ I.insertTable({ rows: 3, cols: 3, withHeaderRow: !0 }).run();
1664
1804
  break;
1665
1805
  case "link":
1666
- L("link");
1806
+ H("link");
1667
1807
  break;
1668
1808
  case "youtube":
1669
- L("youtube");
1809
+ H("youtube");
1670
1810
  break;
1671
1811
  case "image":
1672
- $();
1812
+ S();
1673
1813
  break;
1674
1814
  }
1675
1815
  }
1676
- function A(_) {
1677
- const z = p.value;
1678
- if (!z) return;
1679
- z.chain().focus()[_]().run();
1680
- }
1681
- return y({
1682
- editor: p,
1683
- focus: () => p.value?.commands.focus(),
1684
- clear: () => p.value?.commands.clearContent(!0)
1685
- }), (_, z) => (n(), d("div", {
1686
- class: U(g.value)
1816
+ function U(T) {
1817
+ const A = y.value;
1818
+ if (!A) return;
1819
+ A.chain().focus()[T]().run();
1820
+ }
1821
+ return _({
1822
+ editor: y,
1823
+ focus: () => y.value?.commands.focus(),
1824
+ clear: () => y.value?.commands.clearContent(!0)
1825
+ }), (T, A) => (l(), u("div", {
1826
+ class: F(B.value)
1687
1827
  }, [
1688
- I("div", {
1828
+ x("div", {
1689
1829
  class: "wx-rich-text__toolbar",
1690
1830
  role: "toolbar",
1691
1831
  "aria-label": e.ariaLabel ?? "Text formatting"
1692
1832
  }, [
1693
- (n(!0), d(X, null, q(R.value, (w, J) => (n(), d(X, {
1694
- key: `${w}-${J}`
1833
+ (l(!0), u(K, null, X(E.value, (I, oe) => (l(), u(K, {
1834
+ key: `${I}-${oe}`
1695
1835
  }, [
1696
- w === "divider" ? (n(), d("span", zl)) : (n(), Q(ie, {
1836
+ I === "divider" ? (l(), u("span", Il)) : (l(), ie(pe, {
1697
1837
  key: 1,
1698
- icon: s(re)[w].icon,
1699
- text: s(re)[w].text,
1700
- label: s(re)[w].label,
1701
- active: O(w),
1702
- disabled: !r.value,
1703
- onClick: (me) => B(w)
1838
+ icon: b(Me)[I].icon,
1839
+ text: b(Me)[I].text,
1840
+ label: b(Me)[I].label,
1841
+ active: Z(I),
1842
+ disabled: !m.value,
1843
+ onClick: (ue) => W(I)
1704
1844
  }, null, 8, ["icon", "text", "label", "active", "disabled", "onClick"]))
1705
1845
  ], 64))), 128)),
1706
- m.value > 0 ? (n(), d("span", Wl, "Uploading…")) : W("", !0)
1846
+ p.value > 0 ? (l(), u("span", Vl, "Uploading…")) : C("", !0)
1707
1847
  ], 8, Tl),
1708
- M.value && r.value ? (n(), d("div", Sl, [
1709
- (n(!0), d(X, null, q(s(Il), (w) => (n(), Q(ie, {
1710
- key: w.key,
1711
- icon: w.icon,
1712
- label: w.label,
1713
- onClick: (J) => A(w.key)
1848
+ V.value && m.value ? (l(), u("div", zl, [
1849
+ (l(!0), u(K, null, X(b(Sl), (I) => (l(), ie(pe, {
1850
+ key: I.key,
1851
+ icon: I.icon,
1852
+ label: I.label,
1853
+ onClick: (oe) => U(I.key)
1714
1854
  }, null, 8, ["icon", "label", "onClick"]))), 128))
1715
- ])) : W("", !0),
1716
- c.value ? (n(), d("form", {
1855
+ ])) : C("", !0),
1856
+ f.value ? (l(), u("form", {
1717
1857
  key: 1,
1718
1858
  class: "wx-rich-text__prompt",
1719
- onSubmit: le(x, ["prevent"])
1859
+ onSubmit: de(M, ["prevent"])
1720
1860
  }, [
1721
- I("label", {
1861
+ x("label", {
1722
1862
  class: "wx-rich-text__prompt-label",
1723
- for: `${s(o).id.value}-prompt`
1724
- }, N(c.value.kind === "link" ? "Link address" : "YouTube URL"), 9, Al),
1725
- Ve(I("input", {
1726
- id: `${s(o).id.value}-prompt`,
1727
- "onUpdate:modelValue": z[0] || (z[0] = (w) => c.value.value = w),
1863
+ for: `${b(o).id.value}-prompt`
1864
+ }, D(f.value.kind === "link" ? "Link address" : "YouTube URL"), 9, Pl),
1865
+ ma(x("input", {
1866
+ id: `${b(o).id.value}-prompt`,
1867
+ "onUpdate:modelValue": A[0] || (A[0] = (I) => f.value.value = I),
1728
1868
  class: "wx-rich-text__prompt-input",
1729
1869
  type: "url",
1730
- placeholder: c.value.kind === "link" ? "https://example.com" : "https://youtu.be/…",
1731
- onKeydown: z[1] || (z[1] = Ie((w) => c.value = null, ["esc"]))
1732
- }, null, 40, Ll), [
1733
- [Te, c.value.value]
1870
+ placeholder: f.value.kind === "link" ? "https://example.com" : "https://youtu.be/…",
1871
+ onKeydown: A[1] || (A[1] = pa((I) => f.value = null, ["esc"]))
1872
+ }, null, 40, Wl), [
1873
+ [ha, f.value.value]
1734
1874
  ]),
1735
- F(ie, {
1875
+ O(pe, {
1736
1876
  icon: "check",
1737
1877
  label: "Apply",
1738
- onClick: x
1878
+ onClick: M
1739
1879
  }),
1740
- F(ie, {
1880
+ O(pe, {
1741
1881
  icon: "close",
1742
1882
  label: "Cancel",
1743
- onClick: z[2] || (z[2] = (w) => c.value = null)
1883
+ onClick: A[2] || (A[2] = (I) => f.value = null)
1744
1884
  })
1745
- ], 32)) : W("", !0),
1746
- I("div", {
1885
+ ], 32)) : C("", !0),
1886
+ x("div", {
1747
1887
  class: "wx-rich-text__body",
1748
- style: ae({ minHeight: e.minHeight })
1888
+ style: ee({ minHeight: e.minHeight })
1749
1889
  }, [
1750
- e.placeholder && T.value ? (n(), d("span", Rl, N(e.placeholder), 1)) : W("", !0),
1751
- F(s(ia), {
1752
- editor: s(p),
1890
+ e.placeholder && P.value ? (l(), u("span", Al, D(e.placeholder), 1)) : C("", !0),
1891
+ O(b(Ga), {
1892
+ editor: b(y),
1753
1893
  class: "wx-rich-text__content",
1754
- "aria-describedby": s(o).describedBy.value
1894
+ "aria-describedby": b(o).describedBy.value
1755
1895
  }, null, 8, ["editor", "aria-describedby"])
1756
1896
  ], 4),
1757
- e.upload && !e.pickImage ? (n(), d("input", {
1897
+ e.upload && !e.pickImage ? (l(), u("input", {
1758
1898
  key: 2,
1759
1899
  ref_key: "fileInput",
1760
- ref: b,
1900
+ ref: h,
1761
1901
  class: "wx-rich-text__file",
1762
1902
  type: "file",
1763
1903
  accept: e.accept.join(","),
1764
1904
  multiple: "",
1765
- onChange: V
1766
- }, null, 40, Hl)) : W("", !0)
1905
+ onChange: z
1906
+ }, null, 40, Ll)) : C("", !0)
1767
1907
  ], 2));
1768
1908
  }
1769
- }), Fl = /* @__PURE__ */ j(Dl, [["__scopeId", "data-v-80be39db"]]), Pl = { class: "wx-select__value" }, Nl = ["aria-label", "onClick"], Ul = {
1909
+ }), Fl = /* @__PURE__ */ Q(Rl, [["__scopeId", "data-v-80be39db"]]), Hl = { class: "wx-select__value" }, Dl = ["aria-label", "onClick"], Nl = {
1770
1910
  key: 0,
1771
1911
  class: "wx-select__single"
1772
- }, El = {
1912
+ }, Ul = {
1773
1913
  key: 1,
1774
1914
  class: "wx-select__placeholder"
1775
- }, Ol = { class: "wx-select__option-label" }, jl = /* @__PURE__ */ E({
1915
+ }, El = { class: "wx-select__option-label" }, Ol = /* @__PURE__ */ J({
1776
1916
  name: "WxSelect",
1777
1917
  inheritAttrs: !1,
1778
1918
  __name: "Select",
1779
- props: /* @__PURE__ */ S({
1919
+ props: /* @__PURE__ */ R({
1780
1920
  options: { default: () => [] },
1781
1921
  multiple: { type: Boolean, default: !1 },
1782
1922
  filterable: { type: Boolean, default: !1 },
@@ -1794,132 +1934,132 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
1794
1934
  modelValue: { default: null },
1795
1935
  modelModifiers: {}
1796
1936
  }),
1797
- emits: /* @__PURE__ */ S(["change", "clear", "open", "close", "search"], ["update:modelValue"]),
1798
- setup(e, { emit: y }) {
1799
- const a = e, t = y, i = G(e, "modelValue"), l = Y(a), o = D(!1), v = D(""), m = u({
1800
- get: () => a.multiple ? i.value ?? [] : i.value ?? null,
1801
- set: (V) => {
1802
- i.value = V, t("change", V);
1937
+ emits: /* @__PURE__ */ R(["change", "clear", "open", "close", "search"], ["update:modelValue"]),
1938
+ setup(e, { emit: _ }) {
1939
+ const a = e, n = _, s = G(e, "modelValue"), t = le(a), o = q(!1), c = q(""), p = d({
1940
+ get: () => a.multiple ? s.value ?? [] : s.value ?? null,
1941
+ set: (z) => {
1942
+ s.value = z, n("change", z);
1803
1943
  }
1804
- }), b = (V) => a.options.find((L) => L.value === V)?.label ?? String(V), c = u(() => a.multiple ? (i.value ?? []).map((V) => ({ value: V, label: b(V) })) : []), r = u(() => {
1944
+ }), h = (z) => a.options.find((H) => H.value === z)?.label ?? String(z), f = d(() => a.multiple ? (s.value ?? []).map((z) => ({ value: z, label: h(z) })) : []), m = d(() => {
1805
1945
  if (a.multiple) return "";
1806
- const V = i.value;
1807
- return V == null ? "" : b(V);
1808
- }), h = u(
1809
- () => a.multiple ? c.value.length > 0 : i.value !== null && i.value !== void 0 && i.value !== ""
1810
- ), p = u(() => a.clearable && !l.disabled.value && h.value), T = u(() => [
1946
+ const z = s.value;
1947
+ return z == null ? "" : h(z);
1948
+ }), g = d(
1949
+ () => a.multiple ? f.value.length > 0 : s.value !== null && s.value !== void 0 && s.value !== ""
1950
+ ), y = d(() => a.clearable && !t.disabled.value && g.value), P = d(() => [
1811
1951
  "wx-select",
1812
- `wx-select--${l.size.value}`,
1952
+ `wx-select--${t.size.value}`,
1813
1953
  {
1814
- [`wx-select--${l.status.value}`]: l.status.value !== "default",
1954
+ [`wx-select--${t.status.value}`]: t.status.value !== "default",
1815
1955
  "is-open": o.value,
1816
- "is-disabled": l.disabled.value,
1956
+ "is-disabled": t.disabled.value,
1817
1957
  "is-multiple": a.multiple
1818
1958
  }
1819
1959
  ]);
1820
- Z(
1821
- () => i.value,
1960
+ ne(
1961
+ () => s.value,
1822
1962
  () => {
1823
- v.value = a.multiple ? "" : r.value;
1963
+ c.value = a.multiple ? "" : m.value;
1824
1964
  },
1825
1965
  { immediate: !0 }
1826
- ), Z(o, (V) => {
1827
- if (V) {
1828
- t("open");
1966
+ ), ne(o, (z) => {
1967
+ if (z) {
1968
+ n("open");
1829
1969
  return;
1830
1970
  }
1831
- v.value = a.multiple ? "" : r.value, t("close");
1971
+ c.value = a.multiple ? "" : m.value, n("close");
1832
1972
  });
1833
- function M() {
1834
- l.disabled.value || (o.value = !0);
1973
+ function V() {
1974
+ t.disabled.value || (o.value = !0);
1835
1975
  }
1836
- function g(V) {
1837
- return V == null ? "" : b(V);
1976
+ function B(z) {
1977
+ return z == null ? "" : h(z);
1838
1978
  }
1839
- function C(V) {
1840
- t("search", V.target.value);
1979
+ function $(z) {
1980
+ n("search", z.target.value);
1841
1981
  }
1842
- function f() {
1843
- i.value = a.multiple ? [] : null, t("change", i.value), t("clear");
1982
+ function r() {
1983
+ s.value = a.multiple ? [] : null, n("change", s.value), n("clear");
1844
1984
  }
1845
- function $(V) {
1846
- const L = (i.value ?? []).filter((x) => x !== V);
1847
- i.value = L, t("change", L);
1985
+ function S(z) {
1986
+ const H = (s.value ?? []).filter((M) => M !== z);
1987
+ s.value = H, n("change", H);
1848
1988
  }
1849
- return (V, L) => (n(), Q(s(Oe), {
1850
- modelValue: m.value,
1851
- "onUpdate:modelValue": L[1] || (L[1] = (x) => m.value = x),
1989
+ return (z, H) => (l(), ie(b(za), {
1990
+ modelValue: p.value,
1991
+ "onUpdate:modelValue": H[1] || (H[1] = (M) => p.value = M),
1852
1992
  open: o.value,
1853
- "onUpdate:open": L[2] || (L[2] = (x) => o.value = x),
1993
+ "onUpdate:open": H[2] || (H[2] = (M) => o.value = M),
1854
1994
  multiple: e.multiple,
1855
- disabled: s(l).disabled.value,
1995
+ disabled: b(t).disabled.value,
1856
1996
  name: e.name,
1857
1997
  "ignore-filter": !e.filterable,
1858
1998
  "open-on-click": !0,
1859
- class: U(T.value),
1999
+ class: F(P.value),
1860
2000
  as: "div"
1861
2001
  }, {
1862
- default: H(() => [
1863
- F(s(je), {
2002
+ default: Y(() => [
2003
+ O(b(Pa), {
1864
2004
  class: "wx-select__anchor",
1865
2005
  as: "div",
1866
- onClick: M
2006
+ onClick: V
1867
2007
  }, {
1868
- default: H(() => [
1869
- I("div", Pl, [
1870
- e.multiple ? (n(!0), d(X, { key: 0 }, q(c.value, (x) => (n(), d("span", {
1871
- key: String(x.value),
2008
+ default: Y(() => [
2009
+ x("div", Hl, [
2010
+ e.multiple ? (l(!0), u(K, { key: 0 }, X(f.value, (M) => (l(), u("span", {
2011
+ key: String(M.value),
1872
2012
  class: "wx-select__tag"
1873
2013
  }, [
1874
- ee(N(x.label) + " ", 1),
1875
- s(l).disabled.value ? W("", !0) : (n(), d("button", {
2014
+ ae(D(M.label) + " ", 1),
2015
+ b(t).disabled.value ? C("", !0) : (l(), u("button", {
1876
2016
  key: 0,
1877
2017
  class: "wx-select__tag-remove",
1878
2018
  type: "button",
1879
2019
  tabindex: "-1",
1880
- "aria-label": `Remove ${x.label}`,
1881
- onClick: le((k) => $(x.value), ["stop"])
1882
- }, " ✕ ", 8, Nl))
1883
- ]))), 128)) : W("", !0),
1884
- e.filterable ? (n(), Q(s(Ge), K({
2020
+ "aria-label": `Remove ${M.label}`,
2021
+ onClick: de((w) => S(M.value), ["stop"])
2022
+ }, " ✕ ", 8, Dl))
2023
+ ]))), 128)) : C("", !0),
2024
+ e.filterable ? (l(), ie(b(Wa), te({
1885
2025
  key: 1,
1886
- id: s(l).id.value
1887
- }, V.$attrs, {
1888
- modelValue: v.value,
1889
- "onUpdate:modelValue": L[0] || (L[0] = (x) => v.value = x),
2026
+ id: b(t).id.value
2027
+ }, z.$attrs, {
2028
+ modelValue: c.value,
2029
+ "onUpdate:modelValue": H[0] || (H[0] = (M) => c.value = M),
1890
2030
  class: "wx-select__input",
1891
2031
  placeholder: e.placeholder,
1892
2032
  "aria-label": e.ariaLabel,
1893
- "aria-describedby": s(l).describedBy.value,
1894
- "aria-invalid": s(l).status.value === "error" || void 0,
1895
- "display-value": e.multiple ? void 0 : g,
2033
+ "aria-describedby": b(t).describedBy.value,
2034
+ "aria-invalid": b(t).status.value === "error" || void 0,
2035
+ "display-value": e.multiple ? void 0 : B,
1896
2036
  "auto-focus": "",
1897
- onInput: C
1898
- }), null, 16, ["id", "modelValue", "placeholder", "aria-label", "aria-describedby", "aria-invalid", "display-value"])) : (n(), d(X, { key: 2 }, [
1899
- !e.multiple && h.value ? (n(), d("span", Ul, N(r.value), 1)) : h.value ? W("", !0) : (n(), d("span", El, N(e.placeholder), 1))
2037
+ onInput: $
2038
+ }), null, 16, ["id", "modelValue", "placeholder", "aria-label", "aria-describedby", "aria-invalid", "display-value"])) : (l(), u(K, { key: 2 }, [
2039
+ !e.multiple && g.value ? (l(), u("span", Nl, D(m.value), 1)) : g.value ? C("", !0) : (l(), u("span", Ul, D(e.placeholder), 1))
1900
2040
  ], 64))
1901
2041
  ]),
1902
- p.value ? (n(), d("button", {
2042
+ y.value ? (l(), u("button", {
1903
2043
  key: 0,
1904
2044
  class: "wx-select__clear",
1905
2045
  type: "button",
1906
2046
  tabindex: "-1",
1907
2047
  "aria-label": "Clear",
1908
- onClick: le(f, ["stop"])
1909
- }, " ✕ ")) : W("", !0),
1910
- F(s(qe), {
1911
- id: e.filterable ? void 0 : s(l).id.value,
2048
+ onClick: de(r, ["stop"])
2049
+ }, " ✕ ")) : C("", !0),
2050
+ O(b(Aa), {
2051
+ id: e.filterable ? void 0 : b(t).id.value,
1912
2052
  class: "wx-select__toggle",
1913
2053
  "aria-label": e.ariaLabel,
1914
- "aria-describedby": s(l).describedBy.value
2054
+ "aria-describedby": b(t).describedBy.value
1915
2055
  }, {
1916
- default: H(() => [...L[3] || (L[3] = [
1917
- I("svg", {
2056
+ default: Y(() => [...H[3] || (H[3] = [
2057
+ x("svg", {
1918
2058
  viewBox: "0 0 16 16",
1919
2059
  fill: "none",
1920
2060
  "aria-hidden": "true"
1921
2061
  }, [
1922
- I("path", {
2062
+ x("path", {
1923
2063
  d: "m4 6 4 4 4-4",
1924
2064
  stroke: "currentColor",
1925
2065
  "stroke-width": "1.6",
@@ -1933,41 +2073,41 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
1933
2073
  ]),
1934
2074
  _: 1
1935
2075
  }),
1936
- F(s(Ke), {
2076
+ O(b(La), {
1937
2077
  disabled: !e.teleport
1938
2078
  }, {
1939
- default: H(() => [
1940
- F(s(Ye), {
2079
+ default: Y(() => [
2080
+ O(b(Ra), {
1941
2081
  class: "wx-select__content",
1942
2082
  position: "popper",
1943
2083
  "side-offset": 4
1944
2084
  }, {
1945
- default: H(() => [
1946
- F(s(Xe), { class: "wx-select__viewport" }, {
1947
- default: H(() => [
1948
- F(s(Qe), { class: "wx-select__empty" }, {
1949
- default: H(() => [
1950
- ee(N(e.emptyText), 1)
2085
+ default: Y(() => [
2086
+ O(b(Fa), { class: "wx-select__viewport" }, {
2087
+ default: Y(() => [
2088
+ O(b(Ha), { class: "wx-select__empty" }, {
2089
+ default: Y(() => [
2090
+ ae(D(e.emptyText), 1)
1951
2091
  ]),
1952
2092
  _: 1
1953
2093
  }),
1954
- P(V.$slots, "default", {}, () => [
1955
- (n(!0), d(X, null, q(e.options, (x) => (n(), Q(s(Je), {
1956
- key: String(x.value),
2094
+ N(z.$slots, "default", {}, () => [
2095
+ (l(!0), u(K, null, X(e.options, (M) => (l(), ie(b(Da), {
2096
+ key: String(M.value),
1957
2097
  class: "wx-select__option",
1958
- value: x.value,
1959
- disabled: x.disabled
2098
+ value: M.value,
2099
+ disabled: M.disabled
1960
2100
  }, {
1961
- default: H(() => [
1962
- I("span", Ol, N(x.label), 1),
1963
- F(s(Ze), { class: "wx-select__check" }, {
1964
- default: H(() => [...L[4] || (L[4] = [
1965
- I("svg", {
2101
+ default: Y(() => [
2102
+ x("span", El, D(M.label), 1),
2103
+ O(b(Na), { class: "wx-select__check" }, {
2104
+ default: Y(() => [...H[4] || (H[4] = [
2105
+ x("svg", {
1966
2106
  viewBox: "0 0 16 16",
1967
2107
  fill: "none",
1968
2108
  "aria-hidden": "true"
1969
2109
  }, [
1970
- I("path", {
2110
+ x("path", {
1971
2111
  d: "m3.5 8.5 3 3 6-6",
1972
2112
  stroke: "currentColor",
1973
2113
  "stroke-width": "2",
@@ -1995,18 +2135,18 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
1995
2135
  _: 3
1996
2136
  }, 8, ["modelValue", "open", "multiple", "disabled", "name", "ignore-filter", "class"]));
1997
2137
  }
1998
- }), Gl = /* @__PURE__ */ j(jl, [["__scopeId", "data-v-c4893d5b"]]), ql = { class: "wx-slider__row" }, Kl = {
2138
+ }), jl = /* @__PURE__ */ Q(Ol, [["__scopeId", "data-v-c4893d5b"]]), Kl = { class: "wx-slider__row" }, Gl = {
1999
2139
  key: 0,
2000
2140
  class: "wx-slider__value"
2001
- }, Yl = {
2141
+ }, ql = {
2002
2142
  key: 0,
2003
2143
  class: "wx-slider__marks",
2004
2144
  "aria-hidden": "true"
2005
- }, Xl = /* @__PURE__ */ E({
2145
+ }, Yl = /* @__PURE__ */ J({
2006
2146
  name: "WxSlider",
2007
2147
  inheritAttrs: !1,
2008
2148
  __name: "Slider",
2009
- props: /* @__PURE__ */ S({
2149
+ props: /* @__PURE__ */ R({
2010
2150
  min: { default: 0 },
2011
2151
  max: { default: 100 },
2012
2152
  step: { default: 1 },
@@ -2023,83 +2163,83 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
2023
2163
  modelValue: { default: null },
2024
2164
  modelModifiers: {}
2025
2165
  }),
2026
- emits: /* @__PURE__ */ S(["change"], ["update:modelValue"]),
2027
- setup(e, { emit: y }) {
2028
- const a = e, t = y, i = G(e, "modelValue"), l = Y(a), o = u(() => {
2166
+ emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
2167
+ setup(e, { emit: _ }) {
2168
+ const a = e, n = _, s = G(e, "modelValue"), t = le(a), o = d(() => {
2029
2169
  if (a.range) {
2030
- const r = Array.isArray(i.value) ? i.value : [];
2031
- return [r[0] ?? a.min, r[1] ?? a.max];
2170
+ const m = Array.isArray(s.value) ? s.value : [];
2171
+ return [m[0] ?? a.min, m[1] ?? a.max];
2032
2172
  }
2033
- return [(Array.isArray(i.value) ? i.value[0] : i.value) ?? a.min];
2173
+ return [(Array.isArray(s.value) ? s.value[0] : s.value) ?? a.min];
2034
2174
  });
2035
- function v(c) {
2036
- if (!c) return;
2037
- const r = a.range ? [...c] : c[0];
2038
- i.value = r, t("change", r);
2039
- }
2040
- const m = u(
2041
- () => Object.entries(a.marks ?? {}).map(([c, r]) => ({
2042
- value: Number(c),
2043
- label: r,
2044
- offset: (Number(c) - a.min) / (a.max - a.min) * 100
2175
+ function c(f) {
2176
+ if (!f) return;
2177
+ const m = a.range ? [...f] : f[0];
2178
+ s.value = m, n("change", m);
2179
+ }
2180
+ const p = d(
2181
+ () => Object.entries(a.marks ?? {}).map(([f, m]) => ({
2182
+ value: Number(f),
2183
+ label: m,
2184
+ offset: (Number(f) - a.min) / (a.max - a.min) * 100
2045
2185
  }))
2046
- ), b = u(() => [
2186
+ ), h = d(() => [
2047
2187
  "wx-slider",
2048
- `wx-slider--${l.size.value}`,
2049
- { "is-disabled": l.disabled.value, "is-range": a.range }
2188
+ `wx-slider--${t.size.value}`,
2189
+ { "is-disabled": t.disabled.value, "is-range": a.range }
2050
2190
  ]);
2051
- return (c, r) => (n(), d("div", {
2052
- class: U(b.value)
2191
+ return (f, m) => (l(), u("div", {
2192
+ class: F(h.value)
2053
2193
  }, [
2054
- I("div", ql, [
2055
- F(s(ea), K({
2056
- id: s(l).id.value
2057
- }, c.$attrs, {
2194
+ x("div", Kl, [
2195
+ O(b(Ua), te({
2196
+ id: b(t).id.value
2197
+ }, f.$attrs, {
2058
2198
  class: "wx-slider__root",
2059
2199
  "model-value": o.value,
2060
2200
  min: e.min,
2061
2201
  max: e.max,
2062
2202
  step: e.step,
2063
- disabled: s(l).disabled.value,
2203
+ disabled: b(t).disabled.value,
2064
2204
  "min-steps-between-thumbs": e.minStepsBetweenThumbs,
2065
2205
  name: e.name,
2066
- "onUpdate:modelValue": v
2206
+ "onUpdate:modelValue": c
2067
2207
  }), {
2068
- default: H(() => [
2069
- F(s(aa), { class: "wx-slider__track" }, {
2070
- default: H(() => [
2071
- F(s(la), { class: "wx-slider__range" })
2208
+ default: Y(() => [
2209
+ O(b(Ea), { class: "wx-slider__track" }, {
2210
+ default: Y(() => [
2211
+ O(b(Oa), { class: "wx-slider__range" })
2072
2212
  ]),
2073
2213
  _: 1
2074
2214
  }),
2075
- (n(!0), d(X, null, q(o.value.length, (h) => (n(), Q(s(ta), {
2076
- key: h,
2215
+ (l(!0), u(K, null, X(o.value.length, (g) => (l(), ie(b(ja), {
2216
+ key: g,
2077
2217
  class: "wx-slider__thumb",
2078
2218
  "aria-label": e.ariaLabel,
2079
- "aria-describedby": s(l).describedBy.value
2219
+ "aria-describedby": b(t).describedBy.value
2080
2220
  }, null, 8, ["aria-label", "aria-describedby"]))), 128))
2081
2221
  ]),
2082
2222
  _: 1
2083
2223
  }, 16, ["id", "model-value", "min", "max", "step", "disabled", "min-steps-between-thumbs", "name"]),
2084
- e.showValue ? (n(), d("span", Kl, N(e.range ? `${o.value[0]} — ${o.value[1]}` : o.value[0]), 1)) : W("", !0)
2224
+ e.showValue ? (l(), u("span", Gl, D(e.range ? `${o.value[0]} — ${o.value[1]}` : o.value[0]), 1)) : C("", !0)
2085
2225
  ]),
2086
- m.value.length ? (n(), d("div", Yl, [
2087
- (n(!0), d(X, null, q(m.value, (h) => (n(), d("span", {
2088
- key: h.value,
2226
+ p.value.length ? (l(), u("div", ql, [
2227
+ (l(!0), u(K, null, X(p.value, (g) => (l(), u("span", {
2228
+ key: g.value,
2089
2229
  class: "wx-slider__mark",
2090
- style: ae({ left: `${h.offset}%` })
2091
- }, N(h.label), 5))), 128))
2092
- ])) : W("", !0)
2230
+ style: ee({ left: `${g.offset}%` })
2231
+ }, D(g.label), 5))), 128))
2232
+ ])) : C("", !0)
2093
2233
  ], 2));
2094
2234
  }
2095
- }), Ql = /* @__PURE__ */ j(Xl, [["__scopeId", "data-v-49653b8d"]]), Jl = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby"], Zl = {
2235
+ }), Xl = /* @__PURE__ */ Q(Yl, [["__scopeId", "data-v-49653b8d"]]), Jl = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby"], Zl = {
2096
2236
  key: 0,
2097
2237
  class: "wx-switch__label"
2098
- }, et = /* @__PURE__ */ E({
2238
+ }, Ql = /* @__PURE__ */ J({
2099
2239
  name: "WxSwitch",
2100
2240
  inheritAttrs: !1,
2101
2241
  __name: "Switch",
2102
- props: /* @__PURE__ */ S({
2242
+ props: /* @__PURE__ */ R({
2103
2243
  activeValue: { type: [String, Number, Boolean, null], default: !0 },
2104
2244
  inactiveValue: { type: [String, Number, Boolean, null], default: !1 },
2105
2245
  label: { default: void 0 },
@@ -2112,55 +2252,567 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
2112
2252
  modelValue: { type: [String, Number, Boolean, null], default: !1 },
2113
2253
  modelModifiers: {}
2114
2254
  }),
2115
- emits: /* @__PURE__ */ S(["change"], ["update:modelValue"]),
2116
- setup(e, { emit: y }) {
2117
- const a = e, t = y, i = G(e, "modelValue"), l = Y(a), o = u(() => i.value === a.activeValue), v = u(() => a.size ?? l.size.value), m = u(() => [
2255
+ emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
2256
+ setup(e, { emit: _ }) {
2257
+ const a = e, n = _, s = G(e, "modelValue"), t = le(a), o = d(() => s.value === a.activeValue), c = d(() => a.size ?? t.size.value), p = d(() => [
2118
2258
  "wx-switch",
2119
- `wx-switch--${v.value}`,
2120
- { "is-checked": o.value, "is-disabled": l.disabled.value }
2259
+ `wx-switch--${c.value}`,
2260
+ { "is-checked": o.value, "is-disabled": t.disabled.value }
2121
2261
  ]);
2122
- function b(c) {
2123
- const r = c.target.checked ? a.activeValue : a.inactiveValue;
2124
- i.value = r, t("change", r);
2262
+ function h(f) {
2263
+ const m = f.target.checked ? a.activeValue : a.inactiveValue;
2264
+ s.value = m, n("change", m);
2125
2265
  }
2126
- return (c, r) => (n(), d("label", {
2127
- class: U(m.value)
2266
+ return (f, m) => (l(), u("label", {
2267
+ class: F(p.value)
2128
2268
  }, [
2129
- I("input", K({
2130
- id: s(l).id.value
2131
- }, c.$attrs, {
2269
+ x("input", te({
2270
+ id: b(t).id.value
2271
+ }, f.$attrs, {
2132
2272
  class: "wx-switch__native",
2133
2273
  type: "checkbox",
2134
2274
  role: "switch",
2135
2275
  name: e.name,
2136
2276
  checked: o.value,
2137
- disabled: s(l).disabled.value,
2277
+ disabled: b(t).disabled.value,
2138
2278
  "aria-label": e.ariaLabel,
2139
- "aria-describedby": s(l).describedBy.value,
2140
- onChange: b
2279
+ "aria-describedby": b(t).describedBy.value,
2280
+ onChange: h
2141
2281
  }), null, 16, Jl),
2142
- r[0] || (r[0] = I("span", {
2282
+ m[0] || (m[0] = x("span", {
2143
2283
  class: "wx-switch__track",
2144
2284
  "aria-hidden": "true"
2145
2285
  }, [
2146
- I("span", { class: "wx-switch__thumb" })
2286
+ x("span", { class: "wx-switch__thumb" })
2147
2287
  ], -1)),
2148
- e.label || c.$slots.default ? (n(), d("span", Zl, [
2149
- P(c.$slots, "default", {}, () => [
2150
- ee(N(e.label), 1)
2288
+ e.label || f.$slots.default ? (l(), u("span", Zl, [
2289
+ N(f.$slots, "default", {}, () => [
2290
+ ae(D(e.label), 1)
2291
+ ], !0)
2292
+ ])) : C("", !0)
2293
+ ], 2));
2294
+ }
2295
+ }), eo = /* @__PURE__ */ Q(Ql, [["__scopeId", "data-v-b9a90e4d"]]), ao = {
2296
+ key: 0,
2297
+ class: "wx-table__header"
2298
+ }, to = { class: "wx-table__title" }, lo = { class: "wx-table__tools" }, oo = {
2299
+ key: 0,
2300
+ class: "wx-table__search"
2301
+ }, io = ["aria-label", "aria-busy"], no = { class: "wx-table__head" }, so = ["aria-sort"], uo = ["onClick"], ro = { class: "wx-table__body" }, co = ["onClick"], vo = ["aria-expanded", "aria-label", "onClick"], fo = {
2302
+ key: 0,
2303
+ class: "wx-table__row--expansion"
2304
+ }, bo = ["colspan"], mo = {
2305
+ key: 0,
2306
+ class: "wx-table__row wx-table__row--empty"
2307
+ }, po = ["colspan"], ho = {
2308
+ key: 0,
2309
+ class: "wx-table__foot"
2310
+ }, yo = ["colspan"], xo = {
2311
+ key: 0,
2312
+ class: "wx-table__footer-row"
2313
+ }, go = ["colspan"], ko = {
2314
+ key: 1,
2315
+ class: "wx-table__loading"
2316
+ }, he = 44, Ke = "wx-table:", wo = /* @__PURE__ */ J({
2317
+ name: "WxTable",
2318
+ __name: "Table",
2319
+ props: /* @__PURE__ */ R({
2320
+ data: { default: null },
2321
+ columns: {},
2322
+ rowKey: { type: [String, Function], default: "id" },
2323
+ title: { default: void 0 },
2324
+ searchable: { type: Boolean, default: !1 },
2325
+ searchPlaceholder: { default: "Search" },
2326
+ searchDebounce: { default: 300 },
2327
+ loading: { type: Boolean, default: !1 },
2328
+ emptyText: { default: "Nothing to show" },
2329
+ stripe: { type: Boolean, default: !1 },
2330
+ bordered: { type: Boolean, default: !1 },
2331
+ hover: { type: Boolean, default: !0 },
2332
+ size: { default: "md" },
2333
+ selectable: { type: Boolean, default: !1 },
2334
+ selectableIf: { type: Function, default: void 0 },
2335
+ expandable: { type: Boolean, default: !1 },
2336
+ expandableIf: { type: Function, default: void 0 },
2337
+ summary: { default: () => [] },
2338
+ pagination: { type: Boolean, default: void 0 },
2339
+ perPageOptions: { default: () => [] },
2340
+ persist: { default: void 0 },
2341
+ maxHeight: { default: void 0 },
2342
+ rowClass: { type: Function, default: void 0 },
2343
+ layout: { default: "auto" },
2344
+ ariaLabel: { default: void 0 }
2345
+ }, {
2346
+ selected: { default: () => [] },
2347
+ selectedModifiers: {},
2348
+ expanded: { default: () => [] },
2349
+ expandedModifiers: {},
2350
+ sort: { default: null },
2351
+ sortModifiers: {},
2352
+ search: { default: "" },
2353
+ searchModifiers: {},
2354
+ page: { default: 1 },
2355
+ pageModifiers: {},
2356
+ perPage: { default: 15 },
2357
+ perPageModifiers: {}
2358
+ }),
2359
+ emits: /* @__PURE__ */ R(["row-click", "sort-change", "selection-change", "expand-change", "search", "state-change"], ["update:selected", "update:expanded", "update:sort", "update:search", "update:page", "update:perPage"]),
2360
+ setup(e, { emit: _ }) {
2361
+ const a = e, n = _, s = G(e, "selected"), t = G(e, "expanded"), o = G(e, "sort"), c = G(e, "search"), p = G(e, "page"), h = G(e, "perPage"), f = d(() => {
2362
+ const i = a.data;
2363
+ return i ? Array.isArray(i) ? i : i.data ?? [] : [];
2364
+ }), m = d(() => a.data && !Array.isArray(a.data) ? a.data : null), g = d(() => a.pagination ?? !!m.value), y = d(() => a.columns.filter((i) => !i.hidden)), P = d(() => (a.expandable ? 1 : 0) + (a.selectable ? 1 : 0)), V = d(() => y.value.length + P.value), B = qe(), $ = d(
2365
+ () => !!(a.title || a.searchable || B.title || B.actions)
2366
+ ), r = d(() => [
2367
+ "wx-table",
2368
+ `wx-table--${a.size}`,
2369
+ {
2370
+ "wx-table--stripe": a.stripe,
2371
+ "wx-table--bordered": a.bordered,
2372
+ "wx-table--hover": a.hover,
2373
+ "wx-table--sticky": a.maxHeight !== void 0,
2374
+ "is-loading": a.loading
2375
+ }
2376
+ ]), S = d(
2377
+ () => a.maxHeight === void 0 ? void 0 : { maxHeight: z(a.maxHeight) }
2378
+ );
2379
+ function z(i) {
2380
+ return typeof i == "number" ? `${i}px` : i;
2381
+ }
2382
+ function H(i) {
2383
+ if (typeof i.width == "number") return i.width;
2384
+ if (typeof i.width == "string") {
2385
+ const k = Number.parseFloat(i.width);
2386
+ return Number.isFinite(k) ? k : 0;
2387
+ }
2388
+ return 0;
2389
+ }
2390
+ function M(i) {
2391
+ return {
2392
+ width: i.width === void 0 ? void 0 : z(i.width),
2393
+ minWidth: i.minWidth === void 0 ? void 0 : z(i.minWidth)
2394
+ };
2395
+ }
2396
+ const w = d(() => {
2397
+ const i = /* @__PURE__ */ new Map();
2398
+ let k = P.value * he;
2399
+ const v = y.value.filter((se) => se.fixed === "left");
2400
+ v.forEach((se, be) => {
2401
+ i.set(se.key, { side: "left", offset: k, edge: be === v.length - 1 }), k += H(se);
2402
+ });
2403
+ let L = 0;
2404
+ const j = y.value.filter((se) => se.fixed === "right");
2405
+ for (let se = j.length - 1; se >= 0; se--) {
2406
+ const be = j[se];
2407
+ i.set(be.key, { side: "right", offset: L, edge: se === 0 }), L += H(be);
2408
+ }
2409
+ return i;
2410
+ }), E = d(() => y.value.some((i) => i.fixed === "left")), Z = d(() => w.value.size > 0);
2411
+ function W(i) {
2412
+ const k = w.value.get(i.key);
2413
+ if (k)
2414
+ return { [`--wx-pin-${k.side}`]: `${k.offset}px` };
2415
+ }
2416
+ function U(i) {
2417
+ const k = w.value.get(i.key);
2418
+ if (k)
2419
+ return [`is-fixed-${k.side}`, { "is-fixed-edge": k.edge }];
2420
+ }
2421
+ function T(i) {
2422
+ return Z.value ? { "--wx-pin-left": `${i === "select" && a.expandable ? he : 0}px` } : void 0;
2423
+ }
2424
+ const A = d(
2425
+ () => Z.value ? ["is-fixed-left", { "is-fixed-edge": !E.value }] : void 0
2426
+ );
2427
+ function I(i, k) {
2428
+ return k.includes(".") ? k.split(".").reduce((v, L) => {
2429
+ if (!(v === null || typeof v != "object"))
2430
+ return v[L];
2431
+ }, i) : i[k];
2432
+ }
2433
+ function oe(i, k, v) {
2434
+ const L = I(k, i.key);
2435
+ return i.formatter ? i.formatter(L, k, v) : L == null ? "" : String(L);
2436
+ }
2437
+ function ue(i, k) {
2438
+ if (typeof a.rowKey == "function") return a.rowKey(i, k);
2439
+ const v = I(i, a.rowKey);
2440
+ return typeof v == "string" || typeof v == "number" ? v : k;
2441
+ }
2442
+ function Ve(i) {
2443
+ return a.selectableIf ? a.selectableIf(i) : !0;
2444
+ }
2445
+ function ze(i) {
2446
+ return a.expandableIf ? a.expandableIf(i) : !0;
2447
+ }
2448
+ const ta = d(() => f.value.filter(Ve)), re = d(
2449
+ () => ta.value.map((i) => ue(i, f.value.indexOf(i)))
2450
+ ), Pe = d(
2451
+ () => re.value.filter((i) => s.value.includes(i)).length
2452
+ ), We = d(
2453
+ () => re.value.length > 0 && Pe.value === re.value.length
2454
+ ), la = d(() => Pe.value > 0 && !We.value);
2455
+ function Ae(i) {
2456
+ return f.value.filter((k, v) => i.includes(ue(k, v)));
2457
+ }
2458
+ function ve(i) {
2459
+ s.value = i, n("selection-change", i, Ae(i));
2460
+ }
2461
+ function oa(i) {
2462
+ const k = re.value;
2463
+ ve(i ? [...s.value, ...k.filter((v) => !s.value.includes(v))] : s.value.filter((v) => !k.includes(v)));
2464
+ }
2465
+ function ia(i, k, v) {
2466
+ const L = ue(i, k);
2467
+ v ? s.value.includes(L) || ve([...s.value, L]) : ve(s.value.filter((j) => j !== L));
2468
+ }
2469
+ function Le(i, k) {
2470
+ return s.value.includes(ue(i, k));
2471
+ }
2472
+ function fe(i, k) {
2473
+ return t.value.includes(ue(i, k));
2474
+ }
2475
+ function na(i, k) {
2476
+ if (!ze(i)) return;
2477
+ const v = ue(i, k), L = t.value.includes(v) ? t.value.filter((j) => j !== v) : [...t.value, v];
2478
+ t.value = L, n("expand-change", L, Ae(L));
2479
+ }
2480
+ function sa(i) {
2481
+ if (!i.sortable) return;
2482
+ const k = o.value;
2483
+ let v;
2484
+ k?.key !== i.key ? v = { key: i.key, order: "asc" } : k.order === "asc" ? v = { key: i.key, order: "desc" } : v = null, o.value = v, p.value = 1, n("sort-change", v);
2485
+ }
2486
+ function ua(i) {
2487
+ if (i.sortable)
2488
+ return o.value?.key !== i.key ? "none" : o.value.order === "asc" ? "ascending" : "descending";
2489
+ }
2490
+ function Re(i) {
2491
+ return o.value?.key === i.key ? o.value.order : null;
2492
+ }
2493
+ function $e(i) {
2494
+ return i.align && i.align !== "left" ? `wx-table__cell--${i.align}` : void 0;
2495
+ }
2496
+ let _e;
2497
+ const Be = q(c.value);
2498
+ function da(i) {
2499
+ c.value = i === void 0 ? "" : String(i);
2500
+ }
2501
+ function ra(i) {
2502
+ clearTimeout(_e);
2503
+ const k = () => {
2504
+ Be.value = i, p.value = 1, n("search", i);
2505
+ };
2506
+ a.searchDebounce ? _e = setTimeout(k, a.searchDebounce) : k();
2507
+ }
2508
+ ya(() => clearTimeout(_e));
2509
+ const Fe = d(() => ({
2510
+ page: p.value,
2511
+ perPage: h.value,
2512
+ sort: o.value,
2513
+ search: Be.value
2514
+ }));
2515
+ function ca() {
2516
+ if (!a.persist) return;
2517
+ let i = null;
2518
+ try {
2519
+ const k = window.localStorage.getItem(Ke + a.persist);
2520
+ i = k ? JSON.parse(k) : null;
2521
+ } catch {
2522
+ return;
2523
+ }
2524
+ i && (typeof i.page == "number" && i.page > 0 && (p.value = i.page), typeof i.perPage == "number" && i.perPage > 0 && (h.value = i.perPage), typeof i.search == "string" && (c.value = i.search), i.sort === null ? o.value = null : i.sort && typeof i.sort.key == "string" && (o.value = { key: i.sort.key, order: i.sort.order === "desc" ? "desc" : "asc" }));
2525
+ }
2526
+ function va(i) {
2527
+ if (a.persist)
2528
+ try {
2529
+ window.localStorage.setItem(Ke + a.persist, JSON.stringify(i));
2530
+ } catch {
2531
+ }
2532
+ }
2533
+ Ce(() => {
2534
+ ca(), Be.value = c.value, n("state-change", Fe.value), ne(c, ra), ne(Fe, (i) => {
2535
+ va(i), n("state-change", i);
2536
+ });
2537
+ });
2538
+ function He(i) {
2539
+ const k = i.cells ?? {}, v = y.value.findIndex((L) => L.key in k);
2540
+ return v === -1 ? y.value.length : v;
2541
+ }
2542
+ function De(i) {
2543
+ return P.value + He(i);
2544
+ }
2545
+ function fa(i) {
2546
+ return y.value.slice(He(i));
2547
+ }
2548
+ function Ne(i, k) {
2549
+ return i.cells?.[k.key];
2550
+ }
2551
+ function ba(i, k) {
2552
+ const v = Ne(i, k);
2553
+ return v == null ? "" : String(v);
2554
+ }
2555
+ return (i, k) => (l(), u("div", {
2556
+ class: F(r.value)
2557
+ }, [
2558
+ $.value ? (l(), u("header", ao, [
2559
+ x("div", to, [
2560
+ N(i.$slots, "title", {}, () => [
2561
+ ae(D(e.title), 1)
2562
+ ], !0)
2563
+ ]),
2564
+ x("div", lo, [
2565
+ N(i.$slots, "actions", {}, void 0, !0),
2566
+ e.searchable ? (l(), u("div", oo, [
2567
+ O(Qe, {
2568
+ type: "search",
2569
+ "model-value": c.value,
2570
+ placeholder: e.searchPlaceholder,
2571
+ size: e.size,
2572
+ clearable: "",
2573
+ "aria-label": e.searchPlaceholder,
2574
+ "onUpdate:modelValue": da
2575
+ }, null, 8, ["model-value", "placeholder", "size", "aria-label"])
2576
+ ])) : C("", !0)
2577
+ ])
2578
+ ])) : C("", !0),
2579
+ x("div", {
2580
+ class: "wx-table__scroll",
2581
+ style: ee(S.value)
2582
+ }, [
2583
+ x("table", {
2584
+ class: F(["wx-table__table", { "wx-table__table--fixed": e.layout === "fixed" }]),
2585
+ "aria-label": e.ariaLabel,
2586
+ "aria-busy": e.loading || void 0
2587
+ }, [
2588
+ x("colgroup", null, [
2589
+ e.expandable ? (l(), u("col", {
2590
+ key: 0,
2591
+ style: ee({ width: `${he}px` })
2592
+ }, null, 4)) : C("", !0),
2593
+ e.selectable ? (l(), u("col", {
2594
+ key: 1,
2595
+ style: ee({ width: `${he}px` })
2596
+ }, null, 4)) : C("", !0),
2597
+ (l(!0), u(K, null, X(y.value, (v) => (l(), u("col", {
2598
+ key: v.key,
2599
+ style: ee(M(v))
2600
+ }, null, 4))), 128))
2601
+ ]),
2602
+ x("thead", no, [
2603
+ x("tr", null, [
2604
+ e.expandable ? (l(), u("th", {
2605
+ key: 0,
2606
+ scope: "col",
2607
+ class: F(["wx-table__cell wx-table__cell--utility", A.value]),
2608
+ style: ee(T("expand"))
2609
+ }, [...k[4] || (k[4] = [
2610
+ x("span", { class: "wx-table__sr-only" }, "Expand", -1)
2611
+ ])], 6)) : C("", !0),
2612
+ e.selectable ? (l(), u("th", {
2613
+ key: 1,
2614
+ scope: "col",
2615
+ class: F(["wx-table__cell wx-table__cell--utility", A.value]),
2616
+ style: ee(T("select"))
2617
+ }, [
2618
+ O(ye, {
2619
+ "model-value": We.value,
2620
+ indeterminate: la.value,
2621
+ disabled: !re.value.length,
2622
+ "aria-label": "Select every row on this page",
2623
+ "onUpdate:modelValue": oa
2624
+ }, null, 8, ["model-value", "indeterminate", "disabled"])
2625
+ ], 6)) : C("", !0),
2626
+ (l(!0), u(K, null, X(y.value, (v) => (l(), u("th", {
2627
+ key: v.key,
2628
+ scope: "col",
2629
+ class: F(["wx-table__cell", [$e(v), U(v), v.headerClass]]),
2630
+ style: ee(W(v)),
2631
+ "aria-sort": ua(v)
2632
+ }, [
2633
+ v.sortable ? (l(), u("button", {
2634
+ key: 0,
2635
+ class: "wx-table__sort",
2636
+ type: "button",
2637
+ onClick: (L) => sa(v)
2638
+ }, [
2639
+ N(i.$slots, `header-${v.key}`, { column: v }, () => [
2640
+ ae(D(v.label ?? v.key), 1)
2641
+ ], !0),
2642
+ (l(), u("svg", {
2643
+ class: F(["wx-table__sort-icon", Re(v) ? `is-${Re(v)}` : void 0]),
2644
+ viewBox: "0 0 8 12",
2645
+ "aria-hidden": "true"
2646
+ }, [...k[5] || (k[5] = [
2647
+ x("path", {
2648
+ class: "wx-table__sort-up",
2649
+ d: "M4 1 7 5 1 5Z"
2650
+ }, null, -1),
2651
+ x("path", {
2652
+ class: "wx-table__sort-down",
2653
+ d: "M4 11 1 7 7 7Z"
2654
+ }, null, -1)
2655
+ ])], 2))
2656
+ ], 8, uo)) : N(i.$slots, `header-${v.key}`, { column: v }, () => [
2657
+ ae(D(v.label ?? v.key), 1)
2658
+ ], !0, 1)
2659
+ ], 14, so))), 128))
2660
+ ])
2661
+ ]),
2662
+ x("tbody", ro, [
2663
+ (l(!0), u(K, null, X(f.value, (v, L) => (l(), u(K, {
2664
+ key: ue(v, L)
2665
+ }, [
2666
+ x("tr", {
2667
+ class: F(["wx-table__row", [
2668
+ e.rowClass?.(v, L),
2669
+ {
2670
+ "is-striped": L % 2 === 1,
2671
+ "is-selected": e.selectable && Le(v, L),
2672
+ "is-expanded": e.expandable && fe(v, L)
2673
+ }
2674
+ ]]),
2675
+ onClick: (j) => n("row-click", v, L, j)
2676
+ }, [
2677
+ e.expandable ? (l(), u("td", {
2678
+ key: 0,
2679
+ class: F(["wx-table__cell wx-table__cell--utility", A.value]),
2680
+ style: ee(T("expand")),
2681
+ onClick: k[0] || (k[0] = de(() => {
2682
+ }, ["stop"]))
2683
+ }, [
2684
+ ze(v) ? (l(), u("button", {
2685
+ key: 0,
2686
+ class: "wx-table__expander",
2687
+ type: "button",
2688
+ "aria-expanded": fe(v, L),
2689
+ "aria-label": fe(v, L) ? "Collapse row" : "Expand row",
2690
+ onClick: (j) => na(v, L)
2691
+ }, [...k[6] || (k[6] = [
2692
+ x("svg", {
2693
+ viewBox: "0 0 12 12",
2694
+ "aria-hidden": "true"
2695
+ }, [
2696
+ x("path", { d: "M4.5 2 8.5 6l-4 4" })
2697
+ ], -1)
2698
+ ])], 8, vo)) : C("", !0)
2699
+ ], 6)) : C("", !0),
2700
+ e.selectable ? (l(), u("td", {
2701
+ key: 1,
2702
+ class: F(["wx-table__cell wx-table__cell--utility", A.value]),
2703
+ style: ee(T("select")),
2704
+ onClick: k[1] || (k[1] = de(() => {
2705
+ }, ["stop"]))
2706
+ }, [
2707
+ O(ye, {
2708
+ "model-value": Le(v, L),
2709
+ disabled: !Ve(v),
2710
+ "aria-label": "Select row",
2711
+ "onUpdate:modelValue": (j) => ia(v, L, j)
2712
+ }, null, 8, ["model-value", "disabled", "onUpdate:modelValue"])
2713
+ ], 6)) : C("", !0),
2714
+ (l(!0), u(K, null, X(y.value, (j) => (l(), u("td", {
2715
+ key: j.key,
2716
+ class: F(["wx-table__cell", [$e(j), U(j), j.cellClass]]),
2717
+ style: ee(W(j))
2718
+ }, [
2719
+ N(i.$slots, `cell-${j.key}`, {
2720
+ row: v,
2721
+ value: I(v, j.key),
2722
+ index: L,
2723
+ column: j
2724
+ }, () => [
2725
+ ae(D(oe(j, v, L)), 1)
2726
+ ], !0)
2727
+ ], 6))), 128))
2728
+ ], 10, co),
2729
+ e.expandable && fe(v, L) ? (l(), u("tr", fo, [
2730
+ x("td", {
2731
+ class: "wx-table__cell wx-table__expansion",
2732
+ colspan: V.value
2733
+ }, [
2734
+ N(i.$slots, "expanded", {
2735
+ row: v,
2736
+ index: L
2737
+ }, void 0, !0)
2738
+ ], 8, bo)
2739
+ ])) : C("", !0)
2740
+ ], 64))), 128)),
2741
+ !f.value.length && !e.loading ? (l(), u("tr", mo, [
2742
+ x("td", {
2743
+ class: "wx-table__cell wx-table__empty",
2744
+ colspan: V.value
2745
+ }, [
2746
+ N(i.$slots, "empty", {}, () => [
2747
+ ae(D(e.emptyText), 1)
2748
+ ], !0)
2749
+ ], 8, po)
2750
+ ])) : C("", !0)
2751
+ ]),
2752
+ e.summary.length || i.$slots.footer || g.value ? (l(), u("tfoot", ho, [
2753
+ (l(!0), u(K, null, X(e.summary, (v, L) => (l(), u("tr", {
2754
+ key: L,
2755
+ class: F(["wx-table__summary", [v.class, { "is-strong": v.strong }]])
2756
+ }, [
2757
+ De(v) > 0 ? (l(), u("td", {
2758
+ key: 0,
2759
+ class: "wx-table__cell wx-table__summary-label",
2760
+ colspan: De(v)
2761
+ }, D(v.label), 9, yo)) : C("", !0),
2762
+ (l(!0), u(K, null, X(fa(v), (j) => (l(), u("td", {
2763
+ key: j.key,
2764
+ class: F(["wx-table__cell", $e(j)])
2765
+ }, [
2766
+ N(i.$slots, `summary-${j.key}`, {
2767
+ row: v,
2768
+ value: Ne(v, j)
2769
+ }, () => [
2770
+ ae(D(ba(v, j)), 1)
2771
+ ], !0)
2772
+ ], 2))), 128))
2773
+ ], 2))), 128)),
2774
+ i.$slots.footer || g.value ? (l(), u("tr", xo, [
2775
+ x("td", {
2776
+ class: "wx-table__cell",
2777
+ colspan: V.value
2778
+ }, [
2779
+ N(i.$slots, "footer", {}, () => [
2780
+ O(ea, {
2781
+ page: p.value,
2782
+ "onUpdate:page": k[2] || (k[2] = (v) => p.value = v),
2783
+ "per-page": h.value,
2784
+ "onUpdate:perPage": k[3] || (k[3] = (v) => h.value = v),
2785
+ paginator: m.value,
2786
+ "per-page-options": e.perPageOptions,
2787
+ size: e.size,
2788
+ disabled: e.loading
2789
+ }, null, 8, ["page", "per-page", "paginator", "per-page-options", "size", "disabled"])
2790
+ ], !0)
2791
+ ], 8, go)
2792
+ ])) : C("", !0)
2793
+ ])) : C("", !0)
2794
+ ], 10, io)
2795
+ ], 4),
2796
+ e.loading ? (l(), u("div", ko, [
2797
+ N(i.$slots, "loading", {}, () => [
2798
+ k[7] || (k[7] = x("span", {
2799
+ class: "wx-table__spinner",
2800
+ "aria-hidden": "true"
2801
+ }, null, -1)),
2802
+ k[8] || (k[8] = x("span", { class: "wx-table__loading-text" }, "Loading", -1))
2151
2803
  ], !0)
2152
- ])) : W("", !0)
2804
+ ])) : C("", !0)
2153
2805
  ], 2));
2154
2806
  }
2155
- }), at = /* @__PURE__ */ j(et, [["__scopeId", "data-v-b9a90e4d"]]), lt = ["aria-label", "onClick"], tt = ["id", "value", "placeholder", "disabled", "aria-label", "aria-describedby", "aria-invalid", "aria-expanded"], ot = {
2807
+ }), $o = /* @__PURE__ */ Q(wo, [["__scopeId", "data-v-8fdfcfc9"]]), _o = ["aria-label", "onClick"], Bo = ["id", "value", "placeholder", "disabled", "aria-label", "aria-describedby", "aria-invalid", "aria-expanded"], Mo = {
2156
2808
  key: 0,
2157
2809
  class: "wx-tags-input__list",
2158
2810
  role: "listbox"
2159
- }, it = ["aria-selected", "onMousedown", "onMousemove"], nt = ["name"], ut = ["value"], st = /* @__PURE__ */ E({
2811
+ }, Co = ["aria-selected", "onMousedown", "onMousemove"], So = ["name"], To = ["value"], Io = /* @__PURE__ */ J({
2160
2812
  name: "WxTagsInput",
2161
2813
  inheritAttrs: !1,
2162
2814
  __name: "TagsInput",
2163
- props: /* @__PURE__ */ S({
2815
+ props: /* @__PURE__ */ R({
2164
2816
  suggestions: { default: () => [] },
2165
2817
  placeholder: { default: void 0 },
2166
2818
  emptyText: { default: "Nothing found" },
@@ -2177,120 +2829,120 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
2177
2829
  modelValue: { default: () => [] },
2178
2830
  modelModifiers: {}
2179
2831
  }),
2180
- emits: /* @__PURE__ */ S(["change", "search"], ["update:modelValue"]),
2181
- setup(e, { expose: y, emit: a }) {
2182
- const t = e, i = a, l = G(e, "modelValue"), o = Y(t), v = D(null), m = D(""), b = D(!1), c = D(-1), r = D(-1), h = u(() => l.value ?? []), p = u(
2183
- () => t.suggestions.filter((k) => !h.value.includes(k))
2184
- ), T = u(() => b.value && p.value.length > 0), M = u(() => t.max !== void 0 && h.value.length >= t.max), g = u(() => [
2832
+ emits: /* @__PURE__ */ R(["change", "search"], ["update:modelValue"]),
2833
+ setup(e, { expose: _, emit: a }) {
2834
+ const n = e, s = a, t = G(e, "modelValue"), o = le(n), c = q(null), p = q(""), h = q(!1), f = q(-1), m = q(-1), g = d(() => t.value ?? []), y = d(
2835
+ () => n.suggestions.filter((w) => !g.value.includes(w))
2836
+ ), P = d(() => h.value && y.value.length > 0), V = d(() => n.max !== void 0 && g.value.length >= n.max), B = d(() => [
2185
2837
  "wx-tags-input",
2186
2838
  `wx-tags-input--${o.size.value}`,
2187
2839
  {
2188
2840
  [`wx-tags-input--${o.status.value}`]: o.status.value !== "default",
2189
- "is-open": T.value,
2841
+ "is-open": P.value,
2190
2842
  "is-disabled": o.disabled.value
2191
2843
  }
2192
2844
  ]);
2193
- Z(p, () => {
2194
- c.value = -1;
2845
+ ne(y, () => {
2846
+ f.value = -1;
2195
2847
  });
2196
- function C(k) {
2197
- l.value = k, i("change", k);
2198
- }
2199
- function f(k) {
2200
- const R = k.trim();
2201
- if (!(!R || M.value)) {
2202
- if (!t.duplicates && h.value.includes(R)) {
2203
- m.value = "";
2848
+ function $(w) {
2849
+ t.value = w, s("change", w);
2850
+ }
2851
+ function r(w) {
2852
+ const E = w.trim();
2853
+ if (!(!E || V.value)) {
2854
+ if (!n.duplicates && g.value.includes(E)) {
2855
+ p.value = "";
2204
2856
  return;
2205
2857
  }
2206
- C([...h.value, R]), m.value = "", b.value = !1, r.value = -1;
2858
+ $([...g.value, E]), p.value = "", h.value = !1, m.value = -1;
2207
2859
  }
2208
2860
  }
2209
- function $(k) {
2210
- C(h.value.filter((R, O) => O !== k)), r.value = -1;
2861
+ function S(w) {
2862
+ $(g.value.filter((E, Z) => Z !== w)), m.value = -1;
2211
2863
  }
2212
- function V(k) {
2213
- const R = k.target.value;
2214
- m.value = R, r.value = -1, c.value = -1, R && (b.value = !0), i("search", R);
2864
+ function z(w) {
2865
+ const E = w.target.value;
2866
+ p.value = E, m.value = -1, f.value = -1, E && (h.value = !0), s("search", E);
2215
2867
  }
2216
- function L(k) {
2217
- if (k.key === "Escape") {
2218
- b.value = !1, r.value = -1;
2868
+ function H(w) {
2869
+ if (w.key === "Escape") {
2870
+ h.value = !1, m.value = -1;
2219
2871
  return;
2220
2872
  }
2221
- if (k.key === "Backspace" && m.value === "" && h.value.length > 0) {
2222
- k.preventDefault(), r.value === h.value.length - 1 ? $(r.value) : r.value = h.value.length - 1;
2873
+ if (w.key === "Backspace" && p.value === "" && g.value.length > 0) {
2874
+ w.preventDefault(), m.value === g.value.length - 1 ? S(m.value) : m.value = g.value.length - 1;
2223
2875
  return;
2224
2876
  }
2225
- if (k.key === "ArrowDown" && T.value) {
2226
- k.preventDefault(), c.value = (c.value + 1) % p.value.length;
2877
+ if (w.key === "ArrowDown" && P.value) {
2878
+ w.preventDefault(), f.value = (f.value + 1) % y.value.length;
2227
2879
  return;
2228
2880
  }
2229
- if (k.key === "ArrowUp" && T.value) {
2230
- k.preventDefault(), c.value = c.value <= 0 ? p.value.length - 1 : c.value - 1;
2881
+ if (w.key === "ArrowUp" && P.value) {
2882
+ w.preventDefault(), f.value = f.value <= 0 ? y.value.length - 1 : f.value - 1;
2231
2883
  return;
2232
2884
  }
2233
- k.key === "Enter" && (k.preventDefault(), T.value && c.value >= 0 ? f(p.value[c.value]) : t.allowCreate && f(m.value));
2885
+ w.key === "Enter" && (w.preventDefault(), P.value && f.value >= 0 ? r(y.value[f.value]) : n.allowCreate && r(p.value));
2234
2886
  }
2235
- function x() {
2236
- r.value = -1, window.setTimeout(() => {
2237
- b.value = !1;
2887
+ function M() {
2888
+ m.value = -1, window.setTimeout(() => {
2889
+ h.value = !1;
2238
2890
  }, 120);
2239
2891
  }
2240
- return y({ focus: () => v.value?.focus() }), (k, R) => (n(), d("div", {
2241
- class: U(g.value)
2892
+ return _({ focus: () => c.value?.focus() }), (w, E) => (l(), u("div", {
2893
+ class: F(B.value)
2242
2894
  }, [
2243
- I("div", {
2895
+ x("div", {
2244
2896
  class: "wx-tags-input__anchor",
2245
- onClick: R[1] || (R[1] = (O) => v.value?.focus())
2897
+ onClick: E[1] || (E[1] = (Z) => c.value?.focus())
2246
2898
  }, [
2247
- (n(!0), d(X, null, q(h.value, (O, B) => (n(), d("span", {
2248
- key: O,
2249
- class: U(["wx-tags-input__tag", { "is-armed": B === r.value }])
2899
+ (l(!0), u(K, null, X(g.value, (Z, W) => (l(), u("span", {
2900
+ key: Z,
2901
+ class: F(["wx-tags-input__tag", { "is-armed": W === m.value }])
2250
2902
  }, [
2251
- ee(N(O) + " ", 1),
2252
- s(o).disabled.value ? W("", !0) : (n(), d("button", {
2903
+ ae(D(Z) + " ", 1),
2904
+ b(o).disabled.value ? C("", !0) : (l(), u("button", {
2253
2905
  key: 0,
2254
2906
  class: "wx-tags-input__remove",
2255
2907
  type: "button",
2256
2908
  tabindex: "-1",
2257
- "aria-label": `Remove ${O}`,
2258
- onClick: le((A) => $(B), ["stop"])
2259
- }, " ✕ ", 8, lt))
2909
+ "aria-label": `Remove ${Z}`,
2910
+ onClick: de((U) => S(W), ["stop"])
2911
+ }, " ✕ ", 8, _o))
2260
2912
  ], 2))), 128)),
2261
- I("input", K({
2262
- id: s(o).id.value,
2913
+ x("input", te({
2914
+ id: b(o).id.value,
2263
2915
  ref_key: "inputRef",
2264
- ref: v
2265
- }, k.$attrs, {
2916
+ ref: c
2917
+ }, w.$attrs, {
2266
2918
  class: "wx-tags-input__field",
2267
2919
  type: "text",
2268
2920
  role: "combobox",
2269
2921
  autocomplete: "off",
2270
- value: m.value,
2922
+ value: p.value,
2271
2923
  placeholder: e.placeholder,
2272
- disabled: s(o).disabled.value,
2924
+ disabled: b(o).disabled.value,
2273
2925
  "aria-label": e.ariaLabel,
2274
- "aria-describedby": s(o).describedBy.value,
2275
- "aria-invalid": s(o).status.value === "error" || void 0,
2276
- "aria-expanded": T.value,
2277
- onInput: V,
2278
- onKeydown: L,
2279
- onFocus: R[0] || (R[0] = (O) => b.value = !0),
2280
- onBlur: x
2281
- }), null, 16, tt),
2282
- T.value ? (n(), d("ul", ot, [
2283
- (n(!0), d(X, null, q(p.value, (O, B) => (n(), d("li", {
2284
- key: O,
2285
- class: U(["wx-tags-input__option", { "is-highlighted": B === c.value }]),
2926
+ "aria-describedby": b(o).describedBy.value,
2927
+ "aria-invalid": b(o).status.value === "error" || void 0,
2928
+ "aria-expanded": P.value,
2929
+ onInput: z,
2930
+ onKeydown: H,
2931
+ onFocus: E[0] || (E[0] = (Z) => h.value = !0),
2932
+ onBlur: M
2933
+ }), null, 16, Bo),
2934
+ P.value ? (l(), u("ul", Mo, [
2935
+ (l(!0), u(K, null, X(y.value, (Z, W) => (l(), u("li", {
2936
+ key: Z,
2937
+ class: F(["wx-tags-input__option", { "is-highlighted": W === f.value }]),
2286
2938
  role: "option",
2287
- "aria-selected": B === c.value,
2288
- onMousedown: le((A) => f(O), ["prevent"]),
2289
- onMousemove: (A) => c.value = B
2290
- }, N(O), 43, it))), 128))
2291
- ])) : W("", !0)
2939
+ "aria-selected": W === f.value,
2940
+ onMousedown: de((U) => r(Z), ["prevent"]),
2941
+ onMousemove: (U) => f.value = W
2942
+ }, D(Z), 43, Co))), 128))
2943
+ ])) : C("", !0)
2292
2944
  ]),
2293
- e.name ? (n(), d("select", {
2945
+ e.name ? (l(), u("select", {
2294
2946
  key: 0,
2295
2947
  class: "wx-sr-only",
2296
2948
  name: e.name,
@@ -2298,22 +2950,22 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
2298
2950
  tabindex: "-1",
2299
2951
  "aria-hidden": "true"
2300
2952
  }, [
2301
- (n(!0), d(X, null, q(h.value, (O) => (n(), d("option", {
2302
- key: O,
2303
- value: O,
2953
+ (l(!0), u(K, null, X(g.value, (Z) => (l(), u("option", {
2954
+ key: Z,
2955
+ value: Z,
2304
2956
  selected: ""
2305
- }, N(O), 9, ut))), 128))
2306
- ], 8, nt)) : W("", !0)
2957
+ }, D(Z), 9, To))), 128))
2958
+ ], 8, So)) : C("", !0)
2307
2959
  ], 2));
2308
2960
  }
2309
- }), dt = /* @__PURE__ */ j(st, [["__scopeId", "data-v-fcf7fe37"]]), rt = ["id", "value", "rows", "placeholder", "disabled", "readonly", "maxlength", "aria-label", "aria-describedby", "aria-invalid"], ct = {
2961
+ }), Vo = /* @__PURE__ */ Q(Io, [["__scopeId", "data-v-fcf7fe37"]]), zo = ["id", "value", "rows", "placeholder", "disabled", "readonly", "maxlength", "aria-label", "aria-describedby", "aria-invalid"], Po = {
2310
2962
  key: 0,
2311
2963
  class: "wx-textarea__count"
2312
- }, vt = /* @__PURE__ */ E({
2964
+ }, Wo = /* @__PURE__ */ J({
2313
2965
  name: "WxTextarea",
2314
2966
  inheritAttrs: !1,
2315
2967
  __name: "Textarea",
2316
- props: /* @__PURE__ */ S({
2968
+ props: /* @__PURE__ */ R({
2317
2969
  size: { default: void 0 },
2318
2970
  status: { default: void 0 },
2319
2971
  id: { default: void 0 },
@@ -2330,81 +2982,81 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
2330
2982
  modelValue: { default: "" },
2331
2983
  modelModifiers: {}
2332
2984
  }),
2333
- emits: /* @__PURE__ */ S(["input", "change", "focus", "blur"], ["update:modelValue"]),
2334
- setup(e, { expose: y, emit: a }) {
2335
- const t = e, i = a, l = G(e, "modelValue"), o = Y(t), v = D(null), m = D(!1), b = u(() => l.value ?? ""), c = u(
2336
- () => t.showCount && t.maxlength ? `${b.value.length}/${t.maxlength}` : null
2337
- ), r = u(
2338
- () => t.autosize === !0 ? {} : t.autosize === !1 ? null : t.autosize
2339
- ), h = u(() => [
2985
+ emits: /* @__PURE__ */ R(["input", "change", "focus", "blur"], ["update:modelValue"]),
2986
+ setup(e, { expose: _, emit: a }) {
2987
+ const n = e, s = a, t = G(e, "modelValue"), o = le(n), c = q(null), p = q(!1), h = d(() => t.value ?? ""), f = d(
2988
+ () => n.showCount && n.maxlength ? `${h.value.length}/${n.maxlength}` : null
2989
+ ), m = d(
2990
+ () => n.autosize === !0 ? {} : n.autosize === !1 ? null : n.autosize
2991
+ ), g = d(() => [
2340
2992
  "wx-textarea",
2341
2993
  `wx-textarea--${o.size.value}`,
2342
2994
  {
2343
2995
  [`wx-textarea--${o.status.value}`]: o.status.value !== "default",
2344
- "is-focused": m.value,
2996
+ "is-focused": p.value,
2345
2997
  "is-disabled": o.disabled.value,
2346
- "is-readonly": t.readonly,
2347
- "is-autosize": !!r.value
2998
+ "is-readonly": n.readonly,
2999
+ "is-autosize": !!m.value
2348
3000
  }
2349
3001
  ]);
2350
- function p() {
2351
- const f = r.value, $ = v.value;
2352
- if (!f || !$) return;
2353
- $.style.height = "auto";
2354
- const V = getComputedStyle($), L = Number.parseFloat(V.lineHeight) || 20, x = Number.parseFloat(V.paddingTop) + Number.parseFloat(V.paddingBottom) + Number.parseFloat(V.borderTopWidth) + Number.parseFloat(V.borderBottomWidth);
2355
- let k = $.scrollHeight;
2356
- f.minRows && (k = Math.max(k, f.minRows * L + x)), f.maxRows && (k = Math.min(k, f.maxRows * L + x)), $.style.height = `${k}px`, $.style.overflowY = f.maxRows && $.scrollHeight > k ? "auto" : "hidden";
2357
- }
2358
- ke(() => be(p)), Z([b, r], () => be(p));
2359
- function T(f) {
2360
- const $ = f.target.value;
2361
- l.value = $, i("input", $);
2362
- }
2363
- function M(f) {
2364
- i("change", f.target.value);
2365
- }
2366
- function g(f) {
2367
- m.value = !0, i("focus", f);
2368
- }
2369
- function C(f) {
2370
- m.value = !1, i("blur", f);
2371
- }
2372
- return y({
2373
- focus: () => v.value?.focus(),
2374
- blur: () => v.value?.blur(),
2375
- select: () => v.value?.select(),
2376
- textarea: v
2377
- }), (f, $) => (n(), d("div", {
2378
- class: U(h.value)
3002
+ function y() {
3003
+ const r = m.value, S = c.value;
3004
+ if (!r || !S) return;
3005
+ S.style.height = "auto";
3006
+ const z = getComputedStyle(S), H = Number.parseFloat(z.lineHeight) || 20, M = Number.parseFloat(z.paddingTop) + Number.parseFloat(z.paddingBottom) + Number.parseFloat(z.borderTopWidth) + Number.parseFloat(z.borderBottomWidth);
3007
+ let w = S.scrollHeight;
3008
+ r.minRows && (w = Math.max(w, r.minRows * H + M)), r.maxRows && (w = Math.min(w, r.maxRows * H + M)), S.style.height = `${w}px`, S.style.overflowY = r.maxRows && S.scrollHeight > w ? "auto" : "hidden";
3009
+ }
3010
+ Ce(() => Ue(y)), ne([h, m], () => Ue(y));
3011
+ function P(r) {
3012
+ const S = r.target.value;
3013
+ t.value = S, s("input", S);
3014
+ }
3015
+ function V(r) {
3016
+ s("change", r.target.value);
3017
+ }
3018
+ function B(r) {
3019
+ p.value = !0, s("focus", r);
3020
+ }
3021
+ function $(r) {
3022
+ p.value = !1, s("blur", r);
3023
+ }
3024
+ return _({
3025
+ focus: () => c.value?.focus(),
3026
+ blur: () => c.value?.blur(),
3027
+ select: () => c.value?.select(),
3028
+ textarea: c
3029
+ }), (r, S) => (l(), u("div", {
3030
+ class: F(g.value)
2379
3031
  }, [
2380
- I("textarea", K({
2381
- id: s(o).id.value,
3032
+ x("textarea", te({
3033
+ id: b(o).id.value,
2382
3034
  ref_key: "textareaRef",
2383
- ref: v
2384
- }, f.$attrs, {
3035
+ ref: c
3036
+ }, r.$attrs, {
2385
3037
  class: "wx-textarea__inner",
2386
- value: b.value,
3038
+ value: h.value,
2387
3039
  rows: e.rows,
2388
3040
  placeholder: e.placeholder,
2389
- disabled: s(o).disabled.value,
3041
+ disabled: b(o).disabled.value,
2390
3042
  readonly: e.readonly,
2391
3043
  maxlength: e.maxlength,
2392
3044
  "aria-label": e.ariaLabel,
2393
- "aria-describedby": s(o).describedBy.value,
2394
- "aria-invalid": s(o).status.value === "error" || void 0,
3045
+ "aria-describedby": b(o).describedBy.value,
3046
+ "aria-invalid": b(o).status.value === "error" || void 0,
2395
3047
  style: { resize: e.resize },
2396
- onInput: T,
2397
- onChange: M,
2398
- onFocus: g,
2399
- onBlur: C
2400
- }), null, 16, rt),
2401
- c.value ? (n(), d("span", ct, N(c.value), 1)) : W("", !0)
3048
+ onInput: P,
3049
+ onChange: V,
3050
+ onFocus: B,
3051
+ onBlur: $
3052
+ }), null, 16, zo),
3053
+ f.value ? (l(), u("span", Po, D(f.value), 1)) : C("", !0)
2402
3054
  ], 2));
2403
3055
  }
2404
- }), ft = /* @__PURE__ */ j(vt, [["__scopeId", "data-v-bbca9693"]]), mt = /* @__PURE__ */ E({
3056
+ }), Ao = /* @__PURE__ */ Q(Wo, [["__scopeId", "data-v-bbca9693"]]), Lo = /* @__PURE__ */ J({
2405
3057
  name: "WxTimePicker",
2406
3058
  __name: "TimePicker",
2407
- props: /* @__PURE__ */ S({
3059
+ props: /* @__PURE__ */ R({
2408
3060
  valueFormat: { default: void 0 },
2409
3061
  format: { default: void 0 },
2410
3062
  placeholder: { default: void 0 },
@@ -2431,77 +3083,81 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
2431
3083
  }),
2432
3084
  emits: ["update:modelValue"],
2433
3085
  setup(e) {
2434
- const y = G(e, "modelValue");
2435
- return (a, t) => (n(), Q(fe, K({
2436
- modelValue: y.value,
2437
- "onUpdate:modelValue": t[0] || (t[0] = (i) => y.value = i),
3086
+ const _ = G(e, "modelValue");
3087
+ return (a, n) => (l(), ie(Ie, te({
3088
+ modelValue: _.value,
3089
+ "onUpdate:modelValue": n[0] || (n[0] = (s) => _.value = s),
2438
3090
  type: "time"
2439
- }, a.$props), ue({ _: 2 }, [
2440
- q(a.$slots, (i, l) => ({
2441
- name: l,
2442
- fn: H((o) => [
2443
- P(a.$slots, l, se(de(o ?? {})))
3091
+ }, a.$props), ge({ _: 2 }, [
3092
+ X(a.$slots, (s, t) => ({
3093
+ name: t,
3094
+ fn: Y((o) => [
3095
+ N(a.$slots, t, ke(we(o ?? {})))
2444
3096
  ])
2445
3097
  }))
2446
3098
  ]), 1040, ["modelValue"]));
2447
3099
  }
2448
- }), bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3100
+ }), Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2449
3101
  __proto__: null,
2450
- WxButton: ba,
2451
- WxCard: Ba,
2452
- WxCheckbox: Be,
2453
- WxCheckboxGroup: Ra,
2454
- WxColorPicker: Ua,
2455
- WxDatePicker: fe,
2456
- WxDateRangePicker: Ea,
2457
- WxDateTimePicker: Oa,
2458
- WxForm: Ga,
2459
- WxFormItem: Qa,
2460
- WxInput: tl,
2461
- WxInputNumber: sl,
2462
- WxRadio: Me,
2463
- WxRadioGroup: ml,
2464
- WxRate: kl,
3102
+ WxButton: lt,
3103
+ WxCard: ft,
3104
+ WxCheckbox: ye,
3105
+ WxCheckboxGroup: _t,
3106
+ WxColorPicker: It,
3107
+ WxDatePicker: Ie,
3108
+ WxDateRangePicker: Vt,
3109
+ WxDateTimePicker: zt,
3110
+ WxForm: Wt,
3111
+ WxFormItem: Ht,
3112
+ WxInput: Qe,
3113
+ WxInputNumber: Yt,
3114
+ WxPagination: ea,
3115
+ WxRadio: aa,
3116
+ WxRadioGroup: fl,
3117
+ WxRate: xl,
2465
3118
  WxRichText: Fl,
2466
- WxSelect: Gl,
2467
- WxSlider: Ql,
2468
- WxSwitch: at,
2469
- WxTagsInput: dt,
2470
- WxTextarea: ft,
2471
- WxTimePicker: mt
2472
- }, Symbol.toStringTag, { value: "Module" })), Bt = {
2473
- install(e, y = {}) {
2474
- const { prefix: a = "Wx" } = y;
2475
- for (const [t, i] of Object.entries(bt)) {
2476
- if (!t.startsWith("Wx")) continue;
2477
- const l = a === "Wx" ? t : `${a}${t.slice(2)}`;
2478
- e.component(l, i);
3119
+ WxSelect: jl,
3120
+ WxSlider: Xl,
3121
+ WxSwitch: eo,
3122
+ WxTable: $o,
3123
+ WxTagsInput: Vo,
3124
+ WxTextarea: Ao,
3125
+ WxTimePicker: Lo
3126
+ }, Symbol.toStringTag, { value: "Module" })), Go = {
3127
+ install(e, _ = {}) {
3128
+ const { prefix: a = "Wx" } = _;
3129
+ for (const [n, s] of Object.entries(Ro)) {
3130
+ if (!n.startsWith("Wx")) continue;
3131
+ const t = a === "Wx" ? n : `${a}${n.slice(2)}`;
3132
+ e.component(t, s);
2479
3133
  }
2480
3134
  }
2481
3135
  };
2482
3136
  export {
2483
- Bt as WebxUI,
2484
- ba as WxButton,
2485
- Ba as WxCard,
2486
- Be as WxCheckbox,
2487
- Ra as WxCheckboxGroup,
2488
- Ua as WxColorPicker,
2489
- fe as WxDatePicker,
2490
- Ea as WxDateRangePicker,
2491
- Oa as WxDateTimePicker,
2492
- Ga as WxForm,
2493
- Qa as WxFormItem,
2494
- tl as WxInput,
2495
- sl as WxInputNumber,
2496
- Me as WxRadio,
2497
- ml as WxRadioGroup,
2498
- kl as WxRate,
3137
+ Go as WebxUI,
3138
+ lt as WxButton,
3139
+ ft as WxCard,
3140
+ ye as WxCheckbox,
3141
+ _t as WxCheckboxGroup,
3142
+ It as WxColorPicker,
3143
+ Ie as WxDatePicker,
3144
+ Vt as WxDateRangePicker,
3145
+ zt as WxDateTimePicker,
3146
+ Wt as WxForm,
3147
+ Ht as WxFormItem,
3148
+ Qe as WxInput,
3149
+ Yt as WxInputNumber,
3150
+ ea as WxPagination,
3151
+ aa as WxRadio,
3152
+ fl as WxRadioGroup,
3153
+ xl as WxRate,
2499
3154
  Fl as WxRichText,
2500
- Gl as WxSelect,
2501
- Ql as WxSlider,
2502
- at as WxSwitch,
2503
- dt as WxTagsInput,
2504
- ft as WxTextarea,
2505
- mt as WxTimePicker
3155
+ jl as WxSelect,
3156
+ Xl as WxSlider,
3157
+ eo as WxSwitch,
3158
+ $o as WxTable,
3159
+ Vo as WxTagsInput,
3160
+ Ao as WxTextarea,
3161
+ Lo as WxTimePicker
2506
3162
  };
2507
3163
  //# sourceMappingURL=index.js.map