@overdoser/react-toolkit 0.19.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/AGENTS.md +2 -2
  2. package/CHANGELOG.md +47 -0
  3. package/components/Accordion/Accordion.js +160 -177
  4. package/components/Accordion/Accordion.module.js +20 -0
  5. package/components/ActionButton/ActionButton.js +155 -209
  6. package/components/ActionButton/ActionButton.module.js +25 -0
  7. package/components/ActionButton/CopyButton.js +52 -64
  8. package/components/Alert/Alert.js +92 -95
  9. package/components/Alert/Alert.module.js +18 -0
  10. package/components/Avatar/Avatar.js +44 -55
  11. package/components/Avatar/Avatar.module.js +23 -0
  12. package/components/Badge/Badge.js +16 -38
  13. package/components/Badge/Badge.module.js +17 -0
  14. package/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  15. package/components/Breadcrumbs/Breadcrumbs.js +52 -48
  16. package/components/Breadcrumbs/Breadcrumbs.module.js +10 -0
  17. package/components/Button/Button.js +35 -57
  18. package/components/Button/Button.module.js +25 -0
  19. package/components/Card/Card.js +94 -131
  20. package/components/Card/Card.module.js +35 -0
  21. package/components/Chart/AreaChart.d.ts +1 -1
  22. package/components/Chart/AreaChart.js +248 -249
  23. package/components/Chart/Axis.d.ts +2 -2
  24. package/components/Chart/Axis.js +34 -43
  25. package/components/Chart/BarChart.d.ts +1 -1
  26. package/components/Chart/BarChart.js +307 -348
  27. package/components/Chart/Chart.module.js +32 -0
  28. package/components/Chart/ChartContainer.js +33 -41
  29. package/components/Chart/ChartLegend.d.ts +1 -1
  30. package/components/Chart/ChartLegend.js +31 -30
  31. package/components/Chart/ChartTooltip.d.ts +1 -1
  32. package/components/Chart/ChartTooltip.js +46 -41
  33. package/components/Chart/LineChart.d.ts +1 -1
  34. package/components/Chart/LineChart.js +220 -232
  35. package/components/Chart/PieChart.d.ts +1 -1
  36. package/components/Chart/PieChart.js +224 -240
  37. package/components/Chart/RadarChart.d.ts +1 -1
  38. package/components/Chart/RadarChart.js +166 -215
  39. package/components/Chart/Sparkline.js +73 -68
  40. package/components/Chart/TradingChart.d.ts +1 -1
  41. package/components/Chart/TradingChart.js +804 -701
  42. package/components/Chart/scales.js +28 -35
  43. package/components/Chart/trading/indicators.js +61 -62
  44. package/components/Chart/trading/period.js +46 -68
  45. package/components/Chart/useChartDimensions.js +30 -22
  46. package/components/Chip/Chip.js +98 -141
  47. package/components/Chip/Chip.module.js +32 -0
  48. package/components/CodeBlock/CodeBlock.js +111 -119
  49. package/components/CodeBlock/CodeBlock.module.js +23 -0
  50. package/components/CommandPalette/CommandPalette.js +387 -392
  51. package/components/CommandPalette/CommandPalette.module.js +28 -0
  52. package/components/ConfirmDialog/ConfirmDialog.d.ts +1 -1
  53. package/components/ConfirmDialog/ConfirmDialog.js +184 -199
  54. package/components/ConfirmDialog/ConfirmDialog.module.js +12 -0
  55. package/components/Divider/Divider.js +25 -36
  56. package/components/Divider/Divider.module.js +17 -0
  57. package/components/Draggable/Draggable.d.ts +1 -1
  58. package/components/Draggable/Draggable.js +157 -164
  59. package/components/Draggable/Draggable.module.js +10 -0
  60. package/components/Drawer/Drawer.js +104 -126
  61. package/components/Drawer/Drawer.module.js +66 -0
  62. package/components/Dropdown/Dropdown.js +175 -234
  63. package/components/Dropdown/Dropdown.module.js +29 -0
  64. package/components/Dropdown/DropdownItem.js +55 -58
  65. package/components/Dropdown/DropdownLabel.js +14 -11
  66. package/components/Dropdown/DropdownSeparator.js +12 -10
  67. package/components/Dropdown/dropdownContext.js +4 -5
  68. package/components/Dropdown/useContextMenu.js +27 -17
  69. package/components/Dropzone/Dropzone.js +99 -105
  70. package/components/Dropzone/Dropzone.module.js +12 -0
  71. package/components/EmptyState/EmptyState.js +58 -55
  72. package/components/EmptyState/EmptyState.module.js +14 -0
  73. package/components/Form/Form.d.ts +1 -1
  74. package/components/Form/Form.js +32 -35
  75. package/components/Form/Form.module.js +16 -0
  76. package/components/Form/FormField.d.ts +1 -1
  77. package/components/Form/FormField.js +71 -75
  78. package/components/Form/FormRow.d.ts +1 -1
  79. package/components/Form/FormRow.js +11 -8
  80. package/components/Form/formFieldDefaults.js +4 -5
  81. package/components/ImageViewer/ImageViewer.js +312 -201
  82. package/components/ImageViewer/ImageViewer.module.js +26 -0
  83. package/components/ImageViewer/useZoomPan.js +206 -137
  84. package/components/Kbd/Kbd.js +25 -22
  85. package/components/Kbd/Kbd.module.js +10 -0
  86. package/components/KeyValueList/KeyValueList.js +119 -123
  87. package/components/KeyValueList/KeyValueList.module.js +23 -0
  88. package/components/Link/Link.js +45 -59
  89. package/components/Link/Link.module.js +10 -0
  90. package/components/List/List.js +22 -46
  91. package/components/List/List.module.js +12 -0
  92. package/components/Loader/Loader.js +152 -182
  93. package/components/Loader/Loader.module.js +40 -0
  94. package/components/Modal/Modal.js +93 -105
  95. package/components/Modal/Modal.module.js +18 -0
  96. package/components/PageHeader/PageHeader.js +78 -72
  97. package/components/PageHeader/PageHeader.module.js +23 -0
  98. package/components/Pagination/Pagination.js +63 -84
  99. package/components/Pagination/Pagination.module.js +13 -0
  100. package/components/Pagination/paginationRange.js +15 -22
  101. package/components/Popover/Popover.js +110 -134
  102. package/components/Popover/Popover.module.js +12 -0
  103. package/components/ProgressBar/ProgressBar.d.ts +15 -1
  104. package/components/ProgressBar/ProgressBar.js +57 -90
  105. package/components/ProgressBar/ProgressBar.module.js +29 -0
  106. package/components/RelativeTime/RelativeTime.js +36 -43
  107. package/components/RelativeTime/RelativeTime.module.js +3 -0
  108. package/components/SegmentedControl/SegmentedControl.js +94 -130
  109. package/components/SegmentedControl/SegmentedControl.module.js +21 -0
  110. package/components/Skeleton/Skeleton.js +36 -50
  111. package/components/Skeleton/Skeleton.module.js +15 -0
  112. package/components/Spinner/Spinner.js +25 -25
  113. package/components/Spinner/Spinner.module.js +12 -0
  114. package/components/SplitButton/SplitButton.js +149 -196
  115. package/components/SplitButton/SplitButton.module.js +31 -0
  116. package/components/SplitPane/SplitPane.js +134 -170
  117. package/components/SplitPane/SplitPane.module.js +14 -0
  118. package/components/StatCard/StatCard.js +132 -125
  119. package/components/StatCard/StatCard.module.js +42 -0
  120. package/components/StatusDot/StatusDot.js +28 -39
  121. package/components/StatusDot/StatusDot.module.js +18 -0
  122. package/components/Table/Table.d.ts +41 -16
  123. package/components/Table/Table.js +383 -442
  124. package/components/Table/Table.module.js +42 -0
  125. package/components/Table/index.d.ts +1 -1
  126. package/components/Table/useTableSort.d.ts +1 -1
  127. package/components/Table/useTableSort.js +51 -42
  128. package/components/Tabs/Tabs.js +109 -161
  129. package/components/Tabs/Tabs.module.js +28 -0
  130. package/components/ThemeToggle/ThemeToggle.d.ts +2 -0
  131. package/components/ThemeToggle/ThemeToggle.js +122 -97
  132. package/components/ThemeToggle/ThemeToggle.module.js +13 -0
  133. package/components/Timeline/GanttTimeline.js +357 -318
  134. package/components/Timeline/GanttTimeline.module.js +29 -0
  135. package/components/Timeline/HistoryTimeline.js +486 -450
  136. package/components/Timeline/HistoryTimeline.module.js +31 -0
  137. package/components/Timeline/Timeline.module.js +76 -0
  138. package/components/Timeline/TimelineShared.d.ts +7 -7
  139. package/components/Timeline/TimelineShared.js +288 -279
  140. package/components/Timeline/TraceEventDetails.d.ts +3 -3
  141. package/components/Timeline/TraceEventDetails.js +245 -178
  142. package/components/Timeline/TraceTimeline.js +823 -783
  143. package/components/Timeline/TraceTimeline.module.js +98 -0
  144. package/components/Timeline/historyLayout.js +336 -263
  145. package/components/Timeline/timelineCore.js +208 -183
  146. package/components/Timeline/traceEvent.js +59 -61
  147. package/components/Timeline/traceLayout.js +101 -90
  148. package/components/Timeline/useTimeline.js +76 -79
  149. package/components/Timer/Timer.js +190 -156
  150. package/components/Timer/Timer.module.js +29 -0
  151. package/components/Toast/Toast.d.ts +1 -1
  152. package/components/Toast/Toast.js +128 -128
  153. package/components/Toast/Toast.module.js +37 -0
  154. package/components/Toast/toastStore.js +58 -62
  155. package/components/ToggleIconButton/ToggleIconButton.js +35 -57
  156. package/components/ToggleIconButton/ToggleIconButton.module.js +15 -0
  157. package/components/Tooltip/Tooltip.d.ts +1 -1
  158. package/components/Tooltip/Tooltip.js +76 -85
  159. package/components/Tooltip/Tooltip.module.js +17 -0
  160. package/components/Typography/Typography.js +11 -36
  161. package/components/Typography/Typography.module.js +30 -0
  162. package/components/inputs/Checkbox/Checkbox.js +27 -51
  163. package/components/inputs/Checkbox/Checkbox.module.js +10 -0
  164. package/components/inputs/Checkbox/CheckboxGroup.js +53 -111
  165. package/components/inputs/Checkbox/CheckboxGroup.module.js +17 -0
  166. package/components/inputs/DatePicker/CalendarPanel.d.ts +1 -1
  167. package/components/inputs/DatePicker/CalendarPanel.js +263 -286
  168. package/components/inputs/DatePicker/CalendarPanel.module.js +23 -0
  169. package/components/inputs/DatePicker/DatePicker.js +115 -142
  170. package/components/inputs/DatePicker/DatePicker.module.js +14 -0
  171. package/components/inputs/DatePicker/dateUtils.js +32 -41
  172. package/components/inputs/DateTimePicker/DateTimePicker.js +226 -232
  173. package/components/inputs/DateTimePicker/DateTimePicker.module.js +20 -0
  174. package/components/inputs/DateTimePicker/DateTimeSegments.js +273 -252
  175. package/components/inputs/DateTimePicker/TimeField.d.ts +1 -1
  176. package/components/inputs/DateTimePicker/TimeField.js +131 -132
  177. package/components/inputs/DateTimePicker/timeZoneUtils.js +95 -92
  178. package/components/inputs/Input/Input.js +98 -109
  179. package/components/inputs/Input/Input.module.js +15 -0
  180. package/components/inputs/NumberInput/NumberInput.js +112 -132
  181. package/components/inputs/NumberInput/NumberInput.module.js +14 -0
  182. package/components/inputs/Radio/Radio.js +50 -73
  183. package/components/inputs/Radio/Radio.module.js +9 -0
  184. package/components/inputs/SearchInput/SearchInput.js +98 -115
  185. package/components/inputs/SearchInput/SearchInput.module.js +8 -0
  186. package/components/inputs/Select/Select.js +555 -682
  187. package/components/inputs/Select/Select.module.js +38 -0
  188. package/components/inputs/Slider/Slider.js +97 -128
  189. package/components/inputs/Slider/Slider.module.js +9 -0
  190. package/components/inputs/Switch/Switch.js +11 -8
  191. package/components/inputs/Textarea/Textarea.js +42 -58
  192. package/components/inputs/Textarea/Textarea.module.js +14 -0
  193. package/hooks/useClickOutside.js +17 -14
  194. package/hooks/useDebouncedValue.js +13 -14
  195. package/hooks/useElementSize.js +27 -22
  196. package/hooks/useEscapeLayer.js +28 -29
  197. package/hooks/useFocusTrap.js +27 -38
  198. package/hooks/useKeyboard.js +76 -64
  199. package/hooks/useMediaQuery.js +10 -15
  200. package/hooks/useNow.js +28 -33
  201. package/hooks/usePersistedState.js +98 -91
  202. package/hooks/usePortalPosition.js +25 -19
  203. package/hooks/useResizable.js +106 -104
  204. package/hooks/useTheme.d.ts +2 -2
  205. package/hooks/useTheme.js +28 -25
  206. package/index.css +2 -1
  207. package/index.d.ts +1 -1
  208. package/index.js +97 -215
  209. package/index.layered.css +2 -3
  210. package/llms.txt +9 -6
  211. package/manifest.json +66 -10
  212. package/package.json +1 -1
  213. package/utils/formatBytes.js +29 -13
  214. package/utils/themeScript.d.ts +2 -0
  215. package/utils/themeScript.js +6 -8
  216. package/utils/timeAgo.js +59 -32
  217. package/components/Accordion/Accordion.module.scss.js +0 -36
  218. package/components/ActionButton/ActionButton.module.scss.js +0 -47
  219. package/components/Alert/Alert.module.scss.js +0 -33
  220. package/components/Avatar/Avatar.module.scss.js +0 -43
  221. package/components/Badge/Badge.module.scss.js +0 -31
  222. package/components/Breadcrumbs/Breadcrumbs.module.scss.js +0 -17
  223. package/components/Button/Button.module.scss.js +0 -47
  224. package/components/Card/Card.module.scss.js +0 -60
  225. package/components/Chart/Chart.module.scss.js +0 -61
  226. package/components/Chip/Chip.module.scss.js +0 -59
  227. package/components/CodeBlock/CodeBlock.module.scss.js +0 -43
  228. package/components/CommandPalette/CommandPalette.module.scss.js +0 -49
  229. package/components/ConfirmDialog/ConfirmDialog.module.scss.js +0 -21
  230. package/components/Divider/Divider.module.scss.js +0 -31
  231. package/components/Draggable/Draggable.module.scss.js +0 -17
  232. package/components/Drawer/Drawer.module.scss.js +0 -119
  233. package/components/Dropdown/Dropdown.module.scss.js +0 -53
  234. package/components/Dropzone/Dropzone.module.scss.js +0 -21
  235. package/components/EmptyState/EmptyState.module.scss.js +0 -25
  236. package/components/Form/Form.module.scss.js +0 -29
  237. package/components/ImageViewer/ImageViewer.module.scss.js +0 -47
  238. package/components/Kbd/Kbd.module.scss.js +0 -17
  239. package/components/KeyValueList/KeyValueList.module.scss.js +0 -43
  240. package/components/Link/Link.module.scss.js +0 -16
  241. package/components/List/List.module.scss.js +0 -21
  242. package/components/Loader/Loader.module.scss.js +0 -70
  243. package/components/Modal/Modal.module.scss.js +0 -33
  244. package/components/PageHeader/PageHeader.module.scss.js +0 -43
  245. package/components/Pagination/Pagination.module.scss.js +0 -23
  246. package/components/Popover/Popover.module.scss.js +0 -21
  247. package/components/ProgressBar/ProgressBar.module.scss.js +0 -51
  248. package/components/RelativeTime/RelativeTime.module.scss.js +0 -7
  249. package/components/SegmentedControl/SegmentedControl.module.scss.js +0 -39
  250. package/components/Skeleton/Skeleton.module.scss.js +0 -25
  251. package/components/Spinner/Spinner.module.scss.js +0 -20
  252. package/components/SplitButton/SplitButton.module.scss.js +0 -57
  253. package/components/SplitPane/SplitPane.module.scss.js +0 -25
  254. package/components/StatCard/StatCard.module.scss.js +0 -72
  255. package/components/StatusDot/StatusDot.module.scss.js +0 -32
  256. package/components/Table/Table.module.scss.js +0 -81
  257. package/components/Tabs/Tabs.module.scss.js +0 -53
  258. package/components/ThemeToggle/ThemeToggle.module.scss.js +0 -23
  259. package/components/Timeline/GanttTimeline.module.scss.js +0 -55
  260. package/components/Timeline/HistoryTimeline.module.scss.js +0 -59
  261. package/components/Timeline/Timeline.module.scss.js +0 -141
  262. package/components/Timeline/TraceTimeline.module.scss.js +0 -189
  263. package/components/Timer/Timer.module.scss.js +0 -55
  264. package/components/Toast/Toast.module.scss.js +0 -62
  265. package/components/ToggleIconButton/ToggleIconButton.module.scss.js +0 -27
  266. package/components/Tooltip/Tooltip.module.scss.js +0 -30
  267. package/components/Typography/Typography.module.scss.js +0 -53
  268. package/components/inputs/Checkbox/Checkbox.module.scss.js +0 -17
  269. package/components/inputs/Checkbox/CheckboxGroup.module.scss.js +0 -31
  270. package/components/inputs/DatePicker/CalendarPanel.module.scss.js +0 -41
  271. package/components/inputs/DatePicker/DatePicker.module.scss.js +0 -25
  272. package/components/inputs/DateTimePicker/DateTimePicker.module.scss.js +0 -37
  273. package/components/inputs/Input/Input.module.scss.js +0 -27
  274. package/components/inputs/NumberInput/NumberInput.module.scss.js +0 -25
  275. package/components/inputs/Radio/Radio.module.scss.js +0 -15
  276. package/components/inputs/SearchInput/SearchInput.module.scss.js +0 -13
  277. package/components/inputs/Select/Select.module.scss.js +0 -73
  278. package/components/inputs/Slider/Slider.module.scss.js +0 -15
  279. package/components/inputs/Textarea/Textarea.module.scss.js +0 -25
@@ -1,96 +1,93 @@
1
- import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
- import { forwardRef as x } from "react";
1
+ import e from "./Alert.module.js";
2
+ import { forwardRef as t } from "react";
3
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
- };
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 = t(({ variant: t = "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[t] : s === !1 ? null : s, y = u == null ? null : /* @__PURE__ */ r("div", {
49
+ className: n(e.action, p?.action),
50
+ children: u
51
+ });
52
+ return /* @__PURE__ */ i("div", {
53
+ ref: _,
54
+ role: "alert",
55
+ className: n(e.root, e[t], d === "banner" && e.banner, f === "sm" && e.sm, p?.root, m),
56
+ ...g,
57
+ children: [
58
+ v != null && /* @__PURE__ */ r("span", {
59
+ className: n(e.icon, p?.icon),
60
+ "aria-hidden": "true",
61
+ children: v
62
+ }),
63
+ /* @__PURE__ */ i("div", {
64
+ className: n(e.content, p?.content),
65
+ children: [/* @__PURE__ */ i("div", {
66
+ className: e.text,
67
+ children: [o != null && /* @__PURE__ */ r("div", {
68
+ className: n(e.title, p?.title),
69
+ children: o
70
+ }), h != null && /* @__PURE__ */ r("div", {
71
+ className: n(e.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: n(e.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 };
@@ -0,0 +1,18 @@
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
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 e from "./Avatar.module.js";
2
+ import { forwardRef as t, useEffect as n, useState as r } from "react";
3
+ import i from "clsx";
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 = t(({ src: t, alt: c, name: u, fallback: d, size: f = "md", shape: p = "circle", status: m, classes: h, className: g, ..._ }, v) => {
11
+ let [y, b] = r(!1);
12
+ n(() => b(!1), [t]);
13
+ let x = t && !y, S = u ? s(u) : "";
14
+ return /* @__PURE__ */ o("span", {
15
+ ref: v,
16
+ className: i(e.root, e[f], e[p], h?.root, g),
17
+ ..._,
18
+ children: [x ? /* @__PURE__ */ a("img", {
19
+ className: i(e.image, h?.image),
20
+ src: t,
21
+ alt: c ?? u ?? "",
22
+ onError: () => b(!0)
23
+ }) : /* @__PURE__ */ a("span", {
24
+ className: i(e.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: i(e.status, e[`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 };
@@ -0,0 +1,23 @@
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
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";
3
- 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
- };
1
+ import e from "./Badge.module.js";
2
+ import { forwardRef as t } from "react";
3
+ import n from "clsx";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ // src/components/Badge/Badge.tsx
6
+ var a = t(({ variant: t = "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: n(e.root, e[t], e[a], e[o], c?.root, l),
9
+ ...d,
10
+ children: [s && /* @__PURE__ */ r("span", {
11
+ className: n(e.dot, c?.dot),
12
+ "aria-hidden": "true"
13
+ }), u]
14
+ }));
15
+ a.displayName = "Badge";
16
+ export { a as Badge };
@@ -0,0 +1,17 @@
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
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 e from "./Breadcrumbs.module.js";
2
+ import { Children as t, forwardRef as n, isValidElement as r } from "react";
3
+ import i from "clsx";
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 = n(({ children: n, separator: s = "/", label: c = "Breadcrumb", classes: l, className: u, ...d }, f) => {
21
+ let p = t.toArray(n).filter(r);
22
+ return /* @__PURE__ */ a("nav", {
23
+ ref: f,
24
+ "aria-label": c,
25
+ className: i(e.root, l?.root, u),
26
+ ...d,
27
+ children: /* @__PURE__ */ a("ol", {
28
+ className: i(e.list, l?.list),
29
+ children: p.map((t, n) => {
30
+ let r = n === p.length - 1, { href: c, current: u, children: d, className: f } = t.props ?? {}, m = u ?? r;
31
+ return /* @__PURE__ */ o("li", {
32
+ className: i(e.item, l?.item, f),
33
+ children: [m || !c ? /* @__PURE__ */ a("span", {
34
+ className: i(e.current, l?.current),
35
+ "aria-current": m ? "page" : void 0,
36
+ children: d
37
+ }) : /* @__PURE__ */ a("a", {
38
+ className: i(e.link, l?.link),
39
+ href: c,
40
+ children: d
41
+ }), !r && /* @__PURE__ */ a("span", {
42
+ className: i(e.separator, l?.separator),
43
+ "aria-hidden": "true",
44
+ children: s
45
+ })]
46
+ }, t.key ?? n);
47
+ })
48
+ })
49
+ });
50
+ });
51
+ c.displayName = "Breadcrumbs";
52
+ var l = Object.assign(c, { Item: s });
53
+ export { s as BreadcrumbItem, l as Breadcrumbs };
@@ -0,0 +1,10 @@
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
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 e from "./Button.module.js";
2
+ import { forwardRef as t } from "react";
3
+ import n from "clsx";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ // src/components/Button/Button.tsx
6
+ var a = {
7
+ dots: e.loadingDots,
8
+ shimmer: e.loadingShimmer,
9
+ border: e.loadingBorder
10
+ }, o = t(({ variant: t = "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: n(e.root, e[t], e[o], l && e.fullWidth, u && e.iconOnly, s && e.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: n(e.shimmer, f?.shimmer) }),
19
+ /* @__PURE__ */ r("span", {
20
+ className: n(e.content, f?.content),
21
+ children: h
22
+ }),
23
+ /* @__PURE__ */ i("span", {
24
+ className: n(e.dots, f?.dots),
25
+ "aria-hidden": "true",
26
+ children: [
27
+ /* @__PURE__ */ r("span", { className: n(e.dot, f?.dot) }),
28
+ /* @__PURE__ */ r("span", { className: n(e.dot, f?.dot) }),
29
+ /* @__PURE__ */ r("span", { className: n(e.dot, f?.dot) })
30
+ ]
31
+ })
32
+ ]
33
+ }));
34
+ o.displayName = "Button";
35
+ export { o as Button };