@overdoser/react-toolkit 0.21.0 → 0.22.1

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 (161) hide show
  1. package/AGENTS.md +1 -0
  2. package/CHANGELOG.md +35 -0
  3. package/components/Accordion/Accordion.js +48 -48
  4. package/components/ActionButton/ActionButton.js +23 -23
  5. package/components/ActionButton/CopyButton.js +5 -5
  6. package/components/Alert/Alert.js +13 -13
  7. package/components/Avatar/Avatar.js +12 -12
  8. package/components/Badge/Badge.js +6 -6
  9. package/components/Breadcrumbs/Breadcrumbs.js +15 -15
  10. package/components/Button/Button.js +14 -14
  11. package/components/Card/Card.js +26 -26
  12. package/components/Chart/AreaChart.js +103 -103
  13. package/components/Chart/Axis.js +7 -7
  14. package/components/Chart/BarChart.js +62 -62
  15. package/components/Chart/ChartContainer.js +11 -11
  16. package/components/Chart/ChartLegend.js +7 -7
  17. package/components/Chart/ChartTooltip.js +13 -13
  18. package/components/Chart/LineChart.js +88 -88
  19. package/components/Chart/PieChart.js +25 -25
  20. package/components/Chart/RadarChart.js +42 -42
  21. package/components/Chart/Sparkline.js +11 -11
  22. package/components/Chart/TradingChart.js +126 -126
  23. package/components/Chart/trading/period.js +3 -3
  24. package/components/Chip/Chip.js +24 -24
  25. package/components/CodeBlock/CodeBlock.js +31 -31
  26. package/components/CommandPalette/CommandPalette.js +166 -166
  27. package/components/ConfirmDialog/ConfirmDialog.js +60 -60
  28. package/components/Divider/Divider.js +10 -10
  29. package/components/Draggable/Draggable.js +29 -29
  30. package/components/Drawer/Drawer.js +53 -53
  31. package/components/Dropdown/Dropdown.js +66 -66
  32. package/components/Dropdown/DropdownItem.js +13 -13
  33. package/components/Dropdown/DropdownLabel.js +5 -5
  34. package/components/Dropdown/DropdownSeparator.js +5 -5
  35. package/components/Dropzone/Dropzone.js +15 -15
  36. package/components/EmptyState/EmptyState.js +11 -11
  37. package/components/Form/Form.js +17 -17
  38. package/components/Form/FormField.js +21 -21
  39. package/components/Form/FormRow.js +3 -3
  40. package/components/ImageViewer/ImageViewer.js +118 -118
  41. package/components/Kbd/Kbd.js +11 -11
  42. package/components/KeyValueList/KeyValueList.js +32 -32
  43. package/components/Link/Link.js +7 -7
  44. package/components/List/List.js +7 -7
  45. package/components/Loader/Loader.js +39 -39
  46. package/components/Modal/Modal.js +48 -48
  47. package/components/PageHeader/PageHeader.js +18 -18
  48. package/components/Pagination/Pagination.js +23 -23
  49. package/components/Popover/Popover.js +25 -25
  50. package/components/ProgressBar/ProgressBar.js +17 -17
  51. package/components/RelativeTime/RelativeTime.js +10 -10
  52. package/components/SegmentedControl/SegmentedControl.js +38 -38
  53. package/components/Skeleton/Skeleton.js +10 -10
  54. package/components/Spinner/Spinner.js +7 -7
  55. package/components/SplitButton/SplitButton.js +63 -63
  56. package/components/SplitPane/SplitPane.js +50 -50
  57. package/components/StatCard/StatCard.js +32 -32
  58. package/components/StatusDot/StatusDot.js +7 -7
  59. package/components/Table/Table.js +174 -174
  60. package/components/Tabs/Tabs.js +47 -47
  61. package/components/ThemeToggle/ThemeToggle.js +31 -31
  62. package/components/Timeline/GanttTimeline.js +213 -213
  63. package/components/Timeline/HistoryTimeline.js +306 -306
  64. package/components/Timeline/TimelineShared.js +103 -103
  65. package/components/Timeline/TraceEventDetails.js +103 -103
  66. package/components/Timeline/TraceTimeline.js +546 -546
  67. package/components/Timeline/historyLayout.js +2 -2
  68. package/components/Timer/Timer.js +39 -39
  69. package/components/Toast/Toast.js +59 -59
  70. package/components/ToggleIconButton/ToggleIconButton.js +9 -9
  71. package/components/Tooltip/Tooltip.js +16 -16
  72. package/components/Typography/Typography.js +5 -5
  73. package/components/inputs/Checkbox/Checkbox.js +11 -11
  74. package/components/inputs/Checkbox/CheckboxGroup.js +21 -21
  75. package/components/inputs/DatePicker/CalendarPanel.js +113 -113
  76. package/components/inputs/DatePicker/DatePicker.js +39 -39
  77. package/components/inputs/DateTimePicker/DateTimePicker.js +119 -119
  78. package/components/inputs/DateTimePicker/DateTimeSegments.js +40 -40
  79. package/components/inputs/DateTimePicker/TimeField.js +34 -34
  80. package/components/inputs/Input/Input.js +13 -13
  81. package/components/inputs/NumberInput/NumberInput.js +16 -16
  82. package/components/inputs/Radio/Radio.js +17 -17
  83. package/components/inputs/SearchInput/SearchInput.js +25 -25
  84. package/components/inputs/Select/Select.d.ts +55 -3
  85. package/components/inputs/Select/Select.js +485 -344
  86. package/components/inputs/Select/{Select.module.js → Select.module.scss.js} +15 -3
  87. package/components/inputs/Slider/Slider.js +21 -21
  88. package/components/inputs/Switch/Switch.js +4 -4
  89. package/components/inputs/Textarea/Textarea.js +8 -8
  90. package/hooks/usePortalPosition.d.ts +2 -1
  91. package/hooks/usePortalPosition.js +6 -3
  92. package/hooks/useResizable.js +1 -1
  93. package/hooks/useTheme.js +7 -7
  94. package/index.css +1 -1
  95. package/index.js +1 -1
  96. package/index.layered.css +1 -1
  97. package/llms.txt +25 -4
  98. package/manifest.json +33 -4
  99. package/package.json +1 -1
  100. /package/components/Accordion/{Accordion.module.js → Accordion.module.scss.js} +0 -0
  101. /package/components/ActionButton/{ActionButton.module.js → ActionButton.module.scss.js} +0 -0
  102. /package/components/Alert/{Alert.module.js → Alert.module.scss.js} +0 -0
  103. /package/components/Avatar/{Avatar.module.js → Avatar.module.scss.js} +0 -0
  104. /package/components/Badge/{Badge.module.js → Badge.module.scss.js} +0 -0
  105. /package/components/Breadcrumbs/{Breadcrumbs.module.js → Breadcrumbs.module.scss.js} +0 -0
  106. /package/components/Button/{Button.module.js → Button.module.scss.js} +0 -0
  107. /package/components/Card/{Card.module.js → Card.module.scss.js} +0 -0
  108. /package/components/Chart/{Chart.module.js → Chart.module.scss.js} +0 -0
  109. /package/components/Chip/{Chip.module.js → Chip.module.scss.js} +0 -0
  110. /package/components/CodeBlock/{CodeBlock.module.js → CodeBlock.module.scss.js} +0 -0
  111. /package/components/CommandPalette/{CommandPalette.module.js → CommandPalette.module.scss.js} +0 -0
  112. /package/components/ConfirmDialog/{ConfirmDialog.module.js → ConfirmDialog.module.scss.js} +0 -0
  113. /package/components/Divider/{Divider.module.js → Divider.module.scss.js} +0 -0
  114. /package/components/Draggable/{Draggable.module.js → Draggable.module.scss.js} +0 -0
  115. /package/components/Drawer/{Drawer.module.js → Drawer.module.scss.js} +0 -0
  116. /package/components/Dropdown/{Dropdown.module.js → Dropdown.module.scss.js} +0 -0
  117. /package/components/Dropzone/{Dropzone.module.js → Dropzone.module.scss.js} +0 -0
  118. /package/components/EmptyState/{EmptyState.module.js → EmptyState.module.scss.js} +0 -0
  119. /package/components/Form/{Form.module.js → Form.module.scss.js} +0 -0
  120. /package/components/ImageViewer/{ImageViewer.module.js → ImageViewer.module.scss.js} +0 -0
  121. /package/components/Kbd/{Kbd.module.js → Kbd.module.scss.js} +0 -0
  122. /package/components/KeyValueList/{KeyValueList.module.js → KeyValueList.module.scss.js} +0 -0
  123. /package/components/Link/{Link.module.js → Link.module.scss.js} +0 -0
  124. /package/components/List/{List.module.js → List.module.scss.js} +0 -0
  125. /package/components/Loader/{Loader.module.js → Loader.module.scss.js} +0 -0
  126. /package/components/Modal/{Modal.module.js → Modal.module.scss.js} +0 -0
  127. /package/components/PageHeader/{PageHeader.module.js → PageHeader.module.scss.js} +0 -0
  128. /package/components/Pagination/{Pagination.module.js → Pagination.module.scss.js} +0 -0
  129. /package/components/Popover/{Popover.module.js → Popover.module.scss.js} +0 -0
  130. /package/components/ProgressBar/{ProgressBar.module.js → ProgressBar.module.scss.js} +0 -0
  131. /package/components/RelativeTime/{RelativeTime.module.js → RelativeTime.module.scss.js} +0 -0
  132. /package/components/SegmentedControl/{SegmentedControl.module.js → SegmentedControl.module.scss.js} +0 -0
  133. /package/components/Skeleton/{Skeleton.module.js → Skeleton.module.scss.js} +0 -0
  134. /package/components/Spinner/{Spinner.module.js → Spinner.module.scss.js} +0 -0
  135. /package/components/SplitButton/{SplitButton.module.js → SplitButton.module.scss.js} +0 -0
  136. /package/components/SplitPane/{SplitPane.module.js → SplitPane.module.scss.js} +0 -0
  137. /package/components/StatCard/{StatCard.module.js → StatCard.module.scss.js} +0 -0
  138. /package/components/StatusDot/{StatusDot.module.js → StatusDot.module.scss.js} +0 -0
  139. /package/components/Table/{Table.module.js → Table.module.scss.js} +0 -0
  140. /package/components/Tabs/{Tabs.module.js → Tabs.module.scss.js} +0 -0
  141. /package/components/ThemeToggle/{ThemeToggle.module.js → ThemeToggle.module.scss.js} +0 -0
  142. /package/components/Timeline/{GanttTimeline.module.js → GanttTimeline.module.scss.js} +0 -0
  143. /package/components/Timeline/{HistoryTimeline.module.js → HistoryTimeline.module.scss.js} +0 -0
  144. /package/components/Timeline/{Timeline.module.js → Timeline.module.scss.js} +0 -0
  145. /package/components/Timeline/{TraceTimeline.module.js → TraceTimeline.module.scss.js} +0 -0
  146. /package/components/Timer/{Timer.module.js → Timer.module.scss.js} +0 -0
  147. /package/components/Toast/{Toast.module.js → Toast.module.scss.js} +0 -0
  148. /package/components/ToggleIconButton/{ToggleIconButton.module.js → ToggleIconButton.module.scss.js} +0 -0
  149. /package/components/Tooltip/{Tooltip.module.js → Tooltip.module.scss.js} +0 -0
  150. /package/components/Typography/{Typography.module.js → Typography.module.scss.js} +0 -0
  151. /package/components/inputs/Checkbox/{Checkbox.module.js → Checkbox.module.scss.js} +0 -0
  152. /package/components/inputs/Checkbox/{CheckboxGroup.module.js → CheckboxGroup.module.scss.js} +0 -0
  153. /package/components/inputs/DatePicker/{CalendarPanel.module.js → CalendarPanel.module.scss.js} +0 -0
  154. /package/components/inputs/DatePicker/{DatePicker.module.js → DatePicker.module.scss.js} +0 -0
  155. /package/components/inputs/DateTimePicker/{DateTimePicker.module.js → DateTimePicker.module.scss.js} +0 -0
  156. /package/components/inputs/Input/{Input.module.js → Input.module.scss.js} +0 -0
  157. /package/components/inputs/NumberInput/{NumberInput.module.js → NumberInput.module.scss.js} +0 -0
  158. /package/components/inputs/Radio/{Radio.module.js → Radio.module.scss.js} +0 -0
  159. /package/components/inputs/SearchInput/{SearchInput.module.js → SearchInput.module.scss.js} +0 -0
  160. /package/components/inputs/Slider/{Slider.module.js → Slider.module.scss.js} +0 -0
  161. /package/components/inputs/Textarea/{Textarea.module.js → Textarea.module.scss.js} +0 -0
@@ -1,34 +1,34 @@
1
- import e from "./Dropdown.module.js";
2
- import { EscapeLayerProvider as t, useEscapeLayer as n } from "../../hooks/useEscapeLayer.js";
3
- import { usePortalPosition as r } from "../../hooks/usePortalPosition.js";
4
- import { DropdownMenuContext as i } from "./dropdownContext.js";
5
- import { forwardRef as a, useCallback as o, useEffect as s, useId as ee, useLayoutEffect as te, useRef as c, useState as l } from "react";
6
- import u from "clsx";
1
+ import { forwardRef as e, useCallback as t, useEffect as n, useId as r, useLayoutEffect as i, useRef as a, useState as o } from "react";
2
+ import { createPortal as s } from "react-dom";
3
+ import c from "clsx";
4
+ import l from "./Dropdown.module.scss.js";
5
+ import { EscapeLayerProvider as u, useEscapeLayer as ee } from "../../hooks/useEscapeLayer.js";
6
+ import { usePortalPosition as te } from "../../hooks/usePortalPosition.js";
7
+ import { DropdownMenuContext as ne } from "./dropdownContext.js";
7
8
  import { jsx as d, jsxs as f } from "react/jsx-runtime";
8
- import { createPortal as p } from "react-dom";
9
9
  // src/components/Dropdown/Dropdown.tsx
10
- var m = "[role=\"menuitem\"]:not(:disabled), [role=\"menuitemcheckbox\"]:not(:disabled)", h = 8, g = a(({ trigger: a, children: g, align: _ = "left", className: v, style: y, id: b, onOpen: x, onClose: S, options: C, placeholder: ne = "Select...", value: w, onChange: T, error: E = !1, fullWidth: D = !0, portal: O = !0, open: k, onOpenChange: A, anchor: j, classes: M }, N) => {
11
- let [re, ie] = l(!1), P = k !== void 0, F = P ? k : re, I = c(F);
10
+ var p = "[role=\"menuitem\"]:not(:disabled), [role=\"menuitemcheckbox\"]:not(:disabled)", m = 8, h = e(({ trigger: e, children: h, align: g = "left", className: _, style: v, id: y, onOpen: b, onClose: x, options: S, placeholder: re = "Select...", value: C, onChange: w, error: T = !1, fullWidth: E = !0, portal: D = !0, open: O, onOpenChange: k, anchor: A, classes: j }, M) => {
11
+ let [N, ie] = o(!1), P = O !== void 0, F = P ? O : N, I = a(F);
12
12
  I.current = F;
13
- let L = c(null), R = c(null), z = c(null), B = ee(), V = j !== void 0, H = V && j !== null, U = !!C || a !== void 0 || !V, W = o((e) => {
14
- e !== I.current && (P || ie(e), A?.(e), e ? x?.() : S?.());
13
+ let L = a(null), R = a(null), z = a(null), B = r(), V = A !== void 0, H = V && A !== null, U = !!S || e !== void 0 || !V, W = t((e) => {
14
+ e !== I.current && (P || ie(e), k?.(e), e ? b?.() : x?.());
15
15
  }, [
16
16
  P,
17
- A,
18
- x,
19
- S
17
+ k,
18
+ b,
19
+ x
20
20
  ]);
21
- s(() => {
22
- F && R.current && R.current.querySelector(m)?.focus();
21
+ n(() => {
22
+ F && R.current && R.current.querySelector(p)?.focus();
23
23
  }, [F]);
24
- let G = o(() => {
24
+ let G = t(() => {
25
25
  W(!1), z.current?.focus();
26
- }, [W]), K = o(() => {
26
+ }, [W]), K = t(() => {
27
27
  W(!I.current);
28
- }, [W]), ae = o((e) => {
28
+ }, [W]), ae = t((e) => {
29
29
  let t = R.current;
30
30
  if (!t) return;
31
- let n = Array.from(t.querySelectorAll(m));
31
+ let n = Array.from(t.querySelectorAll(p));
32
32
  if (n.length === 0) return;
33
33
  let r = n.indexOf(document.activeElement), i = (e) => {
34
34
  n[(e + n.length) % n.length]?.focus();
@@ -57,26 +57,26 @@ var m = "[role=\"menuitem\"]:not(:disabled), [role=\"menuitemcheckbox\"]:not(:di
57
57
  }
58
58
  }
59
59
  }
60
- }, []), [q, J] = l(null);
61
- te(() => {
62
- if (!F || !j || !R.current || typeof window > "u") {
60
+ }, []), [q, J] = o(null);
61
+ i(() => {
62
+ if (!F || !A || !R.current || typeof window > "u") {
63
63
  J(null);
64
64
  return;
65
65
  }
66
- let e = R.current.getBoundingClientRect(), t = document.documentElement.clientWidth || window.innerWidth, n = document.documentElement.clientHeight || window.innerHeight, r = j.x, i = j.y;
67
- r + e.width > t - h && (r = j.x - e.width), i + e.height > n - h && (i = j.y - e.height), r = Math.max(h, Math.min(r, t - h - e.width)), i = Math.max(h, Math.min(i, n - h - e.height)), J({
66
+ let e = R.current.getBoundingClientRect(), t = document.documentElement.clientWidth || window.innerWidth, n = document.documentElement.clientHeight || window.innerHeight, r = A.x, i = A.y;
67
+ r + e.width > t - m && (r = A.x - e.width), i + e.height > n - m && (i = A.y - e.height), r = Math.max(m, Math.min(r, t - m - e.width)), i = Math.max(m, Math.min(i, n - m - e.height)), J({
68
68
  top: Math.round(i),
69
69
  left: Math.round(r)
70
70
  });
71
71
  }, [
72
72
  F,
73
- j?.x,
74
- j?.y
73
+ A?.x,
74
+ A?.y
75
75
  ]);
76
- let oe = o((e) => {
77
- T?.(e), G();
78
- }, [T, G]);
79
- s(() => {
76
+ let oe = t((e) => {
77
+ w?.(e), G();
78
+ }, [w, G]);
79
+ n(() => {
80
80
  if (!F) return;
81
81
  let e = (e) => {
82
82
  let t = e.target;
@@ -84,92 +84,92 @@ var m = "[role=\"menuitem\"]:not(:disabled), [role=\"menuitemcheckbox\"]:not(:di
84
84
  };
85
85
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
86
86
  }, [F, G]);
87
- let se = n(G, F), Y = r(z, F && O && !H), ce = { close: G }, X = C?.find((e) => e.value === w)?.label, Z = C ? X || ne : a, Q = C && !X, le = C ? C.map((t) => /* @__PURE__ */ d("button", {
87
+ let se = ee(G, F), Y = te(z, F && D && !H), ce = { close: G }, X = S?.find((e) => e.value === C)?.label, Z = S ? X || re : e, Q = S && !X, le = S ? S.map((e) => /* @__PURE__ */ d("button", {
88
88
  type: "button",
89
89
  role: "menuitem",
90
- className: u(e.item, t.disabled && e.itemDisabled, t.value === w && e.itemSelected, M?.item),
91
- disabled: t.disabled,
92
- onClick: () => oe(t.value),
93
- children: t.label
94
- }, t.value)) : g, $ = (n) => /* @__PURE__ */ d("div", {
90
+ className: c(l.item, e.disabled && l.itemDisabled, e.value === C && l.itemSelected, j?.item),
91
+ disabled: e.disabled,
92
+ onClick: () => oe(e.value),
93
+ children: e.label
94
+ }, e.value)) : h, $ = (e) => /* @__PURE__ */ d("div", {
95
95
  ref: R,
96
96
  id: B,
97
- className: u(e.menu, F && e.menuOpen, _ === "left" ? e.alignLeft : e.alignRight, !O && D && e.fullWidth, M?.menu),
98
- style: n,
97
+ className: c(l.menu, F && l.menuOpen, g === "left" ? l.alignLeft : l.alignRight, !D && E && l.fullWidth, j?.menu),
98
+ style: e,
99
99
  role: "menu",
100
100
  onKeyDown: ae,
101
- children: /* @__PURE__ */ d(t, {
101
+ children: /* @__PURE__ */ d(u, {
102
102
  value: se,
103
- children: /* @__PURE__ */ d(i.Provider, {
103
+ children: /* @__PURE__ */ d(ne.Provider, {
104
104
  value: ce,
105
105
  children: le
106
106
  })
107
107
  })
108
108
  });
109
109
  return V ? /* @__PURE__ */ f("div", {
110
- ref: N,
111
- className: u(e.root, U && D && e.fullWidth, M?.root, v),
112
- style: y,
110
+ ref: M,
111
+ className: c(l.root, U && E && l.fullWidth, j?.root, _),
112
+ style: v,
113
113
  children: [U && /* @__PURE__ */ d("div", {
114
114
  ref: L,
115
- style: D ? { width: "100%" } : void 0,
115
+ style: E ? { width: "100%" } : void 0,
116
116
  children: /* @__PURE__ */ f("button", {
117
117
  ref: z,
118
- id: b,
118
+ id: y,
119
119
  type: "button",
120
- className: u(e.trigger, F && e.triggerOpen, E && e.triggerError, D && e.fullWidth, M?.trigger),
120
+ className: c(l.trigger, F && l.triggerOpen, T && l.triggerError, E && l.fullWidth, j?.trigger),
121
121
  onClick: K,
122
122
  "aria-expanded": F,
123
123
  "aria-haspopup": "menu",
124
124
  "aria-controls": F ? B : void 0,
125
125
  children: [/* @__PURE__ */ d("span", {
126
- className: u(e.triggerLabel, Q && e.placeholder, M?.triggerLabel),
126
+ className: c(l.triggerLabel, Q && l.placeholder, j?.triggerLabel),
127
127
  children: Z
128
128
  }), /* @__PURE__ */ d("span", {
129
- className: u(e.chevron, M?.chevron),
129
+ className: c(l.chevron, j?.chevron),
130
130
  "aria-hidden": "true"
131
131
  })]
132
132
  })
133
- }), F && H && typeof document < "u" && p($({
133
+ }), F && H && typeof document < "u" && s($({
134
134
  position: "fixed",
135
- top: q?.top ?? j.y,
136
- left: q?.left ?? j.x,
135
+ top: q?.top ?? A.y,
136
+ left: q?.left ?? A.x,
137
137
  visibility: q ? void 0 : "hidden",
138
138
  zIndex: "var(--crk-z-floating)"
139
139
  }), document.body)]
140
140
  }) : /* @__PURE__ */ f("div", {
141
- ref: N,
142
- className: u(e.root, D && e.fullWidth, M?.root, v),
143
- style: y,
141
+ ref: M,
142
+ className: c(l.root, E && l.fullWidth, j?.root, _),
143
+ style: v,
144
144
  children: [/* @__PURE__ */ f("div", {
145
145
  ref: L,
146
- style: D ? { width: "100%" } : void 0,
146
+ style: E ? { width: "100%" } : void 0,
147
147
  children: [/* @__PURE__ */ f("button", {
148
148
  ref: z,
149
- id: b,
149
+ id: y,
150
150
  type: "button",
151
- className: u(e.trigger, F && e.triggerOpen, E && e.triggerError, D && e.fullWidth, M?.trigger),
151
+ className: c(l.trigger, F && l.triggerOpen, T && l.triggerError, E && l.fullWidth, j?.trigger),
152
152
  onClick: K,
153
153
  "aria-expanded": F,
154
154
  "aria-haspopup": "menu",
155
155
  "aria-controls": F ? B : void 0,
156
156
  children: [/* @__PURE__ */ d("span", {
157
- className: u(e.triggerLabel, Q && e.placeholder, M?.triggerLabel),
157
+ className: c(l.triggerLabel, Q && l.placeholder, j?.triggerLabel),
158
158
  children: Z
159
159
  }), /* @__PURE__ */ d("span", {
160
- className: u(e.chevron, M?.chevron),
160
+ className: c(l.chevron, j?.chevron),
161
161
  "aria-hidden": "true"
162
162
  })]
163
- }), !O && $()]
164
- }), O && F && typeof document < "u" && p($({
163
+ }), !D && $()]
164
+ }), D && F && typeof document < "u" && s($({
165
165
  position: "fixed",
166
166
  top: Y.top + 4,
167
- left: _ === "right" ? void 0 : Y.left,
168
- right: _ === "right" ? document.documentElement.clientWidth - (Y.left + Y.width) : void 0,
167
+ left: g === "right" ? void 0 : Y.left,
168
+ right: g === "right" ? document.documentElement.clientWidth - (Y.left + Y.width) : void 0,
169
169
  minWidth: Y.width,
170
170
  zIndex: "var(--crk-z-floating)"
171
171
  }), document.body)]
172
172
  });
173
173
  });
174
- g.displayName = "Dropdown";
175
- export { g as Dropdown };
174
+ h.displayName = "Dropdown";
175
+ export { h as Dropdown };
@@ -1,25 +1,25 @@
1
- import e from "./Dropdown.module.js";
2
- import { DropdownMenuContext as t } from "./dropdownContext.js";
3
- import { forwardRef as n, useContext as r } from "react";
4
- import i from "clsx";
1
+ import { forwardRef as e, useContext as t } from "react";
2
+ import n from "clsx";
3
+ import r from "./Dropdown.module.scss.js";
4
+ import { DropdownMenuContext as i } from "./dropdownContext.js";
5
5
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
6
  // src/components/Dropdown/DropdownItem.tsx
7
- var s = n(({ disabled: n = !1, danger: s = !1, icon: c, shortcut: l, checked: u, description: d, closeOnSelect: f, classes: p, className: m, children: h, onClick: g, ..._ }, v) => {
8
- let y = r(t), b = u !== void 0, x = f ?? !b;
7
+ var s = e(({ disabled: e = !1, danger: s = !1, icon: c, shortcut: l, checked: u, description: d, closeOnSelect: f, classes: p, className: m, children: h, onClick: g, ..._ }, v) => {
8
+ let y = t(i), b = u !== void 0, x = f ?? !b;
9
9
  return /* @__PURE__ */ o("button", {
10
10
  ref: v,
11
11
  type: "button",
12
12
  role: b ? "menuitemcheckbox" : "menuitem",
13
13
  "aria-checked": b ? u : void 0,
14
- className: i(e.item, n && e.itemDisabled, s && e.itemDanger, b && u && e.itemChecked, p?.item, m),
15
- disabled: n,
14
+ className: n(r.item, e && r.itemDisabled, s && r.itemDanger, b && u && r.itemChecked, p?.item, m),
15
+ disabled: e,
16
16
  onClick: (e) => {
17
17
  g?.(e), x && !e.defaultPrevented && y?.close();
18
18
  },
19
19
  ..._,
20
20
  children: [
21
21
  b && /* @__PURE__ */ a("span", {
22
- className: i(e.itemCheck, p?.itemCheck),
22
+ className: n(r.itemCheck, p?.itemCheck),
23
23
  "aria-hidden": "true",
24
24
  children: u && /* @__PURE__ */ a("svg", {
25
25
  viewBox: "0 0 16 16",
@@ -32,19 +32,19 @@ var s = n(({ disabled: n = !1, danger: s = !1, icon: c, shortcut: l, checked: u,
32
32
  })
33
33
  }),
34
34
  c != null && /* @__PURE__ */ a("span", {
35
- className: i(e.itemIcon, p?.itemIcon),
35
+ className: n(r.itemIcon, p?.itemIcon),
36
36
  "aria-hidden": "true",
37
37
  children: c
38
38
  }),
39
39
  /* @__PURE__ */ o("span", {
40
- className: i(e.itemLabel, p?.itemLabel),
40
+ className: n(r.itemLabel, p?.itemLabel),
41
41
  children: [h, d != null && /* @__PURE__ */ a("span", {
42
- className: i(e.itemDescription, p?.itemDescription),
42
+ className: n(r.itemDescription, p?.itemDescription),
43
43
  children: d
44
44
  })]
45
45
  }),
46
46
  l != null && /* @__PURE__ */ a("span", {
47
- className: i(e.itemShortcut, p?.itemShortcut),
47
+ className: n(r.itemShortcut, p?.itemShortcut),
48
48
  "aria-hidden": "true",
49
49
  children: l
50
50
  })
@@ -1,12 +1,12 @@
1
- import e from "./Dropdown.module.js";
2
- import { forwardRef as t } from "react";
3
- import n from "clsx";
1
+ import { forwardRef as e } from "react";
2
+ import t from "clsx";
3
+ import n from "./Dropdown.module.scss.js";
4
4
  import { jsx as r } from "react/jsx-runtime";
5
5
  // src/components/Dropdown/DropdownLabel.tsx
6
- var i = t(({ className: t, children: i, ...a }, o) => /* @__PURE__ */ r("div", {
6
+ var i = e(({ className: e, children: i, ...a }, o) => /* @__PURE__ */ r("div", {
7
7
  ref: o,
8
8
  role: "presentation",
9
- className: n(e.label, t),
9
+ className: t(n.label, e),
10
10
  ...a,
11
11
  children: i
12
12
  }));
@@ -1,12 +1,12 @@
1
- import e from "./Dropdown.module.js";
2
- import { forwardRef as t } from "react";
3
- import n from "clsx";
1
+ import { forwardRef as e } from "react";
2
+ import t from "clsx";
3
+ import n from "./Dropdown.module.scss.js";
4
4
  import { jsx as r } from "react/jsx-runtime";
5
5
  // src/components/Dropdown/DropdownSeparator.tsx
6
- var i = t(({ className: t, ...i }, a) => /* @__PURE__ */ r("div", {
6
+ var i = e(({ className: e, ...i }, a) => /* @__PURE__ */ r("div", {
7
7
  ref: a,
8
8
  role: "separator",
9
- className: n(e.separator, t),
9
+ className: t(n.separator, e),
10
10
  ...i
11
11
  }));
12
12
  i.displayName = "DropdownSeparator";
@@ -1,6 +1,6 @@
1
- import e from "./Dropzone.module.js";
2
- import { forwardRef as t, useId as n, useRef as r, useState as i } from "react";
3
- import a from "clsx";
1
+ import { forwardRef as e, useId as t, useRef as n, useState as r } from "react";
2
+ import i from "clsx";
3
+ import a from "./Dropzone.module.scss.js";
4
4
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
5
5
  // src/components/Dropzone/Dropzone.tsx
6
6
  function c(e, t) {
@@ -10,12 +10,12 @@ function c(e, t) {
10
10
  function l(e, t) {
11
11
  return !t || t.split(",").some((t) => c(e, t));
12
12
  }
13
- var u = t(({ onFiles: t, onReject: c, accept: u, multiple: d = !1, maxSize: f, disabled: p = !1, label: m = "Drag & drop files here, or click to browse", hint: h, children: g, classes: _, className: v, style: y, "aria-label": b = "Upload files" }, x) => {
14
- let S = r(null), [C, w] = i(!1), T = r(0), E = n(), D = (e) => {
13
+ var u = e(({ onFiles: e, onReject: c, accept: u, multiple: d = !1, maxSize: f, disabled: p = !1, label: m = "Drag & drop files here, or click to browse", hint: h, children: g, classes: _, className: v, style: y, "aria-label": b = "Upload files" }, x) => {
14
+ let S = n(null), [C, w] = r(!1), T = n(0), E = t(), D = (e) => {
15
15
  S.current = e, typeof x == "function" ? x(e) : x && (x.current = e);
16
- }, O = (e) => {
17
- if (!e || p) return;
18
- let n = Array.from(e), r = [];
16
+ }, O = (t) => {
17
+ if (!t || p) return;
18
+ let n = Array.from(t), r = [];
19
19
  !d && n.length > 1 && (n.slice(1).forEach((e) => r.push({
20
20
  file: e,
21
21
  reason: "multiple"
@@ -28,7 +28,7 @@ var u = t(({ onFiles: t, onReject: c, accept: u, multiple: d = !1, maxSize: f, d
28
28
  file: e,
29
29
  reason: "type"
30
30
  });
31
- i.length && t?.(i), r.length && c?.(r);
31
+ i.length && e?.(i), r.length && c?.(r);
32
32
  }, k = () => {
33
33
  p || S.current?.click();
34
34
  };
@@ -38,7 +38,7 @@ var u = t(({ onFiles: t, onReject: c, accept: u, multiple: d = !1, maxSize: f, d
38
38
  "aria-label": b,
39
39
  "aria-disabled": p || void 0,
40
40
  "aria-describedby": h ? `${E}-hint` : void 0,
41
- className: a(e.root, C && e.dragging, p && e.disabled, _?.root, v),
41
+ className: i(a.root, C && a.dragging, p && a.disabled, _?.root, v),
42
42
  style: y,
43
43
  onClick: k,
44
44
  onKeyDown: (e) => {
@@ -60,7 +60,7 @@ var u = t(({ onFiles: t, onReject: c, accept: u, multiple: d = !1, maxSize: f, d
60
60
  ref: D,
61
61
  id: E,
62
62
  type: "file",
63
- className: a(e.input, _?.input),
63
+ className: i(a.input, _?.input),
64
64
  accept: u,
65
65
  multiple: d,
66
66
  disabled: p,
@@ -69,10 +69,10 @@ var u = t(({ onFiles: t, onReject: c, accept: u, multiple: d = !1, maxSize: f, d
69
69
  O(e.target.files), e.target.value = "";
70
70
  }
71
71
  }), typeof g == "function" ? g({ isDragging: C }) : g ?? /* @__PURE__ */ s("div", {
72
- className: a(e.content, _?.content),
72
+ className: i(a.content, _?.content),
73
73
  children: [
74
74
  /* @__PURE__ */ o("span", {
75
- className: a(e.icon, _?.icon),
75
+ className: i(a.icon, _?.icon),
76
76
  "aria-hidden": "true",
77
77
  children: /* @__PURE__ */ s("svg", {
78
78
  viewBox: "0 0 24 24",
@@ -85,12 +85,12 @@ var u = t(({ onFiles: t, onReject: c, accept: u, multiple: d = !1, maxSize: f, d
85
85
  })
86
86
  }),
87
87
  /* @__PURE__ */ o("span", {
88
- className: a(e.label, _?.label),
88
+ className: i(a.label, _?.label),
89
89
  children: m
90
90
  }),
91
91
  h != null && /* @__PURE__ */ o("span", {
92
92
  id: `${E}-hint`,
93
- className: a(e.hint, _?.hint),
93
+ className: i(a.hint, _?.hint),
94
94
  children: h
95
95
  })
96
96
  ]
@@ -1,6 +1,6 @@
1
- import e from "./EmptyState.module.js";
2
- import { forwardRef as t } from "react";
3
- import n from "clsx";
1
+ import { forwardRef as e } from "react";
2
+ import t from "clsx";
3
+ import n from "./EmptyState.module.scss.js";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
5
  // src/components/EmptyState/EmptyState.tsx
6
6
  var a = () => /* @__PURE__ */ i("svg", {
@@ -25,30 +25,30 @@ var a = () => /* @__PURE__ */ i("svg", {
25
25
  /* @__PURE__ */ r("path", { d: "M12 9v4" }),
26
26
  /* @__PURE__ */ r("path", { d: "M12 17h.01" })
27
27
  ]
28
- }), s = t(({ variant: t = "empty", icon: s, title: c, description: l, action: u, children: d, size: f = "md", bordered: p = !1, classes: m, className: h, ...g }, _) => {
29
- let v = s === void 0 ? r(t === "error" ? o : a, {}) : s;
28
+ }), s = e(({ variant: e = "empty", icon: s, title: c, description: l, action: u, children: d, size: f = "md", bordered: p = !1, classes: m, className: h, ...g }, _) => {
29
+ let v = s === void 0 ? r(e === "error" ? o : a, {}) : s;
30
30
  return /* @__PURE__ */ i("div", {
31
31
  ref: _,
32
- role: t === "error" ? "alert" : void 0,
33
- className: n(e.root, e[t], e[f], p && e.bordered, m?.root, h),
32
+ role: e === "error" ? "alert" : void 0,
33
+ className: t(n.root, n[e], n[f], p && n.bordered, m?.root, h),
34
34
  ...g,
35
35
  children: [
36
36
  v !== !1 && v != null && /* @__PURE__ */ r("div", {
37
- className: n(e.icon, m?.icon),
37
+ className: t(n.icon, m?.icon),
38
38
  "aria-hidden": "true",
39
39
  children: v
40
40
  }),
41
41
  c && /* @__PURE__ */ r("div", {
42
- className: n(e.title, m?.title),
42
+ className: t(n.title, m?.title),
43
43
  children: c
44
44
  }),
45
45
  l && /* @__PURE__ */ r("div", {
46
- className: n(e.description, m?.description),
46
+ className: t(n.description, m?.description),
47
47
  children: l
48
48
  }),
49
49
  d,
50
50
  u && /* @__PURE__ */ r("div", {
51
- className: n(e.action, m?.action),
51
+ className: t(n.action, m?.action),
52
52
  children: u
53
53
  })
54
54
  ]
@@ -1,30 +1,30 @@
1
- import e from "./Form.module.js";
2
- import { FormFieldDefaultsContext as t } from "./formFieldDefaults.js";
3
- import { useMemo as n } from "react";
4
- import r from "clsx";
5
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
- import { FormProvider as o } from "react-hook-form";
1
+ import { useMemo as e } from "react";
2
+ import { FormProvider as t } from "react-hook-form";
3
+ import n from "clsx";
4
+ import r from "./Form.module.scss.js";
5
+ import { FormFieldDefaultsContext as i } from "./formFieldDefaults.js";
6
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
7
  // src/components/Form/Form.tsx
8
8
  function s({ form: s, onSubmit: c, errors: l, reserveErrorSpace: u, fieldClasses: d, className: f, style: p, children: m }) {
9
- let h = l && l.length > 0, g = n(() => ({
9
+ let h = l && l.length > 0, g = e(() => ({
10
10
  reserveErrorSpace: u,
11
11
  classes: d
12
12
  }), [u, d]);
13
- return /* @__PURE__ */ i(o, {
13
+ return /* @__PURE__ */ a(t, {
14
14
  ...s,
15
- children: /* @__PURE__ */ i(t.Provider, {
15
+ children: /* @__PURE__ */ a(i.Provider, {
16
16
  value: g,
17
- children: /* @__PURE__ */ a("form", {
17
+ children: /* @__PURE__ */ o("form", {
18
18
  onSubmit: s.handleSubmit(c),
19
- className: r(e.root, u === !1 && e.rootLooseGap, f),
19
+ className: n(r.root, u === !1 && r.rootLooseGap, f),
20
20
  style: p,
21
- children: [h && /* @__PURE__ */ i("ul", {
22
- className: e.formErrors,
21
+ children: [h && /* @__PURE__ */ a("ul", {
22
+ className: r.formErrors,
23
23
  role: "alert",
24
- children: l.map((t, n) => /* @__PURE__ */ i("li", {
25
- className: e.formError,
26
- children: t
27
- }, n))
24
+ children: l.map((e, t) => /* @__PURE__ */ a("li", {
25
+ className: r.formError,
26
+ children: e
27
+ }, t))
28
28
  }), m]
29
29
  })
30
30
  })
@@ -1,9 +1,9 @@
1
- import e from "./Form.module.js";
2
- import { FormFieldDefaultsContext as t } from "./formFieldDefaults.js";
3
- import { cloneElement as n, useCallback as r, useContext as i, useRef as a } from "react";
1
+ import { cloneElement as e, useCallback as t, useContext as n, useRef as r } from "react";
2
+ import { useController as i, useFormContext as a } from "react-hook-form";
4
3
  import o from "clsx";
5
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
6
- import { useController as l, useFormContext as u } from "react-hook-form";
4
+ import s from "./Form.module.scss.js";
5
+ import { FormFieldDefaultsContext as c } from "./formFieldDefaults.js";
6
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
7
7
  // src/components/Form/FormField.tsx
8
8
  var d = /* @__PURE__ */ new Set([
9
9
  "Select",
@@ -13,31 +13,31 @@ var d = /* @__PURE__ */ new Set([
13
13
  "Dropdown"
14
14
  ]);
15
15
  function f({ name: f, label: p, helperText: m, required: h, rules: g, reserveErrorSpace: _, classes: v, className: y, style: b, children: x }) {
16
- let { control: S } = u(), { field: C, fieldState: w } = l({
16
+ let { control: S } = a(), { field: C, fieldState: w } = i({
17
17
  name: f,
18
18
  control: S,
19
19
  rules: g
20
- }), T = i(t), E = _ ?? T?.reserveErrorSpace ?? !0, D = T?.classes, O = x.type, k = typeof O == "string" ? "" : O?.displayName ?? O?.name ?? "", A = d.has(k), { ref: j, ...M } = C, N = typeof M.value == "boolean", P = a(j);
20
+ }), T = n(c), E = _ ?? T?.reserveErrorSpace ?? !0, D = T?.classes, O = x.type, k = typeof O == "string" ? "" : O?.displayName ?? O?.name ?? "", A = d.has(k), { ref: j, ...M } = C, N = typeof M.value == "boolean", P = r(j);
21
21
  P.current = j;
22
- let F = r((e) => {
22
+ let F = t((e) => {
23
23
  if (e) {
24
24
  let t = e.matches("input, select, textarea, button, [tabindex]") ? e : e.querySelector("input, select, textarea, button, [tabindex]:not([tabindex=\"-1\"])");
25
25
  P.current(t ?? e);
26
26
  } else P.current(null);
27
27
  }, []);
28
- return /* @__PURE__ */ c("div", {
29
- className: o(e.field, D?.field, v?.field, y),
28
+ return /* @__PURE__ */ u("div", {
29
+ className: o(s.field, D?.field, v?.field, y),
30
30
  style: b,
31
31
  children: [
32
- p && /* @__PURE__ */ c("label", {
33
- className: o(e.label, w.error && e.labelError, D?.label, v?.label),
32
+ p && /* @__PURE__ */ u("label", {
33
+ className: o(s.label, w.error && s.labelError, D?.label, v?.label),
34
34
  htmlFor: f,
35
- children: [p, h && /* @__PURE__ */ s("span", {
36
- className: e.required,
35
+ children: [p, h && /* @__PURE__ */ l("span", {
36
+ className: s.required,
37
37
  children: "*"
38
38
  })]
39
39
  }),
40
- n(x, {
40
+ e(x, {
41
41
  ...M,
42
42
  ...N && { value: void 0 },
43
43
  ref: F,
@@ -51,20 +51,20 @@ function f({ name: f, label: p, helperText: m, required: h, rules: g, reserveErr
51
51
  },
52
52
  checked: N ? M.value : void 0
53
53
  }),
54
- w.error?.message && /* @__PURE__ */ s("span", {
54
+ w.error?.message && /* @__PURE__ */ l("span", {
55
55
  id: `${f}-error`,
56
- className: o(e.error, D?.error, v?.error),
56
+ className: o(s.error, D?.error, v?.error),
57
57
  role: "alert",
58
58
  children: w.error.message
59
59
  }),
60
- m && /* @__PURE__ */ s("span", {
60
+ m && /* @__PURE__ */ l("span", {
61
61
  id: `${f}-helper`,
62
- className: o(e.helperText, D?.helperText, v?.helperText),
62
+ className: o(s.helperText, D?.helperText, v?.helperText),
63
63
  children: m
64
64
  }),
65
- E !== !1 && !w.error?.message && /* @__PURE__ */ s("div", {
65
+ E !== !1 && !w.error?.message && /* @__PURE__ */ l("div", {
66
66
  "aria-hidden": "true",
67
- className: o(e.messageReserve, D?.message, v?.message),
67
+ className: o(s.messageReserve, D?.message, v?.message),
68
68
  style: typeof E == "number" ? { minHeight: `${E}px` } : typeof E == "string" ? { minHeight: E } : void 0
69
69
  })
70
70
  ]
@@ -1,10 +1,10 @@
1
- import e from "./Form.module.js";
2
- import t from "clsx";
1
+ import e from "clsx";
2
+ import t from "./Form.module.scss.js";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  // src/components/Form/FormRow.tsx
5
5
  function r({ children: r, className: i, style: a }) {
6
6
  return /* @__PURE__ */ n("div", {
7
- className: t(e.row, i),
7
+ className: e(t.row, i),
8
8
  style: a,
9
9
  children: r
10
10
  });