@iamfiro/design 0.3.2 → 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 (163) hide show
  1. package/agents/INDEX.md +1 -1
  2. package/agents/app-shell/AGENTS.md +99 -1
  3. package/agents/brand-icon/AGENTS.md +1 -1
  4. package/agents/social-login-button/AGENTS.md +4 -3
  5. package/lib/components/Accordion/Accordion2.js +74 -74
  6. package/lib/components/ActionBar/ActionBar2.js +44 -42
  7. package/lib/components/Alert/Alert2.js +67 -67
  8. package/lib/components/AppShell/AppShell2.js +72 -66
  9. package/lib/components/AreaChart/AreaChart.js +45 -45
  10. package/lib/components/BarChart/BarChart2.js +128 -128
  11. package/lib/components/BarList/BarList2.js +105 -105
  12. package/lib/components/Breadcrumb/Breadcrumb2.js +63 -64
  13. package/lib/components/Calendar/Calendar2.js +197 -197
  14. package/lib/components/Calendar/DatePicker2.js +100 -100
  15. package/lib/components/Calendar/date.js +47 -70
  16. package/lib/components/Card/Card2.js +101 -74
  17. package/lib/components/CardFrame/CardFrame2.js +52 -56
  18. package/lib/components/Chart/ChartParts.js +88 -88
  19. package/lib/components/Chart/chart2.js +63 -63
  20. package/lib/components/Chart/useChartInteraction.js +43 -43
  21. package/lib/components/ChatBubble/ChatBubble2.js +111 -111
  22. package/lib/components/ChatBubble/formatChatTime.js +38 -43
  23. package/lib/components/ChatComposer/ChatComposer2.js +96 -96
  24. package/lib/components/CodeBlock/CodeBlock2.js +65 -65
  25. package/lib/components/CodeBlock/highlight.js +84 -84
  26. package/lib/components/ColorPicker/ColorPicker2.js +263 -263
  27. package/lib/components/ColorPicker/color.js +92 -92
  28. package/lib/components/ColorPicker/presets.js +35 -39
  29. package/lib/components/Combobox/Combobox2.js +134 -134
  30. package/lib/components/CommandMenu/CommandMenu.js +130 -131
  31. package/lib/components/Comment/Comment2.js +64 -63
  32. package/lib/components/ContextMenu/ContextMenu2.js +84 -84
  33. package/lib/components/DataGrid/DataGrid2.js +1182 -1180
  34. package/lib/components/DataGrid/GridPopover.js +84 -84
  35. package/lib/components/DataGrid/anchor.js +29 -28
  36. package/lib/components/DataGrid/model.js +308 -307
  37. package/lib/components/DataGrid/panels.js +398 -399
  38. package/lib/components/DataGrid/typeMeta.js +41 -40
  39. package/lib/components/DataGrid/types.js +39 -40
  40. package/lib/components/DescriptionList/DescriptionList2.js +105 -105
  41. package/lib/components/Dialog/AlertDialog.js +90 -89
  42. package/lib/components/Dialog/Dialog2.js +71 -72
  43. package/lib/components/Dialog/modal.js +62 -60
  44. package/lib/components/Drawer/Drawer2.js +167 -166
  45. package/lib/components/DropdownMenu/DropdownMenu2.js +260 -258
  46. package/lib/components/DropdownMenu/menuCore.js +29 -28
  47. package/lib/components/Dropzone/Dropzone2.js +78 -77
  48. package/lib/components/EmptyState/EmptyState2.js +57 -57
  49. package/lib/components/FileChip/FileChip2.js +53 -77
  50. package/lib/components/FileUpload/FileUpload.js +168 -167
  51. package/lib/components/FilterChips/FilterChips2.js +60 -60
  52. package/lib/components/FunnelChart/FunnelChart2.js +174 -174
  53. package/lib/components/FunnelChart/funnel.js +44 -42
  54. package/lib/components/Highlight/Highlight2.js +55 -55
  55. package/lib/components/HoverCard/HoverCard.js +71 -96
  56. package/lib/components/InlineDiff/InlineDiff2.js +128 -129
  57. package/lib/components/InlineDiff/diff.js +79 -79
  58. package/lib/components/InlineDiff/useDiffReview.js +61 -62
  59. package/lib/components/Kanban/Kanban2.js +387 -389
  60. package/lib/components/Kanban/KanbanCard.js +84 -84
  61. package/lib/components/Kanban/move.js +32 -25
  62. package/lib/components/LineChart/LineChart2.js +228 -228
  63. package/lib/components/List/List2.js +62 -62
  64. package/lib/components/Listbox/Listbox2.js +92 -92
  65. package/lib/components/Marker/Marker2.js +50 -56
  66. package/lib/components/Menubar/Menubar2.js +117 -116
  67. package/lib/components/MultiSelect/MultiSelect2.js +111 -111
  68. package/lib/components/NavigationMenu/NavigationMenu2.js +231 -231
  69. package/lib/components/NoticeStack/NoticeStack2.js +99 -99
  70. package/lib/components/NumberStepper/NumberStepper2.js +60 -60
  71. package/lib/components/OtpInput/OtpInput2.js +90 -89
  72. package/lib/components/Pagination/Pagination2.js +105 -105
  73. package/lib/components/Pagination/paginationRange.js +37 -37
  74. package/lib/components/PhoneInput/PhoneInput.js +75 -76
  75. package/lib/components/PieChart/PieChart2.js +166 -166
  76. package/lib/components/PieChart/arc.js +71 -69
  77. package/lib/components/PieChart/useArcTween.js +60 -62
  78. package/lib/components/Popover/Popover2.js +85 -86
  79. package/lib/components/ProgressTracker/ProgressTracker2.js +134 -134
  80. package/lib/components/Rating/Rating2.js +90 -89
  81. package/lib/components/Resizable/Resizable2.js +128 -129
  82. package/lib/components/Resizable/layout.js +51 -51
  83. package/lib/components/ScaledPreview/ScaledPreview2.js +49 -48
  84. package/lib/components/ScatterChart/ScatterChart2.js +214 -213
  85. package/lib/components/ScatterChart/scatter.js +49 -52
  86. package/lib/components/ScrollArea/ScrollArea2.js +115 -117
  87. package/lib/components/Select/Select2.js +82 -82
  88. package/lib/components/Sidebar/Sidebar2.js +91 -85
  89. package/lib/components/Sidebar/rail.js +43 -0
  90. package/lib/components/Skeleton/Skeleton2.js +63 -64
  91. package/lib/components/Slider/Slider2.js +65 -66
  92. package/lib/components/SocialLoginButton/SocialLoginButton.js +76 -69
  93. package/lib/components/SparkChart/SparkChart2.js +126 -127
  94. package/lib/components/SparkChart/spark.js +66 -42
  95. package/lib/components/Sparkbar/Sparkbar2.js +60 -60
  96. package/lib/components/SplitView/SplitView2.js +51 -51
  97. package/lib/components/Stat/Stat2.js +79 -79
  98. package/lib/components/StepList/StepList2.js +75 -75
  99. package/lib/components/Table/Table2.js +71 -71
  100. package/lib/components/Tabs/Tabs2.js +74 -74
  101. package/lib/components/TagInput/TagInput2.js +223 -221
  102. package/lib/components/TimePicker/TimePicker2.js +197 -195
  103. package/lib/components/TimePicker/time.js +59 -56
  104. package/lib/components/Timeline/Timeline2.js +195 -195
  105. package/lib/components/Timeline/scale.js +64 -66
  106. package/lib/components/Toast/Toaster.js +139 -139
  107. package/lib/components/Toast/store.js +72 -76
  108. package/lib/components/ToggleGroup/ToggleGroup2.js +79 -79
  109. package/lib/components/Toolbar/Toolbar2.js +165 -164
  110. package/lib/components/Tracker/Tracker2.js +72 -72
  111. package/lib/components/TreeDiagram/TreeDiagram2.js +96 -97
  112. package/lib/components/TreeView/TreeView2.js +152 -151
  113. package/lib/hooks/timing.js +34 -36
  114. package/lib/hooks/useControllableState.js +29 -30
  115. package/lib/hooks/useCountdown.js +51 -53
  116. package/lib/hooks/useDigitInput.js +81 -55
  117. package/lib/hooks/useDismiss.js +53 -56
  118. package/lib/hooks/useElapsed.js +48 -49
  119. package/lib/hooks/useFloating.js +36 -36
  120. package/lib/hooks/useFocusTrap.js +32 -32
  121. package/lib/hooks/usePresence.js +49 -49
  122. package/lib/hooks/usePressToOpen.js +40 -40
  123. package/lib/hooks/useScrollLock.js +50 -49
  124. package/lib/hooks/useSelection.js +42 -47
  125. package/lib/index.js +138 -139
  126. package/lib/primitives/AspectRatio2.js +58 -57
  127. package/lib/primitives/BrandIcon.js +210 -179
  128. package/lib/primitives/ColorDot2.js +42 -41
  129. package/lib/primitives/CopyButton2.js +59 -58
  130. package/lib/primitives/CountBadge2.js +58 -63
  131. package/lib/primitives/Countdown2.js +38 -37
  132. package/lib/primitives/Delta2.js +37 -37
  133. package/lib/primitives/Elapsed.js +42 -40
  134. package/lib/primitives/FileIcon2.js +102 -102
  135. package/lib/primitives/Flag2.js +124 -124
  136. package/lib/primitives/IconStack2.js +45 -23
  137. package/lib/primitives/IconTile2.js +45 -41
  138. package/lib/primitives/Kbd2.js +48 -48
  139. package/lib/primitives/Layout2.js +71 -71
  140. package/lib/primitives/Link2.js +40 -42
  141. package/lib/primitives/MaskedText2.js +50 -50
  142. package/lib/primitives/Progress2.js +78 -77
  143. package/lib/primitives/RelativeTime.js +55 -58
  144. package/lib/primitives/SearchInput2.js +72 -68
  145. package/lib/primitives/SelectorButton2.js +60 -61
  146. package/lib/primitives/Spinner2.js +48 -49
  147. package/lib/primitives/StatusIcon2.js +69 -69
  148. package/lib/primitives/Swatch2.js +65 -69
  149. package/lib/primitives/Tooltip2.js +92 -92
  150. package/lib/primitives/Typography2.js +37 -37
  151. package/lib/primitives/formatCountdown.js +38 -38
  152. package/lib/primitives/formatElapsed.js +43 -45
  153. package/lib/primitives/formatRelativeTime.js +54 -54
  154. package/lib/primitives/hotkey.js +77 -77
  155. package/lib/primitives/index.js +162 -161
  156. package/lib/primitives/maskValue.js +54 -51
  157. package/lib/style.css +1 -1
  158. package/lib/types/components/AppShell/AppShell.d.ts +9 -2
  159. package/lib/types/components/Sidebar/rail.d.ts +4 -0
  160. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +1 -1
  161. package/lib/types/components/index.d.ts +1 -0
  162. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  163. package/package.json +1 -1
@@ -1,310 +1,310 @@
1
1
  "use client";
2
- (function(e, t) {
3
- let n = g, r = e();
2
+ (function(e, n) {
3
+ let r = t, i = e();
4
4
  for (;;) try {
5
- if (-parseInt(n(491)) / 1 * (parseInt(n(527)) / 2) + parseInt(n(475)) / 3 + parseInt(n(524)) / 4 * (parseInt(n(505)) / 5) + -parseInt(n(534)) / 6 * (parseInt(n(543)) / 7) + parseInt(n(526)) / 8 + -parseInt(n(495)) / 9 * (-parseInt(n(540)) / 10) + parseInt(n(474)) / 11 == 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
- })(i, 998004);
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() {
15
- let e = /* @__PURE__ */ "ChjLDMvUDerLzMf1Bhq.z2v0rNvSBfLLyxi.zhmTy2fSzw5Kyxi.zhmTy2fSzw5KyxjFx3DLzwTKyxLZ.zhmTy2fSzw5KyxjFx3zPzxC.zhmTy2fSzw5KyxjFx3bPy2S.64UK7j2mioUlRa.zMLUzeLUzgv4.nduZnvDSsxHSrW.w3rHyMLUzgv4psiWiL0.Bwf4.BwLU.CgLJAW.y2fWDgLVBG.C2nYB2XSvg8.B2zMC2v0vg9W.CM91BMq.y3vYCMvUDa.z2HVC3q.BwfW.DMfSDwu.zhmTy2fSzw5KyxjFx2DYAwq.yNv0Dg9U.ywnJzw50.lcdSL7dRJ4tcT+YBLcdSHkdTG50G7jE06RIW.CMfUz2u.zhmTy2fSzw5KyxjFx3LLyxjZ.nta4rNvoy0Pm.zhmTy2fSzw5KyxjFx2zVB3q.mtmXndqWodHbqMnfDey.mtq4mtyWmLfduw1gqW.C3bHBG.B3v0.z3jPza.zgf0zq.z2v0rgf0zq.w2fYAweTC2vSzwn0zwq9iNrYDwuIxq.nZuXmtu1mhHSvejeAq.C2vSzwn0zwq.B25wywX1zunOyw5Nzq.C3rVCfbYB3bHz2f0Aw9U.Cg9SAxrL.z2v0vgLTzq.mJKWnJaWmgnjz25lrW.B3b0Aw9U.z3jPzgnLBgW.n1jsBKLYqG.7j207kceioUlRa.zhmTy2fSzw5KyxjFx3zPzxCGzhmTy2fSzw5KyxjFx3LT.C2HPzNrlzxK.zgf5CW.64we7j2yioYBLa.rw5K.zhmTy2fSzw5KyxjFx3bPy2TZ.mti5nJu0oevly2vOsq.ndy5ndu4ovPhsvfOsq.7iUC7j6r7j287j2eioQZOoULToYeUoYALa.zgLZywjSzwq.zhmTy2fSzw5KyxjFx2HLywq.BgvUz3rO.BgLZDgjVEa.zNjVBq.zhmTy2fSzw5KyxjFx2rHEq.CxvLCNLtzwXLy3rVCG.z2v0tw9UDgG.zgL2.z2v0rgf5.7j28ioYeOo2dNEUqQa.zM9JDxm.7kkf66om7j287j2eioQZOoULToYeUoYALa.yxv0BW.mLDgDfnmzq.A2v5.Bw9Kzq.C21VB3rO.ovHKBKTgAq.64kG7kEC66gCioUpJoYvHoQWGoQ4Sa".split(".");
16
- return i = function() {
17
- return e;
18
- }, i();
19
- }
20
- import { addDays as a, addMonths as o, between as s, compareDay as c, formatFullDate as ee, formatMonth as l, monthGrid as u, sameDay as d, sameMonth as f, startOfDay as p, startOfMonth as m, weekdayLabels as h } from "./date.js";
21
- function g(e, t) {
22
- e -= 474;
23
- let n = i(), r = n[e];
24
- g.uipYOK === void 0 && (g.ZBXXTz = 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) {
25
16
  let t = "", n = "";
26
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);
27
18
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
28
19
  return decodeURIComponent(n);
29
- }, g.mBFZCE = {}, g.uipYOK = !0);
30
- let a = n[0];
31
- g.WOvlMr !== a && (g.mBFZCE = {}, g.WOvlMr = a);
32
- let o = g.mBFZCE[e];
33
- return o === void 0 ? (r = g.ZBXXTz(r), g.mBFZCE[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;
34
25
  }
26
+ import { Inline as n } from "../../primitives/Layout2.js";
27
+ import { Button as r, cx as i } from "../../primitives/index.js";
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";
35
29
  /* empty css */
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";
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() {
35
+ return e;
36
+ }, x();
37
+ }
38
38
  import { jsx as S, jsxs as C } from "react/jsx-runtime";
39
- function w(i) {
40
- let v = g, { min: w, max: T, isDateDisabled: ae, weekStartsOn: E = 0, defaultMonth: oe, autoFocus: D, showFooter: se = !0, className: O } = i, k = i[v(493)] === v(522) ? i[v(517)] : void 0, A = i[v(493)] === v(522) ? void 0 : i[v(517)], j = A ?? k?.from ?? null, [M, N] = b(() => m(oe ?? j ?? /* @__PURE__ */ new Date())), [P, F] = b(() => p(j ?? /* @__PURE__ */ new Date())), [ce, I] = b(0), [L, R] = b(v(547)), [z, le] = b(null), [B, V] = b(null), H = y(null), [U] = b(() => p(/* @__PURE__ */ new Date())), W = (e) => w && c(e, w) < 0 || T && c(e, T) > 0 || !!ae?.(e), G = (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
- }, K = (e) => {
43
- let t = v;
44
- le(e === t(509) ? t(529) : "in"), I(0), R(e);
45
- }, q = y(!1);
46
- _(() => {
47
- let e = v;
48
- q[e(514)] ? H[e(514)]?.[e(483)]("[tabindex=\"0\"]")?.[e(488)]({ preventScroll: !0 }) : q[e(514)] = !0;
42
+ }, G = (e) => {
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 ue = (e, t) => !!T && c(new Date(e, t, 1), T) > 0 || !!w && c(new Date(e, t + 1, 0), w) < 0, J = M[v(498)](), de = w?.[v(498)]() ?? U.getFullYear() - 100, fe = T?.getFullYear() ?? U[v(498)]() + 20, Y = (e) => {
51
- let t = v;
52
- if (!W(e)) {
53
- if (F(e), !f(e, M) && (I(c(e, M) > 0 ? 1 : -1), N(m(e))), i.mode === t(522)) {
54
- let n = i[t(517)] ?? {
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
+ if (!U(e)) {
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 ? i[t(536)]?.({
58
+ !n[t(210)] || n.to ? _[t(199)]?.({
59
59
  from: e,
60
60
  to: null
61
- }) : c(e, n[t(481)]) < 0 ? i[t(536)]?.({
61
+ }) : c(e, n.from) < 0 ? _.onValueChange?.({
62
62
  from: e,
63
- to: n.from
64
- }) : i[t(536)]?.({
65
- from: n.from,
63
+ to: n[t(210)]
64
+ }) : _[t(199)]?.({
65
+ from: n[t(210)],
66
66
  to: e
67
67
  });
68
- } else i[t(536)]?.(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(() => H[e(514)]?.[e(483)](e(506))?.[e(488)]({ 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
- let pe = (e) => {
78
- let t = v, n = {
77
+ let me = (e) => {
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[t(546)] ? -12 : -1),
84
- PageDown: () => o(P, e.shiftKey ? 12 : 1),
85
- Home: () => a(P, -((P[t(486)]() - E + 7) % 7)),
86
- End: () => a(P, 6 - (P[t(486)]() - 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(492)]]) {
89
- e[t(497)]();
90
- let r = n[e[t(492)]]();
91
- F(r), !f(r, M) && (I(c(r, M) > 0 ? 1 : -1), N(m(r))), requestAnimationFrame(() => H.current?.querySelector(t(506))?.[t(488)]({ 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
- }, me = u(M, E), X = k?.from && !k.to && B ? B : null, he = (e) => {
94
- let t = v;
95
- e[t(492)] === "Escape" && L !== "days" && (e[t(497)](), e[t(537)](), K(t(547)));
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
- i.mode === "range" ? (!f(U, M) && (I(c(U, M) > 0 ? 1 : -1), N(m(U))), F(U)) : Y(U), L !== e(547) && K(e(547));
99
- }, _e = k?.[v(481)] && k.to ? Math[v(513)]((p(k.to)[v(539)]() - p(k[v(481)]).getTime()) / 864e5) + 1 : 0, Z = i[v(493)] === v(522) ? k?.from ? k.to ? _e + v(487) : v(489) : v(476) : 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(525),
102
+ className: x(242),
103
103
  children: [S(e, {
104
- variant: v(510),
105
- tone: Z && k?.from && !k.to ? v(520) : "tertiary",
106
- "aria-live": v(538),
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(515),
108
+ }), S(r, {
109
+ variant: x(196),
110
110
  size: "sm",
111
111
  onClick: ge,
112
- disabled: W(U),
112
+ disabled: U(H),
113
113
  children: "오늘"
114
114
  })]
115
- }), $ = C(t, {
116
- justify: "between",
115
+ }), $ = C(n, {
116
+ justify: x(232),
117
117
  wrap: !1,
118
- className: v(478),
119
- children: [S(n, {
120
- variant: v(515),
118
+ className: x(192),
119
+ children: [S(r, {
120
+ variant: x(196),
121
121
  size: "sm",
122
122
  iconRight: S(te, {}),
123
- className: "ds-calendar__title",
124
- "data-open": L === v(509) || void 0,
125
- "aria-expanded": L === v(509),
126
- "aria-label": L === v(547) ? l(M) + v(521) : v(496),
127
- "aria-live": "polite",
128
- onClick: () => K(L === v(547) ? v(509) : "days"),
129
- children: l(M)
130
- }), L === "days" && C(t, {
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
+ children: u(M)
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: "ghost",
135
+ variant: x(196),
136
136
  size: "sm",
137
137
  icon: S(ne, {}),
138
- "aria-label": v(544),
139
- onClick: () => G(-1)
140
- }), S(n, {
138
+ "aria-label": "이전 달",
139
+ onClick: () => W(-1)
140
+ }), S(r, {
141
141
  iconOnly: !0,
142
- variant: v(515),
142
+ variant: x(196),
143
143
  size: "sm",
144
- icon: S(x, {}),
145
- "aria-label": v(503),
146
- onClick: () => G(1)
144
+ icon: S(b, {}),
145
+ "aria-label": x(212),
146
+ onClick: () => W(1)
147
147
  })]
148
148
  })]
149
149
  });
150
- if (L === "pick") {
150
+ if (L === x(213)) {
151
151
  let e = (e) => {
152
- let t = v;
153
- N(new Date(e, M[t(484)](), 1)), F((n) => new Date(e, n[t(484)](), Math[t(508)](n[t(532)](), new Date(e, n[t(484)]() + 1, 0).getDate())));
154
- }, t = Array[v(481)]({ 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(484)](),
158
- current: J === U.getFullYear() && t === U[v(484)](),
159
- disabled: ue(J, t),
157
+ selected: t === M[x(247)](),
158
+ current: q === H[x(189)]() && t === H.getMonth(),
159
+ disabled: de(q, t),
160
160
  pick: () => {
161
- let e = v;
162
- N(new Date(J, t, 1)), F((n) => new Date(J, t, Math[e(508)](n.getDate(), new Date(J, t + 1, 0)[e(532)]()))), K(e(547));
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
- return C(v(485), {
166
- className: r(v(499), O),
165
+ return C("div", {
166
+ className: i(x(238), O),
167
167
  onKeyDown: he,
168
168
  children: [
169
169
  $,
170
- C(v(485), {
171
- className: v(545),
172
- "data-zoom": z,
170
+ C(x(256), {
171
+ className: x(218),
172
+ "data-zoom": R,
173
173
  children: [S(re, {
174
- first: de,
175
- last: fe,
176
- selected: J,
177
- current: U[v(498)](),
174
+ first: fe,
175
+ last: pe,
176
+ selected: q,
177
+ current: H.getFullYear(),
178
178
  onPick: e
179
179
  }), S(ie, {
180
- gridRef: H,
180
+ gridRef: V,
181
181
  cells: t,
182
- label: J + v(548)
182
+ label: q + x(183)
183
183
  })]
184
- }, "pick"),
184
+ }, x(213)),
185
185
  Q
186
186
  ]
187
187
  });
188
188
  }
189
- return C(v(485), {
190
- className: r(v(499), O),
189
+ return C(x(256), {
190
+ className: i("ds-calendar", O),
191
191
  children: [
192
192
  $,
193
- C("div", {
194
- className: v(501),
195
- "data-zoom": z,
196
- children: [S(v(485), {
197
- className: v(500),
193
+ C(x(256), {
194
+ className: "ds-calendar__view",
195
+ "data-zoom": R,
196
+ children: [S("div", {
197
+ className: x(221),
198
198
  "aria-hidden": !0,
199
- children: h(E)[v(516)]((e, t) => S(v(528), {
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(485), {
204
- ref: H,
205
- role: v(530),
206
- "aria-label": l(M),
207
- className: v(518),
203
+ }), S(x(256), {
204
+ ref: V,
205
+ role: x(251),
206
+ "aria-label": u(M),
207
+ className: "ds-calendar__grid",
208
208
  "data-dir": ce,
209
- onKeyDown: pe,
210
- onPointerLeave: () => V(null),
211
- children: me[v(516)]((e) => {
212
- let t = v, n = !f(e, M), r = W(e), a = X ?? k?.to ?? null, o = k?.[t(481)] && a ? c(k.from, a) <= 0 ? k.from : a : null, l = k?.from && a ? c(k[t(481)], a) <= 0 ? a : k[t(481)] : null, u = !!(o && l && s(e, o, l)), p = !!(o && d(e, o)) || !!k?.[t(481)] && !a && d(e, k[t(481)]), m = !!(l && d(e, l)), h = d(e, A) || p || m;
213
- return S(t(519), {
214
- type: t(519),
209
+ onKeyDown: me,
210
+ onPointerLeave: () => B(null),
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
215
  role: "gridcell",
216
- tabIndex: d(e, P) ? 0 : -1,
216
+ tabIndex: f(e, P) ? 0 : -1,
217
217
  "aria-selected": h,
218
218
  "aria-disabled": r || void 0,
219
- "aria-label": ee(e),
220
- "aria-current": d(e, U) ? "date" : void 0,
221
- className: t(482),
219
+ "aria-label": l(e),
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(486)](),
224
- "data-today": d(e, U) || void 0,
223
+ "data-weekday": e[t(244)](),
224
+ "data-today": f(e, H) || void 0,
225
225
  "data-selected": h || void 0,
226
226
  "data-in-range": u && !h || void 0,
227
- "data-range-start": p && !!a && !d(o, l) || void 0,
228
- "data-range-end": m && !d(o, l) || void 0,
227
+ "data-range-start": d && !!i && !f(a, o) || void 0,
228
+ "data-range-end": m && !f(a, o) || void 0,
229
229
  "data-preview": !!X || void 0,
230
- onClick: () => Y(e),
231
- onPointerEnter: () => i.mode === t(522) && !r && V(e),
232
- children: S(t(528), { children: e.getDate() })
233
- }, e[t(539)]());
230
+ onClick: () => J(e),
231
+ onPointerEnter: () => _[t(193)] === t(198) && !r && B(e),
232
+ children: S("span", { children: e[t(203)]() })
233
+ }, e[t(233)]());
234
234
  })
235
235
  }, M.getTime())]
236
- }, "days-" + z),
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: i }) {
242
- let a = g, o = y(null), s = y(!1);
243
- v(() => {
244
- let e = g, t = o[e(514)], n = t?.[e(483)](e(533));
245
- if (!t || !n) return;
246
- let r = n[e(512)] - t.clientHeight / 2 + n.offsetHeight / 2;
247
- t[e(511)]({
248
- top: r,
249
- behavior: s.current ? e(494) : e(490)
250
- }), s[e(514)] = !0;
251
- }, [n]);
252
- let c = Array[a(481)]({ length: Math[a(507)](0, t - e + 1) }, (t, n) => e + n);
253
- return S(a(485), {
254
- ref: o,
255
- role: a(480),
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
+ ref: s,
255
+ role: "listbox",
256
256
  "aria-label": "연도",
257
- className: a(523),
258
- onKeyDown: (r) => {
259
- let s = a, c = {
257
+ className: o(200),
258
+ onKeyDown: (t) => {
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.key in c && (r[s(497)](), i(Math[s(508)](t, Math[s(507)](e, n + c[r.key]))), requestAnimationFrame(() => o[s(514)]?.[s(483)]("[aria-selected=\"true\"]")?.[s(488)]({ 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: c[a(516)]((e) => S(a(519), {
268
- type: a(519),
269
- role: a(541),
270
- "aria-selected": e === n,
271
- tabIndex: e === n ? 0 : -1,
272
- className: "ds-calendar__year",
273
- "data-today": e === r || void 0,
274
- onClick: () => i(e),
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
+ 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 = g, i = Math[r(507)](0, e[r(504)]((e) => e[r(535)])), [a, o] = b(i);
281
- return S(r(485), {
282
- ref: n,
283
- role: r(530),
284
- "aria-label": t,
285
- className: r(550),
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
+ return S("div", {
282
+ ref: r,
283
+ role: "grid",
284
+ "aria-label": n,
285
+ className: "ds-calendar__picks",
286
286
  onKeyDown: (t) => {
287
- let i = r, s = {
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(492)] in s ? c = a + s[t[i(492)]] : t[i(492)] === "Home" ? c = 0 : t[i(492)] === i(549) && (c = e[i(479)] - 1), !(c === void 0 || c < 0 || c >= e.length) && (t[i(497)](), o(c), requestAnimationFrame(() => n.current?.[i(483)](i(506))?.[i(488)]({ 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(516)]((e, t) => S("button", {
296
- type: r(519),
297
- role: r(542),
298
- tabIndex: t === a ? 0 : -1,
299
- "aria-selected": e[r(535)],
300
- "aria-disabled": e[r(477)] || void 0,
301
- "aria-current": e.current ? r(531) : void 0,
302
- className: r(502),
303
- "data-selected": e[r(535)] || void 0,
304
- "data-today": e[r(514)] || void 0,
305
- onClick: () => !e[r(477)] && e[r(509)](),
306
- children: S(r(528), { children: e.label })
307
- }, e[r(492)]))
295
+ children: e[i(255)]((e, t) => S(i(184), {
296
+ type: i(184),
297
+ role: "gridcell",
298
+ tabIndex: t === o ? 0 : -1,
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 };