@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,17 +1,10 @@
1
- const t = "crk-root-stw2c", r = "crk-list-RGYQR", s = "crk-item-ECyrs", c = "crk-link-B1vub", o = "crk-current-ilnF5", n = "crk-separator-KChd-", e = {
2
- root: t,
3
- list: r,
4
- item: s,
5
- link: c,
6
- current: o,
7
- separator: n
8
- };
9
- export {
10
- o as current,
11
- e as default,
12
- s as item,
13
- c as link,
14
- r as list,
15
- t as root,
16
- n as separator
1
+ // src/components/Breadcrumbs/Breadcrumbs.module.scss
2
+ var e = "crk-root-stw2c", t = "crk-list-RGYQR", n = "crk-item-ECyrs", r = "crk-link-B1vub", i = "crk-current-ilnF5", a = "crk-separator-KChd-", o = {
3
+ root: e,
4
+ list: t,
5
+ item: n,
6
+ link: r,
7
+ current: i,
8
+ separator: a
17
9
  };
10
+ export { i as current, o as default, n as item, r as link, t as list, e as root, a as separator };
@@ -1,57 +1,35 @@
1
- import { jsxs as m, jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as y } from "react";
3
- import r from "clsx";
4
- import o from "./Button.module.scss.js";
5
- const b = {
6
- dots: o.loadingDots,
7
- shimmer: o.loadingShimmer,
8
- border: o.loadingBorder
9
- }, x = y(
10
- ({
11
- variant: s = "primary",
12
- size: e = "md",
13
- loading: d = !1,
14
- loadingStyle: n = "dots",
15
- fullWidth: i = !1,
16
- iconOnly: l = !1,
17
- disabled: p,
18
- classes: t,
19
- className: f,
20
- style: c,
21
- children: h,
22
- ...u
23
- }, N) => /* @__PURE__ */ m(
24
- "button",
25
- {
26
- ref: N,
27
- className: r(
28
- o.root,
29
- o[s],
30
- o[e],
31
- i && o.fullWidth,
32
- l && o.iconOnly,
33
- d && o.loading,
34
- d && b[n],
35
- t?.root,
36
- f
37
- ),
38
- style: c,
39
- disabled: p || d,
40
- "aria-busy": d || void 0,
41
- ...u,
42
- children: [
43
- /* @__PURE__ */ a("div", { className: r(o.shimmer, t?.shimmer) }),
44
- /* @__PURE__ */ a("span", { className: r(o.content, t?.content), children: h }),
45
- /* @__PURE__ */ m("span", { className: r(o.dots, t?.dots), "aria-hidden": "true", children: [
46
- /* @__PURE__ */ a("span", { className: r(o.dot, t?.dot) }),
47
- /* @__PURE__ */ a("span", { className: r(o.dot, t?.dot) }),
48
- /* @__PURE__ */ a("span", { className: r(o.dot, t?.dot) })
49
- ] })
50
- ]
51
- }
52
- )
53
- );
54
- x.displayName = "Button";
55
- export {
56
- x as Button
57
- };
1
+ import { forwardRef as e } from "react";
2
+ import t from "clsx";
3
+ import n from "./Button.module.scss.js";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ // src/components/Button/Button.tsx
6
+ var a = {
7
+ dots: n.loadingDots,
8
+ shimmer: n.loadingShimmer,
9
+ border: n.loadingBorder
10
+ }, o = e(({ variant: e = "primary", size: o = "md", loading: s = !1, loadingStyle: c = "dots", fullWidth: l = !1, iconOnly: u = !1, disabled: d, classes: f, className: p, style: m, children: h, ...g }, _) => /* @__PURE__ */ i("button", {
11
+ ref: _,
12
+ className: t(n.root, n[e], n[o], l && n.fullWidth, u && n.iconOnly, s && n.loading, s && a[c], f?.root, p),
13
+ style: m,
14
+ disabled: d || s,
15
+ "aria-busy": s || void 0,
16
+ ...g,
17
+ children: [
18
+ /* @__PURE__ */ r("div", { className: t(n.shimmer, f?.shimmer) }),
19
+ /* @__PURE__ */ r("span", {
20
+ className: t(n.content, f?.content),
21
+ children: h
22
+ }),
23
+ /* @__PURE__ */ i("span", {
24
+ className: t(n.dots, f?.dots),
25
+ "aria-hidden": "true",
26
+ children: [
27
+ /* @__PURE__ */ r("span", { className: t(n.dot, f?.dot) }),
28
+ /* @__PURE__ */ r("span", { className: t(n.dot, f?.dot) }),
29
+ /* @__PURE__ */ r("span", { className: t(n.dot, f?.dot) })
30
+ ]
31
+ })
32
+ ]
33
+ }));
34
+ o.displayName = "Button";
35
+ export { o as Button };
@@ -1,47 +1,25 @@
1
- const o = "crk-root-8RX49", n = "crk-loading-QfItr", r = "crk-primary-st6yY", c = "crk-secondary-j-3rj", t = "crk-danger-Hxs5n", s = "crk-ghost-kQ0A8", d = "crk-sm-RXFPY", e = "crk-md-nDnOD", i = "crk-lg-qD-Qh", l = "crk-fullWidth-AHpSl", m = "crk-iconOnly-FNrSu", a = "crk-content-PpYVU", k = "crk-shimmer-8iQSU", g = "crk-loadingShimmer-BVvFw", h = "crk-shimmerSweep-uiZ01", S = "crk-dots-U8wss", p = "crk-loadingDots-eKv64", u = "crk-dot-Owuk1", y = "crk-dotBounce-FwdcC", w = "crk-loadingBorder-9ULFw", B = "crk-borderSpin-EJ2gW", D = {
2
- root: o,
3
- loading: n,
4
- primary: r,
5
- secondary: c,
6
- danger: t,
7
- ghost: s,
8
- sm: d,
9
- md: e,
10
- lg: i,
11
- fullWidth: l,
12
- iconOnly: m,
13
- content: a,
14
- shimmer: k,
15
- loadingShimmer: g,
16
- shimmerSweep: h,
17
- dots: S,
18
- loadingDots: p,
19
- dot: u,
20
- dotBounce: y,
21
- loadingBorder: w,
22
- borderSpin: B
23
- };
24
- export {
25
- B as borderSpin,
26
- a as content,
27
- t as danger,
28
- D as default,
29
- u as dot,
30
- y as dotBounce,
31
- S as dots,
32
- l as fullWidth,
33
- s as ghost,
34
- m as iconOnly,
35
- i as lg,
36
- n as loading,
37
- w as loadingBorder,
38
- p as loadingDots,
39
- g as loadingShimmer,
40
- e as md,
41
- r as primary,
42
- o as root,
43
- c as secondary,
44
- k as shimmer,
45
- h as shimmerSweep,
46
- d as sm
1
+ // src/components/Button/Button.module.scss
2
+ var e = "crk-root-8RX49", t = "crk-loading-QfItr", n = "crk-primary-st6yY", r = "crk-secondary-j-3rj", i = "crk-danger-Hxs5n", a = "crk-ghost-kQ0A8", o = "crk-sm-RXFPY", s = "crk-md-nDnOD", c = "crk-lg-qD-Qh", l = "crk-fullWidth-AHpSl", u = "crk-iconOnly-FNrSu", d = "crk-content-PpYVU", f = "crk-shimmer-8iQSU", p = "crk-loadingShimmer-BVvFw", m = "crk-shimmerSweep-uiZ01", h = "crk-dots-U8wss", g = "crk-loadingDots-eKv64", _ = "crk-dot-Owuk1", v = "crk-dotBounce-FwdcC", y = "crk-loadingBorder-9ULFw", b = "crk-borderSpin-EJ2gW", x = {
3
+ root: e,
4
+ loading: t,
5
+ primary: n,
6
+ secondary: r,
7
+ danger: i,
8
+ ghost: a,
9
+ sm: o,
10
+ md: s,
11
+ lg: c,
12
+ fullWidth: l,
13
+ iconOnly: u,
14
+ content: d,
15
+ shimmer: f,
16
+ loadingShimmer: p,
17
+ shimmerSweep: m,
18
+ dots: h,
19
+ loadingDots: g,
20
+ dot: _,
21
+ dotBounce: v,
22
+ loadingBorder: y,
23
+ borderSpin: b
47
24
  };
25
+ export { b as borderSpin, d as content, i as danger, x as default, _ as dot, v as dotBounce, h as dots, l as fullWidth, a as ghost, u as iconOnly, c as lg, t as loading, y as loadingBorder, g as loadingDots, p as loadingShimmer, s as md, n as primary, e as root, r as secondary, f as shimmer, m as shimmerSweep, o as sm };
@@ -1,132 +1,95 @@
1
- import { jsx as d, jsxs as T } from "react/jsx-runtime";
2
- import { forwardRef as v, createContext as M, useContext as h } from "react";
3
- import n from "clsx";
4
- import e from "./Card.module.scss.js";
5
- const f = M({ classes: {} }), b = v(
6
- ({ as: t = "h3", className: a, children: o, ...s }, r) => {
7
- const { classes: l } = h(f);
8
- return /* @__PURE__ */ d(t, { ref: r, className: n(e.title, l.title, a), ...s, children: o });
9
- }
10
- );
11
- b.displayName = "Card.Title";
12
- const P = v(
13
- ({ title: t, subtitle: a, actions: o, divider: s = !1, className: r, children: l, ...i }, p) => {
14
- const { classes: c } = h(f), x = t != null || a != null;
15
- return /* @__PURE__ */ T(
16
- "div",
17
- {
18
- ref: p,
19
- className: n(e.header, s && e.headerDivider, c.header, r),
20
- ...i,
21
- children: [
22
- /* @__PURE__ */ T("div", { className: e.headerMain, children: [
23
- x && /* @__PURE__ */ T("div", { className: e.titleBlock, children: [
24
- t != null && /* @__PURE__ */ d(b, { children: t }),
25
- a != null && /* @__PURE__ */ d("div", { className: n(e.subtitle, c.subtitle), children: a })
26
- ] }),
27
- l
28
- ] }),
29
- o != null && /* @__PURE__ */ d("div", { className: n(e.actions, c.actions), children: o })
30
- ]
31
- }
32
- );
33
- }
34
- );
35
- P.displayName = "Card.Header";
36
- const $ = v(({ className: t, children: a, ...o }, s) => {
37
- const { classes: r } = h(f);
38
- return /* @__PURE__ */ d("div", { ref: s, className: n(e.body, r.body, t), ...o, children: a });
1
+ import { createContext as e, forwardRef as t, useContext as n } from "react";
2
+ import r from "clsx";
3
+ import i from "./Card.module.scss.js";
4
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
+ // src/components/Card/Card.tsx
6
+ var s = e({ classes: {} }), c = t(({ as: e = "h3", className: t, children: o, ...c }, l) => {
7
+ let { classes: u } = n(s);
8
+ return /* @__PURE__ */ a(e, {
9
+ ref: l,
10
+ className: r(i.title, u.title, t),
11
+ ...c,
12
+ children: o
13
+ });
39
14
  });
40
- $.displayName = "Card.Body";
41
- const w = v(
42
- ({ align: t = "end", divider: a = !1, className: o, children: s, ...r }, l) => {
43
- const { classes: i } = h(f);
44
- return /* @__PURE__ */ d(
45
- "div",
46
- {
47
- ref: l,
48
- className: n(
49
- e.footer,
50
- e[`footer-${t}`],
51
- a && e.footerDivider,
52
- i.footer,
53
- o
54
- ),
55
- ...r,
56
- children: s
57
- }
58
- );
59
- }
60
- );
61
- w.displayName = "Card.Footer";
62
- const y = v(
63
- ({
64
- variant: t = "outlined",
65
- padding: a = "md",
66
- interactive: o = !1,
67
- selected: s = !1,
68
- accent: r,
69
- href: l,
70
- target: i,
71
- rel: p,
72
- classes: c,
73
- className: x,
74
- style: g,
75
- onClick: N,
76
- onKeyDown: C,
77
- children: E,
78
- ...k
79
- }, D) => {
80
- const B = l != null, F = o || B, u = F && !B && typeof N == "function", H = r != null ? { ...g, "--crk-card-accent": r } : g, j = n(
81
- e.root,
82
- e[t],
83
- e[`padding-${a}`],
84
- F && e.interactive,
85
- s && e.selected,
86
- r != null && e.accented,
87
- c?.root,
88
- x
89
- ), L = (m) => {
90
- C?.(m), !(!u || m.defaultPrevented) && (m.key === "Enter" || m.key === " ") && (m.preventDefault(), N?.(m));
91
- }, I = /* @__PURE__ */ d(f.Provider, { value: { classes: c ?? {} }, children: E });
92
- return B ? /* @__PURE__ */ d(
93
- "a",
94
- {
95
- ref: D,
96
- href: l,
97
- target: i,
98
- rel: p,
99
- className: j,
100
- style: H,
101
- "data-selected": s || void 0,
102
- onClick: N,
103
- onKeyDown: C,
104
- ...k,
105
- children: I
106
- }
107
- ) : /* @__PURE__ */ d(
108
- "div",
109
- {
110
- ref: D,
111
- className: j,
112
- style: H,
113
- "data-selected": s || void 0,
114
- role: u ? "button" : void 0,
115
- tabIndex: u ? 0 : void 0,
116
- "aria-pressed": u && s ? !0 : void 0,
117
- onClick: N,
118
- onKeyDown: u ? L : C,
119
- ...k,
120
- children: I
121
- }
122
- );
123
- }
124
- );
125
- y.displayName = "Card";
126
- y.Header = P;
127
- y.Title = b;
128
- y.Body = $;
129
- y.Footer = w;
130
- export {
131
- y as Card
132
- };
15
+ c.displayName = "Card.Title";
16
+ var l = t(({ title: e, subtitle: t, actions: l, divider: u = !1, className: d, children: f, ...p }, m) => {
17
+ let { classes: h } = n(s), g = e != null || t != null;
18
+ return /* @__PURE__ */ o("div", {
19
+ ref: m,
20
+ className: r(i.header, u && i.headerDivider, h.header, d),
21
+ ...p,
22
+ children: [/* @__PURE__ */ o("div", {
23
+ className: i.headerMain,
24
+ children: [g && /* @__PURE__ */ o("div", {
25
+ className: i.titleBlock,
26
+ children: [e != null && /* @__PURE__ */ a(c, { children: e }), t != null && /* @__PURE__ */ a("div", {
27
+ className: r(i.subtitle, h.subtitle),
28
+ children: t
29
+ })]
30
+ }), f]
31
+ }), l != null && /* @__PURE__ */ a("div", {
32
+ className: r(i.actions, h.actions),
33
+ children: l
34
+ })]
35
+ });
36
+ });
37
+ l.displayName = "Card.Header";
38
+ var u = t(({ className: e, children: t, ...o }, c) => {
39
+ let { classes: l } = n(s);
40
+ return /* @__PURE__ */ a("div", {
41
+ ref: c,
42
+ className: r(i.body, l.body, e),
43
+ ...o,
44
+ children: t
45
+ });
46
+ });
47
+ u.displayName = "Card.Body";
48
+ var d = t(({ align: e = "end", divider: t = !1, className: o, children: c, ...l }, u) => {
49
+ let { classes: d } = n(s);
50
+ return /* @__PURE__ */ a("div", {
51
+ ref: u,
52
+ className: r(i.footer, i[`footer-${e}`], t && i.footerDivider, d.footer, o),
53
+ ...l,
54
+ children: c
55
+ });
56
+ });
57
+ d.displayName = "Card.Footer";
58
+ var f = t(({ variant: e = "outlined", padding: t = "md", interactive: n = !1, selected: o = !1, accent: c, href: l, target: u, rel: d, classes: f, className: p, style: m, onClick: h, onKeyDown: g, children: _, ...v }, y) => {
59
+ let b = l != null, x = n || b, S = x && !b && typeof h == "function", C = c == null ? m : {
60
+ ...m,
61
+ "--crk-card-accent": c
62
+ }, w = r(i.root, i[e], i[`padding-${t}`], x && i.interactive, o && i.selected, c != null && i.accented, f?.root, p), T = (e) => {
63
+ g?.(e), S && !e.defaultPrevented && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), h?.(e));
64
+ }, E = /* @__PURE__ */ a(s.Provider, {
65
+ value: { classes: f ?? {} },
66
+ children: _
67
+ });
68
+ return b ? /* @__PURE__ */ a("a", {
69
+ ref: y,
70
+ href: l,
71
+ target: u,
72
+ rel: d,
73
+ className: w,
74
+ style: C,
75
+ "data-selected": o || void 0,
76
+ onClick: h,
77
+ onKeyDown: g,
78
+ ...v,
79
+ children: E
80
+ }) : /* @__PURE__ */ a("div", {
81
+ ref: y,
82
+ className: w,
83
+ style: C,
84
+ "data-selected": o || void 0,
85
+ role: S ? "button" : void 0,
86
+ tabIndex: S ? 0 : void 0,
87
+ "aria-pressed": S && o ? !0 : void 0,
88
+ onClick: h,
89
+ onKeyDown: S ? T : g,
90
+ ...v,
91
+ children: E
92
+ });
93
+ });
94
+ f.displayName = "Card", f.Header = l, f.Title = c, f.Body = u, f.Footer = d;
95
+ export { f as Card };
@@ -1,60 +1,35 @@
1
- const e = "crk-root-rJfoz", t = "crk-outlined-SPAas", o = "crk-elevated-SpUsJ", d = "crk-filled-63Znw", r = "crk-padding-none-E-idy", n = "crk-padding-sm-wEesL", c = "crk-padding-md-PxKrw", i = "crk-padding-lg-HGAEB", a = "crk-interactive-rmnPM", s = "crk-selected-h8Mud", k = "crk-accented-y-KUi", l = "crk-header-j-c-9", f = "crk-headerDivider-VkECC", g = "crk-headerMain-caD6k", p = "crk-titleBlock-2Gsho", v = "crk-title-DzwNA", h = "crk-subtitle-RVMlO", w = "crk-actions-kVLYd", b = "crk-body-v78vB", m = "crk-footer-FjLbG", u = "crk-footer-start-D2qu0", B = "crk-footer-end-oKz5B", D = "crk-footer-between-zPeGc", E = "crk-footerDivider-jOmZZ", M = {
2
- root: e,
3
- outlined: t,
4
- elevated: o,
5
- filled: d,
6
- "padding-none": "crk-padding-none-E-idy",
7
- paddingNone: r,
8
- "padding-sm": "crk-padding-sm-wEesL",
9
- paddingSm: n,
10
- "padding-md": "crk-padding-md-PxKrw",
11
- paddingMd: c,
12
- "padding-lg": "crk-padding-lg-HGAEB",
13
- paddingLg: i,
14
- interactive: a,
15
- selected: s,
16
- accented: k,
17
- header: l,
18
- headerDivider: f,
19
- headerMain: g,
20
- titleBlock: p,
21
- title: v,
22
- subtitle: h,
23
- actions: w,
24
- body: b,
25
- footer: m,
26
- "footer-start": "crk-footer-start-D2qu0",
27
- footerStart: u,
28
- "footer-end": "crk-footer-end-oKz5B",
29
- footerEnd: B,
30
- "footer-between": "crk-footer-between-zPeGc",
31
- footerBetween: D,
32
- footerDivider: E
33
- };
34
- export {
35
- k as accented,
36
- w as actions,
37
- b as body,
38
- M as default,
39
- o as elevated,
40
- d as filled,
41
- m as footer,
42
- D as footerBetween,
43
- E as footerDivider,
44
- B as footerEnd,
45
- u as footerStart,
46
- l as header,
47
- f as headerDivider,
48
- g as headerMain,
49
- a as interactive,
50
- t as outlined,
51
- i as paddingLg,
52
- c as paddingMd,
53
- r as paddingNone,
54
- n as paddingSm,
55
- e as root,
56
- s as selected,
57
- h as subtitle,
58
- v as title,
59
- p as titleBlock
1
+ // src/components/Card/Card.module.scss
2
+ var e = "crk-root-rJfoz", t = "crk-outlined-SPAas", n = "crk-elevated-SpUsJ", r = "crk-filled-63Znw", i = "crk-padding-none-E-idy", a = "crk-padding-sm-wEesL", o = "crk-padding-md-PxKrw", s = "crk-padding-lg-HGAEB", c = "crk-interactive-rmnPM", l = "crk-selected-h8Mud", u = "crk-accented-y-KUi", d = "crk-header-j-c-9", f = "crk-headerDivider-VkECC", p = "crk-headerMain-caD6k", m = "crk-titleBlock-2Gsho", h = "crk-title-DzwNA", g = "crk-subtitle-RVMlO", _ = "crk-actions-kVLYd", v = "crk-body-v78vB", y = "crk-footer-FjLbG", b = "crk-footer-start-D2qu0", x = "crk-footer-end-oKz5B", S = "crk-footer-between-zPeGc", C = "crk-footerDivider-jOmZZ", w = {
3
+ root: e,
4
+ outlined: t,
5
+ elevated: n,
6
+ filled: r,
7
+ "padding-none": "crk-padding-none-E-idy",
8
+ paddingNone: i,
9
+ "padding-sm": "crk-padding-sm-wEesL",
10
+ paddingSm: a,
11
+ "padding-md": "crk-padding-md-PxKrw",
12
+ paddingMd: o,
13
+ "padding-lg": "crk-padding-lg-HGAEB",
14
+ paddingLg: s,
15
+ interactive: c,
16
+ selected: l,
17
+ accented: u,
18
+ header: d,
19
+ headerDivider: f,
20
+ headerMain: p,
21
+ titleBlock: m,
22
+ title: h,
23
+ subtitle: g,
24
+ actions: _,
25
+ body: v,
26
+ footer: y,
27
+ "footer-start": "crk-footer-start-D2qu0",
28
+ footerStart: b,
29
+ "footer-end": "crk-footer-end-oKz5B",
30
+ footerEnd: x,
31
+ "footer-between": "crk-footer-between-zPeGc",
32
+ footerBetween: S,
33
+ footerDivider: C
60
34
  };
35
+ export { u as accented, _ as actions, v as body, w as default, n as elevated, r as filled, y as footer, S as footerBetween, C as footerDivider, x as footerEnd, b as footerStart, d as header, f as headerDivider, p as headerMain, c as interactive, t as outlined, s as paddingLg, o as paddingMd, i as paddingNone, a as paddingSm, e as root, l as selected, g as subtitle, h as title, m as titleBlock };
@@ -86,4 +86,4 @@ export interface AreaChartProps<T extends Record<string, unknown>> {
86
86
  * fillGradient
87
87
  * />
88
88
  */
89
- export declare function AreaChart<T extends Record<string, unknown>>({ data, xKey, config, aspectRatio, height, curve, stacked, stackOffset, fillGradient, showGrid, showXAxis, showYAxis, showLegend, showTooltip, yTickCount, yFormat, xFormat, valueFormat, renderTooltip, margin: marginOverride, emptyMessage, className, style, classes, }: AreaChartProps<T>): import("react/jsx-runtime").JSX.Element;
89
+ export declare function AreaChart<T extends Record<string, unknown>>({ data, xKey, config, aspectRatio, height, curve, stacked, stackOffset, fillGradient, showGrid, showXAxis, showYAxis, showLegend, showTooltip, yTickCount, yFormat, xFormat, valueFormat, renderTooltip, margin: marginOverride, emptyMessage, className, style, classes, }: AreaChartProps<T>): import("react").JSX.Element;