@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,154 @@
1
+ "use client";
2
+ const e = n;
3
+ function t() {
4
+ let e = /* @__PURE__ */ "zhmTz3jPzc1Tzw51x19Zzxa.ndG0mJrxDNvkq2S.zgLZywjSzwq.B3bLBG.Aw5WDxqSihrLEhrHCMvHlcbZzwXLy3q.odu3mJyZyLL5Du5Z.zhmTB3b0Aw9Ux19JAgvJAW.C3rHCNq.rw5K.zhmTz3jPzc1Tzw51x19JAgv2CM9U.zhmTB3b0Aw9UigrZlwDYAwqTBwvUDv9FAxrLBq.ChjLC2vUDgf0Aw9U.CxvLCNLtzwXLy3rVCG.zhmTB3b0Aw9Ux19Py29U.A2v5zg93BG.B25tzwXLy3q.w2rHDgeTywn0AxzLxq.zM9JDxm.oxbPvfrJyq.y29UDgfPBNm.y2HLy2TLza.mtu0zeTpuLf0.zgLHBg9N.zhmTz3jPzc1WB3a.DgfYz2v0.zhmTBgLZDgjVEf9Fz3jVDxa.y3vYCMvUDa.BMf0AxzLrxzLBNq.mZy4nJK0q01mru1T.AgvHzgLUzW.ChjLDMvUDerLzMf1Bhq.C2vWyxjHDg9Y.A2v5.ndq1ntiXmezvy3zVvG.BwfW.sg9Tzq.mZK3mdi3neXqre10yW.qxjYB3DeB3DU.BgvUz3rO.otzYvM5rCuO.CxvLCNLtzwXLy3rVCKfSBa.mvLAB3nKuW.ywn0AxzLrwXLBwvUDa.lMrZlwDYAwqTCg9W.zhmTz3jPzc1Tzw51x19OAw50.zhmTC2nYB2XS.AxndB21WB3nPBMC.mta1nZa0zNvRwMLh.y2XVC2vZDa.AwnVBG.zMLSDgvY.mtnrChfir2i.C3bHBG.oxvhB1vTwq.BwvUDwL0zw1JAgvJA2jVEa.zhmTB3b0Aw9Ux190zxH0.zhmTz3jPzc1Tzw51.BgfIzwW.AgLUDa.CMvTB3zLrxzLBNrmAxn0zw5LCG.yM9KEq.C2vWlq.zgL2.qxjYB3DvCa.C2vSzwn0.mtyYC3HpDufO.mteWnJy1DxPVDerk".split(".");
5
+ return t = function() {
6
+ return e;
7
+ }, t();
8
+ }
9
+ function n(e, r) {
10
+ e -= 312;
11
+ let i = t(), a = i[e];
12
+ n.mTtNFb === void 0 && (n.haFPYO = function(e) {
13
+ let t = "", n = "";
14
+ 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);
15
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
16
+ return decodeURIComponent(n);
17
+ }, n.CZfIBL = {}, n.mTtNFb = !0);
18
+ let o = i[0];
19
+ n.EjytaH !== o && (n.CZfIBL = {}, n.EjytaH = o);
20
+ let s = n.CZfIBL[e];
21
+ return s === void 0 ? (a = n.haFPYO(a), n.CZfIBL[e] = a) : a = s, a;
22
+ }
23
+ (function(e, t) {
24
+ let r = n, i = e();
25
+ for (;;) try {
26
+ if (-parseInt(r(354)) / 1 * (parseInt(r(341)) / 2) + -parseInt(r(331)) / 3 * (-parseInt(r(314)) / 4) + parseInt(r(312)) / 5 * (-parseInt(r(378)) / 6) + -parseInt(r(334)) / 7 * (-parseInt(r(360)) / 8) + -parseInt(r(366)) / 9 * (-parseInt(r(346)) / 10) + -parseInt(r(318)) / 11 * (-parseInt(r(352)) / 12) + -parseInt(r(364)) / 13 * (parseInt(r(349)) / 14) == t) break;
27
+ i.push(i.shift());
28
+ } catch {
29
+ i.push(i.shift());
30
+ }
31
+ })(t, 330460);
32
+ import { cx as r } from "../../primitives/index.js";
33
+ import { useFloating as i } from "../../hooks/useFloating.js";
34
+ import { useDismiss as a } from "../../hooks/useDismiss.js";
35
+ import { useEffect as o, useRef as s, useState as c } from "react";
36
+ import { Check as l, ChevronRight as u } from "lucide-react";
37
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
38
+ import { createPortal as p } from "react-dom";
39
+ function m({ anchor: t, closing: c, onClose: l, align: u = e(320), width: f, maxHeight: m = 420, initialFocus: h, className: g, keepFocus: _, label: v, children: y }) {
40
+ let b = e, x = s(null), { style: S, side: C } = i(t, !0, {
41
+ matchWidth: !1,
42
+ align: u,
43
+ panelRef: x,
44
+ maxHeight: m
45
+ });
46
+ a(!c, [x, t], l);
47
+ let w = S.visibility !== "hidden";
48
+ return o(() => {
49
+ let e = n, t = x[e(339)];
50
+ if (!w || c || !h || !t || t[e(332)](document[e(355)])) return;
51
+ let r = t[e(353)]("input:not([type=checkbox]):not([readonly])"), i = h === "panel" ? t : h === "input" ? r[0] : r[r.length - 1];
52
+ i?.[e(330)]({ preventScroll: !0 }), i instanceof HTMLInputElement && i[e(377)]();
53
+ }, [
54
+ w,
55
+ c,
56
+ h
57
+ ]), p(d(b(375), {
58
+ ref: x,
59
+ role: b(335),
60
+ "aria-label": v,
61
+ tabIndex: -1,
62
+ className: r("ds-popover", b(358), b(336), g),
63
+ "data-side": C,
64
+ "data-state": c ? "closed" : b(316),
65
+ style: {
66
+ ...S,
67
+ width: f
68
+ },
69
+ onPointerDown: _ ? (e) => e[b(337)][b(361)](b(317)) || e[b(343)]() : void 0,
70
+ onKeyDown: (e) => {
71
+ let t = b;
72
+ e[t(345)] === "Escape" && !e[t(340)][t(359)] && (e.stopPropagation(), l());
73
+ },
74
+ children: y
75
+ }), document[b(373)]);
76
+ }
77
+ function h({ items: t, className: n }) {
78
+ let i = e, a = t[i(363)]((e) => typeof e == "object" && i(345) in e), [p, m] = c(-1), h = s(null), g = (e) => {
79
+ let t = i, n = a[t(351)], r = p;
80
+ for (let i = 0; i < n && (r = ((r + e) % n + n) % n, a[r][t(315)]); i++);
81
+ m(r);
82
+ }, _ = (e) => {
83
+ let t = i;
84
+ if (!e.target[t(361)]("input, textarea")) {
85
+ if (e[t(345)] === t(350)) g(1);
86
+ else if (e.key === t(376)) g(-1);
87
+ else if (e.key === t(348)) m(0);
88
+ else if (e[t(345)] === t(321)) m(a[t(351)] - 1);
89
+ else if ((e[t(345)] === "Enter" || e[t(345)] === " ") && a[p] && !a[p].disabled) a[p][t(328)]();
90
+ else return;
91
+ e[t(343)]();
92
+ }
93
+ };
94
+ o(() => {
95
+ let e = i, t = h[e(339)]?.[e(361)](e(356));
96
+ if (!t) return;
97
+ let n = (e) => _(e);
98
+ return t.addEventListener(e(327), n), () => t[e(372)]("keydown", n);
99
+ }), o(() => {
100
+ let e = i;
101
+ h.current?.[e(325)](e(329))?.scrollIntoView({ block: "nearest" });
102
+ }, [p]);
103
+ let v = -1;
104
+ return d(i(375), {
105
+ ref: h,
106
+ role: "menu",
107
+ className: r(i(369), n),
108
+ children: t[i(347)]((e, t) => {
109
+ let n = i;
110
+ if (e === n(344)) return d(n(375), {
111
+ role: n(344),
112
+ className: n(313)
113
+ }, n(374) + t);
114
+ if (n(342) in e) return d(n(375), {
115
+ className: n(338),
116
+ role: n(324),
117
+ children: e[n(342)]
118
+ }, "h-" + e[n(342)]);
119
+ v++;
120
+ let r = v;
121
+ return f("div", {
122
+ role: e[n(333)] == null ? "menuitem" : n(367),
123
+ "aria-checked": e[n(333)],
124
+ "aria-disabled": e[n(315)] || void 0,
125
+ "data-active": r === p || void 0,
126
+ "data-danger": e.danger || void 0,
127
+ className: n(323),
128
+ onPointerMove: () => !e[n(315)] && r !== p && m(r),
129
+ onPointerLeave: () => m(-1),
130
+ onClick: () => !e.disabled && e[n(328)](),
131
+ children: [
132
+ e.icon && d("span", {
133
+ className: n(326),
134
+ children: e[n(362)]
135
+ }),
136
+ d(n(365), {
137
+ className: n(368),
138
+ children: d(n(365), {
139
+ className: "ds-option__label",
140
+ children: e[n(370)]
141
+ })
142
+ }),
143
+ e[n(371)] != null && d(n(365), {
144
+ className: n(357),
145
+ children: e[n(371)]
146
+ }),
147
+ e[n(333)] && d(l, { className: n(319) }),
148
+ e.submenu && d(u, { className: n(322) })
149
+ ]
150
+ }, e[n(345)]);
151
+ })
152
+ });
153
+ }
154
+ export { m as GridPopover, h as Menu };
@@ -0,0 +1,50 @@
1
+ "use client";
2
+ function e(t, n) {
3
+ t -= 267;
4
+ var i = r(), a = i[t];
5
+ e.acrcBN === void 0 && (e.VmJxzx = function(e) {
6
+ 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);
7
+ for (var c = 0, l = n.length; c < l; c++) r += "%" + ("00" + n.charCodeAt(c).toString(16)).slice(-2);
8
+ return decodeURIComponent(r);
9
+ }, e.YGAZaH = {}, e.acrcBN = !0);
10
+ var o = i[0];
11
+ e.MEjiJu !== o && (e.YGAZaH = {}, e.MEjiJu = o);
12
+ var s = e.YGAZaH[t];
13
+ return s === void 0 ? (a = e.VmJxzx(a), e.YGAZaH[t] = a) : a = s, a;
14
+ }
15
+ (function(t, n) {
16
+ for (var r = e, i = t();;) try {
17
+ if (-parseInt(r(268)) / 1 * (-parseInt(r(275)) / 2) + parseInt(r(276)) / 3 * (parseInt(r(270)) / 4) + -parseInt(r(269)) / 5 + -parseInt(r(274)) / 6 + -parseInt(r(273)) / 7 * (-parseInt(r(267)) / 8) + parseInt(r(271)) / 9 + parseInt(r(272)) / 10 * (parseInt(r(277)) / 11) == n) break;
18
+ i.push(i.shift());
19
+ } catch {
20
+ i.push(i.shift());
21
+ }
22
+ })(r, 503861);
23
+ function t(e, t) {
24
+ return { current: {
25
+ getBoundingClientRect: () => new DOMRect(e, t, 0, 0),
26
+ contains: () => !1
27
+ } };
28
+ }
29
+ function n(e) {
30
+ return { current: e };
31
+ }
32
+ function r() {
33
+ var e = [
34
+ "ota1nJK5qu1jCKvq",
35
+ "ndGZotGYnujwuuf5tG",
36
+ "nJuYsLbLBfzf",
37
+ "nJKZntaYmKHkz2Dhtq",
38
+ "ody5ntblDKvRBwO",
39
+ "nZq5D0zPu2DY",
40
+ "mZKXndKYoff3zefJsa",
41
+ "mKLMANzssG",
42
+ "mJu1ou1Ms2Heza",
43
+ "mJuZqxvXz1PX",
44
+ "ode1mKX6Ahr2EG"
45
+ ];
46
+ return r = function() {
47
+ return e;
48
+ }, r();
49
+ }
50
+ export { n as elementAnchor, t as pointAnchor };