@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,154 @@
1
+ "use client";
2
+ const e = d;
3
+ (function(e, t) {
4
+ let n = d, r = e();
5
+ for (;;) try {
6
+ if (-parseInt(n(275)) / 1 + -parseInt(n(341)) / 2 * (-parseInt(n(321)) / 3) + -parseInt(n(286)) / 4 * (-parseInt(n(310)) / 5) + -parseInt(n(318)) / 6 + -parseInt(n(322)) / 7 + -parseInt(n(296)) / 8 * (-parseInt(n(305)) / 9) + parseInt(n(280)) / 10 == t) break;
7
+ r.push(r.shift());
8
+ } catch {
9
+ r.push(r.shift());
10
+ }
11
+ })(h, 322648);
12
+ import { cx as t } from "../../primitives/index.js";
13
+ import { useFloating as n } from "../../hooks/useFloating.js";
14
+ import { useDismiss as r } from "../../hooks/useDismiss.js";
15
+ import { useEffect as i, useRef as a, useState as o } from "react";
16
+ import { Check as s, ChevronRight as c } from "lucide-react";
17
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
18
+ function d(e, t) {
19
+ e -= 274;
20
+ let n = h(), r = n[e];
21
+ d.LuSGsB === void 0 && (d.yniOiW = function(e) {
22
+ let t = "", n = "";
23
+ 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);
24
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
25
+ return decodeURIComponent(n);
26
+ }, d.IfMfEo = {}, d.LuSGsB = !0);
27
+ let i = n[0];
28
+ d.KjvQDN !== i && (d.IfMfEo = {}, d.KjvQDN = i);
29
+ let a = d.IfMfEo[e];
30
+ return a === void 0 ? (r = d.yniOiW(r), d.IfMfEo[e] = r) : r = a, r;
31
+ }
32
+ import { createPortal as f } from "react-dom";
33
+ function p({ anchor: o, closing: s, onClose: c, align: u = e(304), width: d, maxHeight: p = 420, initialFocus: m, className: h, keepFocus: g, label: _, children: v }) {
34
+ let y = e, b = a(null), { style: x, side: S } = n(o, !0, {
35
+ matchWidth: !1,
36
+ align: u,
37
+ panelRef: b,
38
+ maxHeight: p
39
+ });
40
+ r(!s, [b, o], c);
41
+ let C = x[y(303)] !== y(285);
42
+ return i(() => {
43
+ let e = y, t = b[e(288)];
44
+ if (!C || s || !m || !t || t[e(337)](document.activeElement)) return;
45
+ let n = t[e(289)](e(283)), r = m === e(314) ? t : m === "input" ? n[0] : n[n[e(290)] - 1];
46
+ r?.focus({ preventScroll: !0 }), r instanceof HTMLInputElement && r[e(300)]();
47
+ }, [
48
+ C,
49
+ s,
50
+ m
51
+ ]), f(l(y(339), {
52
+ ref: b,
53
+ role: y(293),
54
+ "aria-label": _,
55
+ tabIndex: -1,
56
+ className: t(y(342), y(309), y(306), h),
57
+ "data-side": S,
58
+ "data-state": s ? y(287) : "open",
59
+ style: {
60
+ ...x,
61
+ width: d
62
+ },
63
+ onPointerDown: g ? (e) => e[y(338)][y(295)](y(292)) || e[y(298)]() : void 0,
64
+ onKeyDown: (e) => {
65
+ let t = y;
66
+ e[t(308)] === "Escape" && !e[t(326)][t(277)] && (e[t(336)](), c());
67
+ },
68
+ children: v
69
+ }), document.body);
70
+ }
71
+ function m({ items: n, className: r }) {
72
+ let d = e, f = n[d(325)]((e) => typeof e === d(319) && "key" in e), [p, m] = o(-1), h = a(null), g = (e) => {
73
+ let t = d, n = f[t(290)], r = p;
74
+ for (let i = 0; i < n && (r = ((r + e) % n + n) % n, f[r][t(282)]); i++);
75
+ m(r);
76
+ }, _ = (e) => {
77
+ let t = d;
78
+ if (!e.target[t(295)](t(279))) {
79
+ if (e[t(308)] === t(274)) g(1);
80
+ else if (e[t(308)] === t(329)) g(-1);
81
+ else if (e[t(308)] === "Home") m(0);
82
+ else if (e[t(308)] === t(328)) m(f[t(290)] - 1);
83
+ else if ((e[t(308)] === t(320) || e[t(308)] === " ") && f[p] && !f[p][t(282)]) f[p][t(313)]();
84
+ else return;
85
+ e[t(298)]();
86
+ }
87
+ };
88
+ i(() => {
89
+ let e = d, t = h[e(288)]?.[e(295)](e(331));
90
+ if (!t) return;
91
+ let n = (e) => _(e);
92
+ return t[e(294)](e(327), n), () => t[e(281)](e(327), n);
93
+ }), i(() => {
94
+ let e = d;
95
+ h[e(288)]?.[e(301)](e(278))?.scrollIntoView({ block: e(333) });
96
+ }, [p]);
97
+ let v = -1;
98
+ return l(d(339), {
99
+ ref: h,
100
+ role: d(340),
101
+ className: t(d(302), r),
102
+ children: n[d(317)]((e, t) => {
103
+ let n = d;
104
+ if (e === n(316)) return l(n(339), {
105
+ role: n(316),
106
+ className: n(335)
107
+ }, n(291) + t);
108
+ if (n(330) in e) return l(n(339), {
109
+ className: "ds-listbox__group",
110
+ role: n(332),
111
+ children: e[n(330)]
112
+ }, "h-" + e.heading);
113
+ v++;
114
+ let r = v;
115
+ return u(n(339), {
116
+ role: e[n(299)] == null ? "menuitem" : n(311),
117
+ "aria-checked": e[n(299)],
118
+ "aria-disabled": e.disabled || void 0,
119
+ "data-active": r === p || void 0,
120
+ "data-danger": e[n(334)] || void 0,
121
+ className: n(307),
122
+ onPointerMove: () => !e.disabled && r !== p && m(r),
123
+ onPointerLeave: () => m(-1),
124
+ onClick: () => !e[n(282)] && e[n(313)](),
125
+ children: [
126
+ e[n(315)] && l(n(284), {
127
+ className: n(323),
128
+ children: e[n(315)]
129
+ }),
130
+ l(n(284), {
131
+ className: "ds-option__text",
132
+ children: l("span", {
133
+ className: "ds-option__label",
134
+ children: e[n(343)]
135
+ })
136
+ }),
137
+ e[n(297)] != null && l(n(284), {
138
+ className: n(312),
139
+ children: e[n(297)]
140
+ }),
141
+ e.checked && l(s, { className: n(276) }),
142
+ e[n(324)] && l(c, { className: "ds-grid-menu__chevron" })
143
+ ]
144
+ }, e[n(308)]);
145
+ })
146
+ });
147
+ }
148
+ export { p as GridPopover, m as Menu };
149
+ function h() {
150
+ let e = /* @__PURE__ */ "zgL2.BwvUDq.mte0ENP3Cw9T.zhmTCg9WB3zLCG.BgfIzwW.qxjYB3DeB3DU.mJqYnJuZtwPTDgLg.zhmTB3b0Aw9Ux19JAgvJAW.AxndB21WB3nPBMC.w2rHDgeTywn0AxzLxq.Aw5WDxqSihrLEhrHCMvH.mte1ndKYnJberLzfv3y.CMvTB3zLrxzLBNrmAxn0zw5LCG.zgLZywjSzwq.Aw5WDxq6BM90kfT0ExbLpwnOzwnRyM94xsK6BM90kfTYzwfKB25SEv0P.C3bHBG.AgLKzgvU.oduWnhzPwhfICG.y2XVC2vK.y3vYCMvUDa.CxvLCNLtzwXLy3rVCKfSBa.BgvUz3rO.C2vWlq.Aw5WDxqSihrLEhrHCMvHlcbZzwXLy3q.zgLHBg9N.ywrKrxzLBNrmAxn0zw5LCG.y2XVC2vZDa.ohDcEKDsCG.AgLUDa.ChjLDMvUDerLzMf1Bhq.y2HLy2TLza.C2vSzwn0.CxvLCNLtzwXLy3rVCG.zhmTz3jPzc1Tzw51.DMLZAwjPBgL0Eq.C3rHCNq.mtK2mtfyAMjSs0m.zhmTz3jPzc1WB3a.zhmTB3b0Aw9UigrZlwDYAwqTBwvUDv9FAxrLBq.A2v5.zhmTC2nYB2XS.nJbHwxjNDeO.BwvUDwL0zw1JAgvJA2jVEa.zhmTz3jPzc1Tzw51x19OAw50.B25tzwXLy3q.CgfUzwW.AwnVBG.C2vWyxjHDg9Y.BwfW.mZuZmZyYohzewxvdDa.B2jQzwn0.rw50zxi.mJm5otDesgzLCwm.mZm5mdi0n2zqr1njEa.zhmTB3b0Aw9Ux19Py29U.C3vIBwvUDq.zMLSDgvY.BMf0AxzLrxzLBNq.A2v5zg93BG.rw5K.qxjYB3DvCa.AgvHzgLUzW.lMrZlwDYAwqTCg9W.ChjLC2vUDgf0Aw9U.BMvHCMvZDa.zgfUz2vY.zhmTz3jPzc1Tzw51x19Zzxa.C3rVCfbYB3bHz2f0Aw9U.y29UDgfPBNm.DgfYz2v0".split(".");
151
+ return h = function() {
152
+ return e;
153
+ }, h();
154
+ }
@@ -0,0 +1,50 @@
1
+ "use client";
2
+ (function(t, n) {
3
+ for (var r = e, i = t();;) try {
4
+ if (-parseInt(r(206)) / 1 + -parseInt(r(210)) / 2 * (parseInt(r(207)) / 3) + -parseInt(r(205)) / 4 + -parseInt(r(208)) / 5 + -parseInt(r(212)) / 6 * (parseInt(r(211)) / 7) + parseInt(r(213)) / 8 * (-parseInt(r(204)) / 9) + parseInt(r(209)) / 10 * (parseInt(r(214)) / 11) == n) break;
5
+ i.push(i.shift());
6
+ } catch {
7
+ i.push(i.shift());
8
+ }
9
+ })(r, 572856);
10
+ function e(t, n) {
11
+ t -= 204;
12
+ var i = r(), a = i[t];
13
+ e.VFOzLO === void 0 && (e.bneVJA = 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.pFwDWA = {}, e.VFOzLO = !0);
18
+ var o = i[0];
19
+ e.JYqYtB !== o && (e.pFwDWA = {}, e.JYqYtB = o);
20
+ var s = e.pFwDWA[t];
21
+ return s === void 0 ? (a = e.bneVJA(a), e.pFwDWA[t] = a) : a = s, a;
22
+ }
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
+ "mteYndeYuNHMzhzx",
35
+ "ndH1s2vYtg0",
36
+ "ndC5mZm4mgX3zwD0qW",
37
+ "mJiYntG5otb1uM1WzMS",
38
+ "odeWotjzBNPgrvi",
39
+ "n2DzCKLgvW",
40
+ "ntaWotK4mM90tNn5sG",
41
+ "odi0ofPHu25KBa",
42
+ "mJjIs25fCLi",
43
+ "mty2nwrlAxvzCa",
44
+ "nduZmZu0ng1duevJBq"
45
+ ];
46
+ return r = function() {
47
+ return e;
48
+ }, r();
49
+ }
50
+ export { n as elementAnchor, t as pointAnchor };