@overdoser/react-toolkit 0.20.0 → 0.21.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 (273) hide show
  1. package/AGENTS.md +1 -1
  2. package/CHANGELOG.md +14 -0
  3. package/components/Accordion/Accordion.js +160 -177
  4. package/components/Accordion/Accordion.module.js +20 -0
  5. package/components/ActionButton/ActionButton.js +155 -209
  6. package/components/ActionButton/ActionButton.module.js +25 -0
  7. package/components/ActionButton/CopyButton.js +52 -64
  8. package/components/Alert/Alert.js +92 -95
  9. package/components/Alert/Alert.module.js +18 -0
  10. package/components/Avatar/Avatar.js +44 -55
  11. package/components/Avatar/Avatar.module.js +23 -0
  12. package/components/Badge/Badge.js +16 -38
  13. package/components/Badge/Badge.module.js +17 -0
  14. package/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  15. package/components/Breadcrumbs/Breadcrumbs.js +52 -48
  16. package/components/Breadcrumbs/Breadcrumbs.module.js +10 -0
  17. package/components/Button/Button.js +35 -57
  18. package/components/Button/Button.module.js +25 -0
  19. package/components/Card/Card.js +94 -131
  20. package/components/Card/Card.module.js +35 -0
  21. package/components/Chart/AreaChart.d.ts +1 -1
  22. package/components/Chart/AreaChart.js +248 -249
  23. package/components/Chart/Axis.d.ts +2 -2
  24. package/components/Chart/Axis.js +34 -43
  25. package/components/Chart/BarChart.d.ts +1 -1
  26. package/components/Chart/BarChart.js +307 -348
  27. package/components/Chart/Chart.module.js +32 -0
  28. package/components/Chart/ChartContainer.js +33 -41
  29. package/components/Chart/ChartLegend.d.ts +1 -1
  30. package/components/Chart/ChartLegend.js +31 -30
  31. package/components/Chart/ChartTooltip.d.ts +1 -1
  32. package/components/Chart/ChartTooltip.js +46 -41
  33. package/components/Chart/LineChart.d.ts +1 -1
  34. package/components/Chart/LineChart.js +220 -232
  35. package/components/Chart/PieChart.d.ts +1 -1
  36. package/components/Chart/PieChart.js +224 -240
  37. package/components/Chart/RadarChart.d.ts +1 -1
  38. package/components/Chart/RadarChart.js +166 -215
  39. package/components/Chart/Sparkline.js +73 -68
  40. package/components/Chart/TradingChart.d.ts +1 -1
  41. package/components/Chart/TradingChart.js +804 -701
  42. package/components/Chart/scales.js +28 -35
  43. package/components/Chart/trading/indicators.js +61 -62
  44. package/components/Chart/trading/period.js +46 -68
  45. package/components/Chart/useChartDimensions.js +30 -22
  46. package/components/Chip/Chip.js +98 -141
  47. package/components/Chip/Chip.module.js +32 -0
  48. package/components/CodeBlock/CodeBlock.js +111 -119
  49. package/components/CodeBlock/CodeBlock.module.js +23 -0
  50. package/components/CommandPalette/CommandPalette.js +387 -392
  51. package/components/CommandPalette/CommandPalette.module.js +28 -0
  52. package/components/ConfirmDialog/ConfirmDialog.d.ts +1 -1
  53. package/components/ConfirmDialog/ConfirmDialog.js +184 -199
  54. package/components/ConfirmDialog/ConfirmDialog.module.js +12 -0
  55. package/components/Divider/Divider.js +25 -36
  56. package/components/Divider/Divider.module.js +17 -0
  57. package/components/Draggable/Draggable.d.ts +1 -1
  58. package/components/Draggable/Draggable.js +157 -164
  59. package/components/Draggable/Draggable.module.js +10 -0
  60. package/components/Drawer/Drawer.js +104 -126
  61. package/components/Drawer/Drawer.module.js +66 -0
  62. package/components/Dropdown/Dropdown.js +175 -234
  63. package/components/Dropdown/Dropdown.module.js +29 -0
  64. package/components/Dropdown/DropdownItem.js +55 -58
  65. package/components/Dropdown/DropdownLabel.js +14 -11
  66. package/components/Dropdown/DropdownSeparator.js +12 -10
  67. package/components/Dropdown/dropdownContext.js +4 -5
  68. package/components/Dropdown/useContextMenu.js +27 -17
  69. package/components/Dropzone/Dropzone.js +99 -105
  70. package/components/Dropzone/Dropzone.module.js +12 -0
  71. package/components/EmptyState/EmptyState.js +58 -55
  72. package/components/EmptyState/EmptyState.module.js +14 -0
  73. package/components/Form/Form.d.ts +1 -1
  74. package/components/Form/Form.js +32 -35
  75. package/components/Form/Form.module.js +16 -0
  76. package/components/Form/FormField.d.ts +1 -1
  77. package/components/Form/FormField.js +71 -75
  78. package/components/Form/FormRow.d.ts +1 -1
  79. package/components/Form/FormRow.js +11 -8
  80. package/components/Form/formFieldDefaults.js +4 -5
  81. package/components/ImageViewer/ImageViewer.js +312 -201
  82. package/components/ImageViewer/ImageViewer.module.js +26 -0
  83. package/components/ImageViewer/useZoomPan.js +206 -137
  84. package/components/Kbd/Kbd.js +25 -22
  85. package/components/Kbd/Kbd.module.js +10 -0
  86. package/components/KeyValueList/KeyValueList.js +119 -123
  87. package/components/KeyValueList/KeyValueList.module.js +23 -0
  88. package/components/Link/Link.js +45 -59
  89. package/components/Link/Link.module.js +10 -0
  90. package/components/List/List.js +22 -46
  91. package/components/List/List.module.js +12 -0
  92. package/components/Loader/Loader.js +152 -182
  93. package/components/Loader/Loader.module.js +40 -0
  94. package/components/Modal/Modal.js +93 -105
  95. package/components/Modal/Modal.module.js +18 -0
  96. package/components/PageHeader/PageHeader.js +78 -72
  97. package/components/PageHeader/PageHeader.module.js +23 -0
  98. package/components/Pagination/Pagination.js +63 -84
  99. package/components/Pagination/Pagination.module.js +13 -0
  100. package/components/Pagination/paginationRange.js +15 -22
  101. package/components/Popover/Popover.js +110 -134
  102. package/components/Popover/Popover.module.js +12 -0
  103. package/components/ProgressBar/ProgressBar.d.ts +15 -1
  104. package/components/ProgressBar/ProgressBar.js +57 -90
  105. package/components/ProgressBar/ProgressBar.module.js +29 -0
  106. package/components/RelativeTime/RelativeTime.js +36 -43
  107. package/components/RelativeTime/RelativeTime.module.js +3 -0
  108. package/components/SegmentedControl/SegmentedControl.js +94 -130
  109. package/components/SegmentedControl/SegmentedControl.module.js +21 -0
  110. package/components/Skeleton/Skeleton.js +36 -50
  111. package/components/Skeleton/Skeleton.module.js +15 -0
  112. package/components/Spinner/Spinner.js +25 -25
  113. package/components/Spinner/Spinner.module.js +12 -0
  114. package/components/SplitButton/SplitButton.js +149 -196
  115. package/components/SplitButton/SplitButton.module.js +31 -0
  116. package/components/SplitPane/SplitPane.js +134 -170
  117. package/components/SplitPane/SplitPane.module.js +14 -0
  118. package/components/StatCard/StatCard.js +132 -125
  119. package/components/StatCard/StatCard.module.js +42 -0
  120. package/components/StatusDot/StatusDot.js +28 -39
  121. package/components/StatusDot/StatusDot.module.js +18 -0
  122. package/components/Table/Table.d.ts +1 -1
  123. package/components/Table/Table.js +381 -451
  124. package/components/Table/Table.module.js +42 -0
  125. package/components/Table/useTableSort.js +51 -42
  126. package/components/Tabs/Tabs.js +109 -161
  127. package/components/Tabs/Tabs.module.js +28 -0
  128. package/components/ThemeToggle/ThemeToggle.js +122 -98
  129. package/components/ThemeToggle/ThemeToggle.module.js +13 -0
  130. package/components/Timeline/GanttTimeline.js +357 -318
  131. package/components/Timeline/GanttTimeline.module.js +29 -0
  132. package/components/Timeline/HistoryTimeline.js +486 -450
  133. package/components/Timeline/HistoryTimeline.module.js +31 -0
  134. package/components/Timeline/Timeline.module.js +76 -0
  135. package/components/Timeline/TimelineShared.d.ts +7 -7
  136. package/components/Timeline/TimelineShared.js +288 -279
  137. package/components/Timeline/TraceEventDetails.d.ts +3 -3
  138. package/components/Timeline/TraceEventDetails.js +245 -178
  139. package/components/Timeline/TraceTimeline.js +823 -783
  140. package/components/Timeline/TraceTimeline.module.js +98 -0
  141. package/components/Timeline/historyLayout.js +336 -263
  142. package/components/Timeline/timelineCore.js +208 -183
  143. package/components/Timeline/traceEvent.js +59 -61
  144. package/components/Timeline/traceLayout.js +101 -90
  145. package/components/Timeline/useTimeline.js +76 -79
  146. package/components/Timer/Timer.js +190 -156
  147. package/components/Timer/Timer.module.js +29 -0
  148. package/components/Toast/Toast.d.ts +1 -1
  149. package/components/Toast/Toast.js +128 -128
  150. package/components/Toast/Toast.module.js +37 -0
  151. package/components/Toast/toastStore.js +58 -62
  152. package/components/ToggleIconButton/ToggleIconButton.js +35 -57
  153. package/components/ToggleIconButton/ToggleIconButton.module.js +15 -0
  154. package/components/Tooltip/Tooltip.d.ts +1 -1
  155. package/components/Tooltip/Tooltip.js +76 -85
  156. package/components/Tooltip/Tooltip.module.js +17 -0
  157. package/components/Typography/Typography.js +11 -36
  158. package/components/Typography/Typography.module.js +30 -0
  159. package/components/inputs/Checkbox/Checkbox.js +27 -51
  160. package/components/inputs/Checkbox/Checkbox.module.js +10 -0
  161. package/components/inputs/Checkbox/CheckboxGroup.js +53 -111
  162. package/components/inputs/Checkbox/CheckboxGroup.module.js +17 -0
  163. package/components/inputs/DatePicker/CalendarPanel.d.ts +1 -1
  164. package/components/inputs/DatePicker/CalendarPanel.js +263 -286
  165. package/components/inputs/DatePicker/CalendarPanel.module.js +23 -0
  166. package/components/inputs/DatePicker/DatePicker.js +115 -142
  167. package/components/inputs/DatePicker/DatePicker.module.js +14 -0
  168. package/components/inputs/DatePicker/dateUtils.js +32 -41
  169. package/components/inputs/DateTimePicker/DateTimePicker.js +226 -232
  170. package/components/inputs/DateTimePicker/DateTimePicker.module.js +20 -0
  171. package/components/inputs/DateTimePicker/DateTimeSegments.js +273 -252
  172. package/components/inputs/DateTimePicker/TimeField.d.ts +1 -1
  173. package/components/inputs/DateTimePicker/TimeField.js +131 -132
  174. package/components/inputs/DateTimePicker/timeZoneUtils.js +95 -92
  175. package/components/inputs/Input/Input.js +98 -109
  176. package/components/inputs/Input/Input.module.js +15 -0
  177. package/components/inputs/NumberInput/NumberInput.js +112 -132
  178. package/components/inputs/NumberInput/NumberInput.module.js +14 -0
  179. package/components/inputs/Radio/Radio.js +50 -73
  180. package/components/inputs/Radio/Radio.module.js +9 -0
  181. package/components/inputs/SearchInput/SearchInput.js +98 -115
  182. package/components/inputs/SearchInput/SearchInput.module.js +8 -0
  183. package/components/inputs/Select/Select.js +555 -682
  184. package/components/inputs/Select/Select.module.js +38 -0
  185. package/components/inputs/Slider/Slider.js +97 -128
  186. package/components/inputs/Slider/Slider.module.js +9 -0
  187. package/components/inputs/Switch/Switch.js +11 -8
  188. package/components/inputs/Textarea/Textarea.js +42 -58
  189. package/components/inputs/Textarea/Textarea.module.js +14 -0
  190. package/hooks/useClickOutside.js +17 -14
  191. package/hooks/useDebouncedValue.js +13 -14
  192. package/hooks/useElementSize.js +27 -22
  193. package/hooks/useEscapeLayer.js +28 -29
  194. package/hooks/useFocusTrap.js +27 -38
  195. package/hooks/useKeyboard.js +76 -64
  196. package/hooks/useMediaQuery.js +10 -15
  197. package/hooks/useNow.js +28 -33
  198. package/hooks/usePersistedState.js +98 -94
  199. package/hooks/usePortalPosition.js +25 -19
  200. package/hooks/useResizable.js +106 -104
  201. package/hooks/useTheme.js +28 -23
  202. package/index.css +2 -1
  203. package/index.js +97 -215
  204. package/index.layered.css +2 -3
  205. package/llms.txt +3 -0
  206. package/manifest.json +8 -0
  207. package/package.json +1 -1
  208. package/utils/formatBytes.js +29 -13
  209. package/utils/themeScript.js +6 -8
  210. package/utils/timeAgo.js +59 -32
  211. package/components/Accordion/Accordion.module.scss.js +0 -36
  212. package/components/ActionButton/ActionButton.module.scss.js +0 -47
  213. package/components/Alert/Alert.module.scss.js +0 -33
  214. package/components/Avatar/Avatar.module.scss.js +0 -43
  215. package/components/Badge/Badge.module.scss.js +0 -31
  216. package/components/Breadcrumbs/Breadcrumbs.module.scss.js +0 -17
  217. package/components/Button/Button.module.scss.js +0 -47
  218. package/components/Card/Card.module.scss.js +0 -60
  219. package/components/Chart/Chart.module.scss.js +0 -61
  220. package/components/Chip/Chip.module.scss.js +0 -59
  221. package/components/CodeBlock/CodeBlock.module.scss.js +0 -43
  222. package/components/CommandPalette/CommandPalette.module.scss.js +0 -49
  223. package/components/ConfirmDialog/ConfirmDialog.module.scss.js +0 -21
  224. package/components/Divider/Divider.module.scss.js +0 -31
  225. package/components/Draggable/Draggable.module.scss.js +0 -17
  226. package/components/Drawer/Drawer.module.scss.js +0 -119
  227. package/components/Dropdown/Dropdown.module.scss.js +0 -53
  228. package/components/Dropzone/Dropzone.module.scss.js +0 -21
  229. package/components/EmptyState/EmptyState.module.scss.js +0 -25
  230. package/components/Form/Form.module.scss.js +0 -29
  231. package/components/ImageViewer/ImageViewer.module.scss.js +0 -47
  232. package/components/Kbd/Kbd.module.scss.js +0 -17
  233. package/components/KeyValueList/KeyValueList.module.scss.js +0 -43
  234. package/components/Link/Link.module.scss.js +0 -16
  235. package/components/List/List.module.scss.js +0 -21
  236. package/components/Loader/Loader.module.scss.js +0 -70
  237. package/components/Modal/Modal.module.scss.js +0 -33
  238. package/components/PageHeader/PageHeader.module.scss.js +0 -43
  239. package/components/Pagination/Pagination.module.scss.js +0 -23
  240. package/components/Popover/Popover.module.scss.js +0 -21
  241. package/components/ProgressBar/ProgressBar.module.scss.js +0 -51
  242. package/components/RelativeTime/RelativeTime.module.scss.js +0 -7
  243. package/components/SegmentedControl/SegmentedControl.module.scss.js +0 -39
  244. package/components/Skeleton/Skeleton.module.scss.js +0 -25
  245. package/components/Spinner/Spinner.module.scss.js +0 -20
  246. package/components/SplitButton/SplitButton.module.scss.js +0 -57
  247. package/components/SplitPane/SplitPane.module.scss.js +0 -25
  248. package/components/StatCard/StatCard.module.scss.js +0 -72
  249. package/components/StatusDot/StatusDot.module.scss.js +0 -32
  250. package/components/Table/Table.module.scss.js +0 -81
  251. package/components/Tabs/Tabs.module.scss.js +0 -53
  252. package/components/ThemeToggle/ThemeToggle.module.scss.js +0 -23
  253. package/components/Timeline/GanttTimeline.module.scss.js +0 -55
  254. package/components/Timeline/HistoryTimeline.module.scss.js +0 -59
  255. package/components/Timeline/Timeline.module.scss.js +0 -141
  256. package/components/Timeline/TraceTimeline.module.scss.js +0 -189
  257. package/components/Timer/Timer.module.scss.js +0 -55
  258. package/components/Toast/Toast.module.scss.js +0 -62
  259. package/components/ToggleIconButton/ToggleIconButton.module.scss.js +0 -27
  260. package/components/Tooltip/Tooltip.module.scss.js +0 -30
  261. package/components/Typography/Typography.module.scss.js +0 -53
  262. package/components/inputs/Checkbox/Checkbox.module.scss.js +0 -17
  263. package/components/inputs/Checkbox/CheckboxGroup.module.scss.js +0 -31
  264. package/components/inputs/DatePicker/CalendarPanel.module.scss.js +0 -41
  265. package/components/inputs/DatePicker/DatePicker.module.scss.js +0 -25
  266. package/components/inputs/DateTimePicker/DateTimePicker.module.scss.js +0 -37
  267. package/components/inputs/Input/Input.module.scss.js +0 -27
  268. package/components/inputs/NumberInput/NumberInput.module.scss.js +0 -25
  269. package/components/inputs/Radio/Radio.module.scss.js +0 -15
  270. package/components/inputs/SearchInput/SearchInput.module.scss.js +0 -13
  271. package/components/inputs/Select/Select.module.scss.js +0 -73
  272. package/components/inputs/Slider/Slider.module.scss.js +0 -15
  273. package/components/inputs/Textarea/Textarea.module.scss.js +0 -25
@@ -1,127 +1,123 @@
1
- import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
- import { forwardRef as b, useState as w } from "react";
3
- import a from "clsx";
4
- import n from "./KeyValueList.module.scss.js";
5
- import { CopyButton as g } from "../ActionButton/CopyButton.js";
6
- const M = (e) => e == null || e === "", C = (e) => typeof e == "number" ? `${e}px` : e;
7
- function L(e) {
8
- return typeof e.copyable == "string" ? e.copyable : e.copyable && (typeof e.value == "string" || typeof e.value == "number") ? String(e.value) : null;
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";
5
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ // src/components/KeyValueList/KeyValueList.tsx
7
+ var s = (e) => e == null || e === "", c = (e) => typeof e == "number" ? `${e}px` : e;
8
+ function l(e) {
9
+ return typeof e.copyable == "string" ? e.copyable : e.copyable && (typeof e.value == "string" || typeof e.value == "number") ? String(e.value) : null;
9
10
  }
10
- function S({ item: e, emptyValue: d, copyLabel: p, revealLabels: u, classes: o }) {
11
- const [i, f] = w(!1), t = M(e.value), c = t ? null : L(e), h = e.masked && !i;
12
- let l;
13
- t ? l = e.empty ?? d : h ? l = /* @__PURE__ */ r("span", { className: a(n.maskedText, o?.masked), "aria-hidden": "true", children: "••••••••" }) : e.href ? l = /* @__PURE__ */ r("a", { className: n.link, href: e.href, children: e.value }) : l = e.value;
14
- const m = e.masked && !t || c !== null;
15
- return /* @__PURE__ */ s("div", { className: a(n.item, o?.item), children: [
16
- /* @__PURE__ */ r("dt", { className: a(n.label, o?.label), children: e.label }),
17
- /* @__PURE__ */ s(
18
- "dd",
19
- {
20
- className: a(
21
- n.value,
22
- e.mono && n.mono,
23
- e.mono && o?.mono,
24
- t && n.empty,
25
- o?.value
26
- ),
27
- children: [
28
- /* @__PURE__ */ s("span", { className: n.valueMain, children: [
29
- /* @__PURE__ */ r("span", { className: n.valueText, children: l }),
30
- m && /* @__PURE__ */ s("span", { className: a(n.actions, o?.actions), children: [
31
- e.masked && !t && /* @__PURE__ */ r(
32
- "button",
33
- {
34
- type: "button",
35
- className: a(n.reveal, o?.reveal),
36
- "aria-label": i ? u.hide : u.show,
37
- "aria-pressed": i,
38
- onClick: () => f((y) => !y),
39
- children: i ? /* @__PURE__ */ r(T, {}) : /* @__PURE__ */ r(j, {})
40
- }
41
- ),
42
- c !== null && /* @__PURE__ */ r(
43
- g,
44
- {
45
- value: c,
46
- iconOnly: !0,
47
- size: "sm",
48
- variant: "ghost",
49
- "aria-label": p,
50
- className: a(n.copy, o?.copy)
51
- }
52
- )
53
- ] })
54
- ] }),
55
- e.hint && /* @__PURE__ */ r("span", { className: a(n.hint, o?.hint), children: e.hint })
56
- ]
57
- }
58
- )
59
- ] });
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),
15
+ "aria-hidden": "true",
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;
23
+ return /* @__PURE__ */ o("div", {
24
+ className: i(e.item, m?.item),
25
+ children: [/* @__PURE__ */ a("dt", {
26
+ className: i(e.label, m?.label),
27
+ children: n.label
28
+ }), /* @__PURE__ */ o("dd", {
29
+ className: i(e.value, n.mono && e.mono, n.mono && m?.mono, _ && e.empty, m?.value),
30
+ children: [/* @__PURE__ */ o("span", {
31
+ className: e.valueMain,
32
+ children: [/* @__PURE__ */ a("span", {
33
+ className: e.valueText,
34
+ children: b
35
+ }), x && /* @__PURE__ */ o("span", {
36
+ className: i(e.actions, m?.actions),
37
+ children: [n.masked && !_ && /* @__PURE__ */ a("button", {
38
+ type: "button",
39
+ className: i(e.reveal, m?.reveal),
40
+ "aria-label": h ? p.hide : p.show,
41
+ "aria-pressed": h,
42
+ onClick: () => g((e) => !e),
43
+ children: a(h ? f : d, {})
44
+ }), v !== null && /* @__PURE__ */ a(t, {
45
+ value: v,
46
+ iconOnly: !0,
47
+ size: "sm",
48
+ variant: "ghost",
49
+ "aria-label": u,
50
+ className: i(e.copy, m?.copy)
51
+ })]
52
+ })]
53
+ }), n.hint && /* @__PURE__ */ a("span", {
54
+ className: i(e.hint, m?.hint),
55
+ children: n.hint
56
+ })]
57
+ })]
58
+ });
60
59
  }
61
- function j() {
62
- return /* @__PURE__ */ s("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
63
- /* @__PURE__ */ r("path", { d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z" }),
64
- /* @__PURE__ */ r("circle", { cx: "12", cy: "12", r: "3" })
65
- ] });
60
+ function d() {
61
+ return /* @__PURE__ */ o("svg", {
62
+ width: "1em",
63
+ height: "1em",
64
+ viewBox: "0 0 24 24",
65
+ fill: "none",
66
+ stroke: "currentColor",
67
+ strokeWidth: "2",
68
+ strokeLinecap: "round",
69
+ strokeLinejoin: "round",
70
+ "aria-hidden": "true",
71
+ children: [/* @__PURE__ */ a("path", { d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z" }), /* @__PURE__ */ a("circle", {
72
+ cx: "12",
73
+ cy: "12",
74
+ r: "3"
75
+ })]
76
+ });
66
77
  }
67
- function T() {
68
- return /* @__PURE__ */ s("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
69
- /* @__PURE__ */ r("path", { d: "M17.9 17.9A10.4 10.4 0 0 1 12 19c-6.5 0-10-7-10-7a17.6 17.6 0 0 1 4.1-4.9" }),
70
- /* @__PURE__ */ r("path", { d: "M9.9 5.2A10 10 0 0 1 12 5c6.5 0 10 7 10 7a17.6 17.6 0 0 1-2.2 3.2" }),
71
- /* @__PURE__ */ r("path", { d: "M14.1 14.1a3 3 0 1 1-4.2-4.2" }),
72
- /* @__PURE__ */ r("path", { d: "M2 2l20 20" })
73
- ] });
78
+ function f() {
79
+ return /* @__PURE__ */ o("svg", {
80
+ width: "1em",
81
+ height: "1em",
82
+ viewBox: "0 0 24 24",
83
+ fill: "none",
84
+ stroke: "currentColor",
85
+ strokeWidth: "2",
86
+ strokeLinecap: "round",
87
+ strokeLinejoin: "round",
88
+ "aria-hidden": "true",
89
+ children: [
90
+ /* @__PURE__ */ a("path", { d: "M17.9 17.9A10.4 10.4 0 0 1 12 19c-6.5 0-10-7-10-7a17.6 17.6 0 0 1 4.1-4.9" }),
91
+ /* @__PURE__ */ a("path", { d: "M9.9 5.2A10 10 0 0 1 12 5c6.5 0 10 7 10 7a17.6 17.6 0 0 1-2.2 3.2" }),
92
+ /* @__PURE__ */ a("path", { d: "M14.1 14.1a3 3 0 1 1-4.2-4.2" }),
93
+ /* @__PURE__ */ a("path", { d: "M2 2l20 20" })
94
+ ]
95
+ });
74
96
  }
75
- const A = b(
76
- ({
77
- items: e,
78
- layout: d = "rows",
79
- columns: p = 2,
80
- labelWidth: u = "10rem",
81
- size: o = "md",
82
- dividers: i = !0,
83
- emptyValue: f = "—",
84
- copyLabel: t = "Copy",
85
- revealLabels: c = { show: "Show", hide: "Hide" },
86
- classes: h,
87
- className: l,
88
- style: m,
89
- ...y
90
- }, k) => {
91
- const x = {
92
- "--crk-kv-label-width": C(u),
93
- "--crk-kv-columns": d === "grid" ? String(Math.max(1, p)) : void 0
94
- };
95
- return /* @__PURE__ */ r(
96
- "dl",
97
- {
98
- ref: k,
99
- className: a(
100
- n.root,
101
- n[d],
102
- n[o],
103
- d === "rows" && i && n.dividers,
104
- h?.root,
105
- l
106
- ),
107
- style: { ...x, ...m },
108
- ...y,
109
- children: e.map((v, N) => /* @__PURE__ */ r(
110
- S,
111
- {
112
- item: v,
113
- emptyValue: f,
114
- copyLabel: t,
115
- revealLabels: c,
116
- classes: h
117
- },
118
- v.key ?? N
119
- ))
120
- }
121
- );
122
- }
123
- );
124
- A.displayName = "KeyValueList";
125
- export {
126
- A as KeyValueList
127
- };
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 = {
98
+ show: "Show",
99
+ hide: "Hide"
100
+ }, classes: m, className: h, style: g, ..._ }, v) => {
101
+ let y = {
102
+ "--crk-kv-label-width": c(o),
103
+ "--crk-kv-columns": n === "grid" ? String(Math.max(1, r)) : void 0
104
+ };
105
+ return /* @__PURE__ */ a("dl", {
106
+ ref: v,
107
+ className: i(e.root, e[n], e[s], n === "rows" && l && e.dividers, m?.root, h),
108
+ style: {
109
+ ...y,
110
+ ...g
111
+ },
112
+ ..._,
113
+ children: t.map((e, t) => /* @__PURE__ */ a(u, {
114
+ item: e,
115
+ emptyValue: d,
116
+ copyLabel: f,
117
+ revealLabels: p,
118
+ classes: m
119
+ }, e.key ?? t))
120
+ });
121
+ });
122
+ p.displayName = "KeyValueList";
123
+ export { p as KeyValueList };
@@ -0,0 +1,23 @@
1
+ // src/components/KeyValueList/KeyValueList.module.scss
2
+ var e = "crk-root-ZWRNt", t = "crk-sm-YAGty", n = "crk-item-LWtHy", r = "crk-label-HPXVP", i = "crk-value-qw6-d", a = "crk-valueMain-9SLKj", o = "crk-valueText-Ek1fy", s = "crk-hint-EjrMh", c = "crk-empty-rVkBt", l = "crk-mono-XmBla", u = "crk-maskedText-SS7Sh", d = "crk-link-iUQMV", f = "crk-actions-w-Zks", p = "crk-reveal-kvrVt", m = "crk-copy-s4XLe", h = "crk-rows-CFgtm", g = "crk-dividers-Z3aBx", _ = "crk-grid-b872O", v = "crk-inline-pBbIw", y = {
3
+ root: e,
4
+ sm: t,
5
+ item: n,
6
+ label: r,
7
+ value: i,
8
+ valueMain: a,
9
+ valueText: o,
10
+ hint: s,
11
+ empty: c,
12
+ mono: l,
13
+ maskedText: u,
14
+ link: d,
15
+ actions: f,
16
+ reveal: p,
17
+ copy: m,
18
+ rows: h,
19
+ dividers: g,
20
+ grid: _,
21
+ inline: v
22
+ };
23
+ export { f as actions, m as copy, y as default, g as dividers, c as empty, _ as grid, s as hint, v as inline, n as item, r as label, d as link, u as maskedText, l as mono, p as reveal, e as root, h as rows, t as sm, i as value, a as valueMain, o as valueText };
@@ -1,59 +1,45 @@
1
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as c } from "react";
3
- import f from "clsx";
4
- import r from "./Link.module.scss.js";
5
- const h = c(
6
- ({
7
- variant: t = "default",
8
- external: a = !1,
9
- hideExternalIcon: l = !1,
10
- className: i,
11
- style: d,
12
- children: m,
13
- ...o
14
- }, p) => {
15
- const n = a || o.target === "_blank";
16
- return /* @__PURE__ */ s(
17
- "a",
18
- {
19
- ref: p,
20
- className: f(r.root, r[t], i),
21
- style: d,
22
- ...a && {
23
- target: "_blank",
24
- rel: "noopener noreferrer"
25
- },
26
- ...o,
27
- children: [
28
- m,
29
- n && !l && /* @__PURE__ */ s(
30
- "svg",
31
- {
32
- className: r.externalIcon,
33
- viewBox: "0 0 24 24",
34
- width: "1em",
35
- height: "1em",
36
- fill: "none",
37
- stroke: "currentColor",
38
- strokeWidth: "2",
39
- strokeLinecap: "round",
40
- strokeLinejoin: "round",
41
- "aria-hidden": "true",
42
- focusable: "false",
43
- children: [
44
- /* @__PURE__ */ e("path", { d: "M14 3h7v7" }),
45
- /* @__PURE__ */ e("path", { d: "M21 3l-9 9" }),
46
- /* @__PURE__ */ e("path", { d: "M19 14v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h5" })
47
- ]
48
- }
49
- ),
50
- n && /* @__PURE__ */ e("span", { className: r.srOnly, children: " (opens in a new tab)" })
51
- ]
52
- }
53
- );
54
- }
55
- );
56
- h.displayName = "Link";
57
- export {
58
- h as Link
59
- };
1
+ import e from "./Link.module.js";
2
+ import { forwardRef as t } from "react";
3
+ import n from "clsx";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
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) => {
7
+ let f = a || u.target === "_blank";
8
+ return /* @__PURE__ */ i("a", {
9
+ ref: d,
10
+ className: n(e.root, e[t], s),
11
+ style: c,
12
+ ...a && {
13
+ target: "_blank",
14
+ rel: "noopener noreferrer"
15
+ },
16
+ ...u,
17
+ children: [
18
+ l,
19
+ f && !o && /* @__PURE__ */ i("svg", {
20
+ className: e.externalIcon,
21
+ viewBox: "0 0 24 24",
22
+ width: "1em",
23
+ height: "1em",
24
+ fill: "none",
25
+ stroke: "currentColor",
26
+ strokeWidth: "2",
27
+ strokeLinecap: "round",
28
+ strokeLinejoin: "round",
29
+ "aria-hidden": "true",
30
+ focusable: "false",
31
+ children: [
32
+ /* @__PURE__ */ r("path", { d: "M14 3h7v7" }),
33
+ /* @__PURE__ */ r("path", { d: "M21 3l-9 9" }),
34
+ /* @__PURE__ */ r("path", { d: "M19 14v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h5" })
35
+ ]
36
+ }),
37
+ f && /* @__PURE__ */ r("span", {
38
+ className: e.srOnly,
39
+ children: " (opens in a new tab)"
40
+ })
41
+ ]
42
+ });
43
+ });
44
+ a.displayName = "Link";
45
+ export { a as Link };
@@ -0,0 +1,10 @@
1
+ // src/components/Link/Link.module.scss
2
+ var e = "crk-root-2j4Vp", t = "crk-muted-vReNc", n = "crk-danger-ugf9r", r = "crk-externalIcon-nNu5J", i = "crk-srOnly-LGQgs", a = {
3
+ root: e,
4
+ default: "crk-default-3TBlr",
5
+ muted: t,
6
+ danger: n,
7
+ externalIcon: r,
8
+ srOnly: i
9
+ };
10
+ export { n as danger, a as default, r as externalIcon, t as muted, e as root, i as srOnly };
@@ -1,46 +1,22 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { forwardRef as a } from "react";
3
- import l from "clsx";
4
- import o from "./List.module.scss.js";
5
- const c = a(
6
- ({
7
- variant: r = "unordered",
8
- spacing: t = "md",
9
- className: s,
10
- style: e,
11
- children: m,
12
- ...d
13
- }, p) => /* @__PURE__ */ i(
14
- r === "ordered" ? "ol" : "ul",
15
- {
16
- ref: p,
17
- className: l(
18
- o.root,
19
- o[r],
20
- o[t],
21
- s
22
- ),
23
- style: e,
24
- ...d,
25
- children: m
26
- }
27
- )
28
- );
29
- c.displayName = "List";
30
- const f = a(
31
- ({ className: r, style: t, children: s, ...e }, m) => /* @__PURE__ */ i(
32
- "li",
33
- {
34
- ref: m,
35
- className: l(o.item, r),
36
- style: t,
37
- ...e,
38
- children: s
39
- }
40
- )
41
- );
42
- f.displayName = "ListItem";
43
- export {
44
- c as List,
45
- f as ListItem
46
- };
1
+ import e from "./List.module.js";
2
+ import { forwardRef as t } from "react";
3
+ import n from "clsx";
4
+ import { jsx as r } from "react/jsx-runtime";
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", {
7
+ ref: l,
8
+ className: n(e.root, e[t], e[i], a),
9
+ style: o,
10
+ ...c,
11
+ children: s
12
+ }));
13
+ i.displayName = "List";
14
+ var a = t(({ className: t, style: i, children: a, ...o }, s) => /* @__PURE__ */ r("li", {
15
+ ref: s,
16
+ className: n(e.item, t),
17
+ style: i,
18
+ ...o,
19
+ children: a
20
+ }));
21
+ a.displayName = "ListItem";
22
+ export { i as List, a as ListItem };
@@ -0,0 +1,12 @@
1
+ // src/components/List/List.module.scss
2
+ var e = "crk-root-PVrgx", t = "crk-unordered-FhCWT", n = "crk-item-TfW82", r = "crk-ordered-8x4YC", i = "crk-none-f03Kx", a = "crk-sm-Rg4Mv", o = "crk-md-X4Icb", s = "crk-lg-JjNKZ", c = {
3
+ root: e,
4
+ unordered: t,
5
+ item: n,
6
+ ordered: r,
7
+ none: i,
8
+ sm: a,
9
+ md: o,
10
+ lg: s
11
+ };
12
+ export { c as default, n as item, s as lg, o as md, i as none, r as ordered, e as root, a as sm, t as unordered };