@wirecore/wirelayer-react 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 (145) hide show
  1. package/dist/Checkbox-BMRax6m4.js +49 -0
  2. package/dist/ContextMenu-C6ZaMtqf.js +1511 -0
  3. package/dist/{Highlight-CX30-nP7.js → Highlight-43-H9459.js} +93 -86
  4. package/dist/Input-CtYSQznO.js +120 -0
  5. package/dist/PasswordInput-dpeKVREo.js +425 -0
  6. package/dist/Select-C2CiPTCK.js +256 -0
  7. package/dist/Slider-Bfm_jjYE.js +80 -0
  8. package/dist/{Tree-BiPIkmwT.js → Tree-DVjwp6FG.js} +1 -1
  9. package/dist/chart.js +1 -1
  10. package/dist/components/Alert/Alert.d.ts +3 -1
  11. package/dist/components/Alert/Alert.d.ts.map +1 -1
  12. package/dist/components/AngleSlider/AngleSlider.d.ts +3 -1
  13. package/dist/components/AngleSlider/AngleSlider.d.ts.map +1 -1
  14. package/dist/components/Autocomplete/Autocomplete.d.ts +1 -1
  15. package/dist/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  16. package/dist/components/Carousel/Carousel.d.ts +3 -1
  17. package/dist/components/Carousel/Carousel.d.ts.map +1 -1
  18. package/dist/components/CascadeSelect/CascadeSelect.d.ts +3 -1
  19. package/dist/components/CascadeSelect/CascadeSelect.d.ts.map +1 -1
  20. package/dist/components/Checkbox/Checkbox.d.ts +9 -5
  21. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  22. package/dist/components/ColorPicker/ColorPicker.d.ts +3 -1
  23. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  24. package/dist/components/Combobox/Combobox.d.ts +10 -1
  25. package/dist/components/Combobox/Combobox.d.ts.map +1 -1
  26. package/dist/components/Confirm/ConfirmDialog.d.ts +6 -1
  27. package/dist/components/Confirm/ConfirmDialog.d.ts.map +1 -1
  28. package/dist/components/Confirm/confirm.d.ts +7 -0
  29. package/dist/components/Confirm/confirm.d.ts.map +1 -1
  30. package/dist/components/ContextMenu/ContextMenu.d.ts +12 -3
  31. package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
  32. package/dist/components/DatePicker/DatePicker.d.ts +3 -1
  33. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  34. package/dist/components/DatePicker/DatePickerBase.d.ts +3 -1
  35. package/dist/components/DatePicker/DatePickerBase.d.ts.map +1 -1
  36. package/dist/components/DateRangePicker/DateRangePicker.d.ts +3 -1
  37. package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  38. package/dist/components/Dialog/Dialog.d.ts +8 -1
  39. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  40. package/dist/components/Drawer/Drawer.d.ts +3 -1
  41. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  42. package/dist/components/DurationInput/DurationInput.d.ts +3 -1
  43. package/dist/components/DurationInput/DurationInput.d.ts.map +1 -1
  44. package/dist/components/IconButton/IconButton.d.ts +3 -1
  45. package/dist/components/IconButton/IconButton.d.ts.map +1 -1
  46. package/dist/components/Input/Input.d.ts +7 -2
  47. package/dist/components/Input/Input.d.ts.map +1 -1
  48. package/dist/components/Knob/Knob.d.ts +3 -1
  49. package/dist/components/Knob/Knob.d.ts.map +1 -1
  50. package/dist/components/Listbox/Listbox.d.ts +3 -1
  51. package/dist/components/Listbox/Listbox.d.ts.map +1 -1
  52. package/dist/components/Menu/Menu.d.ts +27 -3
  53. package/dist/components/Menu/Menu.d.ts.map +1 -1
  54. package/dist/components/MonthPicker/MonthPicker.d.ts +3 -1
  55. package/dist/components/MonthPicker/MonthPicker.d.ts.map +1 -1
  56. package/dist/components/MultiSelect/MultiSelect.d.ts +1 -1
  57. package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
  58. package/dist/components/NativeSelect/NativeSelect.d.ts +9 -6
  59. package/dist/components/NativeSelect/NativeSelect.d.ts.map +1 -1
  60. package/dist/components/NumberInput/NumberInput.d.ts +2 -2
  61. package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
  62. package/dist/components/PasswordInput/PasswordInput.d.ts +7 -2
  63. package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -1
  64. package/dist/components/PinInput/PinInput.d.ts +3 -1
  65. package/dist/components/PinInput/PinInput.d.ts.map +1 -1
  66. package/dist/components/Progress/Progress.d.ts +12 -1
  67. package/dist/components/Progress/Progress.d.ts.map +1 -1
  68. package/dist/components/QuarterPicker/QuarterPicker.d.ts +3 -1
  69. package/dist/components/QuarterPicker/QuarterPicker.d.ts.map +1 -1
  70. package/dist/components/RadioGroup/RadioGroup.d.ts +8 -6
  71. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  72. package/dist/components/RadioGroup/RadioGroupItem.d.ts +3 -2
  73. package/dist/components/RadioGroup/RadioGroupItem.d.ts.map +1 -1
  74. package/dist/components/RadioGroup/context.d.ts +3 -0
  75. package/dist/components/RadioGroup/context.d.ts.map +1 -0
  76. package/dist/components/Rating/Rating.d.ts +3 -1
  77. package/dist/components/Rating/Rating.d.ts.map +1 -1
  78. package/dist/components/SegmentedControl/SegmentedControl.d.ts +6 -5
  79. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  80. package/dist/components/Select/Select.d.ts +10 -1
  81. package/dist/components/Select/Select.d.ts.map +1 -1
  82. package/dist/components/Select/list.d.ts +6 -1
  83. package/dist/components/Select/list.d.ts.map +1 -1
  84. package/dist/components/SelectionCard/SelectionCard.d.ts +1 -1
  85. package/dist/components/SelectionCard/SelectionCard.d.ts.map +1 -1
  86. package/dist/components/Slider/Slider.d.ts +3 -1
  87. package/dist/components/Slider/Slider.d.ts.map +1 -1
  88. package/dist/components/Switch/Switch.d.ts +1 -1
  89. package/dist/components/Switch/Switch.d.ts.map +1 -1
  90. package/dist/components/TagsInput/TagsInput.d.ts +3 -1
  91. package/dist/components/TagsInput/TagsInput.d.ts.map +1 -1
  92. package/dist/components/Textarea/Textarea.d.ts +7 -2
  93. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  94. package/dist/components/TimePicker/TimePicker.d.ts +3 -1
  95. package/dist/components/TimePicker/TimePicker.d.ts.map +1 -1
  96. package/dist/components/TimeRangePicker/TimeRangePicker.d.ts +3 -1
  97. package/dist/components/TimeRangePicker/TimeRangePicker.d.ts.map +1 -1
  98. package/dist/components/Tooltip/Tooltip.d.ts +3 -1
  99. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  100. package/dist/components/TreeSelect/TreeSelect.d.ts +3 -1
  101. package/dist/components/TreeSelect/TreeSelect.d.ts.map +1 -1
  102. package/dist/components/YearPicker/YearPicker.d.ts +3 -1
  103. package/dist/components/YearPicker/YearPicker.d.ts.map +1 -1
  104. package/dist/data-table/DataTable.d.ts +10 -2
  105. package/dist/data-table/DataTable.d.ts.map +1 -1
  106. package/dist/data-table.js +952 -949
  107. package/dist/editor.js +1 -1
  108. package/dist/form/FormField.d.ts +5 -1
  109. package/dist/form/FormField.d.ts.map +1 -1
  110. package/dist/form.js +7 -5
  111. package/dist/index.d.ts +1 -1
  112. package/dist/index.d.ts.map +1 -1
  113. package/dist/index.js +3376 -3243
  114. package/dist/label-for-DYgV5EwH.js +9 -0
  115. package/dist/pdf.js +3 -3
  116. package/dist/sources/ActionBar.css +1 -0
  117. package/dist/sources/AppShell.css +1 -0
  118. package/dist/sources/ChatPrompt.css +1 -0
  119. package/dist/sources/Gallery.css +1 -0
  120. package/dist/sources/IconButton.css +1 -0
  121. package/dist/sources/Image.css +1 -0
  122. package/dist/sources/ImageCropper.css +1 -0
  123. package/dist/sources/InlineEdit.css +1 -0
  124. package/dist/sources/Marquee.css +1 -0
  125. package/dist/sources/MegaMenu.css +1 -0
  126. package/dist/sources/Menubar.css +1 -0
  127. package/dist/sources/OrderList.css +1 -0
  128. package/dist/sources/PickList.css +1 -0
  129. package/dist/sources/ScrollTop.css +1 -0
  130. package/dist/utils/label-for.d.ts +3 -0
  131. package/dist/utils/label-for.d.ts.map +1 -0
  132. package/dist/virtual/VirtualSelect.d.ts +1 -1
  133. package/dist/virtual/VirtualSelect.d.ts.map +1 -1
  134. package/dist/virtual.js +245 -236
  135. package/fonts.css +2 -0
  136. package/llms-full.txt +237 -25
  137. package/llms.txt +9 -5
  138. package/package.json +7 -3
  139. package/theme.css +14 -0
  140. package/dist/Checkbox-CZTyKWId.js +0 -44
  141. package/dist/ContextMenu-CjDI7Jy5.js +0 -1434
  142. package/dist/Input-D8U-Auys.js +0 -109
  143. package/dist/PasswordInput-DivSjtN8.js +0 -420
  144. package/dist/Select-Cx3KwSzU.js +0 -234
  145. package/dist/Slider-x-SsBc1d.js +0 -74
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import { i as e, n as t } from "./RecipesProvider-0idafuGm.js";
3
- import { DataKeyResolver as n, createDataList as r, dataListAnnouncement as i, filterListOptions as a, groupListOptions as o, highlight as s, highlightChunks as c, indexListOptions as l, listOptionsForValues as u, listValues as d, toListOptions as f } from "@wirecore/wirelayer-recipes";
4
- import { Check as p, LoaderCircle as m } from "lucide-react";
5
- import { Fragment as h, useEffect as g, useMemo as _, useRef as v, useState as y } from "react";
6
- import { useFilter as b } from "@ark-ui/react/locale";
7
- import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
8
- import { Highlight as w } from "@ark-ui/react/highlight";
3
+ import { DataKeyResolver as n, checkListValues as r, createDataList as i, dataListAnnouncement as a, filterListOptions as o, groupListOptions as s, highlight as c, highlightChunks as l, indexListOptions as u, listOptionsForValues as d, listValues as f, toListOptions as p } from "@wirecore/wirelayer-recipes";
4
+ import { Check as m, LoaderCircle as h } from "lucide-react";
5
+ import { Fragment as g, useEffect as _, useMemo as v, useRef as y, useState as b } from "react";
6
+ import { useFilter as x } from "@ark-ui/react/locale";
7
+ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
8
+ import { Highlight as T } from "@ark-ui/react/highlight";
9
9
  //#region src/utils/data-source.ts
10
- var T = {
10
+ var E = {
11
11
  status: "idle",
12
12
  items: [],
13
13
  loadingMore: !1,
@@ -15,48 +15,48 @@ var T = {
15
15
  search: "",
16
16
  tooShort: !1
17
17
  };
18
- function E({ source: t, pageSize: a, minSearchLength: o, debounce: s, query: c }) {
19
- let { translations: l, locale: u } = e(), [d, f] = y(T), [p, m] = y([]), h = v(void 0), b = v(void 0), x = v({
18
+ function D({ source: t, pageSize: r, minSearchLength: o, debounce: s, query: c }) {
19
+ let { translations: l, locale: u } = e(), [d, f] = b(E), [p, m] = b([]), h = y(void 0), g = y(void 0), x = y({
20
20
  source: t,
21
- pageSize: a,
21
+ pageSize: r,
22
22
  minSearchLength: o,
23
23
  debounce: s,
24
24
  query: c
25
25
  });
26
- g(() => {
26
+ _(() => {
27
27
  x.current = {
28
28
  source: t,
29
- pageSize: a,
29
+ pageSize: r,
30
30
  minSearchLength: o,
31
31
  debounce: s,
32
32
  query: c
33
33
  };
34
34
  });
35
35
  let S = JSON.stringify(c ?? {});
36
- return g(() => {
36
+ return _(() => {
37
37
  t && (h.current?.configure({
38
38
  source: t,
39
- pageSize: a,
39
+ pageSize: r,
40
40
  minSearchLength: o,
41
41
  debounce: s,
42
42
  query: x.current.query
43
- }), b.current?.configure({ source: t }));
43
+ }), g.current?.configure({ source: t }));
44
44
  }, [
45
45
  t,
46
- a,
46
+ r,
47
47
  o,
48
48
  s,
49
49
  S
50
- ]), g(() => () => {
51
- h.current?.dispose(), b.current?.dispose(), h.current = void 0, b.current = void 0;
52
- }, []), _(() => {
50
+ ]), _(() => () => {
51
+ h.current?.dispose(), g.current?.dispose(), h.current = void 0, g.current = void 0;
52
+ }, []), v(() => {
53
53
  let e = () => {
54
54
  let { source: e, ...t } = x.current;
55
- if (e) return h.current ??= r({
55
+ if (e) return h.current ??= i({
56
56
  source: e,
57
57
  ...t,
58
58
  onChange: f
59
- }), b.current ??= new n({
59
+ }), g.current ??= new n({
60
60
  source: e,
61
61
  onChange: m
62
62
  }), h.current;
@@ -71,9 +71,9 @@ function E({ source: t, pageSize: a, minSearchLength: o, debounce: s, query: c }
71
71
  retry: () => void h.current?.retry(),
72
72
  refresh: () => void e()?.refresh(),
73
73
  resolveKeys: (t) => {
74
- e() && t.length && b.current.resolve(t).catch(() => void 0);
74
+ e() && t.length && g.current.resolve(t).catch(() => void 0);
75
75
  },
76
- announcement: t ? i(d, l, u, o ?? 0) : ""
76
+ announcement: t ? a(d, l, u, o ?? 0) : ""
77
77
  };
78
78
  }, [
79
79
  t,
@@ -84,17 +84,17 @@ function E({ source: t, pageSize: a, minSearchLength: o, debounce: s, query: c }
84
84
  o
85
85
  ]);
86
86
  }
87
- function D({ items: t, source: n, accessors: r, pageSize: i, minSearchLength: a }) {
88
- let { translations: o } = e(), s = E({
87
+ function O({ items: t, source: n, accessors: r, pageSize: i, minSearchLength: a }) {
88
+ let { translations: o } = e(), s = D({
89
89
  source: n,
90
90
  pageSize: i,
91
91
  minSearchLength: a
92
- }), { itemValue: c, itemLabel: l, itemDisabled: u, itemGroup: d, itemKeywords: p, valueKey: m } = r, h = _(() => f(s.resolved, {
92
+ }), { itemValue: c, itemLabel: l, itemDisabled: u, itemGroup: d, itemKeywords: f, valueKey: m } = r, h = v(() => p(s.resolved, {
93
93
  itemValue: c,
94
94
  itemLabel: l,
95
95
  itemDisabled: u,
96
96
  itemGroup: d,
97
- itemKeywords: p,
97
+ itemKeywords: f,
98
98
  valueKey: m
99
99
  }), [
100
100
  s.resolved,
@@ -102,7 +102,7 @@ function D({ items: t, source: n, accessors: r, pageSize: i, minSearchLength: a
102
102
  l,
103
103
  u,
104
104
  d,
105
- p,
105
+ f,
106
106
  m
107
107
  ]), g = o.dataSource;
108
108
  return {
@@ -121,13 +121,13 @@ function D({ items: t, source: n, accessors: r, pageSize: i, minSearchLength: a
121
121
  }
122
122
  //#endregion
123
123
  //#region src/components/Select/list.tsx
124
- function O(e, t, n = "") {
125
- let { contains: r } = b({
124
+ function k(e, t, n = "") {
125
+ let { contains: r } = x({
126
126
  sensitivity: "base",
127
127
  usage: "sort"
128
- }), { itemValue: i, itemLabel: s, itemDisabled: c, itemGroup: l, itemKeywords: u, valueKey: d } = t, p = _(() => f(e, {
128
+ }), { itemValue: i, itemLabel: a, itemDisabled: c, itemGroup: l, itemKeywords: u, valueKey: d } = t, f = v(() => p(e, {
129
129
  itemValue: i,
130
- itemLabel: s,
130
+ itemLabel: a,
131
131
  itemDisabled: c,
132
132
  itemGroup: l,
133
133
  itemKeywords: u,
@@ -135,102 +135,109 @@ function O(e, t, n = "") {
135
135
  }), [
136
136
  e,
137
137
  i,
138
- s,
138
+ a,
139
139
  c,
140
140
  l,
141
141
  u,
142
142
  d
143
- ]), m = _(() => a(p, n, r), [
144
- p,
143
+ ]), m = v(() => o(f, n, r), [
144
+ f,
145
145
  n,
146
146
  r
147
- ]), h = _(() => o(m), [m]);
147
+ ]), h = v(() => s(m), [m]);
148
148
  return {
149
- options: p,
149
+ options: f,
150
150
  visible: m,
151
151
  groups: h,
152
- ordered: _(() => h.flatMap((e) => e.options), [h]),
153
- firstFor: (e) => o(a(p, e, r)).flatMap((e) => e.options).find((e) => !e.disabled)
152
+ ordered: v(() => h.flatMap((e) => e.options), [h]),
153
+ firstFor: (e) => s(o(f, e, r)).flatMap((e) => e.options).find((e) => !e.disabled)
154
154
  };
155
155
  }
156
- function k({ multiple: e, value: t, defaultValue: n, accessors: r, items: i, onChange: a }) {
157
- let [o, s] = y(n ?? (e ? [] : null)), [c, f] = y([]), p = t === void 0 ? o : t, m = u(e ? p ?? [] : d(p, i), l(i, c), r), h = m.map((e) => e.key);
158
- function g(t) {
159
- f(t);
156
+ function A({ multiple: e, value: t, defaultValue: n, accessors: i, items: a, onChange: o, check: s }) {
157
+ let [c, l] = b(n ?? (e ? [] : null)), [p, m] = b([]), h = t === void 0 ? c : t, g = d(e ? h ?? [] : f(h, a), u(a, p), i), v = g.map((e) => e.key), y = g.filter((e) => e.unknown).map((e) => e.key).join();
158
+ _(() => {
159
+ s?.ready && y && r(s.component, g);
160
+ }, [
161
+ s?.ready,
162
+ s?.component,
163
+ y
164
+ ]);
165
+ function x(t) {
166
+ m(t);
160
167
  let n = t.map((e) => e.value), r = e ? n : n[0] ?? null;
161
- s(r), a?.(r);
168
+ l(r), o?.(r);
162
169
  }
163
- function _(e, t = []) {
164
- let n = l(i, t, m);
165
- g(e.map((e) => n.get(e)).filter((e) => e !== void 0));
170
+ function S(e, t = []) {
171
+ let n = u(a, t, g);
172
+ x(e.map((e) => n.get(e)).filter((e) => e !== void 0));
166
173
  }
167
174
  return {
168
- selected: m,
169
- keys: h,
170
- commit: g,
171
- commitKeys: _
175
+ selected: g,
176
+ keys: v,
177
+ commit: x,
178
+ commitKeys: S
172
179
  };
173
180
  }
174
- function A({ active: e, count: t, onLoad: n, className: r }) {
175
- let i = v(null), a = v(n);
176
- return g(() => {
181
+ function j({ active: e, count: t, onLoad: n, className: r }) {
182
+ let i = y(null), a = y(n);
183
+ return _(() => {
177
184
  a.current = n;
178
- }), g(() => {
185
+ }), _(() => {
179
186
  let t = i.current;
180
187
  if (!e || !t || typeof IntersectionObserver > "u") return;
181
188
  let n = new IntersectionObserver((e) => {
182
189
  e.some((e) => e.isIntersecting) && a.current();
183
190
  });
184
191
  return n.observe(t), () => n.disconnect();
185
- }, [e, t]), /* @__PURE__ */ S("div", {
192
+ }, [e, t]), /* @__PURE__ */ C("div", {
186
193
  ref: i,
187
194
  className: r,
188
195
  "aria-hidden": "true"
189
196
  });
190
197
  }
191
- function j({ parts: e, option: t, classes: n, checkbox: r, renderItem: i, noIndicator: a, draggable: o }) {
198
+ function M({ parts: e, option: t, classes: n, checkbox: r, renderItem: i, noIndicator: a, draggable: o }) {
192
199
  let { Item: s, ItemText: c, ItemIndicator: l, ItemContext: u } = e, d = t.icon;
193
- return /* @__PURE__ */ C(s, {
200
+ return /* @__PURE__ */ w(s, {
194
201
  item: t,
195
202
  className: n.item,
196
203
  "data-description": t.description ? "" : void 0,
197
204
  draggable: o && !t.disabled ? "true" : void 0,
198
205
  children: [
199
- r && /* @__PURE__ */ S(u, { children: (e) => /* @__PURE__ */ S("span", {
206
+ r && /* @__PURE__ */ C(u, { children: (e) => /* @__PURE__ */ C("span", {
200
207
  className: n.check,
201
208
  "data-state": e.selected ? "checked" : "unchecked",
202
209
  "aria-hidden": "true",
203
- children: e.selected && /* @__PURE__ */ S(p, { className: n.checkIcon })
210
+ children: e.selected && /* @__PURE__ */ C(m, { className: n.checkIcon })
204
211
  }) }),
205
- i ? /* @__PURE__ */ S(u, { children: (e) => i(t.item, {
212
+ i ? /* @__PURE__ */ C(u, { children: (e) => i(t.item, {
206
213
  selected: e.selected,
207
214
  highlighted: e.highlighted,
208
215
  disabled: e.disabled
209
- }) }) : /* @__PURE__ */ C(x, { children: [d && /* @__PURE__ */ S(d, {
216
+ }) }) : /* @__PURE__ */ w(S, { children: [d && /* @__PURE__ */ C(d, {
210
217
  className: n.icon,
211
218
  "aria-hidden": "true"
212
- }), t.description ? /* @__PURE__ */ C("span", {
219
+ }), t.description ? /* @__PURE__ */ w("span", {
213
220
  className: n.itemBody,
214
- children: [/* @__PURE__ */ S(c, {
221
+ children: [/* @__PURE__ */ C(c, {
215
222
  className: n.itemText,
216
223
  children: t.label
217
- }), /* @__PURE__ */ S("span", {
224
+ }), /* @__PURE__ */ C("span", {
218
225
  className: n.itemDescription,
219
226
  children: t.description
220
227
  })]
221
- }) : /* @__PURE__ */ S(c, {
228
+ }) : /* @__PURE__ */ C(c, {
222
229
  className: n.itemText,
223
230
  children: t.label
224
231
  })] }),
225
- !r && !a && /* @__PURE__ */ S(l, { children: /* @__PURE__ */ S(p, {
232
+ !r && !a && /* @__PURE__ */ C(l, { children: /* @__PURE__ */ C(m, {
226
233
  className: n.itemIndicator,
227
234
  "aria-hidden": "true"
228
235
  }) })
229
236
  ]
230
237
  });
231
238
  }
232
- function M({ parts: e, groups: t, classes: n, checkbox: r, noIndicator: i, draggable: a, loading: o, loadingText: s, hasMore: c, onLoadMore: l, emptyText: u, renderItem: d }) {
233
- let { ItemGroup: f, ItemGroupLabel: p } = e, g = (t) => /* @__PURE__ */ S(j, {
239
+ function N({ parts: e, groups: t, classes: n, checkbox: r, noIndicator: i, draggable: a, loading: o, loadingText: s, hasMore: c, onLoadMore: l, emptyText: u, renderItem: d }) {
240
+ let { ItemGroup: f, ItemGroupLabel: p } = e, m = (t) => /* @__PURE__ */ C(M, {
234
241
  parts: e,
235
242
  option: t,
236
243
  classes: n,
@@ -239,28 +246,28 @@ function M({ parts: e, groups: t, classes: n, checkbox: r, noIndicator: i, dragg
239
246
  draggable: a,
240
247
  renderItem: d
241
248
  }, t.key);
242
- return /* @__PURE__ */ C(x, { children: [
243
- t.map((e, t) => e.label === void 0 ? /* @__PURE__ */ S(h, { children: e.options.map(g) }, `#${t}`) : /* @__PURE__ */ C(f, {
249
+ return /* @__PURE__ */ w(S, { children: [
250
+ t.map((e, t) => e.label === void 0 ? /* @__PURE__ */ C(g, { children: e.options.map(m) }, `#${t}`) : /* @__PURE__ */ w(f, {
244
251
  className: n.group,
245
- children: [/* @__PURE__ */ S(p, {
252
+ children: [/* @__PURE__ */ C(p, {
246
253
  className: n.groupLabel,
247
254
  children: e.label
248
- }), e.options.map(g)]
255
+ }), e.options.map(m)]
249
256
  }, e.label)),
250
- u !== void 0 && !o && !t.length && /* @__PURE__ */ S("div", {
257
+ u !== void 0 && !o && !t.length && /* @__PURE__ */ C("div", {
251
258
  role: "option",
252
259
  "aria-disabled": "true",
253
260
  className: n.empty,
254
261
  children: u
255
262
  }),
256
- o && /* @__PURE__ */ C("div", {
263
+ o && /* @__PURE__ */ w("div", {
257
264
  className: n.loading,
258
- children: [/* @__PURE__ */ S(m, {
265
+ children: [/* @__PURE__ */ C(h, {
259
266
  className: n.loadingIcon,
260
267
  "aria-hidden": "true"
261
268
  }), s]
262
269
  }),
263
- c && /* @__PURE__ */ S(A, {
270
+ c && /* @__PURE__ */ C(j, {
264
271
  className: n.sentinel,
265
272
  active: !o,
266
273
  count: t.reduce((e, t) => e + t.options.length, 0),
@@ -268,28 +275,28 @@ function M({ parts: e, groups: t, classes: n, checkbox: r, noIndicator: i, dragg
268
275
  })
269
276
  ] });
270
277
  }
271
- function N(e) {
278
+ function P(e) {
272
279
  e.target.closest("[draggable=\"true\"]") && e.stopPropagation();
273
280
  }
274
281
  //#endregion
275
282
  //#region src/components/Highlight/Highlight.tsx
276
- function P({ classes: e, text: n, query: r, ignoreCase: i = !0, matchAll: a = !0, wholeWord: o = !1, ignoreAccents: l = !1, colors: u }) {
277
- let d = t("highlight", s, e);
278
- return !o && !l && !u?.length ? /* @__PURE__ */ S(w, {
283
+ function F({ classes: e, text: n, query: r, ignoreCase: i = !0, matchAll: a = !0, wholeWord: o = !1, ignoreAccents: s = !1, colors: u }) {
284
+ let d = t("highlight", c, e);
285
+ return !o && !s && !u?.length ? /* @__PURE__ */ C(T, {
279
286
  text: n,
280
287
  query: r,
281
288
  ignoreCase: i,
282
289
  matchAll: a,
283
290
  className: d()
284
- }) : /* @__PURE__ */ S(x, { children: c(n, r, {
291
+ }) : /* @__PURE__ */ C(S, { children: l(n, r, {
285
292
  ignoreCase: i,
286
293
  matchAll: a,
287
294
  wholeWord: o,
288
- ignoreAccents: l
289
- }).map((e, t) => e.match ? /* @__PURE__ */ S("mark", {
295
+ ignoreAccents: s
296
+ }).map((e, t) => e.match ? /* @__PURE__ */ C("mark", {
290
297
  className: d({ color: u?.[e.term ?? 0] }),
291
298
  children: e.text
292
- }, t) : /* @__PURE__ */ S(h, { children: e.text }, t)) });
299
+ }, t) : /* @__PURE__ */ C(g, { children: e.text }, t)) });
293
300
  }
294
301
  //#endregion
295
- export { O as a, D as c, N as i, M as n, k as o, A as r, E as s, P as t };
302
+ export { k as a, O as c, P as i, N as n, A as o, j as r, D as s, F as t };
@@ -0,0 +1,120 @@
1
+ "use client";
2
+ import { a as e, n as t } from "./RecipesProvider-0idafuGm.js";
3
+ import { r as n, t as r } from "./InputStatus-hVzkU_4q.js";
4
+ import { buttonColorKey as i, formatCount as a, iconButton as o, input as s, setTextControlValue as c, spinner as l } from "@wirecore/wirelayer-recipes";
5
+ import { CircleAlert as u, LoaderCircle as d } from "lucide-react";
6
+ import { useId as f, useRef as p, useState as m } from "react";
7
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
8
+ import { Field as _, useFieldContext as v } from "@ark-ui/react/field";
9
+ //#region src/components/IconButton/IconButton.tsx
10
+ function y({ classes: e, icon: n, iconProps: r, label: s, variant: c, color: u, size: f, shape: p, disabled: m = !1, loading: _ = !1, type: v = "button", badge: y = !1, badgeLabel: b = (e) => e === null ? "new" : `${e} new`, className: x, onClick: S, ...C }) {
11
+ let w = t("iconButton", o, e), T = t("spinner", l), E = w({
12
+ variant: c,
13
+ color: i(u),
14
+ size: f,
15
+ shape: p
16
+ }), D = typeof y == "number" && y > 0 ? y : 0, O = D ? `${s}, ${b(a(D))}` : y === !0 ? `${s}, ${b(null)}` : s;
17
+ return /* @__PURE__ */ g("button", {
18
+ ...C,
19
+ className: E.base({ class: x }),
20
+ type: v,
21
+ disabled: m,
22
+ "aria-label": O,
23
+ ..._ ? {
24
+ "aria-disabled": !0,
25
+ "aria-busy": !0
26
+ } : {},
27
+ onClick: (e) => {
28
+ _ ? e.preventDefault() : S?.(e);
29
+ },
30
+ children: [_ ? /* @__PURE__ */ h(d, {
31
+ className: T().icon({ class: E.icon() }),
32
+ "aria-hidden": "true"
33
+ }) : /* @__PURE__ */ h(n, {
34
+ ...r,
35
+ className: E.icon(),
36
+ "aria-hidden": "true"
37
+ }), D ? /* @__PURE__ */ h("span", {
38
+ className: E.badge(),
39
+ "aria-hidden": "true",
40
+ children: a(D)
41
+ }) : y === !0 && /* @__PURE__ */ h("span", {
42
+ className: E.dot(),
43
+ "aria-hidden": "true"
44
+ })]
45
+ });
46
+ }
47
+ //#endregion
48
+ //#region src/components/Input/Input.tsx
49
+ function b({ classes: i, size: a, invalid: o = !1, success: l = !1, loading: d = !1, clearable: y = !1, clearLabel: b, disabled: x = !1, leadingIcon: S, prefix: C, suffix: w, mono: T = !1, className: E, style: D, onChange: O, ...k }) {
50
+ let A = t("input", s, i), j = e(), M = v(), N = n(), P = o || !!M?.invalid, F = !P && (l || N.success), I = x || !!M?.disabled, L = !!k.readOnly || !!M?.readOnly, R = A({
51
+ size: a,
52
+ invalid: P,
53
+ success: F,
54
+ disabled: I,
55
+ hasIcon: !!S,
56
+ hasStatusIcon: P || F || d || y,
57
+ mono: T
58
+ }), [z, B] = m(() => String(k.defaultValue ?? "") !== ""), V = k.value === void 0 ? z : String(k.value ?? "") !== "", H = p(null), U = () => {
59
+ let e = H.current?.querySelector("input");
60
+ e && (c(e), e.focus());
61
+ }, W = f(), G = f(), K = [
62
+ M?.ariaDescribedby,
63
+ C && W,
64
+ w && G,
65
+ k["aria-describedby"]
66
+ ].filter(Boolean).join(" ") || void 0;
67
+ return /* @__PURE__ */ g("div", {
68
+ ref: H,
69
+ className: R.base({ class: E }),
70
+ style: D,
71
+ "data-invalid": P || void 0,
72
+ "data-disabled": I || void 0,
73
+ children: [
74
+ C && /* @__PURE__ */ h("span", {
75
+ id: W,
76
+ className: R.prefix(),
77
+ children: C
78
+ }),
79
+ S && /* @__PURE__ */ h(S, {
80
+ className: R.icon(),
81
+ "aria-hidden": "true"
82
+ }),
83
+ /* @__PURE__ */ h(_.Input, {
84
+ ...k,
85
+ className: R.control(),
86
+ disabled: I || void 0,
87
+ "aria-invalid": P || void 0,
88
+ "aria-describedby": K,
89
+ "aria-busy": d || void 0,
90
+ onChange: (e) => {
91
+ B(e.currentTarget.value !== ""), O?.(e);
92
+ }
93
+ }),
94
+ (d || y || F) && /* @__PURE__ */ h(r, {
95
+ loading: d,
96
+ clear: y && V && !I && !L,
97
+ clearLabel: b ?? j.field.clear,
98
+ onClear: U,
99
+ success: F,
100
+ classes: {
101
+ spinner: R.spinner(),
102
+ clear: R.clear(),
103
+ clearIcon: R.clearIcon(),
104
+ statusIcon: R.statusIcon()
105
+ }
106
+ }),
107
+ P && /* @__PURE__ */ h(u, {
108
+ className: R.statusIcon(),
109
+ "aria-hidden": "true"
110
+ }),
111
+ w && /* @__PURE__ */ h("span", {
112
+ id: G,
113
+ className: R.suffix(),
114
+ children: w
115
+ })
116
+ ]
117
+ });
118
+ }
119
+ //#endregion
120
+ export { y as n, b as t };