@iamfiro/design 0.3.0 → 0.3.1

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