@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,96 +1,93 @@
1
- import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
- import { forwardRef as x } from "react";
3
- import n from "clsx";
4
- import l from "./Alert.module.scss.js";
5
- const L = {
6
- info: /* @__PURE__ */ e("svg", { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ e(
7
- "path",
8
- {
9
- fillRule: "evenodd",
10
- d: "M10 18a8 8 0 100-16 8 8 0 000 16zM9 9a1 1 0 012 0v4a1 1 0 11-2 0V9zm1-4a1 1 0 100 2 1 1 0 000-2z",
11
- clipRule: "evenodd"
12
- }
13
- ) }),
14
- success: /* @__PURE__ */ e("svg", { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ e(
15
- "path",
16
- {
17
- fillRule: "evenodd",
18
- d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.7-9.3a1 1 0 00-1.4-1.4L9 10.6 7.7 9.3a1 1 0 00-1.4 1.4l2 2a1 1 0 001.4 0l4-4z",
19
- clipRule: "evenodd"
20
- }
21
- ) }),
22
- warning: /* @__PURE__ */ e("svg", { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ e(
23
- "path",
24
- {
25
- fillRule: "evenodd",
26
- d: "M8.26 3.1c.77-1.33 2.71-1.33 3.48 0l5.58 9.67c.77 1.33-.19 3-1.74 3H4.42c-1.55 0-2.51-1.67-1.74-3L8.26 3.1zM10 7a1 1 0 011 1v3a1 1 0 11-2 0V8a1 1 0 011-1zm0 7a1 1 0 100-2 1 1 0 000 2z",
27
- clipRule: "evenodd"
28
- }
29
- ) }),
30
- danger: /* @__PURE__ */ e("svg", { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ e(
31
- "path",
32
- {
33
- fillRule: "evenodd",
34
- d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.7 7.3a1 1 0 00-1.4 1.4L8.6 10l-1.3 1.3a1 1 0 101.4 1.4L10 11.4l1.3 1.3a1 1 0 001.4-1.4L11.4 10l1.3-1.3a1 1 0 00-1.4-1.4L10 8.6 8.7 7.3z",
35
- clipRule: "evenodd"
36
- }
37
- ) })
38
- }, g = x(
39
- ({
40
- variant: o = "info",
41
- title: t,
42
- icon: a = !0,
43
- onClose: c,
44
- closeLabel: h = "Dismiss",
45
- action: s,
46
- layout: r = "inline",
47
- size: f = "md",
48
- classes: i,
49
- className: p,
50
- children: u,
51
- ...z
52
- }, N) => {
53
- const m = a === !0 ? L[o] : a === !1 ? null : a, v = s != null ? /* @__PURE__ */ e("div", { className: n(l.action, i?.action), children: s }) : null;
54
- return /* @__PURE__ */ d(
55
- "div",
56
- {
57
- ref: N,
58
- role: "alert",
59
- className: n(
60
- l.root,
61
- l[o],
62
- r === "banner" && l.banner,
63
- f === "sm" && l.sm,
64
- i?.root,
65
- p
66
- ),
67
- ...z,
68
- children: [
69
- m != null && /* @__PURE__ */ e("span", { className: n(l.icon, i?.icon), "aria-hidden": "true", children: m }),
70
- /* @__PURE__ */ d("div", { className: n(l.content, i?.content), children: [
71
- /* @__PURE__ */ d("div", { className: l.text, children: [
72
- t != null && /* @__PURE__ */ e("div", { className: n(l.title, i?.title), children: t }),
73
- u != null && /* @__PURE__ */ e("div", { className: n(l.message, i?.message), children: u })
74
- ] }),
75
- r === "inline" && v
76
- ] }),
77
- r === "banner" && v,
78
- c && /* @__PURE__ */ e(
79
- "button",
80
- {
81
- type: "button",
82
- className: n(l.close, i?.close),
83
- onClick: c,
84
- "aria-label": h,
85
- children: /* @__PURE__ */ e("svg", { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ e("path", { d: "M6.3 6.3a1 1 0 011.4 0L10 8.6l2.3-2.3a1 1 0 111.4 1.4L11.4 10l2.3 2.3a1 1 0 01-1.4 1.4L10 11.4l-2.3 2.3a1 1 0 01-1.4-1.4L8.6 10 6.3 7.7a1 1 0 010-1.4z" }) })
86
- }
87
- )
88
- ]
89
- }
90
- );
91
- }
92
- );
93
- g.displayName = "Alert";
94
- export {
95
- g as Alert
96
- };
1
+ import { forwardRef as e } from "react";
2
+ import t from "clsx";
3
+ import n from "./Alert.module.scss.js";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ // src/components/Alert/Alert.tsx
6
+ var a = {
7
+ info: /* @__PURE__ */ r("svg", {
8
+ viewBox: "0 0 20 20",
9
+ fill: "currentColor",
10
+ "aria-hidden": "true",
11
+ children: /* @__PURE__ */ r("path", {
12
+ fillRule: "evenodd",
13
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zM9 9a1 1 0 012 0v4a1 1 0 11-2 0V9zm1-4a1 1 0 100 2 1 1 0 000-2z",
14
+ clipRule: "evenodd"
15
+ })
16
+ }),
17
+ success: /* @__PURE__ */ r("svg", {
18
+ viewBox: "0 0 20 20",
19
+ fill: "currentColor",
20
+ "aria-hidden": "true",
21
+ children: /* @__PURE__ */ r("path", {
22
+ fillRule: "evenodd",
23
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.7-9.3a1 1 0 00-1.4-1.4L9 10.6 7.7 9.3a1 1 0 00-1.4 1.4l2 2a1 1 0 001.4 0l4-4z",
24
+ clipRule: "evenodd"
25
+ })
26
+ }),
27
+ warning: /* @__PURE__ */ r("svg", {
28
+ viewBox: "0 0 20 20",
29
+ fill: "currentColor",
30
+ "aria-hidden": "true",
31
+ children: /* @__PURE__ */ r("path", {
32
+ fillRule: "evenodd",
33
+ d: "M8.26 3.1c.77-1.33 2.71-1.33 3.48 0l5.58 9.67c.77 1.33-.19 3-1.74 3H4.42c-1.55 0-2.51-1.67-1.74-3L8.26 3.1zM10 7a1 1 0 011 1v3a1 1 0 11-2 0V8a1 1 0 011-1zm0 7a1 1 0 100-2 1 1 0 000 2z",
34
+ clipRule: "evenodd"
35
+ })
36
+ }),
37
+ danger: /* @__PURE__ */ r("svg", {
38
+ viewBox: "0 0 20 20",
39
+ fill: "currentColor",
40
+ "aria-hidden": "true",
41
+ children: /* @__PURE__ */ r("path", {
42
+ fillRule: "evenodd",
43
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.7 7.3a1 1 0 00-1.4 1.4L8.6 10l-1.3 1.3a1 1 0 101.4 1.4L10 11.4l1.3 1.3a1 1 0 001.4-1.4L11.4 10l1.3-1.3a1 1 0 00-1.4-1.4L10 8.6 8.7 7.3z",
44
+ clipRule: "evenodd"
45
+ })
46
+ })
47
+ }, o = e(({ variant: e = "info", title: o, icon: s = !0, onClose: c, closeLabel: l = "Dismiss", action: u, layout: d = "inline", size: f = "md", classes: p, className: m, children: h, ...g }, _) => {
48
+ let v = s === !0 ? a[e] : s === !1 ? null : s, y = u == null ? null : /* @__PURE__ */ r("div", {
49
+ className: t(n.action, p?.action),
50
+ children: u
51
+ });
52
+ return /* @__PURE__ */ i("div", {
53
+ ref: _,
54
+ role: "alert",
55
+ className: t(n.root, n[e], d === "banner" && n.banner, f === "sm" && n.sm, p?.root, m),
56
+ ...g,
57
+ children: [
58
+ v != null && /* @__PURE__ */ r("span", {
59
+ className: t(n.icon, p?.icon),
60
+ "aria-hidden": "true",
61
+ children: v
62
+ }),
63
+ /* @__PURE__ */ i("div", {
64
+ className: t(n.content, p?.content),
65
+ children: [/* @__PURE__ */ i("div", {
66
+ className: n.text,
67
+ children: [o != null && /* @__PURE__ */ r("div", {
68
+ className: t(n.title, p?.title),
69
+ children: o
70
+ }), h != null && /* @__PURE__ */ r("div", {
71
+ className: t(n.message, p?.message),
72
+ children: h
73
+ })]
74
+ }), d === "inline" && y]
75
+ }),
76
+ d === "banner" && y,
77
+ c && /* @__PURE__ */ r("button", {
78
+ type: "button",
79
+ className: t(n.close, p?.close),
80
+ onClick: c,
81
+ "aria-label": l,
82
+ children: /* @__PURE__ */ r("svg", {
83
+ viewBox: "0 0 20 20",
84
+ fill: "currentColor",
85
+ "aria-hidden": "true",
86
+ children: /* @__PURE__ */ r("path", { d: "M6.3 6.3a1 1 0 011.4 0L10 8.6l2.3-2.3a1 1 0 111.4 1.4L11.4 10l2.3 2.3a1 1 0 01-1.4 1.4L10 11.4l-2.3 2.3a1 1 0 01-1.4-1.4L8.6 10 6.3 7.7a1 1 0 010-1.4z" })
87
+ })
88
+ })
89
+ ]
90
+ });
91
+ });
92
+ o.displayName = "Alert";
93
+ export { o as Alert };
@@ -1,33 +1,18 @@
1
- const c = "crk-root-KIhSk", n = "crk-info--J-F1", t = "crk-success-lftZT", s = "crk-warning-uOpos", o = "crk-danger-53-01", e = "crk-icon-RUu7X", r = "crk-content-9Fty2", a = "crk-text--Oyu2", i = "crk-action-a5XCP", k = "crk-banner-epaT8", g = "crk-sm-jB88A", l = "crk-title-QHuwO", u = "crk-message-Wd9FZ", m = "crk-close-yMuK-", d = {
2
- root: c,
3
- info: n,
4
- success: t,
5
- warning: s,
6
- danger: o,
7
- icon: e,
8
- content: r,
9
- text: a,
10
- action: i,
11
- banner: k,
12
- sm: g,
13
- title: l,
14
- message: u,
15
- close: m
16
- };
17
- export {
18
- i as action,
19
- k as banner,
20
- m as close,
21
- r as content,
22
- o as danger,
23
- d as default,
24
- e as icon,
25
- n as info,
26
- u as message,
27
- c as root,
28
- g as sm,
29
- t as success,
30
- a as text,
31
- l as title,
32
- s as warning
1
+ // src/components/Alert/Alert.module.scss
2
+ var e = "crk-root-KIhSk", t = "crk-info--J-F1", n = "crk-success-lftZT", r = "crk-warning-uOpos", i = "crk-danger-53-01", a = "crk-icon-RUu7X", o = "crk-content-9Fty2", s = "crk-text--Oyu2", c = "crk-action-a5XCP", l = "crk-banner-epaT8", u = "crk-sm-jB88A", d = "crk-title-QHuwO", f = "crk-message-Wd9FZ", p = "crk-close-yMuK-", m = {
3
+ root: e,
4
+ info: t,
5
+ success: n,
6
+ warning: r,
7
+ danger: i,
8
+ icon: a,
9
+ content: o,
10
+ text: s,
11
+ action: c,
12
+ banner: l,
13
+ sm: u,
14
+ title: d,
15
+ message: f,
16
+ close: p
33
17
  };
18
+ export { c as action, l as banner, p as close, o as content, i as danger, m as default, a as icon, t as info, f as message, e as root, u as sm, n as success, s as text, d as title, r as warning };
@@ -1,57 +1,46 @@
1
- import { jsxs as x, jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as N, useState as w, useEffect as b } from "react";
3
- import l from "clsx";
4
- import r from "./Avatar.module.scss.js";
5
- function A(e) {
6
- const t = e.trim().split(/\s+/).filter(Boolean);
7
- return t.length === 0 ? "" : t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[t.length - 1][0]).toUpperCase();
1
+ import { forwardRef as e, useEffect as t, useState as n } from "react";
2
+ import r from "clsx";
3
+ import i from "./Avatar.module.scss.js";
4
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
+ // src/components/Avatar/Avatar.tsx
6
+ function s(e) {
7
+ let t = e.trim().split(/\s+/).filter(Boolean);
8
+ return t.length === 0 ? "" : t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[t.length - 1][0]).toUpperCase();
8
9
  }
9
- const C = N(
10
- ({ src: e, alt: t, name: i, fallback: c, size: f = "md", shape: m = "circle", status: s, classes: o, className: p, ...u }, d) => {
11
- const [h, n] = w(!1);
12
- b(() => n(!1), [e]);
13
- const g = e && !h, v = i ? A(i) : "";
14
- return /* @__PURE__ */ x(
15
- "span",
16
- {
17
- ref: d,
18
- className: l(r.root, r[f], r[m], o?.root, p),
19
- ...u,
20
- children: [
21
- g ? /* @__PURE__ */ a(
22
- "img",
23
- {
24
- className: l(r.image, o?.image),
25
- src: e,
26
- alt: t ?? i ?? "",
27
- onError: () => n(!0)
28
- }
29
- ) : /* @__PURE__ */ a(
30
- "span",
31
- {
32
- className: l(r.fallback, o?.fallback),
33
- role: "img",
34
- "aria-label": t ?? i ?? "Avatar",
35
- children: c ?? (v || /* @__PURE__ */ a(U, {}))
36
- }
37
- ),
38
- s && /* @__PURE__ */ a(
39
- "span",
40
- {
41
- className: l(r.status, r[`status_${s}`], o?.status),
42
- "data-status": s,
43
- "aria-hidden": "true"
44
- }
45
- )
46
- ]
47
- }
48
- );
49
- }
50
- );
51
- C.displayName = "Avatar";
52
- function U() {
53
- return /* @__PURE__ */ a("svg", { viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", width: "60%", height: "60%", children: /* @__PURE__ */ a("path", { d: "M12 12a5 5 0 100-10 5 5 0 000 10zm0 2c-4.4 0-8 2.7-8 6v1h16v-1c0-3.3-3.6-6-8-6z" }) });
10
+ var c = e(({ src: e, alt: c, name: u, fallback: d, size: f = "md", shape: p = "circle", status: m, classes: h, className: g, ..._ }, v) => {
11
+ let [y, b] = n(!1);
12
+ t(() => b(!1), [e]);
13
+ let x = e && !y, S = u ? s(u) : "";
14
+ return /* @__PURE__ */ o("span", {
15
+ ref: v,
16
+ className: r(i.root, i[f], i[p], h?.root, g),
17
+ ..._,
18
+ children: [x ? /* @__PURE__ */ a("img", {
19
+ className: r(i.image, h?.image),
20
+ src: e,
21
+ alt: c ?? u ?? "",
22
+ onError: () => b(!0)
23
+ }) : /* @__PURE__ */ a("span", {
24
+ className: r(i.fallback, h?.fallback),
25
+ role: "img",
26
+ "aria-label": c ?? u ?? "Avatar",
27
+ children: d ?? (S || /* @__PURE__ */ a(l, {}))
28
+ }), m && /* @__PURE__ */ a("span", {
29
+ className: r(i.status, i[`status_${m}`], h?.status),
30
+ "data-status": m,
31
+ "aria-hidden": "true"
32
+ })]
33
+ });
34
+ });
35
+ c.displayName = "Avatar";
36
+ function l() {
37
+ return /* @__PURE__ */ a("svg", {
38
+ viewBox: "0 0 24 24",
39
+ fill: "currentColor",
40
+ "aria-hidden": "true",
41
+ width: "60%",
42
+ height: "60%",
43
+ children: /* @__PURE__ */ a("path", { d: "M12 12a5 5 0 100-10 5 5 0 000 10zm0 2c-4.4 0-8 2.7-8 6v1h16v-1c0-3.3-3.6-6-8-6z" })
44
+ });
54
45
  }
55
- export {
56
- C as Avatar
57
- };
46
+ export { c as Avatar };
@@ -1,43 +1,23 @@
1
- const s = "crk-root-1YbL5", t = "crk-xs-1SMBv", a = "crk-sm-8TB22", c = "crk-md-zeW0d", n = "crk-lg-MWKN-", o = "crk-xl-KCqIL", u = "crk-circle-nzLby", l = "crk-square-JrlyG", r = "crk-image-HFFlp", e = "crk-fallback-R4J-V", k = "crk-status-e4HnT", i = "crk-status_online-bny3b", y = "crk-status_online-bny3b", f = "crk-status_offline-xxp2c", _ = "crk-status_offline-xxp2c", b = "crk-status_away-coReU", x = "crk-status_away-coReU", m = "crk-status_busy-aOHjE", g = "crk-status_busy-aOHjE", w = {
2
- root: s,
3
- xs: t,
4
- sm: a,
5
- md: c,
6
- lg: n,
7
- xl: o,
8
- circle: u,
9
- square: l,
10
- image: r,
11
- fallback: e,
12
- status: k,
13
- status_online: i,
14
- statusOnline: y,
15
- status_offline: f,
16
- statusOffline: _,
17
- status_away: b,
18
- statusAway: x,
19
- status_busy: m,
20
- statusBusy: g
21
- };
22
- export {
23
- u as circle,
24
- w as default,
25
- e as fallback,
26
- r as image,
27
- n as lg,
28
- c as md,
29
- s as root,
30
- a as sm,
31
- l as square,
32
- k as status,
33
- x as statusAway,
34
- g as statusBusy,
35
- _ as statusOffline,
36
- y as statusOnline,
37
- b as status_away,
38
- m as status_busy,
39
- f as status_offline,
40
- i as status_online,
41
- o as xl,
42
- t as xs
1
+ // src/components/Avatar/Avatar.module.scss
2
+ var e = "crk-root-1YbL5", t = "crk-xs-1SMBv", n = "crk-sm-8TB22", r = "crk-md-zeW0d", i = "crk-lg-MWKN-", a = "crk-xl-KCqIL", o = "crk-circle-nzLby", s = "crk-square-JrlyG", c = "crk-image-HFFlp", l = "crk-fallback-R4J-V", u = "crk-status-e4HnT", d = "crk-status_online-bny3b", f = "crk-status_online-bny3b", p = "crk-status_offline-xxp2c", m = "crk-status_offline-xxp2c", h = "crk-status_away-coReU", g = "crk-status_away-coReU", _ = "crk-status_busy-aOHjE", v = "crk-status_busy-aOHjE", y = {
3
+ root: e,
4
+ xs: t,
5
+ sm: n,
6
+ md: r,
7
+ lg: i,
8
+ xl: a,
9
+ circle: o,
10
+ square: s,
11
+ image: c,
12
+ fallback: l,
13
+ status: u,
14
+ status_online: d,
15
+ statusOnline: f,
16
+ status_offline: p,
17
+ statusOffline: m,
18
+ status_away: h,
19
+ statusAway: g,
20
+ status_busy: _,
21
+ statusBusy: v
43
22
  };
23
+ export { o as circle, y as default, l as fallback, c as image, i as lg, r as md, e as root, n as sm, s as square, u as status, g as statusAway, v as statusBusy, m as statusOffline, f as statusOnline, h as status_away, _ as status_busy, p as status_offline, d as status_online, a as xl, t as xs };
@@ -1,38 +1,16 @@
1
- import { jsxs as l, jsx as n } from "react/jsx-runtime";
2
- import { forwardRef as c } from "react";
1
+ import { forwardRef as e } from "react";
3
2
  import t from "clsx";
4
- import r from "./Badge.module.scss.js";
5
- const x = c(
6
- ({
7
- variant: a = "neutral",
8
- appearance: e = "soft",
9
- size: s = "md",
10
- dot: m = !1,
11
- classes: o,
12
- className: d,
13
- children: f,
14
- ...i
15
- }, p) => /* @__PURE__ */ l(
16
- "span",
17
- {
18
- ref: p,
19
- className: t(
20
- r.root,
21
- r[a],
22
- r[e],
23
- r[s],
24
- o?.root,
25
- d
26
- ),
27
- ...i,
28
- children: [
29
- m && /* @__PURE__ */ n("span", { className: t(r.dot, o?.dot), "aria-hidden": "true" }),
30
- f
31
- ]
32
- }
33
- )
34
- );
35
- x.displayName = "Badge";
36
- export {
37
- x as Badge
38
- };
3
+ import n from "./Badge.module.scss.js";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ // src/components/Badge/Badge.tsx
6
+ var a = e(({ variant: e = "neutral", appearance: a = "soft", size: o = "md", dot: s = !1, classes: c, className: l, children: u, ...d }, f) => /* @__PURE__ */ i("span", {
7
+ ref: f,
8
+ className: t(n.root, n[e], n[a], n[o], c?.root, l),
9
+ ...d,
10
+ children: [s && /* @__PURE__ */ r("span", {
11
+ className: t(n.dot, c?.dot),
12
+ "aria-hidden": "true"
13
+ }), u]
14
+ }));
15
+ a.displayName = "Badge";
16
+ export { a as Badge };
@@ -1,31 +1,17 @@
1
- const s = "crk-root-KSuIQ", c = "crk-sm--vFVn", o = "crk-md-zmWkB", n = "crk-lg-vhZlR", r = "crk-neutral-RdrgV", t = "crk-primary-wn6-R", e = "crk-success-DMnu3", k = "crk-warning-4IHkk", l = "crk-danger-nwbtA", a = "crk-soft-D7eFo", d = "crk-solid-OAgyP", i = "crk-outline-2IwcH", u = "crk-dot-KeAKh", g = {
2
- root: s,
3
- sm: c,
4
- md: o,
5
- lg: n,
6
- neutral: r,
7
- primary: t,
8
- success: e,
9
- warning: k,
10
- danger: l,
11
- soft: a,
12
- solid: d,
13
- outline: i,
14
- dot: u
15
- };
16
- export {
17
- l as danger,
18
- g as default,
19
- u as dot,
20
- n as lg,
21
- o as md,
22
- r as neutral,
23
- i as outline,
24
- t as primary,
25
- s as root,
26
- c as sm,
27
- a as soft,
28
- d as solid,
29
- e as success,
30
- k as warning
1
+ // src/components/Badge/Badge.module.scss
2
+ var e = "crk-root-KSuIQ", t = "crk-sm--vFVn", n = "crk-md-zmWkB", r = "crk-lg-vhZlR", i = "crk-neutral-RdrgV", a = "crk-primary-wn6-R", o = "crk-success-DMnu3", s = "crk-warning-4IHkk", c = "crk-danger-nwbtA", l = "crk-soft-D7eFo", u = "crk-solid-OAgyP", d = "crk-outline-2IwcH", f = "crk-dot-KeAKh", p = {
3
+ root: e,
4
+ sm: t,
5
+ md: n,
6
+ lg: r,
7
+ neutral: i,
8
+ primary: a,
9
+ success: o,
10
+ warning: s,
11
+ danger: c,
12
+ soft: l,
13
+ solid: u,
14
+ outline: d,
15
+ dot: f
31
16
  };
17
+ export { c as danger, p as default, f as dot, r as lg, n as md, i as neutral, d as outline, a as primary, e as root, t as sm, l as soft, u as solid, o as success, s as warning };
@@ -24,7 +24,7 @@ export interface BreadcrumbItemProps extends Omit<ComponentPropsWithRef<'li'>, '
24
24
  current?: boolean;
25
25
  children?: ReactNode;
26
26
  }
27
- export declare function BreadcrumbItem({ href, current, children, className, ...rest }: BreadcrumbItemProps): import("react/jsx-runtime").JSX.Element;
27
+ export declare function BreadcrumbItem({ href, current, children, className, ...rest }: BreadcrumbItemProps): import("react").JSX.Element;
28
28
  export declare namespace BreadcrumbItem {
29
29
  var displayName: string;
30
30
  }
@@ -1,49 +1,53 @@
1
- import { jsx as e, jsxs as j } from "react/jsx-runtime";
2
- import { forwardRef as k, Children as v, isValidElement as C } from "react";
3
- import a from "clsx";
4
- import t from "./Breadcrumbs.module.scss.js";
5
- function f({ href: n, current: s = !1, children: i, className: r, ...m }) {
6
- return /* @__PURE__ */ e("li", { className: r, ...m, children: s || !n ? /* @__PURE__ */ e("span", { "aria-current": s ? "page" : void 0, children: i }) : /* @__PURE__ */ e("a", { href: n, children: i }) });
1
+ import { Children as e, forwardRef as t, isValidElement as n } from "react";
2
+ import r from "clsx";
3
+ import i from "./Breadcrumbs.module.scss.js";
4
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
+ // src/components/Breadcrumbs/Breadcrumbs.tsx
6
+ function s({ href: e, current: t = !1, children: n, className: r, ...i }) {
7
+ return /* @__PURE__ */ a("li", {
8
+ className: r,
9
+ ...i,
10
+ children: t || !e ? /* @__PURE__ */ a("span", {
11
+ "aria-current": t ? "page" : void 0,
12
+ children: n
13
+ }) : /* @__PURE__ */ a("a", {
14
+ href: e,
15
+ children: n
16
+ })
17
+ });
7
18
  }
8
- f.displayName = "Breadcrumbs.Item";
9
- const h = k(
10
- ({ children: n, separator: s = "/", label: i = "Breadcrumb", classes: r, className: m, ...b }, B) => {
11
- const o = v.toArray(n).filter(C);
12
- return /* @__PURE__ */ e(
13
- "nav",
14
- {
15
- ref: B,
16
- "aria-label": i,
17
- className: a(t.root, r?.root, m),
18
- ...b,
19
- children: /* @__PURE__ */ e("ol", { className: a(t.list, r?.list), children: o.map((c, l) => {
20
- const d = l === o.length - 1, y = c.props ?? {}, { href: p, current: g, children: u, className: x } = y, N = g ?? d;
21
- return /* @__PURE__ */ j(
22
- "li",
23
- {
24
- className: a(t.item, r?.item, x),
25
- children: [
26
- N || !p ? /* @__PURE__ */ e(
27
- "span",
28
- {
29
- className: a(t.current, r?.current),
30
- "aria-current": N ? "page" : void 0,
31
- children: u
32
- }
33
- ) : /* @__PURE__ */ e("a", { className: a(t.link, r?.link), href: p, children: u }),
34
- !d && /* @__PURE__ */ e("span", { className: a(t.separator, r?.separator), "aria-hidden": "true", children: s })
35
- ]
36
- },
37
- c.key ?? l
38
- );
39
- }) })
40
- }
41
- );
42
- }
43
- );
44
- h.displayName = "Breadcrumbs";
45
- const E = Object.assign(h, { Item: f });
46
- export {
47
- f as BreadcrumbItem,
48
- E as Breadcrumbs
49
- };
19
+ s.displayName = "Breadcrumbs.Item";
20
+ var c = t(({ children: t, separator: s = "/", label: c = "Breadcrumb", classes: l, className: u, ...d }, f) => {
21
+ let p = e.toArray(t).filter(n);
22
+ return /* @__PURE__ */ a("nav", {
23
+ ref: f,
24
+ "aria-label": c,
25
+ className: r(i.root, l?.root, u),
26
+ ...d,
27
+ children: /* @__PURE__ */ a("ol", {
28
+ className: r(i.list, l?.list),
29
+ children: p.map((e, t) => {
30
+ let n = t === p.length - 1, { href: c, current: u, children: d, className: f } = e.props ?? {}, m = u ?? n;
31
+ return /* @__PURE__ */ o("li", {
32
+ className: r(i.item, l?.item, f),
33
+ children: [m || !c ? /* @__PURE__ */ a("span", {
34
+ className: r(i.current, l?.current),
35
+ "aria-current": m ? "page" : void 0,
36
+ children: d
37
+ }) : /* @__PURE__ */ a("a", {
38
+ className: r(i.link, l?.link),
39
+ href: c,
40
+ children: d
41
+ }), !n && /* @__PURE__ */ a("span", {
42
+ className: r(i.separator, l?.separator),
43
+ "aria-hidden": "true",
44
+ children: s
45
+ })]
46
+ }, e.key ?? t);
47
+ })
48
+ })
49
+ });
50
+ });
51
+ c.displayName = "Breadcrumbs";
52
+ var l = Object.assign(c, { Item: s });
53
+ export { s as BreadcrumbItem, l as Breadcrumbs };