@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,142 @@
1
+ "use client";
2
+ const e = t;
3
+ (function(e, n) {
4
+ let r = t, i = e();
5
+ for (;;) try {
6
+ if (parseInt(r(215)) / 1 * (parseInt(r(259)) / 2) + parseInt(r(245)) / 3 * (parseInt(r(244)) / 4) + -parseInt(r(238)) / 5 * (parseInt(r(251)) / 6) + parseInt(r(240)) / 7 * (-parseInt(r(252)) / 8) + -parseInt(r(247)) / 9 * (-parseInt(r(213)) / 10) + parseInt(r(261)) / 11 * (-parseInt(r(214)) / 12) + parseInt(r(227)) / 13 == n) break;
7
+ i.push(i.shift());
8
+ } catch {
9
+ i.push(i.shift());
10
+ }
11
+ })(i, 829267);
12
+ function t(e, n) {
13
+ e -= 212;
14
+ let r = i(), a = r[e];
15
+ t.AGnWfP === void 0 && (t.jpkHwj = function(e) {
16
+ let t = "", n = "";
17
+ for (let n = 0, r, i, a = 0; i = e.charAt(a++); ~i && (r = n % 4 ? r * 64 + i : i, n++ % 4) && (t += String.fromCharCode(255 & r >> (-2 * n & 6)))) i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);
18
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
19
+ return decodeURIComponent(n);
20
+ }, t.lbuVip = {}, t.AGnWfP = !0);
21
+ let o = r[0];
22
+ t.APdyDU !== o && (t.lbuVip = {}, t.APdyDU = o);
23
+ let s = t.lbuVip[e];
24
+ return s === void 0 ? (a = t.jpkHwj(a), t.lbuVip[e] = a) : a = s, a;
25
+ }
26
+ import { useControllableState as n } from "../../hooks/useControllableState.js";
27
+ import { cx as r } from "../../primitives/index.js";
28
+ function i() {
29
+ let e = /* @__PURE__ */ "rxnJyxbL.AxnbCNjHEq.y2XPzw50wa.zhmTC2XPzgvYx190AhvTyG.nJG4ndy1nxr5z1bAra.C29Tzq.mZaZoteWnKn4vMTiCG.D2LKDgG.C3bSAxq.Aw5WDxq.nhzRqvLvza.ndm1ntqWm3beuK5csq.Dg9gAxHLza.mZy2nZvUy0vvtK8.zgL2.Ag9YAxPVBNrHBa.rw5K.nMr1BM51BW.oeXVuvvMtq.ChjLDMvUDerLzMf1Bhq.Cg9PBNrLCKLK.zhmTC2XPzgvYx19TyxjR.BwfW.BgvUz3rO.zhmTC2XPzgvYx19TyxjRlwXHyMvS.mKfeB1P5Ca.sg9Tzq.mtflBhbcB1q.yxv0BW.mZa3me1SvhHgDa.mtyXmJi5ndHssvjWtKu.mZK0nJyYq01SrffT.C2v0ug9PBNrLCKnHChr1CMu.y3vYCMvUDa.zhmTC2XPzgvYx19Yyw5Nzq.C3bHBG.A2v5.BMv2zxi.CM91BMq.BNvTyMvY.zhmTC2XPzgvYx192ywX1zq.zhmTC2XPzgvYx19YywLS.zhmTC2XPzgvYls1SywjLBgvK.mte1mJm4mtfyuuLPrw0.Bwf4.BwLU.yNv0Dg9U.BgfIzwW.DMfSDwu.ywjZ".split(".");
30
+ return i = function() {
31
+ return e;
32
+ }, i();
33
+ }
34
+ /* empty css */
35
+ import { useLayoutEffect as a, useRef as o, useState as s } from "react";
36
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
37
+ var u = (t, n, r) => Math[e(229)](r, Math[e(228)](n, t));
38
+ function d({ value: t, defaultValue: i, onValueChange: d, onValueCommit: f, min: p = 0, max: m = 100, step: h = 1, minDistance: g = 0, marks: _, formatValue: v = String, showValue: y = e(212), size: b = "md", disabled: x, name: S, id: C, className: w, "aria-label": T, getThumbLabel: E }) {
39
+ let D = e, O = Array.isArray(t ?? i), [k, A] = n(t, i ?? p, d), j = Array[D(235)](k) ? k : [k], M = o(j);
40
+ a(() => {
41
+ let e = D;
42
+ M[e(217)] = j;
43
+ });
44
+ let N = o(null), P = o([]), [F, I] = s(null), L = o(j), R = (String(h)[D(242)](".")[1] ?? "")[D(257)], z = (e) => u(Number((Math[D(222)]((e - p) / h) * h + p)[D(246)](R)), p, m), B = (e) => (e - p) / (m - p) * 100, V = (e) => O ? [e[0], e[1]] : e[0], H = (e, t) => {
45
+ let n = D, r = [...M[n(217)]], i = z(t);
46
+ O && (i = e === 0 ? Math[n(229)](i, r[1] - g) : Math.max(i, r[0] + g)), i !== r[e] && (r[e] = i, M[n(217)] = r, A(V(r)));
47
+ }, U = (e) => {
48
+ let t = D, n = N[t(217)].getBoundingClientRect();
49
+ return p + u((e - n.left) / n[t(241)], 0, 1) * (m - p);
50
+ }, W = (e) => {
51
+ let t = D;
52
+ if (x || e[t(230)] !== 0) return;
53
+ e[t(253)]();
54
+ let n = U(e.clientX), r = O ? Math[t(233)](n - j[0]) < Math[t(233)](n - j[1]) ? 0 : Math[t(233)](n - j[0]) > Math[t(233)](n - j[1]) ? 1 : n < j[0] ? 0 : 1 : 0;
55
+ e.currentTarget[t(216)](e[t(254)]), L[t(217)] = M.current, I(r), H(r, n), P[t(217)][r]?.focus();
56
+ }, G = (e) => {
57
+ F !== null && H(F, U(e[D(236)]));
58
+ }, K = () => {
59
+ F !== null && (I(null), f?.(V(M.current)));
60
+ }, q = (e) => (t) => {
61
+ let n = D;
62
+ if (t[n(220)] === n(234) && F !== null) {
63
+ t[n(253)](), I(null), M.current = L[n(217)], A(V(L[n(217)]));
64
+ return;
65
+ }
66
+ if (F !== null) return;
67
+ let r = h * Math[n(228)](1, Math.round((m - p) / h / 10)), i = {
68
+ ArrowRight: h,
69
+ ArrowUp: h,
70
+ ArrowLeft: -h,
71
+ ArrowDown: -h,
72
+ PageUp: r,
73
+ PageDown: -r
74
+ }, a;
75
+ t[n(220)] in i ? a = j[e] + i[t[n(220)]] : t[n(220)] === n(260) ? a = p : t[n(220)] === n(250) && (a = m), a !== void 0 && (t[n(253)](), H(e, a), f?.(V(M[n(217)])));
76
+ }, J = (_ ?? [])[D(256)]((e) => typeof e === D(223) ? { value: e } : e), Y = J[D(239)]((e) => e[D(231)] != null), X = O ? j[0] : p, Z = j[j[D(257)] - 1];
77
+ return l(D(248), {
78
+ id: C,
79
+ className: r("ds-slider", "ds-slider--" + b, Y && D(226), w),
80
+ "data-disabled": x || void 0,
81
+ "data-dragging": F !== null || void 0,
82
+ onPointerDown: W,
83
+ onPointerMove: G,
84
+ onPointerUp: K,
85
+ onPointerCancel: K,
86
+ children: [l(D(248), {
87
+ ref: N,
88
+ className: D(225),
89
+ children: [
90
+ c(D(248), {
91
+ className: "ds-slider__track",
92
+ children: c(D(248), {
93
+ className: D(218),
94
+ style: {
95
+ left: B(X) + "%",
96
+ right: 100 - B(Z) + "%"
97
+ }
98
+ })
99
+ }),
100
+ J[D(256)]((e) => c(D(219), {
101
+ className: D(255),
102
+ "data-in-range": e[D(232)] >= X && e[D(232)] <= Z || void 0,
103
+ style: { left: B(e[D(232)]) + "%" }
104
+ }, e[D(232)])),
105
+ j[D(256)]((e, t) => c(D(219), {
106
+ ref: (e) => {
107
+ let n = D;
108
+ P[n(217)][t] = e;
109
+ },
110
+ role: "slider",
111
+ tabIndex: x ? -1 : 0,
112
+ "aria-valuemin": O && t === 1 ? j[0] : p,
113
+ "aria-valuemax": O && t === 0 ? j[1] : m,
114
+ "aria-valuenow": e,
115
+ "aria-valuetext": v(e),
116
+ "aria-label": E?.(t) ?? T,
117
+ "aria-orientation": D(249),
118
+ "aria-disabled": x || void 0,
119
+ className: D(237),
120
+ "data-active": F === t || void 0,
121
+ style: { left: B(e) + "%" },
122
+ onKeyDown: q(t),
123
+ children: y !== D(221) && c(D(219), {
124
+ className: D(224),
125
+ "data-show": y,
126
+ children: v(e)
127
+ })
128
+ }, t)),
129
+ Y && J[D(256)]((e) => e[D(231)] != null && c(D(219), {
130
+ className: D(258),
131
+ style: { left: B(e.value) + "%" },
132
+ children: e[D(231)]
133
+ }, "l-" + e.value))
134
+ ]
135
+ }), S && j[D(256)]((e, t) => c(D(243), {
136
+ type: "hidden",
137
+ name: O ? S + "[" + t + "]" : S,
138
+ value: e
139
+ }, t))]
140
+ });
141
+ }
142
+ export { d as Slider };
@@ -0,0 +1,84 @@
1
+ "use client";
2
+ var e = t;
3
+ (function(e, n) {
4
+ for (var r = t, i = e();;) try {
5
+ if (-parseInt(r(375)) / 1 + -parseInt(r(382)) / 2 + -parseInt(r(385)) / 3 + parseInt(r(381)) / 4 * (-parseInt(r(376)) / 5) + parseInt(r(380)) / 6 + -parseInt(r(379)) / 7 + parseInt(r(389)) / 8 * (parseInt(r(387)) / 9) == n) break;
6
+ i.push(i.shift());
7
+ } catch {
8
+ i.push(i.shift());
9
+ }
10
+ })(r, 498480);
11
+ function t(e, n) {
12
+ e -= 375;
13
+ var i = r(), a = i[e];
14
+ t.yqOfZl === void 0 && (t.oZjnnG = function(e) {
15
+ 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);
16
+ for (var c = 0, l = n.length; c < l; c++) r += "%" + ("00" + n.charCodeAt(c).toString(16)).slice(-2);
17
+ return decodeURIComponent(r);
18
+ }, t.TgFFIj = {}, t.yqOfZl = !0);
19
+ var o = i[0];
20
+ t.WxgRvZ !== o && (t.TgFFIj = {}, t.WxgRvZ = o);
21
+ var s = t.TgFFIj[e];
22
+ return s === void 0 ? (a = t.oZjnnG(a), t.TgFFIj[e] = a) : a = s, a;
23
+ }
24
+ import { BrandIcon as n } from "../../primitives/BrandIcon.js";
25
+ function r() {
26
+ var e = [
27
+ "C2vJB25Kyxj5",
28
+ "ofPMruDZrG",
29
+ "nJi4nZCXD2H2y3ny",
30
+ "ntuWqM1QAMfT",
31
+ "r29Vz2XL",
32
+ "y29UDgLUDwu",
33
+ "nJe3ndqYn3vYugrkza",
34
+ "mJy5otm0mgn3D1PYqW",
35
+ "mJK3ndHrzNnStxO",
36
+ "mteZmZC4ogPirfP0sa",
37
+ "66gCioUHNoQ3UoYDUa",
38
+ "66gCioQWGoYEHE2vMoQ4Sa",
39
+ "mtGWodC2owPitMXTwG",
40
+ "qxbWBgu",
41
+ "mZe5mJu3odfQBeLbwMW"
42
+ ];
43
+ return r = function() {
44
+ return e;
45
+ }, r();
46
+ }
47
+ import { Button as i } from "../../primitives/index.js";
48
+ import { forwardRef as a } from "react";
49
+ import { jsx as o } from "react/jsx-runtime";
50
+ var s = {
51
+ google: {
52
+ name: e(377),
53
+ variant: e(388)
54
+ },
55
+ apple: {
56
+ name: e(386),
57
+ variant: "primary"
58
+ }
59
+ }, c = {
60
+ continue: "로 계속하기",
61
+ signin: e(383),
62
+ signup: e(384)
63
+ }, l = {
64
+ sm: 14,
65
+ md: 16,
66
+ lg: 18
67
+ }, u = a(function({ provider: t, action: r = e(378), size: a = "md", iconOnly: u, children: d, ...f }, p) {
68
+ let { name: m, variant: h } = s[t], g = m + c[r];
69
+ return o(i, {
70
+ ref: p,
71
+ variant: h,
72
+ size: a,
73
+ iconOnly: u,
74
+ icon: o(n, {
75
+ name: t,
76
+ size: l[a]
77
+ }),
78
+ "aria-label": u ? g : void 0,
79
+ "data-provider": t,
80
+ ...f,
81
+ children: d ?? g
82
+ });
83
+ });
84
+ export { u as SocialLoginButton };
@@ -0,0 +1,217 @@
1
+ "use client";
2
+ const e = p;
3
+ (function(e, t) {
4
+ let n = p, r = e();
5
+ for (;;) try {
6
+ if (-parseInt(n(278)) / 1 + -parseInt(n(263)) / 2 * (-parseInt(n(300)) / 3) + parseInt(n(316)) / 4 + -parseInt(n(315)) / 5 * (-parseInt(n(311)) / 6) + parseInt(n(323)) / 7 + parseInt(n(326)) / 8 * (-parseInt(n(273)) / 9) + -parseInt(n(291)) / 10 == t) break;
7
+ r.push(r.shift());
8
+ } catch {
9
+ r.push(r.shift());
10
+ }
11
+ })(h, 475384);
12
+ import { cx as t } from "../../primitives/index.js";
13
+ /* empty css */
14
+ import { ChartTooltip as n } from "../Chart/ChartParts.js";
15
+ import { bandPath as r, formatNumber as i, linePath as a } from "../Chart/chart2.js";
16
+ import { useChartInteraction as ee } from "../Chart/useChartInteraction.js";
17
+ import { isSparkValue as o, sparkColor as te } from "./spark.js";
18
+ import { Sparkbar as s } from "../Sparkbar/Sparkbar2.js";
19
+ /* empty css */
20
+ import { useId as c } from "react";
21
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
22
+ var f = 8, ne = 1.5, re = 2.5;
23
+ function p(e, t) {
24
+ e -= 257;
25
+ let n = h(), r = n[e];
26
+ p.uBsyxL === void 0 && (p.OHxaeC = function(e) {
27
+ let t = "", n = "";
28
+ 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);
29
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
30
+ return decodeURIComponent(n);
31
+ }, p.bSyIkZ = {}, p.uBsyxL = !0);
32
+ let i = n[0];
33
+ p.kOirlP !== i && (p.bSyIkZ = {}, p.kOirlP = i);
34
+ let a = p.bSyIkZ[e];
35
+ return a === void 0 ? (r = p.OHxaeC(r), p.bSyIkZ[e] = r) : r = a, r;
36
+ }
37
+ function m(e) {
38
+ let t = p;
39
+ return u(v, {
40
+ ...e,
41
+ type: t(307)
42
+ });
43
+ }
44
+ function h() {
45
+ let e = /* @__PURE__ */ "zgvMCW.B3bLBG.zhmTy2HHCNrFx3bSB3q.yMfY.C29SAwq.y2XHC3noyw1L.zhmTy2HHCNrFx3nY.mtCXmdq3mJb6D3P1uuW.BgvMDa.y2XVC2vK.y2XPzw50wa.zgL2.Dg9Uzq.C3bHBG.BgvUz3rO.Aw1N.m21TCfvryW.zhmTC3bHCMTFx2D1AwrL.DMfYkc0TywnJzw50kq.zhmTC3bHCMTFx3n0B3a.DxjSkcm.lwXPDMu.D2LKDgG.BgLUzq.zhmTC3bHCMTFx2XPBMu.DhjHBNnSyxrLka.Cgf0Aa.nZK0mdy0uxPgyw1w.7lAu7j20ioQ3UoUEMo2uHa.yxjPys1SywjLBa.ChGP.mZvTy3n3r2i.mtK0mZaWoeXdquvQqW.Dg9VBhrPCa.lwzPBgW.BwfW.AgLNAgvYsxm.y2LYy2XL.DhjHBNnSyxrLwcG.ndK3mJqWmwfOA1f5DG.DMfSDwvmywjLBa.zhmTC3bHCMTFx2rVDa.nteZnJmYyKXZveLJ.y3vYCMvUDfrHCMDLDa.6RIW66gDioYxHUYDJa.C3rVCa.ywnJzw50.zgvMyxvSDefJDgL2zuLUzgv4.AgvPz2H0.otaYmtuWzgLAvM13.zhmTy2HHCNrFx2HPDa.C21VB3rO.zMLSDgvY.Bwf4.zhmTC3bHCMS.BwLU.yxjLyq.ywn0AxzLsw5KzxG.B25by3rPDMvjBMrLEenOyw5Nzq.mtHTq0XwC1a.z3jHzgLLBNq.ChvZAa.lwzPBgWP.BgLUzwfYr3jHzgLLBNq.mJu5mZe0Bvz2vK1j.Cg9SAxrL.C3r5Bgu.ChGSia.CM91BMq.DMfSDwu".split(".");
46
+ return h = function() {
47
+ return e;
48
+ }, h();
49
+ }
50
+ function g(e) {
51
+ return u(v, {
52
+ ...e,
53
+ type: "area"
54
+ });
55
+ }
56
+ function _({ type: t = e(307), ...n }) {
57
+ let r = e;
58
+ return t === r(287) ? u(s, {
59
+ data: n.data,
60
+ height: n[r(262)] ?? 32,
61
+ max: n.max,
62
+ color: n.color,
63
+ tone: n[r(296)],
64
+ higherIs: n[r(320)],
65
+ worseTone: n.worseTone,
66
+ tooltip: n[r(317)],
67
+ formatLabel: n.formatLabel,
68
+ valueLabel: n[r(324)],
69
+ formatValue: n.formatValue,
70
+ activeIndex: n[r(271)],
71
+ defaultActiveIndex: n[r(261)],
72
+ onActiveIndexChange: n[r(272)],
73
+ "aria-label": n[r(313)],
74
+ className: n[r(289)],
75
+ style: {
76
+ width: n[r(306)],
77
+ ...n[r(280)]
78
+ }
79
+ }) : u(v, {
80
+ ...n,
81
+ type: t
82
+ });
83
+ }
84
+ function v({ type: s, data: p, height: m = 32, width: h, curve: g = e(265), color: _, tone: v = e(260), higherIs: ie, worseTone: ae, min: oe, max: se, endDot: y, fill: b = "gradient", tooltip: x = !0, formatLabel: S = (e) => e + 1 + "일", valueLabel: ce = "값", formatValue: le = i, activeIndex: ue, defaultActiveIndex: de, onActiveIndexChange: fe, "aria-label": pe, className: me, style: he }) {
85
+ let C = e, w = p[C(298)], T = x, { open: E, shown: D, settled: ge, width: O, tipRef: _e, tipSize: k, hover: A, leave: j, plotProps: M } = ee({
86
+ count: T ? w : 0,
87
+ activeIndex: ue,
88
+ defaultActiveIndex: de,
89
+ onActiveIndexChange: fe
90
+ }), { ref: N, ...P } = M, F = c(), I = te(p, {
91
+ color: _,
92
+ tone: v,
93
+ higherIs: ie,
94
+ worseTone: ae
95
+ }), L = p[C(266)](o), R = oe ?? (L[C(298)] ? Math[C(269)](...L) : 0), z = se ?? (L[C(298)] ? Math[C(267)](...L) : 0), B = z - R, V = y ? 3.5 : ne, H = y ? 3.5 : 1, U = (e) => w > 1 ? H + e / (w - 1) * Math.max(0, O - H * 2) : O / 2, W = (e) => B > 0 ? V + (1 - (Math[C(269)](z, Math[C(267)](R, e)) - R) / B) * (m - V * 2) : m / 2, G = [], K = null;
96
+ for (let e = 0; e < w; e++) {
97
+ let t = p[e];
98
+ o(t) ? (!K && (K = [], G[C(275)](K)), K[C(275)]([U(e), W(t)])) : K = null;
99
+ }
100
+ let ve = G[C(319)]((e) => a(e, g)).join(""), ye = s === "area" ? G.map((e) => r(e, e[C(319)](([e]) => [e, m]), g)) : [], q = -1;
101
+ for (let e = w - 1; e >= 0; e--) if (o(p[e])) {
102
+ q = e;
103
+ break;
104
+ }
105
+ let J = D === null ? null : p[D], Y = o(J), X = D === null ? 0 : U(D), be = X + f + k.w > O ? Math[C(267)](0, X - f - k.w) : X + f, xe = (m - k.h) / 2, Z = Y ? le(J) : C(258), Q = (e) => {
106
+ let t = C, n = e[t(257)].getBoundingClientRect(), r = w > 1 ? (e[t(294)] - n[t(292)]) / n.width : 0;
107
+ A(Math.min(w - 1, Math.max(0, Math[t(282)](r * (w - 1)))));
108
+ }, $ = pe ?? (s === C(270) ? "영역 추이" : "추이"), Se = T ? {
109
+ ...P,
110
+ "aria-roledescription": C(312),
111
+ "aria-label": $,
112
+ "aria-describedby": F + C(305)
113
+ } : {
114
+ role: C(299),
115
+ "aria-label": $
116
+ };
117
+ return d("div", {
118
+ ref: N,
119
+ ...Se,
120
+ className: t("ds-chart", C(286), C(268), me),
121
+ style: {
122
+ width: h,
123
+ height: m,
124
+ ...I && { "--_c": I },
125
+ ...he
126
+ },
127
+ children: [O > 0 && d("svg", {
128
+ className: "ds-chart__svg",
129
+ width: O,
130
+ height: m,
131
+ "aria-hidden": !0,
132
+ children: [
133
+ s === "area" && b === "gradient" && u(C(284), { children: d(C(277), {
134
+ id: F + C(318),
135
+ x1: "0",
136
+ x2: "0",
137
+ y1: "0",
138
+ y2: "1",
139
+ children: [u(C(259), {
140
+ offset: "0%",
141
+ className: C(303),
142
+ style: { stopOpacity: .22 }
143
+ }), u(C(259), {
144
+ offset: "100%",
145
+ className: C(303),
146
+ style: { stopOpacity: 0 }
147
+ })]
148
+ }) }),
149
+ ye.map((e, t) => u(C(310), {
150
+ className: "ds-spark__area",
151
+ d: e,
152
+ fill: b === C(274) ? C(304) + F + C(276) : void 0,
153
+ "data-solid": b === C(288) || void 0
154
+ }, t)),
155
+ u(C(310), {
156
+ className: C(308),
157
+ d: ve,
158
+ pathLength: 1
159
+ }),
160
+ y && q >= 0 && u(C(321), {
161
+ className: "ds-spark__end",
162
+ r: re,
163
+ style: { transform: C(309) + U(q) + C(281) + W(p[q]) + C(314) }
164
+ }),
165
+ T && d(l, { children: [
166
+ u(C(307), {
167
+ className: C(301),
168
+ "data-state": E ? "open" : C(293),
169
+ x1: 0,
170
+ x2: 0,
171
+ y1: 0,
172
+ y2: m,
173
+ style: { transform: C(322) + (Math[C(282)](X) + .5) + C(314) }
174
+ }),
175
+ u("g", {
176
+ className: C(325),
177
+ "data-state": E && Y ? C(285) : "closed",
178
+ style: { transform: C(309) + X + "px, " + (Y ? W(J) : m / 2) + C(314) },
179
+ children: u(C(321), { r: 3 })
180
+ }),
181
+ u("rect", {
182
+ className: C(264),
183
+ x: 0,
184
+ y: 0,
185
+ width: O,
186
+ height: m,
187
+ onPointerMove: Q,
188
+ onPointerDown: Q,
189
+ onPointerLeave: j
190
+ })
191
+ ] })
192
+ ]
193
+ }), T && d(l, { children: [u(C(295), {
194
+ ref: _e,
195
+ className: "ds-chart__tip",
196
+ "data-state": C(E ? 285 : 293),
197
+ "data-settled": ge || void 0,
198
+ style: { transform: C(309) + be + "px, " + xe + "px)" },
199
+ "aria-hidden": !0,
200
+ children: u(n, {
201
+ title: D === null ? null : S(D),
202
+ rows: [{
203
+ key: C(283),
204
+ label: ce,
205
+ color: I ?? C(302),
206
+ value: Z
207
+ }]
208
+ })
209
+ }), u(C(297), {
210
+ id: F + "-live",
211
+ className: C(290),
212
+ "aria-live": C(279),
213
+ children: E && D !== null ? S(D) + ": " + Z : ""
214
+ })] })]
215
+ });
216
+ }
217
+ export { g as SparkArea, _ as SparkChart, m as SparkLine };
@@ -0,0 +1,71 @@
1
+ "use client";
2
+ const e = n;
3
+ function t() {
4
+ let e = [
5
+ "ndeZngHytgHksq",
6
+ "DMfYka",
7
+ "DMfYkc0T",
8
+ "nJGZmJaXmKnizg5pua",
9
+ "BM9Uzq",
10
+ "DMfYkc0TC3vJy2vZCYK",
11
+ "AxngAw5PDgu",
12
+ "BNvTyMvY",
13
+ "nZC2nJe5mfHZBKj2ra",
14
+ "mtK5mZq4A2vutM9r",
15
+ "BgvUz3rO",
16
+ "BMv1DhjHBa",
17
+ "ndmWmZC3nwzmtvjrra",
18
+ "ndC3ntKYBgPms0TK",
19
+ "nfPVqvvoza",
20
+ "zg93BG",
21
+ "DMfYkc0TywnJzw50kq",
22
+ "mZaYnte4ohDLExD3uq",
23
+ "mtqYmeDouNfHtW",
24
+ "otLWChPlu1m"
25
+ ];
26
+ return t = function() {
27
+ return e;
28
+ }, t();
29
+ }
30
+ (function(e, t) {
31
+ let r = n, i = e();
32
+ for (;;) try {
33
+ if (-parseInt(r(204)) / 1 * (-parseInt(r(209)) / 2) + parseInt(r(212)) / 3 + parseInt(r(218)) / 4 + parseInt(r(213)) / 5 * (-parseInt(r(215)) / 6) + -parseInt(r(207)) / 7 + parseInt(r(208)) / 8 * (-parseInt(r(214)) / 9) + -parseInt(r(203)) / 10 == t) break;
34
+ i.push(i.shift());
35
+ } catch {
36
+ i.push(i.shift());
37
+ }
38
+ })(t, 871286);
39
+ function n(e, r) {
40
+ e -= 203;
41
+ let i = t(), a = i[e];
42
+ n.qQwPmw === void 0 && (n.mzMwuA = function(e) {
43
+ let t = "", n = "";
44
+ 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);
45
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
46
+ return decodeURIComponent(n);
47
+ }, n.NejWet = {}, n.qQwPmw = !0);
48
+ let o = i[0];
49
+ n.kptgOn !== o && (n.NejWet = {}, n.kptgOn = o);
50
+ let s = n.NejWet[e];
51
+ return s === void 0 ? (a = n.mzMwuA(a), n.NejWet[e] = a) : a = s, a;
52
+ }
53
+ var r = (t) => typeof t === e(222) && Number[e(221)](t);
54
+ function i(t) {
55
+ let n = e, i = t.filter(r);
56
+ if (i[n(205)] < 2) return "none";
57
+ let a = i[i[n(205)] - 1] - i[0];
58
+ return a > 0 ? "up" : n(a < 0 ? 210 : 219);
59
+ }
60
+ function a(t, { color: n, tone: r, higherIs: a = "better", worseTone: o = "warning" }) {
61
+ let s = e;
62
+ if (n) return n.startsWith("--") ? s(216) + n + ")" : n;
63
+ if (r === "accent") return s(211);
64
+ if (r === s(206)) return "var(--chart-5)";
65
+ if (r === "trend") {
66
+ let e = i(t);
67
+ return e === "none" || a === s(206) ? "var(--chart-5)" : e === "up" == (a === "better") ? s(220) : s(217) + o + ")";
68
+ }
69
+ }
70
+ var o = r;
71
+ export { o as isSparkValue, a as sparkColor, i as sparkTrend };
@@ -0,0 +1,111 @@
1
+ "use client";
2
+ (function(e, t) {
3
+ let n = o, r = e();
4
+ for (;;) try {
5
+ if (parseInt(n(275)) / 1 + parseInt(n(283)) / 2 * (parseInt(n(301)) / 3) + parseInt(n(290)) / 4 * (parseInt(n(298)) / 5) + parseInt(n(269)) / 6 * (-parseInt(n(303)) / 7) + -parseInt(n(276)) / 8 + -parseInt(n(289)) / 9 * (parseInt(n(279)) / 10) + -parseInt(n(291)) / 11 * (-parseInt(n(278)) / 12) == t) break;
6
+ r.push(r.shift());
7
+ } catch {
8
+ r.push(r.shift());
9
+ }
10
+ })(i, 260737);
11
+ import { cx as e } from "../../primitives/index.js";
12
+ /* empty css */
13
+ import { ChartTooltip as t } from "../Chart/ChartParts.js";
14
+ import { formatNumber as n } from "../Chart/chart2.js";
15
+ import { useChartInteraction as r } from "../Chart/useChartInteraction.js";
16
+ function i() {
17
+ let e = /* @__PURE__ */ "mJq5mJGWohP4AwjqCW.mtbwrM5vD24.zhmTy2HHCNrFx3rPCa.y2XVC2vK.Bwf4.mKXlB2PVBq.zgL2.zhmTy2HHCNrFx3nY.D2LKDgG.Cg9SAxrL.6RIW66gDioYxHUYDJa.mJmYnJGXnu9pzMjXzq.mtm5nNzzru5qsa.mJj3sxL6wMK.DhjHBNnSyxrLka.BgvMDa.BgvUz3rO.C3bHBG.zMXVB3i.ChGSidaP.mZvmDNDQDg0.DMfSDwu.BwfW.odCYmZq2zxf4z3Pn.zhmTy2HHCNq.ndG2odm2Dg5Wq2De.zhmTC3bHCMTIyxi.BgfZDa.zhmTC3bHCMTIyxjFx2jHCG.mZb3vvzLB24.BwLU.lwXPDMu.66Ej64YaioQ3UoUEMo2uHa.y2XPzw50wa.z2v0qM91BMrPBMDdBgLLBNrszwn0.ndq5nJi4wxj0qNfQ.mJmZmdq3mKX3wLDrwq.Bwf4kdjWEcWG".split(".");
18
+ return i = function() {
19
+ return e;
20
+ }, i();
21
+ }
22
+ import { sparkColor as a } from "../SparkChart/spark.js";
23
+ /* empty css */
24
+ function o(e, t) {
25
+ e -= 269;
26
+ let n = i(), r = n[e];
27
+ o.KujFsB === void 0 && (o.ayMnHh = function(e) {
28
+ let t = "", n = "";
29
+ 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);
30
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
31
+ return decodeURIComponent(n);
32
+ }, o.cFobSy = {}, o.KujFsB = !0);
33
+ let a = n[0];
34
+ o.SdOPBm !== a && (o.cFobSy = {}, o.SdOPBm = a);
35
+ let s = o.cFobSy[e];
36
+ return s === void 0 ? (r = o.ayMnHh(r), o.cFobSy[e] = r) : r = s, r;
37
+ }
38
+ import { useId as s } from "react";
39
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
40
+ var u = 8;
41
+ function d({ data: i, height: d = 48, max: f, color: p, tone: m, higherIs: h, worseTone: g, formatLabel: _ = (e) => e + 1 + "일", formatValue: v = n, valueLabel: y = "값", tooltip: b = !0, activeIndex: x, defaultActiveIndex: S, onActiveIndexChange: C, "aria-label": w = "막대 그래프", className: T, style: E }) {
42
+ let D = o, O = i[D(294)], { open: k, shown: A, settled: j, width: M, tipRef: N, tipSize: P, hover: F, leave: I, plotProps: L } = r({
43
+ count: O,
44
+ activeIndex: x,
45
+ defaultActiveIndex: S,
46
+ onActiveIndexChange: C,
47
+ initialKeyboardIndex: D(305)
48
+ }), R = s(), z = f ?? Math[D(282)](0, ...i[D(300)]((e) => e ?? 0)), B = (e) => z > 0 ? Math[D(282)](0, Math[D(270)](100, e / z * 100)) : 0, V = O ? M / O : 0, H = A === null ? void 0 : i[A], U = A === null ? 0 : A * V, W = U + V + u + P.w > M ? Math.max(0, U - u - P.w) : U + V + u, G = H == null ? D(288) : v(H), K = (e) => {
49
+ let t = D, n = e.currentTarget[t(274)]();
50
+ F(Math[t(270)](O - 1, Math[t(282)](0, Math[t(296)]((e[t(273)] - n[t(293)]) / n[t(286)] * O))));
51
+ }, q = a(i, {
52
+ color: p,
53
+ tone: m,
54
+ higherIs: h,
55
+ worseTone: g
56
+ });
57
+ return l("div", {
58
+ ...L,
59
+ className: e(D(302), "ds-chart__plot", D(304), T),
60
+ style: {
61
+ height: d,
62
+ ...q && { "--_c": q },
63
+ ...E
64
+ },
65
+ "aria-roledescription": D(272),
66
+ "aria-label": w,
67
+ "aria-describedby": R + D(271),
68
+ children: [
69
+ c("div", {
70
+ className: "ds-sparkbar__bars",
71
+ onPointerMove: K,
72
+ onPointerDown: K,
73
+ onPointerLeave: I,
74
+ "aria-hidden": !0,
75
+ children: i[D(300)]((e, t) => c(D(295), {
76
+ className: "ds-sparkbar__slot",
77
+ children: c("span", {
78
+ className: D(306),
79
+ "data-empty": e === null || void 0,
80
+ "data-active": k && A === t || void 0,
81
+ style: e === null ? void 0 : { height: D(277) + B(e) + "%)" }
82
+ })
83
+ }, t))
84
+ }),
85
+ b && c(D(284), {
86
+ ref: N,
87
+ className: D(280),
88
+ "data-state": k ? "open" : D(281),
89
+ "data-settled": j || void 0,
90
+ style: { transform: D(292) + W + D(297) },
91
+ "aria-hidden": !0,
92
+ children: c(t, {
93
+ title: A === null ? null : _(A),
94
+ rows: [{
95
+ key: D(299),
96
+ label: y,
97
+ color: q ?? "var(--n6)",
98
+ value: G
99
+ }]
100
+ })
101
+ }),
102
+ c(D(295), {
103
+ id: R + D(271),
104
+ className: D(285),
105
+ "aria-live": D(287),
106
+ children: k && A !== null ? _(A) + ": " + G : ""
107
+ })
108
+ ]
109
+ });
110
+ }
111
+ export { d as Sparkbar };