@wirecore/wirelayer-vue 0.6.0 → 0.8.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.
Files changed (158) hide show
  1. package/dist/{Checkbox-D9f77jtl.js → Checkbox-DS2qfQK1.js} +28 -30
  2. package/dist/ContextMenu-B6agwyf_.js +2311 -0
  3. package/dist/{Field-B1EsNF84.js → Field-Cqe2BG_x.js} +1 -1
  4. package/dist/{Highlight-Cg8DvCfq.js → Highlight-uwptdaUw.js} +35 -32
  5. package/dist/Input-C5dyvZfJ.js +183 -0
  6. package/dist/{InputStatus-D7kBGlew.js → InputStatus-Cgarj-yu.js} +16 -3
  7. package/dist/{Select-DAuYpE1c.js → Select-CeZbSy6K.js} +137 -112
  8. package/dist/Slider-Cpv7Vj3B.js +143 -0
  9. package/dist/Tree-DgHt0P5P.js +807 -0
  10. package/dist/chart.js +1 -1
  11. package/dist/components/Alert/Alert.vue.d.ts +5 -3
  12. package/dist/components/Alert/Alert.vue.d.ts.map +1 -1
  13. package/dist/components/AngleSlider/AngleSlider.vue.d.ts +2 -0
  14. package/dist/components/AngleSlider/AngleSlider.vue.d.ts.map +1 -1
  15. package/dist/components/Autocomplete/Autocomplete.vue.d.ts +2 -0
  16. package/dist/components/Autocomplete/Autocomplete.vue.d.ts.map +1 -1
  17. package/dist/components/Carousel/Carousel.vue.d.ts +2 -0
  18. package/dist/components/Carousel/Carousel.vue.d.ts.map +1 -1
  19. package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts +2 -0
  20. package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts.map +1 -1
  21. package/dist/components/Checkbox/Checkbox.vue.d.ts +28 -23
  22. package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
  23. package/dist/components/ColorInput/ColorInput.vue.d.ts.map +1 -1
  24. package/dist/components/ColorPicker/ColorPicker.vue.d.ts +2 -0
  25. package/dist/components/ColorPicker/ColorPicker.vue.d.ts.map +1 -1
  26. package/dist/components/Combobox/Combobox.vue.d.ts +11 -1
  27. package/dist/components/Combobox/Combobox.vue.d.ts.map +1 -1
  28. package/dist/components/CommandPalette/CommandPalette.vue.d.ts +1 -1
  29. package/dist/components/Confirm/ConfirmDialog.vue.d.ts +5 -0
  30. package/dist/components/Confirm/ConfirmDialog.vue.d.ts.map +1 -1
  31. package/dist/components/Confirm/confirm.d.ts +7 -0
  32. package/dist/components/Confirm/confirm.d.ts.map +1 -1
  33. package/dist/components/ContextMenu/ContextMenu.vue.d.ts +17 -1
  34. package/dist/components/ContextMenu/ContextMenu.vue.d.ts.map +1 -1
  35. package/dist/components/DatePicker/DatePicker.vue.d.ts +2 -0
  36. package/dist/components/DatePicker/DatePicker.vue.d.ts.map +1 -1
  37. package/dist/components/DatePicker/DatePickerBase.vue.d.ts +2 -0
  38. package/dist/components/DatePicker/DatePickerBase.vue.d.ts.map +1 -1
  39. package/dist/components/DateRangePicker/DateRangePicker.vue.d.ts +2 -0
  40. package/dist/components/DateRangePicker/DateRangePicker.vue.d.ts.map +1 -1
  41. package/dist/components/Dialog/Dialog.vue.d.ts +1 -1
  42. package/dist/components/Dialog/DialogContent.vue.d.ts +7 -0
  43. package/dist/components/Dialog/DialogContent.vue.d.ts.map +1 -1
  44. package/dist/components/Drawer/Drawer.vue.d.ts +1 -1
  45. package/dist/components/Drawer/DrawerContent.vue.d.ts +2 -0
  46. package/dist/components/Drawer/DrawerContent.vue.d.ts.map +1 -1
  47. package/dist/components/DurationInput/DurationInput.vue.d.ts +2 -0
  48. package/dist/components/DurationInput/DurationInput.vue.d.ts.map +1 -1
  49. package/dist/components/Fieldset/Fieldset.vue.d.ts +1 -1
  50. package/dist/components/FilterPanel/FilterPanel.vue.d.ts +1 -1
  51. package/dist/components/HoverCard/HoverCard.vue.d.ts +1 -1
  52. package/dist/components/IconButton/IconButton.vue.d.ts +2 -0
  53. package/dist/components/IconButton/IconButton.vue.d.ts.map +1 -1
  54. package/dist/components/Input/Input.vue.d.ts +3 -1
  55. package/dist/components/Input/Input.vue.d.ts.map +1 -1
  56. package/dist/components/Knob/Knob.vue.d.ts +2 -0
  57. package/dist/components/Knob/Knob.vue.d.ts.map +1 -1
  58. package/dist/components/Listbox/Listbox.vue.d.ts +2 -0
  59. package/dist/components/Listbox/Listbox.vue.d.ts.map +1 -1
  60. package/dist/components/MaskInput/MaskInput.vue.d.ts +2 -1
  61. package/dist/components/MaskInput/MaskInput.vue.d.ts.map +1 -1
  62. package/dist/components/Menu/Menu.vue.d.ts +9 -1
  63. package/dist/components/Menu/Menu.vue.d.ts.map +1 -1
  64. package/dist/components/Menu/state.d.ts +22 -0
  65. package/dist/components/Menu/state.d.ts.map +1 -1
  66. package/dist/components/MonthPicker/MonthPicker.vue.d.ts +2 -0
  67. package/dist/components/MonthPicker/MonthPicker.vue.d.ts.map +1 -1
  68. package/dist/components/MultiSelect/MultiSelect.vue.d.ts +2 -0
  69. package/dist/components/MultiSelect/MultiSelect.vue.d.ts.map +1 -1
  70. package/dist/components/NativeSelect/NativeSelect.vue.d.ts +26 -17
  71. package/dist/components/NativeSelect/NativeSelect.vue.d.ts.map +1 -1
  72. package/dist/components/NumberInput/NumberInput.vue.d.ts +3 -1
  73. package/dist/components/NumberInput/NumberInput.vue.d.ts.map +1 -1
  74. package/dist/components/Panel/Panel.vue.d.ts +1 -1
  75. package/dist/components/PasswordInput/PasswordInput.vue.d.ts +11 -3
  76. package/dist/components/PasswordInput/PasswordInput.vue.d.ts.map +1 -1
  77. package/dist/components/PinInput/PinInput.vue.d.ts +2 -0
  78. package/dist/components/PinInput/PinInput.vue.d.ts.map +1 -1
  79. package/dist/components/Popover/Popover.vue.d.ts +1 -1
  80. package/dist/components/Progress/Progress.vue.d.ts +11 -0
  81. package/dist/components/Progress/Progress.vue.d.ts.map +1 -1
  82. package/dist/components/RadioGroup/RadioGroup.vue.d.ts +24 -25
  83. package/dist/components/RadioGroup/RadioGroup.vue.d.ts.map +1 -1
  84. package/dist/components/RadioGroup/RadioGroupItem.vue.d.ts +2 -1
  85. package/dist/components/RadioGroup/RadioGroupItem.vue.d.ts.map +1 -1
  86. package/dist/components/RadioGroup/context.d.ts +4 -0
  87. package/dist/components/RadioGroup/context.d.ts.map +1 -0
  88. package/dist/components/Rating/Rating.vue.d.ts +2 -0
  89. package/dist/components/Rating/Rating.vue.d.ts.map +1 -1
  90. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts +23 -22
  91. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
  92. package/dist/components/Select/Select.vue.d.ts +11 -1
  93. package/dist/components/Select/Select.vue.d.ts.map +1 -1
  94. package/dist/components/SelectionCard/CheckboxCard.vue.d.ts +2 -0
  95. package/dist/components/SelectionCard/CheckboxCard.vue.d.ts.map +1 -1
  96. package/dist/components/Slider/Slider.vue.d.ts +2 -0
  97. package/dist/components/Slider/Slider.vue.d.ts.map +1 -1
  98. package/dist/components/Switch/Switch.vue.d.ts +2 -0
  99. package/dist/components/Switch/Switch.vue.d.ts.map +1 -1
  100. package/dist/components/TagsInput/TagsInput.vue.d.ts +2 -0
  101. package/dist/components/TagsInput/TagsInput.vue.d.ts.map +1 -1
  102. package/dist/components/Textarea/Textarea.vue.d.ts +3 -1
  103. package/dist/components/Textarea/Textarea.vue.d.ts.map +1 -1
  104. package/dist/components/TimePicker/TimePicker.vue.d.ts +2 -0
  105. package/dist/components/TimePicker/TimePicker.vue.d.ts.map +1 -1
  106. package/dist/components/TimeRangePicker/TimeRangePicker.vue.d.ts +2 -0
  107. package/dist/components/TimeRangePicker/TimeRangePicker.vue.d.ts.map +1 -1
  108. package/dist/components/Tooltip/Tooltip.vue.d.ts +3 -0
  109. package/dist/components/Tooltip/Tooltip.vue.d.ts.map +1 -1
  110. package/dist/components/TreeSelect/TreeSelect.vue.d.ts +2 -0
  111. package/dist/components/TreeSelect/TreeSelect.vue.d.ts.map +1 -1
  112. package/dist/components/YearPicker/YearPicker.vue.d.ts +2 -0
  113. package/dist/components/YearPicker/YearPicker.vue.d.ts.map +1 -1
  114. package/dist/data-table/DataTable.vue.d.ts +9 -1
  115. package/dist/data-table/DataTable.vue.d.ts.map +1 -1
  116. package/dist/data-table.js +1007 -994
  117. package/dist/editor.js +1 -1
  118. package/dist/form/FormField.vue.d.ts +3 -0
  119. package/dist/form/FormField.vue.d.ts.map +1 -1
  120. package/dist/form.js +8 -5
  121. package/dist/index.d.ts +2 -1
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/index.js +5834 -5626
  124. package/dist/label-for-eQvYjsM5.js +8 -0
  125. package/dist/pdf.js +3 -3
  126. package/dist/sources/ActionBar.css +1 -0
  127. package/dist/sources/AppShell.css +1 -0
  128. package/dist/sources/ChatPrompt.css +1 -0
  129. package/dist/sources/Gallery.css +1 -0
  130. package/dist/sources/IconButton.css +1 -0
  131. package/dist/sources/Image.css +1 -0
  132. package/dist/sources/ImageCropper.css +1 -0
  133. package/dist/sources/InlineEdit.css +1 -0
  134. package/dist/sources/Marquee.css +1 -0
  135. package/dist/sources/MegaMenu.css +1 -0
  136. package/dist/sources/Menubar.css +1 -0
  137. package/dist/sources/OrderList.css +1 -0
  138. package/dist/sources/PickList.css +1 -0
  139. package/dist/sources/ScrollTop.css +1 -0
  140. package/dist/{useTree-H8XsFHMk.js → useTree-UhG1TMeM.js} +1 -1
  141. package/dist/utils/label-for.d.ts +3 -0
  142. package/dist/utils/label-for.d.ts.map +1 -0
  143. package/dist/utils/list.d.ts +5 -0
  144. package/dist/utils/list.d.ts.map +1 -1
  145. package/dist/utils/text-field.d.ts +16 -0
  146. package/dist/utils/text-field.d.ts.map +1 -0
  147. package/dist/virtual/VirtualSelect.vue.d.ts +2 -0
  148. package/dist/virtual/VirtualSelect.vue.d.ts.map +1 -1
  149. package/dist/virtual.js +207 -197
  150. package/fonts.css +2 -0
  151. package/llms-full.txt +254 -23
  152. package/llms.txt +9 -5
  153. package/package.json +7 -3
  154. package/theme.css +14 -0
  155. package/dist/ContextMenu-C5JKyNlX.js +0 -2209
  156. package/dist/Input-BhnYMKjE.js +0 -168
  157. package/dist/Slider-CyoZc5A8.js +0 -135
  158. package/dist/Tree-DWxqSrO6.js +0 -789
@@ -1,5 +1,5 @@
1
1
  import { a as e, n as t } from "./recipes-BlM9aKyt.js";
2
- import { n } from "./InputStatus-D7kBGlew.js";
2
+ import { r as n } from "./InputStatus-Cgarj-yu.js";
3
3
  import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, mergeProps as d, normalizeClass as f, onBeforeUnmount as p, openBlock as m, provide as h, ref as g, renderSlot as _, resolveDynamicComponent as v, toDisplayString as y, unref as b, useAttrs as x, useSlots as S, useTemplateRef as C, watch as w, withCtx as T } from "vue";
4
4
  import { CircleCheck as E, Info as D } from "@lucide/vue";
5
5
  import { field as O, toggletip as k } from "@wirecore/wirelayer-recipes";
@@ -1,10 +1,10 @@
1
1
  import { i as e, n as t } from "./recipes-BlM9aKyt.js";
2
- import { Fragment as n, computed as r, createBlock as i, createElementBlock as a, createTextVNode as o, defineComponent as s, normalizeClass as c, onBeforeUnmount as l, openBlock as u, ref as d, renderList as f, shallowRef as p, toDisplayString as m, unref as h, watch as g } from "vue";
3
- import { DataKeyResolver as _, createDataList as v, dataListAnnouncement as y, filterListOptions as b, groupListOptions as x, highlight as S, highlightChunks as C, indexListOptions as w, listOptionsForValues as T, listValues as E, toListOptions as D } from "@wirecore/wirelayer-recipes";
4
- import { useFilter as O } from "@ark-ui/vue/locale";
5
- import { Highlight as k } from "@ark-ui/vue/highlight";
2
+ import { Fragment as n, computed as r, createBlock as i, createElementBlock as a, createTextVNode as o, defineComponent as s, normalizeClass as c, onBeforeUnmount as l, onMounted as u, openBlock as d, ref as f, renderList as p, shallowRef as m, toDisplayString as h, unref as g, watch as _ } from "vue";
3
+ import { DataKeyResolver as v, checkListValues as y, createDataList as b, dataListAnnouncement as x, filterListOptions as S, groupListOptions as C, highlight as w, highlightChunks as T, indexListOptions as E, listOptionsForValues as D, listValues as O, toListOptions as k } from "@wirecore/wirelayer-recipes";
4
+ import { useFilter as A } from "@ark-ui/vue/locale";
5
+ import { Highlight as j } from "@ark-ui/vue/highlight";
6
6
  //#region src/utils/data-source.ts
7
- var A = {
7
+ var M = {
8
8
  status: "idle",
9
9
  items: [],
10
10
  loadingMore: !1,
@@ -12,8 +12,8 @@ var A = {
12
12
  search: "",
13
13
  tooShort: !1
14
14
  };
15
- function j(t) {
16
- let n = e(), i = p(A), a = p([]), o, s, c = () => ({
15
+ function N(t) {
16
+ let n = e(), i = m(M), a = m([]), o, s, c = () => ({
17
17
  pageSize: t.pageSize?.(),
18
18
  minSearchLength: t.minSearchLength?.(),
19
19
  debounce: t.debounce?.(),
@@ -21,16 +21,16 @@ function j(t) {
21
21
  });
22
22
  function u() {
23
23
  let e = t.source();
24
- if (e) return o ??= v({
24
+ if (e) return o ??= b({
25
25
  source: e,
26
26
  ...c(),
27
27
  onChange: (e) => i.value = e
28
- }), s ??= new _({
28
+ }), s ??= new v({
29
29
  source: e,
30
30
  onChange: (e) => a.value = e
31
31
  }), o;
32
32
  }
33
- return g(() => [
33
+ return _(() => [
34
34
  t.source(),
35
35
  t.pageSize?.(),
36
36
  t.minSearchLength?.(),
@@ -55,15 +55,15 @@ function j(t) {
55
55
  resolveKeys: (e) => {
56
56
  u() && e.length && s.resolve(e).catch(() => void 0);
57
57
  },
58
- announcement: r(() => t.source() ? y(i.value, n.value.translations, n.value.locale, t.minSearchLength?.() ?? 0) : "")
58
+ announcement: r(() => t.source() ? x(i.value, n.value.translations, n.value.locale, t.minSearchLength?.() ?? 0) : "")
59
59
  };
60
60
  }
61
- function M(t) {
62
- let n = e(), i = j({
61
+ function P(t) {
62
+ let n = e(), i = N({
63
63
  source: t.source,
64
64
  pageSize: t.pageSize,
65
65
  minSearchLength: t.minSearchLength
66
- }), a = r(() => i.active.value ? i.state.value.items : t.items()), o = r(() => D(i.resolved.value, t.accessors()));
66
+ }), a = r(() => i.active.value ? i.state.value.items : t.items()), o = r(() => k(i.resolved.value, t.accessors()));
67
67
  return {
68
68
  ...i,
69
69
  items: a,
@@ -84,11 +84,11 @@ function M(t) {
84
84
  }
85
85
  //#endregion
86
86
  //#region src/utils/list.ts
87
- function N(e, t, n = () => "") {
88
- let i = O({
87
+ function F(e, t, n = () => "") {
88
+ let i = A({
89
89
  sensitivity: "base",
90
90
  usage: "sort"
91
- }), a = r(() => D(e(), t())), o = r(() => b(a.value, n(), i.value.contains)), s = r(() => x(o.value));
91
+ }), a = r(() => k(e(), t())), o = r(() => S(a.value, n(), i.value.contains)), s = r(() => C(o.value));
92
92
  return {
93
93
  options: a,
94
94
  visible: o,
@@ -96,27 +96,30 @@ function N(e, t, n = () => "") {
96
96
  ordered: r(() => s.value.flatMap((e) => e.options))
97
97
  };
98
98
  }
99
- function P(e) {
100
- let t = d(e.defaultValue ?? (e.multiple ? [] : null)), n = d([]), i = r(() => e.model() === void 0 ? t.value : e.model()), a = r(() => T(e.multiple ? i.value ?? [] : E(i.value, e.items.value), w(e.items.value, n.value), e.accessors())), o = r(() => a.value.map((e) => e.key));
101
- function s(r) {
99
+ function I(e) {
100
+ let t = f(e.defaultValue ?? (e.multiple ? [] : null)), n = f([]), i = r(() => e.model() === void 0 ? t.value : e.model()), a = r(() => D(e.multiple ? i.value ?? [] : O(i.value, e.items.value), E(e.items.value, n.value), e.accessors())), o = r(() => a.value.map((e) => e.key)), s = e.check;
101
+ s && u(() => _([a, s.ready], ([e, t]) => {
102
+ t && y(s.component, e);
103
+ }, { immediate: !0 }));
104
+ function c(r) {
102
105
  n.value = r;
103
106
  let i = r.map((e) => e.value), a = e.multiple ? i : i[0] ?? null;
104
107
  t.value = a, e.emit(a);
105
108
  }
106
- function c(t, n = []) {
107
- let r = w(e.items.value, n, a.value);
108
- s(t.map((e) => r.get(e)).filter((e) => e !== void 0));
109
+ function l(t, n = []) {
110
+ let r = E(e.items.value, n, a.value);
111
+ c(t.map((e) => r.get(e)).filter((e) => e !== void 0));
109
112
  }
110
113
  return {
111
114
  selected: a,
112
115
  keys: o,
113
- commit: s,
114
- commitKeys: c
116
+ commit: c,
117
+ commitKeys: l
115
118
  };
116
119
  }
117
120
  //#endregion
118
121
  //#region src/components/Highlight/Highlight.vue
119
- var F = /* @__PURE__ */ s({
122
+ var L = /* @__PURE__ */ s({
120
123
  __name: "Highlight",
121
124
  props: {
122
125
  text: {},
@@ -135,22 +138,22 @@ var F = /* @__PURE__ */ s({
135
138
  classes: {}
136
139
  },
137
140
  setup(e) {
138
- let s = e, l = t("highlight", S, () => s.classes), d = r(() => s.wholeWord || s.ignoreAccents || !!s.colors?.length), p = r(() => d.value ? C(s.text, s.query, {
141
+ let s = e, l = t("highlight", w, () => s.classes), u = r(() => s.wholeWord || s.ignoreAccents || !!s.colors?.length), f = r(() => u.value ? T(s.text, s.query, {
139
142
  ignoreCase: s.ignoreCase,
140
143
  matchAll: s.matchAll,
141
144
  wholeWord: s.wholeWord,
142
145
  ignoreAccents: s.ignoreAccents
143
146
  }) : []);
144
- return (t, r) => d.value ? (u(!0), a(n, { key: 1 }, f(p.value, (t, r) => (u(), a(n, { key: r }, [t.match ? (u(), a("mark", {
147
+ return (t, r) => u.value ? (d(!0), a(n, { key: 1 }, p(f.value, (t, r) => (d(), a(n, { key: r }, [t.match ? (d(), a("mark", {
145
148
  key: 0,
146
- class: c(h(l)({ color: e.colors?.[t.term ?? 0] }))
147
- }, m(t.text), 3)) : (u(), a(n, { key: 1 }, [o(m(t.text), 1)], 64))], 64))), 128)) : (u(), i(h(k), {
149
+ class: c(g(l)({ color: e.colors?.[t.term ?? 0] }))
150
+ }, h(t.text), 3)) : (d(), a(n, { key: 1 }, [o(h(t.text), 1)], 64))], 64))), 128)) : (d(), i(g(j), {
148
151
  key: 0,
149
152
  text: e.text,
150
153
  query: e.query,
151
154
  "ignore-case": e.ignoreCase,
152
155
  "match-all": e.matchAll,
153
- class: c(h(l)())
156
+ class: c(g(l)())
154
157
  }, null, 8, [
155
158
  "text",
156
159
  "query",
@@ -161,4 +164,4 @@ var F = /* @__PURE__ */ s({
161
164
  }
162
165
  });
163
166
  //#endregion
164
- export { M as a, j as i, N as n, P as r, F as t };
167
+ export { P as a, N as i, F as n, I as r, L as t };
@@ -0,0 +1,183 @@
1
+ import { a as e, n as t } from "./recipes-BlM9aKyt.js";
2
+ import { t as n } from "./attrs-KNjeRUCf.js";
3
+ import { i as r, n as i, t as a } from "./InputStatus-Cgarj-yu.js";
4
+ import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, normalizeClass as m, normalizeStyle as h, openBlock as g, ref as _, resolveDynamicComponent as v, toDisplayString as y, unref as b, useAttrs as x, useId as S, useModel as C, useTemplateRef as w } from "vue";
5
+ import { CircleAlert as T, LoaderCircle as E } from "@lucide/vue";
6
+ import { buttonColorKey as D, formatCount as O, iconButton as k, input as A, setTextControlValue as j, spinner as M } from "@wirecore/wirelayer-recipes";
7
+ import { Field as N, useFieldContext as P } from "@ark-ui/vue/field";
8
+ //#region src/components/IconButton/IconButton.vue?vue&type=script&setup=true&lang.ts
9
+ var F = [
10
+ "type",
11
+ "disabled",
12
+ "aria-label"
13
+ ], I = /* @__PURE__ */ d({
14
+ inheritAttrs: !1,
15
+ __name: "IconButton",
16
+ props: {
17
+ icon: {},
18
+ iconProps: {},
19
+ label: {},
20
+ variant: {},
21
+ color: {},
22
+ size: {},
23
+ shape: {},
24
+ disabled: { type: Boolean },
25
+ loading: { type: Boolean },
26
+ type: { default: "button" },
27
+ badge: { type: [Number, Boolean] },
28
+ badgeLabel: {
29
+ type: Function,
30
+ default: (e) => e === null ? "new" : `${e} new`
31
+ },
32
+ classes: {}
33
+ },
34
+ setup(e) {
35
+ let n = e, r = t("iconButton", k, () => n.classes), i = t("spinner", M), a = x(), u = o(() => r({
36
+ variant: n.variant,
37
+ color: D(n.color),
38
+ size: n.size,
39
+ shape: n.shape
40
+ })), d = o(() => typeof n.badge == "number" && n.badge > 0 ? n.badge : 0), f = o(() => d.value ? `${n.label}, ${n.badgeLabel(O(d.value))}` : n.badge === !0 ? `${n.label}, ${n.badgeLabel(null)}` : n.label), h = o(() => n.loading ? {
41
+ "aria-disabled": !0,
42
+ "aria-busy": !0
43
+ } : {});
44
+ function _(e) {
45
+ n.loading ? e.preventDefault() : [a.onClick].flat().forEach((t) => t?.(e));
46
+ }
47
+ return (t, n) => (g(), l("button", p({
48
+ ...b(a),
49
+ class: u.value.base({ class: m(b(a).class) }),
50
+ onClick: _,
51
+ ...h.value
52
+ }, {
53
+ type: e.type,
54
+ disabled: e.disabled,
55
+ "aria-label": f.value
56
+ }), [e.loading ? (g(), s(b(E), {
57
+ key: 0,
58
+ class: m(b(i)().icon({ class: u.value.icon() })),
59
+ "aria-hidden": "true"
60
+ }, null, 8, ["class"])) : (g(), s(v(e.icon), p({ key: 1 }, e.iconProps, {
61
+ class: u.value.icon(),
62
+ "aria-hidden": "true"
63
+ }), null, 16, ["class"])), d.value ? (g(), l("span", {
64
+ key: 2,
65
+ class: m(u.value.badge()),
66
+ "aria-hidden": "true"
67
+ }, y(b(O)(d.value)), 3)) : e.badge === !0 ? (g(), l("span", {
68
+ key: 3,
69
+ class: m(u.value.dot()),
70
+ "aria-hidden": "true"
71
+ }, null, 2)) : c("", !0)], 16, F));
72
+ }
73
+ }), L = ["data-invalid", "data-disabled"], R = ["id"], z = ["id"], B = /* @__PURE__ */ d({
74
+ inheritAttrs: !1,
75
+ __name: "Input",
76
+ props: /*@__PURE__*/ f({
77
+ size: {},
78
+ invalid: { type: Boolean },
79
+ success: { type: Boolean },
80
+ disabled: { type: Boolean },
81
+ loading: { type: Boolean },
82
+ clearable: { type: Boolean },
83
+ clearLabel: {},
84
+ leadingIcon: {},
85
+ prefix: {},
86
+ suffix: {},
87
+ mono: { type: Boolean },
88
+ classes: {}
89
+ }, {
90
+ modelValue: {},
91
+ modelModifiers: {}
92
+ }),
93
+ emits: ["update:modelValue"],
94
+ setup(d, { expose: f }) {
95
+ let E = d, D = t("input", A, () => E.classes), O = e(), k = C(d, "modelValue"), M = x(), F = P(), I = r(), B = o(() => E.invalid || !!F?.value.invalid), V = o(() => !B.value && (E.success || I.value.success)), H = o(() => E.disabled || !!F?.value.disabled), U = o(() => !!M.readonly || M.readonly === "" || !!F?.value.readOnly), W = o(() => D({
96
+ size: E.size,
97
+ invalid: B.value,
98
+ success: V.value,
99
+ disabled: H.value,
100
+ hasIcon: !!E.leadingIcon,
101
+ hasStatusIcon: B.value || V.value || E.loading || E.clearable,
102
+ mono: E.mono
103
+ })), G = o(() => n(M)), K = _(String(M.defaultValue ?? "")), q = o(() => E.clearable && !!(k.value ?? K.value) && !H.value && !U.value), J = S(), Y = S(), X = o(() => [
104
+ F?.value.ariaDescribedby,
105
+ E.prefix && J,
106
+ E.suffix && Y,
107
+ G.value.rest["aria-describedby"]
108
+ ].filter(Boolean).join(" ") || void 0), Z = w("control");
109
+ function Q() {
110
+ let e = Z.value?.$el;
111
+ e && (j(e), e.focus());
112
+ }
113
+ return f(i(() => Z.value?.$el)), (e, t) => (g(), l("div", {
114
+ class: m(W.value.base({ class: G.value.className })),
115
+ style: h(G.value.style),
116
+ "data-invalid": B.value || void 0,
117
+ "data-disabled": H.value || void 0
118
+ }, [
119
+ d.prefix ? (g(), l("span", {
120
+ key: 0,
121
+ id: b(J),
122
+ class: m(W.value.prefix())
123
+ }, y(d.prefix), 11, R)) : c("", !0),
124
+ d.leadingIcon ? (g(), s(v(d.leadingIcon), {
125
+ key: 1,
126
+ class: m(W.value.icon()),
127
+ "aria-hidden": "true"
128
+ }, null, 8, ["class"])) : c("", !0),
129
+ u(b(N).Input, p({
130
+ ref_key: "control",
131
+ ref: Z,
132
+ modelValue: k.value,
133
+ "onUpdate:modelValue": t[0] ||= (e) => k.value = e
134
+ }, G.value.rest, {
135
+ class: W.value.control(),
136
+ disabled: H.value || void 0,
137
+ "aria-invalid": B.value || void 0,
138
+ "aria-describedby": X.value,
139
+ "aria-busy": d.loading || void 0,
140
+ onInput: t[1] ||= (e) => K.value = e.target.value
141
+ }), null, 16, [
142
+ "modelValue",
143
+ "class",
144
+ "disabled",
145
+ "aria-invalid",
146
+ "aria-describedby",
147
+ "aria-busy"
148
+ ]),
149
+ d.loading || d.clearable || V.value ? (g(), s(a, {
150
+ key: 2,
151
+ loading: d.loading,
152
+ clear: q.value,
153
+ "clear-label": d.clearLabel ?? b(O).field.clear,
154
+ success: V.value,
155
+ classes: {
156
+ spinner: W.value.spinner(),
157
+ clear: W.value.clear(),
158
+ clearIcon: W.value.clearIcon(),
159
+ statusIcon: W.value.statusIcon()
160
+ },
161
+ onClear: Q
162
+ }, null, 8, [
163
+ "loading",
164
+ "clear",
165
+ "clear-label",
166
+ "success",
167
+ "classes"
168
+ ])) : c("", !0),
169
+ B.value ? (g(), s(b(T), {
170
+ key: 3,
171
+ class: m(W.value.statusIcon()),
172
+ "aria-hidden": "true"
173
+ }, null, 8, ["class"])) : c("", !0),
174
+ d.suffix ? (g(), l("span", {
175
+ key: 4,
176
+ id: b(Y),
177
+ class: m(W.value.suffix())
178
+ }, y(d.suffix), 11, z)) : c("", !0)
179
+ ], 14, L));
180
+ }
181
+ });
182
+ //#endregion
183
+ export { I as n, B as t };
@@ -10,8 +10,21 @@ function g() {
10
10
  });
11
11
  }
12
12
  //#endregion
13
+ //#region src/utils/text-field.ts
14
+ function _(e) {
15
+ return {
16
+ get element() {
17
+ return e() ?? null;
18
+ },
19
+ focus: (t) => e()?.focus(t),
20
+ blur: () => e()?.blur(),
21
+ select: () => e()?.select(),
22
+ setSelectionRange: (t, n, r) => e()?.setSelectionRange(t, n, r)
23
+ };
24
+ }
25
+ //#endregion
13
26
  //#region src/components/Input/InputStatus.vue?vue&type=script&setup=true&lang.ts
14
- var _ = ["aria-label"], v = /* @__PURE__ */ o({
27
+ var v = ["aria-label"], y = /* @__PURE__ */ o({
15
28
  __name: "InputStatus",
16
29
  props: {
17
30
  loading: { type: Boolean },
@@ -41,7 +54,7 @@ var _ = ["aria-label"], v = /* @__PURE__ */ o({
41
54
  }, [a(u(m), {
42
55
  class: c(t.classes.clearIcon),
43
56
  "aria-hidden": "true"
44
- }, null, 8, ["class"])], 10, _)) : r("", !0),
57
+ }, null, 8, ["class"])], 10, v)) : r("", !0),
45
58
  t.invalid && t.invalidIcon ? (l(), n(u(d), {
46
59
  key: 2,
47
60
  class: c(t.classes.statusIcon),
@@ -55,4 +68,4 @@ var _ = ["aria-label"], v = /* @__PURE__ */ o({
55
68
  }
56
69
  });
57
70
  //#endregion
58
- export { h as n, g as r, v as t };
71
+ export { g as i, _ as n, h as r, y as t };