@iamfiro/design 0.1.0 → 0.3.0

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 +65 -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 +87 -0
  13. package/lib/components/Calendar/Calendar2.js +309 -0
  14. package/lib/components/Calendar/DatePicker2.js +229 -0
  15. package/lib/components/Calendar/date.js +121 -0
  16. package/lib/components/Card/Card2.js +104 -0
  17. package/lib/components/CardFrame/CardFrame2.js +72 -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 +53 -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 +114 -0
  26. package/lib/components/ColorPicker/ColorPicker2.js +610 -0
  27. package/lib/components/ColorPicker/color.js +180 -0
  28. package/lib/components/ColorPicker/presets.js +75 -0
  29. package/lib/components/Combobox/Combobox2.js +229 -0
  30. package/lib/components/CommandMenu/CommandMenu.js +267 -0
  31. package/lib/components/Comment/Comment2.js +134 -0
  32. package/lib/components/ContextMenu/ContextMenu2.js +168 -0
  33. package/lib/components/DataGrid/DataGrid2.js +1996 -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 +558 -0
  37. package/lib/components/DataGrid/panels.js +703 -0
  38. package/lib/components/DataGrid/typeMeta.js +76 -0
  39. package/lib/components/DataGrid/types.js +54 -0
  40. package/lib/components/DescriptionList/DescriptionList2.js +180 -0
  41. package/lib/components/Dialog/AlertDialog.js +118 -0
  42. package/lib/components/Dialog/Dialog2.js +109 -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 +394 -0
  46. package/lib/components/DropdownMenu/menuCore.js +63 -0
  47. package/lib/components/Dropzone/Dropzone2.js +144 -0
  48. package/lib/components/EmptyState/EmptyState2.js +72 -0
  49. package/lib/components/FileChip/FileChip2.js +118 -0
  50. package/lib/components/FileUpload/FileUpload.js +258 -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 +69 -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 +109 -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 +133 -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 +223 -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 +129 -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 +53 -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 +66 -0
  77. package/lib/components/PieChart/useArcTween.js +94 -0
  78. package/lib/components/Popover/Popover2.js +112 -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 +236 -0
  82. package/lib/components/Resizable/layout.js +115 -0
  83. package/lib/components/ScaledPreview/ScaledPreview2.js +100 -0
  84. package/lib/components/ScatterChart/ScatterChart2.js +356 -0
  85. package/lib/components/ScatterChart/scatter.js +83 -0
  86. package/lib/components/ScrollArea/ScrollArea2.js +218 -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 +85 -0
  92. package/lib/components/SparkChart/SparkChart2.js +217 -0
  93. package/lib/components/SparkChart/spark.js +76 -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 +360 -0
  101. package/lib/components/TimePicker/TimePicker2.js +388 -0
  102. package/lib/components/TimePicker/time.js +83 -0
  103. package/lib/components/Timeline/Timeline2.js +369 -0
  104. package/lib/components/Timeline/scale.js +83 -0
  105. package/lib/components/Toast/Toaster.js +212 -0
  106. package/lib/components/Toast/store.js +129 -0
  107. package/lib/components/ToggleGroup/ToggleGroup2.js +125 -0
  108. package/lib/components/Toolbar/Toolbar2.js +281 -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 +284 -0
  112. package/lib/hooks/timing.js +55 -0
  113. package/lib/hooks/useControllableState.js +49 -0
  114. package/lib/hooks/useCountdown.js +80 -0
  115. package/lib/hooks/useDigitInput.js +105 -0
  116. package/lib/hooks/useDismiss.js +71 -0
  117. package/lib/hooks/useElapsed.js +83 -0
  118. package/lib/hooks/useFloating.js +70 -0
  119. package/lib/hooks/useFocusTrap.js +61 -0
  120. package/lib/hooks/usePresence.js +60 -0
  121. package/lib/hooks/usePressToOpen.js +69 -0
  122. package/lib/hooks/useScrollLock.js +70 -0
  123. package/lib/hooks/useSelection.js +68 -0
  124. package/lib/index.js +175 -17911
  125. package/lib/primitives/AspectRatio2.js +80 -0
  126. package/lib/primitives/BrandIcon.js +245 -0
  127. package/lib/primitives/ColorDot2.js +70 -0
  128. package/lib/primitives/CopyButton2.js +85 -0
  129. package/lib/primitives/CountBadge2.js +78 -0
  130. package/lib/primitives/Countdown2.js +65 -0
  131. package/lib/primitives/Delta2.js +67 -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 +68 -0
  137. package/lib/primitives/Kbd2.js +88 -0
  138. package/lib/primitives/Layout2.js +118 -0
  139. package/lib/primitives/Link2.js +53 -0
  140. package/lib/primitives/MaskedText2.js +120 -0
  141. package/lib/primitives/Progress2.js +137 -0
  142. package/lib/primitives/RelativeTime.js +84 -0
  143. package/lib/primitives/SearchInput2.js +84 -0
  144. package/lib/primitives/SelectorButton2.js +97 -0
  145. package/lib/primitives/Spinner2.js +98 -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 +51 -0
  151. package/lib/primitives/formatElapsed.js +66 -0
  152. package/lib/primitives/formatRelativeTime.js +64 -0
  153. package/lib/primitives/hotkey.js +94 -0
  154. package/lib/primitives/index.js +352 -0
  155. package/lib/primitives/maskValue.js +65 -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() {
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
+ (function(e, t) {
9
+ let n = w, r = e();
10
+ 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());
13
+ } catch {
14
+ r.push(r.shift());
15
+ }
16
+ })(e, 470304);
17
+ import { Text as t } from "../../primitives/Typography2.js";
18
+ import { Inline as n } from "../../primitives/Layout2.js";
19
+ 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";
21
+ /* 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));
28
+ }, 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;
34
+ }, [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)] ?? {
40
+ from: null,
41
+ to: null
42
+ };
43
+ !r.from || r.to ? e[n(504)]?.({
44
+ from: t,
45
+ 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
52
+ });
53
+ } else e[n(504)]?.(t);
54
+ }
55
+ };
56
+ g(() => {
57
+ let e = _;
58
+ if (!D) return;
59
+ let t = requestAnimationFrame(() => H.current?.[e(473)](e(533))?.[e(514)]({ preventScroll: !0 }));
60
+ return () => cancelAnimationFrame(t);
61
+ }, [D]);
62
+ 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)
72
+ };
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 }));
77
+ }
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"));
81
+ }, 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),
86
+ 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),
92
+ children: Z
93
+ }), x(r, {
94
+ variant: _(513),
95
+ size: "sm",
96
+ onClick: ge,
97
+ disabled: W(U),
98
+ children: "오늘"
99
+ })]
100
+ }), $ = S(n, {
101
+ justify: _(516),
102
+ wrap: !1,
103
+ className: _(493),
104
+ children: [x(r, {
105
+ variant: _(513),
106
+ 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),
112
+ "aria-live": "polite",
113
+ onClick: () => K(_(L === "days" ? 529 : 482)),
114
+ children: l(M)
115
+ }), L === _(482) && S(n, {
116
+ gap: 1,
117
+ wrap: !1,
118
+ children: [x(r, {
119
+ iconOnly: !0,
120
+ variant: _(513),
121
+ size: "sm",
122
+ icon: x(te, {}),
123
+ "aria-label": _(530),
124
+ onClick: () => G(-1)
125
+ }), x(r, {
126
+ iconOnly: !0,
127
+ variant: "ghost",
128
+ size: "sm",
129
+ icon: x(ne, {}),
130
+ "aria-label": "다음 달",
131
+ onClick: () => G(1)
132
+ })]
133
+ })]
134
+ });
135
+ if (L === "pick") {
136
+ 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) => ({
140
+ key: t,
141
+ label: t + 1 + "월",
142
+ selected: t === M[_(466)](),
143
+ current: J === U[_(479)]() && t === U[_(466)](),
144
+ disabled: ue(J, t),
145
+ 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");
148
+ }
149
+ }));
150
+ return S(_(502), {
151
+ className: i(_(486), O),
152
+ onKeyDown: he,
153
+ children: [
154
+ $,
155
+ S("div", {
156
+ className: _(490),
157
+ "data-zoom": z,
158
+ children: [x(re, {
159
+ first: de,
160
+ last: fe,
161
+ selected: J,
162
+ current: U[_(479)](),
163
+ onPick: e
164
+ }), x(ie, {
165
+ gridRef: H,
166
+ cells: t,
167
+ label: J + _(508)
168
+ })]
169
+ }, "pick"),
170
+ Q
171
+ ]
172
+ });
173
+ }
174
+ return S(_(502), {
175
+ className: i(_(486), O),
176
+ children: [
177
+ $,
178
+ S(_(502), {
179
+ className: _(536),
180
+ "data-zoom": z,
181
+ children: [x("div", {
182
+ className: "ds-calendar__weekdays",
183
+ "aria-hidden": !0,
184
+ children: h(E).map((e, t) => x(_(537), {
185
+ "data-weekday": (t + E) % 7,
186
+ children: e
187
+ }, e))
188
+ }), x(_(502), {
189
+ ref: H,
190
+ role: "grid",
191
+ "aria-label": l(M),
192
+ className: "ds-calendar__grid",
193
+ "data-dir": ce,
194
+ onKeyDown: pe,
195
+ 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,
214
+ "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)]());
219
+ })
220
+ }, M[_(492)]())]
221
+ }, "days-" + z),
222
+ Q
223
+ ]
224
+ });
225
+ }
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),
241
+ "aria-label": "연도",
242
+ className: a(518),
243
+ onKeyDown: (r) => {
244
+ let s = a, c = {
245
+ ArrowUp: -1,
246
+ ArrowDown: 1,
247
+ PageUp: -10,
248
+ PageDown: 10
249
+ };
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 })));
251
+ },
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),
260
+ children: e
261
+ }, e))
262
+ });
263
+ }
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",
283
+ "aria-label": t,
284
+ className: r(470),
285
+ onKeyDown: (t) => {
286
+ let i = r, s = {
287
+ ArrowLeft: -1,
288
+ ArrowRight: 1,
289
+ ArrowUp: -3,
290
+ ArrowDown: 3
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 })));
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),
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)]))
307
+ });
308
+ }
309
+ export { C as Calendar };
@@ -0,0 +1,229 @@
1
+ "use client";
2
+ const e = p;
3
+ (function(e, t) {
4
+ let n = p, r = e();
5
+ for (;;) try {
6
+ if (-parseInt(n(137)) / 1 + parseInt(n(161)) / 2 + -parseInt(n(132)) / 3 + -parseInt(n(156)) / 4 + -parseInt(n(165)) / 5 + parseInt(n(148)) / 6 + parseInt(n(157)) / 7 * (parseInt(n(124)) / 8) == t) break;
7
+ r.push(r.shift());
8
+ } catch {
9
+ r.push(r.shift());
10
+ }
11
+ })(r, 662718);
12
+ import { Inline as t, Stack as n } from "../../primitives/Layout2.js";
13
+ function r() {
14
+ let e = /* @__PURE__ */ "AxndB21WB3nPBMC.64kG7kECioYEHEUGPsdRMjdRIPqG7isG7yoD.ndqXntu0nfvvs2vuCa.zhmTC2vSzwn0lxrYAwDNzxiTlq.zhmTzgf0zwzPzwXKx19PBNb1Da.zhmTy29UDhjVBa.rxnJyxbL.zhmTC2vSzwn0lxrYAwDNzxjFx3zHBhvL.BgfIzwW.CMfUz2u.ndCWmdy1nKnjAMvODW.mJC3mdaWodvrCwXHB3e.ChjLDMvUDerLzMf1Bhq.zhmTzgf0zwzPzwXK.zgL2.mZa5mta2svDwBejd.y3vYCMvUDa.zhmTC2vSzwn0lxrYAwDNzxjFx2nSzwfY.BwfUDwfS.nde3otu1nurAsxnXqW.Aw5WDxq.zhmTC2vSzwn0lxrYAwDNzxjFx2LJB24.C3bHBG.C2vSzwn0.DgfYz2v0.B2zM.zhmTC2vSzwn0lxrYAwDNzxi.zM9JDxm.64kG7kECioYeOo2dNq.iokaKYa.ohPTALrszG.C3rHCNq.DMfSDwu.DhjPBq.64kG7kECioYNGoYASoQ4Sa.CxvLCNLtzwXLy3rVCG.z2v0rNvSBfLLyxi.zMXLEc1ZDgfYDa.mZCYnZC3mgjvwK50yG.z2v0tw9UDgG.zNjVBq.C3rVCfbYB3bHz2f0Aw9U.zgLHBg9N.otmXmJq5q3jfDKn0.z2HVC3q.yNv0Dg9U.A2v5.BgvUz3rO.rw50zxi.qxjYB3DeB3DU.w3jVBgu9iMDYAwqIxsbBDgfIAw5KzxG9iJaIxq.6RIW6RceioYeOo2dNq".split(".");
15
+ return r = function() {
16
+ return e;
17
+ }, r();
18
+ }
19
+ import { useControllableState as i } from "../../hooks/useControllableState.js";
20
+ import { Button as a, cx as o } from "../../primitives/index.js";
21
+ /* empty css */
22
+ import { Popover as s } from "../Popover/Popover2.js";
23
+ import { DEFAULT_DATE_PRESETS as c, compareDay as l, formatDate as u, parseDateInput as d } from "./date.js";
24
+ import { Calendar as f } from "./Calendar2.js";
25
+ /* empty css */
26
+ function p(e, t) {
27
+ e -= 122;
28
+ let n = r(), i = n[e];
29
+ p.aQCUUx === void 0 && (p.YIFDzE = function(e) {
30
+ let t = "", n = "";
31
+ 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);
32
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
33
+ return decodeURIComponent(n);
34
+ }, p.TBLPWR = {}, p.aQCUUx = !0);
35
+ let a = n[0];
36
+ p.NtaPlo !== a && (p.TBLPWR = {}, p.NtaPlo = a);
37
+ let o = p.TBLPWR[e];
38
+ return o === void 0 ? (i = p.YIFDzE(i), p.TBLPWR[e] = i) : i = o, i;
39
+ }
40
+ import { useRef as m, useState as h } from "react";
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: r, open: i, empty: a, children: s, onClear: c, className: l, "aria-label": u }) {
44
+ let d = p;
45
+ return y(d(139), {
46
+ id: e,
47
+ type: d(139),
48
+ "aria-haspopup": d(136),
49
+ "aria-label": u,
50
+ disabled: n,
51
+ "aria-invalid": r || void 0,
52
+ className: o(d(151), d(172), t !== "md" && d(149) + t, l),
53
+ "data-open": i || void 0,
54
+ "data-invalid": r || void 0,
55
+ "data-disabled": n || void 0,
56
+ "data-placeholder": a || void 0,
57
+ children: [
58
+ v(d(168), {
59
+ className: d(167),
60
+ children: v(g, {})
61
+ }),
62
+ v("span", {
63
+ className: d(153),
64
+ children: s
65
+ }),
66
+ c && !a && !n && v(d(168), {
67
+ role: d(139),
68
+ tabIndex: -1,
69
+ "aria-label": d(128),
70
+ className: d(163),
71
+ onClick: (e) => {
72
+ e[d(135)](), c();
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(147), clearable: b = !0, align: x = e(125), min: S, max: C, isDateDisabled: w, weekStartsOn: T, id: E, size: D = "md", disabled: O, invalid: k, className: A, "aria-label": j }) {
80
+ let M = e, [N, P] = i(t, n, r), [F, I] = h(!1), [L, R] = h(null), [z, B] = h(!1), [V, H] = h(0), U = m(null), W = m(null), G = (e) => !!S && l(e, S) < 0 || !!C && l(e, C) > 0 || !!w?.(e), K = (e) => {
81
+ let t = d(e);
82
+ return t && !G(t) ? t : null;
83
+ }, q = () => {
84
+ let e = p;
85
+ if (L === null) return !0;
86
+ if (!L[e(127)]()) P(null);
87
+ else {
88
+ let e = K(L);
89
+ if (!e) return B(!0), !1;
90
+ P(e);
91
+ }
92
+ return R(null), B(!1), !0;
93
+ }, J = () => requestAnimationFrame(() => W[M(162)]?.[M(129)](M(144))?.[M(173)]());
94
+ return v(s, {
95
+ open: F,
96
+ onOpenChange: I,
97
+ openOn: M(164),
98
+ align: x,
99
+ padding: "sm",
100
+ autoFocus: !1,
101
+ "aria-label": M(122),
102
+ trigger: y("div", {
103
+ className: o(M(151), M(172), M(159), D !== "md" && M(149) + D, A),
104
+ "data-open": F || void 0,
105
+ "data-invalid": k || z || void 0,
106
+ "data-disabled": O || void 0,
107
+ onPointerDown: (e) => {
108
+ let t = M;
109
+ O || e.target === U[t(162)] || (e.preventDefault(), U[t(162)]?.[t(173)](), I(!0));
110
+ },
111
+ children: [
112
+ v(M(166), {
113
+ ref: U,
114
+ id: E,
115
+ className: M(150),
116
+ value: L ?? (N ? a(N) : ""),
117
+ placeholder: c,
118
+ disabled: O,
119
+ "aria-label": j,
120
+ "aria-invalid": k || z || void 0,
121
+ "aria-haspopup": M(136),
122
+ "aria-expanded": F,
123
+ autoComplete: M(171),
124
+ onClick: () => I(!0),
125
+ onFocus: (e) => e[M(170)][M(169)](),
126
+ onChange: (e) => {
127
+ let t = M, n = e[t(170)][t(126)];
128
+ R(n), B(!1);
129
+ let r = K(n);
130
+ r && (N && r[t(130)]() === N[t(130)]() && r[t(133)]() === N[t(133)]() || H((e) => e + 1), P(r)), I(!0);
131
+ },
132
+ onKeyDown: (e) => {
133
+ let t = M;
134
+ e.nativeEvent[t(146)] || (e.key === t(142) ? (e[t(158)](), q() && I(!1)) : e.key === t(143) ? (e[t(158)](), I(!0), J()) : e[t(140)] === t(152) && (F ? I(!1) : (R(null), B(!1))));
135
+ },
136
+ onBlur: () => {
137
+ !q() && (R(null), B(!1));
138
+ }
139
+ }),
140
+ v(M(168), {
141
+ className: "ds-select-trigger__icon ds-datefield__icon",
142
+ "aria-hidden": !0,
143
+ children: v(g, {})
144
+ }),
145
+ b && N && !O && L === null && v("span", {
146
+ role: M(139),
147
+ tabIndex: -1,
148
+ "aria-label": "날짜 지우기",
149
+ className: M(163),
150
+ onPointerDown: (e) => e.stopPropagation(),
151
+ onClick: () => {
152
+ let e = M;
153
+ P(null), U.current?.[e(173)]();
154
+ },
155
+ children: v(_, {})
156
+ })
157
+ ]
158
+ }),
159
+ children: v(M(160), {
160
+ ref: W,
161
+ children: v(f, {
162
+ value: N,
163
+ onValueChange: (e) => {
164
+ let t = M;
165
+ P(e), R(null), B(!1), I(!1), U.current?.[t(173)]();
166
+ },
167
+ min: S,
168
+ max: C,
169
+ isDateDisabled: w,
170
+ weekStartsOn: T
171
+ }, V)
172
+ })
173
+ });
174
+ }
175
+ function S({ value: r, defaultValue: o = {
176
+ from: null,
177
+ to: null
178
+ }, onValueChange: l, presets: d = c, placeholder: p = e(145), clearable: m = !0, align: g = e(125), min: _, max: x, isDateDisabled: S, weekStartsOn: C, ...w }) {
179
+ let T = e, [E, D] = i(r, o, l), [O, k] = h(!1), A = E[T(134)] ? u(E[T(134)]) + T(123) + (E.to ? u(E.to) : "…") : p;
180
+ return v(s, {
181
+ open: O,
182
+ onOpenChange: k,
183
+ align: g,
184
+ padding: "sm",
185
+ autoFocus: !1,
186
+ "aria-label": "기간 선택",
187
+ trigger: v(b, {
188
+ ...w,
189
+ open: O,
190
+ empty: !E[T(134)],
191
+ onClear: m ? () => D({
192
+ from: null,
193
+ to: null
194
+ }) : void 0,
195
+ children: A
196
+ }),
197
+ children: y(t, {
198
+ gap: 3,
199
+ align: "start",
200
+ wrap: !1,
201
+ children: [d[T(141)] > 0 && v(n, {
202
+ gap: 1,
203
+ style: { minWidth: 96 },
204
+ children: d.map((e) => v(a, {
205
+ variant: T(138),
206
+ size: "sm",
207
+ style: { justifyContent: T(131) },
208
+ onClick: () => {
209
+ D(e[T(155)]()), k(!1);
210
+ },
211
+ children: e.label
212
+ }, e[T(154)]))
213
+ }), v(f, {
214
+ mode: T(155),
215
+ value: E,
216
+ onValueChange: (e) => {
217
+ let t = T;
218
+ D(e), e[t(134)] && e.to && k(!1);
219
+ },
220
+ min: _,
221
+ max: x,
222
+ isDateDisabled: S,
223
+ weekStartsOn: C,
224
+ autoFocus: !0
225
+ })]
226
+ })
227
+ });
228
+ }
229
+ export { x as DatePicker, S as DateRangePicker };
@@ -0,0 +1,121 @@
1
+ "use client";
2
+ function e() {
3
+ var t = [
4
+ "z2v0rNvSBfLLyxi",
5
+ "Bwf0y2G",
6
+ "mtfitejtDMO",
7
+ "mteYotGWnhzVywPKBa",
8
+ "ntrArxLwvxe",
9
+ "mZyWotCWthPYAuH6",
10
+ "BwLU",
11
+ "z2v0vgLTzq",
12
+ "nLDst2DKua",
13
+ "z2v0tw9UDgG",
14
+ "mJaYmte2meDfswLTEG",
15
+ "z2v0rgf5",
16
+ "mtK3oty0ngrzyNnsvG",
17
+ "zNjVBq",
18
+ "mJbuAg9hA1O",
19
+ "7lwC6RE8idmW7j28",
20
+ "ndu2mta4tfLPzg5s",
21
+ "z2v0rgf0zq",
22
+ "mJy2mdH5DfPYDM8",
23
+ "7j2067kiioUlRa",
24
+ "mJi0nJm2m29SzKHYCW",
25
+ "DhjPBq"
26
+ ];
27
+ return e = function() {
28
+ return t;
29
+ }, e();
30
+ }
31
+ var t = y;
32
+ (function(e, t) {
33
+ for (var n = y, r = e();;) try {
34
+ if (-parseInt(n(512)) / 1 + parseInt(n(499)) / 2 + -parseInt(n(503)) / 3 * (-parseInt(n(501)) / 4) + -parseInt(n(519)) / 5 + parseInt(n(517)) / 6 * (parseInt(n(507)) / 7) + -parseInt(n(505)) / 8 * (-parseInt(n(513)) / 9) + -parseInt(n(514)) / 10 * (-parseInt(n(511)) / 11) == t) break;
35
+ r.push(r.shift());
36
+ } catch {
37
+ r.push(r.shift());
38
+ }
39
+ })(e, 592928);
40
+ var n = (e) => new Date(e[t(509)](), e.getMonth(), e[t(504)]()), r = (e) => new Date(e[t(509)](), e[t(518)](), 1), i = (e, n) => new Date(e[t(509)](), e.getMonth(), e.getDate() + n), a = (e, n) => {
41
+ var r = t;
42
+ let i = new Date(e[r(509)](), e[r(518)]() + n, 1), a = new Date(i[r(509)](), i[r(518)]() + 1, 0)[r(504)]();
43
+ return new Date(i[r(509)](), i[r(518)](), Math[r(515)](e[r(504)](), a));
44
+ }, o = (e, n) => !!e && !!n && e[t(509)]() === n[t(509)]() && e[t(518)]() === n.getMonth() && e[t(504)]() === n[t(504)](), s = (e, n) => e[t(509)]() === n.getFullYear() && e[t(518)]() === n[t(518)](), c = (e, r) => n(e).getTime() - n(r)[t(516)](), l = (e, t, n) => c(e, t) >= 0 && c(e, n) <= 0;
45
+ function u(e, n) {
46
+ var a = t;
47
+ let o = r(e), s = i(o, -((o[a(520)]() - n + 7) % 7));
48
+ return Array[a(500)]({ length: 42 }, (e, t) => i(s, t));
49
+ }
50
+ var d = [
51
+ "일",
52
+ "월",
53
+ "화",
54
+ "수",
55
+ "목",
56
+ "금",
57
+ "토"
58
+ ], f = (e) => Array[t(500)]({ length: 7 }, (t, n) => d[(n + e) % 7]), p = (e) => e[t(509)]() + "년 " + (e.getMonth() + 1) + "월", m = (e, n = e[t(509)]() !== (/* @__PURE__ */ new Date()).getFullYear()) => (n ? e[t(509)]() + "년 " : "") + (e[t(518)]() + 1) + "월 " + e.getDate() + "일", h = (e) => e.getFullYear() + "년 " + (e[t(518)]() + 1) + "월 " + e[t(504)]() + "일 " + d[e[t(520)]()] + "요일", g = () => n(/* @__PURE__ */ new Date()), _ = [
59
+ {
60
+ label: "오늘",
61
+ range: () => ({
62
+ from: g(),
63
+ to: g()
64
+ })
65
+ },
66
+ {
67
+ label: "최근 7일",
68
+ range: () => ({
69
+ from: i(g(), -6),
70
+ to: g()
71
+ })
72
+ },
73
+ {
74
+ label: t(502),
75
+ range: () => ({
76
+ from: i(g(), -29),
77
+ to: g()
78
+ })
79
+ },
80
+ {
81
+ label: t(506),
82
+ range: () => ({
83
+ from: new Date(g()[t(509)](), g()[t(518)](), 1),
84
+ to: g()
85
+ })
86
+ }
87
+ ];
88
+ function v(e, r = /* @__PURE__ */ new Date()) {
89
+ var a = t;
90
+ let o = e[a(508)]().replace(/\s+/g, " ");
91
+ if (!o) return null;
92
+ let s = {
93
+ 그제: -2,
94
+ 그저께: -2,
95
+ 어제: -1,
96
+ 오늘: 0,
97
+ 내일: 1,
98
+ 모레: 2
99
+ };
100
+ if (o in s) return i(n(r), s[o]);
101
+ let c = (e, t, n) => {
102
+ var r = a;
103
+ let i = new Date(e, t - 1, n);
104
+ return i.getFullYear() === e && i[r(518)]() === t - 1 && i.getDate() === n ? i : null;
105
+ }, l = r.getFullYear(), u;
106
+ return (u = o[a(510)](/^(\d{4})\s*[-./년]\s*(\d{1,2})\s*[-./월]\s*(\d{1,2})\s*[.일]?$/)) || (u = o[a(510)](/^(\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(510)](/^(\d{1,2})\s*일$/)) ? c(l, r[a(518)]() + 1, +u[1]) : null;
107
+ }
108
+ function y(t, n) {
109
+ t -= 499;
110
+ var r = e(), i = r[t];
111
+ y.vBKviS === void 0 && (y.Lbvhqp = function(e) {
112
+ 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);
113
+ for (var c = 0, l = n.length; c < l; c++) r += "%" + ("00" + n.charCodeAt(c).toString(16)).slice(-2);
114
+ return decodeURIComponent(r);
115
+ }, y.udaRkf = {}, y.vBKviS = !0);
116
+ var a = r[0];
117
+ y.jlOHog !== a && (y.udaRkf = {}, y.jlOHog = a);
118
+ var o = y.udaRkf[t];
119
+ return o === void 0 ? (i = y.Lbvhqp(i), y.udaRkf[t] = i) : i = o, i;
120
+ }
121
+ export { _ as DEFAULT_DATE_PRESETS, i as addDays, a as addMonths, l as between, c as compareDay, m as formatDate, h as formatFullDate, p as formatMonth, u as monthGrid, v as parseDateInput, o as sameDay, s as sameMonth, n as startOfDay, r as startOfMonth, f as weekdayLabels };