@iamfiro/design 0.3.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 (153) hide show
  1. package/lib/components/Accordion/Accordion2.js +86 -86
  2. package/lib/components/ActionBar/ActionBar2.js +44 -43
  3. package/lib/components/Alert/Alert2.js +79 -79
  4. package/lib/components/AppShell/AppShell2.js +58 -58
  5. package/lib/components/AreaChart/AreaChart.js +41 -41
  6. package/lib/components/BarChart/BarChart2.js +110 -110
  7. package/lib/components/BarList/BarList2.js +95 -95
  8. package/lib/components/Breadcrumb/Breadcrumb2.js +62 -59
  9. package/lib/components/Calendar/Calendar2.js +202 -202
  10. package/lib/components/Calendar/DatePicker2.js +122 -123
  11. package/lib/components/Calendar/date.js +57 -60
  12. package/lib/components/Card/Card2.js +62 -63
  13. package/lib/components/CardFrame/CardFrame2.js +43 -48
  14. package/lib/components/Chart/ChartParts.js +80 -80
  15. package/lib/components/Chart/chart2.js +57 -57
  16. package/lib/components/Chart/useChartInteraction.js +49 -49
  17. package/lib/components/ChatBubble/ChatBubble2.js +87 -87
  18. package/lib/components/ChatBubble/formatChatTime.js +34 -39
  19. package/lib/components/ChatComposer/ChatComposer2.js +97 -97
  20. package/lib/components/CodeBlock/CodeBlock2.js +60 -60
  21. package/lib/components/CodeBlock/highlight.js +75 -78
  22. package/lib/components/ColorPicker/ColorPicker2.js +383 -384
  23. package/lib/components/ColorPicker/color.js +74 -74
  24. package/lib/components/ColorPicker/presets.js +41 -46
  25. package/lib/components/Combobox/Combobox2.js +130 -131
  26. package/lib/components/CommandMenu/CommandMenu.js +137 -137
  27. package/lib/components/Comment/Comment2.js +64 -88
  28. package/lib/components/ContextMenu/ContextMenu2.js +87 -87
  29. package/lib/components/DataGrid/DataGrid2.js +911 -909
  30. package/lib/components/DataGrid/GridPopover.js +114 -114
  31. package/lib/components/DataGrid/anchor.js +25 -25
  32. package/lib/components/DataGrid/model.js +281 -282
  33. package/lib/components/DataGrid/panels.js +427 -429
  34. package/lib/components/DataGrid/typeMeta.js +50 -51
  35. package/lib/components/DataGrid/types.js +39 -40
  36. package/lib/components/DescriptionList/DescriptionList2.js +104 -104
  37. package/lib/components/Dialog/AlertDialog.js +85 -84
  38. package/lib/components/Dialog/Dialog2.js +72 -71
  39. package/lib/components/Dialog/modal.js +68 -68
  40. package/lib/components/Drawer/Drawer2.js +100 -100
  41. package/lib/components/DropdownMenu/DropdownMenu2.js +267 -268
  42. package/lib/components/DropdownMenu/menuCore.js +36 -36
  43. package/lib/components/Dropzone/Dropzone2.js +66 -65
  44. package/lib/components/EmptyState/EmptyState2.js +52 -54
  45. package/lib/components/FileChip/FileChip2.js +42 -66
  46. package/lib/components/FileUpload/FileUpload.js +171 -170
  47. package/lib/components/FilterChips/FilterChips2.js +54 -54
  48. package/lib/components/FunnelChart/FunnelChart2.js +144 -144
  49. package/lib/components/FunnelChart/funnel.js +56 -53
  50. package/lib/components/Highlight/Highlight2.js +60 -60
  51. package/lib/components/HoverCard/HoverCard.js +72 -72
  52. package/lib/components/InlineDiff/InlineDiff2.js +112 -112
  53. package/lib/components/InlineDiff/diff.js +81 -81
  54. package/lib/components/InlineDiff/useDiffReview.js +54 -53
  55. package/lib/components/Kanban/Kanban2.js +372 -372
  56. package/lib/components/Kanban/KanbanCard.js +80 -80
  57. package/lib/components/Kanban/move.js +55 -55
  58. package/lib/components/LineChart/LineChart2.js +167 -167
  59. package/lib/components/List/List2.js +64 -65
  60. package/lib/components/Listbox/Listbox2.js +105 -105
  61. package/lib/components/Marker/Marker2.js +54 -54
  62. package/lib/components/Menubar/Menubar2.js +112 -113
  63. package/lib/components/MultiSelect/MultiSelect2.js +106 -106
  64. package/lib/components/NavigationMenu/NavigationMenu2.js +227 -227
  65. package/lib/components/NoticeStack/NoticeStack2.js +115 -115
  66. package/lib/components/NumberStepper/NumberStepper2.js +69 -70
  67. package/lib/components/OtpInput/OtpInput2.js +87 -87
  68. package/lib/components/Pagination/Pagination2.js +97 -97
  69. package/lib/components/Pagination/paginationRange.js +23 -24
  70. package/lib/components/PhoneInput/PhoneInput.js +85 -85
  71. package/lib/components/PieChart/PieChart2.js +116 -116
  72. package/lib/components/PieChart/arc.js +80 -56
  73. package/lib/components/PieChart/useArcTween.js +57 -59
  74. package/lib/components/Popover/Popover2.js +59 -60
  75. package/lib/components/ProgressTracker/ProgressTracker2.js +116 -116
  76. package/lib/components/Rating/Rating2.js +93 -93
  77. package/lib/components/Resizable/Resizable2.js +136 -134
  78. package/lib/components/Resizable/layout.js +73 -73
  79. package/lib/components/ScaledPreview/ScaledPreview2.js +57 -58
  80. package/lib/components/ScatterChart/ScatterChart2.js +252 -253
  81. package/lib/components/ScatterChart/scatter.js +58 -56
  82. package/lib/components/ScrollArea/ScrollArea2.js +133 -134
  83. package/lib/components/Select/Select2.js +89 -89
  84. package/lib/components/Sidebar/Sidebar2.js +76 -76
  85. package/lib/components/Skeleton/Skeleton2.js +67 -67
  86. package/lib/components/Slider/Slider2.js +67 -67
  87. package/lib/components/SocialLoginButton/SocialLoginButton.js +46 -47
  88. package/lib/components/SparkChart/SparkChart2.js +130 -130
  89. package/lib/components/SparkChart/spark.js +57 -62
  90. package/lib/components/Sparkbar/Sparkbar2.js +44 -44
  91. package/lib/components/SplitView/SplitView2.js +53 -53
  92. package/lib/components/Stat/Stat2.js +83 -83
  93. package/lib/components/StepList/StepList2.js +73 -73
  94. package/lib/components/Table/Table2.js +45 -45
  95. package/lib/components/Tabs/Tabs2.js +87 -87
  96. package/lib/components/TagInput/TagInput2.js +231 -234
  97. package/lib/components/TimePicker/TimePicker2.js +195 -195
  98. package/lib/components/TimePicker/time.js +60 -62
  99. package/lib/components/Timeline/Timeline2.js +199 -199
  100. package/lib/components/Timeline/scale.js +56 -58
  101. package/lib/components/Toast/Toaster.js +153 -152
  102. package/lib/components/Toast/store.js +57 -58
  103. package/lib/components/ToggleGroup/ToggleGroup2.js +74 -74
  104. package/lib/components/Toolbar/Toolbar2.js +135 -133
  105. package/lib/components/Tracker/Tracker2.js +83 -83
  106. package/lib/components/TreeDiagram/TreeDiagram2.js +103 -103
  107. package/lib/components/TreeView/TreeView2.js +165 -163
  108. package/lib/hooks/timing.js +33 -31
  109. package/lib/hooks/useControllableState.js +42 -42
  110. package/lib/hooks/useCountdown.js +58 -63
  111. package/lib/hooks/useDigitInput.js +75 -77
  112. package/lib/hooks/useDismiss.js +50 -52
  113. package/lib/hooks/useElapsed.js +58 -56
  114. package/lib/hooks/useFloating.js +44 -44
  115. package/lib/hooks/useFocusTrap.js +64 -40
  116. package/lib/hooks/usePresence.js +48 -50
  117. package/lib/hooks/usePressToOpen.js +52 -51
  118. package/lib/hooks/useScrollLock.js +49 -48
  119. package/lib/hooks/useSelection.js +37 -40
  120. package/lib/index.js +70 -69
  121. package/lib/primitives/AspectRatio2.js +50 -54
  122. package/lib/primitives/BrandIcon.js +153 -153
  123. package/lib/primitives/ColorDot2.js +49 -48
  124. package/lib/primitives/CopyButton2.js +59 -58
  125. package/lib/primitives/CountBadge2.js +57 -55
  126. package/lib/primitives/Countdown2.js +45 -49
  127. package/lib/primitives/Delta2.js +71 -46
  128. package/lib/primitives/Elapsed.js +43 -43
  129. package/lib/primitives/FileIcon2.js +93 -93
  130. package/lib/primitives/Flag2.js +95 -95
  131. package/lib/primitives/IconStack2.js +55 -55
  132. package/lib/primitives/IconTile2.js +46 -45
  133. package/lib/primitives/Kbd2.js +55 -55
  134. package/lib/primitives/Layout2.js +80 -80
  135. package/lib/primitives/Link2.js +36 -34
  136. package/lib/primitives/MaskedText2.js +65 -64
  137. package/lib/primitives/Progress2.js +80 -80
  138. package/lib/primitives/RelativeTime.js +52 -54
  139. package/lib/primitives/SearchInput2.js +55 -54
  140. package/lib/primitives/SelectorButton2.js +64 -65
  141. package/lib/primitives/Spinner2.js +55 -59
  142. package/lib/primitives/StatusIcon2.js +65 -65
  143. package/lib/primitives/Swatch2.js +50 -50
  144. package/lib/primitives/Tooltip2.js +85 -85
  145. package/lib/primitives/Typography2.js +66 -66
  146. package/lib/primitives/formatCountdown.js +43 -40
  147. package/lib/primitives/formatElapsed.js +24 -27
  148. package/lib/primitives/formatRelativeTime.js +43 -43
  149. package/lib/primitives/hotkey.js +71 -71
  150. package/lib/primitives/index.js +156 -157
  151. package/lib/primitives/maskValue.js +38 -34
  152. package/lib/style.css +1 -1
  153. package/package.json +1 -1
@@ -1,71 +1,72 @@
1
1
  "use client";
2
+ function e() {
3
+ let t = [
4
+ "mtu0ndC2vfjqBLjQ",
5
+ "mJq2nJiYmg5Sz2f4DG",
6
+ "mZGZotzTwKPJz2u",
7
+ "CMvQzwn0zwq",
8
+ "mtjRzfvXvNC",
9
+ "mtm4mZiYneXdwLfVqW",
10
+ "nZGYotv1De5lBvu",
11
+ "mtHzAgX5A0C",
12
+ "ywnJzxb0zwq",
13
+ "BwfW",
14
+ "Aw5KzxHpzG",
15
+ "BgvUz3rO",
16
+ "Aw5JBhvKzxm",
17
+ "nhfVANfhqq",
18
+ "CgvUzgLUzW",
19
+ "nJK3mtbMAuf6thq",
20
+ "ntm2mZmXwuDMr29A"
21
+ ];
22
+ return e = function() {
23
+ return t;
24
+ }, e();
25
+ }
2
26
  (function(e, n) {
3
27
  let r = t, i = e();
4
28
  for (;;) try {
5
- if (parseInt(r(289)) / 1 + parseInt(r(287)) / 2 + parseInt(r(291)) / 3 + -parseInt(r(294)) / 4 * (parseInt(r(292)) / 5) + -parseInt(r(297)) / 6 + -parseInt(r(290)) / 7 * (parseInt(r(295)) / 8) + parseInt(r(286)) / 9 * (-parseInt(r(296)) / 10) == n) break;
29
+ if (-parseInt(r(384)) / 1 * (parseInt(r(378)) / 2) + -parseInt(r(381)) / 3 + parseInt(r(386)) / 4 * (parseInt(r(380)) / 5) + parseInt(r(382)) / 6 + -parseInt(r(388)) / 7 + -parseInt(r(387)) / 8 + -parseInt(r(372)) / 9 * (-parseInt(r(383)) / 10) == n) break;
6
30
  i.push(i.shift());
7
31
  } catch {
8
32
  i.push(i.shift());
9
33
  }
10
- })(n, 452805);
11
- import { useControllableState as e } from "../../hooks/useControllableState.js";
12
- function t(e, r) {
13
- e -= 283;
14
- let i = n(), a = i[e];
15
- t.nMTRgq === void 0 && (t.Aumktn = function(e) {
34
+ })(e, 121159);
35
+ function t(n, r) {
36
+ n -= 372;
37
+ let i = e(), a = i[n];
38
+ t.leeVfz === void 0 && (t.mRHrDU = function(e) {
16
39
  let t = "", n = "";
17
40
  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
41
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
19
42
  return decodeURIComponent(n);
20
- }, t.OPMeUP = {}, t.nMTRgq = !0);
43
+ }, t.DtuAOc = {}, t.leeVfz = !0);
21
44
  let o = i[0];
22
- t.rOvKmH !== o && (t.OPMeUP = {}, t.rOvKmH = o);
23
- let s = t.OPMeUP[e];
24
- return s === void 0 ? (a = t.Aumktn(a), t.OPMeUP[e] = a) : a = s, a;
25
- }
26
- function n() {
27
- let e = [
28
- "nJaXmtbXv21PDxO",
29
- "BgvUz3rO",
30
- "ntzsCw5KD3i",
31
- "odHSt3f3A20",
32
- "mteXmJK3nZbTtgLpwfG",
33
- "mJy4otu2wfDzEff5",
34
- "Aw5KzxHpzG",
35
- "Aw5JBhvKzxm",
36
- "BwfW",
37
- "ywnJzxb0zwq",
38
- "owXvteTwAW",
39
- "mteYndaYnLHcsMD4qW",
40
- "CMvQzwn0zwq",
41
- "nZG2mda2qvbtAwPb",
42
- "mZq5nZLsDwTjDem",
43
- "mtq1nZu5mM93runzAq"
44
- ];
45
- return n = function() {
46
- return e;
47
- }, n();
45
+ t.LnpoMs !== o && (t.DtuAOc = {}, t.LnpoMs = o);
46
+ let s = t.DtuAOc[n];
47
+ return s === void 0 ? (a = t.mRHrDU(a), t.DtuAOc[n] = a) : a = s, a;
48
48
  }
49
+ import { useControllableState as n } from "../../hooks/useControllableState.js";
49
50
  import { applyDiffDecisions as r, diffWords as i, listDiffChanges as a, resolveDiffSegments as o } from "./diff.js";
50
51
  import { useMemo as s, useState as c } from "react";
51
52
  var l = {}, u = (e, t) => (e % t + t) % t;
52
- function d({ changes: n, before: d, after: f, decisions: p, defaultDecisions: m = l, onDecisionsChange: h, advance: g = !0 } = {}) {
53
- let _ = t, v = s(() => o(n ?? (d != null || f != null ? i(d ?? "", f ?? "") : [])), [
54
- n,
53
+ function d({ changes: e, before: d, after: f, decisions: p, defaultDecisions: m = l, onDecisionsChange: h, advance: g = !0 } = {}) {
54
+ let _ = t, v = s(() => o(e ?? (d != null || f != null ? i(d ?? "", f ?? "") : [])), [
55
+ e,
55
56
  d,
56
57
  f
57
- ]), y = s(() => a(v), [v]), b = y[_(284)]((e) => e.id), [x, S] = e(p, m, h), [C, w] = c(null), [T, E] = c(0), D = C != null && b[_(283)](C) ? C : null, O = (e) => b.filter((t) => !e[t]), k = O(x), A = (e) => {
58
+ ]), y = s(() => a(v), [v]), b = y[_(374)]((e) => e.id), [x, S] = n(p, m, h), [C, w] = c(null), [T, E] = c(0), D = C != null && b[_(377)](C) ? C : null, O = (e) => b.filter((t) => !e[t]), k = O(x), A = (e) => {
58
59
  w(e), E((e) => e + 1);
59
60
  }, j = (e, t, n) => {
60
61
  let r = _;
61
- if (!b[r(293)] || !n.length) return;
62
- let i = e == null ? t > 0 ? -1 : b[r(293)] : b[r(298)](e);
63
- for (let e = 1; e <= b[r(293)]; e++) {
64
- let a = b[u(i + t * e, b[r(293)])];
65
- if (n.includes(a)) return a;
62
+ if (!b[r(376)] || !n[r(376)]) return;
63
+ let i = e == null ? t > 0 ? -1 : b[r(376)] : b[r(375)](e);
64
+ for (let e = 1; e <= b[r(376)]; e++) {
65
+ let a = b[u(i + t * e, b[r(376)])];
66
+ if (n[r(377)](a)) return a;
66
67
  }
67
68
  }, M = (e) => {
68
- let t = j(D, e, k[_(293)] ? k : b);
69
+ let t = j(D, e, k.length ? k : b);
69
70
  t != null && A(t);
70
71
  }, N = (e, t) => {
71
72
  let n = { ...x };
@@ -73,7 +74,7 @@ function d({ changes: n, before: d, after: f, decisions: p, defaultDecisions: m
73
74
  let r = j(e, 1, O(n));
74
75
  r != null && A(r);
75
76
  }, P = (e) => {
76
- if (!k[_(293)]) return;
77
+ if (!k[_(376)]) return;
77
78
  let t = { ...x };
78
79
  for (let n of k) t[n] = e;
79
80
  S(t);
@@ -82,26 +83,26 @@ function d({ changes: n, before: d, after: f, decisions: p, defaultDecisions: m
82
83
  segments: v,
83
84
  changes: y,
84
85
  decisions: x,
85
- remaining: k[_(293)],
86
- total: b.length,
86
+ remaining: k[_(376)],
87
+ total: b[_(376)],
87
88
  current: D,
88
- currentIndex: D == null ? -1 : b[_(298)](D),
89
+ currentIndex: D == null ? -1 : b.indexOf(D),
89
90
  text: r(v, x),
90
91
  navToken: T,
91
- getDecision: (e) => x[e] ?? "pending",
92
+ getDecision: (e) => x[e] ?? _(379),
92
93
  setCurrent: w,
93
94
  goTo: A,
94
95
  next: () => M(1),
95
96
  prev: () => M(-1),
96
97
  decide: N,
97
98
  accept: (e = D ?? void 0) => {
98
- e != null && N(e, "accepted");
99
+ e != null && N(e, _(373));
99
100
  },
100
101
  reject: (e = D ?? void 0) => {
101
- e != null && N(e, _(288));
102
+ e != null && N(e, _(385));
102
103
  },
103
- acceptAll: () => P(_(285)),
104
- rejectAll: () => P(_(288)),
104
+ acceptAll: () => P(_(373)),
105
+ rejectAll: () => P(_(385)),
105
106
  setDecisions: S,
106
107
  reset: () => S(l)
107
108
  };