@overdoser/react-toolkit 0.21.0 → 0.22.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 (161) hide show
  1. package/AGENTS.md +1 -0
  2. package/CHANGELOG.md +27 -0
  3. package/components/Accordion/Accordion.js +48 -48
  4. package/components/ActionButton/ActionButton.js +23 -23
  5. package/components/ActionButton/CopyButton.js +5 -5
  6. package/components/Alert/Alert.js +13 -13
  7. package/components/Avatar/Avatar.js +12 -12
  8. package/components/Badge/Badge.js +6 -6
  9. package/components/Breadcrumbs/Breadcrumbs.js +15 -15
  10. package/components/Button/Button.js +14 -14
  11. package/components/Card/Card.js +26 -26
  12. package/components/Chart/AreaChart.js +103 -103
  13. package/components/Chart/Axis.js +7 -7
  14. package/components/Chart/BarChart.js +62 -62
  15. package/components/Chart/ChartContainer.js +11 -11
  16. package/components/Chart/ChartLegend.js +7 -7
  17. package/components/Chart/ChartTooltip.js +13 -13
  18. package/components/Chart/LineChart.js +88 -88
  19. package/components/Chart/PieChart.js +25 -25
  20. package/components/Chart/RadarChart.js +42 -42
  21. package/components/Chart/Sparkline.js +11 -11
  22. package/components/Chart/TradingChart.js +126 -126
  23. package/components/Chart/trading/period.js +3 -3
  24. package/components/Chip/Chip.js +24 -24
  25. package/components/CodeBlock/CodeBlock.js +31 -31
  26. package/components/CommandPalette/CommandPalette.js +166 -166
  27. package/components/ConfirmDialog/ConfirmDialog.js +60 -60
  28. package/components/Divider/Divider.js +10 -10
  29. package/components/Draggable/Draggable.js +29 -29
  30. package/components/Drawer/Drawer.js +53 -53
  31. package/components/Dropdown/Dropdown.js +66 -66
  32. package/components/Dropdown/DropdownItem.js +13 -13
  33. package/components/Dropdown/DropdownLabel.js +5 -5
  34. package/components/Dropdown/DropdownSeparator.js +5 -5
  35. package/components/Dropzone/Dropzone.js +15 -15
  36. package/components/EmptyState/EmptyState.js +11 -11
  37. package/components/Form/Form.js +17 -17
  38. package/components/Form/FormField.js +21 -21
  39. package/components/Form/FormRow.js +3 -3
  40. package/components/ImageViewer/ImageViewer.js +118 -118
  41. package/components/Kbd/Kbd.js +11 -11
  42. package/components/KeyValueList/KeyValueList.js +32 -32
  43. package/components/Link/Link.js +7 -7
  44. package/components/List/List.js +7 -7
  45. package/components/Loader/Loader.js +39 -39
  46. package/components/Modal/Modal.js +48 -48
  47. package/components/PageHeader/PageHeader.js +18 -18
  48. package/components/Pagination/Pagination.js +23 -23
  49. package/components/Popover/Popover.js +25 -25
  50. package/components/ProgressBar/ProgressBar.js +17 -17
  51. package/components/RelativeTime/RelativeTime.js +10 -10
  52. package/components/SegmentedControl/SegmentedControl.js +38 -38
  53. package/components/Skeleton/Skeleton.js +10 -10
  54. package/components/Spinner/Spinner.js +7 -7
  55. package/components/SplitButton/SplitButton.js +63 -63
  56. package/components/SplitPane/SplitPane.js +50 -50
  57. package/components/StatCard/StatCard.js +32 -32
  58. package/components/StatusDot/StatusDot.js +7 -7
  59. package/components/Table/Table.js +174 -174
  60. package/components/Tabs/Tabs.js +47 -47
  61. package/components/ThemeToggle/ThemeToggle.js +31 -31
  62. package/components/Timeline/GanttTimeline.js +213 -213
  63. package/components/Timeline/HistoryTimeline.js +306 -306
  64. package/components/Timeline/TimelineShared.js +103 -103
  65. package/components/Timeline/TraceEventDetails.js +103 -103
  66. package/components/Timeline/TraceTimeline.js +546 -546
  67. package/components/Timeline/historyLayout.js +2 -2
  68. package/components/Timer/Timer.js +39 -39
  69. package/components/Toast/Toast.js +59 -59
  70. package/components/ToggleIconButton/ToggleIconButton.js +9 -9
  71. package/components/Tooltip/Tooltip.js +16 -16
  72. package/components/Typography/Typography.js +5 -5
  73. package/components/inputs/Checkbox/Checkbox.js +11 -11
  74. package/components/inputs/Checkbox/CheckboxGroup.js +21 -21
  75. package/components/inputs/DatePicker/CalendarPanel.js +113 -113
  76. package/components/inputs/DatePicker/DatePicker.js +39 -39
  77. package/components/inputs/DateTimePicker/DateTimePicker.js +119 -119
  78. package/components/inputs/DateTimePicker/DateTimeSegments.js +40 -40
  79. package/components/inputs/DateTimePicker/TimeField.js +34 -34
  80. package/components/inputs/Input/Input.js +13 -13
  81. package/components/inputs/NumberInput/NumberInput.js +16 -16
  82. package/components/inputs/Radio/Radio.js +17 -17
  83. package/components/inputs/SearchInput/SearchInput.js +25 -25
  84. package/components/inputs/Select/Select.d.ts +55 -3
  85. package/components/inputs/Select/Select.js +485 -344
  86. package/components/inputs/Select/{Select.module.js → Select.module.scss.js} +15 -3
  87. package/components/inputs/Slider/Slider.js +21 -21
  88. package/components/inputs/Switch/Switch.js +4 -4
  89. package/components/inputs/Textarea/Textarea.js +8 -8
  90. package/hooks/usePortalPosition.d.ts +2 -1
  91. package/hooks/usePortalPosition.js +6 -3
  92. package/hooks/useResizable.js +1 -1
  93. package/hooks/useTheme.js +7 -7
  94. package/index.css +1 -1
  95. package/index.js +1 -1
  96. package/index.layered.css +1 -1
  97. package/llms.txt +25 -4
  98. package/manifest.json +33 -4
  99. package/package.json +1 -1
  100. /package/components/Accordion/{Accordion.module.js → Accordion.module.scss.js} +0 -0
  101. /package/components/ActionButton/{ActionButton.module.js → ActionButton.module.scss.js} +0 -0
  102. /package/components/Alert/{Alert.module.js → Alert.module.scss.js} +0 -0
  103. /package/components/Avatar/{Avatar.module.js → Avatar.module.scss.js} +0 -0
  104. /package/components/Badge/{Badge.module.js → Badge.module.scss.js} +0 -0
  105. /package/components/Breadcrumbs/{Breadcrumbs.module.js → Breadcrumbs.module.scss.js} +0 -0
  106. /package/components/Button/{Button.module.js → Button.module.scss.js} +0 -0
  107. /package/components/Card/{Card.module.js → Card.module.scss.js} +0 -0
  108. /package/components/Chart/{Chart.module.js → Chart.module.scss.js} +0 -0
  109. /package/components/Chip/{Chip.module.js → Chip.module.scss.js} +0 -0
  110. /package/components/CodeBlock/{CodeBlock.module.js → CodeBlock.module.scss.js} +0 -0
  111. /package/components/CommandPalette/{CommandPalette.module.js → CommandPalette.module.scss.js} +0 -0
  112. /package/components/ConfirmDialog/{ConfirmDialog.module.js → ConfirmDialog.module.scss.js} +0 -0
  113. /package/components/Divider/{Divider.module.js → Divider.module.scss.js} +0 -0
  114. /package/components/Draggable/{Draggable.module.js → Draggable.module.scss.js} +0 -0
  115. /package/components/Drawer/{Drawer.module.js → Drawer.module.scss.js} +0 -0
  116. /package/components/Dropdown/{Dropdown.module.js → Dropdown.module.scss.js} +0 -0
  117. /package/components/Dropzone/{Dropzone.module.js → Dropzone.module.scss.js} +0 -0
  118. /package/components/EmptyState/{EmptyState.module.js → EmptyState.module.scss.js} +0 -0
  119. /package/components/Form/{Form.module.js → Form.module.scss.js} +0 -0
  120. /package/components/ImageViewer/{ImageViewer.module.js → ImageViewer.module.scss.js} +0 -0
  121. /package/components/Kbd/{Kbd.module.js → Kbd.module.scss.js} +0 -0
  122. /package/components/KeyValueList/{KeyValueList.module.js → KeyValueList.module.scss.js} +0 -0
  123. /package/components/Link/{Link.module.js → Link.module.scss.js} +0 -0
  124. /package/components/List/{List.module.js → List.module.scss.js} +0 -0
  125. /package/components/Loader/{Loader.module.js → Loader.module.scss.js} +0 -0
  126. /package/components/Modal/{Modal.module.js → Modal.module.scss.js} +0 -0
  127. /package/components/PageHeader/{PageHeader.module.js → PageHeader.module.scss.js} +0 -0
  128. /package/components/Pagination/{Pagination.module.js → Pagination.module.scss.js} +0 -0
  129. /package/components/Popover/{Popover.module.js → Popover.module.scss.js} +0 -0
  130. /package/components/ProgressBar/{ProgressBar.module.js → ProgressBar.module.scss.js} +0 -0
  131. /package/components/RelativeTime/{RelativeTime.module.js → RelativeTime.module.scss.js} +0 -0
  132. /package/components/SegmentedControl/{SegmentedControl.module.js → SegmentedControl.module.scss.js} +0 -0
  133. /package/components/Skeleton/{Skeleton.module.js → Skeleton.module.scss.js} +0 -0
  134. /package/components/Spinner/{Spinner.module.js → Spinner.module.scss.js} +0 -0
  135. /package/components/SplitButton/{SplitButton.module.js → SplitButton.module.scss.js} +0 -0
  136. /package/components/SplitPane/{SplitPane.module.js → SplitPane.module.scss.js} +0 -0
  137. /package/components/StatCard/{StatCard.module.js → StatCard.module.scss.js} +0 -0
  138. /package/components/StatusDot/{StatusDot.module.js → StatusDot.module.scss.js} +0 -0
  139. /package/components/Table/{Table.module.js → Table.module.scss.js} +0 -0
  140. /package/components/Tabs/{Tabs.module.js → Tabs.module.scss.js} +0 -0
  141. /package/components/ThemeToggle/{ThemeToggle.module.js → ThemeToggle.module.scss.js} +0 -0
  142. /package/components/Timeline/{GanttTimeline.module.js → GanttTimeline.module.scss.js} +0 -0
  143. /package/components/Timeline/{HistoryTimeline.module.js → HistoryTimeline.module.scss.js} +0 -0
  144. /package/components/Timeline/{Timeline.module.js → Timeline.module.scss.js} +0 -0
  145. /package/components/Timeline/{TraceTimeline.module.js → TraceTimeline.module.scss.js} +0 -0
  146. /package/components/Timer/{Timer.module.js → Timer.module.scss.js} +0 -0
  147. /package/components/Toast/{Toast.module.js → Toast.module.scss.js} +0 -0
  148. /package/components/ToggleIconButton/{ToggleIconButton.module.js → ToggleIconButton.module.scss.js} +0 -0
  149. /package/components/Tooltip/{Tooltip.module.js → Tooltip.module.scss.js} +0 -0
  150. /package/components/Typography/{Typography.module.js → Typography.module.scss.js} +0 -0
  151. /package/components/inputs/Checkbox/{Checkbox.module.js → Checkbox.module.scss.js} +0 -0
  152. /package/components/inputs/Checkbox/{CheckboxGroup.module.js → CheckboxGroup.module.scss.js} +0 -0
  153. /package/components/inputs/DatePicker/{CalendarPanel.module.js → CalendarPanel.module.scss.js} +0 -0
  154. /package/components/inputs/DatePicker/{DatePicker.module.js → DatePicker.module.scss.js} +0 -0
  155. /package/components/inputs/DateTimePicker/{DateTimePicker.module.js → DateTimePicker.module.scss.js} +0 -0
  156. /package/components/inputs/Input/{Input.module.js → Input.module.scss.js} +0 -0
  157. /package/components/inputs/NumberInput/{NumberInput.module.js → NumberInput.module.scss.js} +0 -0
  158. /package/components/inputs/Radio/{Radio.module.js → Radio.module.scss.js} +0 -0
  159. /package/components/inputs/SearchInput/{SearchInput.module.js → SearchInput.module.scss.js} +0 -0
  160. /package/components/inputs/Slider/{Slider.module.js → Slider.module.scss.js} +0 -0
  161. /package/components/inputs/Textarea/{Textarea.module.js → Textarea.module.scss.js} +0 -0
@@ -1,15 +1,15 @@
1
- import e from "./ImageViewer.module.js";
2
- import { useFocusTrap as t } from "../../hooks/useFocusTrap.js";
3
- import { EscapeLayerProvider as n, useEscapeLayer as r } from "../../hooks/useEscapeLayer.js";
4
- import { useKeyboard as i } from "../../hooks/useKeyboard.js";
5
- import { Spinner as a } from "../Spinner/Spinner.js";
6
- import { useZoomPan as o } from "./useZoomPan.js";
7
- import { forwardRef as s, useCallback as c, useEffect as l, useId as u, useRef as d, useState as f } from "react";
8
- import p from "clsx";
9
- import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
1
+ import { forwardRef as e, useCallback as t, useEffect as n, useId as r, useRef as i, useState as a } from "react";
10
2
  import { createPortal as ee } from "react-dom";
3
+ import o from "clsx";
4
+ import s from "./ImageViewer.module.scss.js";
5
+ import { useFocusTrap as te } from "../../hooks/useFocusTrap.js";
6
+ import { EscapeLayerProvider as c, useEscapeLayer as l } from "../../hooks/useEscapeLayer.js";
7
+ import { useKeyboard as u } from "../../hooks/useKeyboard.js";
8
+ import { Spinner as d } from "../Spinner/Spinner.js";
9
+ import { useZoomPan as ne } from "./useZoomPan.js";
10
+ import { Fragment as re, jsx as f, jsxs as p } from "react/jsx-runtime";
11
11
  // src/components/ImageViewer/ImageViewer.tsx
12
- var te = {
12
+ var m = {
13
13
  viewer: "Image viewer",
14
14
  close: "Close",
15
15
  previous: "Previous image",
@@ -20,15 +20,15 @@ var te = {
20
20
  fit: "Fit to screen",
21
21
  download: "Download",
22
22
  loading: "Loading image"
23
- }, ne = 60, _ = () => /* @__PURE__ */ h("svg", {
23
+ }, h = 60, g = () => /* @__PURE__ */ f("svg", {
24
24
  viewBox: "0 0 20 20",
25
25
  fill: "none",
26
26
  stroke: "currentColor",
27
27
  strokeWidth: "2",
28
28
  strokeLinecap: "round",
29
29
  "aria-hidden": "true",
30
- children: /* @__PURE__ */ h("path", { d: "M5 5l10 10M15 5L5 15" })
31
- }), v = ({ dir: e }) => /* @__PURE__ */ h("svg", {
30
+ children: /* @__PURE__ */ f("path", { d: "M5 5l10 10M15 5L5 15" })
31
+ }), _ = ({ dir: e }) => /* @__PURE__ */ f("svg", {
32
32
  viewBox: "0 0 20 20",
33
33
  fill: "none",
34
34
  stroke: "currentColor",
@@ -36,8 +36,8 @@ var te = {
36
36
  strokeLinecap: "round",
37
37
  strokeLinejoin: "round",
38
38
  "aria-hidden": "true",
39
- children: e === "left" ? /* @__PURE__ */ h("path", { d: "M12.5 4.5L7 10l5.5 5.5" }) : /* @__PURE__ */ h("path", { d: "M7.5 4.5L13 10l-5.5 5.5" })
40
- }), y = () => /* @__PURE__ */ h("svg", {
39
+ children: e === "left" ? /* @__PURE__ */ f("path", { d: "M12.5 4.5L7 10l5.5 5.5" }) : /* @__PURE__ */ f("path", { d: "M7.5 4.5L13 10l-5.5 5.5" })
40
+ }), v = () => /* @__PURE__ */ f("svg", {
41
41
  viewBox: "0 0 20 20",
42
42
  fill: "none",
43
43
  stroke: "currentColor",
@@ -45,8 +45,8 @@ var te = {
45
45
  strokeLinecap: "round",
46
46
  strokeLinejoin: "round",
47
47
  "aria-hidden": "true",
48
- children: /* @__PURE__ */ h("path", { d: "M10 3v10m0 0l-4-4m4 4l4-4M4 16h12" })
49
- }), b = () => /* @__PURE__ */ h("svg", {
48
+ children: /* @__PURE__ */ f("path", { d: "M10 3v10m0 0l-4-4m4 4l4-4M4 16h12" })
49
+ }), y = () => /* @__PURE__ */ f("svg", {
50
50
  viewBox: "0 0 20 20",
51
51
  fill: "none",
52
52
  stroke: "currentColor",
@@ -54,8 +54,8 @@ var te = {
54
54
  strokeLinecap: "round",
55
55
  strokeLinejoin: "round",
56
56
  "aria-hidden": "true",
57
- children: /* @__PURE__ */ h("path", { d: "M4 10a6 6 0 1 1 1.8 4.3M4 15v-4h4" })
58
- }), x = () => /* @__PURE__ */ h("svg", {
57
+ children: /* @__PURE__ */ f("path", { d: "M4 10a6 6 0 1 1 1.8 4.3M4 15v-4h4" })
58
+ }), b = () => /* @__PURE__ */ f("svg", {
59
59
  viewBox: "0 0 20 20",
60
60
  fill: "none",
61
61
  stroke: "currentColor",
@@ -63,60 +63,60 @@ var te = {
63
63
  strokeLinecap: "round",
64
64
  strokeLinejoin: "round",
65
65
  "aria-hidden": "true",
66
- children: /* @__PURE__ */ h("path", { d: "M3 8V3h5M12 3h5v5M17 12v5h-5M8 17H3v-5" })
67
- }), S = s(({ open: s, onClose: S, items: C, index: w, defaultIndex: T = 0, onIndexChange: E, loop: D = !0, showCounter: re = !0, showThumbnails: ie = !1, showZoomControls: ae = !0, showDownload: oe, renderSlide: O, closeOnBackdrop: se = !0, zoom: ce, labels: le, classes: k, className: ue, style: de }, A) => {
66
+ children: /* @__PURE__ */ f("path", { d: "M3 8V3h5M12 3h5v5M17 12v5h-5M8 17H3v-5" })
67
+ }), x = e(({ open: e, onClose: x, items: S, index: C, defaultIndex: ie = 0, onIndexChange: w, loop: T = !0, showCounter: ae = !0, showThumbnails: oe = !1, showZoomControls: se = !0, showDownload: ce, renderSlide: E, closeOnBackdrop: le = !0, zoom: ue, labels: de, classes: D, className: O, style: k }, A) => {
68
68
  let j = {
69
- ...te,
70
- ...le
71
- }, M = C.length, N = w !== void 0, [P, F] = f(T), I = M === 0 ? 0 : Math.min(Math.max(0, N ? w : P), M - 1), L = C[I], R = d(null), z = (e) => {
69
+ ...m,
70
+ ...de
71
+ }, M = S.length, N = C !== void 0, [P, F] = a(ie), I = M === 0 ? 0 : Math.min(Math.max(0, N ? C : P), M - 1), L = S[I], R = i(null), z = (e) => {
72
72
  R.current = e, typeof A == "function" ? A(e) : A && (A.current = e);
73
- }, B = o(ce), { reset: V, scale: H, isPanning: fe } = B, U = c((e) => {
73
+ }, B = ne(ue), { reset: V, scale: H, isPanning: fe } = B, U = t((e) => {
74
74
  if (M === 0) return;
75
75
  let t = e;
76
- t = D ? (e % M + M) % M : Math.min(Math.max(0, e), M - 1), t !== I && (N || F(t), E?.(t));
76
+ t = T ? (e % M + M) % M : Math.min(Math.max(0, e), M - 1), t !== I && (N || F(t), w?.(t));
77
77
  }, [
78
78
  M,
79
- D,
79
+ T,
80
80
  I,
81
81
  N,
82
- E
83
- ]), W = D ? M > 1 : I > 0, G = D ? M > 1 : I < M - 1, K = c(() => W && U(I - 1), [
82
+ w
83
+ ]), W = T ? M > 1 : I > 0, G = T ? M > 1 : I < M - 1, K = t(() => W && U(I - 1), [
84
84
  W,
85
85
  U,
86
86
  I
87
- ]), q = c(() => G && U(I + 1), [
87
+ ]), q = t(() => G && U(I + 1), [
88
88
  G,
89
89
  U,
90
90
  I
91
- ]), [J, Y] = f(!1);
92
- l(() => {
91
+ ]), [J, Y] = a(!1);
92
+ n(() => {
93
93
  Y(!1), V();
94
94
  }, [
95
95
  I,
96
96
  L?.src,
97
97
  V
98
- ]), l(() => {
99
- if (!s || M < 2 || typeof Image > "u") return;
100
- let e = [C[(I + 1) % M], C[(I - 1 + M) % M]];
101
- for (let t of e) {
102
- if (!t) continue;
103
- let e = new Image();
104
- e.src = t.src;
98
+ ]), n(() => {
99
+ if (!e || M < 2 || typeof Image > "u") return;
100
+ let t = [S[(I + 1) % M], S[(I - 1 + M) % M]];
101
+ for (let e of t) {
102
+ if (!e) continue;
103
+ let t = new Image();
104
+ t.src = e.src;
105
105
  }
106
106
  }, [
107
- s,
107
+ e,
108
108
  I,
109
- C,
109
+ S,
110
110
  M
111
- ]), t(R, s);
112
- let pe = r(() => S(), s);
113
- l(() => {
114
- if (!s) return;
115
- let e = document.body.style.overflow;
111
+ ]), te(R, e);
112
+ let pe = l(() => x(), e);
113
+ n(() => {
114
+ if (!e) return;
115
+ let t = document.body.style.overflow;
116
116
  return document.body.style.overflow = "hidden", () => {
117
- document.body.style.overflow = e;
117
+ document.body.style.overflow = t;
118
118
  };
119
- }, [s]), i({
119
+ }, [e]), u({
120
120
  ArrowLeft: K,
121
121
  ArrowRight: q,
122
122
  "+": B.zoomIn,
@@ -124,10 +124,10 @@ var te = {
124
124
  "-": B.zoomOut,
125
125
  0: B.reset
126
126
  }, {
127
- active: s,
127
+ active: e,
128
128
  ignoreEditable: !0
129
129
  });
130
- let X = d(null), Z = d(!1), me = (e) => {
130
+ let X = i(null), Z = i(!1), me = (e) => {
131
131
  X.current = {
132
132
  x: e.clientX ?? 0,
133
133
  y: e.clientY ?? 0
@@ -137,36 +137,36 @@ var te = {
137
137
  let t = X.current;
138
138
  if (X.current = null, !t) return;
139
139
  let n = (e.clientX ?? 0) - t.x, r = (e.clientY ?? 0) - t.y;
140
- Math.hypot(n, r) >= 5 && (Z.current = !0), H === 1 && Math.abs(n) > ne && Math.abs(n) > Math.abs(r) && (n < 0 ? q() : K());
140
+ Math.hypot(n, r) >= 5 && (Z.current = !0), H === 1 && Math.abs(n) > h && Math.abs(n) > Math.abs(r) && (n < 0 ? q() : K());
141
141
  }, he = (e) => {
142
142
  let t = Z.current;
143
- Z.current = !1, se && !t && e.target === e.currentTarget && S();
144
- }, ge = u();
145
- if (!s || M === 0 || !L) return null;
146
- let _e = oe ?? !!L.download, ve = typeof L.download == "string" ? L.download : L.src, $ = O ? O(L, {
143
+ Z.current = !1, le && !t && e.target === e.currentTarget && x();
144
+ }, ge = r();
145
+ if (!e || M === 0 || !L) return null;
146
+ let _e = ce ?? !!L.download, ve = typeof L.download == "string" ? L.download : L.src, $ = E ? E(L, {
147
147
  index: I,
148
148
  active: !0
149
149
  }) : null, ye = `${Math.round(H * 100)}%`;
150
- return ee(/* @__PURE__ */ h("div", {
150
+ return ee(/* @__PURE__ */ f("div", {
151
151
  ref: z,
152
- className: p(e.root, k?.root, ue),
153
- style: de,
152
+ className: o(s.root, D?.root, O),
153
+ style: k,
154
154
  role: "dialog",
155
155
  "aria-modal": "true",
156
156
  "aria-label": L.alt || j.viewer,
157
157
  "data-index": I,
158
- children: /* @__PURE__ */ g(n, {
158
+ children: /* @__PURE__ */ p(c, {
159
159
  value: pe,
160
160
  children: [
161
- /* @__PURE__ */ h("div", {
162
- className: p(e.backdrop, k?.backdrop),
161
+ /* @__PURE__ */ f("div", {
162
+ className: o(s.backdrop, D?.backdrop),
163
163
  "aria-hidden": "true"
164
164
  }),
165
- /* @__PURE__ */ g("div", {
166
- className: p(e.toolbar, k?.toolbar),
165
+ /* @__PURE__ */ p("div", {
166
+ className: o(s.toolbar, D?.toolbar),
167
167
  children: [
168
- re && M > 1 && /* @__PURE__ */ g("span", {
169
- className: p(e.counter, k?.counter),
168
+ ae && M > 1 && /* @__PURE__ */ p("span", {
169
+ className: o(s.counter, D?.counter),
170
170
  "aria-live": "polite",
171
171
  children: [
172
172
  I + 1,
@@ -174,139 +174,139 @@ var te = {
174
174
  M
175
175
  ]
176
176
  }),
177
- /* @__PURE__ */ h("span", { className: e.spacer }),
178
- ae && /* @__PURE__ */ g("div", {
179
- className: p(e.zoomControls, k?.zoomControls),
177
+ /* @__PURE__ */ f("span", { className: s.spacer }),
178
+ se && /* @__PURE__ */ p("div", {
179
+ className: o(s.zoomControls, D?.zoomControls),
180
180
  role: "group",
181
181
  "aria-label": "Zoom",
182
182
  children: [
183
- /* @__PURE__ */ h("button", {
183
+ /* @__PURE__ */ f("button", {
184
184
  type: "button",
185
- className: e.control,
185
+ className: s.control,
186
186
  onClick: B.zoomOut,
187
187
  "aria-label": j.zoomOut,
188
188
  children: "−"
189
189
  }),
190
- /* @__PURE__ */ h("span", {
191
- className: e.zoomValue,
190
+ /* @__PURE__ */ f("span", {
191
+ className: s.zoomValue,
192
192
  "data-testid": "zoom-value",
193
193
  children: ye
194
194
  }),
195
- /* @__PURE__ */ h("button", {
195
+ /* @__PURE__ */ f("button", {
196
196
  type: "button",
197
- className: e.control,
197
+ className: s.control,
198
198
  onClick: B.zoomIn,
199
199
  "aria-label": j.zoomIn,
200
200
  children: "+"
201
201
  }),
202
- /* @__PURE__ */ h("button", {
202
+ /* @__PURE__ */ f("button", {
203
203
  type: "button",
204
- className: e.control,
204
+ className: s.control,
205
205
  onClick: B.reset,
206
206
  "aria-label": j.reset,
207
- children: /* @__PURE__ */ h(b, {})
207
+ children: /* @__PURE__ */ f(y, {})
208
208
  }),
209
- /* @__PURE__ */ h("button", {
209
+ /* @__PURE__ */ f("button", {
210
210
  type: "button",
211
- className: e.control,
211
+ className: s.control,
212
212
  onClick: B.fit,
213
213
  "aria-label": j.fit,
214
- children: /* @__PURE__ */ h(x, {})
214
+ children: /* @__PURE__ */ f(b, {})
215
215
  })
216
216
  ]
217
217
  }),
218
- _e && /* @__PURE__ */ h("a", {
219
- className: e.control,
218
+ _e && /* @__PURE__ */ f("a", {
219
+ className: s.control,
220
220
  href: ve,
221
221
  download: !0,
222
222
  "aria-label": j.download,
223
223
  target: "_blank",
224
224
  rel: "noreferrer",
225
- children: /* @__PURE__ */ h(y, {})
225
+ children: /* @__PURE__ */ f(v, {})
226
226
  }),
227
- /* @__PURE__ */ h("button", {
227
+ /* @__PURE__ */ f("button", {
228
228
  type: "button",
229
- className: e.control,
230
- onClick: S,
229
+ className: s.control,
230
+ onClick: x,
231
231
  "aria-label": j.close,
232
- children: /* @__PURE__ */ h(_, {})
232
+ children: /* @__PURE__ */ f(g, {})
233
233
  })
234
234
  ]
235
235
  }),
236
- /* @__PURE__ */ g("div", {
237
- className: e.body,
236
+ /* @__PURE__ */ p("div", {
237
+ className: s.body,
238
238
  children: [
239
- M > 1 && W && /* @__PURE__ */ h("button", {
239
+ M > 1 && W && /* @__PURE__ */ f("button", {
240
240
  type: "button",
241
- className: p(e.nav, e.navPrev, k?.nav, k?.navPrev),
241
+ className: o(s.nav, s.navPrev, D?.nav, D?.navPrev),
242
242
  onClick: K,
243
243
  "aria-label": j.previous,
244
- children: /* @__PURE__ */ h(v, { dir: "left" })
244
+ children: /* @__PURE__ */ f(_, { dir: "left" })
245
245
  }),
246
- /* @__PURE__ */ h("div", {
247
- className: p(e.stage, fe && e.panning, k?.stage),
246
+ /* @__PURE__ */ f("div", {
247
+ className: o(s.stage, fe && s.panning, D?.stage),
248
248
  ...B.stageProps,
249
249
  onPointerDown: me,
250
250
  onPointerUp: Q,
251
251
  onClick: he,
252
252
  style: B.stageProps.style,
253
253
  "data-testid": "image-viewer-stage",
254
- children: $ ? /* @__PURE__ */ h("div", {
254
+ children: $ ? /* @__PURE__ */ f("div", {
255
255
  ref: B.contentRef,
256
- className: p(e.image, k?.image),
256
+ className: o(s.image, D?.image),
257
257
  style: B.contentStyle,
258
258
  children: $
259
- }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("img", {
259
+ }) : /* @__PURE__ */ p(re, { children: [/* @__PURE__ */ f("img", {
260
260
  ref: B.contentRef,
261
- className: p(e.image, !J && e.imageLoading, k?.image),
261
+ className: o(s.image, !J && s.imageLoading, D?.image),
262
262
  style: B.contentStyle,
263
263
  src: L.src,
264
264
  alt: L.alt ?? "",
265
265
  draggable: !1,
266
266
  onLoad: () => Y(!0),
267
267
  onError: () => Y(!0)
268
- }, L.src), !J && /* @__PURE__ */ h("span", {
269
- className: e.spinner,
270
- children: /* @__PURE__ */ h(a, {
268
+ }, L.src), !J && /* @__PURE__ */ f("span", {
269
+ className: s.spinner,
270
+ children: /* @__PURE__ */ f(d, {
271
271
  size: "lg",
272
272
  label: j.loading
273
273
  })
274
274
  })] })
275
275
  }),
276
- M > 1 && G && /* @__PURE__ */ h("button", {
276
+ M > 1 && G && /* @__PURE__ */ f("button", {
277
277
  type: "button",
278
- className: p(e.nav, e.navNext, k?.nav, k?.navNext),
278
+ className: o(s.nav, s.navNext, D?.nav, D?.navNext),
279
279
  onClick: q,
280
280
  "aria-label": j.next,
281
- children: /* @__PURE__ */ h(v, { dir: "right" })
281
+ children: /* @__PURE__ */ f(_, { dir: "right" })
282
282
  })
283
283
  ]
284
284
  }),
285
- L.caption && /* @__PURE__ */ h("div", {
285
+ L.caption && /* @__PURE__ */ f("div", {
286
286
  id: ge,
287
- className: p(e.caption, k?.caption),
287
+ className: o(s.caption, D?.caption),
288
288
  children: L.caption
289
289
  }),
290
- ie && M > 1 && /* @__PURE__ */ h("div", {
291
- className: p(e.thumbnails, k?.thumbnails),
290
+ oe && M > 1 && /* @__PURE__ */ f("div", {
291
+ className: o(s.thumbnails, D?.thumbnails),
292
292
  role: "list",
293
- children: C.map((t, n) => /* @__PURE__ */ h("button", {
293
+ children: S.map((e, t) => /* @__PURE__ */ f("button", {
294
294
  type: "button",
295
295
  role: "listitem",
296
- className: p(e.thumbnail, n === I && e.thumbnailActive, k?.thumbnail, n === I && k?.thumbnailActive),
297
- onClick: () => U(n),
298
- "aria-label": t.alt || `${n + 1}`,
299
- "aria-current": n === I ? "true" : void 0,
300
- children: /* @__PURE__ */ h("img", {
301
- src: t.thumbnail ?? t.src,
296
+ className: o(s.thumbnail, t === I && s.thumbnailActive, D?.thumbnail, t === I && D?.thumbnailActive),
297
+ onClick: () => U(t),
298
+ "aria-label": e.alt || `${t + 1}`,
299
+ "aria-current": t === I ? "true" : void 0,
300
+ children: /* @__PURE__ */ f("img", {
301
+ src: e.thumbnail ?? e.src,
302
302
  alt: "",
303
303
  draggable: !1
304
304
  })
305
- }, `${t.src}-${n}`))
305
+ }, `${e.src}-${t}`))
306
306
  })
307
307
  ]
308
308
  })
309
309
  }), document.body);
310
310
  });
311
- S.displayName = "ImageViewer";
312
- export { S as ImageViewer };
311
+ x.displayName = "ImageViewer";
312
+ export { x as ImageViewer };
@@ -1,23 +1,23 @@
1
- import e from "./Kbd.module.js";
2
- import { Fragment as t, forwardRef as n } from "react";
3
- import r from "clsx";
1
+ import { Fragment as e, forwardRef as t } from "react";
2
+ import n from "clsx";
3
+ import r from "./Kbd.module.scss.js";
4
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
5
  // src/components/Kbd/Kbd.tsx
6
- var o = n(({ size: n = "md", keys: o, classes: s, className: c, children: l, ...u }, d) => o && o.length > 0 ? /* @__PURE__ */ i("kbd", {
6
+ var o = t(({ size: t = "md", keys: o, classes: s, className: c, children: l, ...u }, d) => o && o.length > 0 ? /* @__PURE__ */ i("kbd", {
7
7
  ref: d,
8
- className: r(e.group, e[n], s?.root, c),
8
+ className: n(r.group, r[t], s?.root, c),
9
9
  ...u,
10
- children: o.map((n, o) => /* @__PURE__ */ a(t, { children: [o > 0 && /* @__PURE__ */ i("span", {
11
- className: r(e.separator, s?.separator),
10
+ children: o.map((t, o) => /* @__PURE__ */ a(e, { children: [o > 0 && /* @__PURE__ */ i("span", {
11
+ className: n(r.separator, s?.separator),
12
12
  "aria-hidden": "true",
13
13
  children: "+"
14
14
  }), /* @__PURE__ */ i("kbd", {
15
- className: r(e.root, e.key, s?.key),
16
- children: n
17
- })] }, `${n}-${o}`))
15
+ className: n(r.root, r.key, s?.key),
16
+ children: t
17
+ })] }, `${t}-${o}`))
18
18
  }) : /* @__PURE__ */ i("kbd", {
19
19
  ref: d,
20
- className: r(e.root, e[n], s?.root, c),
20
+ className: n(r.root, r[t], s?.root, c),
21
21
  ...u,
22
22
  children: l
23
23
  }));
@@ -1,58 +1,58 @@
1
- import e from "./KeyValueList.module.js";
2
- import { CopyButton as t } from "../ActionButton/CopyButton.js";
3
- import { forwardRef as n, useState as r } from "react";
4
- import i from "clsx";
1
+ import { forwardRef as e, useState as t } from "react";
2
+ import n from "clsx";
3
+ import r from "./KeyValueList.module.scss.js";
4
+ import { CopyButton as i } from "../ActionButton/CopyButton.js";
5
5
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
6
  // src/components/KeyValueList/KeyValueList.tsx
7
7
  var s = (e) => e == null || e === "", c = (e) => typeof e == "number" ? `${e}px` : e;
8
8
  function l(e) {
9
9
  return typeof e.copyable == "string" ? e.copyable : e.copyable && (typeof e.value == "string" || typeof e.value == "number") ? String(e.value) : null;
10
10
  }
11
- function u({ item: n, emptyValue: c, copyLabel: u, revealLabels: p, classes: m }) {
12
- let [h, g] = r(!1), _ = s(n.value), v = _ ? null : l(n), y = n.masked && !h, b;
13
- b = _ ? n.empty ?? c : y ? /* @__PURE__ */ a("span", {
14
- className: i(e.maskedText, m?.masked),
11
+ function u({ item: e, emptyValue: c, copyLabel: u, revealLabels: p, classes: m }) {
12
+ let [h, g] = t(!1), _ = s(e.value), v = _ ? null : l(e), y = e.masked && !h, b;
13
+ b = _ ? e.empty ?? c : y ? /* @__PURE__ */ a("span", {
14
+ className: n(r.maskedText, m?.masked),
15
15
  "aria-hidden": "true",
16
16
  children: "••••••••"
17
- }) : n.href ? /* @__PURE__ */ a("a", {
18
- className: e.link,
19
- href: n.href,
20
- children: n.value
21
- }) : n.value;
22
- let x = n.masked && !_ || v !== null;
17
+ }) : e.href ? /* @__PURE__ */ a("a", {
18
+ className: r.link,
19
+ href: e.href,
20
+ children: e.value
21
+ }) : e.value;
22
+ let x = e.masked && !_ || v !== null;
23
23
  return /* @__PURE__ */ o("div", {
24
- className: i(e.item, m?.item),
24
+ className: n(r.item, m?.item),
25
25
  children: [/* @__PURE__ */ a("dt", {
26
- className: i(e.label, m?.label),
27
- children: n.label
26
+ className: n(r.label, m?.label),
27
+ children: e.label
28
28
  }), /* @__PURE__ */ o("dd", {
29
- className: i(e.value, n.mono && e.mono, n.mono && m?.mono, _ && e.empty, m?.value),
29
+ className: n(r.value, e.mono && r.mono, e.mono && m?.mono, _ && r.empty, m?.value),
30
30
  children: [/* @__PURE__ */ o("span", {
31
- className: e.valueMain,
31
+ className: r.valueMain,
32
32
  children: [/* @__PURE__ */ a("span", {
33
- className: e.valueText,
33
+ className: r.valueText,
34
34
  children: b
35
35
  }), x && /* @__PURE__ */ o("span", {
36
- className: i(e.actions, m?.actions),
37
- children: [n.masked && !_ && /* @__PURE__ */ a("button", {
36
+ className: n(r.actions, m?.actions),
37
+ children: [e.masked && !_ && /* @__PURE__ */ a("button", {
38
38
  type: "button",
39
- className: i(e.reveal, m?.reveal),
39
+ className: n(r.reveal, m?.reveal),
40
40
  "aria-label": h ? p.hide : p.show,
41
41
  "aria-pressed": h,
42
42
  onClick: () => g((e) => !e),
43
43
  children: a(h ? f : d, {})
44
- }), v !== null && /* @__PURE__ */ a(t, {
44
+ }), v !== null && /* @__PURE__ */ a(i, {
45
45
  value: v,
46
46
  iconOnly: !0,
47
47
  size: "sm",
48
48
  variant: "ghost",
49
49
  "aria-label": u,
50
- className: i(e.copy, m?.copy)
50
+ className: n(r.copy, m?.copy)
51
51
  })]
52
52
  })]
53
- }), n.hint && /* @__PURE__ */ a("span", {
54
- className: i(e.hint, m?.hint),
55
- children: n.hint
53
+ }), e.hint && /* @__PURE__ */ a("span", {
54
+ className: n(r.hint, m?.hint),
55
+ children: e.hint
56
56
  })]
57
57
  })]
58
58
  });
@@ -94,23 +94,23 @@ function f() {
94
94
  ]
95
95
  });
96
96
  }
97
- var p = n(({ items: t, layout: n = "rows", columns: r = 2, labelWidth: o = "10rem", size: s = "md", dividers: l = !0, emptyValue: d = "—", copyLabel: f = "Copy", revealLabels: p = {
97
+ var p = e(({ items: e, layout: t = "rows", columns: i = 2, labelWidth: o = "10rem", size: s = "md", dividers: l = !0, emptyValue: d = "—", copyLabel: f = "Copy", revealLabels: p = {
98
98
  show: "Show",
99
99
  hide: "Hide"
100
100
  }, classes: m, className: h, style: g, ..._ }, v) => {
101
101
  let y = {
102
102
  "--crk-kv-label-width": c(o),
103
- "--crk-kv-columns": n === "grid" ? String(Math.max(1, r)) : void 0
103
+ "--crk-kv-columns": t === "grid" ? String(Math.max(1, i)) : void 0
104
104
  };
105
105
  return /* @__PURE__ */ a("dl", {
106
106
  ref: v,
107
- className: i(e.root, e[n], e[s], n === "rows" && l && e.dividers, m?.root, h),
107
+ className: n(r.root, r[t], r[s], t === "rows" && l && r.dividers, m?.root, h),
108
108
  style: {
109
109
  ...y,
110
110
  ...g
111
111
  },
112
112
  ..._,
113
- children: t.map((e, t) => /* @__PURE__ */ a(u, {
113
+ children: e.map((e, t) => /* @__PURE__ */ a(u, {
114
114
  item: e,
115
115
  emptyValue: d,
116
116
  copyLabel: f,
@@ -1,13 +1,13 @@
1
- import e from "./Link.module.js";
2
- import { forwardRef as t } from "react";
3
- import n from "clsx";
1
+ import { forwardRef as e } from "react";
2
+ import t from "clsx";
3
+ import n from "./Link.module.scss.js";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
5
  // src/components/Link/Link.tsx
6
- var a = t(({ variant: t = "default", external: a = !1, hideExternalIcon: o = !1, className: s, style: c, children: l, ...u }, d) => {
6
+ var a = e(({ variant: e = "default", external: a = !1, hideExternalIcon: o = !1, className: s, style: c, children: l, ...u }, d) => {
7
7
  let f = a || u.target === "_blank";
8
8
  return /* @__PURE__ */ i("a", {
9
9
  ref: d,
10
- className: n(e.root, e[t], s),
10
+ className: t(n.root, n[e], s),
11
11
  style: c,
12
12
  ...a && {
13
13
  target: "_blank",
@@ -17,7 +17,7 @@ var a = t(({ variant: t = "default", external: a = !1, hideExternalIcon: o = !1,
17
17
  children: [
18
18
  l,
19
19
  f && !o && /* @__PURE__ */ i("svg", {
20
- className: e.externalIcon,
20
+ className: n.externalIcon,
21
21
  viewBox: "0 0 24 24",
22
22
  width: "1em",
23
23
  height: "1em",
@@ -35,7 +35,7 @@ var a = t(({ variant: t = "default", external: a = !1, hideExternalIcon: o = !1,
35
35
  ]
36
36
  }),
37
37
  f && /* @__PURE__ */ r("span", {
38
- className: e.srOnly,
38
+ className: n.srOnly,
39
39
  children: " (opens in a new tab)"
40
40
  })
41
41
  ]
@@ -1,19 +1,19 @@
1
- import e from "./List.module.js";
2
- import { forwardRef as t } from "react";
3
- import n from "clsx";
1
+ import { forwardRef as e } from "react";
2
+ import t from "clsx";
3
+ import n from "./List.module.scss.js";
4
4
  import { jsx as r } from "react/jsx-runtime";
5
5
  // src/components/List/List.tsx
6
- var i = t(({ variant: t = "unordered", spacing: i = "md", className: a, style: o, children: s, ...c }, l) => /* @__PURE__ */ r(t === "ordered" ? "ol" : "ul", {
6
+ var i = e(({ variant: e = "unordered", spacing: i = "md", className: a, style: o, children: s, ...c }, l) => /* @__PURE__ */ r(e === "ordered" ? "ol" : "ul", {
7
7
  ref: l,
8
- className: n(e.root, e[t], e[i], a),
8
+ className: t(n.root, n[e], n[i], a),
9
9
  style: o,
10
10
  ...c,
11
11
  children: s
12
12
  }));
13
13
  i.displayName = "List";
14
- var a = t(({ className: t, style: i, children: a, ...o }, s) => /* @__PURE__ */ r("li", {
14
+ var a = e(({ className: e, style: i, children: a, ...o }, s) => /* @__PURE__ */ r("li", {
15
15
  ref: s,
16
- className: n(e.item, t),
16
+ className: t(n.item, e),
17
17
  style: i,
18
18
  ...o,
19
19
  children: a