@iamfiro/design 0.3.0 → 0.3.2

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 (156) hide show
  1. package/agents/avatar/AGENTS.md +29 -1
  2. package/agents/tooltip/AGENTS.md +1 -1
  3. package/lib/components/Accordion/Accordion2.js +76 -76
  4. package/lib/components/ActionBar/ActionBar2.js +43 -43
  5. package/lib/components/Alert/Alert2.js +46 -46
  6. package/lib/components/AppShell/AppShell2.js +58 -58
  7. package/lib/components/AreaChart/AreaChart.js +39 -40
  8. package/lib/components/BarChart/BarChart2.js +169 -169
  9. package/lib/components/BarList/BarList2.js +99 -99
  10. package/lib/components/Breadcrumb/Breadcrumb2.js +65 -66
  11. package/lib/components/Calendar/Calendar2.js +172 -171
  12. package/lib/components/Calendar/DatePicker2.js +101 -102
  13. package/lib/components/Calendar/date.js +71 -71
  14. package/lib/components/Card/Card2.js +55 -56
  15. package/lib/components/CardFrame/CardFrame2.js +52 -52
  16. package/lib/components/Chart/ChartParts.js +90 -90
  17. package/lib/components/Chart/chart2.js +52 -52
  18. package/lib/components/Chart/useChartInteraction.js +44 -44
  19. package/lib/components/ChatBubble/ChatBubble2.js +112 -112
  20. package/lib/components/ChatBubble/formatChatTime.js +44 -42
  21. package/lib/components/ChatComposer/ChatComposer2.js +94 -94
  22. package/lib/components/CodeBlock/CodeBlock2.js +66 -66
  23. package/lib/components/CodeBlock/highlight.js +67 -70
  24. package/lib/components/ColorPicker/ColorPicker2.js +404 -405
  25. package/lib/components/ColorPicker/color.js +81 -81
  26. package/lib/components/ColorPicker/presets.js +44 -43
  27. package/lib/components/Combobox/Combobox2.js +128 -128
  28. package/lib/components/CommandMenu/CommandMenu.js +137 -137
  29. package/lib/components/Comment/Comment2.js +55 -80
  30. package/lib/components/ContextMenu/ContextMenu2.js +93 -94
  31. package/lib/components/DataGrid/DataGrid2.js +1181 -1180
  32. package/lib/components/DataGrid/GridPopover.js +112 -112
  33. package/lib/components/DataGrid/anchor.js +23 -25
  34. package/lib/components/DataGrid/model.js +274 -275
  35. package/lib/components/DataGrid/panels.js +423 -423
  36. package/lib/components/DataGrid/typeMeta.js +21 -22
  37. package/lib/components/DataGrid/types.js +38 -37
  38. package/lib/components/DescriptionList/DescriptionList2.js +107 -107
  39. package/lib/components/Dialog/AlertDialog.js +53 -53
  40. package/lib/components/Dialog/Dialog2.js +71 -70
  41. package/lib/components/Dialog/modal.js +59 -58
  42. package/lib/components/Drawer/Drawer2.js +123 -124
  43. package/lib/components/DropdownMenu/DropdownMenu2.js +198 -200
  44. package/lib/components/DropdownMenu/menuCore.js +46 -47
  45. package/lib/components/Dropzone/Dropzone2.js +77 -77
  46. package/lib/components/EmptyState/EmptyState2.js +57 -56
  47. package/lib/components/FileChip/FileChip2.js +71 -71
  48. package/lib/components/FileUpload/FileUpload.js +119 -119
  49. package/lib/components/FilterChips/FilterChips2.js +61 -61
  50. package/lib/components/FunnelChart/FunnelChart2.js +141 -141
  51. package/lib/components/FunnelChart/funnel.js +51 -51
  52. package/lib/components/Highlight/Highlight2.js +54 -54
  53. package/lib/components/HoverCard/HoverCard.js +108 -83
  54. package/lib/components/InlineDiff/InlineDiff2.js +126 -126
  55. package/lib/components/InlineDiff/diff.js +82 -82
  56. package/lib/components/InlineDiff/useDiffReview.js +62 -60
  57. package/lib/components/Kanban/Kanban2.js +382 -382
  58. package/lib/components/Kanban/KanbanCard.js +92 -92
  59. package/lib/components/Kanban/move.js +45 -49
  60. package/lib/components/LineChart/LineChart2.js +207 -207
  61. package/lib/components/List/List2.js +71 -71
  62. package/lib/components/Listbox/Listbox2.js +115 -115
  63. package/lib/components/Marker/Marker2.js +67 -60
  64. package/lib/components/Menubar/Menubar2.js +130 -133
  65. package/lib/components/MultiSelect/MultiSelect2.js +104 -104
  66. package/lib/components/NavigationMenu/NavigationMenu2.js +261 -262
  67. package/lib/components/NoticeStack/NoticeStack2.js +105 -105
  68. package/lib/components/NumberStepper/NumberStepper2.js +67 -67
  69. package/lib/components/OtpInput/OtpInput2.js +66 -67
  70. package/lib/components/Pagination/Pagination2.js +90 -90
  71. package/lib/components/Pagination/paginationRange.js +24 -24
  72. package/lib/components/PhoneInput/PhoneInput.js +74 -74
  73. package/lib/components/PieChart/PieChart2.js +119 -119
  74. package/lib/components/PieChart/arc.js +63 -42
  75. package/lib/components/PieChart/useArcTween.js +56 -54
  76. package/lib/components/Popover/Popover2.js +61 -61
  77. package/lib/components/ProgressTracker/ProgressTracker2.js +127 -127
  78. package/lib/components/Rating/Rating2.js +81 -81
  79. package/lib/components/Resizable/Resizable2.js +112 -110
  80. package/lib/components/Resizable/layout.js +50 -50
  81. package/lib/components/ScaledPreview/ScaledPreview2.js +49 -50
  82. package/lib/components/ScatterChart/ScatterChart2.js +226 -227
  83. package/lib/components/ScatterChart/scatter.js +59 -57
  84. package/lib/components/ScrollArea/ScrollArea2.js +112 -112
  85. package/lib/components/Select/Select2.js +79 -79
  86. package/lib/components/Sidebar/Sidebar2.js +79 -79
  87. package/lib/components/Skeleton/Skeleton2.js +68 -68
  88. package/lib/components/Slider/Slider2.js +78 -77
  89. package/lib/components/SocialLoginButton/SocialLoginButton.js +65 -66
  90. package/lib/components/SparkChart/SparkChart2.js +146 -145
  91. package/lib/components/SparkChart/spark.js +41 -67
  92. package/lib/components/Sparkbar/Sparkbar2.js +61 -60
  93. package/lib/components/SplitView/SplitView2.js +53 -53
  94. package/lib/components/Stat/Stat2.js +94 -94
  95. package/lib/components/StepList/StepList2.js +70 -70
  96. package/lib/components/Table/Table2.js +63 -63
  97. package/lib/components/Tabs/Tabs2.js +70 -70
  98. package/lib/components/TagInput/TagInput2.js +236 -239
  99. package/lib/components/TimePicker/TimePicker2.js +231 -232
  100. package/lib/components/TimePicker/time.js +63 -65
  101. package/lib/components/Timeline/Timeline2.js +167 -167
  102. package/lib/components/Timeline/scale.js +55 -55
  103. package/lib/components/Toast/Toaster.js +151 -152
  104. package/lib/components/Toast/store.js +90 -87
  105. package/lib/components/ToggleGroup/ToggleGroup2.js +91 -91
  106. package/lib/components/Toolbar/Toolbar2.js +145 -145
  107. package/lib/components/Tracker/Tracker2.js +76 -76
  108. package/lib/components/TreeDiagram/TreeDiagram2.js +112 -111
  109. package/lib/components/TreeView/TreeView2.js +124 -124
  110. package/lib/hooks/timing.js +30 -29
  111. package/lib/hooks/useControllableState.js +37 -36
  112. package/lib/hooks/useCountdown.js +56 -59
  113. package/lib/hooks/useDigitInput.js +52 -78
  114. package/lib/hooks/useDismiss.js +58 -57
  115. package/lib/hooks/useElapsed.js +54 -54
  116. package/lib/hooks/useFloating.js +26 -26
  117. package/lib/hooks/useFocusTrap.js +42 -42
  118. package/lib/hooks/usePresence.js +49 -48
  119. package/lib/hooks/usePressToOpen.js +42 -41
  120. package/lib/hooks/useScrollLock.js +45 -44
  121. package/lib/hooks/useSelection.js +45 -39
  122. package/lib/index.js +71 -71
  123. package/lib/primitives/AspectRatio2.js +60 -60
  124. package/lib/primitives/BrandIcon.js +161 -161
  125. package/lib/primitives/ColorDot2.js +42 -45
  126. package/lib/primitives/CopyButton2.js +57 -56
  127. package/lib/primitives/CountBadge2.js +55 -51
  128. package/lib/primitives/Countdown2.js +41 -46
  129. package/lib/primitives/Delta2.js +36 -36
  130. package/lib/primitives/Elapsed.js +49 -49
  131. package/lib/primitives/FileIcon2.js +96 -96
  132. package/lib/primitives/Flag2.js +135 -135
  133. package/lib/primitives/IconStack2.js +38 -60
  134. package/lib/primitives/IconTile2.js +28 -29
  135. package/lib/primitives/Kbd2.js +50 -50
  136. package/lib/primitives/Layout2.js +71 -71
  137. package/lib/primitives/Link2.js +32 -31
  138. package/lib/primitives/MaskedText2.js +49 -74
  139. package/lib/primitives/Progress2.js +65 -66
  140. package/lib/primitives/RelativeTime.js +58 -57
  141. package/lib/primitives/SearchInput2.js +65 -65
  142. package/lib/primitives/SelectorButton2.js +74 -73
  143. package/lib/primitives/Spinner2.js +50 -50
  144. package/lib/primitives/StatusIcon2.js +68 -68
  145. package/lib/primitives/Swatch2.js +59 -55
  146. package/lib/primitives/Tooltip2.js +81 -81
  147. package/lib/primitives/Typography2.js +53 -53
  148. package/lib/primitives/formatCountdown.js +21 -22
  149. package/lib/primitives/formatElapsed.js +43 -42
  150. package/lib/primitives/formatRelativeTime.js +50 -50
  151. package/lib/primitives/hotkey.js +82 -82
  152. package/lib/primitives/index.js +193 -174
  153. package/lib/primitives/maskValue.js +28 -28
  154. package/lib/style.css +1 -1
  155. package/lib/types/primitives/index.d.ts +6 -2
  156. package/package.json +1 -1
@@ -1,100 +1,99 @@
1
1
  "use client";
2
- function e(t, n) {
3
- t -= 230;
4
- let r = u(), i = r[t];
5
- e.OrJRKg === void 0 && (e.yqCHDx = 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.MThLrD = {}, e.OrJRKg = !0);
11
- let a = r[0];
12
- e.DpTliG !== a && (e.MThLrD = {}, e.DpTliG = a);
13
- let o = e.MThLrD[t];
14
- return o === void 0 ? (i = e.yqCHDx(i), e.MThLrD[t] = i) : i = o, i;
15
- }
16
- const t = e;
17
- (function(t, n) {
18
- let r = e, i = t();
2
+ (function(e, t) {
3
+ let r = n, i = e();
19
4
  for (;;) try {
20
- if (-parseInt(r(241)) / 1 + -parseInt(r(253)) / 2 * (-parseInt(r(234)) / 3) + -parseInt(r(231)) / 4 * (parseInt(r(260)) / 5) + parseInt(r(254)) / 6 + -parseInt(r(247)) / 7 * (-parseInt(r(246)) / 8) + -parseInt(r(255)) / 9 + parseInt(r(238)) / 10 * (parseInt(r(242)) / 11) == n) break;
5
+ if (parseInt(r(272)) / 1 * (-parseInt(r(244)) / 2) + parseInt(r(274)) / 3 + parseInt(r(270)) / 4 * (parseInt(r(268)) / 5) + -parseInt(r(259)) / 6 + -parseInt(r(261)) / 7 + parseInt(r(246)) / 8 * (parseInt(r(273)) / 9) + -parseInt(r(253)) / 10 * (-parseInt(r(267)) / 11) == t) break;
21
6
  i.push(i.shift());
22
7
  } catch {
23
8
  i.push(i.shift());
24
9
  }
25
- })(u, 980547);
26
- import { cx as n } from "../../primitives/index.js";
10
+ })(e, 924101);
11
+ function e() {
12
+ let t = /* @__PURE__ */ "zhmTC2nHBgvKlxbYzxzPzxDFx2nOAxaGzhmTC2nHBgvKlxbYzxzPzxDFx2nOAxaTlw1LDge.mZq4nJiZAfrpBej2.mJy0ntf4B3DcqMW.ndqZnZbVExLkvM4.y2XPzw50sgvPz2H0.mNPPALr4rW.B2zMC2v0sgvPz2H0.ndyZmK1tvvLIDq.BwLU.y2XPzw50v2LKDgG.AxnjBNrLCNnLy3rPBMC.Dw5KzwzPBMvK.zgLZy29UBMvJDa.DhjHBNnSyxrLkc01mcuSic01mcuPihnJywXLka.mtuWzMrjChzs.ntyL.zhmTC2nHBgvKlxbYzxzPzxCTlq.zgL2.zhmTC2nHBgvKlxbYzxzPzxDFx2zHBgXIywnR.zhmTC2nHBgvKlxbYzxzPzxDFx2nOAxaGzhmTC2nHBgvKlxbYzxzPzxDFx2nOAxaTlwXHyMvS.odaWmtG1mKPbuvrKvq.C3bHBG.mta4mdCXmZLuuw11BKC.B2jZzxj2zq.zhmTC2nHBgvKlxbYzxzPzxC.mJaWChGGmhb4.zhmTC2nHBgvKlxbYzxzPzxDFx2nVBNrLBNq.y3vYCMvUDa.nJq2ndGXCgnQwfrM.nvPVBLz3yW.ndqL.nJiWodGYofbuuu5vyq".split(".");
13
+ return e = function() {
14
+ return t;
15
+ }, e();
16
+ }
17
+ import { cx as t } from "../../primitives/index.js";
18
+ function n(t, r) {
19
+ t -= 244;
20
+ let i = e(), a = i[t];
21
+ n.TPqmrZ === void 0 && (n.PTKIbD = 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
+ }, n.iVsnrQ = {}, n.TPqmrZ = !0);
27
+ let o = i[0];
28
+ n.tbAJZI !== o && (n.iVsnrQ = {}, n.tbAJZI = o);
29
+ let s = n.iVsnrQ[t];
30
+ return s === void 0 ? (a = n.PTKIbD(a), n.iVsnrQ[t] = a) : a = s, a;
31
+ }
27
32
  import { Skeleton as r } from "../Skeleton/Skeleton2.js";
28
33
  /* empty css */
29
34
  import { useEffect as i, useRef as a, useState as o } from "react";
30
35
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
31
- function l({ children: e, height: l = 320, contentWidth: u = 520, maxScale: d = .8, minScale: f = .3, inset: p = 24, label: m, meta: h, lazy: g, fallback: _, tone: v = t(244), className: y, style: b }) {
32
- let x = t, S = a(null), C = a(null), [w, T] = o(!1), [E, D] = o(null), O = !g || typeof IntersectionObserver === x(235) || w;
36
+ function l({ children: e, height: l = 320, contentWidth: u = 520, maxScale: d = .8, minScale: f = .3, inset: p = 24, label: m, meta: h, lazy: g, fallback: _, tone: v = "subtle", className: y, style: b }) {
37
+ let x = n, S = a(null), C = a(null), [w, T] = o(!1), [E, D] = o(null), O = !g || typeof IntersectionObserver === x(250) || w;
33
38
  return i(() => {
34
- let e = x, t = S[e(230)];
35
- if (!g || !t || typeof IntersectionObserver === e(235)) return;
36
- let n = new IntersectionObserver(([e]) => T(e.isIntersecting), { rootMargin: e(240) });
37
- return n[e(237)](t), () => n[e(252)]();
39
+ let e = x, t = S[e(266)];
40
+ if (!g || !t || typeof IntersectionObserver === e(250)) return;
41
+ let n = new IntersectionObserver(([t]) => T(t[e(249)]), { rootMargin: e(264) });
42
+ return n[e(262)](t), () => n[e(251)]();
38
43
  }, [g]), i(() => {
39
- let e = x, t = S.current, n = C[e(230)];
44
+ let e = x, t = S[e(266)], n = C[e(266)];
40
45
  if (!O || !t || !n) return;
41
46
  let r = () => {
42
- let r = e, i = n.offsetWidth, a = n[r(236)];
47
+ let r = e, i = n.offsetWidth, a = n[r(245)];
43
48
  if (!i || !a) return;
44
- let o = Math.min((t[r(251)] - p * 2) / i, (t.clientHeight - p * 2) / a);
45
- D(Math[r(243)](f, Math[r(245)](d, o)));
49
+ let o = Math[r(247)]((t[r(248)] - p * 2) / i, (t[r(275)] - p * 2) / a);
50
+ D(Math.max(f, Math[r(247)](d, o)));
46
51
  };
47
- if (r(), typeof ResizeObserver > "u") return;
52
+ if (r(), typeof ResizeObserver === e(250)) return;
48
53
  let i = new ResizeObserver(r);
49
- return i[e(237)](t), i[e(237)](n), () => i[e(252)]();
54
+ return i[e(262)](t), i[e(262)](n), () => i.disconnect();
50
55
  }, [
51
56
  O,
52
57
  p,
53
58
  d,
54
59
  f,
55
60
  u
56
- ]), c(x(232), {
61
+ ]), c("div", {
57
62
  ref: S,
58
- className: n(x(256), x(239) + v, y),
63
+ className: t(x(263), x(255) + v, y),
59
64
  style: {
60
65
  height: l,
61
66
  ...b
62
67
  },
63
68
  children: [
64
- O ? s(x(232), {
69
+ O ? s(x(256), {
65
70
  ref: C,
66
- className: "ds-scaled-preview__content",
71
+ className: x(265),
67
72
  "data-ready": E !== null || void 0,
68
73
  style: {
69
74
  width: u,
70
- transform: x(250) + (E ?? d) + ")"
75
+ transform: x(252) + (E ?? d) + ")"
71
76
  },
72
77
  inert: !0,
73
78
  "aria-hidden": !0,
74
79
  children: e
75
80
  }) : s("div", {
76
- className: x(233),
81
+ className: x(257),
77
82
  children: _ ?? s(r, {
78
- width: x(257),
79
- height: x(249),
83
+ width: x(254),
84
+ height: x(269),
80
85
  radius: "md"
81
86
  })
82
87
  }),
83
- m != null && s("span", {
84
- className: x(248),
88
+ m != null && s(x(260), {
89
+ className: x(258),
85
90
  children: m
86
91
  }),
87
- h != null && s(x(259), {
88
- className: x(258),
92
+ h != null && s("span", {
93
+ className: x(271),
89
94
  children: h
90
95
  })
91
96
  ]
92
97
  });
93
98
  }
94
99
  export { l as ScaledPreview };
95
- function u() {
96
- let e = /* @__PURE__ */ "ndC5mtG0m2fuuLjWwq.zhmTC2nHBgvKlxbYzxzPzxC.ntyL.zhmTC2nHBgvKlxbYzxzPzxDFx2nOAxaGzhmTC2nHBgvKlxbYzxzPzxDFx2nOAxaTlw1LDge.C3bHBG.otC0nZeWBwT0ENbT.y3vYCMvUDa.mJHmBLbzzLi.zgL2.zhmTC2nHBgvKlxbYzxzPzxDFx2zHBgXIywnR.ndK1mdu5murTu3L0vG.Dw5KzwzPBMvK.B2zMC2v0sgvPz2H0.B2jZzxj2zq.mJboterirfG.zhmTC2nHBgvKlxbYzxzPzxCTlq.mJaWChGGmhb4.mtu4ntG2nLPjrLbTAa.ntKYmde4ou1YAMTqvG.Bwf4.C3vIDgXL.BwLU.nJuZnZeZnLL0zKP0qG.mtrpzejYuMq.zhmTC2nHBgvKlxbYzxzPzxDFx2nOAxaGzhmTC2nHBgvKlxbYzxzPzxDFx2nOAxaTlwXHyMvS.ndqL.DhjHBNnSyxrLkc01mcuSic01mcuPihnJywXLka.y2XPzw50v2LKDgG.zgLZy29UBMvJDa.mNbzugzQDq.nJe1mZmWwxHIuvHV".split(".");
97
- return u = function() {
98
- return e;
99
- }, u();
100
- }