asterui 0.12.30 → 0.12.32

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 (330) hide show
  1. package/dist/chart.d.ts +2 -0
  2. package/dist/chart.js +5 -0
  3. package/dist/chart.js.map +1 -0
  4. package/dist/{index2.js → components/Affix.js} +1 -1
  5. package/dist/components/Affix.js.map +1 -0
  6. package/dist/{index4.js → components/Alert.js} +1 -1
  7. package/dist/components/Alert.js.map +1 -0
  8. package/dist/{index3.js → components/Anchor.js} +1 -1
  9. package/dist/components/Anchor.js.map +1 -0
  10. package/dist/{index5.js → components/Autocomplete.js} +1 -1
  11. package/dist/components/Autocomplete.js.map +1 -0
  12. package/dist/{index6.js → components/Avatar.js} +1 -1
  13. package/dist/components/Avatar.js.map +1 -0
  14. package/dist/components/Badge.d.ts +24 -5
  15. package/dist/components/Badge.js +220 -0
  16. package/dist/components/Badge.js.map +1 -0
  17. package/dist/components/Breadcrumb.js +38 -0
  18. package/dist/components/Breadcrumb.js.map +1 -0
  19. package/dist/{index53.js → components/Browser.js} +1 -1
  20. package/dist/components/Browser.js.map +1 -0
  21. package/dist/{index9.js → components/Button.js} +1 -1
  22. package/dist/components/Button.js.map +1 -0
  23. package/dist/{index14.js → components/Card.js} +22 -22
  24. package/dist/{index14.js.map → components/Card.js.map} +1 -1
  25. package/dist/components/Carousel.d.ts +47 -6
  26. package/dist/components/Carousel.js +205 -0
  27. package/dist/components/Carousel.js.map +1 -0
  28. package/dist/{index15.js → components/Cascader.js} +1 -1
  29. package/dist/components/Cascader.js.map +1 -0
  30. package/dist/{index16.js → components/Chart.js} +1 -1
  31. package/dist/components/Chart.js.map +1 -0
  32. package/dist/{index12.js → components/Chat.js} +1 -1
  33. package/dist/{index12.js.map → components/Chat.js.map} +1 -1
  34. package/dist/{index11.js → components/Checkbox.js} +15 -15
  35. package/dist/components/Checkbox.js.map +1 -0
  36. package/dist/{index54.js → components/Code.js} +5 -5
  37. package/dist/{index54.js.map → components/Code.js.map} +1 -1
  38. package/dist/{index18.js → components/Collapse.js} +1 -1
  39. package/dist/components/Collapse.js.map +1 -0
  40. package/dist/{index13.js → components/ColorPicker.js} +1 -1
  41. package/dist/components/ColorPicker.js.map +1 -0
  42. package/dist/{index19.js → components/Container.js} +1 -1
  43. package/dist/components/Container.js.map +1 -0
  44. package/dist/{index20.js → components/ContextMenu.js} +9 -9
  45. package/dist/components/ContextMenu.js.map +1 -0
  46. package/dist/{index10.js → components/CopyButton.js} +2 -2
  47. package/dist/components/CopyButton.js.map +1 -0
  48. package/dist/{index21.js → components/Countdown.js} +1 -1
  49. package/dist/components/Countdown.js.map +1 -0
  50. package/dist/{index22.js → components/DatePicker.js} +2 -2
  51. package/dist/components/DatePicker.js.map +1 -0
  52. package/dist/{index23.js → components/Descriptions.js} +23 -23
  53. package/dist/components/Descriptions.js.map +1 -0
  54. package/dist/{index24.js → components/Diff.js} +1 -1
  55. package/dist/{index24.js.map → components/Diff.js.map} +1 -1
  56. package/dist/{index26.js → components/Divider.js} +1 -1
  57. package/dist/components/Divider.js.map +1 -0
  58. package/dist/{index25.js → components/Dock.js} +1 -1
  59. package/dist/{index25.js.map → components/Dock.js.map} +1 -1
  60. package/dist/{index27.js → components/Drawer.js} +1 -1
  61. package/dist/components/Drawer.js.map +1 -0
  62. package/dist/{index40.js → components/Dropdown.js} +31 -31
  63. package/dist/components/Dropdown.js.map +1 -0
  64. package/dist/{index41.js → components/Empty.js} +1 -1
  65. package/dist/components/Empty.js.map +1 -0
  66. package/dist/{index29.js → components/Fieldset.js} +1 -1
  67. package/dist/components/Fieldset.js.map +1 -0
  68. package/dist/{index30.js → components/FileInput.js} +1 -1
  69. package/dist/components/FileInput.js.map +1 -0
  70. package/dist/{index31.js → components/Filter.js} +1 -1
  71. package/dist/components/Filter.js.map +1 -0
  72. package/dist/{index32.js → components/Flex.js} +1 -1
  73. package/dist/{index32.js.map → components/Flex.js.map} +1 -1
  74. package/dist/{index33.js → components/FloatButton.js} +1 -1
  75. package/dist/components/FloatButton.js.map +1 -0
  76. package/dist/{index34.js → components/Footer.js} +1 -1
  77. package/dist/components/Footer.js.map +1 -0
  78. package/dist/{index35.js → components/Form.js} +1 -1
  79. package/dist/{index35.js.map → components/Form.js.map} +1 -1
  80. package/dist/{index36.js → components/Grid.js} +6 -6
  81. package/dist/{index36.js.map → components/Grid.js.map} +1 -1
  82. package/dist/{index37.js → components/Hero.js} +1 -1
  83. package/dist/{index37.js.map → components/Hero.js.map} +1 -1
  84. package/dist/{index38.js → components/HoverGallery.js} +1 -1
  85. package/dist/components/HoverGallery.js.map +1 -0
  86. package/dist/{index39.js → components/Image.js} +1 -1
  87. package/dist/components/Image.js.map +1 -0
  88. package/dist/{index42.js → components/Input.js} +1 -1
  89. package/dist/components/Input.js.map +1 -0
  90. package/dist/{index43.js → components/InputNumber.js} +1 -1
  91. package/dist/components/InputNumber.js.map +1 -0
  92. package/dist/components/Join.js +18 -0
  93. package/dist/{index44.js.map → components/Join.js.map} +1 -1
  94. package/dist/{index45.js → components/Kbd.js} +1 -1
  95. package/dist/components/Kbd.js.map +1 -0
  96. package/dist/{index46.js → components/Layout.js} +16 -16
  97. package/dist/components/Layout.js.map +1 -0
  98. package/dist/{index47.js → components/List.js} +17 -17
  99. package/dist/{index47.js.map → components/List.js.map} +1 -1
  100. package/dist/{index48.js → components/Loading.js} +1 -1
  101. package/dist/components/Loading.js.map +1 -0
  102. package/dist/{index49.js → components/Mask.js} +1 -1
  103. package/dist/{index49.js.map → components/Mask.js.map} +1 -1
  104. package/dist/{index50.js → components/Masonry.js} +19 -19
  105. package/dist/components/Masonry.js.map +1 -0
  106. package/dist/{index51.js → components/Mention.js} +1 -1
  107. package/dist/components/Mention.js.map +1 -0
  108. package/dist/{index52.js → components/Menu.js} +1 -1
  109. package/dist/{index52.js.map → components/Menu.js.map} +1 -1
  110. package/dist/{index57.js → components/Modal.js} +23 -23
  111. package/dist/components/Modal.js.map +1 -0
  112. package/dist/{index58.js → components/Navbar.js} +1 -1
  113. package/dist/components/Navbar.js.map +1 -0
  114. package/dist/{index59.js → components/Notification.js} +1 -1
  115. package/dist/components/Notification.js.map +1 -0
  116. package/dist/{index60.js → components/OTPInput.js} +1 -1
  117. package/dist/components/OTPInput.js.map +1 -0
  118. package/dist/{index62.js → components/PageLayout.js} +1 -1
  119. package/dist/components/PageLayout.js.map +1 -0
  120. package/dist/{index61.js → components/Pagination.js} +18 -18
  121. package/dist/components/Pagination.js.map +1 -0
  122. package/dist/{index55.js → components/Phone.js} +1 -1
  123. package/dist/components/Phone.js.map +1 -0
  124. package/dist/{index63.js → components/Popconfirm.js} +14 -14
  125. package/dist/components/Popconfirm.js.map +1 -0
  126. package/dist/{index64.js → components/Popover.js} +1 -1
  127. package/dist/components/Popover.js.map +1 -0
  128. package/dist/{index65.js → components/Progress.js} +1 -1
  129. package/dist/components/Progress.js.map +1 -0
  130. package/dist/{index66.js → components/QRCode.js} +1 -1
  131. package/dist/components/QRCode.js.map +1 -0
  132. package/dist/{index68.js → components/RadialProgress.js} +1 -1
  133. package/dist/components/RadialProgress.js.map +1 -0
  134. package/dist/{index67.js → components/Radio.js} +13 -13
  135. package/dist/components/Radio.js.map +1 -0
  136. package/dist/{index69.js → components/Range.js} +1 -1
  137. package/dist/components/Range.js.map +1 -0
  138. package/dist/{index70.js → components/Rating.js} +20 -20
  139. package/dist/components/Rating.js.map +1 -0
  140. package/dist/{index98.js → components/Responsive.js} +2 -2
  141. package/dist/components/Responsive.js.map +1 -0
  142. package/dist/{index71.js → components/Result.js} +1 -1
  143. package/dist/components/Result.js.map +1 -0
  144. package/dist/{index73.js → components/Segmented.js} +1 -1
  145. package/dist/components/Segmented.js.map +1 -0
  146. package/dist/{index72.js → components/Select.js} +1 -1
  147. package/dist/components/Select.js.map +1 -0
  148. package/dist/{index28.js → components/SidebarDrawer.js} +3 -3
  149. package/dist/components/SidebarDrawer.js.map +1 -0
  150. package/dist/{index74.js → components/Skeleton.js} +1 -1
  151. package/dist/components/Skeleton.js.map +1 -0
  152. package/dist/{index75.js → components/Space.js} +10 -10
  153. package/dist/components/Space.js.map +1 -0
  154. package/dist/{index76.js → components/Splitter.js} +22 -22
  155. package/dist/components/Splitter.js.map +1 -0
  156. package/dist/{index77.js → components/Stat.js} +1 -1
  157. package/dist/{index77.js.map → components/Stat.js.map} +1 -1
  158. package/dist/{index78.js → components/Status.js} +1 -1
  159. package/dist/components/Status.js.map +1 -0
  160. package/dist/{index79.js → components/Steps.js} +14 -14
  161. package/dist/components/Steps.js.map +1 -0
  162. package/dist/{index80.js → components/Table.js} +92 -92
  163. package/dist/components/Table.js.map +1 -0
  164. package/dist/components/Tabs.js +83 -0
  165. package/dist/{index81.js.map → components/Tabs.js.map} +1 -1
  166. package/dist/{index84.js → components/Tag.js} +1 -1
  167. package/dist/components/Tag.js.map +1 -0
  168. package/dist/{index83.js → components/TextRotate.js} +1 -1
  169. package/dist/components/TextRotate.js.map +1 -0
  170. package/dist/{index82.js → components/Textarea.js} +1 -1
  171. package/dist/components/Textarea.js.map +1 -0
  172. package/dist/{index85.js → components/ThemeController.js} +1 -1
  173. package/dist/components/ThemeController.js.map +1 -0
  174. package/dist/{index86.js → components/TimePicker.js} +2 -2
  175. package/dist/components/TimePicker.js.map +1 -0
  176. package/dist/{index87.js → components/Timeline.js} +13 -13
  177. package/dist/components/Timeline.js.map +1 -0
  178. package/dist/{index88.js → components/Toggle.js} +1 -1
  179. package/dist/components/Toggle.js.map +1 -0
  180. package/dist/{index90.js → components/Tooltip.js} +1 -1
  181. package/dist/components/Tooltip.js.map +1 -0
  182. package/dist/{index89.js → components/Tour.js} +1 -1
  183. package/dist/{index89.js.map → components/Tour.js.map} +1 -1
  184. package/dist/{index91.js → components/Transfer.js} +1 -1
  185. package/dist/components/Transfer.js.map +1 -0
  186. package/dist/{index92.js → components/Tree.js} +1 -1
  187. package/dist/{index92.js.map → components/Tree.js.map} +1 -1
  188. package/dist/{index93.js → components/TreeSelect.js} +44 -44
  189. package/dist/components/TreeSelect.js.map +1 -0
  190. package/dist/{index94.js → components/Typography.js} +1 -1
  191. package/dist/components/Typography.js.map +1 -0
  192. package/dist/{index95.js → components/Upload.js} +1 -1
  193. package/dist/components/Upload.js.map +1 -0
  194. package/dist/{index96.js → components/VirtualList.js} +2 -2
  195. package/dist/components/VirtualList.js.map +1 -0
  196. package/dist/{index97.js → components/Watermark.js} +1 -1
  197. package/dist/components/Watermark.js.map +1 -0
  198. package/dist/{index56.js → components/Window.js} +1 -1
  199. package/dist/components/Window.js.map +1 -0
  200. package/dist/{index99.js → hooks/useBreakpoint.js} +1 -1
  201. package/dist/hooks/useBreakpoint.js.map +1 -0
  202. package/dist/{index104.js → hooks/useClickOutside.js} +1 -1
  203. package/dist/hooks/useClickOutside.js.map +1 -0
  204. package/dist/{index101.js → hooks/useClipboard.js} +1 -1
  205. package/dist/hooks/useClipboard.js.map +1 -0
  206. package/dist/{index103.js → hooks/useDebounce.js} +1 -1
  207. package/dist/hooks/useDebounce.js.map +1 -0
  208. package/dist/{index100.js → hooks/useDisclosure.js} +1 -1
  209. package/dist/hooks/useDisclosure.js.map +1 -0
  210. package/dist/{index106.js → hooks/useHover.js} +1 -1
  211. package/dist/hooks/useHover.js.map +1 -0
  212. package/dist/{index107.js → hooks/useKeyPress.js} +1 -1
  213. package/dist/hooks/useKeyPress.js.map +1 -0
  214. package/dist/{index102.js → hooks/useLocalStorage.js} +1 -1
  215. package/dist/hooks/useLocalStorage.js.map +1 -0
  216. package/dist/{index105.js → hooks/usePrevious.js} +1 -1
  217. package/dist/hooks/usePrevious.js.map +1 -0
  218. package/dist/{index108.js → hooks/useWindowSize.js} +1 -1
  219. package/dist/hooks/useWindowSize.js.map +1 -0
  220. package/dist/index.d.ts +2 -8
  221. package/dist/index.js +204 -210
  222. package/dist/index.js.map +1 -1
  223. package/dist/qrcode.d.ts +2 -0
  224. package/dist/qrcode.js +5 -0
  225. package/dist/qrcode.js.map +1 -0
  226. package/dist/virtuallist.d.ts +2 -0
  227. package/dist/virtuallist.js +5 -0
  228. package/dist/virtuallist.js.map +1 -0
  229. package/package.json +13 -1
  230. package/dist/index10.js.map +0 -1
  231. package/dist/index100.js.map +0 -1
  232. package/dist/index101.js.map +0 -1
  233. package/dist/index102.js.map +0 -1
  234. package/dist/index103.js.map +0 -1
  235. package/dist/index104.js.map +0 -1
  236. package/dist/index105.js.map +0 -1
  237. package/dist/index106.js.map +0 -1
  238. package/dist/index107.js.map +0 -1
  239. package/dist/index108.js.map +0 -1
  240. package/dist/index109.js +0 -36
  241. package/dist/index109.js.map +0 -1
  242. package/dist/index11.js.map +0 -1
  243. package/dist/index110.js +0 -523
  244. package/dist/index110.js.map +0 -1
  245. package/dist/index111.js +0 -53
  246. package/dist/index111.js.map +0 -1
  247. package/dist/index13.js.map +0 -1
  248. package/dist/index15.js.map +0 -1
  249. package/dist/index16.js.map +0 -1
  250. package/dist/index17.js +0 -8
  251. package/dist/index17.js.map +0 -1
  252. package/dist/index18.js.map +0 -1
  253. package/dist/index19.js.map +0 -1
  254. package/dist/index2.js.map +0 -1
  255. package/dist/index20.js.map +0 -1
  256. package/dist/index21.js.map +0 -1
  257. package/dist/index22.js.map +0 -1
  258. package/dist/index23.js.map +0 -1
  259. package/dist/index26.js.map +0 -1
  260. package/dist/index27.js.map +0 -1
  261. package/dist/index28.js.map +0 -1
  262. package/dist/index29.js.map +0 -1
  263. package/dist/index3.js.map +0 -1
  264. package/dist/index30.js.map +0 -1
  265. package/dist/index31.js.map +0 -1
  266. package/dist/index33.js.map +0 -1
  267. package/dist/index34.js.map +0 -1
  268. package/dist/index38.js.map +0 -1
  269. package/dist/index39.js.map +0 -1
  270. package/dist/index4.js.map +0 -1
  271. package/dist/index40.js.map +0 -1
  272. package/dist/index41.js.map +0 -1
  273. package/dist/index42.js.map +0 -1
  274. package/dist/index43.js.map +0 -1
  275. package/dist/index44.js +0 -18
  276. package/dist/index45.js.map +0 -1
  277. package/dist/index46.js.map +0 -1
  278. package/dist/index48.js.map +0 -1
  279. package/dist/index5.js.map +0 -1
  280. package/dist/index50.js.map +0 -1
  281. package/dist/index51.js.map +0 -1
  282. package/dist/index53.js.map +0 -1
  283. package/dist/index55.js.map +0 -1
  284. package/dist/index56.js.map +0 -1
  285. package/dist/index57.js.map +0 -1
  286. package/dist/index58.js.map +0 -1
  287. package/dist/index59.js.map +0 -1
  288. package/dist/index6.js.map +0 -1
  289. package/dist/index60.js.map +0 -1
  290. package/dist/index61.js.map +0 -1
  291. package/dist/index62.js.map +0 -1
  292. package/dist/index63.js.map +0 -1
  293. package/dist/index64.js.map +0 -1
  294. package/dist/index65.js.map +0 -1
  295. package/dist/index66.js.map +0 -1
  296. package/dist/index67.js.map +0 -1
  297. package/dist/index68.js.map +0 -1
  298. package/dist/index69.js.map +0 -1
  299. package/dist/index7.js +0 -133
  300. package/dist/index7.js.map +0 -1
  301. package/dist/index70.js.map +0 -1
  302. package/dist/index71.js.map +0 -1
  303. package/dist/index72.js.map +0 -1
  304. package/dist/index73.js.map +0 -1
  305. package/dist/index74.js.map +0 -1
  306. package/dist/index75.js.map +0 -1
  307. package/dist/index76.js.map +0 -1
  308. package/dist/index78.js.map +0 -1
  309. package/dist/index79.js.map +0 -1
  310. package/dist/index8.js +0 -38
  311. package/dist/index8.js.map +0 -1
  312. package/dist/index80.js.map +0 -1
  313. package/dist/index81.js +0 -83
  314. package/dist/index82.js.map +0 -1
  315. package/dist/index83.js.map +0 -1
  316. package/dist/index84.js.map +0 -1
  317. package/dist/index85.js.map +0 -1
  318. package/dist/index86.js.map +0 -1
  319. package/dist/index87.js.map +0 -1
  320. package/dist/index88.js.map +0 -1
  321. package/dist/index9.js.map +0 -1
  322. package/dist/index90.js.map +0 -1
  323. package/dist/index91.js.map +0 -1
  324. package/dist/index93.js.map +0 -1
  325. package/dist/index94.js.map +0 -1
  326. package/dist/index95.js.map +0 -1
  327. package/dist/index96.js.map +0 -1
  328. package/dist/index97.js.map +0 -1
  329. package/dist/index98.js.map +0 -1
  330. package/dist/index99.js.map +0 -1
@@ -1,13 +1,13 @@
1
1
  import { jsxs as i, jsx as a } from "react/jsx-runtime";
2
- import y, { forwardRef as A } from "react";
3
- function B(c) {
2
+ import y, { forwardRef as B } from "react";
3
+ function H(c) {
4
4
  return null;
5
5
  }
6
- const H = {
6
+ const O = {
7
7
  sm: "text-sm",
8
8
  md: "text-base",
9
9
  lg: "text-lg"
10
- }, N = A(
10
+ }, N = B(
11
11
  ({
12
12
  title: c,
13
13
  extra: S,
@@ -22,7 +22,7 @@ const H = {
22
22
  className: M = "",
23
23
  style: R,
24
24
  children: D,
25
- "data-testid": m = "descriptions",
25
+ "data-testid": u = "descriptions",
26
26
  ...L
27
27
  }, z) => {
28
28
  const w = C || y.Children.toArray(D).filter(
@@ -41,12 +41,12 @@ const H = {
41
41
  l + e > r ? (t.push(s), s = [n], l = e) : (s.push(n), l += e);
42
42
  }), s.length > 0 && t.push(s), t.map((n, o) => /* @__PURE__ */ i(y.Fragment, { children: [
43
43
  /* @__PURE__ */ a("tr", { children: n.map((e, f) => {
44
- const h = e.span || 1, p = Math.min(h, r), u = e.labelStyle || x;
44
+ const h = e.span || 1, p = Math.min(h, r), m = e.labelStyle || x;
45
45
  return /* @__PURE__ */ i(
46
46
  "th",
47
47
  {
48
48
  className: `${d ? "border border-base-content/10" : ""} bg-base-200/50 font-semibold text-left px-4 py-2`,
49
- style: u,
49
+ style: m,
50
50
  colSpan: p,
51
51
  scope: "col",
52
52
  children: [
@@ -58,12 +58,12 @@ const H = {
58
58
  );
59
59
  }) }),
60
60
  /* @__PURE__ */ a("tr", { children: n.map((e, f) => {
61
- const h = e.span || 1, p = Math.min(h, r), u = e.contentStyle || v;
61
+ const h = e.span || 1, p = Math.min(h, r), m = e.contentStyle || v;
62
62
  return /* @__PURE__ */ a(
63
63
  "td",
64
64
  {
65
65
  className: `${d ? "border border-base-content/10" : ""} bg-base-100 px-4 py-2`,
66
- style: u,
66
+ style: m,
67
67
  colSpan: p,
68
68
  children: e.children
69
69
  },
@@ -71,20 +71,20 @@ const H = {
71
71
  );
72
72
  }) })
73
73
  ] }, o));
74
- }, _ = () => {
74
+ }, F = () => {
75
75
  const t = [];
76
76
  let s = [], l = 0;
77
77
  return w.forEach((n) => {
78
78
  const o = n.span || 1, e = Math.min(o, r);
79
79
  l + e > r ? (t.push(s), s = [n], l = e) : (s.push(n), l += e);
80
80
  }), s.length > 0 && t.push(s), t.map((n, o) => /* @__PURE__ */ a("tr", { children: n.map((e, f) => {
81
- const h = e.span || 1, p = Math.min(h, r), u = e.labelStyle || x, V = e.contentStyle || v;
81
+ const h = e.span || 1, p = Math.min(h, r), m = e.labelStyle || x, A = e.contentStyle || v;
82
82
  return /* @__PURE__ */ i(y.Fragment, { children: [
83
83
  /* @__PURE__ */ i(
84
84
  "th",
85
85
  {
86
86
  className: `${d ? "border border-base-content/10" : ""} bg-base-200/50 font-semibold text-left px-4 py-2 whitespace-nowrap`,
87
- style: u,
87
+ style: m,
88
88
  scope: "row",
89
89
  children: [
90
90
  e.label,
@@ -96,17 +96,17 @@ const H = {
96
96
  "td",
97
97
  {
98
98
  className: `${d ? "border border-base-content/10" : ""} bg-base-100 px-4 py-2`,
99
- style: V,
99
+ style: A,
100
100
  colSpan: p > 1 ? p * 2 - 1 : 1,
101
101
  children: e.children
102
102
  }
103
103
  )
104
104
  ] }, f);
105
105
  }) }, o));
106
- }, F = [
106
+ }, V = [
107
107
  "w-full",
108
108
  d && "border-collapse",
109
- H[$],
109
+ O[$],
110
110
  M
111
111
  ].filter(Boolean).join(" ");
112
112
  return /* @__PURE__ */ i(
@@ -114,21 +114,21 @@ const H = {
114
114
  {
115
115
  ref: z,
116
116
  style: R,
117
- "data-testid": m,
117
+ "data-testid": u,
118
118
  ...L,
119
119
  children: [
120
- (c || S) && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-4", "data-testid": `${m}-header`, children: [
120
+ (c || S) && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-4", "data-testid": `${u}-header`, children: [
121
121
  c && /* @__PURE__ */ a("div", { className: "text-lg font-semibold", children: c }),
122
- S && /* @__PURE__ */ a("div", { "data-testid": `${m}-extra`, children: S })
122
+ S && /* @__PURE__ */ a("div", { "data-testid": `${u}-extra`, children: S })
123
123
  ] }),
124
124
  /* @__PURE__ */ a(
125
125
  "table",
126
126
  {
127
- className: F,
127
+ className: V,
128
128
  role: "table",
129
129
  "aria-label": typeof c == "string" ? c : void 0,
130
- "data-testid": `${m}-table`,
131
- children: /* @__PURE__ */ a("tbody", { children: j === "vertical" ? E() : _() })
130
+ "data-testid": `${u}-table`,
131
+ children: /* @__PURE__ */ a("tbody", { children: j === "vertical" ? E() : F() })
132
132
  }
133
133
  )
134
134
  ]
@@ -138,10 +138,10 @@ const H = {
138
138
  );
139
139
  N.displayName = "Descriptions";
140
140
  const G = Object.assign(N, {
141
- Item: B
141
+ Item: H
142
142
  });
143
143
  export {
144
144
  G as Descriptions,
145
145
  G as default
146
146
  };
147
- //# sourceMappingURL=index23.js.map
147
+ //# sourceMappingURL=Descriptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Descriptions.js","sources":["../../src/components/Descriptions.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nexport type DescriptionsSize = 'sm' | 'md' | 'lg'\nexport type DescriptionsLayout = 'horizontal' | 'vertical'\n\nexport interface DescriptionsItemProps {\n /** Label for the item */\n label?: React.ReactNode\n /** Number of columns to span */\n span?: number\n /** Content of the item */\n children?: React.ReactNode\n /** Custom label styles */\n labelStyle?: React.CSSProperties\n /** Custom content styles */\n contentStyle?: React.CSSProperties\n}\n\n/** Item configuration for the items prop */\nexport interface DescriptionsItemConfig {\n /** Label for the item */\n label: React.ReactNode\n /** Content of the item */\n children: React.ReactNode\n /** Number of columns to span */\n span?: number\n /** Custom label styles */\n labelStyle?: React.CSSProperties\n /** Custom content styles */\n contentStyle?: React.CSSProperties\n}\n\nexport interface DescriptionsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Title of the descriptions block */\n title?: React.ReactNode\n /** Extra content in the top-right corner */\n extra?: React.ReactNode\n /** Show borders around cells */\n bordered?: boolean\n /** Number of columns (or responsive config) */\n column?: number | {\n xs?: number\n sm?: number\n md?: number\n lg?: number\n xl?: number\n '2xl'?: number\n }\n /** Size variant */\n size?: DescriptionsSize\n /** Layout direction */\n layout?: DescriptionsLayout\n /** Show colon after labels */\n colon?: boolean\n /** Default label styles */\n labelStyle?: React.CSSProperties\n /** Default content styles */\n contentStyle?: React.CSSProperties\n /** Item configurations (alternative to children) */\n items?: DescriptionsItemConfig[]\n /** Children (Descriptions.Item elements) */\n children?: React.ReactNode\n /** Test ID for the component */\n 'data-testid'?: string\n}\n\nfunction DescriptionsItem(_props: DescriptionsItemProps) {\n return null\n}\n\nconst sizeClasses: Record<DescriptionsSize, string> = {\n sm: 'text-sm',\n md: 'text-base',\n lg: 'text-lg',\n}\n\nconst DescriptionsRoot = forwardRef<HTMLDivElement, DescriptionsProps>(\n (\n {\n title,\n extra,\n bordered = false,\n column = 3,\n size = 'md',\n layout = 'horizontal',\n colon = true,\n labelStyle,\n contentStyle,\n items: itemsProp,\n className = '',\n style,\n children,\n 'data-testid': testId = 'descriptions',\n ...rest\n },\n ref\n ) => {\n // Convert children to item configs, or use items prop\n const itemConfigs: DescriptionsItemConfig[] = itemsProp\n ? itemsProp\n : React.Children.toArray(children)\n .filter((child): child is React.ReactElement<DescriptionsItemProps> =>\n React.isValidElement(child)\n )\n .map((child) => ({\n label: child.props.label,\n children: child.props.children,\n span: child.props.span,\n labelStyle: child.props.labelStyle,\n contentStyle: child.props.contentStyle,\n }))\n\n const getColumnCount = () => {\n if (typeof column === 'number') {\n return column\n }\n return column.md || column.sm || column.xs || 3\n }\n\n const columnCount = getColumnCount()\n\n const renderVerticalLayout = () => {\n const rows: DescriptionsItemConfig[][] = []\n let currentRow: DescriptionsItemConfig[] = []\n let currentSpan = 0\n\n itemConfigs.forEach((item) => {\n const span = item.span || 1\n const effectiveSpan = Math.min(span, columnCount)\n\n if (currentSpan + effectiveSpan > columnCount) {\n rows.push(currentRow)\n currentRow = [item]\n currentSpan = effectiveSpan\n } else {\n currentRow.push(item)\n currentSpan += effectiveSpan\n }\n })\n\n if (currentRow.length > 0) {\n rows.push(currentRow)\n }\n\n return rows.map((row, rowIndex) => (\n <React.Fragment key={rowIndex}>\n <tr>\n {row.map((item, cellIndex) => {\n const span = item.span || 1\n const effectiveSpan = Math.min(span, columnCount)\n const itemLabelStyle = item.labelStyle || labelStyle\n\n return (\n <th\n key={cellIndex}\n className={`${bordered ? 'border border-base-content/10' : ''} bg-base-200/50 font-semibold text-left px-4 py-2`}\n style={itemLabelStyle}\n colSpan={effectiveSpan}\n scope=\"col\"\n >\n {item.label}\n {colon && item.label && ':'}\n </th>\n )\n })}\n </tr>\n <tr>\n {row.map((item, cellIndex) => {\n const span = item.span || 1\n const effectiveSpan = Math.min(span, columnCount)\n const itemContentStyle = item.contentStyle || contentStyle\n\n return (\n <td\n key={cellIndex}\n className={`${bordered ? 'border border-base-content/10' : ''} bg-base-100 px-4 py-2`}\n style={itemContentStyle}\n colSpan={effectiveSpan}\n >\n {item.children}\n </td>\n )\n })}\n </tr>\n </React.Fragment>\n ))\n }\n\n const renderHorizontalLayout = () => {\n const rows: DescriptionsItemConfig[][] = []\n let currentRow: DescriptionsItemConfig[] = []\n let currentSpan = 0\n\n itemConfigs.forEach((item) => {\n const span = item.span || 1\n const effectiveSpan = Math.min(span, columnCount)\n\n if (currentSpan + effectiveSpan > columnCount) {\n rows.push(currentRow)\n currentRow = [item]\n currentSpan = effectiveSpan\n } else {\n currentRow.push(item)\n currentSpan += effectiveSpan\n }\n })\n\n if (currentRow.length > 0) {\n rows.push(currentRow)\n }\n\n return rows.map((row, rowIndex) => (\n <tr key={rowIndex}>\n {row.map((item, cellIndex) => {\n const span = item.span || 1\n const effectiveSpan = Math.min(span, columnCount)\n const itemLabelStyle = item.labelStyle || labelStyle\n const itemContentStyle = item.contentStyle || contentStyle\n\n return (\n <React.Fragment key={cellIndex}>\n <th\n className={`${bordered ? 'border border-base-content/10' : ''} bg-base-200/50 font-semibold text-left px-4 py-2 whitespace-nowrap`}\n style={itemLabelStyle}\n scope=\"row\"\n >\n {item.label}\n {colon && item.label && ':'}\n </th>\n <td\n className={`${bordered ? 'border border-base-content/10' : ''} bg-base-100 px-4 py-2`}\n style={itemContentStyle}\n colSpan={effectiveSpan > 1 ? effectiveSpan * 2 - 1 : 1}\n >\n {item.children}\n </td>\n </React.Fragment>\n )\n })}\n </tr>\n ))\n }\n\n const containerClasses = [\n 'w-full',\n bordered && 'border-collapse',\n sizeClasses[size],\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n return (\n <div\n ref={ref}\n style={style}\n data-testid={testId}\n {...rest}\n >\n {(title || extra) && (\n <div className=\"flex items-center justify-between mb-4\" data-testid={`${testId}-header`}>\n {title && (\n <div className=\"text-lg font-semibold\">{title}</div>\n )}\n {extra && (\n <div data-testid={`${testId}-extra`}>{extra}</div>\n )}\n </div>\n )}\n <table\n className={containerClasses}\n role=\"table\"\n aria-label={typeof title === 'string' ? title : undefined}\n data-testid={`${testId}-table`}\n >\n <tbody>\n {layout === 'vertical' ? renderVerticalLayout() : renderHorizontalLayout()}\n </tbody>\n </table>\n </div>\n )\n }\n)\n\nDescriptionsRoot.displayName = 'Descriptions'\n\nexport const Descriptions = Object.assign(DescriptionsRoot, {\n Item: DescriptionsItem,\n})\n\nexport default Descriptions\n"],"names":["DescriptionsItem","_props","sizeClasses","DescriptionsRoot","forwardRef","title","extra","bordered","column","size","layout","colon","labelStyle","contentStyle","itemsProp","className","style","children","testId","rest","ref","itemConfigs","React","child","columnCount","renderVerticalLayout","rows","currentRow","currentSpan","item","span","effectiveSpan","row","rowIndex","jsxs","jsx","cellIndex","itemLabelStyle","itemContentStyle","renderHorizontalLayout","containerClasses","Descriptions"],"mappings":";;AAkEA,SAASA,EAAiBC,GAA+B;AACvD,SAAO;A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AAd;AAAA,QACA,OAAAJ;AAAA,QACA,eAAaE;AAAA,QACZ,GAAGC;AAAA,QAEF,UAAA;AAAA,WAAAd,KAASC,wBACR,OAAA,EAAI,WAAU,0CAAyC,eAAa,GAAGY,CAAM,WAC3E,UAAA;AAAA,YAAAb,KACC,gBAAA8B,EAAC,OAAA,EAAI,WAAU,yBAAyB,UAAA9B,GAAM;AAAA,YAE/CC,KACC,gBAAA6B,EAAC,OAAA,EAAI,eAAa,GAAGjB,CAAM,UAAW,UAAAZ,EAAA,CAAM;AAAA,UAAA,GAEhD;AAAA,UAEF,gBAAA6B;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWK;AAAA,cACX,MAAK;AAAA,cACL,cAAY,OAAOnC,KAAU,WAAWA,IAAQ;AAAA,cAChD,eAAa,GAAGa,CAAM;AAAA,cAEtB,4BAAC,SAAA,EACE,UAAAR,MAAW,aAAae,MAAyBc,IAAuB,CAC3E;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEApC,EAAiB,cAAc;AAExB,MAAMsC,IAAe,OAAO,OAAOtC,GAAkB;AAAA,EAC1D,MAAMH;AACR,CAAC;"}
@@ -19,4 +19,4 @@ const m = ({
19
19
  export {
20
20
  m as Diff
21
21
  };
22
- //# sourceMappingURL=index24.js.map
22
+ //# sourceMappingURL=Diff.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index24.js","sources":["../src/components/Diff.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface DiffProps {\n /** Left side content (revealed when dragging) */\n left: React.ReactNode\n /** Right side content (hidden when dragging) */\n right: React.ReactNode\n /** Aspect ratio class (e.g., \"aspect-16/9\", \"aspect-4/3\", \"aspect-square\") */\n aspect?: string\n /** Additional CSS classes */\n className?: string\n}\n\nexport const Diff: React.FC<DiffProps> = ({\n left,\n right,\n aspect = 'aspect-16/9',\n className = '',\n}) => {\n return (\n <figure\n className={`diff ${aspect} ${className}`.trim()}\n tabIndex={0}\n >\n <div className=\"diff-item-1\" role=\"img\" tabIndex={0}>\n {left}\n </div>\n <div className=\"diff-item-2\" role=\"img\">\n {right}\n </div>\n <div className=\"diff-resizer\" />\n </figure>\n )\n}\n"],"names":["Diff","left","right","aspect","className","jsxs","jsx"],"mappings":";AAaO,MAAMA,IAA4B,CAAC;AAAA,EACxC,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,WAAAC,IAAY;AACd,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW,QAAQF,CAAM,IAAIC,CAAS,GAAG,KAAA;AAAA,IACzC,UAAU;AAAA,IAEV,UAAA;AAAA,MAAA,gBAAAE,EAAC,SAAI,WAAU,eAAc,MAAK,OAAM,UAAU,GAC/C,UAAAL,EAAA,CACH;AAAA,wBACC,OAAA,EAAI,WAAU,eAAc,MAAK,OAC/B,UAAAC,GACH;AAAA,MACA,gBAAAI,EAAC,OAAA,EAAI,WAAU,eAAA,CAAe;AAAA,IAAA;AAAA,EAAA;AAAA;"}
1
+ {"version":3,"file":"Diff.js","sources":["../../src/components/Diff.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface DiffProps {\n /** Left side content (revealed when dragging) */\n left: React.ReactNode\n /** Right side content (hidden when dragging) */\n right: React.ReactNode\n /** Aspect ratio class (e.g., \"aspect-16/9\", \"aspect-4/3\", \"aspect-square\") */\n aspect?: string\n /** Additional CSS classes */\n className?: string\n}\n\nexport const Diff: React.FC<DiffProps> = ({\n left,\n right,\n aspect = 'aspect-16/9',\n className = '',\n}) => {\n return (\n <figure\n className={`diff ${aspect} ${className}`.trim()}\n tabIndex={0}\n >\n <div className=\"diff-item-1\" role=\"img\" tabIndex={0}>\n {left}\n </div>\n <div className=\"diff-item-2\" role=\"img\">\n {right}\n </div>\n <div className=\"diff-resizer\" />\n </figure>\n )\n}\n"],"names":["Diff","left","right","aspect","className","jsxs","jsx"],"mappings":";AAaO,MAAMA,IAA4B,CAAC;AAAA,EACxC,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,WAAAC,IAAY;AACd,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW,QAAQF,CAAM,IAAIC,CAAS,GAAG,KAAA;AAAA,IACzC,UAAU;AAAA,IAEV,UAAA;AAAA,MAAA,gBAAAE,EAAC,SAAI,WAAU,eAAc,MAAK,OAAM,UAAU,GAC/C,UAAAL,EAAA,CACH;AAAA,wBACC,OAAA,EAAI,WAAU,eAAc,MAAK,OAC/B,UAAAC,GACH;AAAA,MACA,gBAAAI,EAAC,OAAA,EAAI,WAAU,eAAA,CAAe;AAAA,IAAA;AAAA,EAAA;AAAA;"}
@@ -32,4 +32,4 @@ function l({
32
32
  export {
33
33
  l as Divider
34
34
  };
35
- //# sourceMappingURL=index26.js.map
35
+ //# sourceMappingURL=Divider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Divider.js","sources":["../../src/components/Divider.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface DividerProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode\n orientation?: 'horizontal' | 'vertical'\n position?: 'start' | 'center' | 'end'\n type?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'info' | 'error'\n}\n\nexport function Divider({\n children,\n orientation = 'horizontal',\n position = 'center',\n type,\n className = '',\n ...rest\n}: DividerProps) {\n const positionClasses: Record<string, string> = {\n start: 'divider-start',\n center: '',\n end: 'divider-end',\n }\n\n const typeClasses: Record<string, string> = {\n neutral: 'divider-neutral',\n primary: 'divider-primary',\n secondary: 'divider-secondary',\n accent: 'divider-accent',\n success: 'divider-success',\n warning: 'divider-warning',\n info: 'divider-info',\n error: 'divider-error',\n }\n\n const classes = [\n 'divider',\n orientation === 'vertical' && 'divider-horizontal',\n positionClasses[position],\n type && typeClasses[type],\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n return <div className={classes} {...rest}>{children}</div>\n}\n"],"names":["Divider","children","orientation","position","type","className","rest","positionClasses","typeClasses","classes"],"mappings":";AASO,SAASA,EAAQ;AAAA,EACtB,UAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,UAAAC,IAAW;AAAA,EACX,MAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,GAAiB;AACf,QAAMC,IAA0C;AAAA,IAC9C,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,KAAK;AAAA,EAAA,GAGDC,IAAsC;AAAA,IAC1C,SAAS;AAAA,IACT,SAAS;AAAA,IACT,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,EAAA,GAGHC,IAAU;AAAA,IACd;AAAA,IACAP,MAAgB,cAAc;AAAA,IAC9BK,EAAgBJ,CAAQ;AAAA,IACxBC,KAAQI,EAAYJ,CAAI;AAAA,IACxBC;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,2BAAQ,OAAA,EAAI,WAAWI,GAAU,GAAGH,GAAO,UAAAL,GAAS;AACtD;"}
@@ -43,4 +43,4 @@ const D = Object.assign(v, {
43
43
  export {
44
44
  D as Dock
45
45
  };
46
- //# sourceMappingURL=index25.js.map
46
+ //# sourceMappingURL=Dock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index25.js","sources":["../src/components/Dock.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nexport interface DockItemConfig {\n /** Icon element */\n icon: React.ReactNode\n /** Label text */\n label?: string\n /** Whether this item is active */\n active?: boolean\n /** Whether this item is disabled */\n disabled?: boolean\n /** Click handler for this item */\n onClick?: () => void\n}\n\nexport interface DockProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {\n /** Dock items configuration */\n items?: DockItemConfig[]\n /** Size variant */\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n /** Controlled active index */\n activeIndex?: number\n /** Callback when an item is clicked */\n onChange?: (index: number) => void\n /** Children (alternative to items prop) */\n children?: React.ReactNode\n /** Additional CSS classes */\n className?: string\n}\n\nexport interface DockItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Whether this item is active */\n active?: boolean\n /** Children (icon and optional label) */\n children: React.ReactNode\n /** Additional CSS classes */\n className?: string\n}\n\nconst DockItem = forwardRef<HTMLButtonElement, DockItemProps>(\n ({ active, children, className = '', ...props }, ref) => {\n const classes = [active && 'dock-active', className].filter(Boolean).join(' ')\n\n return (\n <button ref={ref} className={classes || undefined} {...props}>\n {children}\n </button>\n )\n }\n)\n\nDockItem.displayName = 'Dock.Item'\n\nconst DockRoot = forwardRef<HTMLDivElement, DockProps>(\n ({ items, size, activeIndex, onChange, children, className = '', ...props }, ref) => {\n const sizeClasses = {\n xs: 'dock-xs',\n sm: 'dock-sm',\n md: 'dock-md',\n lg: 'dock-lg',\n xl: 'dock-xl',\n }\n\n const classes = ['dock', size && sizeClasses[size], className].filter(Boolean).join(' ')\n\n // If items array is provided, render from config\n if (items) {\n return (\n <div ref={ref} className={classes} {...props}>\n {items.map((item, index) => {\n const isActive = activeIndex !== undefined ? activeIndex === index : item.active\n\n return (\n <button\n key={index}\n className={isActive ? 'dock-active' : undefined}\n disabled={item.disabled}\n onClick={() => {\n item.onClick?.()\n onChange?.(index)\n }}\n >\n {item.icon}\n {item.label && <span className=\"dock-label\">{item.label}</span>}\n </button>\n )\n })}\n </div>\n )\n }\n\n // Otherwise render children\n return (\n <div ref={ref} className={classes} {...props}>\n {children}\n </div>\n )\n }\n)\n\nDockRoot.displayName = 'Dock'\n\nexport const Dock = Object.assign(DockRoot, {\n Item: DockItem,\n})\n"],"names":["DockItem","forwardRef","active","children","className","props","ref","classes","jsx","DockRoot","items","size","activeIndex","onChange","item","index","isActive","jsxs","Dock"],"mappings":";;AAuCA,MAAMA,IAAWC;AAAA,EACf,CAAC,EAAE,QA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C,GAAU,GAAGF,GACpC,UAAAF,GACH;AAAA,EAEJ;AACF;AAEAM,EAAS,cAAc;AAEhB,MAAMS,IAAO,OAAO,OAAOT,GAAU;AAAA,EAC1C,MAAMT;AACR,CAAC;"}
1
+ {"version":3,"file":"Dock.js","sources":["../../src/components/Dock.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nexport interface DockItemConfig {\n /** Icon element */\n icon: React.ReactNode\n /** Label text */\n label?: string\n /** Whether this item is active */\n active?: boolean\n /** Whether this item is disabled */\n disabled?: boolean\n /** Click handler for this item */\n onClick?: () => void\n}\n\nexport interface DockProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {\n /** Dock items configuration */\n items?: DockItemConfig[]\n /** Size variant */\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n /** Controlled active index */\n activeIndex?: number\n /** Callback when an item is clicked */\n onChange?: (index: number) => void\n /** Children (alternative to items prop) */\n children?: React.ReactNode\n /** Additional CSS classes */\n className?: string\n}\n\nexport interface DockItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Whether this item is active */\n active?: boolean\n /** Children (icon and optional label) */\n children: React.ReactNode\n /** Additional CSS classes */\n className?: string\n}\n\nconst DockItem = forwardRef<HTMLButtonElement, DockItemProps>(\n ({ active, children, className = '', ...props }, ref) => {\n const classes = [active && 'dock-active', className].filter(Boolean).join(' ')\n\n return (\n <button ref={ref} className={classes || undefined} {...props}>\n {children}\n </button>\n )\n }\n)\n\nDockItem.displayName = 'Dock.Item'\n\nconst DockRoot = forwardRef<HTMLDivElement, DockProps>(\n ({ items, size, activeIndex, onChange, children, className = '', ...props }, ref) => {\n const sizeClasses = {\n xs: 'dock-xs',\n sm: 'dock-sm',\n md: 'dock-md',\n lg: 'dock-lg',\n xl: 'dock-xl',\n }\n\n const classes = ['dock', size && sizeClasses[size], className].filter(Boolean).join(' ')\n\n // If items array is provided, render from config\n if (items) {\n return (\n <div ref={ref} className={classes} {...props}>\n {items.map((item, index) => {\n const isActive = activeIndex !== undefined ? activeIndex === index : item.active\n\n return (\n <button\n key={index}\n className={isActive ? 'dock-active' : undefined}\n disabled={item.disabled}\n onClick={() => {\n item.onClick?.()\n onChange?.(index)\n }}\n >\n {item.icon}\n {item.label && <span className=\"dock-label\">{item.label}</span>}\n </button>\n )\n })}\n </div>\n )\n }\n\n // Otherwise render children\n return (\n <div ref={ref} className={classes} {...props}>\n {children}\n </div>\n )\n }\n)\n\nDockRoot.displayName = 'Dock'\n\nexport const Dock = Object.assign(DockRoot, {\n Item: DockItem,\n})\n"],"names":["DockItem","forwardRef","active","children","className","props","ref","classes","jsx","DockRoot","items","size","activeIndex","onChange","item","index","isActive","jsxs","Dock"],"mappings":";;AAuCA,MAAMA,IAAWC;AAAA,EACf,CAAC,EAAE,QAAAC,GAAQ,UAAAC,GAAU,WAAAC,IAAY,IAAI,GAAGC,EAAA,GAASC,MAAQ;AACvD,UAAMC,IAAU,CAACL,KAAU,eAAeE,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE7E,WACE,gBAAAI,EAAC,YAAO,KAAAF,GAAU,WAAWC,KAAW,QAAY,GAAGF,GACpD,UAAAF,GACH;AAAA,EAEJ;AACF;AAEAH,EAAS,cAAc;AAEvB,MAAMS,IAAWR;AAAA,EACf,CAAC,EAAE,OAAAS,GAAO,MAAAC,GAAM,aAAAC,GAAa,UAAAC,GAAU,UAAAV,GAAU,WAAAC,IAAY,IAAI,GAAGC,EAAA,GAASC,MAAQ;AASnF,UAAMC,IAAU,CAAC,QAAQI,KARL;AAAA,MAClB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,EAGuCA,CAAI,GAAGP,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAGvF,WAAIM,IAEA,gBAAAF,EAAC,OAAA,EAAI,KAAAF,GAAU,WAAWC,GAAU,GAAGF,GACpC,UAAAK,EAAM,IAAI,CAACI,GAAMC,MAAU;AAC1B,YAAMC,IAAWJ,MAAgB,SAAYA,MAAgBG,IAAQD,EAAK;AAE1E,aACE,gBAAAG;AAAA,QAAC;AAAA,QAAA;AAAA,UAEC,WAAWD,IAAW,gBAAgB;AAAA,UACtC,UAAUF,EAAK;AAAA,UACf,SAAS,MAAM;AACb,YAAAA,EAAK,UAAA,GACLD,IAAWE,CAAK;AAAA,UAClB;AAAA,UAEC,UAAA;AAAA,YAAAD,EAAK;AAAA,YACLA,EAAK,SAAS,gBAAAN,EAAC,UAAK,WAAU,cAAc,YAAK,MAAA,CAAM;AAAA,UAAA;AAAA,QAAA;AAAA,QATnDO;AAAA,MAAA;AAAA,IAYX,CAAC,EAAA,CACH,sBAMD,OAAA,EAAI,KAAAT,GAAU,WAAWC,GAAU,GAAGF,GACpC,UAAAF,GACH;AAAA,EAEJ;AACF;AAEAM,EAAS,cAAc;AAEhB,MAAMS,IAAO,OAAO,OAAOT,GAAU;AAAA,EAC1C,MAAMT;AACR,CAAC;"}
@@ -172,4 +172,4 @@ function ee({
172
172
  export {
173
173
  ee as Drawer
174
174
  };
175
- //# sourceMappingURL=index27.js.map
175
+ //# sourceMappingURL=Drawer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Drawer.js","sources":["../../src/components/Drawer.tsx"],"sourcesContent":["import React, { useEffect, useRef, useId, useCallback, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nexport type DrawerPlacement = 'top' | 'right' | 'bottom' | 'left'\nexport type DrawerSize = 'default' | 'large' | number\n\nexport interface DrawerProps {\n /** Drawer content */\n children: React.ReactNode\n /** Whether the drawer is visible */\n open?: boolean\n /** Callback when drawer is closed */\n onClose?: () => void\n /** Drawer title */\n title?: React.ReactNode\n /** Direction drawer slides from */\n placement?: DrawerPlacement\n /** Preset size or custom width/height in pixels */\n size?: DrawerSize\n /** Custom width (overrides size for left/right placement) */\n width?: number | string\n /** Custom height (overrides size for top/bottom placement) */\n height?: number | string\n /** Whether to show close button */\n closable?: boolean\n /** Whether to show mask/backdrop */\n mask?: boolean\n /** Whether clicking mask closes drawer */\n maskClosable?: boolean\n /** Whether ESC closes drawer */\n keyboard?: boolean\n /** Footer content */\n footer?: React.ReactNode\n /** Extra content in header (right side) */\n extra?: React.ReactNode\n /** CSS class for drawer panel */\n className?: string\n /** CSS class for drawer wrapper */\n rootClassName?: string\n /** Style for drawer panel */\n style?: React.CSSProperties\n /** z-index of drawer */\n zIndex?: number\n /** Destroy content when closed */\n destroyOnClose?: boolean\n /** Where to place initial focus */\n initialFocus?: 'close' | 'content'\n}\n\n/**\n * Drawer - A panel that slides in from the edge of the screen.\n * Use for forms, details, or task panels.\n * For responsive sidebar navigation, use SidebarDrawer instead.\n */\nexport function Drawer({\n children,\n open = false,\n onClose,\n title,\n placement = 'right',\n size = 'default',\n width,\n height,\n closable = true,\n mask = true,\n maskClosable = true,\n keyboard = true,\n footer,\n extra,\n className = '',\n rootClassName = '',\n style,\n zIndex = 1000,\n destroyOnClose = false,\n initialFocus = 'close',\n}: DrawerProps) {\n const drawerRef = useRef<HTMLDivElement>(null)\n const closeButtonRef = useRef<HTMLButtonElement>(null)\n const contentRef = useRef<HTMLDivElement>(null)\n const previousActiveElement = useRef<HTMLElement | null>(null)\n const titleId = useId()\n const contentId = useId()\n const [mounted, setMounted] = useState(false)\n const [shouldRender, setShouldRender] = useState(open)\n\n // Handle SSR - only render portal after mounting in browser\n useEffect(() => {\n setMounted(true)\n }, [])\n\n // Calculate dimensions\n const getSizeValue = (): number => {\n if (typeof size === 'number') return size\n return size === 'large' ? 736 : 378\n }\n\n const getDimension = (): { width?: string; height?: string } => {\n const isHorizontal = placement === 'left' || placement === 'right'\n const sizeValue = getSizeValue()\n\n if (isHorizontal) {\n const w = width ?? sizeValue\n return { width: typeof w === 'number' ? `${w}px` : w }\n } else {\n const h = height ?? sizeValue\n return { height: typeof h === 'number' ? `${h}px` : h }\n }\n }\n\n // Focus trap\n const trapFocus = useCallback((e: KeyboardEvent) => {\n if (!drawerRef.current || e.key !== 'Tab' || typeof document === 'undefined') return\n\n const focusableElements = drawerRef.current.querySelectorAll<HTMLElement>(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n )\n const firstElement = focusableElements[0]\n const lastElement = focusableElements[focusableElements.length - 1]\n\n if (e.shiftKey && document.activeElement === firstElement) {\n e.preventDefault()\n lastElement?.focus()\n } else if (!e.shiftKey && document.activeElement === lastElement) {\n e.preventDefault()\n firstElement?.focus()\n }\n }, [])\n\n // Handle ESC key\n const handleKeyDown = useCallback((e: KeyboardEvent) => {\n if (keyboard && e.key === 'Escape' && onClose) {\n e.preventDefault()\n onClose()\n }\n }, [keyboard, onClose])\n\n // Open/close effects\n useEffect(() => {\n if (typeof document === 'undefined') return\n\n if (open) {\n setShouldRender(true)\n previousActiveElement.current = document.activeElement as HTMLElement\n document.body.style.overflow = 'hidden'\n\n // Set initial focus\n const focusTimeout = setTimeout(() => {\n if (initialFocus === 'close' && closeButtonRef.current) {\n closeButtonRef.current.focus()\n } else if (contentRef.current) {\n const firstFocusable = contentRef.current.querySelector<HTMLElement>(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n )\n firstFocusable?.focus()\n }\n }, 0)\n\n // Add event listeners\n document.addEventListener('keydown', handleKeyDown)\n document.addEventListener('keydown', trapFocus)\n\n return () => {\n clearTimeout(focusTimeout)\n document.body.style.overflow = ''\n document.removeEventListener('keydown', handleKeyDown)\n document.removeEventListener('keydown', trapFocus)\n }\n } else {\n // Restore focus to previously focused element if it's still in the DOM\n const prevElement = previousActiveElement.current\n if (prevElement && document.body.contains(prevElement)) {\n prevElement.focus()\n }\n\n // Handle destroyOnClose\n if (destroyOnClose) {\n const timeout = setTimeout(() => setShouldRender(false), 300)\n return () => clearTimeout(timeout)\n }\n }\n }, [open, handleKeyDown, trapFocus, destroyOnClose, initialFocus])\n\n const handleMaskClick = () => {\n if (maskClosable && onClose) {\n onClose()\n }\n }\n\n // Position classes\n const placementClasses: Record<DrawerPlacement, string> = {\n top: 'inset-x-0 top-0',\n right: 'inset-y-0 right-0',\n bottom: 'inset-x-0 bottom-0',\n left: 'inset-y-0 left-0',\n }\n\n // Transform for animation\n const getTransform = (isOpen: boolean): string => {\n if (isOpen) return 'translate(0, 0)'\n switch (placement) {\n case 'top': return 'translateY(-100%)'\n case 'right': return 'translateX(100%)'\n case 'bottom': return 'translateY(100%)'\n case 'left': return 'translateX(-100%)'\n }\n }\n\n const dimension = getDimension()\n\n const drawerContent = (\n <div\n className={`fixed inset-0 ${open ? '' : 'pointer-events-none'} ${rootClassName}`}\n style={{ zIndex }}\n role=\"presentation\"\n data-state={open ? 'open' : 'closed'}\n >\n {/* Backdrop/Mask */}\n {mask && (\n <div\n className={`absolute inset-0 bg-black transition-opacity duration-300 ${\n open ? 'opacity-50' : 'opacity-0'\n }`}\n onClick={handleMaskClick}\n aria-hidden=\"true\"\n />\n )}\n\n {/* Drawer Panel */}\n <div\n ref={drawerRef}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={title ? titleId : undefined}\n aria-describedby={contentId}\n className={`fixed flex flex-col bg-base-100 shadow-xl transition-transform duration-300 ease-in-out ${placementClasses[placement]} ${className}`}\n style={{\n ...dimension,\n transform: getTransform(open),\n ...style,\n }}\n >\n {/* Header */}\n {(title || closable || extra) && (\n <div className=\"flex items-center justify-between px-6 py-4 border-b border-base-300\">\n {title && (\n <h2 id={titleId} className=\"text-lg font-semibold\">\n {title}\n </h2>\n )}\n <div className=\"flex items-center gap-2 ml-auto\">\n {extra}\n {closable && (\n <button\n ref={closeButtonRef}\n type=\"button\"\n className=\"btn btn-ghost btn-sm btn-square\"\n onClick={onClose}\n aria-label=\"Close drawer\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"h-5 w-5\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n )}\n </div>\n </div>\n )}\n\n {/* Content */}\n <div\n ref={contentRef}\n id={contentId}\n className=\"flex-1 overflow-auto p-6\"\n >\n {children}\n </div>\n\n {/* Footer */}\n {footer && (\n <div className=\"px-6 py-4 border-t border-base-300\">\n {footer}\n </div>\n )}\n </div>\n </div>\n )\n\n // Don't render during SSR or when not needed\n if (!mounted || (!shouldRender && !open)) return null\n\n return createPortal(drawerContent, document.body)\n}\n"],"names":["Drawer","children","open","onClose","title","placement","size","width","height","closable","mask","maskClosable","keyboard","footer","extra","className","rootClassName","style","zIndex","destroyOnClose","initialFocus","drawerRef","useRef","closeButtonRef","contentRef","previousActiveElement","titleId","useId","contentId","mounted","setMounted","useState","shouldRender","setShouldRender","useEffect","getSizeValue","getDimension","isHorizontal","sizeValue","w","h","trapFocus","useCallback","focusableElements","firstElement","lastElement","handleKeyDown","focusTimeout","prevElement","timeout","handleMaskClick","placementClasses","getTransform","isOpen","dimension","drawerContent","jsxs","jsx","createPortal"],"mappings":";;;AAsDO,SAASA,GAAO;AAAA,EACrB,UAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,MAAAC,IAAO;AAAA,EACP,cAAAC,IAAe;AAAA,EACf,UAAAC,IAAW;AAAA,EACX,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,eAAAC,IAAgB;AAAA,EAChB,OAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,gBAAAC,IAAiB;AAAA,EACjB,cAAAC,IAAe;AACjB,GAAgB;AACd,QAAMC,IAAYC,EAAuB,IAAI,GACvCC,IAAiBD,EAA0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;AAAA,0BACC,OAAM;AAAA,0BACN,WAAU;AAAA,0BACV,MAAK;AAAA,0BACL,SAAQ;AAAA,0BACR,QAAO;AAAA,0BACP,eAAY;AAAA,0BAEZ,UAAA,gBAAAA;AAAA,4BAAC;AAAA,4BAAA;AAAA,8BACC,eAAc;AAAA,8BACd,gBAAe;AAAA,8BACf,aAAa;AAAA,8BACb,GAAE;AAAA,4BAAA;AAAA,0BAAA;AAAA,wBACJ;AAAA,sBAAA;AAAA,oBACF;AAAA,kBAAA;AAAA,gBACF,EAAA,CAEJ;AAAA,cAAA,GACF;AAAA,cAIF,gBAAAA;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,KAAKjC;AAAA,kBACL,IAAII;AAAA,kBACJ,WAAU;AAAA,kBAET,UAAA3B;AAAA,gBAAA;AAAA,cAAA;AAAA,cAIFY,KACC,gBAAA4C,EAAC,OAAA,EAAI,WAAU,sCACZ,UAAA5C,EAAA,CACH;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAAA;AAKJ,SAAI,CAACgB,KAAY,CAACG,KAAgB,CAAC9B,IAAc,OAE1CwD,EAAaH,GAAe,SAAS,IAAI;AAClD;"}
@@ -1,13 +1,13 @@
1
1
  import { jsxs as B, Fragment as ie, jsx as i } from "react/jsx-runtime";
2
2
  import D, { useId as q, useState as j, useRef as N, useCallback as R, useEffect as L, createContext as ue, useContext as de } from "react";
3
- const W = ue(void 0);
3
+ const _ = ue(void 0);
4
4
  function V() {
5
- const l = de(W);
5
+ const l = de(_);
6
6
  if (!l)
7
7
  throw new Error("Dropdown compound components must be used within Dropdown");
8
8
  return l;
9
9
  }
10
- function fe({
10
+ function pe({
11
11
  children: l,
12
12
  items: d,
13
13
  hover: b = !1,
@@ -16,8 +16,8 @@ function fe({
16
16
  align: u = "start",
17
17
  open: n,
18
18
  onOpenChange: r,
19
- disabled: f = !1,
20
- arrow: p = !1,
19
+ disabled: p = !1,
20
+ arrow: f = !1,
21
21
  mouseEnterDelay: m = 0.15,
22
22
  mouseLeaveDelay: c = 0.1,
23
23
  getPopupContainer: y,
@@ -25,16 +25,16 @@ function fe({
25
25
  className: k = "",
26
26
  ...S
27
27
  }) {
28
- const U = q(), v = q(), [e, I] = j(!1), [w, x] = j(-1), [T, P] = j(0), [Y, _] = j(!o), z = N(/* @__PURE__ */ new Map()), $ = N(null), C = N(null), M = b ? ["hover"] : h, F = n !== void 0, A = F ? n : e, g = R((t, E = "trigger") => {
29
- f || (F || I(t), t && _(!0), r?.(t, { source: E }));
30
- }, [f, F, r]), Z = R(() => {
28
+ const U = q(), v = q(), [e, I] = j(!1), [w, x] = j(-1), [T, P] = j(0), [Y, z] = j(!o), W = N(/* @__PURE__ */ new Map()), $ = N(null), C = N(null), M = b ? ["hover"] : h, F = n !== void 0, A = F ? n : e, g = R((t, E = "trigger") => {
29
+ p || (F || I(t), t && z(!0), r?.(t, { source: E }));
30
+ }, [p, F, r]), Z = R(() => {
31
31
  g(!1, "menu"), x(-1), document.getElementById(v)?.focus();
32
32
  }, [g, v]), H = R((t, E, a) => {
33
- E ? z.current.set(t, { ref: E, disabled: a }) : z.current.delete(t);
33
+ E ? W.current.set(t, { ref: E, disabled: a }) : W.current.delete(t);
34
34
  }, []);
35
35
  L(() => {
36
36
  if (o && !A) {
37
- const t = setTimeout(() => _(!1), 300);
37
+ const t = setTimeout(() => z(!1), 300);
38
38
  return () => clearTimeout(t);
39
39
  }
40
40
  }, [A, o]), L(() => {
@@ -67,7 +67,7 @@ function fe({
67
67
  start: "",
68
68
  center: "dropdown-center",
69
69
  end: "dropdown-end"
70
- }, se = typeof p == "boolean" ? p : !!p, ae = [
70
+ }, se = typeof f == "boolean" ? f : !!f, ae = [
71
71
  "dropdown",
72
72
  re[s],
73
73
  oe[u],
@@ -118,7 +118,7 @@ function fe({
118
118
  (Y || !o) && /* @__PURE__ */ i(J, { children: le() })
119
119
  ] }) : l;
120
120
  return /* @__PURE__ */ i(
121
- W.Provider,
121
+ _.Provider,
122
122
  {
123
123
  value: {
124
124
  position: s,
@@ -132,7 +132,7 @@ function fe({
132
132
  registerItem: H,
133
133
  itemCount: T,
134
134
  setItemCount: P,
135
- disabled: f,
135
+ disabled: p,
136
136
  arrow: se,
137
137
  closeDropdown: Z
138
138
  },
@@ -142,7 +142,7 @@ function fe({
142
142
  ref: $,
143
143
  className: ae,
144
144
  "data-state": A ? "open" : "closed",
145
- "aria-disabled": f || void 0,
145
+ "aria-disabled": p || void 0,
146
146
  onMouseEnter: ee,
147
147
  onMouseLeave: ne,
148
148
  onContextMenu: te,
@@ -154,7 +154,7 @@ function fe({
154
154
  );
155
155
  }
156
156
  function G({ children: l, className: d = "" }) {
157
- const { menuId: b, triggerId: h, isOpen: s, setIsOpen: u, setFocusedIndex: n, itemCount: r, disabled: f } = V(), p = (o) => {
157
+ const { menuId: b, triggerId: h, isOpen: s, setIsOpen: u, setFocusedIndex: n, itemCount: r, disabled: p } = V(), f = (o) => {
158
158
  switch (o.key) {
159
159
  case "Enter":
160
160
  case " ":
@@ -173,7 +173,7 @@ function G({ children: l, className: d = "" }) {
173
173
  }, c = D.Children.only(l), y = c.props;
174
174
  return D.cloneElement(c, {
175
175
  id: h,
176
- tabIndex: f ? -1 : 0,
176
+ tabIndex: p ? -1 : 0,
177
177
  "aria-haspopup": "menu",
178
178
  "aria-expanded": s,
179
179
  "aria-controls": b,
@@ -181,18 +181,18 @@ function G({ children: l, className: d = "" }) {
181
181
  m(), y.onClick?.(o);
182
182
  },
183
183
  onKeyDown: (o) => {
184
- p(o), y.onKeyDown?.(o);
184
+ f(o), y.onKeyDown?.(o);
185
185
  },
186
186
  className: `${y.className || ""} ${d}`.trim()
187
187
  });
188
188
  }
189
189
  function J({ children: l, className: d = "" }) {
190
- const { menuId: b, triggerId: h, isOpen: s, setIsOpen: u, focusedIndex: n, setFocusedIndex: r, setItemCount: f, arrow: p, position: m } = V(), c = N(null), y = D.Children.toArray(l).filter(
190
+ const { menuId: b, triggerId: h, isOpen: s, setIsOpen: u, focusedIndex: n, setFocusedIndex: r, setItemCount: p, arrow: f, position: m } = V(), c = N(null), y = D.Children.toArray(l).filter(
191
191
  (e) => D.isValidElement(e) && e.type === O
192
192
  );
193
193
  L(() => {
194
- f(y.length);
195
- }, [y.length, f]), L(() => {
194
+ p(y.length);
195
+ }, [y.length, p]), L(() => {
196
196
  s && n >= 0 && c.current && c.current.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')[n]?.focus();
197
197
  }, [s, n]);
198
198
  const o = (e) => {
@@ -227,7 +227,7 @@ function J({ children: l, className: d = "" }) {
227
227
  "z-50",
228
228
  "shadow",
229
229
  d
230
- ].filter(Boolean).join(" "), S = D.Children.map(l, (e, I) => D.isValidElement(e) && e.type === O ? D.cloneElement(e, { _index: I }) : e), v = p ? /* @__PURE__ */ i(
230
+ ].filter(Boolean).join(" "), S = D.Children.map(l, (e, I) => D.isValidElement(e) && e.type === O ? D.cloneElement(e, { _index: I }) : e), v = f ? /* @__PURE__ */ i(
231
231
  "span",
232
232
  {
233
233
  className: `absolute w-0 h-0 border-8 border-solid ${{
@@ -247,7 +247,7 @@ function J({ children: l, className: d = "" }) {
247
247
  role: "menu",
248
248
  "aria-labelledby": h,
249
249
  tabIndex: -1,
250
- className: `${k} ${p ? "relative" : ""}`,
250
+ className: `${k} ${f ? "relative" : ""}`,
251
251
  onKeyDown: o,
252
252
  children: [
253
253
  v,
@@ -265,10 +265,10 @@ function O({
265
265
  active: u = !1,
266
266
  disabled: n = !1,
267
267
  danger: r = !1,
268
- className: f = ""
268
+ className: p = ""
269
269
  }) {
270
- const { closeDropdown: p } = V(), m = [u && "active", n && "disabled", f].filter(Boolean).join(" "), c = () => {
271
- n || (s?.(), p());
270
+ const { closeDropdown: f } = V(), m = [u && "active", n && "disabled", p].filter(Boolean).join(" "), c = () => {
271
+ n || (s?.(), f());
272
272
  };
273
273
  return /* @__PURE__ */ i("li", { className: m, role: "none", "data-key": d, children: /* @__PURE__ */ B(
274
274
  "a",
@@ -296,7 +296,7 @@ function Q({
296
296
  disabled: s = !1,
297
297
  className: u = ""
298
298
  }) {
299
- const [n, r] = j(!1), f = N(null), p = N(null), m = N(null), c = q(), y = () => {
299
+ const [n, r] = j(!1), p = N(null), f = N(null), m = N(null), c = q(), y = () => {
300
300
  s || r(!0);
301
301
  }, o = () => {
302
302
  r(!1);
@@ -321,7 +321,7 @@ function Q({
321
321
  switch (e.key) {
322
322
  case "ArrowLeft":
323
323
  case "Escape":
324
- e.preventDefault(), e.stopPropagation(), r(!1), p.current?.focus();
324
+ e.preventDefault(), e.stopPropagation(), r(!1), f.current?.focus();
325
325
  break;
326
326
  case "ArrowDown":
327
327
  e.preventDefault(), e.stopPropagation();
@@ -344,7 +344,7 @@ function Q({
344
344
  return /* @__PURE__ */ i(
345
345
  "li",
346
346
  {
347
- ref: f,
347
+ ref: p,
348
348
  className: v,
349
349
  role: "none",
350
350
  "data-key": d,
@@ -354,7 +354,7 @@ function Q({
354
354
  /* @__PURE__ */ B(
355
355
  "summary",
356
356
  {
357
- ref: p,
357
+ ref: f,
358
358
  role: "menuitem",
359
359
  tabIndex: s ? -1 : 0,
360
360
  "aria-disabled": s || void 0,
@@ -388,7 +388,7 @@ function X({ className: l = "" }) {
388
388
  const d = ["border-base-content/10", l].filter(Boolean).join(" ");
389
389
  return /* @__PURE__ */ i("li", { role: "separator", className: "my-1", children: /* @__PURE__ */ i("hr", { className: d }) });
390
390
  }
391
- const be = Object.assign(fe, {
391
+ const be = Object.assign(pe, {
392
392
  Trigger: G,
393
393
  Menu: J,
394
394
  Item: O,
@@ -398,4 +398,4 @@ const be = Object.assign(fe, {
398
398
  export {
399
399
  be as Dropdown
400
400
  };
401
- //# sourceMappingURL=index40.js.map
401
+ //# sourceMappingURL=Dropdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dropdown.js","sources":["../../src/components/Dropdown.tsx"],"sourcesContent":["import React, { createContext, useContext, useId, useRef, useState, useCallback, useEffect } from 'react'\n\n// Types for data-driven items prop\nexport type DropdownTriggerType = 'click' | 'hover' | 'contextMenu'\n\nexport interface DropdownMenuItem {\n key: string\n label: React.ReactNode\n icon?: React.ReactNode\n disabled?: boolean\n danger?: boolean\n onClick?: () => void\n children?: DropdownMenuItem[] // For submenus\n}\n\nexport interface DropdownMenuDivider {\n type: 'divider'\n key?: string\n}\n\nexport type DropdownMenuItemType = DropdownMenuItem | DropdownMenuDivider\n\ninterface DropdownContextValue {\n position?: 'top' | 'bottom' | 'left' | 'right'\n align?: 'start' | 'center' | 'end'\n menuId: string\n triggerId: string\n isOpen: boolean\n setIsOpen: (open: boolean) => void\n focusedIndex: number\n setFocusedIndex: (index: number) => void\n registerItem: (index: number, ref: HTMLElement | null, disabled: boolean) => void\n itemCount: number\n setItemCount: (count: number) => void\n disabled: boolean\n arrow: boolean\n closeDropdown: () => void\n}\n\nconst DropdownContext = createContext<DropdownContextValue | undefined>(undefined)\n\nfunction useDropdownContext() {\n const context = useContext(DropdownContext)\n if (!context) {\n throw new Error('Dropdown compound components must be used within Dropdown')\n }\n return context\n}\n\nexport interface DropdownProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n /** Trigger element and dropdown content (compound pattern) */\n children?: React.ReactNode\n /** Menu items (data-driven pattern) */\n items?: DropdownMenuItemType[]\n /** @deprecated Use trigger={['hover']} instead */\n hover?: boolean\n /** Trigger mode(s) for dropdown */\n trigger?: DropdownTriggerType[]\n position?: 'top' | 'bottom' | 'left' | 'right'\n align?: 'start' | 'center' | 'end'\n /** Controlled open state */\n open?: boolean\n /** Callback when open state changes */\n onOpenChange?: (open: boolean, info?: { source: 'trigger' | 'menu' }) => void\n /** Disable the dropdown */\n disabled?: boolean\n /** Show arrow pointing to trigger */\n arrow?: boolean | { pointAtCenter?: boolean }\n /** Delay before showing dropdown on hover (seconds) */\n mouseEnterDelay?: number\n /** Delay before hiding dropdown on mouse leave (seconds) */\n mouseLeaveDelay?: number\n /** Container for the dropdown menu */\n getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement\n /** Destroy dropdown when hidden */\n destroyOnHidden?: boolean\n}\n\nexport interface DropdownTriggerProps {\n children: React.ReactNode\n className?: string\n}\n\nexport interface DropdownMenuProps {\n children?: React.ReactNode\n className?: string\n}\n\nexport interface DropdownItemProps {\n children?: React.ReactNode\n /** Unique key for the item */\n itemKey?: string\n /** Icon to display before label */\n icon?: React.ReactNode\n /** Item label (alternative to children) */\n label?: React.ReactNode\n onClick?: () => void\n active?: boolean\n disabled?: boolean\n danger?: boolean\n className?: string\n _index?: number // Internal prop passed by DropdownMenu\n}\n\nexport interface DropdownSubMenuProps {\n children: React.ReactNode\n /** Unique key for the submenu */\n itemKey?: string\n /** Submenu title/label */\n title: React.ReactNode\n /** Icon to display before title */\n icon?: React.ReactNode\n disabled?: boolean\n className?: string\n}\n\nexport interface DropdownDividerProps {\n className?: string\n}\n\nfunction DropdownRoot({\n children,\n items,\n hover = false,\n trigger = ['click'],\n position = 'bottom',\n align = 'start',\n open: controlledOpen,\n onOpenChange,\n disabled = false,\n arrow = false,\n mouseEnterDelay = 0.15,\n mouseLeaveDelay = 0.1,\n getPopupContainer,\n destroyOnHidden = false,\n className = '',\n ...rest\n}: DropdownProps) {\n const menuId = useId()\n const triggerId = useId()\n const [internalOpen, setInternalOpen] = useState(false)\n const [focusedIndex, setFocusedIndex] = useState(-1)\n const [itemCount, setItemCount] = useState(0)\n const [shouldRender, setShouldRender] = useState(!destroyOnHidden)\n const itemRefs = useRef<Map<number, { ref: HTMLElement | null; disabled: boolean }>>(new Map())\n const dropdownRef = useRef<HTMLDivElement>(null)\n const hoverTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n\n // Normalize trigger - support both hover boolean (deprecated) and trigger array\n const triggers = hover ? ['hover'] : trigger\n\n // Use controlled or uncontrolled open state\n const isControlled = controlledOpen !== undefined\n const isOpen = isControlled ? controlledOpen : internalOpen\n\n const setIsOpen = useCallback((open: boolean, source: 'trigger' | 'menu' = 'trigger') => {\n if (disabled) return\n if (!isControlled) {\n setInternalOpen(open)\n }\n if (open) {\n setShouldRender(true)\n }\n onOpenChange?.(open, { source })\n }, [disabled, isControlled, onOpenChange])\n\n const closeDropdown = useCallback(() => {\n setIsOpen(false, 'menu')\n setFocusedIndex(-1)\n document.getElementById(triggerId)?.focus()\n }, [setIsOpen, triggerId])\n\n const registerItem = useCallback((index: number, ref: HTMLElement | null, itemDisabled: boolean) => {\n if (ref) {\n itemRefs.current.set(index, { ref, disabled: itemDisabled })\n } else {\n itemRefs.current.delete(index)\n }\n }, [])\n\n // Handle destroyOnHidden\n useEffect(() => {\n if (destroyOnHidden && !isOpen) {\n const timeout = setTimeout(() => setShouldRender(false), 300)\n return () => clearTimeout(timeout)\n }\n }, [isOpen, destroyOnHidden])\n\n // Close dropdown when clicking outside\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(event.target as Node)) {\n setIsOpen(false, 'trigger')\n setFocusedIndex(-1)\n }\n }\n\n if (isOpen) {\n document.addEventListener('mousedown', handleClickOutside)\n return () => document.removeEventListener('mousedown', handleClickOutside)\n }\n }, [isOpen, setIsOpen])\n\n // Hover handlers with delay\n const handleMouseEnter = useCallback(() => {\n if (!triggers.includes('hover')) return\n if (hoverTimeoutRef.current) {\n clearTimeout(hoverTimeoutRef.current)\n }\n hoverTimeoutRef.current = setTimeout(() => {\n setIsOpen(true, 'trigger')\n }, mouseEnterDelay * 1000)\n }, [triggers, mouseEnterDelay, setIsOpen])\n\n const handleMouseLeave = useCallback(() => {\n if (!triggers.includes('hover')) return\n if (hoverTimeoutRef.current) {\n clearTimeout(hoverTimeoutRef.current)\n }\n hoverTimeoutRef.current = setTimeout(() => {\n setIsOpen(false, 'trigger')\n setFocusedIndex(-1)\n }, mouseLeaveDelay * 1000)\n }, [triggers, mouseLeaveDelay, setIsOpen])\n\n // Context menu handler\n const handleContextMenu = useCallback((event: React.MouseEvent) => {\n if (!triggers.includes('contextMenu')) return\n event.preventDefault()\n setIsOpen(true, 'trigger')\n }, [triggers, setIsOpen])\n\n // Cleanup timeout on unmount\n useEffect(() => {\n return () => {\n if (hoverTimeoutRef.current) {\n clearTimeout(hoverTimeoutRef.current)\n }\n }\n }, [])\n\n const positionClasses: Record<string, string> = {\n top: 'dropdown-top',\n bottom: 'dropdown-bottom',\n left: 'dropdown-left',\n right: 'dropdown-right',\n }\n\n const alignClasses: Record<string, string> = {\n start: '',\n center: 'dropdown-center',\n end: 'dropdown-end',\n }\n\n const showArrow = typeof arrow === 'boolean' ? arrow : !!arrow\n\n const dropdownClasses = [\n 'dropdown',\n positionClasses[position],\n alignClasses[align],\n triggers.includes('hover') && 'dropdown-hover',\n isOpen && 'dropdown-open',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n // Render items from data-driven prop\n const renderItems = () => {\n if (!items) return null\n return items.map((item, index) => {\n if ('type' in item && item.type === 'divider') {\n return <DropdownDivider key={item.key || `divider-${index}`} />\n }\n const menuItem = item as DropdownMenuItem\n if (menuItem.children && menuItem.children.length > 0) {\n return (\n <DropdownSubMenu\n key={menuItem.key}\n itemKey={menuItem.key}\n title={menuItem.label}\n icon={menuItem.icon}\n disabled={menuItem.disabled}\n >\n {menuItem.children.map((child) => (\n <DropdownItem\n key={child.key}\n itemKey={child.key}\n icon={child.icon}\n disabled={child.disabled}\n danger={child.danger}\n onClick={child.onClick}\n >\n {child.label}\n </DropdownItem>\n ))}\n </DropdownSubMenu>\n )\n }\n return (\n <DropdownItem\n key={menuItem.key}\n itemKey={menuItem.key}\n icon={menuItem.icon}\n disabled={menuItem.disabled}\n danger={menuItem.danger}\n onClick={menuItem.onClick}\n >\n {menuItem.label}\n </DropdownItem>\n )\n })\n }\n\n // Determine content - either compound children or items-generated menu\n const content = items ? (\n <>\n {React.Children.toArray(children).find(\n (child) => React.isValidElement(child) && child.type === DropdownTrigger\n )}\n {(shouldRender || !destroyOnHidden) && (\n <DropdownMenu>{renderItems()}</DropdownMenu>\n )}\n </>\n ) : (\n children\n )\n\n return (\n <DropdownContext.Provider\n value={{\n position,\n align,\n menuId,\n triggerId,\n isOpen,\n setIsOpen,\n focusedIndex,\n setFocusedIndex,\n registerItem,\n itemCount,\n setItemCount,\n disabled,\n arrow: showArrow,\n closeDropdown,\n }}\n >\n <div\n ref={dropdownRef}\n className={dropdownClasses}\n data-state={isOpen ? 'open' : 'closed'}\n aria-disabled={disabled || undefined}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onContextMenu={handleContextMenu}\n {...rest}\n >\n {content}\n </div>\n </DropdownContext.Provider>\n )\n}\n\nfunction DropdownTrigger({ children, className = '' }: DropdownTriggerProps) {\n const { menuId, triggerId, isOpen, setIsOpen, setFocusedIndex, itemCount, disabled } = useDropdownContext()\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n switch (event.key) {\n case 'Enter':\n case ' ':\n case 'ArrowDown':\n event.preventDefault()\n setIsOpen(true)\n setFocusedIndex(0)\n break\n case 'ArrowUp':\n event.preventDefault()\n setIsOpen(true)\n setFocusedIndex(itemCount - 1)\n break\n case 'Escape':\n event.preventDefault()\n setIsOpen(false)\n setFocusedIndex(-1)\n break\n }\n }\n\n const handleClick = () => {\n setIsOpen(!isOpen)\n if (!isOpen) {\n setFocusedIndex(0)\n }\n }\n\n // Clone the child element to add event handlers and ARIA attributes\n const child = React.Children.only(children) as React.ReactElement<\n React.HTMLAttributes<HTMLElement> & {\n onClick?: (e: React.MouseEvent) => void\n onKeyDown?: (e: React.KeyboardEvent) => void\n className?: string\n }\n >\n\n const childProps = child.props\n\n return React.cloneElement(child, {\n id: triggerId,\n tabIndex: disabled ? -1 : 0,\n 'aria-haspopup': 'menu' as const,\n 'aria-expanded': isOpen,\n 'aria-controls': menuId,\n onClick: (e: React.MouseEvent) => {\n handleClick()\n childProps.onClick?.(e)\n },\n onKeyDown: (e: React.KeyboardEvent) => {\n handleKeyDown(e)\n childProps.onKeyDown?.(e)\n },\n className: `${childProps.className || ''} ${className}`.trim(),\n })\n}\n\nfunction DropdownMenu({ children, className = '' }: DropdownMenuProps) {\n const { menuId, triggerId, isOpen, setIsOpen, focusedIndex, setFocusedIndex, setItemCount, arrow, position } = useDropdownContext()\n const menuRef = useRef<HTMLUListElement>(null)\n\n // Count children and set item count\n const childArray = React.Children.toArray(children).filter(\n (child) => React.isValidElement(child) && (child.type === DropdownItem)\n )\n\n useEffect(() => {\n setItemCount(childArray.length)\n }, [childArray.length, setItemCount])\n\n // Focus management\n useEffect(() => {\n if (isOpen && focusedIndex >= 0 && menuRef.current) {\n const items = menuRef.current.querySelectorAll('[role=\"menuitem\"]:not([aria-disabled=\"true\"])')\n const item = items[focusedIndex] as HTMLElement\n item?.focus()\n }\n }, [isOpen, focusedIndex])\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n const enabledItems = childArray.filter(\n (child) => React.isValidElement(child) && !(child.props as DropdownItemProps).disabled\n )\n const enabledCount = enabledItems.length\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault()\n setFocusedIndex((focusedIndex + 1) % enabledCount)\n break\n case 'ArrowUp':\n event.preventDefault()\n setFocusedIndex((focusedIndex - 1 + enabledCount) % enabledCount)\n break\n case 'Home':\n event.preventDefault()\n setFocusedIndex(0)\n break\n case 'End':\n event.preventDefault()\n setFocusedIndex(enabledCount - 1)\n break\n case 'Escape':\n event.preventDefault()\n setIsOpen(false)\n setFocusedIndex(-1)\n // Return focus to trigger\n document.getElementById(triggerId)?.focus()\n break\n case 'Tab':\n setIsOpen(false)\n setFocusedIndex(-1)\n break\n }\n }\n\n const menuClasses = [\n 'dropdown-content',\n 'menu',\n 'bg-base-100',\n 'rounded-box',\n 'z-50',\n 'shadow',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n // Clone children to pass index\n const childrenWithIndex = React.Children.map(children, (child, index) => {\n if (React.isValidElement(child) && child.type === DropdownItem) {\n return React.cloneElement(child as React.ReactElement<any>, { _index: index })\n }\n return child\n })\n\n // Arrow position classes based on menu position\n const arrowPositionClasses: Record<string, string> = {\n top: 'bottom-0 left-1/2 -translate-x-1/2 translate-y-full border-t-base-100 border-l-transparent border-r-transparent border-b-transparent',\n bottom: 'top-0 left-1/2 -translate-x-1/2 -translate-y-full border-b-base-100 border-l-transparent border-r-transparent border-t-transparent',\n left: 'right-0 top-1/2 -translate-y-1/2 translate-x-full border-l-base-100 border-t-transparent border-b-transparent border-r-transparent',\n right: 'left-0 top-1/2 -translate-y-1/2 -translate-x-full border-r-base-100 border-t-transparent border-b-transparent border-l-transparent',\n }\n\n const arrowElement = arrow ? (\n <span\n className={`absolute w-0 h-0 border-8 border-solid ${arrowPositionClasses[position || 'bottom']}`}\n aria-hidden=\"true\"\n />\n ) : null\n\n return (\n <ul\n ref={menuRef}\n id={menuId}\n role=\"menu\"\n aria-labelledby={triggerId}\n tabIndex={-1}\n className={`${menuClasses} ${arrow ? 'relative' : ''}`}\n onKeyDown={handleKeyDown}\n >\n {arrowElement}\n {childrenWithIndex}\n </ul>\n )\n}\n\nfunction DropdownItem({\n children,\n itemKey,\n icon,\n label,\n onClick,\n active = false,\n disabled = false,\n danger = false,\n className = '',\n}: DropdownItemProps) {\n const { closeDropdown } = useDropdownContext()\n const itemClasses = [active && 'active', disabled && 'disabled', className].filter(Boolean).join(' ')\n\n const handleClick = () => {\n if (!disabled) {\n onClick?.()\n closeDropdown()\n }\n }\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if ((event.key === 'Enter' || event.key === ' ') && !disabled) {\n event.preventDefault()\n handleClick()\n }\n }\n\n const content = label || children\n\n return (\n <li className={itemClasses} role=\"none\" data-key={itemKey}>\n <a\n role=\"menuitem\"\n tabIndex={disabled ? -1 : 0}\n aria-disabled={disabled || undefined}\n className={danger ? 'text-error' : ''}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n >\n {icon && <span className=\"mr-2 inline-flex items-center\">{icon}</span>}\n {content}\n </a>\n </li>\n )\n}\n\nfunction DropdownSubMenu({\n children,\n itemKey,\n title,\n icon,\n disabled = false,\n className = '',\n}: DropdownSubMenuProps) {\n const [isSubOpen, setIsSubOpen] = useState(false)\n const subMenuRef = useRef<HTMLLIElement>(null)\n const summaryRef = useRef<HTMLElement>(null)\n const subMenuListRef = useRef<HTMLUListElement>(null)\n const subMenuId = useId()\n\n const handleMouseEnter = () => {\n if (!disabled) setIsSubOpen(true)\n }\n\n const handleMouseLeave = () => {\n setIsSubOpen(false)\n }\n\n // Focus first item in submenu\n const focusFirstItem = () => {\n setTimeout(() => {\n const firstItem = subMenuListRef.current?.querySelector('[role=\"menuitem\"]:not([aria-disabled=\"true\"])') as HTMLElement\n firstItem?.focus()\n }, 0)\n }\n\n // Keyboard handler for summary (submenu trigger)\n const handleSummaryKeyDown = (event: React.KeyboardEvent) => {\n if (disabled) return\n\n switch (event.key) {\n case 'ArrowRight':\n case 'Enter':\n case ' ':\n event.preventDefault()\n event.stopPropagation()\n setIsSubOpen(true)\n focusFirstItem()\n break\n case 'ArrowLeft':\n case 'Escape':\n event.preventDefault()\n event.stopPropagation()\n setIsSubOpen(false)\n break\n }\n }\n\n // Keyboard handler for submenu items\n const handleSubMenuKeyDown = (event: React.KeyboardEvent) => {\n switch (event.key) {\n case 'ArrowLeft':\n case 'Escape':\n event.preventDefault()\n event.stopPropagation()\n setIsSubOpen(false)\n summaryRef.current?.focus()\n break\n case 'ArrowDown':\n event.preventDefault()\n event.stopPropagation()\n const items = subMenuListRef.current?.querySelectorAll('[role=\"menuitem\"]:not([aria-disabled=\"true\"])')\n if (items) {\n const currentIndex = Array.from(items).findIndex(item => item === document.activeElement)\n const nextIndex = (currentIndex + 1) % items.length\n ;(items[nextIndex] as HTMLElement)?.focus()\n }\n break\n case 'ArrowUp':\n event.preventDefault()\n event.stopPropagation()\n const itemsUp = subMenuListRef.current?.querySelectorAll('[role=\"menuitem\"]:not([aria-disabled=\"true\"])')\n if (itemsUp) {\n const currentIndexUp = Array.from(itemsUp).findIndex(item => item === document.activeElement)\n const prevIndex = (currentIndexUp - 1 + itemsUp.length) % itemsUp.length\n ;(itemsUp[prevIndex] as HTMLElement)?.focus()\n }\n break\n }\n }\n\n const itemClasses = [disabled && 'disabled', className].filter(Boolean).join(' ')\n\n return (\n <li\n ref={subMenuRef}\n className={itemClasses}\n role=\"none\"\n data-key={itemKey}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n <details open={isSubOpen}>\n <summary\n ref={summaryRef}\n role=\"menuitem\"\n tabIndex={disabled ? -1 : 0}\n aria-disabled={disabled || undefined}\n aria-haspopup=\"menu\"\n aria-expanded={isSubOpen}\n aria-controls={subMenuId}\n onKeyDown={handleSummaryKeyDown}\n >\n {icon && <span className=\"mr-2 inline-flex items-center\">{icon}</span>}\n {title}\n </summary>\n <ul\n ref={subMenuListRef}\n id={subMenuId}\n className=\"menu bg-base-100 rounded-box z-50 shadow\"\n role=\"menu\"\n aria-label={typeof title === 'string' ? title : undefined}\n onKeyDown={handleSubMenuKeyDown}\n >\n {children}\n </ul>\n </details>\n </li>\n )\n}\n\nfunction DropdownDivider({ className = '' }: DropdownDividerProps) {\n const classes = ['border-base-content/10', className].filter(Boolean).join(' ')\n return (\n <li role=\"separator\" className=\"my-1\">\n <hr className={classes} />\n </li>\n )\n}\n\nexport const Dropdown = Object.assign(DropdownRoot, {\n Trigger: DropdownTrigger,\n Menu: DropdownMenu,\n Item: DropdownItem,\n SubMenu: DropdownSubMenu,\n Divider: DropdownDivider,\n})\n"],"names":["DropdownContext","createContext","useDropdownContext","context","useContext","DropdownRoot","children","items","hover","trigger","position","align","controlledOpen","onOpenChange","disabled","arrow","mouseEnterDelay","mouseLeaveDelay","getPopupContainer","destroyOnHidden","className","rest","menuId","useId","triggerId","internalOpen","setInternalOpen","useState","focusedIndex","setFocusedIndex","itemCount","setItemCount","shouldRender","setShouldRender","itemRefs","useRef","dropdownRef","hoverTimeoutRef","triggers","isControlled","isOpen","setIsOpen","useCallback","open","source","closeDropdown","registerItem","index","ref","itemDisabled","useEffect","timeout","handleClickOutside","event","handleMouseEnter","handleMouseLeave","handleContextMenu","positionClasses","alignClasses","showArrow","dropdownClasses","renderItems","item","DropdownDivider","menuItem","jsx","DropdownSubMenu","child","DropdownItem","content","jsxs","Fragment","React","DropdownTrigger","DropdownMenu","handleKeyDown","handleClick","childProps","e","menuRef","childArray","enabledCount","menuClasses","childrenWithIndex","arrowElement","itemKey","icon","label","onClick","active","danger","itemClasses","title","isSubOpen","setIsSubOpen","subMenuRef","summaryRef","subMenuListRef","subMenuId","focusFirstItem","handleSummaryKeyDown","handleSubMenuKeyDown","nextIndex","itemsUp","prevIndex","classes","Dropdown"],"mappings":";;AAuCA,MAAMA,IAAkBC,GAAgD,MAAS;AAEjF,SAASC,IAAqB;AAC5B,QAAMC,IAAUC,GAAWJ,CAAe;AAC1C,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,2DAA2D;AAE7E,SAAOA;AACT;AAyEA,SAASE,GAAa;AAAA,EACpB,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,SAAAC,IAAU,CAAC,OAAO;AAAA,EAClB,UAAAC,IAAW;AAAA,EACX,OAAAC,IAAQ;AAAA,EACR,MAAMC;AAAA,EACN,cAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,OAAAC,IAAQ;AAAA,EACR,iBAAAC,IAAkB;AAAA,EAClB,iBAAAC,IAAkB;AAAA,EAClB,mBAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,GAAkB;AAChB,QAAMC,IAASC,EAAA,GACTC,IAAYD,EAAA,GACZ,CAACE,GAAcC,CAAe,IAAIC,EAAS,EAAK,GAChD,CAACC,GAAcC,CAAe,IAAIF,EAAS,EAAE,GAC7C,CAACG,GAAWC,CAAY,IAAIJ,EAAS,CAAC,GACtC,CAACK,GAAcC,CAAe,IAAIN,EAAS,CAACR,CAA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A;AAAA,cAAAd,KAAQ,gBAAArB,EAAC,QAAA,EAAK,WAAU,iCAAiC,UAAAqB,GAAK;AAAA,cAC9DM;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAEH,gBAAA3B;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,KAAKgC;AAAA,YACL,IAAIC;AAAA,YACJ,WAAU;AAAA,YACV,MAAK;AAAA,YACL,cAAY,OAAON,KAAU,WAAWA,IAAQ;AAAA,YAChD,WAAWS;AAAA,YAEV,UAAA/F;AAAA,UAAA;AAAA,QAAA;AAAA,MACH,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;AAEA,SAASyD,EAAgB,EAAE,WAAA3C,IAAY,MAA4B;AACjE,QAAMqF,IAAU,CAAC,0BAA0BrF,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAC9E,SACE,gBAAA6C,EAAC,MAAA,EAAG,MAAK,aAAY,WAAU,QAC7B,UAAA,gBAAAA,EAAC,MAAA,EAAG,WAAWwC,EAAA,CAAS,EAAA,CAC1B;AAEJ;AAEO,MAAMC,KAAW,OAAO,OAAOrG,IAAc;AAAA,EAClD,SAASoE;AAAA,EACT,MAAMC;AAAA,EACN,MAAMN;AAAA,EACN,SAASF;AAAA,EACT,SAASH;AACX,CAAC;"}
@@ -141,4 +141,4 @@ const y = Object.assign(r, {
141
141
  export {
142
142
  y as Empty
143
143
  };
144
- //# sourceMappingURL=index41.js.map
144
+ //# sourceMappingURL=Empty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Empty.js","sources":["../../src/components/Empty.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nexport interface EmptyProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Extra content like buttons or actions */\n children?: React.ReactNode\n /** Text or node to display as description */\n description?: React.ReactNode\n /** Custom image or icon; set to null to hide */\n image?: React.ReactNode\n /** Styling applied to the image container */\n imageStyle?: React.CSSProperties\n /** Test ID for the component */\n 'data-testid'?: string\n}\n\nconst DefaultEmptyImage: React.FC = () => (\n <svg\n width=\"184\"\n height=\"152\"\n viewBox=\"0 0 184 152\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"mx-auto\"\n aria-hidden=\"true\"\n >\n <g fill=\"none\" fillRule=\"evenodd\">\n <g transform=\"translate(24 31.67)\">\n <ellipse\n className=\"fill-base-300\"\n cx=\"67.797\"\n cy=\"106.89\"\n rx=\"67.797\"\n ry=\"12.668\"\n />\n <path\n className=\"fill-base-200\"\n d=\"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z\"\n />\n <path\n className=\"fill-base-100\"\n d=\"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z\"\n transform=\"translate(13.56)\"\n />\n <ellipse\n className=\"fill-base-300\"\n cx=\"67.797\"\n cy=\"106.89\"\n rx=\"67.797\"\n ry=\"12.668\"\n />\n <path\n className=\"fill-base-200\"\n d=\"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z\"\n />\n <path\n className=\"fill-base-content opacity-10\"\n d=\"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z\"\n />\n <path\n className=\"fill-base-100\"\n d=\"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z\"\n />\n </g>\n <path\n className=\"fill-base-content opacity-10\"\n d=\"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z\"\n />\n <g className=\"fill-base-100\" transform=\"translate(149.65 15.383)\">\n <ellipse cx=\"20.654\" cy=\"3.167\" rx=\"2.849\" ry=\"2.815\" />\n <path d=\"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z\" />\n </g>\n </g>\n </svg>\n)\n\n// Simple/minimal empty image (matches Ant Design's PRESENTED_IMAGE_SIMPLE)\nconst SimpleEmptyImage: React.FC = () => (\n <svg\n width=\"64\"\n height=\"41\"\n viewBox=\"0 0 64 41\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"mx-auto\"\n aria-hidden=\"true\"\n >\n <g transform=\"translate(0 1)\" fill=\"none\" fillRule=\"evenodd\">\n <ellipse className=\"fill-base-300\" cx=\"32\" cy=\"33\" rx=\"32\" ry=\"7\" />\n <g fillRule=\"nonzero\" className=\"stroke-base-content/20\">\n <path d=\"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z\" />\n <path\n d=\"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z\"\n className=\"fill-base-200\"\n />\n </g>\n </g>\n </svg>\n)\n\nconst EmptyRoot = forwardRef<HTMLDivElement, EmptyProps>(\n (\n {\n children,\n className = '',\n description = 'No Data',\n image,\n imageStyle,\n 'data-testid': testId = 'empty',\n ...rest\n },\n ref\n ) => {\n const classes = ['flex flex-col items-center justify-center py-8 px-4', className]\n .filter(Boolean)\n .join(' ')\n\n return (\n <div\n ref={ref}\n className={classes}\n role=\"status\"\n aria-label={typeof description === 'string' ? description : 'Empty'}\n data-testid={testId}\n {...rest}\n >\n {image !== null && (\n <div className=\"mb-2\" style={imageStyle} data-testid={`${testId}-image`}>\n {image === undefined ? <DefaultEmptyImage /> : image}\n </div>\n )}\n {description && (\n <div className=\"text-base-content/60 text-sm mb-4\" data-testid={`${testId}-description`}>\n {description}\n </div>\n )}\n {children && (\n <div className=\"mt-2\" data-testid={`${testId}-footer`}>\n {children}\n </div>\n )}\n </div>\n )\n }\n)\n\nEmptyRoot.displayName = 'Empty'\n\n// Export with static image constants (like Ant Design)\nexport const Empty = Object.assign(EmptyRoot, {\n PRESENTED_IMAGE_DEFAULT: <DefaultEmptyImage />,\n PRESENTED_IMAGE_SIMPLE: <SimpleEmptyImage />,\n})\n"],"names":["DefaultEmptyImage","jsx","jsxs","SimpleEmptyImage","EmptyRoot","forwardRef","children","className","description","image","imageStyle","testId","rest","ref","classes","Empty"],"mappings":";;AAeA,MAAMA,IAA8B,MAClC,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,OAAM;AAAA,IACN,WAAU;AAAA,IACV,eAAY;AAAA,IAEZ,UAAA,gBAAAC,EAAC,KAAA,EAAE,MAAK,QAAO,UAAS,WACtB,UAAA;AAAA,MAAA,gBAAAA,EAAC,KAAA,EAAE,WAAU,uBACX,UAAA;AA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F,MAAU,SAAY,gBAAAR,EAACD,GAAA,CAAA,CAAkB,IAAKS,GACjD;AAAA,UAEDD,uBACE,OAAA,EAAI,WAAU,qCAAoC,eAAa,GAAGG,CAAM,gBACtE,UAAAH,EAAA,CACH;AAAA,UAEDF,uBACE,OAAA,EAAI,WAAU,QAAO,eAAa,GAAGK,CAAM,WACzC,UAAAL,EAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEAF,EAAU,cAAc;AAGjB,MAAMW,IAAQ,OAAO,OAAOX,GAAW;AAAA,EAC5C,2CAA0BJ,GAAA,EAAkB;AAAA,EAC5C,0CAAyBG,GAAA,CAAA,CAAiB;AAC5C,CAAC;"}
@@ -17,4 +17,4 @@ const d = Object.assign(i, {
17
17
  export {
18
18
  d as Fieldset
19
19
  };
20
- //# sourceMappingURL=index29.js.map
20
+ //# sourceMappingURL=Fieldset.js.map