@iamfiro/design 0.3.1 → 0.3.4

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 (161) hide show
  1. package/agents/INDEX.md +1 -1
  2. package/agents/avatar/AGENTS.md +29 -1
  3. package/agents/brand-icon/AGENTS.md +1 -1
  4. package/agents/social-login-button/AGENTS.md +4 -3
  5. package/agents/tooltip/AGENTS.md +1 -1
  6. package/lib/components/Accordion/Accordion2.js +92 -92
  7. package/lib/components/ActionBar/ActionBar2.js +42 -45
  8. package/lib/components/Alert/Alert2.js +77 -77
  9. package/lib/components/AppShell/AppShell2.js +70 -71
  10. package/lib/components/AreaChart/AreaChart.js +32 -35
  11. package/lib/components/BarChart/BarChart2.js +155 -155
  12. package/lib/components/BarList/BarList2.js +93 -93
  13. package/lib/components/Breadcrumb/Breadcrumb2.js +62 -64
  14. package/lib/components/Calendar/Calendar2.js +183 -182
  15. package/lib/components/Calendar/DatePicker2.js +116 -115
  16. package/lib/components/Calendar/date.js +67 -66
  17. package/lib/components/Card/Card2.js +67 -67
  18. package/lib/components/CardFrame/CardFrame2.js +34 -37
  19. package/lib/components/Chart/ChartParts.js +90 -90
  20. package/lib/components/Chart/chart2.js +62 -62
  21. package/lib/components/Chart/useChartInteraction.js +51 -51
  22. package/lib/components/ChatBubble/ChatBubble2.js +117 -117
  23. package/lib/components/ChatBubble/formatChatTime.js +37 -36
  24. package/lib/components/ChatComposer/ChatComposer2.js +55 -55
  25. package/lib/components/CodeBlock/CodeBlock2.js +60 -60
  26. package/lib/components/CodeBlock/highlight.js +72 -72
  27. package/lib/components/ColorPicker/ColorPicker2.js +232 -231
  28. package/lib/components/ColorPicker/color.js +67 -67
  29. package/lib/components/ColorPicker/presets.js +25 -24
  30. package/lib/components/Combobox/Combobox2.js +140 -140
  31. package/lib/components/CommandMenu/CommandMenu.js +135 -135
  32. package/lib/components/Comment/Comment2.js +82 -57
  33. package/lib/components/ContextMenu/ContextMenu2.js +101 -100
  34. package/lib/components/DataGrid/DataGrid2.js +872 -871
  35. package/lib/components/DataGrid/GridPopover.js +98 -98
  36. package/lib/components/DataGrid/anchor.js +34 -33
  37. package/lib/components/DataGrid/model.js +291 -290
  38. package/lib/components/DataGrid/panels.js +337 -336
  39. package/lib/components/DataGrid/typeMeta.js +49 -48
  40. package/lib/components/DataGrid/types.js +34 -33
  41. package/lib/components/DescriptionList/DescriptionList2.js +109 -109
  42. package/lib/components/Dialog/AlertDialog.js +53 -53
  43. package/lib/components/Dialog/Dialog2.js +72 -72
  44. package/lib/components/Dialog/modal.js +67 -68
  45. package/lib/components/Drawer/Drawer2.js +117 -117
  46. package/lib/components/DropdownMenu/DropdownMenu2.js +267 -266
  47. package/lib/components/DropdownMenu/menuCore.js +68 -42
  48. package/lib/components/Dropzone/Dropzone2.js +78 -78
  49. package/lib/components/EmptyState/EmptyState2.js +58 -56
  50. package/lib/components/FileChip/FileChip2.js +72 -48
  51. package/lib/components/FileUpload/FileUpload.js +137 -138
  52. package/lib/components/FilterChips/FilterChips2.js +61 -61
  53. package/lib/components/FunnelChart/FunnelChart2.js +161 -161
  54. package/lib/components/FunnelChart/funnel.js +50 -49
  55. package/lib/components/Highlight/Highlight2.js +56 -56
  56. package/lib/components/HoverCard/HoverCard.js +73 -73
  57. package/lib/components/InlineDiff/InlineDiff2.js +129 -129
  58. package/lib/components/InlineDiff/diff.js +87 -87
  59. package/lib/components/InlineDiff/useDiffReview.js +54 -52
  60. package/lib/components/Kanban/Kanban2.js +383 -384
  61. package/lib/components/Kanban/KanbanCard.js +68 -93
  62. package/lib/components/Kanban/move.js +43 -43
  63. package/lib/components/LineChart/LineChart2.js +164 -164
  64. package/lib/components/List/List2.js +60 -60
  65. package/lib/components/Listbox/Listbox2.js +108 -108
  66. package/lib/components/Marker/Marker2.js +59 -57
  67. package/lib/components/Menubar/Menubar2.js +120 -119
  68. package/lib/components/MultiSelect/MultiSelect2.js +111 -111
  69. package/lib/components/NavigationMenu/NavigationMenu2.js +277 -279
  70. package/lib/components/NoticeStack/NoticeStack2.js +109 -109
  71. package/lib/components/NumberStepper/NumberStepper2.js +70 -70
  72. package/lib/components/OtpInput/OtpInput2.js +94 -94
  73. package/lib/components/Pagination/Pagination2.js +109 -109
  74. package/lib/components/Pagination/paginationRange.js +37 -38
  75. package/lib/components/PhoneInput/PhoneInput.js +83 -84
  76. package/lib/components/PieChart/PieChart2.js +157 -157
  77. package/lib/components/PieChart/arc.js +72 -72
  78. package/lib/components/PieChart/useArcTween.js +50 -53
  79. package/lib/components/Popover/Popover2.js +62 -61
  80. package/lib/components/ProgressTracker/ProgressTracker2.js +104 -104
  81. package/lib/components/Rating/Rating2.js +89 -88
  82. package/lib/components/Resizable/Resizable2.js +133 -134
  83. package/lib/components/Resizable/layout.js +56 -56
  84. package/lib/components/ScaledPreview/ScaledPreview2.js +64 -63
  85. package/lib/components/ScatterChart/ScatterChart2.js +252 -251
  86. package/lib/components/ScatterChart/scatter.js +50 -52
  87. package/lib/components/ScrollArea/ScrollArea2.js +122 -122
  88. package/lib/components/Select/Select2.js +84 -85
  89. package/lib/components/Sidebar/Sidebar2.js +79 -79
  90. package/lib/components/Skeleton/Skeleton2.js +56 -56
  91. package/lib/components/Slider/Slider2.js +63 -63
  92. package/lib/components/SocialLoginButton/SocialLoginButton.js +54 -46
  93. package/lib/components/SparkChart/SparkChart2.js +129 -128
  94. package/lib/components/SparkChart/spark.js +49 -48
  95. package/lib/components/Sparkbar/Sparkbar2.js +59 -58
  96. package/lib/components/SplitView/SplitView2.js +54 -55
  97. package/lib/components/Stat/Stat2.js +59 -59
  98. package/lib/components/StepList/StepList2.js +78 -78
  99. package/lib/components/Table/Table2.js +55 -55
  100. package/lib/components/Tabs/Tabs2.js +76 -76
  101. package/lib/components/TagInput/TagInput2.js +218 -215
  102. package/lib/components/TimePicker/TimePicker2.js +204 -204
  103. package/lib/components/TimePicker/time.js +59 -58
  104. package/lib/components/Timeline/Timeline2.js +179 -179
  105. package/lib/components/Timeline/scale.js +60 -55
  106. package/lib/components/Toast/Toaster.js +103 -103
  107. package/lib/components/Toast/store.js +47 -47
  108. package/lib/components/ToggleGroup/ToggleGroup2.js +77 -77
  109. package/lib/components/Toolbar/Toolbar2.js +138 -138
  110. package/lib/components/Tracker/Tracker2.js +99 -99
  111. package/lib/components/TreeDiagram/TreeDiagram2.js +117 -117
  112. package/lib/components/TreeView/TreeView2.js +145 -145
  113. package/lib/hooks/timing.js +33 -33
  114. package/lib/hooks/useControllableState.js +33 -33
  115. package/lib/hooks/useCountdown.js +54 -55
  116. package/lib/hooks/useDigitInput.js +85 -84
  117. package/lib/hooks/useDismiss.js +55 -55
  118. package/lib/hooks/useElapsed.js +55 -55
  119. package/lib/hooks/useFloating.js +21 -21
  120. package/lib/hooks/useFocusTrap.js +67 -67
  121. package/lib/hooks/usePresence.js +33 -29
  122. package/lib/hooks/usePressToOpen.js +33 -33
  123. package/lib/hooks/useScrollLock.js +54 -55
  124. package/lib/hooks/useSelection.js +54 -48
  125. package/lib/index.js +67 -68
  126. package/lib/primitives/AspectRatio2.js +58 -54
  127. package/lib/primitives/BrandIcon.js +189 -158
  128. package/lib/primitives/ColorDot2.js +52 -51
  129. package/lib/primitives/CopyButton2.js +66 -64
  130. package/lib/primitives/CountBadge2.js +56 -56
  131. package/lib/primitives/Countdown2.js +36 -34
  132. package/lib/primitives/Delta2.js +41 -66
  133. package/lib/primitives/Elapsed.js +32 -32
  134. package/lib/primitives/FileIcon2.js +90 -90
  135. package/lib/primitives/Flag2.js +157 -157
  136. package/lib/primitives/IconStack2.js +60 -58
  137. package/lib/primitives/IconTile2.js +46 -48
  138. package/lib/primitives/Kbd2.js +51 -51
  139. package/lib/primitives/Layout2.js +71 -71
  140. package/lib/primitives/Link2.js +37 -35
  141. package/lib/primitives/MaskedText2.js +71 -75
  142. package/lib/primitives/Progress2.js +72 -72
  143. package/lib/primitives/RelativeTime.js +60 -64
  144. package/lib/primitives/SearchInput2.js +55 -56
  145. package/lib/primitives/SelectorButton2.js +69 -71
  146. package/lib/primitives/Spinner2.js +63 -59
  147. package/lib/primitives/StatusIcon2.js +66 -66
  148. package/lib/primitives/Swatch2.js +54 -56
  149. package/lib/primitives/Tooltip2.js +77 -77
  150. package/lib/primitives/Typography2.js +67 -67
  151. package/lib/primitives/formatCountdown.js +38 -41
  152. package/lib/primitives/formatElapsed.js +41 -40
  153. package/lib/primitives/formatRelativeTime.js +74 -48
  154. package/lib/primitives/hotkey.js +81 -81
  155. package/lib/primitives/index.js +220 -199
  156. package/lib/primitives/maskValue.js +53 -52
  157. package/lib/style.css +1 -1
  158. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +1 -1
  159. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  160. package/lib/types/primitives/index.d.ts +6 -2
  161. package/package.json +1 -1
@@ -1,309 +1,310 @@
1
1
  "use client";
2
2
  (function(e, t) {
3
- let r = n, i = e();
3
+ let n = i, r = e();
4
4
  for (;;) try {
5
- if (-parseInt(r(309)) / 1 + parseInt(r(296)) / 2 * (-parseInt(r(282)) / 3) + parseInt(r(313)) / 4 + parseInt(r(248)) / 5 + -parseInt(r(251)) / 6 + parseInt(r(274)) / 7 + parseInt(r(317)) / 8 * (-parseInt(r(311)) / 9) == t) break;
6
- i.push(i.shift());
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());
7
7
  } catch {
8
- i.push(i.shift());
8
+ r.push(r.shift());
9
9
  }
10
- })(a, 896576);
10
+ })(g, 467073);
11
11
  import { Text as e } from "../../primitives/Typography2.js";
12
12
  import { Inline as t } from "../../primitives/Layout2.js";
13
- function n(e, t) {
14
- e -= 248;
15
- let r = a(), i = r[e];
16
- n.sEsmPH === void 0 && (n.RIKEeW = function(e) {
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) {
17
18
  let t = "", n = "";
18
19
  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);
19
20
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
20
21
  return decodeURIComponent(n);
21
- }, n.tEAedg = {}, n.sEsmPH = !0);
22
- let o = r[0];
23
- n.IbCCBS !== o && (n.tEAedg = {}, n.IbCCBS = o);
24
- let s = n.tEAedg[e];
25
- return s === void 0 ? (i = n.RIKEeW(i), n.tEAedg[e] = i) : i = s, i;
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;
26
27
  }
27
- import { Button as r, cx as i } from "../../primitives/index.js";
28
- function a() {
29
- let e = /* @__PURE__ */ "zhmTy2fSzw5KyxjFx3DLzwTKyxLZ.mZi0mJyZAKjOBePL.rw5K.mti2otm2DvvzzM1H.zhmTy2fSzw5KyxjFx2rHEq.ntyYmtuWofv2yMjmyG.A2v5.z2v0rNvSBfLLyxi.yMv0D2vLBG.nde2zfHSqvzZ.zhmTy2fSzw5Kyxi.C2HPzNrlzxK.nJu3mti2nvzcvvfZtW.zhmTy2fSzw5KyxjFx3LLyxi.zM9JDxm.mZKWmdaXmMTtrgv5BG.z3jPzgnLBgW.Cg9SAxrL.C3rVCfbYB3bHz2f0Aw9U.C21VB3rO.DMfSDwu.zgLZywjSzwq.zhmTy2fSzw5KyxjFx2HLywq.zgf5CW.z2HVC3q.y3vYCMvUDa.z3jPza.BgvUz3rO.zNjVBq.zhmTy2fSzw5KyxjFx3bPy2S.yNv0Dg9U.z2v0vgLTzq.BgLZDgjVEa.zhmTy2fSzw5KyxjFx3LLyxjZ.zgf5CY0.BwfW.rxnJyxbL.zhmTy2fSzw5KyxjFx3zPzxCGzhmTy2fSzw5KyxjFx3LT.mZqYnteZnuTWs1jgBq.ChjLDMvUDerLzMf1Bhq.zgL2.ywnJzw50.w3rHyMLUzgv4psiWiL0.C2vSzwn0zwq.zgf0zq.zMLUzeLUzgv4.ntG1mtHkEKjbuKu.CMfUz2u.z2v0tw9UDgG.64we7j2yioYBLa.CM91BMq.CgLJAW.zhmTy2fSzw5KyxjFx3rPDgXL.lcdSL7dRJ4tcT+YBLcdSHkdTG50G7jE06RIW.B2zMC2v0sgvPz2H0.B25wywX1zunOyw5Nzq.7j207kceioUlRa.BwLU.w2fYAweTC2vSzwn0zwq9iNrYDwuIxq.Bwf4.nJjLrvzquuq.DgvYDgLHCNK.z2v0rgf5.zhmTy2fSzw5KyxjFx2zVB3q.C2nYB2XSvg8.Bw9Kzq.zhmTy2fSzw5KyxjFx2DYAwq.z2v0rgf0zq.C3bHBG.CxvLCNLtzwXLy3rVCG.B2zMC2v0vg9W.B3b0Aw9U".split(".");
30
- return a = function() {
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() {
31
32
  return e;
32
- }, a();
33
+ }, g();
33
34
  }
34
- import { addDays as o, addMonths as s, between as c, compareDay as l, formatFullDate as u, formatMonth as d, monthGrid as f, sameDay as p, sameMonth as m, startOfDay as h, startOfMonth as g, weekdayLabels as ee } from "./date.js";
35
35
  /* empty css */
36
36
  import { useEffect as _, useLayoutEffect as v, useRef as y, useState as b } from "react";
37
- import { ChevronDown as te, ChevronLeft as ne, ChevronRight as x } from "lucide-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(a) {
40
- let v = n, { min: w, max: T, isDateDisabled: ae, weekStartsOn: E = 0, defaultMonth: oe, autoFocus: D, showFooter: se = !0, className: O } = a, k = a.mode === v(283) ? a[v(256)] : void 0, A = a.mode === v(283) ? void 0 : a.value, j = A ?? k?.[v(264)] ?? null, [M, N] = b(() => g(oe ?? j ?? /* @__PURE__ */ new Date())), [P, F] = b(() => h(j ?? /* @__PURE__ */ new Date())), [ce, I] = b(0), [L, R] = b(v(259)), [z, le] = b(null), [B, V] = b(null), H = y(null), [U] = b(() => h(/* @__PURE__ */ new Date())), W = (e) => w && l(e, w) < 0 || T && l(e, T) > 0 || !!ae?.(e), G = (e) => {
41
- I(e > 0 ? 1 : -1), N((t) => s(t, e)), F((t) => s(t, e));
42
- }, K = (e) => {
43
- le(e === v(287) ? "out" : "in"), I(0), R(e);
44
- }, q = y(!1);
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) => {
41
+ I(e > 0 ? 1 : -1), N((t) => o(t, e)), F((t) => o(t, e));
42
+ }, G = (e) => {
43
+ let t = v;
44
+ ue(e === t(192) ? t(179) : "in"), I(0), le(e);
45
+ }, K = y(!1);
45
46
  _(() => {
46
47
  let e = v;
47
- q[e(261)] ? H[e(261)]?.[e(305)](e(278))?.[e(250)]({ preventScroll: !0 }) : q[e(261)] = !0;
48
+ K[e(203)] ? V[e(203)]?.[e(136)](e(135))?.[e(132)]({ preventScroll: !0 }) : K[e(203)] = !0;
48
49
  }, [L]);
49
- let ue = (e, t) => !!T && l(new Date(e, t, 1), T) > 0 || !!w && l(new Date(e, t + 1, 0), w) < 0, J = M[v(315)](), de = w?.[v(315)]() ?? U[v(315)]() - 100, fe = T?.[v(315)]() ?? U[v(315)]() + 20, Y = (e) => {
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) => {
50
51
  let t = v;
51
- if (!W(e)) {
52
- if (F(e), !m(e, M) && (I(l(e, M) > 0 ? 1 : -1), N(g(e))), a.mode === t(283)) {
53
- let n = a[t(256)] ?? {
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 ?? {
54
55
  from: null,
55
56
  to: null
56
57
  };
57
- !n.from || n.to ? a.onValueChange?.({
58
+ !n.from || n.to ? g[t(196)]?.({
58
59
  from: e,
59
60
  to: null
60
- }) : l(e, n[t(264)]) < 0 ? a.onValueChange?.({
61
+ }) : c(e, n.from) < 0 ? g[t(196)]?.({
61
62
  from: e,
62
- to: n.from
63
- }) : a[t(291)]?.({
64
- from: n.from,
63
+ to: n[t(187)]
64
+ }) : g.onValueChange?.({
65
+ from: n[t(187)],
65
66
  to: e
66
67
  });
67
- } else a[t(291)]?.(e);
68
+ } else g.onValueChange?.(e);
68
69
  }
69
70
  };
70
71
  _(() => {
71
72
  let e = v;
72
73
  if (!D) return;
73
- let t = requestAnimationFrame(() => H[e(261)]?.[e(305)](e(278))?.[e(250)]({ preventScroll: !0 }));
74
+ let t = requestAnimationFrame(() => V[e(203)]?.[e(136)](e(135))?.[e(132)]({ preventScroll: !0 }));
74
75
  return () => cancelAnimationFrame(t);
75
76
  }, [D]);
76
- let pe = (e) => {
77
+ let me = (e) => {
77
78
  let t = v, n = {
78
- ArrowLeft: () => o(P, -1),
79
- ArrowRight: () => o(P, 1),
80
- ArrowUp: () => o(P, -7),
81
- ArrowDown: () => o(P, 7),
82
- PageUp: () => s(P, e[t(319)] ? -12 : -1),
83
- PageDown: () => s(P, e[t(319)] ? 12 : 1),
84
- Home: () => o(P, -((P[t(298)]() - E + 7) % 7)),
85
- End: () => o(P, 6 - (P.getDay() - E + 7) % 7)
79
+ ArrowLeft: () => a(P, -1),
80
+ ArrowRight: () => a(P, 1),
81
+ ArrowUp: () => a(P, -7),
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)
86
87
  };
87
- if (n[e[t(314)]]) {
88
+ if (n[e[t(151)]]) {
88
89
  e.preventDefault();
89
- let r = n[e.key]();
90
- F(r), !m(r, M) && (I(l(r, M) > 0 ? 1 : -1), N(g(r))), requestAnimationFrame(() => H.current?.querySelector(t(278))?.focus({ preventScroll: !0 }));
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 }));
91
92
  }
92
- }, me = f(M, E), X = k?.[v(264)] && !k.to && B ? B : null, he = (e) => {
93
+ }, Y = d(M, E), X = k?.[v(187)] && !k.to && z ? z : null, he = (e) => {
93
94
  let t = v;
94
- e.key === t(272) && L !== t(259) && (e[t(275)](), e[t(254)](), K(t(259)));
95
+ e[t(151)] === t(167) && L !== t(164) && (e.preventDefault(), e.stopPropagation(), G(t(164)));
95
96
  }, ge = () => {
96
97
  let e = v;
97
- a[e(301)] === e(283) ? (!m(U, M) && (I(l(U, M) > 0 ? 1 : -1), N(g(U))), F(U)) : Y(U), L !== "days" && K("days");
98
- }, _e = k?.[v(264)] && k.to ? Math[v(286)]((h(k.to)[v(267)]() - h(k[v(264)])[v(267)]()) / 864e5) + 1 : 0, Z = a.mode === "range" ? k?.[v(264)] ? k.to ? _e + "일 선택됨" : "종료일을 고르세요" : "시작일을 고르세요" : null, Q = se && C(t, {
99
- justify: v(316),
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",
100
101
  wrap: !1,
101
- className: v(299),
102
+ className: v(185),
102
103
  children: [S(e, {
103
- variant: "caption",
104
- tone: Z && k?.[v(264)] && !k.to ? v(277) : v(297),
105
- "aria-live": v(253),
104
+ variant: v(174),
105
+ tone: Z && k?.[v(187)] && !k.to ? v(204) : v(183),
106
+ "aria-live": v(169),
106
107
  children: Z
107
- }), S(r, {
108
- variant: v(260),
108
+ }), S(n, {
109
+ variant: v(153),
109
110
  size: "sm",
110
111
  onClick: ge,
111
- disabled: W(U),
112
+ disabled: U(H),
112
113
  children: "오늘"
113
114
  })]
114
115
  }), $ = C(t, {
115
- justify: v(316),
116
+ justify: v(168),
116
117
  wrap: !1,
117
- className: v(258),
118
- children: [S(r, {
119
- variant: v(260),
118
+ className: v(171),
119
+ children: [S(n, {
120
+ variant: v(153),
120
121
  size: "sm",
121
122
  iconRight: S(te, {}),
122
- className: v(288),
123
- "data-open": L === v(287) || void 0,
124
- "aria-expanded": L === v(287),
125
- "aria-label": L === v(259) ? d(M) + v(289) : "날짜로 돌아가기",
126
- "aria-live": "polite",
127
- onClick: () => K(L === v(259) ? "pick" : v(259)),
128
- children: d(M)
129
- }), L === v(259) && C(t, {
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)),
129
+ children: u(M)
130
+ }), L === "days" && C(t, {
130
131
  gap: 1,
131
132
  wrap: !1,
132
- children: [S(r, {
133
+ children: [S(n, {
133
134
  iconOnly: !0,
134
- variant: v(260),
135
+ variant: v(153),
135
136
  size: "sm",
136
- icon: S(ne, {}),
137
- "aria-label": v(292),
138
- onClick: () => G(-1)
139
- }), S(r, {
137
+ icon: S(x, {}),
138
+ "aria-label": "이전 달",
139
+ onClick: () => W(-1)
140
+ }), S(n, {
140
141
  iconOnly: !0,
141
- variant: v(260),
142
+ variant: "ghost",
142
143
  size: "sm",
143
- icon: S(x, {}),
144
+ icon: S(ne, {}),
144
145
  "aria-label": "다음 달",
145
- onClick: () => G(1)
146
+ onClick: () => W(1)
146
147
  })]
147
148
  })]
148
149
  });
149
- if (L === "pick") {
150
+ if (L === v(192)) {
150
151
  let e = (e) => {
151
152
  let t = v;
152
- N(new Date(e, M[t(284)](), 1)), F((n) => new Date(e, n[t(284)](), Math.min(n[t(303)](), new Date(e, n[t(284)]() + 1, 0).getDate())));
153
- }, t = Array[v(264)]({ length: 12 }, (e, t) => ({
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) => ({
154
155
  key: t,
155
156
  label: t + 1 + "월",
156
- selected: t === M[v(284)](),
157
- current: J === U[v(315)]() && t === U[v(284)](),
158
- disabled: ue(J, t),
157
+ selected: t === M[v(166)](),
158
+ current: q === H[v(144)]() && t === H.getMonth(),
159
+ disabled: de(q, t),
159
160
  pick: () => {
160
161
  let e = v;
161
- N(new Date(J, t, 1)), F((n) => new Date(J, t, Math.min(n[e(303)](), new Date(J, t + 1, 0)[e(303)]()))), K(e(259));
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");
162
163
  }
163
164
  }));
164
- return C(v(276), {
165
- className: i(v(318), O),
165
+ return C("div", {
166
+ className: r("ds-calendar", O),
166
167
  onKeyDown: he,
167
168
  children: [
168
169
  $,
169
- C(v(276), {
170
- className: v(273),
171
- "data-zoom": z,
170
+ C(v(200), {
171
+ className: v(162),
172
+ "data-zoom": R,
172
173
  children: [S(re, {
173
- first: de,
174
- last: fe,
175
- selected: J,
176
- current: U.getFullYear(),
174
+ first: fe,
175
+ last: pe,
176
+ selected: q,
177
+ current: H[v(144)](),
177
178
  onPick: e
178
179
  }), S(ie, {
179
- gridRef: H,
180
+ gridRef: V,
180
181
  cells: t,
181
- label: J + v(285)
182
+ label: q + v(148)
182
183
  })]
183
- }, v(287)),
184
+ }, v(192)),
184
185
  Q
185
186
  ]
186
187
  });
187
188
  }
188
- return C(v(276), {
189
- className: i(v(318), O),
189
+ return C(v(200), {
190
+ className: r(v(163), O),
190
191
  children: [
191
192
  $,
192
- C(v(276), {
193
- className: "ds-calendar__view",
194
- "data-zoom": z,
195
- children: [S(v(276), {
196
- className: v(308),
193
+ C(v(200), {
194
+ className: v(149),
195
+ "data-zoom": R,
196
+ children: [S("div", {
197
+ className: v(143),
197
198
  "aria-hidden": !0,
198
- children: ee(E)[v(271)]((e, t) => S(v(304), {
199
+ children: ee(E)[v(180)]((e, t) => S(v(133), {
199
200
  "data-weekday": (t + E) % 7,
200
201
  children: e
201
202
  }, e))
202
- }), S(v(276), {
203
- ref: H,
204
- role: v(262),
205
- "aria-label": d(M),
206
- className: v(302),
203
+ }), S(v(200), {
204
+ ref: V,
205
+ role: v(142),
206
+ "aria-label": u(M),
207
+ className: "ds-calendar__grid",
207
208
  "data-dir": ce,
208
- onKeyDown: pe,
209
- onPointerLeave: () => V(null),
210
- children: me.map((e) => {
211
- let t = v, n = !m(e, M), r = W(e), i = X ?? k?.to ?? null, o = k?.[t(264)] && i ? l(k[t(264)], i) <= 0 ? k[t(264)] : i : null, s = k?.[t(264)] && i ? l(k[t(264)], i) <= 0 ? i : k[t(264)] : null, d = !!(o && s && c(e, o, s)), f = !!(o && p(e, o)) || !!k?.[t(264)] && !i && p(e, k[t(264)]), h = !!(s && p(e, s)), g = p(e, A) || f || h;
212
- return S(t(266), {
213
- type: t(266),
214
- role: t(252),
215
- tabIndex: p(e, P) ? 0 : -1,
216
- "aria-selected": g,
209
+ onKeyDown: me,
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),
216
+ tabIndex: f(e, P) ? 0 : -1,
217
+ "aria-selected": h,
217
218
  "aria-disabled": r || void 0,
218
- "aria-label": u(e),
219
- "aria-current": p(e, U) ? t(280) : void 0,
220
- className: t(312),
219
+ "aria-label": l(e),
220
+ "aria-current": f(e, H) ? t(165) : void 0,
221
+ className: t(201),
221
222
  "data-outside": n || void 0,
222
- "data-weekday": e[t(298)](),
223
- "data-today": p(e, U) || void 0,
224
- "data-selected": g || void 0,
225
- "data-in-range": d && !g || void 0,
226
- "data-range-start": f && !!i && !p(o, s) || void 0,
227
- "data-range-end": h && !p(o, s) || void 0,
223
+ "data-weekday": e[t(146)](),
224
+ "data-today": f(e, H) || void 0,
225
+ "data-selected": h || void 0,
226
+ "data-in-range": u && !h || void 0,
227
+ "data-range-start": d && !!i && !f(a, o) || void 0,
228
+ "data-range-end": m && !f(a, o) || void 0,
228
229
  "data-preview": !!X || void 0,
229
- onClick: () => Y(e),
230
- onPointerEnter: () => a[t(301)] === t(283) && !r && V(e),
231
- children: S(t(304), { children: e[t(303)]() })
232
- }, e[t(267)]());
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)]());
233
234
  })
234
- }, M.getTime())]
235
- }, v(270) + z),
235
+ }, M[v(161)]())]
236
+ }, v(195) + R),
236
237
  Q
237
238
  ]
238
239
  });
239
240
  }
240
- function re({ first: e, last: t, selected: r, current: i, onPick: a }) {
241
- let o = n, s = y(null), c = y(!1);
241
+ function re({ first: e, last: t, selected: n, current: r, onPick: a }) {
242
+ let o = i, s = y(null), c = y(!1);
242
243
  v(() => {
243
- let e = n, t = s.current, r = t?.[e(305)](e(294));
244
- if (!t || !r) return;
245
- let i = r[e(306)] - t.clientHeight / 2 + r[e(290)] / 2;
246
- t[e(300)]({
247
- top: i,
248
- behavior: c[e(261)] ? e(255) : "auto"
249
- }), c[e(261)] = !0;
250
- }, [r]);
251
- let l = Array[o(264)]({ length: Math[o(295)](0, t - e + 1) }, (t, n) => e + n);
252
- return S("div", {
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), {
253
254
  ref: s,
254
- role: o(268),
255
+ role: o(205),
255
256
  "aria-label": "연도",
256
- className: o(269),
257
- onKeyDown: (n) => {
257
+ className: o(202),
258
+ onKeyDown: (r) => {
258
259
  let i = o, c = {
259
260
  ArrowUp: -1,
260
261
  ArrowDown: 1,
261
262
  PageUp: -10,
262
263
  PageDown: 10
263
264
  };
264
- n[i(314)] in c && (n[i(275)](), a(Math[i(293)](t, Math[i(295)](e, r + c[n[i(314)]]))), requestAnimationFrame(() => s.current?.[i(305)](i(294))?.[i(250)]({ preventScroll: !0 })));
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
266
  },
266
- children: l[o(271)]((e) => S(o(266), {
267
- type: o(266),
268
- role: o(307),
269
- "aria-selected": e === r,
270
- tabIndex: e === r ? 0 : -1,
271
- className: o(249),
272
- "data-today": e === i || void 0,
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,
273
274
  onClick: () => a(e),
274
275
  children: e
275
276
  }, e))
276
277
  });
277
278
  }
278
- function ie({ cells: e, label: t, gridRef: r }) {
279
- let i = n, a = Math[i(295)](0, e[i(281)]((e) => e[i(279)])), [o, s] = b(a);
280
- return S(i(276), {
281
- ref: r,
282
- role: i(262),
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);
281
+ return S("div", {
282
+ ref: n,
283
+ role: r(142),
283
284
  "aria-label": t,
284
285
  className: "ds-calendar__picks",
285
286
  onKeyDown: (t) => {
286
- let n = i, a = {
287
+ let i = r, a = {
287
288
  ArrowLeft: -1,
288
289
  ArrowRight: 1,
289
290
  ArrowUp: -3,
290
291
  ArrowDown: 3
291
292
  }, c;
292
- t.key in a ? c = o + a[t[n(314)]] : t[n(314)] === "Home" ? c = 0 : t[n(314)] === n(310) && (c = e[n(263)] - 1), !(c === void 0 || c < 0 || c >= e[n(263)]) && (t[n(275)](), s(c), requestAnimationFrame(() => r[n(261)]?.[n(305)](n(278))?.[n(250)]({ preventScroll: !0 })));
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
294
  },
294
- children: e.map((e, t) => S(i(266), {
295
- type: i(266),
296
- role: i(252),
295
+ children: e[r(180)]((e, t) => S(r(147), {
296
+ type: r(147),
297
+ role: r(160),
297
298
  tabIndex: t === o ? 0 : -1,
298
- "aria-selected": e[i(279)],
299
- "aria-disabled": e[i(257)] || void 0,
300
- "aria-current": e[i(261)] ? "date" : void 0,
301
- className: i(265),
302
- "data-selected": e.selected || void 0,
303
- "data-today": e.current || void 0,
304
- onClick: () => !e.disabled && e.pick(),
305
- children: S(i(304), { children: e.label })
306
- }, e[i(314)]))
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)]))
307
308
  });
308
309
  }
309
310
  export { w as Calendar };