@overdoser/react-toolkit 0.20.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 (212) hide show
  1. package/AGENTS.md +2 -1
  2. package/CHANGELOG.md +41 -0
  3. package/components/Accordion/Accordion.js +160 -177
  4. package/components/Accordion/Accordion.module.scss.js +19 -35
  5. package/components/ActionButton/ActionButton.js +155 -209
  6. package/components/ActionButton/ActionButton.module.scss.js +24 -46
  7. package/components/ActionButton/CopyButton.js +52 -64
  8. package/components/Alert/Alert.js +93 -96
  9. package/components/Alert/Alert.module.scss.js +17 -32
  10. package/components/Avatar/Avatar.js +44 -55
  11. package/components/Avatar/Avatar.module.scss.js +22 -42
  12. package/components/Badge/Badge.js +15 -37
  13. package/components/Badge/Badge.module.scss.js +16 -30
  14. package/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  15. package/components/Breadcrumbs/Breadcrumbs.js +52 -48
  16. package/components/Breadcrumbs/Breadcrumbs.module.scss.js +9 -16
  17. package/components/Button/Button.js +35 -57
  18. package/components/Button/Button.module.scss.js +24 -46
  19. package/components/Card/Card.js +94 -131
  20. package/components/Card/Card.module.scss.js +34 -59
  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.scss.js +31 -60
  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 +45 -40
  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.scss.js +31 -58
  48. package/components/CodeBlock/CodeBlock.js +111 -119
  49. package/components/CodeBlock/CodeBlock.module.scss.js +22 -42
  50. package/components/CommandPalette/CommandPalette.js +387 -392
  51. package/components/CommandPalette/CommandPalette.module.scss.js +27 -48
  52. package/components/ConfirmDialog/ConfirmDialog.d.ts +1 -1
  53. package/components/ConfirmDialog/ConfirmDialog.js +184 -199
  54. package/components/ConfirmDialog/ConfirmDialog.module.scss.js +11 -20
  55. package/components/Divider/Divider.js +25 -36
  56. package/components/Divider/Divider.module.scss.js +16 -30
  57. package/components/Draggable/Draggable.d.ts +1 -1
  58. package/components/Draggable/Draggable.js +157 -164
  59. package/components/Draggable/Draggable.module.scss.js +9 -16
  60. package/components/Drawer/Drawer.js +104 -126
  61. package/components/Drawer/Drawer.module.scss.js +65 -118
  62. package/components/Dropdown/Dropdown.js +175 -234
  63. package/components/Dropdown/Dropdown.module.scss.js +28 -52
  64. package/components/Dropdown/DropdownItem.js +55 -58
  65. package/components/Dropdown/DropdownLabel.js +14 -11
  66. package/components/Dropdown/DropdownSeparator.js +13 -11
  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.scss.js +11 -20
  71. package/components/EmptyState/EmptyState.js +57 -54
  72. package/components/EmptyState/EmptyState.module.scss.js +13 -24
  73. package/components/Form/Form.d.ts +1 -1
  74. package/components/Form/Form.js +31 -34
  75. package/components/Form/Form.module.scss.js +15 -28
  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.scss.js +25 -46
  83. package/components/ImageViewer/useZoomPan.js +206 -137
  84. package/components/Kbd/Kbd.js +24 -21
  85. package/components/Kbd/Kbd.module.scss.js +9 -16
  86. package/components/KeyValueList/KeyValueList.js +119 -123
  87. package/components/KeyValueList/KeyValueList.module.scss.js +22 -42
  88. package/components/Link/Link.js +45 -59
  89. package/components/Link/Link.module.scss.js +9 -15
  90. package/components/List/List.js +22 -46
  91. package/components/List/List.module.scss.js +11 -20
  92. package/components/Loader/Loader.js +152 -182
  93. package/components/Loader/Loader.module.scss.js +39 -69
  94. package/components/Modal/Modal.js +93 -105
  95. package/components/Modal/Modal.module.scss.js +17 -32
  96. package/components/PageHeader/PageHeader.js +79 -73
  97. package/components/PageHeader/PageHeader.module.scss.js +22 -42
  98. package/components/Pagination/Pagination.js +62 -83
  99. package/components/Pagination/Pagination.module.scss.js +12 -22
  100. package/components/Pagination/paginationRange.js +15 -22
  101. package/components/Popover/Popover.js +110 -134
  102. package/components/Popover/Popover.module.scss.js +11 -20
  103. package/components/ProgressBar/ProgressBar.d.ts +15 -1
  104. package/components/ProgressBar/ProgressBar.js +56 -89
  105. package/components/ProgressBar/ProgressBar.module.scss.js +28 -50
  106. package/components/RelativeTime/RelativeTime.js +36 -43
  107. package/components/RelativeTime/RelativeTime.module.scss.js +3 -7
  108. package/components/SegmentedControl/SegmentedControl.js +93 -129
  109. package/components/SegmentedControl/SegmentedControl.module.scss.js +20 -38
  110. package/components/Skeleton/Skeleton.js +36 -50
  111. package/components/Skeleton/Skeleton.module.scss.js +14 -24
  112. package/components/Spinner/Spinner.js +25 -25
  113. package/components/Spinner/Spinner.module.scss.js +11 -19
  114. package/components/SplitButton/SplitButton.js +149 -196
  115. package/components/SplitButton/SplitButton.module.scss.js +30 -56
  116. package/components/SplitPane/SplitPane.js +134 -170
  117. package/components/SplitPane/SplitPane.module.scss.js +13 -24
  118. package/components/StatCard/StatCard.js +132 -125
  119. package/components/StatCard/StatCard.module.scss.js +41 -71
  120. package/components/StatusDot/StatusDot.js +28 -39
  121. package/components/StatusDot/StatusDot.module.scss.js +17 -31
  122. package/components/Table/Table.d.ts +1 -1
  123. package/components/Table/Table.js +381 -451
  124. package/components/Table/Table.module.scss.js +41 -80
  125. package/components/Table/useTableSort.js +51 -42
  126. package/components/Tabs/Tabs.js +109 -161
  127. package/components/Tabs/Tabs.module.scss.js +27 -52
  128. package/components/ThemeToggle/ThemeToggle.js +122 -98
  129. package/components/ThemeToggle/ThemeToggle.module.scss.js +12 -22
  130. package/components/Timeline/GanttTimeline.js +357 -318
  131. package/components/Timeline/GanttTimeline.module.scss.js +28 -54
  132. package/components/Timeline/HistoryTimeline.js +486 -450
  133. package/components/Timeline/HistoryTimeline.module.scss.js +30 -58
  134. package/components/Timeline/Timeline.module.scss.js +75 -140
  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 +244 -177
  139. package/components/Timeline/TraceTimeline.js +823 -783
  140. package/components/Timeline/TraceTimeline.module.scss.js +97 -188
  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.scss.js +28 -54
  148. package/components/Toast/Toast.d.ts +1 -1
  149. package/components/Toast/Toast.js +128 -128
  150. package/components/Toast/Toast.module.scss.js +36 -61
  151. package/components/Toast/toastStore.js +58 -62
  152. package/components/ToggleIconButton/ToggleIconButton.js +36 -58
  153. package/components/ToggleIconButton/ToggleIconButton.module.scss.js +14 -26
  154. package/components/Tooltip/Tooltip.d.ts +1 -1
  155. package/components/Tooltip/Tooltip.js +76 -85
  156. package/components/Tooltip/Tooltip.module.scss.js +16 -29
  157. package/components/Typography/Typography.js +10 -35
  158. package/components/Typography/Typography.module.scss.js +29 -52
  159. package/components/inputs/Checkbox/Checkbox.js +27 -51
  160. package/components/inputs/Checkbox/Checkbox.module.scss.js +9 -16
  161. package/components/inputs/Checkbox/CheckboxGroup.js +53 -111
  162. package/components/inputs/Checkbox/CheckboxGroup.module.scss.js +16 -30
  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.scss.js +22 -40
  166. package/components/inputs/DatePicker/DatePicker.js +115 -142
  167. package/components/inputs/DatePicker/DatePicker.module.scss.js +13 -24
  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.scss.js +19 -36
  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.scss.js +14 -26
  177. package/components/inputs/NumberInput/NumberInput.js +112 -132
  178. package/components/inputs/NumberInput/NumberInput.module.scss.js +13 -24
  179. package/components/inputs/Radio/Radio.js +50 -73
  180. package/components/inputs/Radio/Radio.module.scss.js +8 -14
  181. package/components/inputs/SearchInput/SearchInput.js +98 -115
  182. package/components/inputs/SearchInput/SearchInput.module.scss.js +7 -12
  183. package/components/inputs/Select/Select.d.ts +55 -3
  184. package/components/inputs/Select/Select.js +696 -682
  185. package/components/inputs/Select/Select.module.scss.js +49 -72
  186. package/components/inputs/Slider/Slider.js +97 -128
  187. package/components/inputs/Slider/Slider.module.scss.js +8 -14
  188. package/components/inputs/Switch/Switch.js +11 -8
  189. package/components/inputs/Textarea/Textarea.js +42 -58
  190. package/components/inputs/Textarea/Textarea.module.scss.js +13 -24
  191. package/hooks/useClickOutside.js +17 -14
  192. package/hooks/useDebouncedValue.js +13 -14
  193. package/hooks/useElementSize.js +27 -22
  194. package/hooks/useEscapeLayer.js +28 -29
  195. package/hooks/useFocusTrap.js +27 -38
  196. package/hooks/useKeyboard.js +76 -64
  197. package/hooks/useMediaQuery.js +10 -15
  198. package/hooks/useNow.js +28 -33
  199. package/hooks/usePersistedState.js +98 -94
  200. package/hooks/usePortalPosition.d.ts +2 -1
  201. package/hooks/usePortalPosition.js +28 -19
  202. package/hooks/useResizable.js +106 -104
  203. package/hooks/useTheme.js +28 -23
  204. package/index.css +2 -1
  205. package/index.js +96 -214
  206. package/index.layered.css +2 -3
  207. package/llms.txt +28 -4
  208. package/manifest.json +41 -4
  209. package/package.json +1 -1
  210. package/utils/formatBytes.js +29 -13
  211. package/utils/themeScript.js +6 -8
  212. package/utils/timeAgo.js +59 -32
@@ -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 { 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
+ 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: 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
+ "aria-hidden": "true",
16
+ children: "••••••••"
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
+ return /* @__PURE__ */ o("div", {
24
+ className: n(r.item, m?.item),
25
+ children: [/* @__PURE__ */ a("dt", {
26
+ className: n(r.label, m?.label),
27
+ children: e.label
28
+ }), /* @__PURE__ */ o("dd", {
29
+ className: n(r.value, e.mono && r.mono, e.mono && m?.mono, _ && r.empty, m?.value),
30
+ children: [/* @__PURE__ */ o("span", {
31
+ className: r.valueMain,
32
+ children: [/* @__PURE__ */ a("span", {
33
+ className: r.valueText,
34
+ children: b
35
+ }), x && /* @__PURE__ */ o("span", {
36
+ className: n(r.actions, m?.actions),
37
+ children: [e.masked && !_ && /* @__PURE__ */ a("button", {
38
+ type: "button",
39
+ className: n(r.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(i, {
45
+ value: v,
46
+ iconOnly: !0,
47
+ size: "sm",
48
+ variant: "ghost",
49
+ "aria-label": u,
50
+ className: n(r.copy, m?.copy)
51
+ })]
52
+ })]
53
+ }), e.hint && /* @__PURE__ */ a("span", {
54
+ className: n(r.hint, m?.hint),
55
+ children: e.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 = 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
+ 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": t === "grid" ? String(Math.max(1, i)) : void 0
104
+ };
105
+ return /* @__PURE__ */ a("dl", {
106
+ ref: v,
107
+ className: n(r.root, r[t], r[s], t === "rows" && l && r.dividers, m?.root, h),
108
+ style: {
109
+ ...y,
110
+ ...g
111
+ },
112
+ ..._,
113
+ children: e.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 };
@@ -1,43 +1,23 @@
1
- const t = "crk-root-ZWRNt", c = "crk-sm-YAGty", e = "crk-item-LWtHy", o = "crk-label-HPXVP", n = "crk-value-qw6-d", s = "crk-valueMain-9SLKj", r = "crk-valueText-Ek1fy", i = "crk-hint-EjrMh", k = "crk-empty-rVkBt", a = "crk-mono-XmBla", l = "crk-maskedText-SS7Sh", m = "crk-link-iUQMV", v = "crk-actions-w-Zks", d = "crk-reveal-kvrVt", u = "crk-copy-s4XLe", y = "crk-rows-CFgtm", p = "crk-dividers-Z3aBx", x = "crk-grid-b872O", w = "crk-inline-pBbIw", T = {
2
- root: t,
3
- sm: c,
4
- item: e,
5
- label: o,
6
- value: n,
7
- valueMain: s,
8
- valueText: r,
9
- hint: i,
10
- empty: k,
11
- mono: a,
12
- maskedText: l,
13
- link: m,
14
- actions: v,
15
- reveal: d,
16
- copy: u,
17
- rows: y,
18
- dividers: p,
19
- grid: x,
20
- inline: w
21
- };
22
- export {
23
- v as actions,
24
- u as copy,
25
- T as default,
26
- p as dividers,
27
- k as empty,
28
- x as grid,
29
- i as hint,
30
- w as inline,
31
- e as item,
32
- o as label,
33
- m as link,
34
- l as maskedText,
35
- a as mono,
36
- d as reveal,
37
- t as root,
38
- y as rows,
39
- c as sm,
40
- n as value,
41
- s as valueMain,
42
- r as valueText
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
43
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 { forwardRef as e } from "react";
2
+ import t from "clsx";
3
+ import n from "./Link.module.scss.js";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ // src/components/Link/Link.tsx
6
+ var a = e(({ variant: e = "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: t(n.root, n[e], 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: n.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: n.srOnly,
39
+ children: " (opens in a new tab)"
40
+ })
41
+ ]
42
+ });
43
+ });
44
+ a.displayName = "Link";
45
+ export { a as Link };
@@ -1,16 +1,10 @@
1
- const r = "crk-root-2j4Vp", t = "crk-muted-vReNc", n = "crk-danger-ugf9r", e = "crk-externalIcon-nNu5J", c = "crk-srOnly-LGQgs", o = {
2
- root: r,
3
- default: "crk-default-3TBlr",
4
- muted: t,
5
- danger: n,
6
- externalIcon: e,
7
- srOnly: c
8
- };
9
- export {
10
- n as danger,
11
- o as default,
12
- e as externalIcon,
13
- t as muted,
14
- r as root,
15
- c as srOnly
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
16
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 { forwardRef as e } from "react";
2
+ import t from "clsx";
3
+ import n from "./List.module.scss.js";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ // src/components/List/List.tsx
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
+ ref: l,
8
+ className: t(n.root, n[e], n[i], a),
9
+ style: o,
10
+ ...c,
11
+ children: s
12
+ }));
13
+ i.displayName = "List";
14
+ var a = e(({ className: e, style: i, children: a, ...o }, s) => /* @__PURE__ */ r("li", {
15
+ ref: s,
16
+ className: t(n.item, e),
17
+ style: i,
18
+ ...o,
19
+ children: a
20
+ }));
21
+ a.displayName = "ListItem";
22
+ export { i as List, a as ListItem };
@@ -1,21 +1,12 @@
1
- const o = "crk-root-PVrgx", r = "crk-unordered-FhCWT", e = "crk-item-TfW82", c = "crk-ordered-8x4YC", n = "crk-none-f03Kx", t = "crk-sm-Rg4Mv", d = "crk-md-X4Icb", s = "crk-lg-JjNKZ", m = {
2
- root: o,
3
- unordered: r,
4
- item: e,
5
- ordered: c,
6
- none: n,
7
- sm: t,
8
- md: d,
9
- lg: s
10
- };
11
- export {
12
- m as default,
13
- e as item,
14
- s as lg,
15
- d as md,
16
- n as none,
17
- c as ordered,
18
- o as root,
19
- t as sm,
20
- r as unordered
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
21
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 };