@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,69 @@
1
+ "use client";
2
+ function e() {
3
+ let t = /* @__PURE__ */ "y29UDgfPBNm.mKLty1HTtG.CMvTB3zLrxzLBNrmAxn0zw5LCG.Cg9PBNrLCLr5Cgu.Bw91C2u.nJaWmtqZngfLrMfwBa.mJCYmda0ohjZshzPDq.mJa0ntK1nxH2tKDNtW.ywrKrxzLBNrmAxn0zw5LCG.mJe2C1H3Be16.y2XPzw50wa.oti5mZjot3PpDvu.zwXLBwvUDezYB21qB2LUDa.zhjHz1rOCMvZAg9Sza.y2XVC2vZDa.B25szwXLyxnL.Cg9PBNrLCMnHBMnLBa.z2v0qxr0CMLIDxrL.Cg9PBNrLCM1VDMu.zgv0ywLS.ndqXmtz6vu9WvK4.y2XPzw50wq.mZm5EK5ctw5k.Dhj1zq.zgf0yxnLDa.y3vYCMvUDa.odG1odi3mhrxAxPvsW.mJiZntaXtxf6ufvV.CgfUzwXszwy.Cg9PBNrLCNvW".split(".");
4
+ return e = function() {
5
+ return t;
6
+ }, e();
7
+ }
8
+ function t(n, r) {
9
+ n -= 328;
10
+ let i = e(), a = i[n];
11
+ t.MdckOd === void 0 && (t.wNStEI = function(e) {
12
+ let t = "", n = "";
13
+ 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);
14
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
15
+ return decodeURIComponent(n);
16
+ }, t.GaVeiL = {}, t.MdckOd = !0);
17
+ let o = i[0];
18
+ t.HoPAqV !== o && (t.GaVeiL = {}, t.HoPAqV = o);
19
+ let s = t.GaVeiL[n];
20
+ return s === void 0 ? (a = t.wNStEI(a), t.GaVeiL[n] = a) : a = s, a;
21
+ }
22
+ (function(e, n) {
23
+ let r = t, i = e();
24
+ for (;;) try {
25
+ if (parseInt(r(352)) / 1 * (-parseInt(r(356)) / 2) + parseInt(r(347)) / 3 * (parseInt(r(345)) / 4) + parseInt(r(332)) / 5 + -parseInt(r(334)) / 6 * (-parseInt(r(336)) / 7) + parseInt(r(331)) / 8 + -parseInt(r(330)) / 9 + -parseInt(r(351)) / 10 == n) break;
26
+ i.push(i.shift());
27
+ } catch {
28
+ i.push(i.shift());
29
+ }
30
+ })(e, 697256);
31
+ import { TIMING as n } from "./timing.js";
32
+ import { useEffect as r, useRef as i } from "react";
33
+ function a({ open: e, onOpen: a, onClose: o, panelRef: s, onRelease: c, disabled: l }) {
34
+ let u = i(""), d = i({
35
+ panelRef: s,
36
+ onRelease: c
37
+ });
38
+ return r(() => {
39
+ d.current = {
40
+ panelRef: s,
41
+ onRelease: c
42
+ };
43
+ }), {
44
+ onPointerDown: (r) => {
45
+ let i = t;
46
+ if (u[i(350)] = r[i(328)], l || r.pointerType !== i(329) || r.button !== 0) return;
47
+ if (e) return o();
48
+ a();
49
+ let s = {
50
+ x: r[i(335)],
51
+ y: r[i(346)]
52
+ }, c = !1, f = (e) => {
53
+ let t = i;
54
+ Math.hypot(e[t(335)] - s.x, e[t(346)] - s.y) > n[t(338)] && (c = !0);
55
+ }, p = (e) => {
56
+ let t = i;
57
+ if (document[t(357)](t(343), f), document[t(357)](t(354), p), document[t(357)](t(341), p), !c || e.type === t(341)) return;
58
+ let n = document[t(337)](e.clientX, e.clientY)?.[t(339)]("[role=\"option\"][data-index]");
59
+ n && d[t(350)][t(353)].current?.[t(355)](n) && n[t(342)]("aria-disabled") !== t(348) && d[t(350)][t(340)](Number(n[t(349)].index));
60
+ };
61
+ document[i(333)](i(343), f), document[i(333)]("pointerup", p), document[i(333)](i(341), p);
62
+ },
63
+ onClick: (n) => {
64
+ let r = t;
65
+ (n[r(344)] === 0 || u.current !== r(329)) && (e ? o() : a());
66
+ }
67
+ };
68
+ }
69
+ export { a as usePressToOpen };
@@ -0,0 +1,70 @@
1
+ "use client";
2
+ (function(t, n) {
3
+ for (var r = e, i = t();;) try {
4
+ if (-parseInt(r(399)) / 1 * (parseInt(r(388)) / 2) + -parseInt(r(401)) / 3 * (-parseInt(r(386)) / 4) + parseInt(r(398)) / 5 + parseInt(r(402)) / 6 + parseInt(r(396)) / 7 + -parseInt(r(387)) / 8 + -parseInt(r(392)) / 9 == n) break;
5
+ i.push(i.shift());
6
+ } catch {
7
+ i.push(i.shift());
8
+ }
9
+ })(n, 440816);
10
+ function e(t, r) {
11
+ t -= 386;
12
+ var i = n(), a = i[t];
13
+ e.vOJoMS === void 0 && (e.nkECXT = function(e) {
14
+ 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);
15
+ for (var c = 0, l = n.length; c < l; c++) r += "%" + ("00" + n.charCodeAt(c).toString(16)).slice(-2);
16
+ return decodeURIComponent(r);
17
+ }, e.otZfyZ = {}, e.vOJoMS = !0);
18
+ var o = i[0];
19
+ e.CCTQXU !== o && (e.otZfyZ = {}, e.CCTQXU = o);
20
+ var s = e.otZfyZ[t];
21
+ return s === void 0 ? (a = e.nkECXT(a), e.otZfyZ[t] = a) : a = s, a;
22
+ }
23
+ import { useEffect as t } from "react";
24
+ function n() {
25
+ var e = [
26
+ "ndy0nduZnK5lCejdta",
27
+ "nJmZotqYufbSDLjr",
28
+ "zg9JDw1LBNrfBgvTzw50",
29
+ "yM9KEq",
30
+ "Aw5UzxjxAwr0Aa",
31
+ "mZy0mJm5mgTLDNnKDG",
32
+ "y2XPzw50v2LKDgG",
33
+ "CgfKzgLUz1jPz2H0",
34
+ "B3zLCMzSB3C",
35
+ "mJC5odC4ouTYt1jSza",
36
+ "AgLKzgvU",
37
+ "ntu1nZqWEez5zNHq",
38
+ "mxzZBwz3zW",
39
+ "C3r5Bgu",
40
+ "mJrhCxDfshm",
41
+ "mZKYmde2nM1TuMHeyq",
42
+ "mJG5mZy0DMnirwTR"
43
+ ];
44
+ return n = function() {
45
+ return e;
46
+ }, n();
47
+ }
48
+ var r = 0, i = {
49
+ overflow: "",
50
+ paddingRight: ""
51
+ };
52
+ function a(n) {
53
+ t(() => {
54
+ var t = e;
55
+ if (!n) return;
56
+ let a = document[t(390)];
57
+ if (r++ === 0) {
58
+ let e = window[t(391)] - document[t(389)][t(393)];
59
+ i = {
60
+ overflow: a[t(400)].overflow,
61
+ paddingRight: a[t(400)][t(394)]
62
+ }, a[t(400)][t(395)] = t(397), e > 0 && (a[t(400)][t(394)] = e + "px");
63
+ }
64
+ return () => {
65
+ var e = t;
66
+ --r === 0 && (a.style[e(395)] = i[e(395)], a[e(400)][e(394)] = i[e(394)]);
67
+ };
68
+ }, [n]);
69
+ }
70
+ export { a as useScrollLock };
@@ -0,0 +1,68 @@
1
+ "use client";
2
+ function e(t, n) {
3
+ t -= 254;
4
+ let r = a(), i = r[t];
5
+ e.UEBaFU === void 0 && (e.GUAoUg = function(e) {
6
+ let t = "", n = "";
7
+ 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);
8
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
9
+ return decodeURIComponent(n);
10
+ }, e.XjdCBb = {}, e.UEBaFU = !0);
11
+ let o = r[0];
12
+ e.IeBRrT !== o && (e.XjdCBb = {}, e.IeBRrT = o);
13
+ let s = e.XjdCBb[t];
14
+ return s === void 0 ? (i = e.GUAoUg(i), e.XjdCBb[t] = i) : i = s, i;
15
+ }
16
+ const t = e;
17
+ (function(t, n) {
18
+ let r = e, i = t();
19
+ for (;;) try {
20
+ if (-parseInt(r(257)) / 1 + -parseInt(r(267)) / 2 + parseInt(r(259)) / 3 * (-parseInt(r(265)) / 4) + parseInt(r(258)) / 5 + -parseInt(r(262)) / 6 + -parseInt(r(261)) / 7 + parseInt(r(264)) / 8 == n) break;
21
+ i.push(i.shift());
22
+ } catch {
23
+ i.push(i.shift());
24
+ }
25
+ })(a, 794245);
26
+ import { useControllableState as n } from "./useControllableState.js";
27
+ var r = (e) => e === void 0 ? void 0 : Array[t(255)](e) ? e : e === null ? [] : [e];
28
+ function i(e) {
29
+ let i = t, a = e[i(266)] === i(269), [o, s] = n(r(e[i(254)]), r(e[i(256)]) ?? [], (t) => {
30
+ let n = i;
31
+ e[n(266)] === n(269) ? e.onValueChange?.(t) : e.onValueChange?.(t[0] ?? null);
32
+ }), c = (e) => o[i(268)](e);
33
+ return {
34
+ selected: o,
35
+ setSelected: s,
36
+ isSelected: c,
37
+ toggle: (t) => {
38
+ let n = i;
39
+ a ? s(c(t) ? o[n(263)]((e) => e !== t) : [...o, t]) : c(t) ? e[n(260)] || s([]) : s([t]);
40
+ },
41
+ clear: () => s([]),
42
+ multiple: a
43
+ };
44
+ }
45
+ function a() {
46
+ let e = [
47
+ "DMfSDwu",
48
+ "AxnbCNjHEq",
49
+ "zgvMyxvSDfzHBhvL",
50
+ "ndeYntiZq0zdwgDZ",
51
+ "nJm2ndyYmgPNqu9Jyq",
52
+ "mJe1mZu1whrZCgz2",
53
+ "CMvXDwLYzwq",
54
+ "mtuXmdu0ngjqwufbAa",
55
+ "mJa4odC4Afn3AhnJ",
56
+ "zMLSDgvY",
57
+ "mtCXoty0nZjPqLvdBMe",
58
+ "nJHxrfnPwwC",
59
+ "DhLWzq",
60
+ "mtq4otuZmffnBfn5Eq",
61
+ "Aw5JBhvKzxm",
62
+ "BxvSDgLWBgu"
63
+ ];
64
+ return a = function() {
65
+ return e;
66
+ }, a();
67
+ }
68
+ export { i as useSelection };