@iamfiro/design 0.3.1 → 0.3.2

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 (156) hide show
  1. package/agents/avatar/AGENTS.md +29 -1
  2. package/agents/tooltip/AGENTS.md +1 -1
  3. package/lib/components/Accordion/Accordion2.js +81 -81
  4. package/lib/components/ActionBar/ActionBar2.js +38 -39
  5. package/lib/components/Alert/Alert2.js +79 -79
  6. package/lib/components/AppShell/AppShell2.js +45 -45
  7. package/lib/components/AreaChart/AreaChart.js +45 -46
  8. package/lib/components/BarChart/BarChart2.js +166 -166
  9. package/lib/components/BarList/BarList2.js +83 -83
  10. package/lib/components/Breadcrumb/Breadcrumb2.js +68 -72
  11. package/lib/components/Calendar/Calendar2.js +166 -165
  12. package/lib/components/Calendar/DatePicker2.js +139 -139
  13. package/lib/components/Calendar/date.js +61 -58
  14. package/lib/components/Card/Card2.js +47 -47
  15. package/lib/components/CardFrame/CardFrame2.js +50 -45
  16. package/lib/components/Chart/ChartParts.js +78 -78
  17. package/lib/components/Chart/chart2.js +62 -62
  18. package/lib/components/Chart/useChartInteraction.js +56 -56
  19. package/lib/components/ChatBubble/ChatBubble2.js +116 -116
  20. package/lib/components/ChatBubble/formatChatTime.js +46 -39
  21. package/lib/components/ChatComposer/ChatComposer2.js +43 -43
  22. package/lib/components/CodeBlock/CodeBlock2.js +57 -57
  23. package/lib/components/CodeBlock/highlight.js +74 -74
  24. package/lib/components/ColorPicker/ColorPicker2.js +357 -357
  25. package/lib/components/ColorPicker/color.js +83 -83
  26. package/lib/components/ColorPicker/presets.js +47 -41
  27. package/lib/components/Combobox/Combobox2.js +143 -142
  28. package/lib/components/CommandMenu/CommandMenu.js +100 -100
  29. package/lib/components/Comment/Comment2.js +59 -60
  30. package/lib/components/ContextMenu/ContextMenu2.js +95 -96
  31. package/lib/components/DataGrid/DataGrid2.js +1202 -1203
  32. package/lib/components/DataGrid/GridPopover.js +87 -87
  33. package/lib/components/DataGrid/anchor.js +17 -19
  34. package/lib/components/DataGrid/model.js +261 -261
  35. package/lib/components/DataGrid/panels.js +397 -395
  36. package/lib/components/DataGrid/typeMeta.js +51 -51
  37. package/lib/components/DataGrid/types.js +38 -36
  38. package/lib/components/DescriptionList/DescriptionList2.js +74 -74
  39. package/lib/components/Dialog/AlertDialog.js +81 -82
  40. package/lib/components/Dialog/Dialog2.js +63 -63
  41. package/lib/components/Dialog/modal.js +70 -69
  42. package/lib/components/Drawer/Drawer2.js +122 -123
  43. package/lib/components/DropdownMenu/DropdownMenu2.js +257 -258
  44. package/lib/components/DropdownMenu/menuCore.js +43 -44
  45. package/lib/components/Dropzone/Dropzone2.js +76 -77
  46. package/lib/components/EmptyState/EmptyState2.js +59 -56
  47. package/lib/components/FileChip/FileChip2.js +73 -49
  48. package/lib/components/FileUpload/FileUpload.js +149 -150
  49. package/lib/components/FilterChips/FilterChips2.js +59 -59
  50. package/lib/components/FunnelChart/FunnelChart2.js +123 -123
  51. package/lib/components/FunnelChart/funnel.js +44 -47
  52. package/lib/components/Highlight/Highlight2.js +48 -48
  53. package/lib/components/HoverCard/HoverCard.js +89 -64
  54. package/lib/components/InlineDiff/InlineDiff2.js +123 -123
  55. package/lib/components/InlineDiff/diff.js +76 -76
  56. package/lib/components/InlineDiff/useDiffReview.js +69 -68
  57. package/lib/components/Kanban/Kanban2.js +366 -366
  58. package/lib/components/Kanban/KanbanCard.js +67 -67
  59. package/lib/components/Kanban/move.js +41 -45
  60. package/lib/components/LineChart/LineChart2.js +196 -196
  61. package/lib/components/List/List2.js +60 -59
  62. package/lib/components/Listbox/Listbox2.js +94 -94
  63. package/lib/components/Marker/Marker2.js +59 -52
  64. package/lib/components/Menubar/Menubar2.js +110 -112
  65. package/lib/components/MultiSelect/MultiSelect2.js +112 -112
  66. package/lib/components/NavigationMenu/NavigationMenu2.js +239 -240
  67. package/lib/components/NoticeStack/NoticeStack2.js +99 -99
  68. package/lib/components/NumberStepper/NumberStepper2.js +66 -65
  69. package/lib/components/OtpInput/OtpInput2.js +87 -88
  70. package/lib/components/Pagination/Pagination2.js +81 -81
  71. package/lib/components/Pagination/paginationRange.js +25 -24
  72. package/lib/components/PhoneInput/PhoneInput.js +77 -77
  73. package/lib/components/PieChart/PieChart2.js +101 -101
  74. package/lib/components/PieChart/arc.js +73 -76
  75. package/lib/components/PieChart/useArcTween.js +61 -57
  76. package/lib/components/Popover/Popover2.js +65 -64
  77. package/lib/components/ProgressTracker/ProgressTracker2.js +119 -119
  78. package/lib/components/Rating/Rating2.js +85 -85
  79. package/lib/components/Resizable/Resizable2.js +139 -139
  80. package/lib/components/Resizable/layout.js +68 -68
  81. package/lib/components/ScaledPreview/ScaledPreview2.js +55 -55
  82. package/lib/components/ScatterChart/ScatterChart2.js +249 -249
  83. package/lib/components/ScatterChart/scatter.js +55 -55
  84. package/lib/components/ScrollArea/ScrollArea2.js +132 -131
  85. package/lib/components/Select/Select2.js +81 -81
  86. package/lib/components/Sidebar/Sidebar2.js +61 -61
  87. package/lib/components/Skeleton/Skeleton2.js +46 -46
  88. package/lib/components/Slider/Slider2.js +74 -73
  89. package/lib/components/SocialLoginButton/SocialLoginButton.js +70 -70
  90. package/lib/components/SparkChart/SparkChart2.js +138 -137
  91. package/lib/components/SparkChart/spark.js +40 -61
  92. package/lib/components/Sparkbar/Sparkbar2.js +60 -59
  93. package/lib/components/SplitView/SplitView2.js +42 -42
  94. package/lib/components/Stat/Stat2.js +88 -88
  95. package/lib/components/StepList/StepList2.js +71 -71
  96. package/lib/components/Table/Table2.js +70 -70
  97. package/lib/components/Tabs/Tabs2.js +89 -89
  98. package/lib/components/TagInput/TagInput2.js +154 -154
  99. package/lib/components/TimePicker/TimePicker2.js +225 -226
  100. package/lib/components/TimePicker/time.js +50 -50
  101. package/lib/components/Timeline/Timeline2.js +201 -201
  102. package/lib/components/Timeline/scale.js +55 -53
  103. package/lib/components/Toast/Toaster.js +90 -92
  104. package/lib/components/Toast/store.js +91 -87
  105. package/lib/components/ToggleGroup/ToggleGroup2.js +84 -84
  106. package/lib/components/Toolbar/Toolbar2.js +166 -168
  107. package/lib/components/Tracker/Tracker2.js +89 -89
  108. package/lib/components/TreeDiagram/TreeDiagram2.js +126 -125
  109. package/lib/components/TreeView/TreeView2.js +154 -156
  110. package/lib/hooks/timing.js +35 -36
  111. package/lib/hooks/useControllableState.js +40 -39
  112. package/lib/hooks/useCountdown.js +57 -55
  113. package/lib/hooks/useDigitInput.js +59 -83
  114. package/lib/hooks/useDismiss.js +49 -46
  115. package/lib/hooks/useElapsed.js +53 -55
  116. package/lib/hooks/useFloating.js +44 -44
  117. package/lib/hooks/useFocusTrap.js +46 -70
  118. package/lib/hooks/usePresence.js +32 -29
  119. package/lib/hooks/usePressToOpen.js +50 -50
  120. package/lib/hooks/useScrollLock.js +51 -51
  121. package/lib/hooks/useSelection.js +55 -46
  122. package/lib/index.js +34 -35
  123. package/lib/primitives/AspectRatio2.js +59 -55
  124. package/lib/primitives/BrandIcon.js +160 -160
  125. package/lib/primitives/ColorDot2.js +38 -42
  126. package/lib/primitives/CopyButton2.js +56 -56
  127. package/lib/primitives/CountBadge2.js +66 -64
  128. package/lib/primitives/Countdown2.js +31 -32
  129. package/lib/primitives/Delta2.js +46 -71
  130. package/lib/primitives/Elapsed.js +44 -44
  131. package/lib/primitives/FileIcon2.js +82 -82
  132. package/lib/primitives/Flag2.js +134 -134
  133. package/lib/primitives/IconStack2.js +31 -53
  134. package/lib/primitives/IconTile2.js +46 -48
  135. package/lib/primitives/Kbd2.js +57 -57
  136. package/lib/primitives/Layout2.js +78 -78
  137. package/lib/primitives/Link2.js +29 -30
  138. package/lib/primitives/MaskedText2.js +47 -73
  139. package/lib/primitives/Progress2.js +77 -78
  140. package/lib/primitives/RelativeTime.js +49 -46
  141. package/lib/primitives/SearchInput2.js +58 -59
  142. package/lib/primitives/SelectorButton2.js +76 -74
  143. package/lib/primitives/Spinner2.js +62 -58
  144. package/lib/primitives/StatusIcon2.js +56 -56
  145. package/lib/primitives/Swatch2.js +69 -65
  146. package/lib/primitives/Tooltip2.js +92 -92
  147. package/lib/primitives/Typography2.js +68 -68
  148. package/lib/primitives/formatCountdown.js +39 -43
  149. package/lib/primitives/formatElapsed.js +43 -39
  150. package/lib/primitives/formatRelativeTime.js +50 -50
  151. package/lib/primitives/hotkey.js +76 -76
  152. package/lib/primitives/index.js +201 -181
  153. package/lib/primitives/maskValue.js +35 -39
  154. package/lib/style.css +1 -1
  155. package/lib/types/primitives/index.d.ts +6 -2
  156. package/package.json +1 -1
@@ -1,243 +1,243 @@
1
1
  "use client";
2
- const e = f;
3
- (function(e, t) {
4
- let n = f, r = e();
5
- for (;;) try {
6
- if (parseInt(n(377)) / 1 * (parseInt(n(416)) / 2) + parseInt(n(402)) / 3 + parseInt(n(380)) / 4 * (-parseInt(n(412)) / 5) + -parseInt(n(410)) / 6 + -parseInt(n(391)) / 7 * (parseInt(n(348)) / 8) + parseInt(n(421)) / 9 + -parseInt(n(423)) / 10 == t) break;
7
- r.push(r.shift());
8
- } catch {
9
- r.push(r.shift());
10
- }
11
- })(E, 125486);
12
- import { usePresence as t } from "../../hooks/usePresence.js";
13
- import { Inline as n, Stack as r } from "../../primitives/Layout2.js";
14
- import { useControllableState as i } from "../../hooks/useControllableState.js";
15
- import { Button as a, cx as o } from "../../primitives/index.js";
16
- import { useDismiss as s } from "../../hooks/useDismiss.js";
17
- import { Listbox as c, ListboxPopover as l, nextEnabled as u, optionId as d } from "../Listbox/Listbox2.js";
18
- /* empty css */
19
- function f(e, t) {
20
- e -= 348;
21
- let n = E(), r = n[e];
22
- f.ZinxSd === void 0 && (f.vDmEEA = function(e) {
2
+ function e(t, n) {
3
+ t -= 217;
4
+ let r = y(), i = r[t];
5
+ e.KhrHfu === void 0 && (e.HuYImu = function(e) {
23
6
  let t = "", n = "";
24
7
  for (let n = 0, r, i, a = 0; i = e.charAt(a++); ~i && (r = n % 4 ? r * 64 + i : i, n++ % 4) && (t += String.fromCharCode(255 & r >> (-2 * n & 6)))) i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);
25
8
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
26
9
  return decodeURIComponent(n);
27
- }, f.yaQLGf = {}, f.ZinxSd = !0);
28
- let i = n[0];
29
- f.woFKnK !== i && (f.yaQLGf = {}, f.woFKnK = i);
30
- let a = f.yaQLGf[e];
31
- return a === void 0 ? (r = f.vDmEEA(r), f.yaQLGf[e] = r) : r = a, r;
10
+ }, e.LNpMAp = {}, e.KhrHfu = !0);
11
+ let a = r[0];
12
+ e.LvKzrZ !== a && (e.LNpMAp = {}, e.LvKzrZ = a);
13
+ let o = e.LNpMAp[t];
14
+ return o === void 0 ? (i = e.HuYImu(i), e.LNpMAp[t] = i) : i = o, i;
32
15
  }
16
+ const t = e;
17
+ (function(t, n) {
18
+ let r = e, i = t();
19
+ for (;;) try {
20
+ if (-parseInt(r(265)) / 1 + parseInt(r(267)) / 2 + parseInt(r(249)) / 3 + parseInt(r(220)) / 4 * (parseInt(r(230)) / 5) + parseInt(r(284)) / 6 * (parseInt(r(232)) / 7) + parseInt(r(245)) / 8 * (parseInt(r(238)) / 9) + -parseInt(r(280)) / 10 == n) break;
21
+ i.push(i.shift());
22
+ } catch {
23
+ i.push(i.shift());
24
+ }
25
+ })(y, 392814);
26
+ import { usePresence as n } from "../../hooks/usePresence.js";
27
+ import { Inline as r, Stack as i } from "../../primitives/Layout2.js";
28
+ import { useControllableState as a } from "../../hooks/useControllableState.js";
29
+ import { Button as o, cx as s } from "../../primitives/index.js";
30
+ import { useDismiss as c } from "../../hooks/useDismiss.js";
31
+ import { Listbox as l, ListboxPopover as u, nextEnabled as d, optionId as f } from "../Listbox/Listbox2.js";
32
+ /* empty css */
33
33
  import { Popover as p } from "../Popover/Popover2.js";
34
34
  /* empty css */
35
35
  import { formatDuration as m, formatTime as h, minutesToTime as g, parseTimeInput as _, timeToMinutes as v } from "./time.js";
36
- /* empty css */
37
- import { useEffect as y, useId as b, useMemo as x, useRef as S, useState as C } from "react";
38
- import { Clock as ee, X as te } from "lucide-react";
39
- import { Fragment as ne, jsx as w, jsxs as T } from "react/jsx-runtime";
40
- function E() {
41
- let e = /* @__PURE__ */ "zMLUzeLUzgv4.BwfW.A2v5.C2vSzwn0.CxvLCNLtzwXLy3rVCKfSBa.y29TyM9IB3G.A2v5q29Kzq.ChvZAa.zhmTDgLTzwnVBa.C3rHCNq.C29Tzq.AgLKzgvU.qxjYB3DeB3DU.zMXVB3i.6RoG66w8ioYiMcdSNOJRIPqG7iUC6Rce7j20ioYxHUYwToYALa.C2nYB2XSvg8.y3vYCMvUDfrHCMDLDa.y2vPBa.BgLZDa.B2zM.Aw5WDxq.BgfIzwW.C3bHBG.BgvUz3rO.yNv0Dg9U.mtKWmZDqsNvct2y.BgLZDgjVEa.y3vYCMvUDa.mta1mKjnwfrNta.7iUC6RceioYEHEUGPsdRMjdRIPqG7isG7yoD.rw50zxi.vgfI.C29YDa.zgLZywjSzwq.zhmTC2vSzwn0lxrYAwDNzxiTlq.B3b0Aw9U.w2rHDgeTA2v5psi.qxjYB3DvCa.Bw91BNrLza.mZaZmdiZAhbeAejY.CgLJAW.zhmTzgf0zwzPzwXK.7iUC6RceioYNGoYASoQ4Sa.y2XVC2LUzW.zhmTDgLTzwnVBhm.zNjVBq.CxvLCNLtzwXLy3rVCG.7jIK7kcel+YyPo2BHa.zhmTC2vSzwn0lxrYAwDNzxi.zhmTDgLTzwnVBf9FAxrLBq.nJmYmZq2zu5WtM1J.sg9Tzq.rxnJyxbL.yxv0BW.zhmTy29UDhjVBa.z2v0twLUDxrLCW.BwLU.DMfSDwu.nJu3nZG2A2DNEMvv.ChjLDMvUDerLzMf1Bhq.nde2nxPRr0Xyuq.zhmTDgLTzwzPzwXK.DgfYz2v0.zM9JDxm.mtbLqwzNvvO.AxrLBxm.zgL2.zhmTzgf0zwzPzwXKx19PBNb1Da.C21VB3rO.mJe2nJKYmwDuwxf3vq.zMLUza.ntK2mJb4ugDSBvK.rw5K.qxjYB3DsAwDODa.w3jVBgu9iMXPC3rIB3GIxq.CgfYzw50rwXLBwvUDa.mtzNr1vvD2q.zhmTC2vSzwn0lxrYAwDNzxjFx2LJB24GzhmTzgf0zwzPzwXKx19Py29U.A2v5CW.C2vSzwn0zwq".split(".");
42
- return E = function() {
36
+ function y() {
37
+ let e = /* @__PURE__ */ "BgLZDa.yxv0BW.ChvZAa.zhmTy29UDhjVBa.qxjYB3DeB3DU.y29SDw1UCW.mJCZmtjwAeDSr2O.zNjVBq.zgLHBg9N.C29YDa.BwLU.rxnJyxbL.z2v0sg91CNm.w3jVBgu9iMXPC3rIB3GIxq.BgfIzwW.7iUC6RceioYNGoYASoQ4Sa.mtb1EKTXB2K.w2rHDgeTA2v5psi.mty0otqXn0rKDuHQEG.B3b0Aw9U.C2nYB2XSvg8.AxrLBxm.zhmTDgLTzwnVBf9FAxrLBq.CgLJAW.nJy2mdu4nxfJtunPuW.y3vYCMvUDfrHCMDLDa.zhmTDgLTzwzPzwXK.BgvUz3rO.z2HVC3q.C2vSzwn0zwq.vgfI.oe5tv3nwyG.Aw5JBhvKzxm.zhmTDgLTzwnVBhm.Aw5WDxq.ntq3mZCXAejYsLf4.zMXVB3i.CgfYzw50rwXLBwvUDa.C29Tzq.zhmTC2vSzwn0lxrYAwDNzxjFx2LJB24GzhmTzgf0zwzPzwXKx19Py29U.qxjYB3DsAwDODa.rw50zxi.C3bHBG.A2v5.qxjYB3DvCa.lwXPC3q.y29TyM9IB3G.A2v5CW.zhmTC2vSzwn0lxrYAwDNzxiTlq.CxvLCNLtzwXLy3rVCG.zgLZywjSzwq.mZyYmte2tvfZCufO.C21VB3rO.mtu2otiWnNvPwgP2qq.y3vYCMvUDa.zgL2.DMfSDwu.zMLUzeLUzgv4.sg9Tzq.BgLZDgjVEa.CxvLCNLtzwXLy3rVCKfSBa.yMv0D2vLBG.ChjLDMvUDerLzMf1Bhq.B2zMC2v0vg9W.zMLUza.C2vSzwn0.mtiWmtq4mJbWrLzQwhK.zhmTDgLTzwnVBa.7iUC6RceioYEHEUGPsdRMjdRIPqG7isG7yoD.zM9JDxm.nKjvwxjlAG.yNv0Dg9U.y2vPBa.C3rVCfbYB3bHz2f0Aw9U.zhmTC2vSzwn0lxrYAwDNzxi.DgfYz2v0.BwfW.zhmTC2vSzwn0lxrYAwDNzxjFx2nSzwfY.zhmTzgf0zwzPzwXKx19PBNb1Da.AxndB21WB3nPBMC.ChjPBwfYEq".split(".");
38
+ return y = function() {
43
39
  return e;
44
- }, E();
40
+ }, y();
45
41
  }
46
- var re = (e) => {
47
- let t = f, n = /* @__PURE__ */ new Date(), r = n.getHours() * 60 + n[t(407)]();
48
- return Math[t(408)](Math[t(369)](r / e) * e, 1440 - e);
42
+ /* empty css */
43
+ import { useEffect as b, useId as x, useMemo as S, useRef as C, useState as w } from "react";
44
+ import { Clock as ee, X as te } from "lucide-react";
45
+ import { Fragment as ne, jsx as T, jsxs as E } from "react/jsx-runtime";
46
+ var re = (t) => {
47
+ let n = e, r = /* @__PURE__ */ new Date(), i = r[n(226)]() * 60 + r.getMinutes();
48
+ return Math[n(224)](Math[n(286)](i / t) * t, 1440 - t);
49
49
  };
50
- function D({ value: n, defaultValue: r = null, onValueChange: a, hourCycle: y = 12, mode: E = "columns", minuteStep: D = E === "list" ? 30 : 5, min: O, max: k, isTimeDisabled: A, durationFrom: j, formatValue: M = (e) => h(e, y), placeholder: ae = e(381), clearable: oe = !0, size: se = "md", disabled: N, invalid: ce, align: le = e(361), name: ue, id: de, className: fe, maxHeight: pe, "aria-label": me }) {
51
- let P = e, F = b() + "-list", [I, L] = i(n, r, a), [R, z] = C(!1), [B, V] = C(null), [he, ge] = C(0), [H, U] = C(null), [_e, W] = C(!1), [G, K] = C(-1), q = S(null), J = S(null), ve = S(null), ye = S(null), Y = O ? v(O) : 0, X = k ? v(k) : 1439, be = (e) => e < Y || e > X || !!A?.(g(e)), xe = (e) => {
52
- for (let t = 0; t < 1440; t += D) {
50
+ function D({ value: e, defaultValue: r = null, onValueChange: i, hourCycle: o = 12, mode: y = t(219), minuteStep: b = y === t(295) ? 30 : 5, min: D, max: O, isTimeDisabled: k, durationFrom: A, formatValue: j = (e) => h(e, o), placeholder: ae = t(282), clearable: oe = !0, size: se = "md", disabled: M, invalid: ce, align: le = "start", name: ue, id: de, className: fe, maxHeight: pe, "aria-label": me }) {
51
+ let N = t, P = x() + N(259), [F, I] = a(e, r, i), [L, R] = w(!1), [z, B] = w(null), [he, ge] = w(0), [V, H] = w(null), [_e, U] = w(!1), [W, G] = w(-1), K = C(null), q = C(null), ve = C(null), ye = C(null), J = D ? v(D) : 0, Y = O ? v(O) : 1439, X = (e) => e < J || e > Y || !!k?.(g(e)), be = (e) => {
52
+ for (let t = 0; t < 1440; t += b) {
53
53
  let n = (e + t) % 1440;
54
- if (!be(n)) return n;
54
+ if (!X(n)) return n;
55
55
  }
56
56
  return e;
57
- }, Z = x(() => {
58
- let e = f;
59
- if (E !== "list") return [];
60
- let t = [], n = j ? v(j) : null;
61
- for (let r = Math[e(369)](Y / D) * D; r <= X; r += D) {
62
- let e = g(r);
63
- t.push({
64
- value: e,
65
- label: M(e),
57
+ }, Z = S(() => {
58
+ let e = N;
59
+ if (y !== e(295)) return [];
60
+ let t = [], n = A ? v(A) : null;
61
+ for (let r = Math[e(286)](J / b) * b; r <= Y; r += b) {
62
+ let i = g(r);
63
+ t[e(297)]({
64
+ value: i,
65
+ label: j(i),
66
66
  description: n !== null && r > n ? m(r - n) : void 0,
67
- disabled: !!A?.(e) || n !== null && r <= n
67
+ disabled: !!k?.(i) || n !== null && r <= n
68
68
  });
69
69
  }
70
70
  return t;
71
71
  }, [
72
- E,
72
+ y,
73
+ J,
73
74
  Y,
74
- X,
75
- D,
76
- j,
75
+ b,
77
76
  A,
78
- M
79
- ]), Se = (e) => {
77
+ k,
78
+ j
79
+ ]), xe = (e) => {
80
80
  let t = _(e);
81
- return t && !be(v(t)) ? t : null;
81
+ return t && !X(v(t)) ? t : null;
82
82
  }, Q = () => {
83
- let e = f;
84
- if (N || R) return;
85
- let t = xe(re(D));
86
- if (ge(t), V(I), E === e(370)) {
87
- let n = I ?? g(t), r = Z.findIndex((t) => t[e(409)] >= n && !t[e(385)]);
88
- K(r >= 0 ? r : u(Z, -1, 1));
83
+ let e = N;
84
+ if (M || L) return;
85
+ let t = be(re(b));
86
+ if (ge(t), B(F), y === "list") {
87
+ let n = F ?? g(t), r = Z[e(271)]((t) => t.value >= n && !t[e(264)]);
88
+ G(r >= 0 ? r : d(Z, -1, 1));
89
89
  }
90
- z(!0);
91
- }, $ = (e, t = B) => {
92
- e && t !== null && t !== I && L(t), z(!1);
93
- }, Ce = () => {
94
- if (H === null) return !0;
95
- if (!H.trim()) L(null);
90
+ R(!0);
91
+ }, $ = (e, t = z) => {
92
+ e && t !== null && t !== F && I(t), R(!1);
93
+ }, Se = () => {
94
+ if (V === null) return !0;
95
+ if (!V.trim()) I(null);
96
96
  else {
97
- let e = Se(H);
98
- if (!e) return W(!0), !1;
99
- L(e), V(e);
97
+ let e = xe(V);
98
+ if (!e) return U(!0), !1;
99
+ I(e), B(e);
100
100
  }
101
- return U(null), W(!1), !0;
102
- }, we = () => requestAnimationFrame(() => ve.current?.[P(398)]("[role=\"listbox\"]")?.[P(415)]({ preventScroll: !0 })), Te = (e) => {
103
- let t = P;
104
- e[t(385)] || (L(e[t(409)]), U(null), W(!1), z(!1));
101
+ return H(null), U(!1), !0;
102
+ }, Ce = () => requestAnimationFrame(() => ve[N(268)]?.[N(263)](N(227))?.[N(283)]({ preventScroll: !0 })), we = (e) => {
103
+ let t = N;
104
+ e.disabled || (I(e[t(270)]), H(null), U(!1), R(!1));
105
105
  };
106
- s(R && E === "list", [q, ye], () => z(!1));
107
- let Ee = t(R && E === "list"), De = (e) => {
108
- let t = P;
109
- if (!(e.nativeEvent.isComposing || e[t(358)] === 229)) {
110
- if (E === t(370) && (e[t(354)] === "ArrowDown" || e[t(354)] === t(389))) e[t(411)](), R ? K(u(Z, G, e.key === "ArrowDown" ? 1 : -1)) : Q();
111
- else switch (e[t(354)]) {
112
- case t(382):
113
- e[t(411)](), H === null ? E === "list" && R && Z[G] ? Te(Z[G]) : R && $(!0) : Ce() && z(!1);
106
+ c(L && y === "list", [K, ye], () => R(!1));
107
+ let Te = n(L && y === N(295)), Ee = (e) => {
108
+ let t = N;
109
+ if (!(e.nativeEvent[t(293)] || e.keyCode === 229)) {
110
+ if (y === t(295) && (e[t(257)] === t(218) || e[t(257)] === t(258))) e[t(276)](), L ? G(d(Z, W, e[t(257)] === t(218) ? 1 : -1)) : Q();
111
+ else switch (e[t(257)]) {
112
+ case "Enter":
113
+ e[t(276)](), V === null ? y === t(295) && L && Z[W] ? we(Z[W]) : L && $(!0) : Se() && R(!1);
114
114
  break;
115
- case t(364):
116
- e[t(411)](), Q(), we();
115
+ case t(218):
116
+ e[t(276)](), Q(), Ce();
117
117
  break;
118
- case t(404):
119
- R ? (e[t(411)](), $(!1)) : H !== null && (U(null), W(!1));
118
+ case t(225):
119
+ L ? (e.preventDefault(), $(!1)) : V !== null && (H(null), U(!1));
120
120
  break;
121
- case t(383): R && E === t(370) && z(!1);
121
+ case t(244): L && y === t(295) && R(!1);
122
122
  }
123
123
  }
124
- }, Oe = R && E === "columns" ? B ?? I : I, ke = T(P(418), {
125
- ref: q,
126
- className: o(P(406), P(400), P(393), P(413), se !== "md" && P(386) + se, fe),
127
- "data-open": R || void 0,
124
+ }, De = L && y === "columns" ? z ?? F : F, Oe = E(N(269), {
125
+ ref: K,
126
+ className: s(N(217), N(288), "ds-datefield", N(240), se !== "md" && N(262) + se, fe),
127
+ "data-open": L || void 0,
128
128
  "data-invalid": ce || _e || void 0,
129
- "data-disabled": N || void 0,
129
+ "data-disabled": M || void 0,
130
130
  onPointerDown: (e) => {
131
- let t = P;
132
- N || e[t(414)] === J[t(379)] || (e[t(411)](), J[t(379)]?.[t(415)](), Q());
131
+ let t = N;
132
+ M || e[t(289)] === q[t(268)] || (e[t(276)](), q.current?.[t(283)](), Q());
133
133
  },
134
134
  children: [
135
- w(P(372), {
136
- ref: J,
135
+ T(N(248), {
136
+ ref: q,
137
137
  id: de,
138
- className: P(419),
139
- value: H ?? (Oe ? M(Oe) : ""),
138
+ className: N(292),
139
+ value: V ?? (De ? j(De) : ""),
140
140
  placeholder: ae,
141
- disabled: N,
142
- role: E === "list" ? P(357) : void 0,
141
+ disabled: M,
142
+ role: y === N(295) ? N(260) : void 0,
143
143
  "aria-label": me,
144
144
  "aria-invalid": ce || _e || void 0,
145
- "aria-haspopup": E === P(370) ? P(378) : "dialog",
146
- "aria-expanded": R,
147
- "aria-controls": E === P(370) && R ? F : void 0,
148
- "aria-activedescendant": E === P(370) && R && G >= 0 ? d(F, G) : void 0,
149
- autoComplete: P(371),
145
+ "aria-haspopup": y === N(295) ? N(273) : N(222),
146
+ "aria-expanded": L,
147
+ "aria-controls": y === N(295) && L ? P : void 0,
148
+ "aria-activedescendant": y === "list" && L && W >= 0 ? f(P, W) : void 0,
149
+ autoComplete: "off",
150
150
  onClick: Q,
151
- onFocus: (e) => e[P(414)][P(355)](),
151
+ onFocus: (e) => e[N(289)][N(279)](),
152
152
  onChange: (e) => {
153
- let t = P, n = e.target.value;
154
- U(n), W(!1);
155
- let r = Se(n);
156
- if (r && (V(r), E === t(370))) {
157
- let e = Z.findIndex((e) => e.value >= r && !e[t(385)]);
158
- e >= 0 && K(e);
153
+ let t = N, n = e.target[t(270)];
154
+ H(n), U(!1);
155
+ let r = xe(n);
156
+ if (r && (B(r), y === t(295))) {
157
+ let e = Z.findIndex((e) => e[t(270)] >= r && !e[t(264)]);
158
+ e >= 0 && G(e);
159
159
  }
160
- R || Q();
160
+ L || Q();
161
161
  },
162
- onKeyDown: De,
162
+ onKeyDown: Ee,
163
163
  onBlur: () => {
164
- !Ce() && (U(null), W(!1));
164
+ !Se() && (H(null), U(!1));
165
165
  }
166
166
  }),
167
- w(P(374), {
168
- className: P(349),
167
+ T(N(256), {
168
+ className: N(253),
169
169
  "aria-hidden": !0,
170
- children: w(ee, {})
170
+ children: T(ee, {})
171
171
  }),
172
- oe && I && !N && H === null && w(P(374), {
173
- role: P(376),
172
+ oe && F && !M && V === null && T("span", {
173
+ role: N(285),
174
174
  tabIndex: -1,
175
- "aria-label": P(394),
176
- className: "ds-select-trigger__clear",
177
- onPointerDown: (e) => e.stopPropagation(),
175
+ "aria-label": N(229),
176
+ className: N(291),
177
+ onPointerDown: (e) => e[N(287)](),
178
178
  onClick: () => {
179
- let e = P;
180
- L(null), V(null), J[e(379)]?.[e(415)]();
179
+ let e = N;
180
+ I(null), B(null), q[e(268)]?.[e(283)]();
181
181
  },
182
- children: w(te, {})
182
+ children: T(te, {})
183
183
  }),
184
- ue && w(P(372), {
185
- type: P(363),
184
+ ue && T(N(248), {
185
+ type: "hidden",
186
186
  name: ue,
187
- value: I ?? ""
187
+ value: F ?? ""
188
188
  })
189
189
  ]
190
190
  });
191
- return E === "list" ? T(ne, { children: [ke, Ee[P(390)] && w(l, {
191
+ return y === N(295) ? E(ne, { children: [Oe, Te.mounted && T(u, {
192
192
  ref: ye,
193
- closing: Ee[P(395)],
194
- anchorRef: q,
193
+ closing: Te.closing,
194
+ anchorRef: K,
195
195
  maxHeight: pe ?? 280,
196
- children: w(c, {
197
- id: F,
196
+ children: T(l, {
197
+ id: P,
198
198
  options: Z,
199
- activeIndex: G,
200
- isSelected: (e) => e === I,
201
- onSelect: Te,
202
- onActiveChange: K,
199
+ activeIndex: W,
200
+ isSelected: (e) => e === F,
201
+ onSelect: we,
202
+ onActiveChange: G,
203
203
  "aria-label": me ?? "시간",
204
- emptyText: P(366)
204
+ emptyText: "고를 수 있는 시간이 없어요"
205
205
  })
206
- })] }) : w(p, {
207
- open: R,
206
+ })] }) : T(p, {
207
+ open: L,
208
208
  onOpenChange: (e) => e ? Q() : $(!0),
209
209
  openOn: "manual",
210
210
  align: le,
211
211
  padding: "sm",
212
212
  autoFocus: !1,
213
213
  "aria-label": "시간 선택",
214
- trigger: ke,
215
- children: w(ie, {
214
+ trigger: Oe,
215
+ children: T(ie, {
216
216
  ref: ve,
217
- time: B,
217
+ time: z,
218
218
  base: he,
219
- hourCycle: y,
220
- minuteStep: D,
221
- blocked: be,
219
+ hourCycle: o,
220
+ minuteStep: b,
221
+ blocked: X,
222
222
  onChange: (e) => {
223
- V(e), U(null), W(!1);
223
+ B(e), H(null), U(!1);
224
224
  },
225
225
  onCommit: (e) => $(!0, e),
226
226
  onCancel: () => $(!1),
227
- onNow: () => V(g(xe(re(D))))
227
+ onNow: () => B(g(be(re(b))))
228
228
  })
229
229
  });
230
230
  }
231
231
  var O = (e) => String(e).padStart(2, "0");
232
- function ie({ ref: t, time: i, base: o, hourCycle: s, minuteStep: c, blocked: l, onChange: u, onCommit: d, onCancel: f, onNow: p }) {
233
- let m = e, h = i ? v(i) : o, _ = Math[m(365)](h / 60), y = h % 60, b = _ < 12 ? "am" : "pm", x = Array[m(397)]({ length: Math[m(369)](60 / c) }, (e, t) => t * c);
234
- !x.includes(y) && (x[m(359)](y), x[m(384)]((e, t) => e - t));
232
+ function ie({ ref: e, time: n, base: a, hourCycle: s, minuteStep: c, blocked: l, onChange: u, onCommit: d, onCancel: f, onNow: p }) {
233
+ let m = t, h = n ? v(n) : a, _ = Math[m(250)](h / 60), y = h % 60, b = _ < 12 ? "am" : "pm", x = Array.from({ length: Math[m(286)](60 / c) }, (e, t) => t * c);
234
+ !x[m(246)](y) && (x[m(297)](y), x[m(223)]((e, t) => e - t));
235
235
  let S = (e) => {
236
236
  let t = m;
237
237
  if (!l(e * 60 + y)) return e * 60 + y;
238
- let n = x[t(422)]((t) => !l(e * 60 + t));
238
+ let n = x[t(278)]((t) => !l(e * 60 + t));
239
239
  return e * 60 + (n ?? y);
240
- }, C = (e) => x[m(362)]((t) => !l(e * 60 + t)), ee = (s === 12 ? [
240
+ }, C = (e) => x[m(252)]((t) => !l(e * 60 + t)), w = (s === 12 ? [
241
241
  0,
242
242
  1,
243
243
  2,
@@ -250,139 +250,138 @@ function ie({ ref: t, time: i, base: o, hourCycle: s, minuteStep: c, blocked: l,
250
250
  9,
251
251
  10,
252
252
  11
253
- ][m(353)]((e) => b === "pm" ? e + 12 : e) : [...Array(24)[m(350)]()])[m(353)]((e) => ({
253
+ ][m(290)]((e) => b === "pm" ? e + 12 : e) : [...Array(24)[m(261)]()])[m(290)]((e) => ({
254
254
  key: String(e),
255
255
  label: s === 12 ? String(e % 12 == 0 ? 12 : e % 12) : O(e),
256
256
  disabled: !C(e),
257
257
  pick: () => S(e)
258
- })), te = x[m(353)]((e) => ({
258
+ })), ee = x.map((e) => ({
259
259
  key: String(e),
260
260
  label: O(e),
261
261
  disabled: l(_ * 60 + e),
262
262
  pick: () => _ * 60 + e
263
- })), ne = ["am", "pm"][m(353)]((e) => {
263
+ })), te = ["am", "pm"][m(290)]((e) => {
264
264
  let t = m, n = e === "am" ? 0 : 12, r = _ % 12 + n;
265
265
  return {
266
266
  key: e,
267
267
  label: e === "am" ? "오전" : "오후",
268
- disabled: !Array.from({ length: 12 }, (e, t) => n + t)[t(362)](C),
268
+ disabled: !Array[t(221)]({ length: 12 }, (e, t) => n + t)[t(252)](C),
269
269
  pick: () => {
270
- let e = t;
271
270
  if (C(r)) return S(r);
272
- let i = Array[e(397)]({ length: 12 }, (e, t) => n + t)[e(422)](C) ?? r;
273
- return S(i);
271
+ let e = Array.from({ length: 12 }, (e, t) => n + t).find(C) ?? r;
272
+ return S(e);
274
273
  }
275
274
  };
276
- }), E = [
275
+ }), ne = [
277
276
  ...s === 12 ? [{
278
- label: m(399),
279
- items: ne,
277
+ label: "오전/오후",
278
+ items: te,
280
279
  selected: b
281
280
  }] : [],
282
281
  {
283
282
  label: "시",
284
- items: ee,
283
+ items: w,
285
284
  selected: String(_)
286
285
  },
287
286
  {
288
287
  label: "분",
289
- items: te,
288
+ items: ee,
290
289
  selected: String(y)
291
290
  }
292
291
  ];
293
- return T(r, {
292
+ return E(i, {
294
293
  gap: 2,
295
- children: [w(m(418), {
296
- ref: t,
297
- className: m(396),
298
- children: E[m(353)]((e, t) => w(k, {
299
- label: e[m(373)],
300
- items: e[m(417)],
301
- selectedKey: i ? e[m(351)] : null,
302
- focusKey: e[m(351)],
303
- onPick: (e) => u(g(e[m(392)]())),
304
- onCommit: (e) => d(e ? g(e[m(392)]()) : void 0),
294
+ children: [T(m(269), {
295
+ ref: e,
296
+ className: m(247),
297
+ children: ne[m(290)]((e, t) => T(k, {
298
+ label: e.label,
299
+ items: e[m(235)],
300
+ selectedKey: n ? e[m(243)] : null,
301
+ focusKey: e[m(243)],
302
+ onPick: (e) => u(g(e[m(237)]())),
303
+ onCommit: (e) => d(e ? g(e.pick()) : void 0),
305
304
  onCancel: f,
306
305
  onMoveColumn: (e, n) => {
307
306
  let r = m;
308
- (n[r(427)]?.[r(356)](r(426)))?.[t + e]?.[r(415)]({ preventScroll: !0 });
307
+ (n[r(251)]?.[r(274)](r(227)))?.[t + e]?.[r(283)]({ preventScroll: !0 });
309
308
  }
310
- }, e[m(373)]))
311
- }), T(n, {
312
- justify: "between",
309
+ }, e.label))
310
+ }), E(r, {
311
+ justify: m(275),
313
312
  gap: 2,
314
- children: [w(a, {
315
- variant: "ghost",
313
+ children: [T(o, {
314
+ variant: m(242),
316
315
  size: "sm",
317
316
  onClick: p,
318
317
  children: "지금"
319
- }), w(a, {
320
- variant: "primary",
318
+ }), T(o, {
319
+ variant: m(294),
321
320
  size: "sm",
322
321
  onClick: () => d(),
323
- disabled: !i,
322
+ disabled: !n,
324
323
  children: "확인"
325
324
  })]
326
325
  })]
327
326
  });
328
327
  }
329
- function k({ label: t, items: n, selectedKey: r, focusKey: i, onPick: a, onCommit: o, onCancel: s, onMoveColumn: c }) {
330
- let l = e, d = b(), f = S(null), p = S(!1), m = n[l(352)]((e) => e[l(354)] === i);
331
- return y(() => {
332
- let e = l, t = f[e(379)], n = t?.querySelector(e(388) + i + "\"]");
333
- t && n && (t[e(367)]({
334
- top: n.offsetTop - 4,
335
- behavior: p[e(379)] ? e(420) : e(405)
336
- }), p[e(379)] = !0);
337
- }, [i]), w("div", {
328
+ function k({ label: e, items: n, selectedKey: r, focusKey: i, onPick: a, onCommit: o, onCancel: s, onMoveColumn: c }) {
329
+ let l = t, u = x(), f = C(null), p = C(!1), m = n[l(271)]((e) => e.key === i);
330
+ return b(() => {
331
+ let e = l, t = f.current, n = t?.[e(263)](e(231) + i + "\"]");
332
+ t && n && (t[e(234)]({
333
+ top: n[e(277)] - 4,
334
+ behavior: p[e(268)] ? e(266) : e(296)
335
+ }), p[e(268)] = !0);
336
+ }, [i]), T("div", {
338
337
  ref: f,
339
- role: "listbox",
338
+ role: l(273),
340
339
  tabIndex: 0,
341
- "aria-label": t,
342
- "aria-activedescendant": m >= 0 ? d + "-" + m : void 0,
343
- className: l(360),
340
+ "aria-label": e,
341
+ "aria-activedescendant": m >= 0 ? u + "-" + m : void 0,
342
+ className: l(281),
344
343
  onKeyDown: (e) => {
345
344
  let t = l;
346
- switch (e.key) {
347
- case t(364):
348
- case t(389): {
349
- e[t(411)]();
350
- let i = r === null && m >= 0 && !n[m].disabled ? m : u(n, m, e[t(354)] === t(364) ? 1 : -1);
345
+ switch (e[t(257)]) {
346
+ case t(218):
347
+ case t(258): {
348
+ e[t(276)]();
349
+ let i = r === null && m >= 0 && !n[m].disabled ? m : d(n, m, e[t(257)] === "ArrowDown" ? 1 : -1);
351
350
  i >= 0 && a(n[i]);
352
351
  break;
353
352
  }
354
- case t(403):
355
- case t(424): {
356
- e[t(411)]();
357
- let r = e[t(354)] === t(403) ? u(n, -1, 1) : u(n, n[t(375)], -1);
353
+ case t(272):
354
+ case "End": {
355
+ e.preventDefault();
356
+ let r = e[t(257)] === t(272) ? d(n, -1, 1) : d(n, n[t(241)], -1);
358
357
  r >= 0 && a(n[r]);
359
358
  break;
360
359
  }
361
360
  case "ArrowLeft":
362
- case "ArrowRight":
363
- e[t(411)](), c(e[t(354)] === t(425) ? 1 : -1, e[t(368)]);
361
+ case t(254):
362
+ e[t(276)](), c(e[t(257)] === "ArrowRight" ? 1 : -1, e[t(239)]);
364
363
  break;
365
- case t(382):
364
+ case t(255):
366
365
  case " ": {
367
366
  e.preventDefault();
368
- let i = r === null && m >= 0 && !n[m][t(385)] ? n[m] : void 0;
369
- i && a(i), e.key === t(382) && o(i);
367
+ let i = r === null && m >= 0 && !n[m].disabled ? n[m] : void 0;
368
+ i && a(i), e[t(257)] === t(255) && o(i);
370
369
  break;
371
370
  }
372
- case t(404): e.preventDefault(), s();
371
+ case t(225): e[t(276)](), s();
373
372
  }
374
373
  },
375
- children: n.map((e, t) => w("div", {
376
- id: d + "-" + t,
377
- "data-key": e[l(354)],
378
- role: l(387),
379
- "aria-selected": e.key === r,
374
+ children: n[l(290)]((e, t) => T(l(269), {
375
+ id: u + "-" + t,
376
+ "data-key": e[l(257)],
377
+ role: l(233),
378
+ "aria-selected": e[l(257)] === r,
380
379
  "aria-disabled": e.disabled || void 0,
381
380
  "data-focus": t === m || void 0,
382
- className: l(401),
383
- onClick: () => !e[l(385)] && a(e),
384
- children: e[l(373)]
385
- }, e.key))
381
+ className: l(236),
382
+ onClick: () => !e[l(264)] && a(e),
383
+ children: e[l(228)]
384
+ }, e[l(257)]))
386
385
  });
387
386
  }
388
387
  export { D as TimePicker };