@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,70 @@
1
+ "use client";
2
+ (function(e, t) {
3
+ let n = a, r = e();
4
+ for (;;) try {
5
+ if (-parseInt(n(404)) / 1 + -parseInt(n(402)) / 2 + -parseInt(n(394)) / 3 + parseInt(n(403)) / 4 + -parseInt(n(390)) / 5 * (-parseInt(n(405)) / 6) + -parseInt(n(392)) / 7 + parseInt(n(387)) / 8 == t) break;
6
+ r.push(r.shift());
7
+ } catch {
8
+ r.push(r.shift());
9
+ }
10
+ })(r, 145077);
11
+ import { TIMING as e } from "./timing.js";
12
+ import { useEffect as t, useRef as n } from "react";
13
+ function r() {
14
+ let e = /* @__PURE__ */ "y2XPzw50wq.zhjHz1rOCMvZAg9Sza.Cg9PBNrLCM1VDMu.z2v0qxr0CMLIDxrL.AhLWB3q.y3vYCMvUDa.Aw5KzxG.zgv0ywLS.y2XPzw50wa.Cg9PBNrLCLr5Cgu.Bw91C2u.y29UDgfPBNm.ywrKrxzLBNrmAxn0zw5LCG.mZK0mdu3nNzWs2nqCW.DhLWzq.CMvTB3zLrxzLBNrmAxn0zw5LCG.ode0ote1u3HzzLDO.y2XVC2vZDa.mtiXnJy2m0PvALH1DG.Cg9PBNrLCNvW.ntiZndC5C1PnBNPr.zwXLBwvUDezYB21qB2LUDa.Dhj1zq.B25szwXLyxnL.w3jVBgu9iM9WDgLVBIjDw2rHDgeTAw5KzxHD.yNv0Dg9U.Cg9PBNrLCMnHBMnLBa.yxjPys1KAxnHyMXLza.nteWmdy4uLn5Chvy.odK0mZGWq2XOvfHm.mtmWnZm3wfbet1fh.nM5JweHcvq".split(".");
15
+ return r = function() {
16
+ return e;
17
+ }, r();
18
+ }
19
+ function i({ open: r, onOpen: i, onClose: o, panelRef: s, onRelease: c, disabled: l }) {
20
+ let u = n(""), d = n({
21
+ panelRef: s,
22
+ onRelease: c
23
+ });
24
+ return t(() => {
25
+ let e = a;
26
+ d[e(411)] = {
27
+ panelRef: s,
28
+ onRelease: c
29
+ };
30
+ }), {
31
+ onPointerDown: (t) => {
32
+ let n = a;
33
+ if (u[n(411)] = t[n(383)], l || t[n(383)] !== n(384) || t[n(399)] !== 0) return;
34
+ if (r) return o();
35
+ i();
36
+ let s = {
37
+ x: t[n(382)],
38
+ y: t[n(406)]
39
+ }, c = !1, f = (t) => {
40
+ let r = n;
41
+ Math[r(410)](t[r(382)] - s.x, t[r(406)] - s.y) > e[r(407)] && (c = !0);
42
+ }, p = (e) => {
43
+ let t = n;
44
+ if (document[t(389)](t(408), f), document[t(389)](t(393), p), document[t(389)](t(400), p), !c || e[t(388)] === t(400)) return;
45
+ let r = document[t(395)](e[t(382)], e[t(406)])?.[t(391)](t(398));
46
+ r && d.current.panelRef[t(411)]?.[t(385)](r) && r[t(409)](t(401)) !== t(396) && d[t(411)][t(397)](Number(r.dataset[t(412)]));
47
+ };
48
+ document[n(386)](n(408), f), document[n(386)](n(393), p), document[n(386)]("pointercancel", p);
49
+ },
50
+ onClick: (e) => {
51
+ let t = a;
52
+ (e[t(413)] === 0 || u[t(411)] !== t(384)) && (r ? o() : i());
53
+ }
54
+ };
55
+ }
56
+ function a(e, t) {
57
+ e -= 382;
58
+ let n = r(), i = n[e];
59
+ a.TkrWgw === void 0 && (a.XEdUhX = function(e) {
60
+ let t = "", n = "";
61
+ 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);
62
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
63
+ return decodeURIComponent(n);
64
+ }, a.SXNRWg = {}, a.TkrWgw = !0);
65
+ let o = n[0];
66
+ a.Izmfcs !== o && (a.SXNRWg = {}, a.Izmfcs = o);
67
+ let s = a.SXNRWg[e];
68
+ return s === void 0 ? (i = a.XEdUhX(i), a.SXNRWg[e] = i) : i = s, i;
69
+ }
70
+ export { i as usePressToOpen };
@@ -0,0 +1,71 @@
1
+ "use client";
2
+ (function(e, n) {
3
+ for (var r = t, i = e();;) try {
4
+ if (parseInt(r(178)) / 1 * (parseInt(r(176)) / 2) + -parseInt(r(190)) / 3 + parseInt(r(180)) / 4 * (parseInt(r(185)) / 5) + -parseInt(r(179)) / 6 * (-parseInt(r(188)) / 7) + -parseInt(r(181)) / 8 + parseInt(r(189)) / 9 + -parseInt(r(175)) / 10 == n) break;
5
+ i.push(i.shift());
6
+ } catch {
7
+ i.push(i.shift());
8
+ }
9
+ })(e, 477774);
10
+ function e() {
11
+ var t = [
12
+ "mtu4mZm1mgP2ywr6Ba",
13
+ "C3r5Bgu",
14
+ "mxnNz3Lurq",
15
+ "mZbvENb0A2G",
16
+ "nZzxqNjcAhy",
17
+ "mJq1mdq0mfjgBgjxwq",
18
+ "yM9KEq",
19
+ "AgLKzgvU",
20
+ "Aw5UzxjxAwr0Aa",
21
+ "nJa2ntbpvfvQqLO",
22
+ "y2XPzw50v2LKDgG",
23
+ "B3zLCMzSB3C",
24
+ "nJe5oteZCvr5zffd",
25
+ "nJu5mJK5nwr5vM1AEq",
26
+ "nZy2mJmZv0fmtwDk",
27
+ "CgfKzgLUz1jPz2H0",
28
+ "zg9JDw1LBNrfBgvTzw50",
29
+ "mte1odaWntbyz0TqzwG"
30
+ ];
31
+ return e = function() {
32
+ return t;
33
+ }, e();
34
+ }
35
+ function t(n, r) {
36
+ n -= 174;
37
+ var i = e(), a = i[n];
38
+ t.bTCgVH === void 0 && (t.UYasjV = function(e) {
39
+ 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);
40
+ for (var c = 0, l = n.length; c < l; c++) r += "%" + ("00" + n.charCodeAt(c).toString(16)).slice(-2);
41
+ return decodeURIComponent(r);
42
+ }, t.qklqHo = {}, t.bTCgVH = !0);
43
+ var o = i[0];
44
+ t.wtgIZC !== o && (t.qklqHo = {}, t.wtgIZC = o);
45
+ var s = t.qklqHo[n];
46
+ return s === void 0 ? (a = t.UYasjV(a), t.qklqHo[n] = a) : a = s, a;
47
+ }
48
+ import { useEffect as n } from "react";
49
+ var r = 0, i = {
50
+ overflow: "",
51
+ paddingRight: ""
52
+ };
53
+ function a(e) {
54
+ n(() => {
55
+ var n = t;
56
+ if (!e) return;
57
+ let a = document[n(182)];
58
+ if (r++ === 0) {
59
+ let e = window[n(184)] - document[n(174)][n(186)];
60
+ i = {
61
+ overflow: a[n(177)][n(187)],
62
+ paddingRight: a.style[n(191)]
63
+ }, a[n(177)][n(187)] = n(183), e > 0 && (a[n(177)].paddingRight = e + "px");
64
+ }
65
+ return () => {
66
+ var e = n;
67
+ --r === 0 && (a[e(177)].overflow = i[e(187)], a.style.paddingRight = i.paddingRight);
68
+ };
69
+ }, [e]);
70
+ }
71
+ export { a as useScrollLock };
@@ -0,0 +1,65 @@
1
+ "use client";
2
+ const e = t;
3
+ (function(e, n) {
4
+ let r = t, i = e();
5
+ for (;;) try {
6
+ if (parseInt(r(401)) / 1 + -parseInt(r(394)) / 2 + -parseInt(r(402)) / 3 + parseInt(r(393)) / 4 + -parseInt(r(404)) / 5 + parseInt(r(405)) / 6 + parseInt(r(398)) / 7 == n) break;
7
+ i.push(i.shift());
8
+ } catch {
9
+ i.push(i.shift());
10
+ }
11
+ })(a, 714941);
12
+ function t(e, n) {
13
+ e -= 393;
14
+ let r = a(), i = r[e];
15
+ t.HQFUBe === void 0 && (t.bRPuiN = 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.QshNve = {}, t.HQFUBe = !0);
21
+ let o = r[0];
22
+ t.QubiUU !== o && (t.QshNve = {}, t.QubiUU = o);
23
+ let s = t.QshNve[e];
24
+ return s === void 0 ? (i = t.bRPuiN(i), t.QshNve[e] = i) : i = s, i;
25
+ }
26
+ import { useControllableState as n } from "./useControllableState.js";
27
+ var r = (t) => t === void 0 ? void 0 : Array[e(400)](t) ? t : t === null ? [] : [t];
28
+ function i(t) {
29
+ let i = e, a = t[i(397)] === "multiple", [o, s] = n(r(t[i(396)]), r(t.defaultValue) ?? [], (e) => {
30
+ let n = i;
31
+ t[n(397)] === "multiple" ? t.onValueChange?.(e) : t[n(403)]?.(e[0] ?? null);
32
+ }), c = (e) => o[i(395)](e);
33
+ return {
34
+ selected: o,
35
+ setSelected: s,
36
+ isSelected: c,
37
+ toggle: (e) => {
38
+ let n = i;
39
+ a ? s(c(e) ? o.filter((t) => t !== e) : [...o, e]) : c(e) ? t[n(399)] || s([]) : s([e]);
40
+ },
41
+ clear: () => s([]),
42
+ multiple: a
43
+ };
44
+ }
45
+ export { i as useSelection };
46
+ function a() {
47
+ let e = [
48
+ "mZyXntm0nwXIBMrzrW",
49
+ "B25wywX1zunOyw5Nzq",
50
+ "ndq0nJu5mgfvqK5Jta",
51
+ "mZeWmJm5nLPSuMT4yW",
52
+ "mtKXmdm1mKPXq2vSua",
53
+ "mJy4ntuYmhHNA3PVsG",
54
+ "Aw5JBhvKzxm",
55
+ "DMfSDwu",
56
+ "DhLWzq",
57
+ "mty5ntGXmtz3CvHcBNK",
58
+ "CMvXDwLYzwq",
59
+ "AxnbCNjHEq",
60
+ "nZm0odKYsgP1Cvzn"
61
+ ];
62
+ return a = function() {
63
+ return e;
64
+ }, a();
65
+ }