@iamfiro/design 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/agents/app-shell/AGENTS.md +99 -1
  2. package/lib/components/Accordion/Accordion2.js +93 -93
  3. package/lib/components/ActionBar/ActionBar2.js +44 -40
  4. package/lib/components/Alert/Alert2.js +64 -64
  5. package/lib/components/AppShell/AppShell2.js +73 -66
  6. package/lib/components/AreaChart/AreaChart.js +49 -47
  7. package/lib/components/BarChart/BarChart2.js +107 -107
  8. package/lib/components/BarList/BarList2.js +99 -99
  9. package/lib/components/Breadcrumb/Breadcrumb2.js +53 -56
  10. package/lib/components/Calendar/Calendar2.js +164 -164
  11. package/lib/components/Calendar/DatePicker2.js +76 -77
  12. package/lib/components/Calendar/date.js +49 -70
  13. package/lib/components/Card/Card2.js +104 -77
  14. package/lib/components/CardFrame/CardFrame2.js +46 -42
  15. package/lib/components/Chart/ChartParts.js +73 -73
  16. package/lib/components/Chart/chart2.js +53 -53
  17. package/lib/components/Chart/useChartInteraction.js +49 -49
  18. package/lib/components/ChatBubble/ChatBubble2.js +118 -118
  19. package/lib/components/ChatBubble/formatChatTime.js +42 -41
  20. package/lib/components/ChatComposer/ChatComposer2.js +102 -102
  21. package/lib/components/CodeBlock/CodeBlock2.js +51 -51
  22. package/lib/components/CodeBlock/highlight.js +85 -85
  23. package/lib/components/ColorPicker/ColorPicker2.js +373 -374
  24. package/lib/components/ColorPicker/color.js +94 -94
  25. package/lib/components/ColorPicker/presets.js +47 -46
  26. package/lib/components/Combobox/Combobox2.js +118 -117
  27. package/lib/components/CommandMenu/CommandMenu.js +121 -122
  28. package/lib/components/Comment/Comment2.js +56 -81
  29. package/lib/components/ContextMenu/ContextMenu2.js +91 -93
  30. package/lib/components/DataGrid/DataGrid2.js +845 -845
  31. package/lib/components/DataGrid/GridPopover.js +97 -97
  32. package/lib/components/DataGrid/anchor.js +34 -36
  33. package/lib/components/DataGrid/model.js +299 -299
  34. package/lib/components/DataGrid/panels.js +393 -393
  35. package/lib/components/DataGrid/typeMeta.js +53 -53
  36. package/lib/components/DataGrid/types.js +22 -22
  37. package/lib/components/DescriptionList/DescriptionList2.js +57 -57
  38. package/lib/components/Dialog/AlertDialog.js +56 -56
  39. package/lib/components/Dialog/Dialog2.js +68 -69
  40. package/lib/components/Dialog/modal.js +61 -57
  41. package/lib/components/Drawer/Drawer2.js +161 -161
  42. package/lib/components/DropdownMenu/DropdownMenu2.js +267 -267
  43. package/lib/components/DropdownMenu/menuCore.js +42 -68
  44. package/lib/components/Dropzone/Dropzone2.js +81 -81
  45. package/lib/components/EmptyState/EmptyState2.js +55 -54
  46. package/lib/components/FileChip/FileChip2.js +39 -63
  47. package/lib/components/FileUpload/FileUpload.js +157 -156
  48. package/lib/components/FilterChips/FilterChips2.js +51 -51
  49. package/lib/components/FunnelChart/FunnelChart2.js +171 -171
  50. package/lib/components/FunnelChart/funnel.js +55 -57
  51. package/lib/components/Highlight/Highlight2.js +48 -48
  52. package/lib/components/HoverCard/HoverCard.js +59 -59
  53. package/lib/components/InlineDiff/InlineDiff2.js +110 -111
  54. package/lib/components/InlineDiff/diff.js +89 -89
  55. package/lib/components/InlineDiff/useDiffReview.js +63 -65
  56. package/lib/components/Kanban/Kanban2.js +424 -425
  57. package/lib/components/Kanban/KanbanCard.js +98 -73
  58. package/lib/components/Kanban/move.js +52 -49
  59. package/lib/components/LineChart/LineChart2.js +222 -222
  60. package/lib/components/List/List2.js +60 -59
  61. package/lib/components/Listbox/Listbox2.js +117 -117
  62. package/lib/components/Marker/Marker2.js +58 -59
  63. package/lib/components/Menubar/Menubar2.js +121 -123
  64. package/lib/components/MultiSelect/MultiSelect2.js +115 -115
  65. package/lib/components/NavigationMenu/NavigationMenu2.js +277 -276
  66. package/lib/components/NoticeStack/NoticeStack2.js +98 -98
  67. package/lib/components/NumberStepper/NumberStepper2.js +67 -66
  68. package/lib/components/OtpInput/OtpInput2.js +93 -93
  69. package/lib/components/Pagination/Pagination2.js +87 -87
  70. package/lib/components/Pagination/paginationRange.js +39 -37
  71. package/lib/components/PhoneInput/PhoneInput.js +78 -78
  72. package/lib/components/PieChart/PieChart2.js +117 -117
  73. package/lib/components/PieChart/arc.js +57 -58
  74. package/lib/components/PieChart/useArcTween.js +45 -40
  75. package/lib/components/Popover/Popover2.js +73 -74
  76. package/lib/components/ProgressTracker/ProgressTracker2.js +128 -128
  77. package/lib/components/Rating/Rating2.js +95 -95
  78. package/lib/components/Resizable/Resizable2.js +86 -86
  79. package/lib/components/Resizable/layout.js +73 -73
  80. package/lib/components/ScaledPreview/ScaledPreview2.js +68 -68
  81. package/lib/components/ScatterChart/ScatterChart2.js +172 -172
  82. package/lib/components/ScatterChart/scatter.js +55 -56
  83. package/lib/components/ScrollArea/ScrollArea2.js +130 -131
  84. package/lib/components/Select/Select2.js +86 -85
  85. package/lib/components/Sidebar/Sidebar2.js +92 -86
  86. package/lib/components/Sidebar/rail.js +43 -0
  87. package/lib/components/Skeleton/Skeleton2.js +60 -61
  88. package/lib/components/Slider/Slider2.js +73 -73
  89. package/lib/components/SocialLoginButton/SocialLoginButton.js +54 -55
  90. package/lib/components/SparkChart/SparkChart2.js +140 -141
  91. package/lib/components/SparkChart/spark.js +50 -48
  92. package/lib/components/Sparkbar/Sparkbar2.js +56 -56
  93. package/lib/components/SplitView/SplitView2.js +47 -46
  94. package/lib/components/Stat/Stat2.js +61 -61
  95. package/lib/components/StepList/StepList2.js +76 -76
  96. package/lib/components/Table/Table2.js +70 -70
  97. package/lib/components/Tabs/Tabs2.js +85 -85
  98. package/lib/components/TagInput/TagInput2.js +217 -218
  99. package/lib/components/TimePicker/TimePicker2.js +217 -216
  100. package/lib/components/TimePicker/time.js +60 -58
  101. package/lib/components/Timeline/Timeline2.js +181 -181
  102. package/lib/components/Timeline/scale.js +60 -65
  103. package/lib/components/Toast/Toaster.js +146 -148
  104. package/lib/components/Toast/store.js +85 -85
  105. package/lib/components/ToggleGroup/ToggleGroup2.js +79 -79
  106. package/lib/components/Toolbar/Toolbar2.js +120 -121
  107. package/lib/components/Tracker/Tracker2.js +79 -79
  108. package/lib/components/TreeDiagram/TreeDiagram2.js +116 -116
  109. package/lib/components/TreeView/TreeView2.js +162 -163
  110. package/lib/hooks/timing.js +32 -35
  111. package/lib/hooks/useControllableState.js +35 -35
  112. package/lib/hooks/useCountdown.js +53 -52
  113. package/lib/hooks/useDigitInput.js +82 -81
  114. package/lib/hooks/useDismiss.js +48 -48
  115. package/lib/hooks/useElapsed.js +40 -43
  116. package/lib/hooks/useFloating.js +47 -47
  117. package/lib/hooks/useFocusTrap.js +45 -69
  118. package/lib/hooks/usePresence.js +49 -50
  119. package/lib/hooks/usePressToOpen.js +43 -43
  120. package/lib/hooks/useScrollLock.js +45 -43
  121. package/lib/hooks/useSelection.js +44 -46
  122. package/lib/index.js +105 -106
  123. package/lib/primitives/AspectRatio2.js +57 -56
  124. package/lib/primitives/BrandIcon.js +177 -177
  125. package/lib/primitives/ColorDot2.js +44 -48
  126. package/lib/primitives/CopyButton2.js +54 -55
  127. package/lib/primitives/CountBadge2.js +45 -48
  128. package/lib/primitives/Countdown2.js +35 -37
  129. package/lib/primitives/Delta2.js +41 -41
  130. package/lib/primitives/Elapsed.js +43 -41
  131. package/lib/primitives/FileIcon2.js +94 -94
  132. package/lib/primitives/Flag2.js +97 -97
  133. package/lib/primitives/IconStack2.js +53 -55
  134. package/lib/primitives/IconTile2.js +45 -41
  135. package/lib/primitives/Kbd2.js +57 -57
  136. package/lib/primitives/Layout2.js +66 -66
  137. package/lib/primitives/Link2.js +42 -47
  138. package/lib/primitives/MaskedText2.js +47 -69
  139. package/lib/primitives/Progress2.js +71 -71
  140. package/lib/primitives/RelativeTime.js +47 -43
  141. package/lib/primitives/SearchInput2.js +70 -66
  142. package/lib/primitives/SelectorButton2.js +70 -67
  143. package/lib/primitives/Spinner2.js +58 -59
  144. package/lib/primitives/StatusIcon2.js +70 -70
  145. package/lib/primitives/Swatch2.js +57 -55
  146. package/lib/primitives/Tooltip2.js +78 -78
  147. package/lib/primitives/Typography2.js +54 -54
  148. package/lib/primitives/formatCountdown.js +37 -38
  149. package/lib/primitives/formatElapsed.js +46 -45
  150. package/lib/primitives/formatRelativeTime.js +43 -69
  151. package/lib/primitives/hotkey.js +66 -66
  152. package/lib/primitives/index.js +152 -152
  153. package/lib/primitives/maskValue.js +30 -32
  154. package/lib/style.css +1 -1
  155. package/lib/types/components/AppShell/AppShell.d.ts +9 -2
  156. package/lib/types/components/Sidebar/rail.d.ts +4 -0
  157. package/lib/types/components/index.d.ts +1 -0
  158. package/package.json +1 -1
@@ -1,73 +1,73 @@
1
1
  "use client";
2
- const e = E;
3
- (function(e, t) {
4
- let n = E, r = e();
2
+ function e(t, n) {
3
+ t -= 219;
4
+ let r = p(), i = r[t];
5
+ e.Jxiqpd === void 0 && (e.bPvqkZ = function(e) {
6
+ let t = "", n = "";
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);
8
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
9
+ return decodeURIComponent(n);
10
+ }, e.mKJgiz = {}, e.Jxiqpd = !0);
11
+ let a = r[0];
12
+ e.zEfzCO !== a && (e.mKJgiz = {}, e.zEfzCO = a);
13
+ let o = e.mKJgiz[t];
14
+ return o === void 0 ? (i = e.bPvqkZ(i), e.mKJgiz[t] = i) : i = o, i;
15
+ }
16
+ const t = e;
17
+ (function(t, n) {
18
+ let r = e, i = t();
5
19
  for (;;) try {
6
- if (-parseInt(n(481)) / 1 + -parseInt(n(503)) / 2 + parseInt(n(453)) / 3 + -parseInt(n(523)) / 4 * (parseInt(n(475)) / 5) + -parseInt(n(518)) / 6 + parseInt(n(534)) / 7 + -parseInt(n(460)) / 8 * (-parseInt(n(483)) / 9) == t) break;
7
- r.push(r.shift());
20
+ if (parseInt(r(265)) / 1 + -parseInt(r(293)) / 2 + parseInt(r(268)) / 3 + -parseInt(r(234)) / 4 * (-parseInt(r(250)) / 5) + parseInt(r(261)) / 6 * (parseInt(r(270)) / 7) + parseInt(r(240)) / 8 * (parseInt(r(259)) / 9) + -parseInt(r(277)) / 10 * (parseInt(r(246)) / 11) == n) break;
21
+ i.push(i.shift());
8
22
  } catch {
9
- r.push(r.shift());
23
+ i.push(i.shift());
10
24
  }
11
- })(v, 860124);
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";
25
+ })(p, 983887);
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";
18
32
  /* empty css */
19
- import { Popover as f } from "../Popover/Popover2.js";
20
- /* empty css */
21
- import { formatDuration as p, formatTime as m, minutesToTime as h, parseTimeInput as g, timeToMinutes as _ } from "./time.js";
22
- /* empty css */
23
- function v() {
24
- let e = /* @__PURE__ */ "B2zM.Aw5JBhvKzxm.y29SDw1UCW.C3bHBG.w2rHDgeTA2v5psi.y29TyM9IB3G.BgvUz3rO.ndG1ntK5mMjfu3bJta.CxvLCNLtzwXLy3rVCG.yMv0D2vLBG.vgfI.C2vSzwn0.mJrMEg1WzuG.C3rVCfbYB3bHz2f0Aw9U.A2v5q29Kzq.CxvLCNLtzwXLy3rVCKfSBa.zhmTDgLTzwnVBhm.zMLUzeLUzgv4.C21VB3rO.rw50zxi.zhmTDgLTzwnVBf9FAxrLBq.z2v0sg91CNm.yNv0Dg9U.odCYmZa1CNftu3r3.rxnJyxbL.C29YDa.zhmTC2vSzwn0lxrYAwDNzxiTlq.zMXVB3i.mJGYodiYovjVAgLLDG.yxv0BW.B2zMC2v0vg9W.zM9JDxm.AgLKzgvU.rw5K.BgLZDgjVEa.ogHUzuL5ta.BwfW.y3vYCMvUDfrHCMDLDa.ChvZAa.DMfSDwu.z2HVC3q.zhmTDgLTzwnVBa.C2nYB2XSvg8.zhmTzgf0zwzPzwXK.C29Tzq.zgLZywjSzwq.Bw91BNrLza.y3vYCMvUDa.BgLZDa.lwXPC3q.nta5mJKWtuLxzxvA.CgfKu3rHCNq.CgLJAW.Aw5WDxq.zhmTC2vSzwn0lxrYAwDNzxjFx2nSzwfY.A2v5.nti4mdC0z0nmugXM.z2v0twLUDxrLCW.mJGWmJyXotHMu3vzq2S.BwfUDwfS.qxjYB3DeB3DU.7iUC6RceioYNGoYASoQ4Sa.DgfYz2v0.zNjVBq.BgfIzwW.qxjYB3Dmzwz0.7jIK7kcel+YyPo2BHa.w3jVBgu9iMXPC3rIB3GIxq.ChjLDMvUDerLzMf1Bhq.y2vPBa.6RoG66w8ioYiMcdSNOJRIPqG7iUC6Rce7j20ioYxHUYwToYALa.sg9Tzq.C3rHCNq.zhmTy29UDhjVBa.zMLUza.zhmTDgLTzwzPzwXK.C2vSzwn0zwq.7iUC6RceioYeOo2dNq.mJC0ntqWneDqrMLvsG.y2XVC2LUzW.zgLHBg9N.zgL2.B3b0Aw9U.zhmTC2vSzwn0lxrYAwDNzxi.qxjYB3DsAwDODa.ChjPBwfYEq".split(".");
25
- return v = function() {
33
+ function p() {
34
+ let e = /* @__PURE__ */ "C29YDa.7iUC6RceioYeOo2dNq.qxjYB3DeB3DU.y2vPBa.zhmTC2vSzwn0lxrYAwDNzxjFx2nSzwfY.yxv0BW.mJG2mtaXntbXu2XVy3e.Aw5WDxq.A2v5.zgLZywjSzwq.7jIK7kcel+YyPo2BHa.zgL2.DgfYz2v0.A2v5CW.CxvLCNLtzwXLy3rVCG.CgLJAW.yMv0D2vLBG.ChvZAa.BwfW.AxndB21WB3nPBMC.qxjYB3DsAwDODa.A2v5q29Kzq.mtC4mtm5ngjjBgfyra.y2XVC2LUzW.zMLUza.C3rHCNq.AxrLBxm.DhjPBq.BgfIzwW.BgLZDa.C3rVCfbYB3bHz2f0Aw9U.C29Tzq.ChjLDMvUDerLzMf1Bhq.B2zMC2v0vg9W.6RoG66w8ioYiMcdSNOJRIPqG7iUC6Rce7j20ioYxHUYwToYALa.B3b0Aw9U.zhmTDgLTzwnVBhm.CgfKu3rHCNq.ng56tgXkCW.z2v0sg91CNm.C2vSzwn0zwq.zhmTC2vSzwn0lxrYAwDNzxi.C3bHBG.CgfYzw50rwXLBwvUDa.ohbOuKjPvG.BgLZDgjVEa.rxnJyxbL.zhmTC2vSzwn0lxrYAwDNzxiTlq.sg9Tzq.CxvLCNLtzwXLy3rVCKfSBa.mtf4vfvHtMe.zhmTzgf0zwzPzwXK.zM9JDxm.7iUC6RceioYNGoYASoQ4Sa.otmWote4nwPfAwvnzW.zNjVBq.zMXVB3i.B2zM.C2nYB2XSvg8.w3jVBgu9iMXPC3rIB3GIxq.DMfSDwu.y3vYCMvUDa.rw50zxi.nJu3otK5owzyDNrLBW.qxjYB3DvCa.nJzgywHxrMS.C2vSzwn0.zMLUzeLUzgv4.y29SDw1UCW.mte1nZm5nuPAsLjXtW.ChjPBwfYEq.zgLHBg9N.mtmXmZqYnePJAKrzwG.BwLU.mZq4mZC2ze9rAhLP".split(".");
35
+ return p = function() {
26
36
  return e;
27
- }, v();
37
+ }, p();
28
38
  }
39
+ import { Popover as m } from "../Popover/Popover2.js";
40
+ /* empty css */
41
+ import { formatDuration as ee, formatTime as h, minutesToTime as g, parseTimeInput as _, timeToMinutes as v } from "./time.js";
42
+ /* empty css */
29
43
  import { useEffect as y, useId as b, useMemo as x, useRef as S, useState as C } from "react";
30
- import { Clock as ee, X as te } from "lucide-react";
31
- import { Fragment as ne, jsx as w, jsxs as T } from "react/jsx-runtime";
32
- function E(e, t) {
33
- e -= 450;
34
- let n = v(), r = n[e];
35
- E.qpxEXE === void 0 && (E.EWTCFo = function(e) {
36
- let t = "", n = "";
37
- 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);
38
- for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
39
- return decodeURIComponent(n);
40
- }, E.uzKQpo = {}, E.qpxEXE = !0);
41
- let i = n[0];
42
- E.aYfbNL !== i && (E.uzKQpo = {}, E.aYfbNL = i);
43
- let a = E.uzKQpo[e];
44
- return a === void 0 ? (r = E.EWTCFo(r), E.uzKQpo[e] = r) : r = a, r;
45
- }
46
- var re = (e) => {
47
- let t = E, n = /* @__PURE__ */ new Date(), r = n[t(532)]() * 60 + n[t(482)]();
48
- return Math.min(Math[t(494)](r / e) * e, 1440 - e);
44
+ import { Clock as te, X as ne } from "lucide-react";
45
+ import { Fragment as re, jsx as w, jsxs as T } from "react/jsx-runtime";
46
+ var ie = (t) => {
47
+ let n = e, r = /* @__PURE__ */ new Date(), i = r[n(235)]() * 60 + r.getMinutes();
48
+ return Math[n(269)](Math[n(274)](i / t) * t, 1440 - t);
49
49
  };
50
- function D({ value: n, defaultValue: r = null, onValueChange: a, hourCycle: v = 12, mode: y = e(513), minuteStep: E = y === e(473) ? 30 : 5, min: D, max: O, isTimeDisabled: k, durationFrom: A, formatValue: j = (e) => m(e, v), placeholder: ae = "시간 입력 또는 선택", clearable: oe = !0, size: se = "md", disabled: M, invalid: ce, align: le = e(497), name: ue, id: de, className: fe, maxHeight: pe, "aria-label": me }) {
51
- let N = e, P = b() + N(474), [F, I] = i(n, r, a), [L, R] = C(!1), [z, B] = C(null), [he, ge] = C(0), [V, H] = C(null), [_e, U] = C(!1), [W, G] = C(-1), K = S(null), q = S(null), ve = S(null), ye = S(null), J = D ? _(D) : 0, Y = O ? _(O) : 1439, X = (e) => e < J || e > Y || !!k?.(h(e)), be = (e) => {
50
+ function E({ value: r, defaultValue: i = null, onValueChange: o, hourCycle: p = 12, mode: y = t(264), minuteStep: E = y === t(225) ? 30 : 5, min: D, max: O, isTimeDisabled: k, durationFrom: A, formatValue: j = (e) => h(e, p), placeholder: oe = "시간 입력 또는 선택", clearable: se = !0, size: ce = "md", disabled: M, invalid: le, align: ue = t(221), name: de, id: fe, className: pe, maxHeight: me, "aria-label": he }) {
51
+ let N = t, P = b() + "-list", [F, I] = a(r, i, o), [L, R] = C(!1), [z, B] = C(null), [ge, _e] = C(0), [V, H] = C(null), [ve, U] = C(!1), [W, G] = C(-1), K = S(null), q = S(null), ye = S(null), be = S(null), J = D ? v(D) : 0, Y = O ? v(O) : 1439, X = (e) => e < J || e > Y || !!k?.(g(e)), xe = (e) => {
52
52
  for (let t = 0; t < 1440; t += E) {
53
53
  let n = (e + t) % 1440;
54
54
  if (!X(n)) return n;
55
55
  }
56
56
  return e;
57
57
  }, Z = x(() => {
58
- let e = N;
59
- if (y !== e(473)) return [];
60
- let t = [], n = A ? _(A) : null;
61
- for (let r = Math.ceil(J / E) * E; r <= Y; r += E) {
62
- let i = h(r);
63
- t[e(463)]({
58
+ let t = e;
59
+ if (y !== t(225)) return [];
60
+ let n = [], r = A ? v(A) : null;
61
+ for (let e = Math[t(274)](J / E) * E; e <= Y; e += E) {
62
+ let i = g(e);
63
+ n[t(288)]({
64
64
  value: i,
65
65
  label: j(i),
66
- description: n !== null && r > n ? p(r - n) : void 0,
67
- disabled: !!k?.(i) || n !== null && r <= n
66
+ description: r !== null && e > r ? ee(e - r) : void 0,
67
+ disabled: !!k?.(i) || r !== null && e <= r
68
68
  });
69
69
  }
70
- return t;
70
+ return n;
71
71
  }, [
72
72
  y,
73
73
  J,
@@ -76,147 +76,148 @@ function D({ value: n, defaultValue: r = null, onValueChange: a, hourCycle: v =
76
76
  A,
77
77
  k,
78
78
  j
79
- ]), xe = (e) => {
80
- let t = g(e);
81
- return t && !X(_(t)) ? t : null;
79
+ ]), Se = (e) => {
80
+ let t = _(e);
81
+ return t && !X(v(t)) ? t : null;
82
82
  }, Q = () => {
83
- let e = N;
83
+ let t = e;
84
84
  if (M || L) return;
85
- let t = be(re(E));
86
- if (ge(t), B(F), y === "list") {
87
- let n = F ?? h(t), r = Z.findIndex((t) => t[e(464)] >= n && !t[e(470)]);
88
- G(r >= 0 ? r : u(Z, -1, 1));
85
+ let n = xe(ie(E));
86
+ if (_e(n), B(F), y === t(225)) {
87
+ let e = F ?? g(n), r = Z[t(263)]((n) => n[t(256)] >= e && !n[t(280)]);
88
+ G(r >= 0 ? r : d(Z, -1, 1));
89
89
  }
90
90
  R(!0);
91
91
  }, $ = (e, t = z) => {
92
92
  e && t !== null && t !== F && I(t), R(!1);
93
- }, Se = () => {
93
+ }, Ce = () => {
94
+ let t = e;
94
95
  if (V === null) return !0;
95
- if (!V.trim()) I(null);
96
+ if (!V[t(223)]()) I(null);
96
97
  else {
97
- let e = xe(V);
98
+ let e = Se(V);
98
99
  if (!e) return U(!0), !1;
99
100
  I(e), B(e);
100
101
  }
101
102
  return H(null), U(!1), !0;
102
- }, Ce = () => requestAnimationFrame(() => ve[N(472)]?.[N(519)](N(492))?.focus({ preventScroll: !0 })), we = (e) => {
103
+ }, we = () => requestAnimationFrame(() => ye[N(257)]?.querySelector(N(255))?.focus({ preventScroll: !0 })), Te = (e) => {
103
104
  let t = N;
104
- e[t(470)] || (I(e[t(464)]), H(null), U(!1), R(!1));
105
+ e.disabled || (I(e[t(256)]), H(null), U(!1), R(!1));
105
106
  };
106
- s(L && y === N(473), [K, ye], () => R(!1));
107
- let Te = t(L && y === "list"), Ee = (e) => {
107
+ c(L && y === N(225), [K, be], () => R(!1));
108
+ let Ee = n(L && y === "list"), De = (e) => {
108
109
  let t = N;
109
- if (!(e.nativeEvent.isComposing || e[t(525)] === 229)) {
110
- if (y === t(473) && (e[t(480)] === "ArrowDown" || e[t(480)] === "ArrowUp")) e[t(493)](), L ? G(u(Z, W, e[t(480)] === "ArrowDown" ? 1 : -1)) : Q();
111
- else switch (e[t(480)]) {
112
- case t(530):
113
- e[t(493)](), V === null ? y === t(473) && L && Z[W] ? we(Z[W]) : L && $(!0) : Se() && R(!1);
110
+ if (!(e.nativeEvent[t(290)] || e[t(292)] === 229)) {
111
+ if (y === "list" && (e[t(279)] === "ArrowDown" || e[t(279)] === t(260))) e[t(228)](), L ? G(d(Z, W, e[t(279)] === "ArrowDown" ? 1 : -1)) : Q();
112
+ else switch (e[t(279)]) {
113
+ case t(258):
114
+ e[t(228)](), V === null ? y === "list" && L && Z[W] ? Te(Z[W]) : L && $(!0) : Ce() && R(!1);
114
115
  break;
115
116
  case "ArrowDown":
116
- e[t(493)](), Q(), Ce();
117
+ e[t(228)](), Q(), we();
117
118
  break;
118
- case t(535):
119
- L ? (e[t(493)](), $(!1)) : V !== null && (H(null), U(!1));
119
+ case t(242):
120
+ L ? (e[t(228)](), $(!1)) : V !== null && (H(null), U(!1));
120
121
  break;
121
- case t(521): L && y === t(473) && R(!1);
122
+ case "Tab": L && y === t(225) && R(!1);
122
123
  }
123
124
  }
124
- }, De = L && y === N(513) ? z ?? F : F, Oe = T(N(506), {
125
+ }, Oe = L && y === N(264) ? z ?? F : F, ke = T(N(282), {
125
126
  ref: K,
126
- className: o(N(498), N(508), N(468), N(500), se !== "md" && N(451) + se, fe),
127
+ className: s("ds-control", N(237), N(247), "ds-timefield", ce !== "md" && N(243) + ce, pe),
127
128
  "data-open": L || void 0,
128
- "data-invalid": ce || _e || void 0,
129
+ "data-invalid": le || ve || void 0,
129
130
  "data-disabled": M || void 0,
130
131
  onPointerDown: (e) => {
131
132
  let t = N;
132
- M || e.target === q.current || (e[t(493)](), q[t(472)]?.[t(456)](), Q());
133
+ M || e[t(283)] === q[t(257)] || (e.preventDefault(), q[t(257)]?.focus(), Q());
133
134
  },
134
135
  children: [
135
- w(N(478), {
136
+ w(N(278), {
136
137
  ref: q,
137
- id: de,
138
+ id: fe,
138
139
  className: "ds-datefield__input",
139
- value: V ?? (De ? j(De) : ""),
140
- placeholder: ae,
140
+ value: V ?? (Oe ? j(Oe) : ""),
141
+ placeholder: oe,
141
142
  disabled: M,
142
- role: y === N(473) ? N(516) : void 0,
143
- "aria-label": me,
144
- "aria-invalid": ce || _e || void 0,
145
- "aria-haspopup": N(y === "list" ? 459 : 505),
143
+ role: y === N(225) ? "combobox" : void 0,
144
+ "aria-label": he,
145
+ "aria-invalid": le || ve || void 0,
146
+ "aria-haspopup": y === N(225) ? N(241) : N(267),
146
147
  "aria-expanded": L,
147
- "aria-controls": y === "list" && L ? P : void 0,
148
- "aria-activedescendant": y === N(473) && L && W >= 0 ? d(P, W) : void 0,
149
- autoComplete: N(511),
148
+ "aria-controls": y === N(225) && L ? P : void 0,
149
+ "aria-activedescendant": y === N(225) && L && W >= 0 ? f(P, W) : void 0,
150
+ autoComplete: N(253),
150
151
  onClick: Q,
151
- onFocus: (e) => e[N(487)][N(522)](),
152
+ onFocus: (e) => e[N(283)][N(262)](),
152
153
  onChange: (e) => {
153
- let t = N, n = e[t(487)].value;
154
+ let t = N, n = e.target[t(256)];
154
155
  H(n), U(!1);
155
- let r = xe(n);
156
- if (r && (B(r), y === t(473))) {
157
- let e = Z[t(528)]((e) => e[t(464)] >= r && !e.disabled);
156
+ let r = Se(n);
157
+ if (r && (B(r), y === "list")) {
158
+ let e = Z[t(263)]((e) => e[t(256)] >= r && !e.disabled);
158
159
  e >= 0 && G(e);
159
160
  }
160
161
  L || Q();
161
162
  },
162
- onKeyDown: Ee,
163
+ onKeyDown: De,
163
164
  onBlur: () => {
164
- !Se() && (H(null), U(!1));
165
+ !Ce() && (H(null), U(!1));
165
166
  }
166
167
  }),
167
- w("span", {
168
+ w(N(238), {
168
169
  className: "ds-select-trigger__icon ds-datefield__icon",
169
170
  "aria-hidden": !0,
170
- children: w(ee, {})
171
+ children: w(te, {})
171
172
  }),
172
- oe && F && !M && V === null && w(N(514), {
173
- role: N(533),
173
+ se && F && !M && V === null && w(N(238), {
174
+ role: "button",
174
175
  tabIndex: -1,
175
- "aria-label": N(486),
176
- className: N(479),
177
- onPointerDown: (e) => e[N(524)](),
176
+ "aria-label": N(249),
177
+ className: N(275),
178
+ onPointerDown: (e) => e[N(226)](),
178
179
  onClick: () => {
179
180
  let e = N;
180
- I(null), B(null), q.current?.[e(456)]();
181
+ I(null), B(null), q[e(257)]?.[e(248)]();
181
182
  },
182
- children: w(te, {})
183
+ children: w(ne, {})
183
184
  }),
184
- ue && w(N(478), {
185
- type: N(457),
186
- name: ue,
185
+ de && w(N(278), {
186
+ type: "hidden",
187
+ name: de,
187
188
  value: F ?? ""
188
189
  })
189
190
  ]
190
191
  });
191
- return y === N(473) ? T(ne, { children: [Oe, Te[N(471)] && w(l, {
192
- ref: ye,
193
- closing: Te[N(504)],
192
+ return y === N(225) ? T(re, { children: [ke, Ee.mounted && w(u, {
193
+ ref: be,
194
+ closing: Ee[N(219)],
194
195
  anchorRef: K,
195
- maxHeight: pe ?? 280,
196
- children: w(c, {
196
+ maxHeight: me ?? 280,
197
+ children: w(l, {
197
198
  id: P,
198
199
  options: Z,
199
200
  activeIndex: W,
200
201
  isSelected: (e) => e === F,
201
- onSelect: we,
202
+ onSelect: Te,
202
203
  onActiveChange: G,
203
- "aria-label": me ?? "시간",
204
- emptyText: N(495)
204
+ "aria-label": he ?? "시간",
205
+ emptyText: N(230)
205
206
  })
206
- })] }) : w(f, {
207
+ })] }) : w(m, {
207
208
  open: L,
208
209
  onOpenChange: (e) => e ? Q() : $(!0),
209
- openOn: N(484),
210
- align: le,
210
+ openOn: "manual",
211
+ align: ue,
211
212
  padding: "sm",
212
213
  autoFocus: !1,
213
- "aria-label": N(502),
214
- trigger: Oe,
215
- children: w(ie, {
216
- ref: ve,
214
+ "aria-label": N(272),
215
+ trigger: ke,
216
+ children: w(ae, {
217
+ ref: ye,
217
218
  time: z,
218
- base: he,
219
- hourCycle: v,
219
+ base: ge,
220
+ hourCycle: p,
220
221
  minuteStep: E,
221
222
  blocked: X,
222
223
  onChange: (e) => {
@@ -224,20 +225,20 @@ function D({ value: n, defaultValue: r = null, onValueChange: a, hourCycle: v =
224
225
  },
225
226
  onCommit: (e) => $(!0, e),
226
227
  onCancel: () => $(!1),
227
- onNow: () => B(h(be(re(E))))
228
+ onNow: () => B(g(xe(ie(E))))
228
229
  })
229
230
  });
230
231
  }
231
- var O = (t) => String(t)[e(476)](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, g = i ? _(i) : o, v = Math[m(452)](g / 60), y = g % 60, b = v < 12 ? "am" : "pm", x = Array.from({ length: Math[m(494)](60 / c) }, (e, t) => t * c);
234
- !x[m(512)](y) && (x.push(y), x[m(450)]((e, t) => e - t));
235
- let S = (e) => {
232
+ var D = (e) => String(e)[t(233)](2, "0");
233
+ function ae({ ref: e, time: n, base: a, hourCycle: s, minuteStep: c, blocked: l, onChange: u, onCommit: d, onCancel: f, onNow: p }) {
234
+ let m = t, ee = n ? v(n) : a, h = Math[m(252)](ee / 60), _ = ee % 60, y = h < 12 ? "am" : "pm", b = Array[m(251)]({ length: Math[m(274)](60 / c) }, (e, t) => t * c);
235
+ !b.includes(_) && (b.push(_), b[m(271)]((e, t) => e - t));
236
+ let x = (e) => {
236
237
  let t = m;
237
- if (!l(e * 60 + y)) return e * 60 + y;
238
- let n = x[t(499)]((t) => !l(e * 60 + t));
239
- return e * 60 + (n ?? y);
240
- }, C = (e) => x[m(469)]((t) => !l(e * 60 + t)), ee = (s === 12 ? [
238
+ if (!l(e * 60 + _)) return e * 60 + _;
239
+ let n = b[t(220)]((t) => !l(e * 60 + t));
240
+ return e * 60 + (n ?? _);
241
+ }, S = (e) => b[m(227)]((t) => !l(e * 60 + t)), C = (s === 12 ? [
241
242
  0,
242
243
  1,
243
244
  2,
@@ -250,139 +251,139 @@ function ie({ ref: t, time: i, base: o, hourCycle: s, minuteStep: c, blocked: l,
250
251
  9,
251
252
  10,
252
253
  11
253
- ][m(461)]((e) => b === "pm" ? e + 12 : e) : [...Array(24).keys()])[m(461)]((e) => ({
254
+ ][m(289)]((e) => y === "pm" ? e + 12 : e) : [...Array(24)[m(284)]()]).map((e) => ({
254
255
  key: String(e),
255
- label: s === 12 ? String(e % 12 == 0 ? 12 : e % 12) : O(e),
256
- disabled: !C(e),
257
- pick: () => S(e)
258
- })), te = x[m(461)]((e) => ({
256
+ label: s === 12 ? String(e % 12 == 0 ? 12 : e % 12) : D(e),
257
+ disabled: !S(e),
258
+ pick: () => x(e)
259
+ })), te = b[m(289)]((e) => ({
259
260
  key: String(e),
260
- label: O(e),
261
- disabled: l(v * 60 + e),
262
- pick: () => v * 60 + e
263
- })), ne = ["am", "pm"][m(461)]((e) => {
264
- let t = m, n = e === "am" ? 0 : 12, r = v % 12 + n;
261
+ label: D(e),
262
+ disabled: l(h * 60 + e),
263
+ pick: () => h * 60 + e
264
+ })), ne = ["am", "pm"][m(289)]((e) => {
265
+ let t = m, n = e === "am" ? 0 : 12, r = h % 12 + n;
265
266
  return {
266
267
  key: e,
267
268
  label: e === "am" ? "오전" : "오후",
268
- disabled: !Array[t(488)]({ length: 12 }, (e, t) => n + t)[t(469)](C),
269
+ disabled: !Array[t(251)]({ length: 12 }, (e, t) => n + t)[t(227)](S),
269
270
  pick: () => {
270
271
  let e = t;
271
- if (C(r)) return S(r);
272
- let i = Array[e(488)]({ length: 12 }, (e, t) => n + t).find(C) ?? r;
273
- return S(i);
272
+ if (S(r)) return x(r);
273
+ let i = Array[e(251)]({ length: 12 }, (e, t) => n + t)[e(220)](S) ?? r;
274
+ return x(i);
274
275
  }
275
276
  };
276
- }), E = [
277
+ }), re = [
277
278
  ...s === 12 ? [{
278
- label: m(491),
279
+ label: m(281),
279
280
  items: ne,
280
- selected: b
281
+ selected: y
281
282
  }] : [],
282
283
  {
283
284
  label: "시",
284
- items: ee,
285
- selected: String(v)
285
+ items: C,
286
+ selected: String(h)
286
287
  },
287
288
  {
288
289
  label: "분",
289
290
  items: te,
290
- selected: String(y)
291
+ selected: String(_)
291
292
  }
292
293
  ];
293
- return T(r, {
294
+ return T(i, {
294
295
  gap: 2,
295
- children: [w("div", {
296
- ref: t,
297
- className: m(527),
298
- children: E.map((e, t) => w(k, {
299
- label: e[m(489)],
300
- items: e.items,
301
- selectedKey: i ? e[m(501)] : null,
302
- focusKey: e[m(501)],
303
- onPick: (e) => u(h(e[m(477)]())),
304
- onCommit: (e) => d(e ? h(e[m(477)]()) : void 0),
296
+ children: [w(m(282), {
297
+ ref: e,
298
+ className: m(232),
299
+ children: re[m(289)]((e, t) => w(O, {
300
+ label: e[m(224)],
301
+ items: e[m(222)],
302
+ selectedKey: n ? e[m(236)] : null,
303
+ focusKey: e[m(236)],
304
+ onPick: (e) => u(g(e[m(286)]())),
305
+ onCommit: (e) => d(e ? g(e[m(286)]()) : void 0),
305
306
  onCancel: f,
306
307
  onMoveColumn: (e, n) => {
307
308
  let r = m;
308
- (n.parentElement?.[r(526)](r(492)))?.[t + e]?.focus({ preventScroll: !0 });
309
+ (n[r(239)]?.[r(245)](r(255)))?.[t + e]?.[r(248)]({ preventScroll: !0 });
309
310
  }
310
- }, e[m(489)]))
311
- }), T(n, {
312
- justify: m(520),
311
+ }, e[m(224)]))
312
+ }), T(r, {
313
+ justify: m(287),
313
314
  gap: 2,
314
- children: [w(a, {
315
- variant: m(465),
315
+ children: [w(o, {
316
+ variant: "ghost",
316
317
  size: "sm",
317
318
  onClick: p,
318
319
  children: "지금"
319
- }), w(a, {
320
- variant: m(510),
320
+ }), w(o, {
321
+ variant: m(266),
321
322
  size: "sm",
322
323
  onClick: () => d(),
323
- disabled: !i,
324
+ disabled: !n,
324
325
  children: "확인"
325
326
  })]
326
327
  })]
327
328
  });
328
329
  }
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(528)]((e) => e[l(480)] === i);
330
+ function O({ label: e, items: n, selectedKey: r, focusKey: i, onPick: a, onCommit: o, onCancel: s, onMoveColumn: c }) {
331
+ let l = t, u = b(), f = S(null), p = S(!1), m = n[l(263)]((e) => e[l(279)] === i);
331
332
  return y(() => {
332
- let e = l, t = f.current, n = t?.[e(519)](e(515) + i + "\"]");
333
- t && n && (t[e(467)]({
334
- top: n[e(455)] - 4,
335
- behavior: p.current ? e(529) : e(454)
336
- }), p[e(472)] = !0);
337
- }, [i]), w(l(506), {
333
+ let e = l, t = f.current, n = t?.[e(285)]("[data-key=\"" + i + "\"]");
334
+ t && n && (t[e(254)]({
335
+ top: n[e(229)] - 4,
336
+ behavior: p.current ? "smooth" : e(276)
337
+ }), p[e(257)] = !0);
338
+ }, [i]), w(l(282), {
338
339
  ref: f,
339
- role: l(459),
340
+ role: l(241),
340
341
  tabIndex: 0,
341
- "aria-label": t,
342
- "aria-activedescendant": m >= 0 ? d + "-" + m : void 0,
343
- className: l(466),
342
+ "aria-label": e,
343
+ "aria-activedescendant": m >= 0 ? u + "-" + m : void 0,
344
+ className: "ds-timecol",
344
345
  onKeyDown: (e) => {
345
346
  let t = l;
346
- switch (e[t(480)]) {
347
- case t(485):
348
- case "ArrowUp": {
349
- e[t(493)]();
350
- let i = r === null && m >= 0 && !n[m][t(470)] ? m : u(n, m, e.key === t(485) ? 1 : -1);
347
+ switch (e[t(279)]) {
348
+ case t(273):
349
+ case t(260): {
350
+ e[t(228)]();
351
+ let i = r === null && m >= 0 && !n[m][t(280)] ? m : d(n, m, e[t(279)] === t(273) ? 1 : -1);
351
352
  i >= 0 && a(n[i]);
352
353
  break;
353
354
  }
354
- case t(496):
355
- case t(458): {
356
- e[t(493)]();
357
- let r = e.key === t(496) ? u(n, -1, 1) : u(n, n[t(517)], -1);
355
+ case t(244):
356
+ case "End": {
357
+ e[t(228)]();
358
+ let r = e[t(279)] === t(244) ? d(n, -1, 1) : d(n, n.length, -1);
358
359
  r >= 0 && a(n[r]);
359
360
  break;
360
361
  }
361
- case t(490):
362
- case t(509):
363
- e[t(493)](), c(e[t(480)] === t(509) ? 1 : -1, e[t(462)]);
362
+ case "ArrowLeft":
363
+ case t(291):
364
+ e[t(228)](), c(e[t(279)] === t(291) ? 1 : -1, e.currentTarget);
364
365
  break;
365
- case t(530):
366
+ case t(258):
366
367
  case " ": {
367
- e[t(493)]();
368
- let i = r === null && m >= 0 && !n[m].disabled ? n[m] : void 0;
369
- i && a(i), e[t(480)] === "Enter" && o(i);
368
+ e.preventDefault();
369
+ let i = r === null && m >= 0 && !n[m][t(280)] ? n[m] : void 0;
370
+ i && a(i), e[t(279)] === t(258) && o(i);
370
371
  break;
371
372
  }
372
- case t(535): e[t(493)](), s();
373
+ case t(242): e[t(228)](), s();
373
374
  }
374
375
  },
375
- children: n[l(461)]((e, t) => w(l(506), {
376
- id: d + "-" + t,
377
- "data-key": e[l(480)],
378
- role: l(507),
379
- "aria-selected": e[l(480)] === r,
380
- "aria-disabled": e[l(470)] || void 0,
376
+ children: n.map((e, t) => w(l(282), {
377
+ id: u + "-" + t,
378
+ "data-key": e[l(279)],
379
+ role: l(231),
380
+ "aria-selected": e.key === r,
381
+ "aria-disabled": e[l(280)] || void 0,
381
382
  "data-focus": t === m || void 0,
382
- className: l(531),
383
- onClick: () => !e[l(470)] && a(e),
384
- children: e[l(489)]
385
- }, e.key))
383
+ className: "ds-timecol__item",
384
+ onClick: () => !e[l(280)] && a(e),
385
+ children: e[l(224)]
386
+ }, e[l(279)]))
386
387
  });
387
388
  }
388
- export { D as TimePicker };
389
+ export { E as TimePicker };