@wirecore/wirelayer-react 0.3.1 → 0.5.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 (183) hide show
  1. package/README.md +4 -0
  2. package/dist/ContextMenu-qh-bB9Lw.js +1426 -0
  3. package/dist/chart/ChartCanvas.d.ts +1 -1
  4. package/dist/chart/ChartCanvas.d.ts.map +1 -1
  5. package/dist/chart/PieChart.d.ts +1 -1
  6. package/dist/chart/PieChart.d.ts.map +1 -1
  7. package/dist/chart/Sparkline.d.ts +1 -1
  8. package/dist/chart/Sparkline.d.ts.map +1 -1
  9. package/dist/chart/WaterfallChart.d.ts +1 -1
  10. package/dist/chart/WaterfallChart.d.ts.map +1 -1
  11. package/dist/chart/types.d.ts +3 -3
  12. package/dist/chart/types.d.ts.map +1 -1
  13. package/dist/code/CodeHighlight.d.ts +4 -4
  14. package/dist/code/CodeHighlight.d.ts.map +1 -1
  15. package/dist/code/CodeHighlightTabs.d.ts +3 -3
  16. package/dist/code/CodeHighlightTabs.d.ts.map +1 -1
  17. package/dist/code/InlineCode.d.ts +1 -1
  18. package/dist/code/InlineCode.d.ts.map +1 -1
  19. package/dist/components/AngleSlider/AngleSlider.d.ts +1 -1
  20. package/dist/components/AngleSlider/AngleSlider.d.ts.map +1 -1
  21. package/dist/components/AppShell/AppShell.d.ts +1 -1
  22. package/dist/components/AppShell/AppShell.d.ts.map +1 -1
  23. package/dist/components/Avatar/Avatar.d.ts +4 -1
  24. package/dist/components/Avatar/Avatar.d.ts.map +1 -1
  25. package/dist/components/BarsList/BarsList.d.ts +1 -1
  26. package/dist/components/BarsList/BarsList.d.ts.map +1 -1
  27. package/dist/components/BottomNavigation/BottomNavigation.d.ts +5 -3
  28. package/dist/components/BottomNavigation/BottomNavigation.d.ts.map +1 -1
  29. package/dist/components/Breadcrumb/Breadcrumb.d.ts +1 -1
  30. package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
  31. package/dist/components/BulletChart/BulletChart.d.ts +1 -1
  32. package/dist/components/BulletChart/BulletChart.d.ts.map +1 -1
  33. package/dist/components/Calendar/Calendar.d.ts +3 -3
  34. package/dist/components/Calendar/Calendar.d.ts.map +1 -1
  35. package/dist/components/Carousel/Carousel.d.ts +2 -2
  36. package/dist/components/Carousel/Carousel.d.ts.map +1 -1
  37. package/dist/components/CascadeSelect/CascadeSelect.d.ts +1 -1
  38. package/dist/components/CascadeSelect/CascadeSelect.d.ts.map +1 -1
  39. package/dist/components/Chat/ChatMessage.d.ts +1 -1
  40. package/dist/components/Chat/ChatMessage.d.ts.map +1 -1
  41. package/dist/components/Chat/ChatMessages.d.ts +1 -1
  42. package/dist/components/Chat/ChatMessages.d.ts.map +1 -1
  43. package/dist/components/Chat/ChatSources.d.ts +1 -1
  44. package/dist/components/Chat/ChatSources.d.ts.map +1 -1
  45. package/dist/components/ColorInput/ColorInput.d.ts +1 -1
  46. package/dist/components/ColorInput/ColorInput.d.ts.map +1 -1
  47. package/dist/components/ColorPicker/ColorPicker.d.ts +1 -1
  48. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  49. package/dist/components/ColorPicker/ColorPickerContent.d.ts +1 -1
  50. package/dist/components/ColorPicker/ColorPickerContent.d.ts.map +1 -1
  51. package/dist/components/ColorSwatchPicker/ColorSwatchPicker.d.ts +1 -1
  52. package/dist/components/ColorSwatchPicker/ColorSwatchPicker.d.ts.map +1 -1
  53. package/dist/components/CommandPalette/CommandPalette.d.ts +2 -2
  54. package/dist/components/CommandPalette/CommandPalette.d.ts.map +1 -1
  55. package/dist/components/ContextMenu/ContextMenu.d.ts +1 -1
  56. package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
  57. package/dist/components/Countdown/Countdown.d.ts +1 -1
  58. package/dist/components/Countdown/Countdown.d.ts.map +1 -1
  59. package/dist/components/DataView/DataView.d.ts +2 -2
  60. package/dist/components/DataView/DataView.d.ts.map +1 -1
  61. package/dist/components/DatePicker/DatePicker.d.ts +2 -2
  62. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  63. package/dist/components/DatePicker/DatePickerBase.d.ts +3 -3
  64. package/dist/components/DatePicker/DatePickerBase.d.ts.map +1 -1
  65. package/dist/components/DatePicker/dates.d.ts +1 -1
  66. package/dist/components/DatePicker/dates.d.ts.map +1 -1
  67. package/dist/components/DateRangePicker/DateRangePicker.d.ts +2 -2
  68. package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  69. package/dist/components/Descriptions/Descriptions.d.ts +1 -1
  70. package/dist/components/Descriptions/Descriptions.d.ts.map +1 -1
  71. package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -1
  72. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  73. package/dist/components/FilterPanel/FilterPanel.d.ts +2 -2
  74. package/dist/components/FilterPanel/FilterPanel.d.ts.map +1 -1
  75. package/dist/components/FormErrorSummary/FormErrorSummary.d.ts +1 -1
  76. package/dist/components/FormErrorSummary/FormErrorSummary.d.ts.map +1 -1
  77. package/dist/components/Funnel/Funnel.d.ts +1 -1
  78. package/dist/components/Funnel/Funnel.d.ts.map +1 -1
  79. package/dist/components/Gallery/Gallery.d.ts +2 -2
  80. package/dist/components/Gallery/Gallery.d.ts.map +1 -1
  81. package/dist/components/Gallery/Lightbox.d.ts +1 -1
  82. package/dist/components/Gallery/Lightbox.d.ts.map +1 -1
  83. package/dist/components/Gantt/Gantt.d.ts +2 -2
  84. package/dist/components/Gantt/Gantt.d.ts.map +1 -1
  85. package/dist/components/Heatmap/Heatmap.d.ts +1 -1
  86. package/dist/components/Heatmap/Heatmap.d.ts.map +1 -1
  87. package/dist/components/Highlight/Highlight.d.ts +1 -1
  88. package/dist/components/Highlight/Highlight.d.ts.map +1 -1
  89. package/dist/components/MegaMenu/MegaMenu.d.ts +16 -6
  90. package/dist/components/MegaMenu/MegaMenu.d.ts.map +1 -1
  91. package/dist/components/Mentions/Mentions.d.ts +1 -1
  92. package/dist/components/Mentions/Mentions.d.ts.map +1 -1
  93. package/dist/components/Menu/Menu.d.ts +16 -9
  94. package/dist/components/Menu/Menu.d.ts.map +1 -1
  95. package/dist/components/Menubar/Menubar.d.ts +2 -2
  96. package/dist/components/Menubar/Menubar.d.ts.map +1 -1
  97. package/dist/components/MeterGroup/MeterGroup.d.ts +1 -1
  98. package/dist/components/MeterGroup/MeterGroup.d.ts.map +1 -1
  99. package/dist/components/NativeSelect/NativeSelect.d.ts +1 -1
  100. package/dist/components/NativeSelect/NativeSelect.d.ts.map +1 -1
  101. package/dist/components/NavigationMenu/NavigationMenu.d.ts +1 -1
  102. package/dist/components/NavigationMenu/NavigationMenu.d.ts.map +1 -1
  103. package/dist/components/NotificationCenter/NotificationCenter.d.ts +1 -1
  104. package/dist/components/NotificationCenter/NotificationCenter.d.ts.map +1 -1
  105. package/dist/components/Pagination/Pagination.d.ts +1 -1
  106. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  107. package/dist/components/PasswordInput/PasswordInput.d.ts +1 -1
  108. package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -1
  109. package/dist/components/PhoneInput/PhoneInput.d.ts +1 -1
  110. package/dist/components/PhoneInput/PhoneInput.d.ts.map +1 -1
  111. package/dist/components/Popover/Popover.d.ts +5 -1
  112. package/dist/components/Popover/Popover.d.ts.map +1 -1
  113. package/dist/components/Progress/Progress.d.ts +1 -1
  114. package/dist/components/Progress/Progress.d.ts.map +1 -1
  115. package/dist/components/RadialBar/RadialBar.d.ts +1 -1
  116. package/dist/components/RadialBar/RadialBar.d.ts.map +1 -1
  117. package/dist/components/RingProgress/RingProgress.d.ts +1 -1
  118. package/dist/components/RingProgress/RingProgress.d.ts.map +1 -1
  119. package/dist/components/Sankey/Sankey.d.ts +2 -2
  120. package/dist/components/Sankey/Sankey.d.ts.map +1 -1
  121. package/dist/components/Scheduler/Scheduler.d.ts +4 -4
  122. package/dist/components/Scheduler/Scheduler.d.ts.map +1 -1
  123. package/dist/components/SearchField/SearchField.d.ts +2 -2
  124. package/dist/components/SearchField/SearchField.d.ts.map +1 -1
  125. package/dist/components/Select/list.d.ts +2 -2
  126. package/dist/components/Select/list.d.ts.map +1 -1
  127. package/dist/components/SidebarNav/SidebarNav.d.ts +1 -1
  128. package/dist/components/SidebarNav/SidebarNav.d.ts.map +1 -1
  129. package/dist/components/SkipLinks/SkipLinks.d.ts +1 -1
  130. package/dist/components/SkipLinks/SkipLinks.d.ts.map +1 -1
  131. package/dist/components/Slider/Slider.d.ts +1 -1
  132. package/dist/components/Slider/Slider.d.ts.map +1 -1
  133. package/dist/components/SpeedDial/SpeedDial.d.ts +1 -1
  134. package/dist/components/SpeedDial/SpeedDial.d.ts.map +1 -1
  135. package/dist/components/SplitButton/SplitButton.d.ts +1 -1
  136. package/dist/components/SplitButton/SplitButton.d.ts.map +1 -1
  137. package/dist/components/Splitter/Splitter.d.ts +1 -1
  138. package/dist/components/Splitter/Splitter.d.ts.map +1 -1
  139. package/dist/components/Stepper/Stepper.d.ts +1 -1
  140. package/dist/components/Stepper/Stepper.d.ts.map +1 -1
  141. package/dist/components/Steps/Steps.d.ts +1 -1
  142. package/dist/components/Steps/Steps.d.ts.map +1 -1
  143. package/dist/components/TableOfContents/TableOfContents.d.ts +1 -1
  144. package/dist/components/TableOfContents/TableOfContents.d.ts.map +1 -1
  145. package/dist/components/TimeGrid/TimeGrid.d.ts +1 -1
  146. package/dist/components/TimeGrid/TimeGrid.d.ts.map +1 -1
  147. package/dist/components/TimePicker/TimePicker.d.ts +1 -1
  148. package/dist/components/TimePicker/TimePicker.d.ts.map +1 -1
  149. package/dist/components/Timeline/Timeline.d.ts +1 -1
  150. package/dist/components/Timeline/Timeline.d.ts.map +1 -1
  151. package/dist/components/TopBar/TopBar.d.ts +16 -0
  152. package/dist/components/TopBar/TopBar.d.ts.map +1 -0
  153. package/dist/components/Tour/Tour.d.ts +1 -1
  154. package/dist/components/Tour/Tour.d.ts.map +1 -1
  155. package/dist/components/Tree/Tree.d.ts +1 -1
  156. package/dist/components/Tree/Tree.d.ts.map +1 -1
  157. package/dist/components/Tree/useTree.d.ts +1 -1
  158. package/dist/components/Tree/useTree.d.ts.map +1 -1
  159. package/dist/components/TreeSelect/TreeSelect.d.ts +1 -1
  160. package/dist/components/TreeSelect/TreeSelect.d.ts.map +1 -1
  161. package/dist/components/Treemap/Treemap.d.ts +1 -1
  162. package/dist/components/Treemap/Treemap.d.ts.map +1 -1
  163. package/dist/components/Wizard/Wizard.d.ts +1 -1
  164. package/dist/components/Wizard/Wizard.d.ts.map +1 -1
  165. package/dist/data-table/DataTable.d.ts +5 -5
  166. package/dist/data-table/DataTable.d.ts.map +1 -1
  167. package/dist/data-table/FilterMenu.d.ts +1 -1
  168. package/dist/data-table/FilterMenu.d.ts.map +1 -1
  169. package/dist/data-table/types.d.ts +4 -4
  170. package/dist/data-table/types.d.ts.map +1 -1
  171. package/dist/data-table.js +2 -2
  172. package/dist/form/bind.d.ts +6 -2
  173. package/dist/form/bind.d.ts.map +1 -1
  174. package/dist/index.d.ts +1 -0
  175. package/dist/index.d.ts.map +1 -1
  176. package/dist/index.js +1774 -1732
  177. package/dist/sources/TopBar.css +2 -0
  178. package/dist/virtual/VirtualList.d.ts +1 -1
  179. package/dist/virtual/VirtualList.d.ts.map +1 -1
  180. package/llms-full.txt +6215 -0
  181. package/llms.txt +311 -0
  182. package/package.json +7 -5
  183. package/dist/ContextMenu-DhwlmI1V.js +0 -1419
@@ -0,0 +1,1426 @@
1
+ "use client";
2
+ import { a as e, i as t, n } from "./RecipesProvider-0idafuGm.js";
3
+ import { r, t as i } from "./InputStatus-DS38XEkX.js";
4
+ import { t as a } from "./Input-OPRvjIYt.js";
5
+ import { t as o } from "./Select-PbxrUYi1.js";
6
+ import { a as s, c, n as l, o as u } from "./Highlight-DdTridk2.js";
7
+ import { SUBMENU_GUTTER as d, allListOptionsState as f, anchorBox as p, createLongPress as m, datePicker as h, defaultNumberFormat as g, filterMenuEntries as _, fromWallIso as v, highlightFirstMenuItem as y, indexListOptions as b, insertIntoTextControl as x, isoWeekday as S, linkTarget as C, localeWeekInfo as w, menu as T, menuSearchKey as E, multiSelect as D, numberInput as ee, numberInputKey as O, pageForSize as k, pagination as A, parseLocaleNumber as j, parsePastedDate as te, parsePastedRange as M, pluralText as N, rowWeekNumber as P, setTextControlValue as ne, skeleton as F, textarea as re, textareaParts as I, timeSlots as ie, timeZoneLabel as ae, timeZoneLongLabel as oe, toNumberInputValue as se, toOverlayAnchor as ce, toWallIso as le, todayIso as ue, toggleAllListOptions as L, zonedToInstant as R } from "@wirecore/wirelayer-recipes";
8
+ import { CalendarDays as de, Check as fe, ChevronDown as pe, ChevronLeft as z, ChevronRight as B, ChevronUp as V, ChevronsLeft as H, ChevronsRight as me, Circle as he, LoaderCircle as ge, Minus as _e, Plus as ve, X as ye } from "lucide-react";
9
+ import { Fragment as U, createContext as be, createElement as xe, useContext as Se, useEffect as Ce, useId as we, useImperativeHandle as Te, useLayoutEffect as Ee, useMemo as De, useRef as W, useState as G } from "react";
10
+ import { useFilter as K } from "@ark-ui/react/locale";
11
+ import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
12
+ import { Menu as X } from "@ark-ui/react/menu";
13
+ import { Portal as Oe } from "@ark-ui/react/portal";
14
+ import { Field as ke, useFieldContext as Ae } from "@ark-ui/react/field";
15
+ import { Pagination as Z } from "@ark-ui/react/pagination";
16
+ import { createListCollection as je } from "@ark-ui/react/collection";
17
+ import { Select as Q } from "@ark-ui/react/select";
18
+ import { DatePicker as $, useDatePickerContext as Me } from "@ark-ui/react/date-picker";
19
+ import { DateInput as Ne } from "@ark-ui/react/date-input";
20
+ import { CalendarDateTime as Pe, DateFormatter as Fe, Time as Ie, parseDate as Le, parseDateTime as Re, toCalendarDateTime as ze } from "@internationalized/date";
21
+ import { NumberInput as Be } from "@ark-ui/react/number-input";
22
+ //#region src/overlay.ts
23
+ var Ve = (e) => e && "current" in e ? e.current : e ?? null, He = typeof document > "u" ? Ce : Ee;
24
+ function Ue(e) {
25
+ let [t, n] = G(e.defaultOpen ?? !1), [r, i] = G(null), a = e.open ?? t, o = r ?? Ve(e.anchor), s = W(null), c = W(!1);
26
+ c.current = !!o;
27
+ let l = W(a);
28
+ He(() => {
29
+ if (l.current !== a) {
30
+ if (l.current = a, a) s.current = document.activeElement;
31
+ else if (e.restoreFocus) {
32
+ let e = s.current, t = () => {
33
+ if (l.current) return;
34
+ let t = document.activeElement;
35
+ (!t || t === document.body || !t.isConnected || t.closest("[data-scope=menu]")) && e?.focus();
36
+ };
37
+ requestAnimationFrame(() => {
38
+ t(), setTimeout(t, 50);
39
+ });
40
+ }
41
+ }
42
+ }, [a]);
43
+ let u = (t) => {
44
+ n(t), e.onOpenChange?.(t);
45
+ }, d = (e) => {
46
+ e && i(null), u(e);
47
+ }, f = {
48
+ open(e) {
49
+ i(ce(e)), u(!0);
50
+ },
51
+ close: () => u(!1),
52
+ toggle(e) {
53
+ a ? f.close() : f.open(e);
54
+ }
55
+ };
56
+ return Te(e.ref, () => f), {
57
+ isOpen: a,
58
+ anchor: o,
59
+ anchorPoint: o && !("getBoundingClientRect" in o) ? o : void 0,
60
+ onOpenChange: d,
61
+ handle: f,
62
+ positioning: (e) => o ? "getBoundingClientRect" in o ? {
63
+ ...e,
64
+ getAnchorElement: () => o
65
+ } : {
66
+ ...e,
67
+ getAnchorRect: () => p(o)
68
+ } : e,
69
+ finalFocusEl: () => c.current ? s.current : null
70
+ };
71
+ }
72
+ //#endregion
73
+ //#region src/components/Menu/Menu.tsx
74
+ var We = be(null);
75
+ function Ge(e) {
76
+ let [t, n] = G({
77
+ items: e.items,
78
+ checked: {},
79
+ radio: {}
80
+ }), r = t.items === e.items ? t : {
81
+ items: e.items,
82
+ checked: {},
83
+ radio: {}
84
+ };
85
+ return r !== t && n(r), {
86
+ checked: (e) => r.checked[e.value] ?? e.checked ?? !1,
87
+ setChecked: (t, i) => {
88
+ n({
89
+ ...r,
90
+ checked: {
91
+ ...r.checked,
92
+ [t.value]: i
93
+ }
94
+ }), e.onCheckedChange?.(t.value, i);
95
+ },
96
+ radio: (e) => r.radio[e.name] ?? e.value,
97
+ setRadio: (t, i) => {
98
+ n({
99
+ ...r,
100
+ radio: {
101
+ ...r.radio,
102
+ [t.name]: i
103
+ }
104
+ }), e.onValueChange?.(t.name, i);
105
+ },
106
+ linkAs: e.linkAs ?? "a",
107
+ renderItem: e.renderItem
108
+ };
109
+ }
110
+ function Ke({ children: e, ...t }) {
111
+ return /* @__PURE__ */ J(We.Provider, {
112
+ value: Ge(t),
113
+ children: e
114
+ });
115
+ }
116
+ function qe({ classes: t, items: r, onSelect: i, onCheckedChange: a, onValueChange: o, linkAs: s, renderItem: c, open: l, defaultOpen: u, onOpenChange: d, anchor: f, searchable: p, searchLabel: m, placement: h = "bottom-start", arrow: g, ref: v, children: b }) {
117
+ let x = n("menu", T, t)(), S = e(), C = Ue({
118
+ open: l,
119
+ defaultOpen: u,
120
+ anchor: f,
121
+ onOpenChange: d,
122
+ ref: v,
123
+ restoreFocus: !0
124
+ }), [w, D] = G(""), [ee, O] = G(), k = K({
125
+ sensitivity: "base",
126
+ usage: "sort"
127
+ }), A = p && w ? _(r, (e) => k.contains(e, w)) : r, j = W(null), [te, M] = G(C.isOpen);
128
+ te !== C.isOpen && (M(C.isOpen), D(""), O(void 0)), Ce(() => {
129
+ if (!C.isOpen || !p) return;
130
+ let e = requestAnimationFrame(() => {
131
+ e = requestAnimationFrame(() => j.current?.focus());
132
+ });
133
+ return () => cancelAnimationFrame(e);
134
+ }, [C.isOpen, p]);
135
+ let N = m ?? S.menu.search;
136
+ return /* @__PURE__ */ J(Ke, {
137
+ items: r,
138
+ linkAs: s,
139
+ renderItem: c,
140
+ onCheckedChange: a,
141
+ onValueChange: o,
142
+ children: /* @__PURE__ */ Y(X.Root, {
143
+ open: C.isOpen,
144
+ onOpenChange: (e) => C.onOpenChange(e.open),
145
+ positioning: C.positioning({
146
+ placement: h,
147
+ gutter: g ? 10 : 8
148
+ }),
149
+ anchorPoint: C.anchorPoint,
150
+ lazyMount: !0,
151
+ unmountOnExit: !0,
152
+ onSelect: (e) => i?.(e.value),
153
+ children: [b && /* @__PURE__ */ J(X.Trigger, {
154
+ asChild: !0,
155
+ children: b
156
+ }), /* @__PURE__ */ J(Oe, { children: /* @__PURE__ */ J(X.Positioner, { children: /* @__PURE__ */ Y(X.Content, {
157
+ className: x.content(),
158
+ children: [
159
+ g && /* @__PURE__ */ J(X.Arrow, {
160
+ className: x.arrow(),
161
+ children: /* @__PURE__ */ J(X.ArrowTip, { className: x.arrowTip() })
162
+ }),
163
+ p && /* @__PURE__ */ J(X.Context, { children: (e) => /* @__PURE__ */ J("div", {
164
+ role: "group",
165
+ "aria-label": N,
166
+ className: x.search(),
167
+ children: /* @__PURE__ */ J("input", {
168
+ ref: j,
169
+ type: "text",
170
+ autoComplete: "off",
171
+ className: x.searchInput(),
172
+ placeholder: N,
173
+ "aria-label": N,
174
+ "aria-activedescendant": ee,
175
+ onChange: (t) => {
176
+ let n = t.currentTarget;
177
+ D(n.value), requestAnimationFrame(() => O(y(n, e)));
178
+ },
179
+ onKeyDown: (t) => {
180
+ let n = E(t.nativeEvent, e);
181
+ n && O(n);
182
+ }
183
+ })
184
+ }) }),
185
+ /* @__PURE__ */ J(Ye, {
186
+ entries: A,
187
+ onSelect: i
188
+ }),
189
+ p && !A.length && /* @__PURE__ */ J("div", {
190
+ role: "group",
191
+ className: x.empty(),
192
+ children: /* @__PURE__ */ J("span", {
193
+ role: "status",
194
+ children: S.common.noResults
195
+ })
196
+ })
197
+ ]
198
+ }) }) })]
199
+ })
200
+ });
201
+ }
202
+ function Je({ item: e, shortcut: t }) {
203
+ let r = Se(We), i = n("menu", T)();
204
+ if (r?.renderItem) return r.renderItem(e);
205
+ let a = e.icon;
206
+ return /* @__PURE__ */ Y(q, { children: [
207
+ a && /* @__PURE__ */ J(a, {
208
+ className: i.icon(),
209
+ "aria-hidden": "true"
210
+ }),
211
+ /* @__PURE__ */ J("span", {
212
+ className: i.label(),
213
+ children: e.label
214
+ }),
215
+ t && /* @__PURE__ */ J("span", {
216
+ className: i.shortcut(),
217
+ "aria-hidden": "true",
218
+ children: t
219
+ })
220
+ ] });
221
+ }
222
+ function Ye({ entries: e, onSelect: t }) {
223
+ let r = n("menu", T), i = r(), a = Se(We);
224
+ return e.map((e, n) => {
225
+ if ("type" in e) return e.type === "separator" ? /* @__PURE__ */ J(X.Separator, { className: i.separator() }, `separator-${n}`) : e.type === "checkbox" ? /* @__PURE__ */ Y(X.CheckboxItem, {
226
+ value: e.value,
227
+ checked: a?.checked(e) ?? !!e.checked,
228
+ onCheckedChange: (t) => a?.setChecked(e, t),
229
+ disabled: e.disabled,
230
+ closeOnSelect: e.closeOnSelect ?? !1,
231
+ className: i.item(),
232
+ children: [/* @__PURE__ */ J("span", {
233
+ className: i.indicator(),
234
+ children: /* @__PURE__ */ J(X.ItemIndicator, { children: /* @__PURE__ */ J(fe, {
235
+ className: i.indicatorIcon(),
236
+ "aria-hidden": "true"
237
+ }) })
238
+ }), /* @__PURE__ */ J(Je, { item: e })]
239
+ }, e.value) : e.type === "radio" ? /* @__PURE__ */ Y(X.RadioItemGroup, {
240
+ value: a?.radio(e),
241
+ onValueChange: (t) => a?.setRadio(e, t.value),
242
+ children: [e.label && /* @__PURE__ */ J(X.ItemGroupLabel, {
243
+ className: i.groupLabel(),
244
+ children: e.label
245
+ }), e.items.map((e) => /* @__PURE__ */ Y(X.RadioItem, {
246
+ value: e.value,
247
+ disabled: e.disabled,
248
+ closeOnSelect: e.closeOnSelect ?? !1,
249
+ className: i.item(),
250
+ children: [/* @__PURE__ */ J("span", {
251
+ className: i.indicator(),
252
+ children: /* @__PURE__ */ J(X.ItemIndicator, { children: /* @__PURE__ */ J(he, {
253
+ className: i.indicatorDot(),
254
+ "aria-hidden": "true"
255
+ }) })
256
+ }), /* @__PURE__ */ J(Je, { item: e })]
257
+ }, e.value))]
258
+ }, `radio-${e.name}`) : /* @__PURE__ */ Y(X.ItemGroup, { children: [/* @__PURE__ */ J(X.ItemGroupLabel, {
259
+ className: i.groupLabel(),
260
+ children: e.label
261
+ }), /* @__PURE__ */ J(Ye, {
262
+ entries: e.items,
263
+ onSelect: t
264
+ })] }, `group-${n}`);
265
+ let o = e.icon;
266
+ if (e.children) return /* @__PURE__ */ Y(X.Root, {
267
+ positioning: {
268
+ placement: "right-start",
269
+ offset: { mainAxis: d }
270
+ },
271
+ onSelect: (e) => t?.(e.value),
272
+ children: [/* @__PURE__ */ Y(X.TriggerItem, {
273
+ className: i.item(),
274
+ children: [
275
+ o && /* @__PURE__ */ J(o, {
276
+ className: i.icon(),
277
+ "aria-hidden": "true"
278
+ }),
279
+ /* @__PURE__ */ J("span", {
280
+ className: i.label(),
281
+ children: e.label
282
+ }),
283
+ /* @__PURE__ */ J(B, {
284
+ className: i.submenuIcon(),
285
+ "aria-hidden": "true"
286
+ })
287
+ ]
288
+ }), /* @__PURE__ */ J(Oe, { children: /* @__PURE__ */ J(X.Positioner, { children: /* @__PURE__ */ J(X.Content, {
289
+ className: i.content(),
290
+ children: /* @__PURE__ */ J(Ye, {
291
+ entries: e.children,
292
+ onSelect: t
293
+ })
294
+ }) }) })]
295
+ }, e.value);
296
+ if (e.href || e.to) {
297
+ let t = a?.linkAs ?? "a";
298
+ return /* @__PURE__ */ J(X.Item, {
299
+ value: e.value,
300
+ disabled: e.disabled,
301
+ closeOnSelect: e.closeOnSelect,
302
+ asChild: !0,
303
+ children: /* @__PURE__ */ J(t, {
304
+ ...C(e.href, e.to),
305
+ className: r({ danger: e.danger }).item(),
306
+ children: /* @__PURE__ */ J(Je, {
307
+ item: e,
308
+ shortcut: e.shortcut
309
+ })
310
+ })
311
+ }, e.value);
312
+ }
313
+ return /* @__PURE__ */ J(U, { children: /* @__PURE__ */ J(X.Item, {
314
+ value: e.value,
315
+ disabled: e.disabled,
316
+ closeOnSelect: e.closeOnSelect,
317
+ className: r({ danger: e.danger }).item(),
318
+ children: /* @__PURE__ */ J(Je, {
319
+ item: e,
320
+ shortcut: e.shortcut
321
+ })
322
+ }) }, e.value);
323
+ });
324
+ }
325
+ //#endregion
326
+ //#region src/components/Textarea/Textarea.tsx
327
+ function Xe({ classes: t, size: a, invalid: o = !1, success: s = !1, disabled: c = !1, autoResize: l = !1, minRows: u, maxRows: d, showCount: f = !1, loading: p = !1, clearable: m = !1, clearLabel: h, className: g, style: _, onInput: v, onChange: y, ...b }) {
328
+ let x = n("textarea", re, t), S = n("textareaParts", I, t), C = e(), w = Ae(), T = r(), E = o || !!w?.invalid, D = !E && (s || T.success), ee = c || !!w?.disabled, O = !!b.readOnly || !!w?.readOnly, k = W(null), A = b.maxLength && b.maxLength > 0 ? b.maxLength : void 0, j = f && A !== void 0, te = p || m || D, M = j || p || m, [N, P] = G(() => String(b.defaultValue ?? "").length), F = b.value === void 0 ? N : String(b.value ?? "").length, ie = () => {
329
+ let e = k.current;
330
+ if (!l || !e) return;
331
+ e.style.height = "auto";
332
+ let t = e.offsetHeight - e.clientHeight, n = e.scrollHeight + t;
333
+ if (u || d) {
334
+ let r = getComputedStyle(e), i = parseFloat(r.lineHeight) || parseFloat(r.fontSize) * 1.5, a = parseFloat(r.paddingTop) + parseFloat(r.paddingBottom) + t, o = d ? d * i + a : Infinity;
335
+ e.style.overflowY = n > o ? "auto" : "", n = Math.min(Math.max(n, u ? u * i + a : 0), o);
336
+ }
337
+ e.style.height = `${n}px`;
338
+ };
339
+ Ee(ie);
340
+ let ae = we(), [oe, se] = G(""), ce = W(void 0);
341
+ Ce(() => () => clearTimeout(ce.current), []);
342
+ let le = (e) => {
343
+ j && (clearTimeout(ce.current), ce.current = setTimeout(() => se(C.textarea.remaining(A - e, A)), 1e3));
344
+ }, ue = () => {
345
+ let e = k.current;
346
+ e && (ne(e), e.focus());
347
+ }, L = /* @__PURE__ */ J(ke.Textarea, {
348
+ ...b,
349
+ ref: k,
350
+ rows: b.rows ?? u,
351
+ className: x({
352
+ size: a,
353
+ invalid: E,
354
+ success: D,
355
+ disabled: ee,
356
+ autoResize: l,
357
+ hasTrailing: M ? te : void 0,
358
+ class: M ? void 0 : g
359
+ }),
360
+ style: M ? void 0 : _,
361
+ disabled: ee || void 0,
362
+ "aria-invalid": E || void 0,
363
+ ...M ? {
364
+ "aria-describedby": [
365
+ w?.ariaDescribedby,
366
+ j && ae,
367
+ b["aria-describedby"]
368
+ ].filter(Boolean).join(" ") || void 0,
369
+ "aria-busy": p || void 0
370
+ } : {},
371
+ onInput: (e) => {
372
+ ie(), v?.(e);
373
+ },
374
+ onChange: (e) => {
375
+ P(e.currentTarget.value.length), le(e.currentTarget.value.length), y?.(e);
376
+ }
377
+ });
378
+ if (!M) return L;
379
+ let R = S();
380
+ return /* @__PURE__ */ Y("div", {
381
+ className: R.base({ class: g }),
382
+ style: _,
383
+ children: [
384
+ L,
385
+ te && /* @__PURE__ */ J("div", {
386
+ className: R.trailing(),
387
+ children: /* @__PURE__ */ J(i, {
388
+ loading: p,
389
+ clear: m && F > 0 && !ee && !O,
390
+ clearLabel: h ?? C.field.clear,
391
+ onClear: ue,
392
+ success: D,
393
+ classes: {
394
+ spinner: R.spinner(),
395
+ clear: R.clear(),
396
+ clearIcon: R.clearIcon(),
397
+ statusIcon: R.statusIcon()
398
+ }
399
+ })
400
+ }),
401
+ j && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("span", {
402
+ id: ae,
403
+ className: R.counter(),
404
+ "aria-hidden": "true",
405
+ children: C.textarea.counter(F, A)
406
+ }), /* @__PURE__ */ J("span", {
407
+ className: R.status(),
408
+ role: "status",
409
+ children: oe
410
+ })] })
411
+ ]
412
+ });
413
+ }
414
+ //#endregion
415
+ //#region src/components/Pagination/Pagination.tsx
416
+ function Ze({ classes: t, count: r, pageSize: i = 10, onPageSizeChange: s, page: c, defaultPage: l, onPageChange: u, siblingCount: d = 1, boundaryCount: f, showSummary: p = !0, summary: m, pageSizes: h, jumper: g, variant: _ = "full", withEdges: v, hideSinglePage: y, getPageHref: b, translations: x, className: S, ...C }) {
417
+ let w = n("pagination", A, t)({ responsive: _ === "auto" }), T = e(), [E, D] = G(i), [ee, O] = G(i);
418
+ ee !== i && (O(i), D(i));
419
+ let j = (e) => ({
420
+ start: Math.min((e - 1) * E + 1, r),
421
+ end: Math.min(e * E, r),
422
+ count: r
423
+ });
424
+ if (y && r <= E) return null;
425
+ let te = b ? "a" : "button", M = (e, t, n = !1) => xe(te, {
426
+ className: e,
427
+ ...b && n ? {
428
+ role: "link",
429
+ "aria-disabled": "true"
430
+ } : {}
431
+ }, t), N = (e, t) => {
432
+ if (!t || t === E) return;
433
+ let n = k(e.page, E, t);
434
+ D(t), s?.(t), requestAnimationFrame(() => e.setPage(n));
435
+ }, P = (e, t) => {
436
+ if (e.key !== "Enter") return;
437
+ let n = e.currentTarget, r = Number.parseInt(n.value, 10);
438
+ Number.isNaN(r) || (e.preventDefault(), t.setPage(Math.min(Math.max(r, 1), t.totalPages)), n.value = "");
439
+ };
440
+ return /* @__PURE__ */ J(Z.Root, {
441
+ ...C,
442
+ className: w.base({ class: S }),
443
+ count: r,
444
+ pageSize: E,
445
+ page: c,
446
+ defaultPage: l,
447
+ onPageChange: (e) => u?.(e.page),
448
+ siblingCount: d,
449
+ boundaryCount: f,
450
+ type: b ? "link" : "button",
451
+ getPageUrl: b ? (e) => b(e.page) : void 0,
452
+ translations: {
453
+ ...T.pagination,
454
+ ...x
455
+ },
456
+ children: /* @__PURE__ */ J(Z.Context, { children: (e) => /* @__PURE__ */ Y(q, { children: [
457
+ p && /* @__PURE__ */ J("span", {
458
+ className: w.summary(),
459
+ "aria-live": "polite",
460
+ children: (m ?? T.pagination.summary)(j(e.page))
461
+ }),
462
+ !!h?.length && /* @__PURE__ */ Y("div", {
463
+ className: w.pageSize(),
464
+ children: [/* @__PURE__ */ J("span", {
465
+ "aria-hidden": "true",
466
+ children: T.pagination.pageSize
467
+ }), /* @__PURE__ */ J(o, {
468
+ className: w.pageSizeSelect(),
469
+ size: "sm",
470
+ items: h.map((e) => ({
471
+ value: e,
472
+ label: String(e)
473
+ })),
474
+ value: E,
475
+ "aria-label": T.pagination.pageSize,
476
+ onValueChange: (t) => N(e, t)
477
+ })]
478
+ }),
479
+ /* @__PURE__ */ Y("div", {
480
+ className: w.list(),
481
+ children: [
482
+ v && /* @__PURE__ */ J(Z.FirstTrigger, {
483
+ asChild: !0,
484
+ children: M(w.trigger(), /* @__PURE__ */ J(H, {
485
+ className: w.triggerIcon(),
486
+ "aria-hidden": "true"
487
+ }), e.page === 1)
488
+ }),
489
+ /* @__PURE__ */ J(Z.PrevTrigger, {
490
+ asChild: !0,
491
+ children: M(w.trigger(), /* @__PURE__ */ J(z, {
492
+ className: w.triggerIcon(),
493
+ "aria-hidden": "true"
494
+ }), e.page === 1)
495
+ }),
496
+ _ !== "full" && /* @__PURE__ */ J("span", {
497
+ className: w.compact(),
498
+ children: T.pagination.compact(e.page, e.totalPages)
499
+ }),
500
+ _ !== "compact" && e.pages.map((e, t) => e.type === "page" ? /* @__PURE__ */ J(Z.Item, {
501
+ ...e,
502
+ asChild: !0,
503
+ children: M(w.item(), e.value)
504
+ }, t) : /* @__PURE__ */ J(Z.Ellipsis, {
505
+ index: t,
506
+ className: w.ellipsis(),
507
+ "aria-hidden": "true",
508
+ children: "…"
509
+ }, t)),
510
+ /* @__PURE__ */ J(Z.NextTrigger, {
511
+ asChild: !0,
512
+ children: M(w.trigger(), /* @__PURE__ */ J(B, {
513
+ className: w.triggerIcon(),
514
+ "aria-hidden": "true"
515
+ }), e.page === e.totalPages)
516
+ }),
517
+ v && /* @__PURE__ */ J(Z.LastTrigger, {
518
+ asChild: !0,
519
+ children: M(w.trigger(), /* @__PURE__ */ J(me, {
520
+ className: w.triggerIcon(),
521
+ "aria-hidden": "true"
522
+ }), e.page === e.totalPages)
523
+ })
524
+ ]
525
+ }),
526
+ g && /* @__PURE__ */ Y("div", {
527
+ className: w.jumper(),
528
+ children: [/* @__PURE__ */ J("span", {
529
+ "aria-hidden": "true",
530
+ children: T.pagination.jumper
531
+ }), /* @__PURE__ */ J(a, {
532
+ className: w.jumperInput(),
533
+ size: "sm",
534
+ inputMode: "numeric",
535
+ autoComplete: "off",
536
+ "aria-label": T.pagination.jumper,
537
+ onKeyDown: (t) => P(t, e)
538
+ })]
539
+ })
540
+ ] }) })
541
+ });
542
+ }
543
+ //#endregion
544
+ //#region src/components/Skeleton/Skeleton.tsx
545
+ function Qe({ classes: e, shape: t, width: r, height: i, className: a, style: o, ...s }) {
546
+ let c = n("skeleton", F, e);
547
+ return /* @__PURE__ */ J("span", {
548
+ "aria-hidden": "true",
549
+ ...s,
550
+ className: c({
551
+ shape: t,
552
+ class: a
553
+ }),
554
+ style: {
555
+ width: r,
556
+ height: i,
557
+ ...o
558
+ }
559
+ });
560
+ }
561
+ //#endregion
562
+ //#region src/components/DatePicker/dates.ts
563
+ var $e = (e, t) => e ? e.toString().slice(0, t ? 16 : 10) : null;
564
+ function et(e, t, n) {
565
+ return t ? e.includes("T") ? Re(e.slice(0, 16)) : Re(`${e}T${n === "max" ? "23:59" : "00:00"}`) : Le(e.slice(0, 10));
566
+ }
567
+ function tt(e, t, n, r) {
568
+ let i = typeof e == "string" && !e.includes("T"), a = le(e, t && !i, n);
569
+ return a ? et(a, t, r) : void 0;
570
+ }
571
+ var nt = (e, t, n, r) => v($e(e, t), {
572
+ valueType: n,
573
+ timeZone: r,
574
+ withTime: t
575
+ }), rt = (e, t, n) => le(e, t, n);
576
+ function it(e, t) {
577
+ if (!e && !t?.length) return;
578
+ let n = new Set(t?.map((e) => le(e, !1)));
579
+ return (t) => {
580
+ let r = $e(t, !1);
581
+ return n.has(r) || !!e?.(r);
582
+ };
583
+ }
584
+ function at(e, t) {
585
+ if ("hour" in e) return e;
586
+ let n = t && "hour" in t ? new Ie(t.hour, t.minute) : new Ie();
587
+ return ze(e, n);
588
+ }
589
+ var ot = {
590
+ year: 2e3,
591
+ month: 1,
592
+ day: 1
593
+ };
594
+ function st(e) {
595
+ let [t = 0, n = 0, r = 0] = e.split(":").map(Number);
596
+ return new Pe(ot.year, ot.month, ot.day, t, n, r);
597
+ }
598
+ var ct = (e) => String(e).padStart(2, "0"), lt = (e, t = !1) => e && "hour" in e ? `${ct(e.hour)}:${ct(e.minute)}${t ? `:${ct(e.second)}` : ""}` : null, ut = (e, t, n, r = !1) => ie(e, t, n, r);
599
+ //#endregion
600
+ //#region src/components/DatePicker/DatePickerBase.tsx
601
+ function dt({ mode: t, dates: r, onChange: i, withTime: a, min: o, max: s, isDateUnavailable: c, locale: l, disabled: u, readOnly: d, invalid: f, required: p, name: m, label: g, className: _, style: v, period: y, classes: b, presets: x, size: S, hideClear: C, firstDayOfWeek: T, timeZone: E, showTimeZone: D, responsive: ee, ...O }) {
602
+ let k = n("datePicker", h, b)({ size: S }), A = e(), j = we(), P = Ae(), ne = {
603
+ disabled: u ?? P?.disabled,
604
+ readOnly: d ?? P?.readOnly,
605
+ invalid: f ?? P?.invalid,
606
+ required: p ?? P?.required
607
+ }, F = t === "range", re = t === "multiple", I = F ? [0, 1] : [0], ie = [A.dateRange.start, A.dateRange.end], se = P ? { label: (e) => F ? `${P.ids.label} ${j}r${e}` : P.ids.label } : void 0, ce = (e) => P ? void 0 : F ? [g, ie[e]].filter(Boolean).join(", ") : g, le = F ? {
608
+ ...A.datePicker,
609
+ clearTrigger: A.dateRange.clearTrigger
610
+ } : A.datePicker, ue = y ? new Fe(l, y === "month" ? {
611
+ month: "2-digit",
612
+ year: "numeric"
613
+ } : { year: "numeric" }) : void 0, L = T ?? w(l).firstDay, fe;
614
+ if (D && E) {
615
+ let e = r[0], t = e ? R(e.toString().slice(0, 16), E) : /* @__PURE__ */ new Date();
616
+ fe = {
617
+ short: ae(E, l, t),
618
+ long: A.calendar.timeZone(oe(E, l, t))
619
+ };
620
+ }
621
+ let pe = [P?.ariaDescribedby, fe ? `${j}tz` : void 0].filter(Boolean).join(" ") || void 0, z = (e) => i(a ? e.map((e, t) => at(e, r[t])) : e), B = (e, t) => {
622
+ if (y) return !1;
623
+ if (F) {
624
+ let t = M(e, l, a);
625
+ if (t) return i([et(t.start, a), et(t.end, a)]), !0;
626
+ }
627
+ let n = te(e, l, a);
628
+ if (!n) return !1;
629
+ let o = [...r];
630
+ return o[t] = et(n, a), i(o.filter(Boolean)), !0;
631
+ }, V = r.length ? r.length > 3 ? N(A.calendar.datesSelected, r.length, l) : r.map((e) => new Fe(l, {
632
+ day: "2-digit",
633
+ month: "2-digit",
634
+ year: "numeric",
635
+ timeZone: "UTC"
636
+ }).format(e.toDate("UTC"))).join(", ") : A.calendar.noDates;
637
+ return /* @__PURE__ */ Y($.Root, {
638
+ className: k.base({ class: _ }),
639
+ style: v,
640
+ value: r,
641
+ onValueChange: (e) => z(e.value),
642
+ selectionMode: t,
643
+ min: o,
644
+ max: s,
645
+ isDateUnavailable: c,
646
+ locale: l,
647
+ startOfWeek: L,
648
+ minView: y,
649
+ defaultView: y,
650
+ numOfMonths: O.numberOfMonths,
651
+ timeZone: E,
652
+ ...ne,
653
+ positioning: {
654
+ placement: "bottom-start",
655
+ gutter: 4
656
+ },
657
+ translations: le,
658
+ lazyMount: !0,
659
+ unmountOnExit: !0,
660
+ children: [/* @__PURE__ */ Y($.Control, {
661
+ className: k.control(),
662
+ children: [
663
+ re ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("span", {
664
+ id: `${j}v`,
665
+ className: k.multiValue(),
666
+ "data-placeholder": r.length ? void 0 : "",
667
+ children: V
668
+ }), m && r.map((e, t) => /* @__PURE__ */ J("input", {
669
+ type: "hidden",
670
+ name: `${m}[${t}]`,
671
+ value: e.toString()
672
+ }, e.toString()))] }) : /* @__PURE__ */ Y(Ne.Root, {
673
+ className: k.dateInput(),
674
+ ids: se,
675
+ value: r,
676
+ onValueChange: (e) => i(e.value),
677
+ selectionMode: F ? "range" : "single",
678
+ granularity: a ? "minute" : "day",
679
+ formatter: ue,
680
+ min: o,
681
+ max: s,
682
+ isDateUnavailable: c,
683
+ locale: l,
684
+ shouldForceLeadingZeros: !0,
685
+ name: m,
686
+ ...ne,
687
+ translations: A.dateInput,
688
+ children: [/* @__PURE__ */ J(Ne.Control, {
689
+ className: k.dateControl(),
690
+ children: I.map((e) => /* @__PURE__ */ Y(U, { children: [
691
+ e === 1 && /* @__PURE__ */ J("span", {
692
+ className: k.rangeSeparator(),
693
+ "aria-hidden": "true",
694
+ children: "–"
695
+ }),
696
+ F && P && /* @__PURE__ */ J("span", {
697
+ id: `${j}r${e}`,
698
+ className: k.rangeLabel(),
699
+ children: ie[e]
700
+ }),
701
+ /* @__PURE__ */ J(ft, {
702
+ index: e,
703
+ label: ce(e),
704
+ describedby: pe,
705
+ paste: y ? void 0 : B,
706
+ size: S
707
+ })
708
+ ] }, e))
709
+ }), I.map((e) => /* @__PURE__ */ J(Ne.HiddenInput, { index: e }, e))]
710
+ }),
711
+ fe && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("span", {
712
+ className: k.timeZone(),
713
+ "aria-hidden": "true",
714
+ children: fe.short
715
+ }), /* @__PURE__ */ J("span", {
716
+ id: `${j}tz`,
717
+ hidden: !0,
718
+ children: fe.long
719
+ })] }),
720
+ !C && /* @__PURE__ */ J($.ClearTrigger, {
721
+ className: k.clear(),
722
+ children: /* @__PURE__ */ J(ye, {
723
+ className: k.clearIcon(),
724
+ "aria-hidden": "true"
725
+ })
726
+ }),
727
+ /* @__PURE__ */ J($.Trigger, {
728
+ className: k.trigger(),
729
+ ...re ? { "aria-describedby": `${j}v` } : {},
730
+ children: /* @__PURE__ */ J(de, {
731
+ className: k.triggerIcon(),
732
+ "aria-hidden": "true"
733
+ })
734
+ })
735
+ ]
736
+ }), /* @__PURE__ */ J(mt, {
737
+ presets: x,
738
+ responsive: ee,
739
+ timeZone: E,
740
+ ...O
741
+ })]
742
+ });
743
+ }
744
+ function ft({ index: t, label: r, describedby: i, paste: a, size: o }) {
745
+ let s = n("datePicker", h)({ size: o }), c = e();
746
+ return /* @__PURE__ */ J(Ne.SegmentGroup, {
747
+ index: t,
748
+ className: s.segments(),
749
+ "aria-label": r,
750
+ "aria-describedby": i,
751
+ ...a ? { onPasteCapture: (e) => {
752
+ a?.(e.clipboardData.getData("text/plain"), t) && (e.preventDefault(), e.stopPropagation());
753
+ } } : {},
754
+ children: /* @__PURE__ */ J(Ne.Context, { children: (e) => e.getSegments({ index: t }).map((e, t) => /* @__PURE__ */ J(Ne.Segment, {
755
+ segment: e,
756
+ className: s.segment(),
757
+ "aria-label": c.dateSegments[e.type]
758
+ }, t)) })
759
+ });
760
+ }
761
+ function pt(e) {
762
+ let [t, n] = G(!1);
763
+ return Ce(() => {
764
+ if (!e || typeof window.matchMedia != "function") return;
765
+ let t = window.matchMedia("(max-width: 639.98px)"), r = () => n(t.matches);
766
+ return r(), t.addEventListener("change", r), () => t.removeEventListener("change", r);
767
+ }, [e]), t;
768
+ }
769
+ function mt({ presets: e, responsive: t, ...r }) {
770
+ let i = n("datePicker", h), a = i(), o = pt(t), s = (r.numberOfMonths ?? 1) > 1;
771
+ return o ? /* @__PURE__ */ Y(Oe, { children: [/* @__PURE__ */ J($.Context, { children: (e) => e.open ? /* @__PURE__ */ J("div", {
772
+ className: a.backdrop(),
773
+ "aria-hidden": "true"
774
+ }) : null }), /* @__PURE__ */ J("div", {
775
+ className: a.sheet(),
776
+ children: /* @__PURE__ */ J($.Content, {
777
+ className: i({
778
+ multiMonth: s,
779
+ bottomSheet: !0
780
+ }).content(),
781
+ children: /* @__PURE__ */ J(gt, {
782
+ presets: e,
783
+ ...r
784
+ })
785
+ })
786
+ })] }) : /* @__PURE__ */ J(Oe, { children: /* @__PURE__ */ J($.Positioner, { children: /* @__PURE__ */ J($.Content, {
787
+ className: s ? i({ multiMonth: s }).content() : a.content(),
788
+ children: /* @__PURE__ */ J(gt, {
789
+ presets: e,
790
+ ...r
791
+ })
792
+ }) }) });
793
+ }
794
+ var ht = (e, t) => typeof e == "string" ? t.rangePresets[e] ?? e : e.label;
795
+ function gt({ presets: t, showWeekNumbers: r, numberOfMonths: i, showButtonBar: a, plainToday: o, hideOutsideDays: s, weekendDays: c, allowDeselect: l, timeZone: u, renderDay: d }) {
796
+ let f = n("datePicker", h)(), p = e(), m = Math.max(1, Math.floor(i ?? 1)), g = {
797
+ showWeekNumbers: r,
798
+ plainToday: o,
799
+ hideOutsideDays: s || m > 1,
800
+ weekendDays: c,
801
+ allowDeselect: l,
802
+ renderDay: d
803
+ }, _ = (e) => Array.from({ length: m }, (t, n) => {
804
+ let r = e.getOffset({ months: n }), i = e.visibleRange.start.add({ months: n });
805
+ return {
806
+ title: r.visibleRangeText.start,
807
+ weeks: r.weeks,
808
+ visibleRange: {
809
+ start: i,
810
+ end: i.add({ months: 1 }).subtract({ days: 1 })
811
+ }
812
+ };
813
+ }), v = (e) => {
814
+ if (e.selectionMode === "single") return e.selectToday();
815
+ let [t = 0, n = 1, r = 1] = ue(u).split("-").map(Number);
816
+ e.setFocusedValue(e.focusedValue.set({
817
+ year: t,
818
+ month: n,
819
+ day: r
820
+ }));
821
+ };
822
+ return /* @__PURE__ */ Y(q, { children: [
823
+ /* @__PURE__ */ J($.View, {
824
+ view: "day",
825
+ children: /* @__PURE__ */ J($.Context, { children: (e) => /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(xt, {}), m > 1 ? /* @__PURE__ */ J("div", {
826
+ className: f.months(),
827
+ children: _(e).map((e) => /* @__PURE__ */ Y("div", {
828
+ className: f.month(),
829
+ children: [/* @__PURE__ */ J("div", {
830
+ className: f.monthTitle(),
831
+ children: e.title
832
+ }), /* @__PURE__ */ J(vt, {
833
+ weeks: e.weeks,
834
+ visibleRange: e.visibleRange,
835
+ ...g
836
+ })]
837
+ }, e.title))
838
+ }) : /* @__PURE__ */ J(vt, {
839
+ weeks: e.weeks,
840
+ ...g
841
+ })] }) })
842
+ }),
843
+ /* @__PURE__ */ J($.View, {
844
+ view: "month",
845
+ children: /* @__PURE__ */ J($.Context, { children: (e) => /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(xt, {}), /* @__PURE__ */ J($.Table, {
846
+ className: f.table(),
847
+ children: /* @__PURE__ */ J($.TableBody, { children: e.getMonthsGrid({
848
+ columns: 4,
849
+ format: "short"
850
+ }).map((e) => /* @__PURE__ */ J($.TableRow, { children: e.map((e) => /* @__PURE__ */ J($.TableCell, {
851
+ value: e.value,
852
+ className: f.cell(),
853
+ children: /* @__PURE__ */ J($.TableCellTrigger, {
854
+ className: f.period(),
855
+ children: e.label
856
+ })
857
+ }, e.value)) }, e[0]?.value)) })
858
+ })] }) })
859
+ }),
860
+ /* @__PURE__ */ J($.View, {
861
+ view: "year",
862
+ children: /* @__PURE__ */ J($.Context, { children: (e) => /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(xt, {}), /* @__PURE__ */ J($.Table, {
863
+ className: f.table(),
864
+ children: /* @__PURE__ */ J($.TableBody, { children: e.getYearsGrid({ columns: 4 }).map((e) => /* @__PURE__ */ J($.TableRow, { children: e.map((e) => /* @__PURE__ */ J($.TableCell, {
865
+ value: e.value,
866
+ className: f.cell(),
867
+ children: /* @__PURE__ */ J($.TableCellTrigger, {
868
+ className: f.period(),
869
+ children: e.label
870
+ })
871
+ }, e.value)) }, e[0]?.value)) })
872
+ })] }) })
873
+ }),
874
+ t?.length ? /* @__PURE__ */ J("div", {
875
+ className: f.presets(),
876
+ children: t.map((e) => /* @__PURE__ */ J($.PresetTrigger, {
877
+ value: typeof e == "string" ? e : e.value,
878
+ className: f.preset(),
879
+ "aria-label": ht(e, p),
880
+ children: ht(e, p)
881
+ }, ht(e, p)))
882
+ }) : null,
883
+ a && /* @__PURE__ */ J($.Context, { children: (e) => /* @__PURE__ */ Y("div", {
884
+ className: f.buttonBar(),
885
+ children: [/* @__PURE__ */ J("button", {
886
+ type: "button",
887
+ className: f.buttonBarButton(),
888
+ onClick: () => v(e),
889
+ children: p.calendar.today
890
+ }), /* @__PURE__ */ J("button", {
891
+ type: "button",
892
+ className: f.buttonBarButton(),
893
+ disabled: !e.value.length,
894
+ onClick: () => e.clearValue({ focus: !1 }),
895
+ children: p.calendar.clear
896
+ })]
897
+ }) })
898
+ ] });
899
+ }
900
+ var _t = (e) => e.toString().slice(0, 10);
901
+ function vt({ weeks: t, visibleRange: r, showWeekNumbers: i, plainToday: a, hideOutsideDays: o, weekendDays: s, allowDeselect: c, renderDay: l }) {
902
+ let u = n("datePicker", h)({
903
+ plainToday: a,
904
+ hideOutsideDays: o
905
+ }), d = e(), f = Me(), p = (e) => P(e.map(_t)), m = (e) => !!r && (e.month !== r.start.month || e.year !== r.start.year), g = (e) => {
906
+ let t = f.getDayTableCellState({
907
+ value: e,
908
+ visibleRange: r
909
+ });
910
+ return {
911
+ day: e.day,
912
+ today: t.today,
913
+ selected: t.selected,
914
+ outside: t.outsideRange,
915
+ unavailable: t.unavailable || !!t.disabled,
916
+ weekend: s ? s.includes(S(_t(e))) : t.weekend
917
+ };
918
+ }, _ = (e, t) => {
919
+ "key" in e && e.key !== "Enter" && e.key !== " " || f.selectionMode === "single" && f.getDayTableCellState({
920
+ value: t,
921
+ visibleRange: r
922
+ }).selected && (e.preventDefault(), f.clearValue({ focus: !1 }));
923
+ }, v = (e) => ({
924
+ ...s?.includes(S(_t(e))) ? { "data-weekend": "" } : {},
925
+ ...c ? {
926
+ onClickCapture: (t) => _(t, e),
927
+ onKeyDownCapture: (t) => _(t, e)
928
+ } : {}
929
+ });
930
+ return /* @__PURE__ */ Y($.Table, {
931
+ className: u.table(),
932
+ children: [/* @__PURE__ */ J($.TableHead, { children: /* @__PURE__ */ Y($.TableRow, { children: [i && /* @__PURE__ */ J("th", {
933
+ scope: "col",
934
+ className: u.weekNumberHeader(),
935
+ children: /* @__PURE__ */ J("abbr", {
936
+ title: d.datePicker.weekColumnHeader,
937
+ children: d.datePicker.weekColumnShort
938
+ })
939
+ }), f.weekDays.map((e) => /* @__PURE__ */ J($.TableHeader, {
940
+ className: u.columnHeader(),
941
+ children: /* @__PURE__ */ J("abbr", {
942
+ title: e.long,
943
+ children: e.short
944
+ })
945
+ }, e.long))] }) }), /* @__PURE__ */ J($.TableBody, { children: t.map((e) => /* @__PURE__ */ Y($.TableRow, { children: [i && /* @__PURE__ */ J("th", {
946
+ scope: "row",
947
+ className: u.weekNumber(),
948
+ "aria-label": d.datePicker.weekNumberCell(p(e)),
949
+ children: p(e)
950
+ }), e.map((e) => m(e) ? /* @__PURE__ */ J("td", { className: u.cell() }, e.toString()) : /* @__PURE__ */ J($.TableCell, {
951
+ value: e,
952
+ visibleRange: r,
953
+ className: u.cell(),
954
+ ...v(e),
955
+ children: /* @__PURE__ */ J($.TableCellTrigger, {
956
+ className: u.day(),
957
+ children: l ? /* @__PURE__ */ J("span", {
958
+ className: u.dayContent(),
959
+ children: l(_t(e), g(e))
960
+ }) : e.day
961
+ })
962
+ }, e.toString()))] }, e[0]?.toString())) })]
963
+ });
964
+ }
965
+ var yt = {
966
+ day: "month",
967
+ month: "year",
968
+ year: void 0
969
+ }, bt = (e, t, n) => `${e}, ${n.datePicker.viewTrigger(t, yt[t])}`;
970
+ function xt() {
971
+ let t = n("datePicker", h)(), r = e();
972
+ return /* @__PURE__ */ Y($.ViewControl, {
973
+ className: t.header(),
974
+ children: [
975
+ /* @__PURE__ */ J($.PrevTrigger, {
976
+ className: t.nav(),
977
+ children: /* @__PURE__ */ J(z, {
978
+ className: t.navIcon(),
979
+ "aria-hidden": "true"
980
+ })
981
+ }),
982
+ /* @__PURE__ */ J($.Context, { children: (e) => /* @__PURE__ */ J($.ViewTrigger, {
983
+ className: t.viewTrigger(),
984
+ "aria-label": bt(e.numOfMonths > 1 && e.view === "day" ? e.visibleRangeText.formatted : e.visibleRangeText.start, e.view, r),
985
+ children: /* @__PURE__ */ J($.RangeText, {})
986
+ }) }),
987
+ /* @__PURE__ */ J($.NextTrigger, {
988
+ className: t.nav(),
989
+ children: /* @__PURE__ */ J(B, {
990
+ className: t.navIcon(),
991
+ "aria-hidden": "true"
992
+ })
993
+ })
994
+ ]
995
+ });
996
+ }
997
+ //#endregion
998
+ //#region src/components/DatePicker/DatePicker.tsx
999
+ function St({ value: e, defaultValue: n, onValueChange: r, selectionMode: i = "single", valueType: a = "string", withTime: o = !1, min: s, max: c, isDateUnavailable: l, excludeDates: u, locale: d, "aria-label": f, clearable: p = !0, highlightToday: m = !0, ...h }) {
1000
+ let g = t(), _ = d ?? g.locale, [v, y] = G(n ?? null), b = e === void 0 ? v : e, x = Array.isArray(b) ? b : b ? [b] : [], S = h.timeZone, C = (e) => e.map((e) => rt(e, o, S)).join(), w = (e) => {
1001
+ let t = e.map((e) => nt(e, o, a, S));
1002
+ if (C(t) === C(x)) return;
1003
+ let n = i === "multiple" ? t : t[0] ?? null;
1004
+ y(n), r?.(n);
1005
+ };
1006
+ return /* @__PURE__ */ J(dt, {
1007
+ ...h,
1008
+ mode: i,
1009
+ dates: x.map((e) => tt(e, o, S)).filter((e) => !!e),
1010
+ onChange: w,
1011
+ withTime: o,
1012
+ min: tt(s, o, S, "min"),
1013
+ max: tt(c, o, S, "max"),
1014
+ isDateUnavailable: it(l, u),
1015
+ locale: _,
1016
+ label: f,
1017
+ hideClear: !p,
1018
+ plainToday: !m
1019
+ });
1020
+ }
1021
+ //#endregion
1022
+ //#region src/components/MultiSelect/MultiSelect.tsx
1023
+ function Ct({ classes: t, items: r, value: i, defaultValue: a, onValueChange: o, placeholder: d, summary: p, maxShown: m = 2, disabled: h, invalid: g, required: _, name: v, itemValue: y, itemLabel: x, itemDisabled: S, itemGroup: C, valueKey: w, display: T = "text", checkboxes: E = !0, selectAll: ee, max: O, clearable: k, loading: A, loadingText: j, size: te, filter: M, manualFilter: N, onFilterChange: P, emptyText: ne, hasMore: F, onLoadMore: re, dataSource: I, minSearchLength: ie, pageSize: ae, renderItem: oe, renderValue: se, className: ce, style: le, onKeyDown: ue, ...R }) {
1024
+ let de = n("multiSelect", D, t), z = T === "chips", B = de({
1025
+ size: te,
1026
+ clearable: k && !z
1027
+ }), V = e(), H = V.select, me = {
1028
+ itemValue: y,
1029
+ itemLabel: x,
1030
+ itemDisabled: S,
1031
+ itemGroup: C,
1032
+ valueKey: w
1033
+ }, [he, ve] = G(""), U = c({
1034
+ items: r,
1035
+ source: I,
1036
+ accessors: me,
1037
+ pageSize: ae,
1038
+ minSearchLength: ie
1039
+ }), { options: be, visible: xe, groups: Se, ordered: Te, firstFor: Ee } = s(U.items, me, M && !N && !I ? he : ""), W = De(() => [...be, ...U.resolvedOptions], [be, U.resolvedOptions]), { selected: K, keys: X, commit: ke } = u({
1040
+ multiple: !0,
1041
+ value: i,
1042
+ defaultValue: a,
1043
+ accessors: me,
1044
+ items: W,
1045
+ onChange: o
1046
+ }), Ae = X.join("\0");
1047
+ Ce(() => {
1048
+ U.resolve(X, W);
1049
+ }, [Ae, I]);
1050
+ let Z = A || U.loading, $ = O !== void 0 && K.length >= O, Me = X.join("\n"), Ne = De(() => {
1051
+ let e = new Set(Me.split("\n"));
1052
+ return je({
1053
+ items: Te,
1054
+ itemToString: (e) => e.label,
1055
+ itemToValue: (e) => e.key,
1056
+ isItemDisabled: (t) => t.disabled || $ && !e.has(t.key)
1057
+ });
1058
+ }, [
1059
+ Te,
1060
+ $,
1061
+ Me
1062
+ ]), Pe = M || ee, Fe = we(), Ie = xe.filter((e) => !e.disabled), Le = f(K, Ie), [Re, ze] = G("");
1063
+ function Be(e) {
1064
+ let t = O !== void 0 && e.length >= O && K.length < O;
1065
+ ke(e), t && ze(H.maxReached(O));
1066
+ }
1067
+ function Ve(e) {
1068
+ ke(K.filter((t) => t.key !== e.key)), ze(H.removed(e.label));
1069
+ }
1070
+ function He(e) {
1071
+ ue?.(e);
1072
+ let t = K.at(-1);
1073
+ t && (z && e.key === "Backspace" ? (e.preventDefault(), Ve(t)) : k && (e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(), ke([])));
1074
+ }
1075
+ function Ue(e, t) {
1076
+ ve(t), P?.(t), I && U.search(t);
1077
+ let n = N || I ? void 0 : Ee(t);
1078
+ n && requestAnimationFrame(() => e.setHighlightValue(n.key));
1079
+ }
1080
+ let We = {
1081
+ item: B.item(),
1082
+ itemText: B.itemText(),
1083
+ icon: B.icon(),
1084
+ itemIndicator: B.itemIndicator(),
1085
+ itemBody: B.itemBody(),
1086
+ itemDescription: B.itemDescription(),
1087
+ group: B.group(),
1088
+ groupLabel: B.groupLabel(),
1089
+ loading: B.loading(),
1090
+ loadingIcon: B.loadingIcon(),
1091
+ sentinel: B.sentinel(),
1092
+ empty: B.empty(),
1093
+ check: B.check(),
1094
+ checkIcon: B.checkIcon()
1095
+ }, Ge = /* @__PURE__ */ J(l, {
1096
+ parts: Q,
1097
+ groups: Se,
1098
+ classes: We,
1099
+ checkbox: E,
1100
+ loading: Z,
1101
+ loadingText: j ?? V.common.loading,
1102
+ hasMore: F || U.hasMore,
1103
+ onLoadMore: () => I ? U.loadMore() : re?.(),
1104
+ emptyText: ne ?? U.emptyText ?? (he ? V.common.noResults : V.common.empty),
1105
+ renderItem: oe
1106
+ }), Ke = K.length ? K.length > m ? (p ?? V.common.selectedCount)(K.length) : K.map((e) => e.label).join(", ") : d ?? V.common.placeholder;
1107
+ return /* @__PURE__ */ Y(Q.Root, {
1108
+ className: B.base({ class: ce }),
1109
+ style: le,
1110
+ collection: Ne,
1111
+ multiple: !0,
1112
+ closeOnSelect: !1,
1113
+ value: X,
1114
+ onValueChange: (e) => {
1115
+ let t = b(W, e.items, K);
1116
+ Be(e.value.map((e) => t.get(e)).filter((e) => e !== void 0));
1117
+ },
1118
+ onOpenChange: (e) => {
1119
+ e.open && U.open(), !e.open && he && (ve(""), P?.(""), I && U.search(""));
1120
+ },
1121
+ disabled: h,
1122
+ invalid: g,
1123
+ required: _,
1124
+ name: v,
1125
+ positioning: {
1126
+ sameWidth: !0,
1127
+ gutter: 4
1128
+ },
1129
+ composite: !Pe,
1130
+ lazyMount: !0,
1131
+ unmountOnExit: !0,
1132
+ children: [
1133
+ /* @__PURE__ */ J(Q.Context, { children: (e) => /* @__PURE__ */ Y(Q.Control, {
1134
+ ...z || k ? { className: z ? B.chipsControl() : B.control() } : {},
1135
+ children: [
1136
+ z && K.map((t) => /* @__PURE__ */ Y("span", {
1137
+ className: B.chip(),
1138
+ children: [/* @__PURE__ */ J("span", {
1139
+ className: B.chipText(),
1140
+ children: t.label
1141
+ }), !e.disabled && /* @__PURE__ */ J("button", {
1142
+ type: "button",
1143
+ tabIndex: -1,
1144
+ className: B.chipRemove(),
1145
+ "aria-label": H.removeItem(t.label),
1146
+ onClick: () => Ve(t),
1147
+ children: /* @__PURE__ */ J(ye, {
1148
+ className: B.chipRemoveIcon(),
1149
+ "aria-hidden": "true"
1150
+ })
1151
+ })]
1152
+ }, t.key)),
1153
+ /* @__PURE__ */ Y(Q.Trigger, {
1154
+ ...R,
1155
+ className: z ? B.chipsTrigger() : B.trigger(),
1156
+ "aria-busy": A || void 0,
1157
+ onKeyDown: He,
1158
+ children: [/* @__PURE__ */ J("span", {
1159
+ className: B.value(),
1160
+ "data-placeholder-shown": !K.length || void 0,
1161
+ children: z ? K.length ? /* @__PURE__ */ J("span", {
1162
+ className: B.hiddenValue(),
1163
+ children: K.map((e) => e.label).join(", ")
1164
+ }) : d ?? V.common.placeholder : se && K.length ? se(K.map((e) => e.item)) : Ke
1165
+ }), /* @__PURE__ */ J(Q.Indicator, {
1166
+ className: B.indicator(),
1167
+ children: A ? /* @__PURE__ */ J(ge, {
1168
+ className: B.spinner(),
1169
+ "aria-hidden": "true"
1170
+ }) : /* @__PURE__ */ J(pe, {
1171
+ className: B.indicatorIcon(),
1172
+ "aria-hidden": "true"
1173
+ })
1174
+ })]
1175
+ }),
1176
+ k && K.length > 0 && !e.disabled && /* @__PURE__ */ J("button", {
1177
+ type: "button",
1178
+ tabIndex: -1,
1179
+ className: z ? B.chipsClear() : B.clear(),
1180
+ "aria-label": H.clear,
1181
+ onClick: () => {
1182
+ ke([]), e.focus();
1183
+ },
1184
+ children: /* @__PURE__ */ J(ye, {
1185
+ className: B.clearIcon(),
1186
+ "aria-hidden": "true"
1187
+ })
1188
+ })
1189
+ ]
1190
+ }) }),
1191
+ (z || O !== void 0 || I) && /* @__PURE__ */ J("span", {
1192
+ role: "status",
1193
+ className: B.status(),
1194
+ children: Re || U.announcement
1195
+ }),
1196
+ /* @__PURE__ */ J(Oe, { children: /* @__PURE__ */ J(Q.Positioner, { children: /* @__PURE__ */ J(Q.Content, {
1197
+ className: B.content(),
1198
+ "aria-busy": Z || void 0,
1199
+ "aria-label": Pe ? R["aria-label"] : void 0,
1200
+ children: Pe ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ Y("div", {
1201
+ className: B.header(),
1202
+ children: [M && /* @__PURE__ */ J(Q.Context, { children: (e) => /* @__PURE__ */ J("input", {
1203
+ type: "text",
1204
+ role: "combobox",
1205
+ autoComplete: "off",
1206
+ "aria-autocomplete": "list",
1207
+ "aria-expanded": "true",
1208
+ "data-autofocus": "",
1209
+ "aria-controls": Fe,
1210
+ "aria-activedescendant": e.highlightedItem ? e.getItemProps({ item: e.highlightedItem }).id : void 0,
1211
+ "aria-label": H.filter,
1212
+ placeholder: V.combobox.search,
1213
+ value: he,
1214
+ className: B.search(),
1215
+ onChange: (t) => Ue(e, t.target.value),
1216
+ onKeyDown: (e) => {
1217
+ [
1218
+ " ",
1219
+ "Home",
1220
+ "End"
1221
+ ].includes(e.key) && e.stopPropagation();
1222
+ }
1223
+ }) }), ee && Ie.length > 0 && /* @__PURE__ */ Y("button", {
1224
+ type: "button",
1225
+ role: "checkbox",
1226
+ "aria-checked": Le,
1227
+ className: B.selectAll(),
1228
+ onClick: () => Be(L(K, xe, O)),
1229
+ onKeyDown: (e) => {
1230
+ (e.key === " " || e.key === "Enter") && e.stopPropagation();
1231
+ },
1232
+ children: [/* @__PURE__ */ J("span", {
1233
+ className: B.check(),
1234
+ "data-state": Le === "mixed" ? "indeterminate" : Le ? "checked" : "unchecked",
1235
+ "aria-hidden": "true",
1236
+ children: Le === "mixed" ? /* @__PURE__ */ J(_e, { className: B.checkIcon() }) : Le && /* @__PURE__ */ J(fe, { className: B.checkIcon() })
1237
+ }), H.selectAll]
1238
+ })]
1239
+ }), /* @__PURE__ */ J(Q.List, {
1240
+ id: Fe,
1241
+ className: B.list(),
1242
+ "data-autofocus": M ? void 0 : "",
1243
+ children: Ge
1244
+ })] }) : Ge
1245
+ }) }) }),
1246
+ /* @__PURE__ */ J(Q.HiddenSelect, {})
1247
+ ]
1248
+ });
1249
+ }
1250
+ //#endregion
1251
+ //#region src/components/NumberInput/NumberInput.tsx
1252
+ function wt({ classes: a, value: o, defaultValue: s, onValueChange: c, min: l, max: u, step: d, formatOptions: f = g, locale: p, size: m, invalid: h, success: _, disabled: v, readOnly: y, required: b, name: S, stepper: C = !0, stepperLayout: w = "inline", prefix: T, suffix: E, allowNegative: D = !0, allowDecimal: k = !0, decimals: A, clampBehavior: te = "blur", selectOnFocus: M = !1, loading: N = !1, clearable: P = !1, clearLabel: F, className: re, style: I, onKeyDown: ie, onPaste: ae, onFocus: oe, ...ce }) {
1253
+ let le = n("numberInput", ee, a), ue = t(), L = p ?? ue.locale, R = e(), de = Ae(), fe = r(), z = !(h || de?.invalid) && (!!_ || fe.success), B = le({
1254
+ size: m,
1255
+ stacked: w === "stacked",
1256
+ success: z
1257
+ }), H = A === void 0 ? k ? f : {
1258
+ ...f,
1259
+ maximumFractionDigits: 0
1260
+ } : {
1261
+ ...f,
1262
+ minimumFractionDigits: A,
1263
+ maximumFractionDigits: A
1264
+ }, me = D ? l : Math.max(l ?? 0, 0), [he, ge] = G(null), ye = o === void 0 ? void 0 : he && he.number === o ? he.text : se(o, L, H), U = ye ?? he?.text ?? se(s, L, H) ?? "", be = we(), xe = we(), Se = T || E ? [
1265
+ de?.ariaDescribedby,
1266
+ T && be,
1267
+ E && xe,
1268
+ ce["aria-describedby"]
1269
+ ].filter(Boolean).join(" ") : void 0, Ce = W(null), Te = () => {
1270
+ let e = Ce.current?.querySelector("input");
1271
+ e && (ne(e), e.focus());
1272
+ }, Ee = !!v || !!y || !!de?.disabled || !!de?.readOnly;
1273
+ return /* @__PURE__ */ J(Be.Root, {
1274
+ className: B.base({ class: re }),
1275
+ style: I,
1276
+ value: ye,
1277
+ defaultValue: se(s, L, H),
1278
+ onValueChange: (e) => {
1279
+ let t = Number.isNaN(e.valueAsNumber) ? null : e.valueAsNumber;
1280
+ ge({
1281
+ text: e.value,
1282
+ number: t
1283
+ }), c?.(t);
1284
+ },
1285
+ min: me,
1286
+ max: u,
1287
+ step: d,
1288
+ formatOptions: H,
1289
+ locale: L,
1290
+ invalid: h,
1291
+ disabled: v,
1292
+ readOnly: y,
1293
+ required: b,
1294
+ name: S,
1295
+ clampValueOnBlur: te !== "none",
1296
+ allowOverflow: te !== "strict",
1297
+ translations: R.numberInput,
1298
+ children: /* @__PURE__ */ Y(Be.Control, {
1299
+ ref: Ce,
1300
+ className: B.control(),
1301
+ children: [
1302
+ T && /* @__PURE__ */ J("span", {
1303
+ id: be,
1304
+ className: B.prefix(),
1305
+ children: T
1306
+ }),
1307
+ /* @__PURE__ */ J(Be.Input, {
1308
+ ...ce,
1309
+ ...Se ? { "aria-describedby": Se } : {},
1310
+ className: B.input(),
1311
+ "aria-busy": N || void 0,
1312
+ onKeyDown: (e) => {
1313
+ if (ie?.(e), e.defaultPrevented || e.ctrlKey || e.metaKey || e.altKey) return;
1314
+ let t = e.currentTarget, n = t.selectionStart ?? t.value.length, r = t.value.slice(0, n) + t.value.slice(t.selectionEnd ?? n), i = O(e.key, r, L, {
1315
+ allowDecimal: k && A !== 0,
1316
+ allowNegative: D
1317
+ });
1318
+ i && (e.preventDefault(), i !== "block" && x(t, i.insert));
1319
+ },
1320
+ onPaste: (e) => {
1321
+ ae?.(e);
1322
+ let t = e.currentTarget, n = (t.selectionStart ?? 0) === 0 && (t.selectionEnd ?? 0) === t.value.length, r = j(e.clipboardData.getData("text"), L);
1323
+ !e.defaultPrevented && n && r !== null && (e.preventDefault(), ne(t, se(r, L, H)));
1324
+ },
1325
+ onFocus: (e) => {
1326
+ oe?.(e);
1327
+ let t = e.currentTarget;
1328
+ M && requestAnimationFrame(() => t.select());
1329
+ }
1330
+ }),
1331
+ (N || P || z) && /* @__PURE__ */ J(i, {
1332
+ loading: N,
1333
+ clear: P && !!U && !Ee,
1334
+ clearLabel: F ?? R.field.clear,
1335
+ onClear: Te,
1336
+ success: z,
1337
+ classes: {
1338
+ spinner: B.spinner(),
1339
+ clear: B.clear(),
1340
+ clearIcon: B.clearIcon(),
1341
+ statusIcon: B.statusIcon()
1342
+ }
1343
+ }),
1344
+ E && /* @__PURE__ */ J("span", {
1345
+ id: xe,
1346
+ className: B.suffix(),
1347
+ children: E
1348
+ }),
1349
+ C && w === "stacked" ? /* @__PURE__ */ Y("div", {
1350
+ className: B.stepper(),
1351
+ children: [/* @__PURE__ */ J(Be.IncrementTrigger, {
1352
+ className: B.button(),
1353
+ children: /* @__PURE__ */ J(V, {
1354
+ className: B.buttonIcon(),
1355
+ "aria-hidden": "true"
1356
+ })
1357
+ }), /* @__PURE__ */ J(Be.DecrementTrigger, {
1358
+ className: B.button(),
1359
+ children: /* @__PURE__ */ J(pe, {
1360
+ className: B.buttonIcon(),
1361
+ "aria-hidden": "true"
1362
+ })
1363
+ })]
1364
+ }) : C && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(Be.DecrementTrigger, {
1365
+ className: B.button(),
1366
+ children: /* @__PURE__ */ J(_e, {
1367
+ className: B.buttonIcon(),
1368
+ "aria-hidden": "true"
1369
+ })
1370
+ }), /* @__PURE__ */ J(Be.IncrementTrigger, {
1371
+ className: B.button(),
1372
+ children: /* @__PURE__ */ J(ve, {
1373
+ className: B.buttonIcon(),
1374
+ "aria-hidden": "true"
1375
+ })
1376
+ })] })
1377
+ ]
1378
+ })
1379
+ });
1380
+ }
1381
+ //#endregion
1382
+ //#region src/components/ContextMenu/ContextMenu.tsx
1383
+ function Tt({ classes: e, items: t, label: r, onSelect: i, onCheckedChange: a, onValueChange: o, linkAs: s, renderItem: c, ref: l, children: u }) {
1384
+ let d = n("menu", T, e)(), f = Ue({
1385
+ open: void 0,
1386
+ anchor: void 0,
1387
+ ref: l,
1388
+ restoreFocus: !0
1389
+ }), [p] = G(() => m((e) => f.handle.open(e)));
1390
+ return Ce(() => p.cancel, [p]), /* @__PURE__ */ J(Ke, {
1391
+ items: t,
1392
+ linkAs: s,
1393
+ renderItem: c,
1394
+ onCheckedChange: a,
1395
+ onValueChange: o,
1396
+ children: /* @__PURE__ */ Y(X.Root, {
1397
+ open: f.isOpen,
1398
+ onOpenChange: (e) => f.onOpenChange(e.open),
1399
+ positioning: f.positioning({}),
1400
+ anchorPoint: f.anchorPoint,
1401
+ lazyMount: !0,
1402
+ unmountOnExit: !0,
1403
+ onSelect: (e) => i?.(e.value),
1404
+ children: [/* @__PURE__ */ J(X.ContextTrigger, {
1405
+ asChild: !0,
1406
+ onPointerDown: (e) => p.down(e),
1407
+ onPointerMove: (e) => p.move(e),
1408
+ onPointerUp: () => p.cancel(),
1409
+ onPointerCancel: () => p.cancel(),
1410
+ children: u
1411
+ }), /* @__PURE__ */ J(Oe, { children: /* @__PURE__ */ J(X.Positioner, { children: /* @__PURE__ */ J(X.Content, {
1412
+ className: d.content(),
1413
+ ...r ? {
1414
+ "aria-label": r,
1415
+ "aria-labelledby": void 0
1416
+ } : {},
1417
+ children: /* @__PURE__ */ J(Ye, {
1418
+ entries: t,
1419
+ onSelect: i
1420
+ })
1421
+ }) }) })]
1422
+ })
1423
+ });
1424
+ }
1425
+ //#endregion
1426
+ export { Ue as S, Ze as _, gt as a, Ye as b, tt as c, ut as d, nt as f, Qe as g, rt as h, St as i, et as l, it as m, wt as n, dt as o, lt as p, Ct as r, ft as s, Tt as t, st as u, Xe as v, Ke as x, qe as y };