@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,226 +1,226 @@
1
1
  "use client";
2
- (function(e, t) {
3
- let n = i, r = e();
2
+ (function(e, n) {
3
+ let r = t, i = e();
4
4
  for (;;) try {
5
- if (parseInt(n(173)) / 1 * (parseInt(n(156)) / 2) + -parseInt(n(172)) / 3 * (parseInt(n(182)) / 4) + parseInt(n(194)) / 5 + -parseInt(n(198)) / 6 * (parseInt(n(141)) / 7) + -parseInt(n(154)) / 8 + parseInt(n(199)) / 9 * (parseInt(n(158)) / 10) + -parseInt(n(184)) / 11 * (-parseInt(n(139)) / 12) == t) break;
6
- r.push(r.shift());
5
+ if (-parseInt(r(254)) / 1 + parseInt(r(252)) / 2 * (-parseInt(r(214)) / 3) + parseInt(r(186)) / 4 + -parseInt(r(245)) / 5 * (-parseInt(r(230)) / 6) + parseInt(r(181)) / 7 * (-parseInt(r(187)) / 8) + parseInt(r(215)) / 9 * (-parseInt(r(188)) / 10) + -parseInt(r(224)) / 11 * (-parseInt(r(216)) / 12) == n) break;
6
+ i.push(i.shift());
7
7
  } catch {
8
- r.push(r.shift());
8
+ i.push(i.shift());
9
9
  }
10
- })(g, 467073);
10
+ })(x, 840990);
11
11
  import { Text as e } from "../../primitives/Typography2.js";
12
- import { Inline as t } from "../../primitives/Layout2.js";
13
- import { Button as n, cx as r } from "../../primitives/index.js";
14
- function i(e, t) {
15
- e -= 132;
16
- let n = g(), r = n[e];
17
- i.WLSnJB === void 0 && (i.eXWnAz = function(e) {
12
+ function t(e, n) {
13
+ e -= 181;
14
+ let r = x(), i = r[e];
15
+ t.ppAXbs === void 0 && (t.emADbF = function(e) {
18
16
  let t = "", n = "";
19
17
  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);
20
18
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
21
19
  return decodeURIComponent(n);
22
- }, i.WWGlWd = {}, i.WLSnJB = !0);
23
- let a = n[0];
24
- i.EofnOJ !== a && (i.WWGlWd = {}, i.EofnOJ = a);
25
- let o = i.WWGlWd[e];
26
- return o === void 0 ? (r = i.eXWnAz(r), i.WWGlWd[e] = r) : r = o, r;
20
+ }, t.VIJbYb = {}, t.ppAXbs = !0);
21
+ let a = r[0];
22
+ t.vBonLy !== a && (t.VIJbYb = {}, t.vBonLy = a);
23
+ let o = t.VIJbYb[e];
24
+ return o === void 0 ? (i = t.emADbF(i), t.VIJbYb[e] = i) : i = o, i;
27
25
  }
26
+ import { Inline as n } from "../../primitives/Layout2.js";
27
+ import { Button as r, cx as i } from "../../primitives/index.js";
28
28
  import { addDays as a, addMonths as o, between as s, compareDay as c, formatFullDate as l, formatMonth as u, monthGrid as d, sameDay as f, sameMonth as p, startOfDay as m, startOfMonth as h, weekdayLabels as ee } from "./date.js";
29
- function g() {
30
- let e = /* @__PURE__ */ "zgL2.zhmTy2fSzw5KyxjFx2rHEq.zhmTy2fSzw5KyxjFx3LLyxjZ.y3vYCMvUDa.ywnJzw50.BgLZDgjVEa.B2zMC2v0sgvPz2H0.sg9Tzq.w2fYAweTC2vSzwn0zwq9iNrYDwuIxq.zM9JDxm.C3bHBG.zhmTy2fSzw5KyxjFx3LLyxi.w3rHyMLUzgv4psiWiL0.CxvLCNLtzwXLy3rVCG.C2nYB2XSvg8.7j28ioYeOo2dNEUqQa.mZC1nNDNANfUAa.z2v0rgf0zq.odqXntGYuuPprw1J.z3jPza.zhmTy2fSzw5KyxjFx3DLzwTKyxLZ.z2v0rNvSBfLLyxi.BgfIzwW.z2v0rgf5.yNv0Dg9U.64we7j2yioYBLa.zhmTy2fSzw5KyxjFx3zPzxC.64kG7kEC66gCioUpJoYvHoQWGoQ4Sa.A2v5.rw5K.z2HVC3q.ndC4otyWoePfvhfTra.zgLZywjSzwq.ndaYogndq21pBG.C2HPzNrlzxK.mJb5rwfVyM0.BwLU.z3jPzgnLBgW.z2v0vgLTzq.zhmTy2fSzw5KyxjFx3zPzxCGzhmTy2fSzw5KyxjFx3LT.zhmTy2fSzw5Kyxi.zgf5CW.zgf0zq.z2v0tw9UDgG.rxnJyxbL.yMv0D2vLBG.Cg9SAxrL.Bw9Kzq.zhmTy2fSzw5KyxjFx2HLywq.mZLrzxjbEg8.ndmYq0T4Chjg.y2fWDgLVBG.C21VB3rO.B2zMC2v0vg9W.BgvUz3rO.lcdSL7dRJ4tcT+YBLcdSHkdTG50G7jE06RIW.B3v0.BwfW.Bwf4.mJu3mJy4BLnWqLLo.DgvYDgLHCNK.mJm1mtHos3vmvLG.zhmTy2fSzw5KyxjFx2zVB3q.C2vSzwn0zwq.zNjVBq.yxv0BW.zhmTy2fSzw5KyxjFx3bPy2S.7kkf66om7j287j2eioQZOoULToYeUoYALa.7iUC7j6r7j287j2eioQZOoULToYeUoYALa.CgLJAW.zhmTy2fSzw5KyxjFx3rPDgXL.mZCYota5nwvjt1fozq.zgf5CY0.B25wywX1zunOyw5Nzq.CMfUz2u.mJrurMDHu0W.ndm5odiXAuPAtMLS".split(".");
31
- return g = function() {
29
+ /* empty css */
30
+ import { useEffect as g, useLayoutEffect as _, useRef as v, useState as y } from "react";
31
+ import { ChevronDown as te, ChevronLeft as ne, ChevronRight as b } from "lucide-react";
32
+ function x() {
33
+ let e = /* @__PURE__ */ "7j28ioYeOo2dNEUqQa.zhmTy2fSzw5KyxjFx3DLzwTKyxLZ.B2zMC2v0vg9W.C3bHBG.mtfJuhHIy24.rw5K.zgLZywjSzwq.zhmTy2fSzw5KyxjFx3LLyxi.ChjLDMvUDerLzMf1Bhq.w2fYAweTC2vSzwn0zwq9iNrYDwuIxq.mtjTzujIsgW.zgf5CW.yMv0D2vLBG.z2v0vgLTzq.Cg9SAxrL.C2HPzNrlzxK.C3rVCfbYB3bHz2f0Aw9U.zM9JDxm.zhmTy2fSzw5Kyxi.lcdSL7dRJ4tcT+YBLcdSHkdTG50G7jE06RIW.C2nYB2XSvg8.7kkf66om7j287j2eioQZOoULToYeUoYALa.zhmTy2fSzw5KyxjFx2zVB3q.C2vSzwn0zwq.z2v0rgf5.mJaWnZK1y05hCgnZ.B3b0Aw9U.z2v0tw9UDgG.BwLU.DMfSDwu.BgvUz3rO.z3jPza.nty1nJeWtKr6DeDu.zhmTy2fSzw5KyxjFx2rHEq.ody3nZm2rKDky0v4.BwfW.zgL2.nJy1CLfND09x.rxnJyxbL.64we7j2yioYBLa.yNv0Dg9U.7iUC7j6r7j287j2eioQZOoULToYeUoYALa.mZm4ntu1mMDkvKPNBa.nJmWndHgsu9UCK8.mtbeuLnXsvq.z2v0rNvSBfLLyxi.zhmTy2fSzw5KyxjFx3rPDgXL.sg9Tzq.zhmTy2fSzw5KyxjFx2HLywq.Bw9Kzq.zMLUzeLUzgv4.Bwf4.z2HVC3q.zgf5CY0.CMfUz2u.B25wywX1zunOyw5Nzq.zhmTy2fSzw5KyxjFx3LLyxjZ.yxv0BW.zgf0zq.z2v0rgf0zq.64kG7kEC66gCioUpJoYvHoQWGoQ4Sa.zhmTy2fSzw5KyxjFx3bPy2S.BgfIzwW.ywnJzw50.w3rHyMLUzgv4psiWiL0.A2v5.zNjVBq.CxvLCNLtzwXLy3rVCG.64UK7j2mioUlRa.CgLJAW.m2jny2rxrG.mtu4mJi5ow9NDvDkvW.mJm4nZe5nZjjCLbgrw4.y3vYCMvUDa.zhmTy2fSzw5KyxjFx3zPzxCGzhmTy2fSzw5KyxjFx3LT.B3v0".split(".");
34
+ return x = function() {
32
35
  return e;
33
- }, g();
36
+ }, x();
34
37
  }
35
- /* empty css */
36
- import { useEffect as _, useLayoutEffect as v, useRef as y, useState as b } from "react";
37
- import { ChevronDown as te, ChevronLeft as x, ChevronRight as ne } from "lucide-react";
38
38
  import { jsx as S, jsxs as C } from "react/jsx-runtime";
39
- function w(g) {
40
- let v = i, { min: w, max: T, isDateDisabled: ae, weekStartsOn: E = 0, defaultMonth: oe, autoFocus: D, showFooter: se = !0, className: O } = g, k = g[v(170)] === v(197) ? g.value : void 0, A = g.mode === "range" ? void 0 : g.value, j = A ?? k?.[v(187)] ?? null, [M, N] = b(() => h(oe ?? j ?? /* @__PURE__ */ new Date())), [P, F] = b(() => m(j ?? /* @__PURE__ */ new Date())), [ce, I] = b(0), [L, le] = b("days"), [R, ue] = b(null), [z, B] = b(null), V = y(null), [H] = b(() => m(/* @__PURE__ */ new Date())), U = (e) => w && c(e, w) < 0 || T && c(e, T) > 0 || !!ae?.(e), W = (e) => {
39
+ function w(_) {
40
+ let x = t, { min: w, max: T, isDateDisabled: ae, weekStartsOn: E = 0, defaultMonth: oe, autoFocus: D, showFooter: se = !0, className: O } = _, k = _.mode === x(198) ? _[x(249)] : void 0, A = _[x(193)] === x(198) ? void 0 : _[x(249)], j = A ?? k?.[x(210)] ?? null, [M, N] = y(() => h(oe ?? j ?? /* @__PURE__ */ new Date())), [P, F] = y(() => m(j ?? /* @__PURE__ */ new Date())), [ce, I] = y(0), [L, le] = y("days"), [R, ue] = y(null), [z, B] = y(null), V = v(null), [H] = y(() => m(/* @__PURE__ */ new Date())), U = (e) => w && c(e, w) < 0 || T && c(e, T) > 0 || !!ae?.(e), W = (e) => {
41
41
  I(e > 0 ? 1 : -1), N((t) => o(t, e)), F((t) => o(t, e));
42
42
  }, G = (e) => {
43
- let t = v;
44
- ue(e === t(192) ? t(179) : "in"), I(0), le(e);
45
- }, K = y(!1);
46
- _(() => {
47
- let e = v;
48
- K[e(203)] ? V[e(203)]?.[e(136)](e(135))?.[e(132)]({ preventScroll: !0 }) : K[e(203)] = !0;
43
+ let t = x;
44
+ ue(e === t(213) ? t(219) : "in"), I(0), le(e);
45
+ }, K = v(!1);
46
+ g(() => {
47
+ let e = x;
48
+ K[e(217)] ? V[e(217)]?.[e(211)](e(208))?.[e(237)]({ preventScroll: !0 }) : K[e(217)] = !0;
49
49
  }, [L]);
50
- let de = (e, t) => !!T && c(new Date(e, t, 1), T) > 0 || !!w && c(new Date(e, t + 1, 0), w) < 0, q = M[v(144)](), fe = w?.[v(144)]() ?? H[v(144)]() - 100, pe = T?.[v(144)]() ?? H.getFullYear() + 20, J = (e) => {
51
- let t = v;
50
+ let de = (e, t) => !!T && c(new Date(e, t, 1), T) > 0 || !!w && c(new Date(e, t + 1, 0), w) < 0, q = M.getFullYear(), fe = w?.[x(189)]() ?? H.getFullYear() - 100, pe = T?.getFullYear() ?? H[x(189)]() + 20, J = (e) => {
51
+ let t = x;
52
52
  if (!U(e)) {
53
- if (F(e), !p(e, M) && (I(c(e, M) > 0 ? 1 : -1), N(h(e))), g[t(170)] === t(197)) {
54
- let n = g.value ?? {
53
+ if (F(e), !p(e, M) && (I(c(e, M) > 0 ? 1 : -1), N(h(e))), _[t(193)] === "range") {
54
+ let n = _[t(249)] ?? {
55
55
  from: null,
56
56
  to: null
57
57
  };
58
- !n.from || n.to ? g[t(196)]?.({
58
+ !n[t(210)] || n.to ? _[t(199)]?.({
59
59
  from: e,
60
60
  to: null
61
- }) : c(e, n.from) < 0 ? g[t(196)]?.({
61
+ }) : c(e, n.from) < 0 ? _.onValueChange?.({
62
62
  from: e,
63
- to: n[t(187)]
64
- }) : g.onValueChange?.({
65
- from: n[t(187)],
63
+ to: n[t(210)]
64
+ }) : _[t(199)]?.({
65
+ from: n[t(210)],
66
66
  to: e
67
67
  });
68
- } else g.onValueChange?.(e);
68
+ } else _.onValueChange?.(e);
69
69
  }
70
70
  };
71
- _(() => {
72
- let e = v;
71
+ g(() => {
72
+ let e = x;
73
73
  if (!D) return;
74
- let t = requestAnimationFrame(() => V[e(203)]?.[e(136)](e(135))?.[e(132)]({ preventScroll: !0 }));
74
+ let t = requestAnimationFrame(() => V[e(217)]?.[e(211)](e(208))?.[e(237)]({ preventScroll: !0 }));
75
75
  return () => cancelAnimationFrame(t);
76
76
  }, [D]);
77
77
  let me = (e) => {
78
- let t = v, n = {
78
+ let t = x, n = {
79
79
  ArrowLeft: () => a(P, -1),
80
80
  ArrowRight: () => a(P, 1),
81
81
  ArrowUp: () => a(P, -7),
82
82
  ArrowDown: () => a(P, 7),
83
- PageUp: () => o(P, e.shiftKey ? -12 : -1),
84
- PageDown: () => o(P, e[t(157)] ? 12 : 1),
85
- Home: () => a(P, -((P[t(146)]() - E + 7) % 7)),
86
- End: () => a(P, 6 - (P[t(146)]() - E + 7) % 7)
83
+ PageUp: () => o(P, e[t(235)] ? -12 : -1),
84
+ PageDown: () => o(P, e[t(235)] ? 12 : 1),
85
+ Home: () => a(P, -((P[t(244)]() - E + 7) % 7)),
86
+ End: () => a(P, 6 - (P[t(244)]() - E + 7) % 7)
87
87
  };
88
- if (n[e[t(151)]]) {
89
- e.preventDefault();
90
- let r = n[e[t(151)]]();
91
- F(r), !p(r, M) && (I(c(r, M) > 0 ? 1 : -1), N(h(r))), requestAnimationFrame(() => V.current?.[t(136)](t(135))?.[t(132)]({ preventScroll: !0 }));
88
+ if (n[e[t(209)]]) {
89
+ e[t(228)]();
90
+ let r = n[e[t(209)]]();
91
+ F(r), !p(r, M) && (I(c(r, M) > 0 ? 1 : -1), N(h(r))), requestAnimationFrame(() => V[t(217)]?.[t(211)]("[tabindex=\"0\"]")?.[t(237)]({ preventScroll: !0 }));
92
92
  }
93
- }, Y = d(M, E), X = k?.[v(187)] && !k.to && z ? z : null, he = (e) => {
94
- let t = v;
95
- e[t(151)] === t(167) && L !== t(164) && (e.preventDefault(), e.stopPropagation(), G(t(164)));
93
+ }, Y = d(M, E), X = k?.[x(210)] && !k.to && z ? z : null, he = (e) => {
94
+ let t = x;
95
+ e[t(209)] === t(182) && L !== t(231) && (e.preventDefault(), e[t(236)](), G("days"));
96
96
  }, ge = () => {
97
- let e = v;
98
- g[e(170)] === e(197) ? (!p(H, M) && (I(c(H, M) > 0 ? 1 : -1), N(h(H))), F(H)) : J(H), L !== e(164) && G(e(164));
99
- }, _e = k?.[v(187)] && k.to ? Math.round((m(k.to)[v(161)]() - m(k[v(187)]).getTime()) / 864e5) + 1 : 0, Z = g[v(170)] === "range" ? k?.[v(187)] ? k.to ? _e + v(138) : v(190) : v(191) : null, Q = se && C(t, {
100
- justify: "between",
97
+ let e = x;
98
+ _[e(193)] === e(198) ? (!p(H, M) && (I(c(H, M) > 0 ? 1 : -1), N(h(H))), F(H)) : J(H), L !== e(231) && G(e(231));
99
+ }, _e = k?.[x(210)] && k.to ? Math.round((m(k.to).getTime() - m(k.from)[x(233)]()) / 864e5) + 1 : 0, Z = _.mode === "range" ? k?.[x(210)] ? k.to ? _e + x(220) : x(241) : x(185) : null, Q = se && C(n, {
100
+ justify: x(232),
101
101
  wrap: !1,
102
- className: v(185),
102
+ className: x(242),
103
103
  children: [S(e, {
104
- variant: v(174),
105
- tone: Z && k?.[v(187)] && !k.to ? v(204) : v(183),
106
- "aria-live": v(169),
104
+ variant: "caption",
105
+ tone: Z && k?.[x(210)] && !k.to ? x(207) : "tertiary",
106
+ "aria-live": x(234),
107
107
  children: Z
108
- }), S(n, {
109
- variant: v(153),
108
+ }), S(r, {
109
+ variant: x(196),
110
110
  size: "sm",
111
111
  onClick: ge,
112
112
  disabled: U(H),
113
113
  children: "오늘"
114
114
  })]
115
- }), $ = C(t, {
116
- justify: v(168),
115
+ }), $ = C(n, {
116
+ justify: x(232),
117
117
  wrap: !1,
118
- className: v(171),
119
- children: [S(n, {
120
- variant: v(153),
118
+ className: x(192),
119
+ children: [S(r, {
120
+ variant: x(196),
121
121
  size: "sm",
122
122
  iconRight: S(te, {}),
123
- className: v(193),
124
- "data-open": L === "pick" || void 0,
125
- "aria-expanded": L === "pick",
126
- "aria-label": L === v(164) ? u(M) + v(178) : v(150),
127
- "aria-live": v(169),
128
- onClick: () => G(L === v(164) ? v(192) : v(164)),
123
+ className: x(190),
124
+ "data-open": L === x(213) || void 0,
125
+ "aria-expanded": L === x(213),
126
+ "aria-label": L === "days" ? u(M) + x(239) : x(204),
127
+ "aria-live": x(234),
128
+ onClick: () => G(L === "days" ? x(213) : "days"),
129
129
  children: u(M)
130
- }), L === "days" && C(t, {
130
+ }), L === x(231) && C(n, {
131
131
  gap: 1,
132
132
  wrap: !1,
133
- children: [S(n, {
133
+ children: [S(r, {
134
134
  iconOnly: !0,
135
- variant: v(153),
135
+ variant: x(196),
136
136
  size: "sm",
137
- icon: S(x, {}),
137
+ icon: S(ne, {}),
138
138
  "aria-label": "이전 달",
139
139
  onClick: () => W(-1)
140
- }), S(n, {
140
+ }), S(r, {
141
141
  iconOnly: !0,
142
- variant: "ghost",
142
+ variant: x(196),
143
143
  size: "sm",
144
- icon: S(ne, {}),
145
- "aria-label": "다음 달",
144
+ icon: S(b, {}),
145
+ "aria-label": x(212),
146
146
  onClick: () => W(1)
147
147
  })]
148
148
  })]
149
149
  });
150
- if (L === v(192)) {
150
+ if (L === x(213)) {
151
151
  let e = (e) => {
152
- let t = v;
153
- N(new Date(e, M[t(166)](), 1)), F((n) => new Date(e, n[t(166)](), Math[t(159)](n[t(140)](), new Date(e, n.getMonth() + 1, 0)[t(140)]())));
154
- }, t = Array[v(187)]({ length: 12 }, (e, t) => ({
152
+ let t = x;
153
+ N(new Date(e, M[t(247)](), 1)), F((n) => new Date(e, n[t(247)](), Math[t(248)](n[t(203)](), new Date(e, n.getMonth() + 1, 0)[t(203)]())));
154
+ }, t = Array[x(210)]({ length: 12 }, (e, t) => ({
155
155
  key: t,
156
156
  label: t + 1 + "월",
157
- selected: t === M[v(166)](),
158
- current: q === H[v(144)]() && t === H.getMonth(),
157
+ selected: t === M[x(247)](),
158
+ current: q === H[x(189)]() && t === H.getMonth(),
159
159
  disabled: de(q, t),
160
160
  pick: () => {
161
- let e = v;
162
- N(new Date(q, t, 1)), F((n) => new Date(q, t, Math.min(n[e(140)](), new Date(q, t + 1, 0)[e(140)]()))), G("days");
161
+ let e = x;
162
+ N(new Date(q, t, 1)), F((n) => new Date(q, t, Math[e(248)](n.getDate(), new Date(q, t + 1, 0).getDate()))), G(e(231));
163
163
  }
164
164
  }));
165
165
  return C("div", {
166
- className: r("ds-calendar", O),
166
+ className: i(x(238), O),
167
167
  onKeyDown: he,
168
168
  children: [
169
169
  $,
170
- C(v(200), {
171
- className: v(162),
170
+ C(x(256), {
171
+ className: x(218),
172
172
  "data-zoom": R,
173
173
  children: [S(re, {
174
174
  first: fe,
175
175
  last: pe,
176
176
  selected: q,
177
- current: H[v(144)](),
177
+ current: H.getFullYear(),
178
178
  onPick: e
179
179
  }), S(ie, {
180
180
  gridRef: V,
181
181
  cells: t,
182
- label: q + v(148)
182
+ label: q + x(183)
183
183
  })]
184
- }, v(192)),
184
+ }, x(213)),
185
185
  Q
186
186
  ]
187
187
  });
188
188
  }
189
- return C(v(200), {
190
- className: r(v(163), O),
189
+ return C(x(256), {
190
+ className: i("ds-calendar", O),
191
191
  children: [
192
192
  $,
193
- C(v(200), {
194
- className: v(149),
193
+ C(x(256), {
194
+ className: "ds-calendar__view",
195
195
  "data-zoom": R,
196
196
  children: [S("div", {
197
- className: v(143),
197
+ className: x(221),
198
198
  "aria-hidden": !0,
199
- children: ee(E)[v(180)]((e, t) => S(v(133), {
199
+ children: ee(E)[x(255)]((e, t) => S(x(223), {
200
200
  "data-weekday": (t + E) % 7,
201
201
  children: e
202
202
  }, e))
203
- }), S(v(200), {
203
+ }), S(x(256), {
204
204
  ref: V,
205
- role: v(142),
205
+ role: x(251),
206
206
  "aria-label": u(M),
207
207
  className: "ds-calendar__grid",
208
208
  "data-dir": ce,
209
209
  onKeyDown: me,
210
210
  onPointerLeave: () => B(null),
211
- children: Y[v(180)]((e) => {
212
- let t = v, n = !p(e, M), r = U(e), i = X ?? k?.to ?? null, a = k?.[t(187)] && i ? c(k[t(187)], i) <= 0 ? k[t(187)] : i : null, o = k?.[t(187)] && i ? c(k.from, i) <= 0 ? i : k.from : null, u = !!(a && o && s(e, a, o)), d = !!(a && f(e, a)) || !!k?.[t(187)] && !i && f(e, k[t(187)]), m = !!(o && f(e, o)), h = f(e, A) || d || m;
213
- return S(t(147), {
214
- type: t(147),
215
- role: t(160),
211
+ children: Y[x(255)]((e) => {
212
+ let t = x, n = !p(e, M), r = U(e), i = X ?? k?.to ?? null, a = k?.from && i ? c(k[t(210)], i) <= 0 ? k[t(210)] : i : null, o = k?.[t(210)] && i ? c(k.from, i) <= 0 ? i : k[t(210)] : null, u = !!(a && o && s(e, a, o)), d = !!(a && f(e, a)) || !!k?.[t(210)] && !i && f(e, k[t(210)]), m = !!(o && f(e, o)), h = f(e, A) || d || m;
213
+ return S(t(184), {
214
+ type: t(184),
215
+ role: "gridcell",
216
216
  tabIndex: f(e, P) ? 0 : -1,
217
217
  "aria-selected": h,
218
218
  "aria-disabled": r || void 0,
219
219
  "aria-label": l(e),
220
- "aria-current": f(e, H) ? t(165) : void 0,
221
- className: t(201),
220
+ "aria-current": f(e, H) ? t(202) : void 0,
221
+ className: t(253),
222
222
  "data-outside": n || void 0,
223
- "data-weekday": e[t(146)](),
223
+ "data-weekday": e[t(244)](),
224
224
  "data-today": f(e, H) || void 0,
225
225
  "data-selected": h || void 0,
226
226
  "data-in-range": u && !h || void 0,
@@ -228,83 +228,83 @@ function w(g) {
228
228
  "data-range-end": m && !f(a, o) || void 0,
229
229
  "data-preview": !!X || void 0,
230
230
  onClick: () => J(e),
231
- onPointerEnter: () => g[t(170)] === t(197) && !r && B(e),
232
- children: S("span", { children: e[t(140)]() })
233
- }, e[t(161)]());
231
+ onPointerEnter: () => _[t(193)] === t(198) && !r && B(e),
232
+ children: S("span", { children: e[t(203)]() })
233
+ }, e[t(233)]());
234
234
  })
235
- }, M[v(161)]())]
236
- }, v(195) + R),
235
+ }, M.getTime())]
236
+ }, x(197) + R),
237
237
  Q
238
238
  ]
239
239
  });
240
240
  }
241
- function re({ first: e, last: t, selected: n, current: r, onPick: a }) {
242
- let o = i, s = y(null), c = y(!1);
243
- v(() => {
244
- let e = i, t = s[e(203)], n = t?.[e(136)](e(208));
245
- if (!t || !n) return;
246
- let r = n[e(176)] - t.clientHeight / 2 + n[e(206)] / 2;
247
- t[e(137)]({
248
- top: r,
249
- behavior: c[e(203)] ? e(175) : e(188)
250
- }), c[e(203)] = !0;
251
- }, [n]);
252
- let l = Array[o(187)]({ length: Math[o(181)](0, t - e + 1) }, (t, n) => e + n);
253
- return S(o(200), {
241
+ function re({ first: e, last: n, selected: r, current: i, onPick: a }) {
242
+ let o = t, s = v(null), c = v(!1);
243
+ _(() => {
244
+ let e = t, n = s[e(217)], r = n?.querySelector(e(229));
245
+ if (!n || !r) return;
246
+ let i = r[e(222)] - n.clientHeight / 2 + r.offsetHeight / 2;
247
+ n[e(240)]({
248
+ top: i,
249
+ behavior: c[e(217)] ? "smooth" : e(201)
250
+ }), c[e(217)] = !0;
251
+ }, [r]);
252
+ let l = Array[o(210)]({ length: Math[o(195)](0, n - e + 1) }, (t, n) => e + n);
253
+ return S(o(256), {
254
254
  ref: s,
255
- role: o(205),
255
+ role: "listbox",
256
256
  "aria-label": "연도",
257
- className: o(202),
258
- onKeyDown: (r) => {
257
+ className: o(200),
258
+ onKeyDown: (t) => {
259
259
  let i = o, c = {
260
260
  ArrowUp: -1,
261
261
  ArrowDown: 1,
262
262
  PageUp: -10,
263
263
  PageDown: 10
264
264
  };
265
- r[i(151)] in c && (r.preventDefault(), a(Math[i(159)](t, Math[i(181)](e, n + c[r[i(151)]]))), requestAnimationFrame(() => s[i(203)]?.querySelector(i(208))?.[i(132)]({ preventScroll: !0 })));
265
+ t.key in c && (t.preventDefault(), a(Math[i(248)](n, Math[i(195)](e, r + c[t[i(209)]]))), requestAnimationFrame(() => s.current?.querySelector(i(229))?.[i(237)]({ preventScroll: !0 })));
266
266
  },
267
- children: l.map((e) => S(o(147), {
268
- type: "button",
269
- role: "option",
270
- "aria-selected": e === n,
271
- tabIndex: e === n ? 0 : -1,
272
- className: o(134),
273
- "data-today": e === r || void 0,
267
+ children: l[o(255)]((e) => S(o(184), {
268
+ type: o(184),
269
+ role: o(246),
270
+ "aria-selected": e === r,
271
+ tabIndex: e === r ? 0 : -1,
272
+ className: o(227),
273
+ "data-today": e === i || void 0,
274
274
  onClick: () => a(e),
275
275
  children: e
276
276
  }, e))
277
277
  });
278
278
  }
279
- function ie({ cells: e, label: t, gridRef: n }) {
280
- let r = i, a = Math[r(181)](0, e.findIndex((e) => e[r(186)])), [o, s] = b(a);
279
+ function ie({ cells: e, label: n, gridRef: r }) {
280
+ let i = t, a = Math[i(195)](0, e[i(194)]((e) => e[i(243)])), [o, s] = y(a);
281
281
  return S("div", {
282
- ref: n,
283
- role: r(142),
284
- "aria-label": t,
282
+ ref: r,
283
+ role: "grid",
284
+ "aria-label": n,
285
285
  className: "ds-calendar__picks",
286
286
  onKeyDown: (t) => {
287
- let i = r, a = {
287
+ let n = i, a = {
288
288
  ArrowLeft: -1,
289
289
  ArrowRight: 1,
290
290
  ArrowUp: -3,
291
291
  ArrowDown: 3
292
292
  }, c;
293
- t[i(151)] in a ? c = o + a[t[i(151)]] : t[i(151)] === i(207) ? c = 0 : t[i(151)] === i(152) && (c = e.length - 1), !(c === void 0 || c < 0 || c >= e[i(177)]) && (t.preventDefault(), s(c), requestAnimationFrame(() => n[i(203)]?.querySelector(i(135))?.[i(132)]({ preventScroll: !0 })));
293
+ t[n(209)] in a ? c = o + a[t.key] : t[n(209)] === n(191) ? c = 0 : t[n(209)] === n(225) && (c = e[n(250)] - 1), !(c === void 0 || c < 0 || c >= e[n(250)]) && (t[n(228)](), s(c), requestAnimationFrame(() => r[n(217)]?.[n(211)](n(208))?.[n(237)]({ preventScroll: !0 })));
294
294
  },
295
- children: e[r(180)]((e, t) => S(r(147), {
296
- type: r(147),
297
- role: r(160),
295
+ children: e[i(255)]((e, t) => S(i(184), {
296
+ type: i(184),
297
+ role: "gridcell",
298
298
  tabIndex: t === o ? 0 : -1,
299
- "aria-selected": e[r(186)],
300
- "aria-disabled": e[r(155)] || void 0,
301
- "aria-current": e[r(203)] ? r(165) : void 0,
302
- className: r(189),
303
- "data-selected": e[r(186)] || void 0,
304
- "data-today": e[r(203)] || void 0,
305
- onClick: () => !e[r(155)] && e[r(192)](),
306
- children: S(r(133), { children: e[r(145)] })
307
- }, e[r(151)]))
299
+ "aria-selected": e[i(243)],
300
+ "aria-disabled": e[i(226)] || void 0,
301
+ "aria-current": e[i(217)] ? i(202) : void 0,
302
+ className: i(205),
303
+ "data-selected": e.selected || void 0,
304
+ "data-today": e.current || void 0,
305
+ onClick: () => !e.disabled && e.pick(),
306
+ children: S("span", { children: e[i(206)] })
307
+ }, e.key))
308
308
  });
309
309
  }
310
310
  export { w as Calendar };