@iamfiro/design 0.1.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 (160) hide show
  1. package/AGENTS.md +1 -0
  2. package/agents/INDEX.md +1 -0
  3. package/agents/brand-icon/AGENTS.md +2 -2
  4. package/agents/social-login-button/AGENTS.md +156 -0
  5. package/lib/components/Accordion/Accordion2.js +135 -0
  6. package/lib/components/ActionBar/ActionBar2.js +66 -0
  7. package/lib/components/Alert/Alert2.js +131 -0
  8. package/lib/components/AppShell/AppShell2.js +94 -0
  9. package/lib/components/AreaChart/AreaChart.js +59 -0
  10. package/lib/components/BarChart/BarChart2.js +243 -0
  11. package/lib/components/BarList/BarList2.js +172 -0
  12. package/lib/components/Breadcrumb/Breadcrumb2.js +90 -0
  13. package/lib/components/Calendar/Calendar2.js +309 -0
  14. package/lib/components/Calendar/DatePicker2.js +228 -0
  15. package/lib/components/Calendar/date.js +118 -0
  16. package/lib/components/Card/Card2.js +103 -0
  17. package/lib/components/CardFrame/CardFrame2.js +67 -0
  18. package/lib/components/Chart/ChartParts.js +150 -0
  19. package/lib/components/Chart/chart2.js +96 -0
  20. package/lib/components/Chart/useChartInteraction.js +94 -0
  21. package/lib/components/ChatBubble/ChatBubble2.js +174 -0
  22. package/lib/components/ChatBubble/formatChatTime.js +48 -0
  23. package/lib/components/ChatComposer/ChatComposer2.js +153 -0
  24. package/lib/components/CodeBlock/CodeBlock2.js +93 -0
  25. package/lib/components/CodeBlock/highlight.js +111 -0
  26. package/lib/components/ColorPicker/ColorPicker2.js +609 -0
  27. package/lib/components/ColorPicker/color.js +180 -0
  28. package/lib/components/ColorPicker/presets.js +70 -0
  29. package/lib/components/Combobox/Combobox2.js +228 -0
  30. package/lib/components/CommandMenu/CommandMenu.js +267 -0
  31. package/lib/components/Comment/Comment2.js +110 -0
  32. package/lib/components/ContextMenu/ContextMenu2.js +168 -0
  33. package/lib/components/DataGrid/DataGrid2.js +1998 -0
  34. package/lib/components/DataGrid/GridPopover.js +154 -0
  35. package/lib/components/DataGrid/anchor.js +50 -0
  36. package/lib/components/DataGrid/model.js +557 -0
  37. package/lib/components/DataGrid/panels.js +701 -0
  38. package/lib/components/DataGrid/typeMeta.js +75 -0
  39. package/lib/components/DataGrid/types.js +53 -0
  40. package/lib/components/DescriptionList/DescriptionList2.js +180 -0
  41. package/lib/components/Dialog/AlertDialog.js +119 -0
  42. package/lib/components/Dialog/Dialog2.js +110 -0
  43. package/lib/components/Dialog/modal.js +92 -0
  44. package/lib/components/Drawer/Drawer2.js +244 -0
  45. package/lib/components/DropdownMenu/DropdownMenu2.js +393 -0
  46. package/lib/components/DropdownMenu/menuCore.js +63 -0
  47. package/lib/components/Dropzone/Dropzone2.js +145 -0
  48. package/lib/components/EmptyState/EmptyState2.js +70 -0
  49. package/lib/components/FileChip/FileChip2.js +94 -0
  50. package/lib/components/FileUpload/FileUpload.js +259 -0
  51. package/lib/components/FilterChips/FilterChips2.js +101 -0
  52. package/lib/components/FunnelChart/FunnelChart2.js +283 -0
  53. package/lib/components/FunnelChart/funnel.js +72 -0
  54. package/lib/components/Highlight/Highlight2.js +100 -0
  55. package/lib/components/HoverCard/HoverCard.js +134 -0
  56. package/lib/components/InlineDiff/InlineDiff2.js +215 -0
  57. package/lib/components/InlineDiff/diff.js +126 -0
  58. package/lib/components/InlineDiff/useDiffReview.js +110 -0
  59. package/lib/components/Kanban/Kanban2.js +691 -0
  60. package/lib/components/Kanban/KanbanCard.js +159 -0
  61. package/lib/components/Kanban/move.js +69 -0
  62. package/lib/components/LineChart/LineChart2.js +342 -0
  63. package/lib/components/List/List2.js +132 -0
  64. package/lib/components/Listbox/Listbox2.js +163 -0
  65. package/lib/components/Marker/Marker2.js +82 -0
  66. package/lib/components/Menubar/Menubar2.js +222 -0
  67. package/lib/components/MultiSelect/MultiSelect2.js +204 -0
  68. package/lib/components/NavigationMenu/NavigationMenu2.js +481 -0
  69. package/lib/components/NoticeStack/NoticeStack2.js +178 -0
  70. package/lib/components/NumberStepper/NumberStepper2.js +128 -0
  71. package/lib/components/OtpInput/OtpInput2.js +122 -0
  72. package/lib/components/Pagination/Pagination2.js +210 -0
  73. package/lib/components/Pagination/paginationRange.js +52 -0
  74. package/lib/components/PhoneInput/PhoneInput.js +175 -0
  75. package/lib/components/PieChart/PieChart2.js +246 -0
  76. package/lib/components/PieChart/arc.js +90 -0
  77. package/lib/components/PieChart/useArcTween.js +92 -0
  78. package/lib/components/Popover/Popover2.js +111 -0
  79. package/lib/components/ProgressTracker/ProgressTracker2.js +226 -0
  80. package/lib/components/Rating/Rating2.js +186 -0
  81. package/lib/components/Resizable/Resizable2.js +238 -0
  82. package/lib/components/Resizable/layout.js +115 -0
  83. package/lib/components/ScaledPreview/ScaledPreview2.js +99 -0
  84. package/lib/components/ScatterChart/ScatterChart2.js +355 -0
  85. package/lib/components/ScatterChart/scatter.js +85 -0
  86. package/lib/components/ScrollArea/ScrollArea2.js +217 -0
  87. package/lib/components/Select/Select2.js +153 -0
  88. package/lib/components/Sidebar/Sidebar2.js +127 -0
  89. package/lib/components/Skeleton/Skeleton2.js +91 -0
  90. package/lib/components/Slider/Slider2.js +142 -0
  91. package/lib/components/SocialLoginButton/SocialLoginButton.js +84 -0
  92. package/lib/components/SparkChart/SparkChart2.js +217 -0
  93. package/lib/components/SparkChart/spark.js +71 -0
  94. package/lib/components/Sparkbar/Sparkbar2.js +111 -0
  95. package/lib/components/SplitView/SplitView2.js +95 -0
  96. package/lib/components/Stat/Stat2.js +164 -0
  97. package/lib/components/StepList/StepList2.js +131 -0
  98. package/lib/components/Table/Table2.js +104 -0
  99. package/lib/components/Tabs/Tabs2.js +131 -0
  100. package/lib/components/TagInput/TagInput2.js +357 -0
  101. package/lib/components/TimePicker/TimePicker2.js +388 -0
  102. package/lib/components/TimePicker/time.js +81 -0
  103. package/lib/components/Timeline/Timeline2.js +369 -0
  104. package/lib/components/Timeline/scale.js +81 -0
  105. package/lib/components/Toast/Toaster.js +213 -0
  106. package/lib/components/Toast/store.js +128 -0
  107. package/lib/components/ToggleGroup/ToggleGroup2.js +125 -0
  108. package/lib/components/Toolbar/Toolbar2.js +283 -0
  109. package/lib/components/Tracker/Tracker2.js +172 -0
  110. package/lib/components/TreeDiagram/TreeDiagram2.js +223 -0
  111. package/lib/components/TreeView/TreeView2.js +286 -0
  112. package/lib/hooks/timing.js +57 -0
  113. package/lib/hooks/useControllableState.js +49 -0
  114. package/lib/hooks/useCountdown.js +75 -0
  115. package/lib/hooks/useDigitInput.js +103 -0
  116. package/lib/hooks/useDismiss.js +69 -0
  117. package/lib/hooks/useElapsed.js +85 -0
  118. package/lib/hooks/useFloating.js +70 -0
  119. package/lib/hooks/useFocusTrap.js +85 -0
  120. package/lib/hooks/usePresence.js +58 -0
  121. package/lib/hooks/usePressToOpen.js +70 -0
  122. package/lib/hooks/useScrollLock.js +71 -0
  123. package/lib/hooks/useSelection.js +65 -0
  124. package/lib/index.js +176 -17911
  125. package/lib/primitives/AspectRatio2.js +76 -0
  126. package/lib/primitives/BrandIcon.js +245 -0
  127. package/lib/primitives/ColorDot2.js +71 -0
  128. package/lib/primitives/CopyButton2.js +86 -0
  129. package/lib/primitives/CountBadge2.js +80 -0
  130. package/lib/primitives/Countdown2.js +61 -0
  131. package/lib/primitives/Delta2.js +92 -0
  132. package/lib/primitives/Elapsed.js +62 -0
  133. package/lib/primitives/FileIcon2.js +125 -0
  134. package/lib/primitives/Flag2.js +263 -0
  135. package/lib/primitives/IconStack2.js +85 -0
  136. package/lib/primitives/IconTile2.js +69 -0
  137. package/lib/primitives/Kbd2.js +88 -0
  138. package/lib/primitives/Layout2.js +118 -0
  139. package/lib/primitives/Link2.js +55 -0
  140. package/lib/primitives/MaskedText2.js +121 -0
  141. package/lib/primitives/Progress2.js +137 -0
  142. package/lib/primitives/RelativeTime.js +82 -0
  143. package/lib/primitives/SearchInput2.js +85 -0
  144. package/lib/primitives/SelectorButton2.js +96 -0
  145. package/lib/primitives/Spinner2.js +94 -0
  146. package/lib/primitives/StatusIcon2.js +126 -0
  147. package/lib/primitives/Swatch2.js +79 -0
  148. package/lib/primitives/Tooltip2.js +132 -0
  149. package/lib/primitives/Typography2.js +97 -0
  150. package/lib/primitives/formatCountdown.js +54 -0
  151. package/lib/primitives/formatElapsed.js +63 -0
  152. package/lib/primitives/formatRelativeTime.js +64 -0
  153. package/lib/primitives/hotkey.js +94 -0
  154. package/lib/primitives/index.js +351 -0
  155. package/lib/primitives/maskValue.js +69 -0
  156. package/lib/style.css +1 -1
  157. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +10 -0
  158. package/lib/types/components/index.d.ts +2 -0
  159. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  160. package/package.json +2 -1
@@ -0,0 +1,309 @@
1
+ "use client";
2
+ (function(e, t) {
3
+ let r = n, i = e();
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());
7
+ } catch {
8
+ i.push(i.shift());
9
+ }
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
+ }
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() {
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";
35
+ /* empty css */
36
+ import { useEffect as _, useLayoutEffect as v, useRef as y, useState as b } from "react";
37
+ import { ChevronDown as te, ChevronLeft as 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));
42
+ }, K = (e) => {
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;
48
+ }, [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 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)] ?? {
54
+ from: null,
55
+ to: null
56
+ };
57
+ !n.from || n.to ? a.onValueChange?.({
58
+ from: e,
59
+ to: null
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
66
+ });
67
+ } else a[t(291)]?.(e);
68
+ }
69
+ };
70
+ _(() => {
71
+ let e = v;
72
+ if (!D) return;
73
+ let t = requestAnimationFrame(() => H[e(261)]?.[e(305)](e(278))?.[e(250)]({ preventScroll: !0 }));
74
+ return () => cancelAnimationFrame(t);
75
+ }, [D]);
76
+ let pe = (e) => {
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)
86
+ };
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 }));
91
+ }
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)));
95
+ }, ge = () => {
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),
100
+ wrap: !1,
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),
106
+ children: Z
107
+ }), S(r, {
108
+ variant: v(260),
109
+ size: "sm",
110
+ onClick: ge,
111
+ disabled: W(U),
112
+ children: "오늘"
113
+ })]
114
+ }), $ = C(t, {
115
+ justify: v(316),
116
+ wrap: !1,
117
+ className: v(258),
118
+ children: [S(r, {
119
+ variant: v(260),
120
+ size: "sm",
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) : "날짜로 돌아가기",
126
+ "aria-live": "polite",
127
+ onClick: () => K(L === v(259) ? "pick" : v(259)),
128
+ children: d(M)
129
+ }), L === v(259) && C(t, {
130
+ gap: 1,
131
+ wrap: !1,
132
+ children: [S(r, {
133
+ iconOnly: !0,
134
+ variant: v(260),
135
+ size: "sm",
136
+ icon: S(ne, {}),
137
+ "aria-label": v(292),
138
+ onClick: () => G(-1)
139
+ }), S(r, {
140
+ iconOnly: !0,
141
+ variant: v(260),
142
+ size: "sm",
143
+ icon: S(x, {}),
144
+ "aria-label": "다음 달",
145
+ onClick: () => G(1)
146
+ })]
147
+ })]
148
+ });
149
+ if (L === "pick") {
150
+ let e = (e) => {
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) => ({
154
+ key: t,
155
+ label: t + 1 + "월",
156
+ selected: t === M[v(284)](),
157
+ current: J === U[v(315)]() && t === U[v(284)](),
158
+ disabled: ue(J, t),
159
+ pick: () => {
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));
162
+ }
163
+ }));
164
+ return C(v(276), {
165
+ className: i(v(318), O),
166
+ onKeyDown: he,
167
+ children: [
168
+ $,
169
+ C(v(276), {
170
+ className: v(273),
171
+ "data-zoom": z,
172
+ children: [S(re, {
173
+ first: de,
174
+ last: fe,
175
+ selected: J,
176
+ current: U.getFullYear(),
177
+ onPick: e
178
+ }), S(ie, {
179
+ gridRef: H,
180
+ cells: t,
181
+ label: J + v(285)
182
+ })]
183
+ }, v(287)),
184
+ Q
185
+ ]
186
+ });
187
+ }
188
+ return C(v(276), {
189
+ className: i(v(318), O),
190
+ children: [
191
+ $,
192
+ C(v(276), {
193
+ className: "ds-calendar__view",
194
+ "data-zoom": z,
195
+ children: [S(v(276), {
196
+ className: v(308),
197
+ "aria-hidden": !0,
198
+ children: ee(E)[v(271)]((e, t) => S(v(304), {
199
+ "data-weekday": (t + E) % 7,
200
+ children: e
201
+ }, e))
202
+ }), S(v(276), {
203
+ ref: H,
204
+ role: v(262),
205
+ "aria-label": d(M),
206
+ className: v(302),
207
+ "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,
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,
228
+ "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)]());
233
+ })
234
+ }, M.getTime())]
235
+ }, v(270) + z),
236
+ Q
237
+ ]
238
+ });
239
+ }
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),
255
+ "aria-label": "연도",
256
+ className: o(269),
257
+ onKeyDown: (n) => {
258
+ let i = o, c = {
259
+ ArrowUp: -1,
260
+ ArrowDown: 1,
261
+ PageUp: -10,
262
+ PageDown: 10
263
+ };
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
+ },
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),
274
+ children: e
275
+ }, e))
276
+ });
277
+ }
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
+ "aria-label": t,
284
+ className: "ds-calendar__picks",
285
+ onKeyDown: (t) => {
286
+ let n = i, a = {
287
+ ArrowLeft: -1,
288
+ ArrowRight: 1,
289
+ ArrowUp: -3,
290
+ ArrowDown: 3
291
+ }, 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
+ },
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
+ "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)]))
307
+ });
308
+ }
309
+ export { w as Calendar };
@@ -0,0 +1,228 @@
1
+ "use client";
2
+ const e = r;
3
+ (function(e, t) {
4
+ let n = r, i = e();
5
+ for (;;) try {
6
+ if (parseInt(n(420)) / 1 + -parseInt(n(428)) / 2 * (parseInt(n(425)) / 3) + -parseInt(n(413)) / 4 + -parseInt(n(434)) / 5 + -parseInt(n(400)) / 6 + -parseInt(n(405)) / 7 * (parseInt(n(424)) / 8) + parseInt(n(402)) / 9 == t) break;
7
+ i.push(i.shift());
8
+ } catch {
9
+ i.push(i.shift());
10
+ }
11
+ })(h, 211481);
12
+ import { Inline as t, Stack as n } from "../../primitives/Layout2.js";
13
+ function r(e, t) {
14
+ e -= 390;
15
+ let n = h(), i = n[e];
16
+ r.cGRUXy === void 0 && (r.bULjcB = 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
+ }, r.svfIZk = {}, r.cGRUXy = !0);
22
+ let a = n[0];
23
+ r.sXFkPg !== a && (r.svfIZk = {}, r.sXFkPg = a);
24
+ let o = r.svfIZk[e];
25
+ return o === void 0 ? (i = r.bULjcB(i), r.svfIZk[e] = i) : i = o, i;
26
+ }
27
+ import { useControllableState as i } from "../../hooks/useControllableState.js";
28
+ import { Button as a, cx as o } from "../../primitives/index.js";
29
+ /* empty css */
30
+ import { Popover as s } from "../Popover/Popover2.js";
31
+ import { DEFAULT_DATE_PRESETS as c, compareDay as l, formatDate as u, parseDateInput as d } from "./date.js";
32
+ import { Calendar as f } from "./Calendar2.js";
33
+ /* empty css */
34
+ import { useRef as p, useState as m } from "react";
35
+ function h() {
36
+ let e = /* @__PURE__ */ "zgLHBg9N.DgfYz2v0.mte2oty1mfLJr1vYEG.B2zM.64kG7kECioYNGoYASoQ4Sa.Aw5WDxq.64kG7kECioYeOo2dNq.C3rHCNq.ChjLDMvUDerLzMf1Bhq.DMfSDwu.iokaKYa.BwfW.6RIW6RceioYeOo2dNq.zhmTzgf0zwzPzwXK.BgvUz3rO.zNjVBq.zhmTC2vSzwn0lxrYAwDNzxjFx3zHBhvL.mtmWmtC3oeLgzwTzsW.z2HVC3q.nZCYnZCWnLLtsenxqG.C3bHBG.BMf0AxzLrxzLBNq.otfkDu9Ky1K.zgL2.rw50zxi.w3jVBgu9iMDYAwqIxsbBDgfIAw5KzxG9iJaIxq.C2vSzwn0.zM9JDxm.zhmTC2vSzwn0lxrYAwDNzxjFx2LJB24.zhmTC2vSzwn0lxrYAwDNzxjFx2nSzwfY.mJGWmJu2AezWDeHi.zhmTC2vSzwn0lxrYAwDNzxiTlq.z2v0rNvSBfLLyxi.y3vYCMvUDa.z2v0tw9UDgG.yNv0Dg9U.C3rVCfbYB3bHz2f0Aw9U.mJK2mtm0suTpAxze.qxjYB3DeB3DU.64kG7kECioYEHEUGPsdRMjdRIPqG7isG7yoD.CMfUz2u.ntiWntzTEKzzrwC.mtaXmZiXn096s3DlBW.zhmTC2vSzwn0lxrYAwDNzxi.BwfUDwfS.mLjHtwjkuq.BgfIzwW.zhmTy29UDhjVBa.A2v5".split(".");
37
+ return h = function() {
38
+ return e;
39
+ }, h();
40
+ }
41
+ import { CalendarDays as g, X as _ } from "lucide-react";
42
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
43
+ function b({ id: e, size: t = "md", disabled: n, invalid: i, open: a, empty: s, children: c, onClear: l, className: u, "aria-label": d }) {
44
+ let f = r;
45
+ return y("button", {
46
+ id: e,
47
+ type: f(418),
48
+ "aria-haspopup": f(432),
49
+ "aria-label": d,
50
+ disabled: n,
51
+ "aria-invalid": i || void 0,
52
+ className: o(f(430), f(426), t !== "md" && f(414) + t, u),
53
+ "data-open": a || void 0,
54
+ "data-invalid": i || void 0,
55
+ "data-disabled": n || void 0,
56
+ "data-placeholder": s || void 0,
57
+ children: [
58
+ v(f(403), {
59
+ className: f(411),
60
+ children: v(g, {})
61
+ }),
62
+ v(f(403), {
63
+ className: f(399),
64
+ children: c
65
+ }),
66
+ l && !s && !n && v(f(403), {
67
+ role: f(418),
68
+ tabIndex: -1,
69
+ "aria-label": f(436),
70
+ className: f(412),
71
+ onClick: (e) => {
72
+ e[f(419)](), l();
73
+ },
74
+ children: v(_, {})
75
+ })
76
+ ]
77
+ });
78
+ }
79
+ function x({ value: t, defaultValue: n = null, onValueChange: r, formatValue: a = (e) => u(e), placeholder: c = e(422), clearable: h = !0, align: b = e(390), min: x, max: S, isDateDisabled: C, weekStartsOn: w, id: T, size: E = "md", disabled: D, invalid: O, className: k, "aria-label": A }) {
80
+ let j = e, [M, N] = i(t, n, r), [P, F] = m(!1), [I, L] = m(null), [R, z] = m(!1), [B, V] = m(0), H = p(null), U = p(null), W = (e) => !!x && l(e, x) < 0 || !!S && l(e, S) > 0 || !!C?.(e), G = (e) => {
81
+ let t = d(e);
82
+ return t && !W(t) ? t : null;
83
+ }, K = () => {
84
+ if (I === null) return !0;
85
+ if (!I.trim()) N(null);
86
+ else {
87
+ let e = G(I);
88
+ if (!e) return z(!0), !1;
89
+ N(e);
90
+ }
91
+ return L(null), z(!1), !0;
92
+ }, q = () => requestAnimationFrame(() => U[j(416)]?.querySelector(j(408))?.[j(410)]());
93
+ return v(s, {
94
+ open: P,
95
+ onOpenChange: F,
96
+ openOn: j(427),
97
+ align: b,
98
+ padding: "sm",
99
+ autoFocus: !1,
100
+ "aria-label": j(438),
101
+ trigger: y(j(406), {
102
+ className: o(j(430), j(426), j(396), E !== "md" && "ds-select-trigger--" + E, k),
103
+ "data-open": P || void 0,
104
+ "data-invalid": O || R || void 0,
105
+ "data-disabled": D || void 0,
106
+ onPointerDown: (e) => {
107
+ let t = j;
108
+ D || e[t(433)] === H.current || (e[t(391)](), H.current?.[t(410)](), F(!0));
109
+ },
110
+ children: [
111
+ v(j(437), {
112
+ ref: H,
113
+ id: T,
114
+ className: "ds-datefield__input",
115
+ value: I ?? (M ? a(M) : ""),
116
+ placeholder: c,
117
+ disabled: D,
118
+ "aria-label": A,
119
+ "aria-invalid": O || R || void 0,
120
+ "aria-haspopup": j(432),
121
+ "aria-expanded": P,
122
+ autoComplete: j(435),
123
+ onClick: () => F(!0),
124
+ onFocus: (e) => e[j(433)][j(409)](),
125
+ onChange: (e) => {
126
+ let t = j, n = e.target[t(392)];
127
+ L(n), z(!1);
128
+ let r = G(n);
129
+ r && (M && r.getFullYear() === M[t(415)]() && r[t(417)]() === M[t(417)]() || V((e) => e + 1), N(r)), F(!0);
130
+ },
131
+ onKeyDown: (e) => {
132
+ let t = j;
133
+ e[t(404)].isComposing || (e[t(431)] === t(407) ? (e[t(391)](), K() && F(!1)) : e[t(431)] === t(421) ? (e[t(391)](), F(!0), q()) : e[t(431)] === "Escape" && (P ? F(!1) : (L(null), z(!1))));
134
+ },
135
+ onBlur: () => {
136
+ !K() && (L(null), z(!1));
137
+ }
138
+ }),
139
+ v(j(403), {
140
+ className: "ds-select-trigger__icon ds-datefield__icon",
141
+ "aria-hidden": !0,
142
+ children: v(g, {})
143
+ }),
144
+ h && M && !D && I === null && v(j(403), {
145
+ role: j(418),
146
+ tabIndex: -1,
147
+ "aria-label": j(436),
148
+ className: "ds-select-trigger__clear",
149
+ onPointerDown: (e) => e[j(419)](),
150
+ onClick: () => {
151
+ let e = j;
152
+ N(null), H[e(416)]?.[e(410)]();
153
+ },
154
+ children: v(_, {})
155
+ })
156
+ ]
157
+ }),
158
+ children: v(j(406), {
159
+ ref: U,
160
+ children: v(f, {
161
+ value: M,
162
+ onValueChange: (e) => {
163
+ let t = j;
164
+ N(e), L(null), z(!1), F(!1), H[t(416)]?.[t(410)]();
165
+ },
166
+ min: x,
167
+ max: S,
168
+ isDateDisabled: C,
169
+ weekStartsOn: w
170
+ }, B)
171
+ })
172
+ });
173
+ }
174
+ function S({ value: r, defaultValue: o = {
175
+ from: null,
176
+ to: null
177
+ }, onValueChange: l, presets: d = c, placeholder: p = "기간 선택", clearable: h = !0, align: g = "start", min: _, max: x, isDateDisabled: S, weekStartsOn: C, ...w }) {
178
+ let T = e, [E, D] = i(r, o, l), [O, k] = m(!1), A = E.from ? u(E[T(398)]) + T(393) + (E.to ? u(E.to) : "…") : p;
179
+ return v(s, {
180
+ open: O,
181
+ onOpenChange: k,
182
+ align: g,
183
+ padding: "sm",
184
+ autoFocus: !1,
185
+ "aria-label": T(395),
186
+ trigger: v(b, {
187
+ ...w,
188
+ open: O,
189
+ empty: !E.from,
190
+ onClear: h ? () => D({
191
+ from: null,
192
+ to: null
193
+ }) : void 0,
194
+ children: A
195
+ }),
196
+ children: y(t, {
197
+ gap: 3,
198
+ align: T(390),
199
+ wrap: !1,
200
+ children: [d[T(397)] > 0 && v(n, {
201
+ gap: 1,
202
+ style: { minWidth: 96 },
203
+ children: d[T(394)]((e) => v(a, {
204
+ variant: T(401),
205
+ size: "sm",
206
+ style: { justifyContent: "flex-start" },
207
+ onClick: () => {
208
+ D(e[T(423)]()), k(!1);
209
+ },
210
+ children: e[T(429)]
211
+ }, e.label))
212
+ }), v(f, {
213
+ mode: T(423),
214
+ value: E,
215
+ onValueChange: (e) => {
216
+ let t = T;
217
+ D(e), e[t(398)] && e.to && k(!1);
218
+ },
219
+ min: _,
220
+ max: x,
221
+ isDateDisabled: S,
222
+ weekStartsOn: C,
223
+ autoFocus: !0
224
+ })]
225
+ })
226
+ });
227
+ }
228
+ export { x as DatePicker, S as DateRangePicker };
@@ -0,0 +1,118 @@
1
+ "use client";
2
+ function e() {
3
+ var t = [
4
+ "CMvWBgfJzq",
5
+ "nw1fv3vpvG",
6
+ "DhjPBq",
7
+ "z2v0rNvSBfLLyxi",
8
+ "7lwC6RE8idmW7j28",
9
+ "odu0mtm2s2fIBhHw",
10
+ "ndGXnta2ngfXww9Xsq",
11
+ "7j2067kiioUlRa",
12
+ "z2v0rgf0zq",
13
+ "Bwf0y2G",
14
+ "z2v0rgf5",
15
+ "mteZntmZmhjPBeDJsq",
16
+ "mtu1nda0wgjvtvnf",
17
+ "nJeYodu0AuD4DNnk",
18
+ "z2v0tw9UDgG",
19
+ "zNjVBq",
20
+ "ote4mdKWBuHIzfnP",
21
+ "mtu4odiWohHUsMXiCW",
22
+ "7lwC6RE8idFSNBW"
23
+ ];
24
+ return e = function() {
25
+ return t;
26
+ }, e();
27
+ }
28
+ var t = u;
29
+ (function(e, t) {
30
+ for (var n = u, r = e();;) try {
31
+ if (-parseInt(n(226)) / 1 + parseInt(n(230)) / 2 + -parseInt(n(218)) / 3 + parseInt(n(225)) / 4 * (parseInt(n(233)) / 5) + -parseInt(n(229)) / 6 + parseInt(n(224)) / 7 + parseInt(n(219)) / 8 == t) break;
32
+ r.push(r.shift());
33
+ } catch {
34
+ r.push(r.shift());
35
+ }
36
+ })(e, 546447);
37
+ var n = (e) => new Date(e[t(235)](), e[t(227)](), e[t(221)]()), r = (e) => new Date(e[t(235)](), e[t(227)](), 1), i = (e, n) => new Date(e[t(235)](), e[t(227)](), e[t(221)]() + n), a = (e, n) => {
38
+ var r = t;
39
+ let i = new Date(e[r(235)](), e[r(227)]() + n, 1), a = new Date(i.getFullYear(), i[r(227)]() + 1, 0).getDate();
40
+ return new Date(i[r(235)](), i[r(227)](), Math.min(e[r(221)](), a));
41
+ }, o = (e, n) => !!e && !!n && e.getFullYear() === n[t(235)]() && e.getMonth() === n[t(227)]() && e[t(221)]() === n[t(221)](), s = (e, n) => e[t(235)]() === n[t(235)]() && e[t(227)]() === n.getMonth(), c = (e, t) => n(e).getTime() - n(t).getTime(), l = (e, t, n) => c(e, t) >= 0 && c(e, n) <= 0;
42
+ function u(t, n) {
43
+ t -= 218;
44
+ var r = e(), i = r[t];
45
+ u.rmxgZW === void 0 && (u.dSnrLW = function(e) {
46
+ for (var t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=", n = "", r = "", i = 0, a, o, s = 0; o = e.charAt(s++); ~o && (a = i % 4 ? a * 64 + o : o, i++ % 4) && (n += String.fromCharCode(255 & a >> (-2 * i & 6)))) o = t.indexOf(o);
47
+ for (var c = 0, l = n.length; c < l; c++) r += "%" + ("00" + n.charCodeAt(c).toString(16)).slice(-2);
48
+ return decodeURIComponent(r);
49
+ }, u.pkOYXM = {}, u.rmxgZW = !0);
50
+ var a = r[0];
51
+ u.baDggy !== a && (u.pkOYXM = {}, u.baDggy = a);
52
+ var o = u.pkOYXM[t];
53
+ return o === void 0 ? (i = u.dSnrLW(i), u.pkOYXM[t] = i) : i = o, i;
54
+ }
55
+ function d(e, n) {
56
+ var a = t;
57
+ let o = r(e), s = i(o, -((o[a(223)]() - n + 7) % 7));
58
+ return Array[a(228)]({ length: 42 }, (e, t) => i(s, t));
59
+ }
60
+ var f = [
61
+ "일",
62
+ "월",
63
+ "화",
64
+ "수",
65
+ "목",
66
+ "금",
67
+ "토"
68
+ ], p = (e) => Array[t(228)]({ length: 7 }, (t, n) => f[(n + e) % 7]), m = (e) => e[t(235)]() + "년 " + (e.getMonth() + 1) + "월", h = (e, n = e[t(235)]() !== (/* @__PURE__ */ new Date())[t(235)]()) => (n ? e[t(235)]() + "년 " : "") + (e[t(227)]() + 1) + "월 " + e[t(221)]() + "일", g = (e) => e[t(235)]() + "년 " + (e[t(227)]() + 1) + "월 " + e.getDate() + "일 " + f[e[t(223)]()] + "요일", _ = () => n(/* @__PURE__ */ new Date()), v = [
69
+ {
70
+ label: "오늘",
71
+ range: () => ({
72
+ from: _(),
73
+ to: _()
74
+ })
75
+ },
76
+ {
77
+ label: t(231),
78
+ range: () => ({
79
+ from: i(_(), -6),
80
+ to: _()
81
+ })
82
+ },
83
+ {
84
+ label: t(236),
85
+ range: () => ({
86
+ from: i(_(), -29),
87
+ to: _()
88
+ })
89
+ },
90
+ {
91
+ label: t(220),
92
+ range: () => ({
93
+ from: new Date(_()[t(235)](), _()[t(227)](), 1),
94
+ to: _()
95
+ })
96
+ }
97
+ ];
98
+ function y(e, r = /* @__PURE__ */ new Date()) {
99
+ var a = t;
100
+ let o = e[a(234)]()[a(232)](/\s+/g, " ");
101
+ if (!o) return null;
102
+ let s = {
103
+ 그제: -2,
104
+ 그저께: -2,
105
+ 어제: -1,
106
+ 오늘: 0,
107
+ 내일: 1,
108
+ 모레: 2
109
+ };
110
+ if (o in s) return i(n(r), s[o]);
111
+ let c = (e, t, n) => {
112
+ var r = a;
113
+ let i = new Date(e, t - 1, n);
114
+ return i[r(235)]() === e && i[r(227)]() === t - 1 && i[r(221)]() === n ? i : null;
115
+ }, l = r.getFullYear(), u;
116
+ return (u = o[a(222)](/^(\d{4})\s*[-./년]\s*(\d{1,2})\s*[-./월]\s*(\d{1,2})\s*[.일]?$/)) || (u = o[a(222)](/^(\d{4})(\d{2})(\d{2})$/)) ? c(+u[1], +u[2], +u[3]) : (u = o.match(/^(\d{1,2})\s*[-./월]\s*(\d{1,2})\s*[.일]?$/)) ? c(l, +u[1], +u[2]) : (u = o[a(222)](/^(\d{1,2})\s*일$/)) ? c(l, r[a(227)]() + 1, +u[1]) : null;
117
+ }
118
+ export { v as DEFAULT_DATE_PRESETS, i as addDays, a as addMonths, l as between, c as compareDay, h as formatDate, g as formatFullDate, m as formatMonth, d as monthGrid, y as parseDateInput, o as sameDay, s as sameMonth, n as startOfDay, r as startOfMonth, p as weekdayLabels };