@nadicodeai/ui 0.4.1 → 0.5.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 (208) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +2 -2
  3. package/dist/components/accordion.d.ts +4 -15
  4. package/dist/components/accordion.d.ts.map +1 -1
  5. package/dist/components/accordion.js +5 -31
  6. package/dist/components/agent-message.js +1 -1
  7. package/dist/components/agent-tool-approval.d.ts.map +1 -1
  8. package/dist/components/agent-tool-approval.js +9 -6
  9. package/dist/components/ai-elements/artifact.js +1 -1
  10. package/dist/components/ai-elements/attachments.d.ts +1 -1
  11. package/dist/components/ai-elements/attachments.d.ts.map +1 -1
  12. package/dist/components/ai-elements/attachments.js +2 -2
  13. package/dist/components/ai-elements/audio-player.d.ts.map +1 -1
  14. package/dist/components/ai-elements/audio-player.js +8 -8
  15. package/dist/components/ai-elements/chain-of-thought.js +1 -1
  16. package/dist/components/ai-elements/checkpoint.d.ts +1 -1
  17. package/dist/components/ai-elements/checkpoint.d.ts.map +1 -1
  18. package/dist/components/ai-elements/checkpoint.js +1 -1
  19. package/dist/components/ai-elements/commit.d.ts.map +1 -1
  20. package/dist/components/ai-elements/commit.js +1 -1
  21. package/dist/components/ai-elements/context.d.ts +4 -4
  22. package/dist/components/ai-elements/context.d.ts.map +1 -1
  23. package/dist/components/ai-elements/context.js +4 -3
  24. package/dist/components/ai-elements/file-tree.d.ts.map +1 -1
  25. package/dist/components/ai-elements/file-tree.js +1 -1
  26. package/dist/components/ai-elements/inline-citation.d.ts.map +1 -1
  27. package/dist/components/ai-elements/inline-citation.js +2 -2
  28. package/dist/components/ai-elements/message.js +1 -1
  29. package/dist/components/ai-elements/mic-selector.d.ts.map +1 -1
  30. package/dist/components/ai-elements/mic-selector.js +1 -1
  31. package/dist/components/ai-elements/model-selector.d.ts +1 -1
  32. package/dist/components/ai-elements/model-selector.d.ts.map +1 -1
  33. package/dist/components/ai-elements/model-selector.js +1 -1
  34. package/dist/components/ai-elements/open-in-chat.d.ts.map +1 -1
  35. package/dist/components/ai-elements/open-in-chat.js +8 -5
  36. package/dist/components/ai-elements/plan.d.ts.map +1 -1
  37. package/dist/components/ai-elements/plan.js +3 -3
  38. package/dist/components/ai-elements/prompt-input.d.ts +2 -2
  39. package/dist/components/ai-elements/prompt-input.d.ts.map +1 -1
  40. package/dist/components/ai-elements/prompt-input.js +12 -12
  41. package/dist/components/ai-elements/queue.d.ts.map +1 -1
  42. package/dist/components/ai-elements/queue.js +2 -2
  43. package/dist/components/ai-elements/reasoning.js +1 -1
  44. package/dist/components/ai-elements/sandbox.js +3 -3
  45. package/dist/components/ai-elements/schema-display.js +4 -4
  46. package/dist/components/ai-elements/sources.js +1 -1
  47. package/dist/components/ai-elements/stack-trace.d.ts.map +1 -1
  48. package/dist/components/ai-elements/stack-trace.js +2 -2
  49. package/dist/components/ai-elements/task.d.ts.map +1 -1
  50. package/dist/components/ai-elements/task.js +3 -3
  51. package/dist/components/ai-elements/test-results.js +1 -1
  52. package/dist/components/ai-elements/tool.js +2 -2
  53. package/dist/components/ai-elements/voice-selector.d.ts +1 -1
  54. package/dist/components/ai-elements/voice-selector.d.ts.map +1 -1
  55. package/dist/components/ai-elements/voice-selector.js +1 -1
  56. package/dist/components/ai-elements/web-preview.d.ts.map +1 -1
  57. package/dist/components/ai-elements/web-preview.js +2 -2
  58. package/dist/components/alert-dialog.d.ts +1 -2
  59. package/dist/components/alert-dialog.d.ts.map +1 -1
  60. package/dist/components/alert-dialog.js +2 -3
  61. package/dist/components/alert.d.ts +2 -1
  62. package/dist/components/alert.d.ts.map +1 -1
  63. package/dist/components/alert.js +8 -5
  64. package/dist/components/aspect-ratio.d.ts.map +1 -1
  65. package/dist/components/aspect-ratio.js +0 -1
  66. package/dist/components/avatar.d.ts.map +1 -1
  67. package/dist/components/avatar.js +0 -1
  68. package/dist/components/badge.d.ts +2 -4
  69. package/dist/components/badge.d.ts.map +1 -1
  70. package/dist/components/badge.js +21 -13
  71. package/dist/components/breadcrumb.d.ts +3 -4
  72. package/dist/components/breadcrumb.d.ts.map +1 -1
  73. package/dist/components/breadcrumb.js +20 -12
  74. package/dist/components/button-group.d.ts +2 -3
  75. package/dist/components/button-group.d.ts.map +1 -1
  76. package/dist/components/button-group.js +17 -9
  77. package/dist/components/button.d.ts +1 -5
  78. package/dist/components/button.d.ts.map +1 -1
  79. package/dist/components/button.js +2 -8
  80. package/dist/components/calendar.d.ts +5 -3
  81. package/dist/components/calendar.d.ts.map +1 -1
  82. package/dist/components/calendar.js +17 -17
  83. package/dist/components/card.d.ts +3 -1
  84. package/dist/components/card.d.ts.map +1 -1
  85. package/dist/components/card.js +6 -6
  86. package/dist/components/carousel.d.ts +10 -1
  87. package/dist/components/carousel.d.ts.map +1 -1
  88. package/dist/components/carousel.js +10 -10
  89. package/dist/components/chart.d.ts.map +1 -1
  90. package/dist/components/chart.js +2 -3
  91. package/dist/components/collapsible.d.ts +3 -7
  92. package/dist/components/collapsible.d.ts.map +1 -1
  93. package/dist/components/collapsible.js +5 -16
  94. package/dist/components/combobox.d.ts +1 -1
  95. package/dist/components/combobox.d.ts.map +1 -1
  96. package/dist/components/combobox.js +10 -11
  97. package/dist/components/command.d.ts.map +1 -1
  98. package/dist/components/command.js +1 -1
  99. package/dist/components/context-menu.d.ts +4 -9
  100. package/dist/components/context-menu.d.ts.map +1 -1
  101. package/dist/components/context-menu.js +6 -16
  102. package/dist/components/dashboard-shell.d.ts +11 -2
  103. package/dist/components/dashboard-shell.d.ts.map +1 -1
  104. package/dist/components/dashboard-shell.js +73 -4
  105. package/dist/components/dialog.d.ts +2 -3
  106. package/dist/components/dialog.d.ts.map +1 -1
  107. package/dist/components/dialog.js +2 -4
  108. package/dist/components/direction.d.ts +1 -8
  109. package/dist/components/direction.d.ts.map +1 -1
  110. package/dist/components/direction.js +1 -7
  111. package/dist/components/drawer.d.ts +4 -13
  112. package/dist/components/drawer.d.ts.map +1 -1
  113. package/dist/components/drawer.js +5 -22
  114. package/dist/components/dropdown-menu.d.ts +4 -9
  115. package/dist/components/dropdown-menu.d.ts.map +1 -1
  116. package/dist/components/dropdown-menu.js +6 -17
  117. package/dist/components/empty.d.ts.map +1 -1
  118. package/dist/components/empty.js +5 -5
  119. package/dist/components/field.d.ts.map +1 -1
  120. package/dist/components/field.js +11 -19
  121. package/dist/components/form.d.ts +2 -2
  122. package/dist/components/form.d.ts.map +1 -1
  123. package/dist/components/form.js +17 -5
  124. package/dist/components/hover-card.d.ts +3 -8
  125. package/dist/components/hover-card.d.ts.map +1 -1
  126. package/dist/components/hover-card.js +4 -9
  127. package/dist/components/input-group.d.ts +3 -1
  128. package/dist/components/input-group.d.ts.map +1 -1
  129. package/dist/components/input-group.js +10 -16
  130. package/dist/components/input-otp.d.ts.map +1 -1
  131. package/dist/components/input-otp.js +5 -5
  132. package/dist/components/input.d.ts.map +1 -1
  133. package/dist/components/input.js +2 -1
  134. package/dist/components/item.d.ts +3 -4
  135. package/dist/components/item.d.ts.map +1 -1
  136. package/dist/components/item.js +29 -18
  137. package/dist/components/kbd.d.ts.map +1 -1
  138. package/dist/components/kbd.js +1 -1
  139. package/dist/components/label-system.d.ts +14 -0
  140. package/dist/components/label-system.d.ts.map +1 -0
  141. package/dist/components/label-system.js +16 -0
  142. package/dist/components/menubar.d.ts.map +1 -1
  143. package/dist/components/menubar.js +4 -1
  144. package/dist/components/native-select.d.ts +3 -2
  145. package/dist/components/native-select.d.ts.map +1 -1
  146. package/dist/components/native-select.js +2 -2
  147. package/dist/components/navigation-menu.d.ts +2 -9
  148. package/dist/components/navigation-menu.d.ts.map +1 -1
  149. package/dist/components/navigation-menu.js +4 -8
  150. package/dist/components/pagination.d.ts +8 -4
  151. package/dist/components/pagination.d.ts.map +1 -1
  152. package/dist/components/pagination.js +10 -13
  153. package/dist/components/popover.d.ts +3 -7
  154. package/dist/components/popover.d.ts.map +1 -1
  155. package/dist/components/popover.js +5 -30
  156. package/dist/components/radio-group.d.ts.map +1 -1
  157. package/dist/components/radio-group.js +0 -1
  158. package/dist/components/resizable.d.ts.map +1 -1
  159. package/dist/components/resizable.js +2 -2
  160. package/dist/components/scroll-area.d.ts.map +1 -1
  161. package/dist/components/scroll-area.js +0 -1
  162. package/dist/components/separator.d.ts.map +1 -1
  163. package/dist/components/separator.js +0 -1
  164. package/dist/components/sheet.d.ts +2 -3
  165. package/dist/components/sheet.d.ts.map +1 -1
  166. package/dist/components/sheet.js +2 -3
  167. package/dist/components/sidebar.d.ts +9 -15
  168. package/dist/components/sidebar.d.ts.map +1 -1
  169. package/dist/components/sidebar.js +85 -41
  170. package/dist/components/skeleton.js +1 -1
  171. package/dist/components/slider.d.ts.map +1 -1
  172. package/dist/components/slider.js +3 -8
  173. package/dist/components/sonner.d.ts +1 -1
  174. package/dist/components/sonner.d.ts.map +1 -1
  175. package/dist/components/sonner.js +15 -9
  176. package/dist/components/spinner.d.ts.map +1 -1
  177. package/dist/components/spinner.js +2 -2
  178. package/dist/components/switch.d.ts.map +1 -1
  179. package/dist/components/switch.js +0 -1
  180. package/dist/components/table.d.ts.map +1 -1
  181. package/dist/components/table.js +5 -5
  182. package/dist/components/tabs.d.ts.map +1 -1
  183. package/dist/components/tabs.js +0 -1
  184. package/dist/components/textarea.js +1 -1
  185. package/dist/components/theme-mode-switcher.js +4 -3
  186. package/dist/components/toggle-group.d.ts +3 -9
  187. package/dist/components/toggle-group.d.ts.map +1 -1
  188. package/dist/components/toggle-group.js +5 -22
  189. package/dist/components/toggle.d.ts +1 -2
  190. package/dist/components/toggle.d.ts.map +1 -1
  191. package/dist/components/toggle.js +2 -3
  192. package/dist/components/tooltip.d.ts +2 -5
  193. package/dist/components/tooltip.d.ts.map +1 -1
  194. package/dist/components/tooltip.js +4 -6
  195. package/dist/hooks/use-mobile.d.ts.map +1 -1
  196. package/dist/hooks/use-mobile.js +0 -1
  197. package/dist/index.d.ts +1 -0
  198. package/dist/index.d.ts.map +1 -1
  199. package/dist/index.js +1 -0
  200. package/dist/styles/globals.css +8 -0
  201. package/docs/migration/base-ui-migration.md +33 -9
  202. package/package.json +3 -2
  203. package/dist/lib/base-render.d.ts +0 -14
  204. package/dist/lib/base-render.d.ts.map +0 -1
  205. package/dist/lib/base-render.js +0 -16
  206. package/dist/lib/slot.d.ts +0 -8
  207. package/dist/lib/slot.d.ts.map +0 -1
  208. package/dist/lib/slot.js +0 -17
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../src/components/collapsible.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAEhF,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEvE,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,WAAW,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,qBAO9C;AAED,iBAAS,kBAAkB,CAAC,EAC1B,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,WAAW,CAAC,oBAAoB,CAAC,OAAO,CAAC,KAAK,CAAC,qBAkBjD;AAED,iBAAS,kBAAkB,CAAC,EAC1B,UAAU,EACV,GAAG,KAAK,EACT,EAAE,WAAW,CAAC,oBAAoB,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG;IACjD,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,qBAQA;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAA"}
1
+ {"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../src/components/collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAEhF,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,IAAI,CAAC,KAAK,+BAEjE;AAED,iBAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,OAAO,CAAC,KAAK,+BAI3E;AAED,iBAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,+BAIzE;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAA"}
@@ -1,23 +1,12 @@
1
- "use client";
2
1
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as React from "react";
4
2
  import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
5
- import { withAsChildRender } from "../lib/base-render.js";
6
3
  function Collapsible({ ...props }) {
7
- return (_jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...withAsChildRender(props) }));
4
+ return _jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
8
5
  }
9
- function CollapsibleTrigger({ asChild, children, nativeButton, ...props }) {
10
- const rendersLiteralNonButton = asChild &&
11
- React.isValidElement(children) &&
12
- typeof children.type === "string" &&
13
- children.type !== "button";
14
- return (_jsx(CollapsiblePrimitive.Trigger, { "data-slot": "collapsible-trigger", nativeButton: nativeButton ?? (rendersLiteralNonButton ? false : undefined), ...withAsChildRender({
15
- asChild,
16
- children,
17
- ...props,
18
- }) }));
6
+ function CollapsibleTrigger({ ...props }) {
7
+ return (_jsx(CollapsiblePrimitive.Trigger, { "data-slot": "collapsible-trigger", ...props }));
19
8
  }
20
- function CollapsibleContent({ forceMount, ...props }) {
21
- return (_jsx(CollapsiblePrimitive.Panel, { "data-slot": "collapsible-content", keepMounted: forceMount ?? props.keepMounted, ...withAsChildRender(props) }));
9
+ function CollapsibleContent({ ...props }) {
10
+ return (_jsx(CollapsiblePrimitive.Panel, { "data-slot": "collapsible-content", ...props }));
22
11
  }
23
12
  export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -19,7 +19,7 @@ declare function ComboboxChips({ className, ...props }: React.ComponentPropsWith
19
19
  declare function ComboboxChip({ className, children, showRemove, ...props }: ComboboxPrimitive.Chip.Props & {
20
20
  showRemove?: boolean;
21
21
  }): React.JSX.Element;
22
- declare function ComboboxChipsInput({ className, children, ...props }: ComboboxPrimitive.Input.Props): React.JSX.Element;
22
+ declare function ComboboxChipsInput({ className, ...props }: ComboboxPrimitive.Input.Props): React.JSX.Element;
23
23
  declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
24
24
  export { Combobox, ComboboxInput, ComboboxContent, ComboboxList, ComboboxItem, ComboboxGroup, ComboboxLabel, ComboboxCollection, ComboboxEmpty, ComboboxSeparator, ComboboxChips, ComboboxChip, ComboboxChipsInput, ComboboxTrigger, ComboboxValue, useComboboxAnchor, };
25
25
  //# sourceMappingURL=combobox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../src/components/combobox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAY9D,QAAA,MAAM,QAAQ,+BAAyB,CAAA;AAEvC,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,qBAEjE;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,OAAO,CAAC,KAAK,qBAcjC;AAeD,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,QAAgB,EAChB,WAAkB,EAClB,SAAiB,EACjB,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,GAAG;IACjC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,qBAyBA;AAED,iBAAS,eAAe,CA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iB,CAAC,IAAI,CAAC,KAAK,GAAG;IAChC,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,qBAsBA;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,qBAQ/B;AAED,iBAAS,iBAAiB,2CAEzB;AAED,OAAO,EACL,QAAQ,EACR,aAAa,EACb,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,iBAAiB,GAClB,CAAA"}
@@ -1,38 +1,37 @@
1
- "use client";
2
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
2
  import * as React from "react";
4
3
  import { Combobox as ComboboxPrimitive } from "@base-ui/react";
5
- import { CheckIcon, ChevronDownIcon, XIcon } from "lucide-react";
6
4
  import { cn } from "../lib/utils.js";
7
5
  import { Button } from "./button.js";
8
6
  import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, } from "./input-group.js";
7
+ import { ChevronDownIcon, XIcon, CheckIcon } from "lucide-react";
9
8
  const Combobox = ComboboxPrimitive.Root;
10
9
  function ComboboxValue({ ...props }) {
11
10
  return _jsx(ComboboxPrimitive.Value, { "data-slot": "combobox-value", ...props });
12
11
  }
13
12
  function ComboboxTrigger({ className, children, ...props }) {
14
- return (_jsxs(ComboboxPrimitive.Trigger, { "data-slot": "combobox-trigger", className: cn("[&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(ChevronDownIcon, { "data-slot": "combobox-trigger-icon", className: "pointer-events-none size-4 text-muted-foreground" })] }));
13
+ return (_jsxs(ComboboxPrimitive.Trigger, { "data-slot": "combobox-trigger", className: cn("[&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" })] }));
15
14
  }
16
15
  function ComboboxClear({ className, ...props }) {
17
16
  return (_jsx(ComboboxPrimitive.Clear, { "data-slot": "combobox-clear", render: _jsx(InputGroupButton, { variant: "ghost", size: "icon-xs" }), className: cn(className), ...props, children: _jsx(XIcon, { className: "pointer-events-none" }) }));
18
17
  }
19
18
  function ComboboxInput({ className, children, disabled = false, showTrigger = true, showClear = false, ...props }) {
20
- return (_jsxs(InputGroup, { className: cn("w-auto", className), children: [_jsx(ComboboxPrimitive.Input, { render: _jsx(InputGroupInput, { disabled: disabled }), ...props }), _jsxs(InputGroupAddon, { align: "inline-end", children: [showTrigger && (_jsx(InputGroupButton, { size: "icon-xs", variant: "ghost", asChild: true, "data-slot": "input-group-button", className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent", disabled: disabled, children: _jsx(ComboboxTrigger, {}) })), showClear && _jsx(ComboboxClear, { disabled: disabled })] }), children] }));
19
+ return (_jsxs(InputGroup, { className: cn("w-auto", className), children: [_jsx(ComboboxPrimitive.Input, { render: _jsx(InputGroupInput, { disabled: disabled }), ...props }), _jsxs(InputGroupAddon, { align: "inline-end", children: [showTrigger && (_jsx(InputGroupButton, { size: "icon-xs", variant: "ghost", render: _jsx(ComboboxTrigger, {}), "data-slot": "input-group-button", className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent", disabled: disabled })), showClear && _jsx(ComboboxClear, { disabled: disabled })] }), children] }));
21
20
  }
22
21
  function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, anchor, ...props }) {
23
- return (_jsx(ComboboxPrimitive.Portal, { children: _jsx(ComboboxPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, anchor: anchor, className: "isolate z-50", children: _jsx(ComboboxPrimitive.Popup, { "data-slot": "combobox-content", "data-chips": !!anchor, className: cn("group/combobox-content relative max-h-96 w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props }) }) }));
22
+ return (_jsx(ComboboxPrimitive.Portal, { children: _jsx(ComboboxPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, anchor: anchor, className: "isolate z-50", children: _jsx(ComboboxPrimitive.Popup, { "data-slot": "combobox-content", "data-chips": !!anchor, className: cn("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props }) }) }));
24
23
  }
25
24
  function ComboboxList({ className, ...props }) {
26
- return (_jsx(ComboboxPrimitive.List, { "data-slot": "combobox-list", className: cn("max-h-[min(calc(--spacing(96)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto p-1 data-empty:p-0", className), ...props }));
25
+ return (_jsx(ComboboxPrimitive.List, { "data-slot": "combobox-list", className: cn("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0", className), ...props }));
27
26
  }
28
27
  function ComboboxItem({ className, children, ...props }) {
29
- return (_jsxs(ComboboxPrimitive.Item, { "data-slot": "combobox-item", className: cn("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(ComboboxPrimitive.ItemIndicator, { "data-slot": "combobox-item-indicator", render: _jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }), children: _jsx(CheckIcon, { className: "pointer-events-none size-4 pointer-coarse:size-5" }) })] }));
28
+ return (_jsxs(ComboboxPrimitive.Item, { "data-slot": "combobox-item", className: cn("relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(ComboboxPrimitive.ItemIndicator, { render: _jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }), children: _jsx(CheckIcon, { className: "pointer-events-none" }) })] }));
30
29
  }
31
30
  function ComboboxGroup({ className, ...props }) {
32
31
  return (_jsx(ComboboxPrimitive.Group, { "data-slot": "combobox-group", className: cn(className), ...props }));
33
32
  }
34
33
  function ComboboxLabel({ className, ...props }) {
35
- return (_jsx(ComboboxPrimitive.GroupLabel, { "data-slot": "combobox-label", className: cn("px-2 py-1.5 text-xs text-muted-foreground pointer-coarse:px-3 pointer-coarse:py-2 pointer-coarse:text-sm", className), ...props }));
34
+ return (_jsx(ComboboxPrimitive.GroupLabel, { "data-slot": "combobox-label", className: cn("px-2 py-1.5 text-xs text-muted-foreground", className), ...props }));
36
35
  }
37
36
  function ComboboxCollection({ ...props }) {
38
37
  return (_jsx(ComboboxPrimitive.Collection, { "data-slot": "combobox-collection", ...props }));
@@ -44,12 +43,12 @@ function ComboboxSeparator({ className, ...props }) {
44
43
  return (_jsx(ComboboxPrimitive.Separator, { "data-slot": "combobox-separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
45
44
  }
46
45
  function ComboboxChips({ className, ...props }) {
47
- return (_jsx(ComboboxPrimitive.Chips, { "data-slot": "combobox-chips", className: cn("flex min-h-9 flex-wrap items-center gap-1.5 rounded-md border border-input bg-transparent bg-clip-padding px-2.5 py-1.5 text-sm shadow-xs transition-[color,box-shadow] focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-[3px] has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1.5", className), ...props }));
46
+ return (_jsx(ComboboxPrimitive.Chips, { "data-slot": "combobox-chips", className: cn("flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1", className), ...props }));
48
47
  }
49
48
  function ComboboxChip({ className, children, showRemove = true, ...props }) {
50
- return (_jsxs(ComboboxPrimitive.Chip, { "data-slot": "combobox-chip", className: cn("flex h-[calc(--spacing(5.5))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0", className), ...props, children: [children, showRemove && (_jsx(ComboboxPrimitive.ChipRemove, { render: _jsx(Button, { variant: "ghost", size: "icon-xs" }), className: "-ml-1 opacity-50 hover:opacity-100", "data-slot": "combobox-chip-remove", children: _jsx(XIcon, { className: "pointer-events-none" }) }))] }));
49
+ return (_jsxs(ComboboxPrimitive.Chip, { "data-slot": "combobox-chip", className: cn("flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0", className), ...props, children: [children, showRemove && (_jsx(ComboboxPrimitive.ChipRemove, { render: _jsx(Button, { variant: "ghost", size: "icon-xs" }), className: "-ml-1 opacity-50 hover:opacity-100", "data-slot": "combobox-chip-remove", children: _jsx(XIcon, { className: "pointer-events-none" }) }))] }));
51
50
  }
52
- function ComboboxChipsInput({ className, children, ...props }) {
51
+ function ComboboxChipsInput({ className, ...props }) {
53
52
  return (_jsx(ComboboxPrimitive.Input, { "data-slot": "combobox-chip-input", className: cn("min-w-16 flex-1 outline-none", className), ...props }));
54
53
  }
55
54
  function useComboboxAnchor() {
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/components/command.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,MAAM,CAAA;AAIlD,OAAO,EACL,MAAM,EAKP,MAAM,qBAAqB,CAAA;AAM5B,iBAAS,OAAO,CAAC,EACf,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CA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SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,qBAQrD;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,qBAWrD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,SAAS,CAAC,qBAQzD;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,qBAcpD;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW9B;AAED,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,gBAAgB,GACjB,CAAA"}
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Command as CommandPrimitive } from "cmdk";
4
- import { CheckIcon, SearchIcon } from "lucide-react";
5
4
  import { cn } from "../lib/utils.js";
6
5
  import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "./dialog.js";
7
6
  import { InputGroup, InputGroupAddon, } from "./input-group.js";
7
+ import { SearchIcon, CheckIcon } from "lucide-react";
8
8
  function Command({ className, ...props }) {
9
9
  return (_jsx(CommandPrimitive, { "data-slot": "command", className: cn("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground", className), ...props }));
10
10
  }
@@ -1,24 +1,19 @@
1
1
  import * as React from "react";
2
2
  import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
3
- import { type WithAsChild } from "../lib/base-render";
4
3
  declare function ContextMenu({ ...props }: ContextMenuPrimitive.Root.Props): React.JSX.Element;
5
4
  declare function ContextMenuPortal({ ...props }: ContextMenuPrimitive.Portal.Props): React.JSX.Element;
6
- declare function ContextMenuTrigger({ className, ...props }: WithAsChild<ContextMenuPrimitive.Trigger.Props>): React.JSX.Element;
5
+ declare function ContextMenuTrigger({ className, ...props }: ContextMenuPrimitive.Trigger.Props): React.JSX.Element;
7
6
  declare function ContextMenuContent({ className, align, alignOffset, side, sideOffset, ...props }: ContextMenuPrimitive.Popup.Props & Pick<ContextMenuPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React.JSX.Element;
8
7
  declare function ContextMenuGroup({ ...props }: ContextMenuPrimitive.Group.Props): React.JSX.Element;
9
8
  declare function ContextMenuLabel({ className, inset, ...props }: ContextMenuPrimitive.GroupLabel.Props & {
10
9
  inset?: boolean;
11
10
  }): React.JSX.Element;
12
- type ContextMenuSelectEventHandler = (event: Event) => void;
13
- type ContextMenuItemProps = WithAsChild<Omit<ContextMenuPrimitive.Item.Props, "onClick" | "onSelect">> & {
11
+ declare function ContextMenuItem({ className, inset, variant, ...props }: ContextMenuPrimitive.Item.Props & {
14
12
  inset?: boolean;
15
- onClick?: ContextMenuPrimitive.Item.Props["onClick"];
16
- onSelect?: ContextMenuSelectEventHandler;
17
13
  variant?: "default" | "destructive";
18
- };
19
- declare function ContextMenuItem({ className, inset, onClick, onSelect, variant, ...props }: ContextMenuItemProps): React.JSX.Element;
14
+ }): React.JSX.Element;
20
15
  declare function ContextMenuSub({ ...props }: ContextMenuPrimitive.SubmenuRoot.Props): React.JSX.Element;
21
- declare function ContextMenuSubTrigger({ className, inset, children, asChild, ...props }: WithAsChild<ContextMenuPrimitive.SubmenuTrigger.Props> & {
16
+ declare function ContextMenuSubTrigger({ className, inset, children, ...props }: ContextMenuPrimitive.SubmenuTrigger.Props & {
22
17
  inset?: boolean;
23
18
  }): React.JSX.Element;
24
19
  declare function ContextMenuSubContent({ ...props }: React.ComponentProps<typeof ContextMenuContent>): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../src/components/context-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAEjF,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAIvE,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,IAAI,CAAC,KAAK,qBAEjE;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,MAAM,CAAC,KAAK,qBAIzE;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,WAAW,CAAC,oBAAoB,CAAC,OAAO,CAAC,KAAK,CAAC,qBAQjD;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,KAAe,EACf,WAAe,EACf,IAAc,EACd,UAAc,EACd,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,GACjC,IAAI,CACF,oBAAoB,CAAC,UAAU,CAAC,KAAK,EACrC,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,YAAY,CAChD,qBAkBF;AAED,iBAAS,gBAAgB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,qBAIvE;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,UAAU,CAAC,KAAK,GAAG;IACzC,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,qBAYA;AAED,KAAK,6BAA6B,GAAG,CAAC,K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,EAC5B,SAAS,EACT,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,SAAS,CAAC,KAAK,GAAG;IACxC,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,qBAoBA;AAED,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,SAAS,CAAC,KAAK,qBAQtC;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW9B;AAED,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACtB,CAAA"}
1
+ {"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../src/components/context-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAKjF,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,IAAI,CAAC,KAAK,qBAEjE;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,MAAM,CAAC,KAAK,qBAIzE;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,OAAO,CAAC,KAAK,qBAQpC;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,KAAe,EACf,WAAe,EACf,IAAc,EACd,UAAc,EACd,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,KAAK,CAAC,KA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BAAoB,CAAC,UAAU,CAAC,KAAK,qBAOvC;AAED,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,SAAS,CAAC,KAAK,GAAG;IACxC,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,qBAoBA;AAED,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,SAAS,CAAC,KAAK,qBAQtC;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW9B;AAED,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACtB,CAAA"}
@@ -1,7 +1,6 @@
1
1
  "use client";
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
4
- import { withAsChildRender } from "../lib/base-render.js";
5
4
  import { cn } from "../lib/utils.js";
6
5
  import { ChevronRightIcon, CheckIcon } from "lucide-react";
7
6
  function ContextMenu({ ...props }) {
@@ -11,7 +10,7 @@ function ContextMenuPortal({ ...props }) {
11
10
  return (_jsx(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props }));
12
11
  }
13
12
  function ContextMenuTrigger({ className, ...props }) {
14
- return (_jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", className: cn("select-none", className), ...withAsChildRender(props) }));
13
+ return (_jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", className: cn("select-none", className), ...props }));
15
14
  }
16
15
  function ContextMenuContent({ className, align = "start", alignOffset = 4, side = "right", sideOffset = 0, ...props }) {
17
16
  return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, children: _jsx(ContextMenuPrimitive.Popup, { "data-slot": "context-menu-content", className: cn("z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props }) }) }));
@@ -22,23 +21,14 @@ function ContextMenuGroup({ ...props }) {
22
21
  function ContextMenuLabel({ className, inset, ...props }) {
23
22
  return (_jsx(ContextMenuPrimitive.GroupLabel, { "data-slot": "context-menu-label", "data-inset": inset, className: cn("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", className), ...props }));
24
23
  }
25
- function ContextMenuItem({ className, inset, onClick, onSelect, variant = "default", ...props }) {
26
- const handleClick = (event) => {
27
- onSelect?.(event.nativeEvent);
28
- if (event.nativeEvent.defaultPrevented) {
29
- event.preventBaseUIHandler?.();
30
- event.preventDefault();
31
- return;
32
- }
33
- onClick?.(event);
34
- };
35
- return (_jsx(ContextMenuPrimitive.Item, { "data-slot": "context-menu-item", "data-inset": inset, "data-variant": variant, className: cn("group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive", className), onClick: handleClick, ...withAsChildRender(props) }));
24
+ function ContextMenuItem({ className, inset, variant = "default", ...props }) {
25
+ return (_jsx(ContextMenuPrimitive.Item, { "data-slot": "context-menu-item", "data-inset": inset, "data-variant": variant, className: cn("group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive", className), ...props }));
36
26
  }
37
27
  function ContextMenuSub({ ...props }) {
38
28
  return (_jsx(ContextMenuPrimitive.SubmenuRoot, { "data-slot": "context-menu-sub", ...props }));
39
29
  }
40
- function ContextMenuSubTrigger({ className, inset, children, asChild, ...props }) {
41
- return (_jsx(ContextMenuPrimitive.SubmenuTrigger, { "data-slot": "context-menu-sub-trigger", "data-inset": inset, className: cn("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...withAsChildRender({ asChild, children, ...props }), children: !asChild && (_jsxs(_Fragment, { children: [children, _jsx(ChevronRightIcon, { className: "ml-auto" })] })) }));
30
+ function ContextMenuSubTrigger({ className, inset, children, ...props }) {
31
+ return (_jsxs(ContextMenuPrimitive.SubmenuTrigger, { "data-slot": "context-menu-sub-trigger", "data-inset": inset, className: cn("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto" })] }));
42
32
  }
43
33
  function ContextMenuSubContent({ ...props }) {
44
34
  return (_jsx(ContextMenuContent, { "data-slot": "context-menu-sub-content", className: "shadow-lg", side: "right", ...props }));
@@ -1,5 +1,13 @@
1
1
  import * as React from "react";
2
2
  import { Sidebar, SidebarProvider } from "./sidebar";
3
+ type DashboardShellSidebarResize = {
4
+ autoSaveId?: string;
5
+ cookieName?: string;
6
+ defaultSize?: number;
7
+ minSize?: number;
8
+ maxSize?: number;
9
+ contentMinSize?: number;
10
+ };
3
11
  type DashboardShellProps = Omit<React.ComponentProps<typeof SidebarProvider>, "children"> & {
4
12
  sidebar: React.ReactNode;
5
13
  header?: React.ReactNode;
@@ -17,8 +25,9 @@ type DashboardShellProps = Omit<React.ComponentProps<typeof SidebarProvider>, "c
17
25
  headerClassName?: string;
18
26
  contentClassName?: string;
19
27
  inspectorClassName?: string;
28
+ sidebarResize?: DashboardShellSidebarResize;
20
29
  };
21
- declare function DashboardShell({ sidebar, header, headerActions, inspector, children, sidebarHeader, sidebarFooter, sidebarSide, sidebarVariant, sidebarCollapsible, mobileNavigationLabel, contentLabel, inspectorLabel, className, headerClassName, contentClassName, inspectorClassName, ...props }: DashboardShellProps): React.JSX.Element;
30
+ declare function DashboardShell({ sidebar, header, headerActions, inspector, children, sidebarHeader, sidebarFooter, sidebarSide, sidebarVariant, sidebarCollapsible, mobileNavigationLabel, contentLabel, inspectorLabel, className, headerClassName, contentClassName, inspectorClassName, sidebarResize, ...props }: DashboardShellProps): React.JSX.Element;
22
31
  export { DashboardShell };
23
- export type { DashboardShellProps };
32
+ export type { DashboardShellProps, DashboardShellSidebarResize };
24
33
  //# sourceMappingURL=dashboard-shell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-shell.d.ts","sourceRoot":"","sources":["../../src/components/dashboard-shell.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EACL,OAAO,EAKP,eAAe,EAGhB,MAAM,sBAAsB,CAAA;AAE7B,KAAK,mBAAmB,GAAG,IAAI,CAC7B,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,EAC5C,UAAU,CACX,GAAG;IACF,OAAO,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,WAAW,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;IAC1D,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,SAAS,CAAC,CAAA;IAChE,kBAAkB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,aAAa,CAAC,CAAA;IACxE,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,kBAAkB,CAAC,EAAE,MAA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AAE,KAAK,CAAC,SAAS,CAAA;IAC/B,WAAW,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;IAC1D,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,SAAS,CAAC,CAAA;IAChE,kBAAkB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,aAAa,CAAC,CAAA;IACxE,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,aAAa,CAAC,EAAE,2BAA2B,CAAA;CAC5C,CAAA;AAqHD,iBAAS,cAAc,CAAC,EACtB,OAAO,EACP,MAAM,EACN,aAAa,EACb,SAAS,EACT,QAAQ,EACR,aAAa,EACb,aAAa,EACb,WAAoB,EACpB,cAA0B,EAC1B,kBAA2B,EAC3B,qBAAyC,EACzC,YAAkC,EAClC,cAA4B,EAC5B,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,GAAG,KAAK,EACT,EAAE,mBAAmB,qBA4LrB;AAED,OAAO,EAAE,cAAc,EAAE,CAAA;AACzB,YAAY,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,CAAA"}
@@ -1,8 +1,77 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { useIsMobile } from "../hooks/use-mobile.js";
3
5
  import { cn } from "../lib/utils.js";
4
- import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarInset, SidebarProvider, SidebarRail, SidebarTrigger, } from "./sidebar.js";
5
- function DashboardShell({ sidebar, header, headerActions, inspector, children, sidebarHeader, sidebarFooter, sidebarSide = "left", sidebarVariant = "sidebar", sidebarCollapsible = "icon", mobileNavigationLabel = "Open navigation", contentLabel = "Dashboard content", inspectorLabel = "Inspector", className, headerClassName, contentClassName, inspectorClassName, ...props }) {
6
- return (_jsxs(SidebarProvider, { "data-slot": "dashboard-shell", className: cn("min-h-svh bg-background", className), ...props, children: [_jsxs(Sidebar, { side: sidebarSide, variant: sidebarVariant, collapsible: sidebarCollapsible, children: [sidebarHeader && _jsx(SidebarHeader, { children: sidebarHeader }), _jsx(SidebarContent, { children: sidebar }), sidebarFooter && _jsx(SidebarFooter, { children: sidebarFooter }), _jsx(SidebarRail, {})] }), _jsxs(SidebarInset, { className: "min-w-0 overflow-hidden", children: [_jsxs("header", { "data-slot": "dashboard-shell-header", className: cn("flex h-14 shrink-0 items-center justify-between gap-3 border-b bg-background px-3 md:px-4", headerClassName), children: [_jsxs("div", { "data-slot": "dashboard-shell-header-content", className: "flex min-w-0 flex-1 items-center gap-2", children: [_jsx(SidebarTrigger, { "data-slot": "dashboard-shell-mobile-trigger", "aria-label": mobileNavigationLabel, className: "md:hidden" }), _jsx("div", { className: "min-w-0 flex-1", children: header })] }), headerActions && (_jsx("div", { "data-slot": "dashboard-shell-header-actions", className: "flex shrink-0 items-center gap-2", children: headerActions }))] }), _jsxs("div", { "data-slot": "dashboard-shell-body", className: "flex min-h-0 flex-1 flex-col lg:flex-row", children: [_jsx("main", { "data-slot": "dashboard-shell-content", "aria-label": contentLabel, className: cn("min-h-0 min-w-0 flex-1 overflow-auto p-4 md:p-6", contentClassName), children: children }), inspector && (_jsx("aside", { "data-slot": "dashboard-shell-inspector", "aria-label": inspectorLabel, className: cn("min-h-0 border-t bg-background lg:w-80 lg:border-t-0 lg:border-l", inspectorClassName), children: _jsx("div", { "data-slot": "dashboard-shell-inspector-content", className: "max-h-96 overflow-auto p-4 lg:h-full lg:max-h-none", children: inspector }) }))] })] })] }));
6
+ import { ResizableHandle, ResizablePanel, ResizablePanelGroup, } from "./resizable.js";
7
+ import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarInset, SidebarProvider, SidebarRail, SidebarTrigger, useSidebar, } from "./sidebar.js";
8
+ const oneYearInSeconds = 60 * 60 * 24 * 365;
9
+ function EmbeddedResizableSidebar({ children, collapsible, includeRail, side, variant, }) {
10
+ const { state } = useSidebar();
11
+ return (_jsxs("div", { className: "group peer relative h-full text-sidebar-foreground", "data-collapsible": state === "collapsed" ? collapsible : "", "data-side": side, "data-slot": "sidebar", "data-state": state, "data-variant": variant, children: [_jsx("div", { "data-side": side, "data-slot": "sidebar-container", className: "flex size-full text-sidebar-foreground", children: _jsx("div", { "data-sidebar": "sidebar", "data-slot": "sidebar-inner", className: "flex size-full flex-col bg-sidebar", children: children }) }), includeRail ? _jsx(SidebarRail, {}) : null] }));
12
+ }
13
+ function DashboardResizablePanelGroup({ bodySlot, contentPanelMinSize, handleLayoutChanged, resizableGroupId, sidebarCollapsible, sidebarPanelDefaultSize, sidebarPanelMaxSize, sidebarPanelMinSize, sidebarSlot, }) {
14
+ const { state } = useSidebar();
15
+ const sidebarPanelRef = React.useRef(null);
16
+ React.useEffect(() => {
17
+ if (sidebarCollapsible === "none") {
18
+ return;
19
+ }
20
+ if (state === "collapsed") {
21
+ sidebarPanelRef.current?.collapse();
22
+ return;
23
+ }
24
+ sidebarPanelRef.current?.expand();
25
+ }, [sidebarCollapsible, state]);
26
+ return (_jsxs(ResizablePanelGroup, { className: "min-h-svh", id: resizableGroupId, onLayoutChanged: (layout) => handleLayoutChanged(layout, state), orientation: "horizontal", children: [_jsx(ResizablePanel, { collapsedSize: "3rem", collapsible: sidebarCollapsible !== "none", defaultSize: `${sidebarPanelDefaultSize}%`, id: "dashboard-sidebar", maxSize: `${sidebarPanelMaxSize}%`, minSize: `${sidebarPanelMinSize}%`, panelRef: sidebarPanelRef, children: sidebarSlot(sidebarCollapsible, true, true) }), _jsx(ResizableHandle, { withHandle: true }), _jsx(ResizablePanel, { id: "dashboard-content", minSize: `${contentPanelMinSize}%`, children: bodySlot })] }));
27
+ }
28
+ function DashboardShell({ sidebar, header, headerActions, inspector, children, sidebarHeader, sidebarFooter, sidebarSide = "left", sidebarVariant = "sidebar", sidebarCollapsible = "icon", mobileNavigationLabel = "Open navigation", contentLabel = "Dashboard content", inspectorLabel = "Inspector", className, headerClassName, contentClassName, inspectorClassName, sidebarResize, ...props }) {
29
+ const isMobile = useIsMobile();
30
+ const [hasMeasuredViewport, setHasMeasuredViewport] = React.useState(false);
31
+ const sidebarWidthCookieTimeoutRef = React.useRef(undefined);
32
+ const { autoSaveId: sidebarPanelAutoSaveId, contentMinSize: contentPanelMinSize = 55, cookieName: sidebarPanelCookieName, defaultSize: sidebarPanelDefaultSize = 20, maxSize: sidebarPanelMaxSize = 28, minSize: sidebarPanelMinSize = 14, } = sidebarResize ?? {};
33
+ const resizableGroupId = sidebarPanelAutoSaveId ?? "dashboard-shell";
34
+ const resolvedSidebarPanelCookieName = sidebarPanelCookieName ??
35
+ (sidebarPanelAutoSaveId
36
+ ? `nadicodeai-dashboard-shell-${sidebarPanelAutoSaveId}`
37
+ : undefined);
38
+ React.useEffect(() => {
39
+ setHasMeasuredViewport(true);
40
+ return () => {
41
+ if (sidebarWidthCookieTimeoutRef.current) {
42
+ window.clearTimeout(sidebarWidthCookieTimeoutRef.current);
43
+ }
44
+ };
45
+ }, []);
46
+ const persistSidebarSize = React.useCallback((sidebarSize) => {
47
+ if (typeof window === "undefined") {
48
+ return;
49
+ }
50
+ if (!resolvedSidebarPanelCookieName) {
51
+ return;
52
+ }
53
+ if (sidebarWidthCookieTimeoutRef.current) {
54
+ window.clearTimeout(sidebarWidthCookieTimeoutRef.current);
55
+ }
56
+ sidebarWidthCookieTimeoutRef.current = window.setTimeout(() => {
57
+ window.document.cookie = `${resolvedSidebarPanelCookieName}=${encodeURIComponent(sidebarSize.toFixed(3))}; Path=/; Max-Age=${oneYearInSeconds}; SameSite=Lax`;
58
+ sidebarWidthCookieTimeoutRef.current = undefined;
59
+ }, 150);
60
+ }, [resolvedSidebarPanelCookieName]);
61
+ const handleLayoutChanged = React.useCallback((layout, sidebarState) => {
62
+ if (sidebarState !== "expanded") {
63
+ return;
64
+ }
65
+ const sidebarSize = layout["dashboard-sidebar"];
66
+ if (resolvedSidebarPanelCookieName &&
67
+ typeof sidebarSize === "number" &&
68
+ sidebarSize >= sidebarPanelMinSize) {
69
+ persistSidebarSize(sidebarSize);
70
+ }
71
+ }, [persistSidebarSize, resolvedSidebarPanelCookieName, sidebarPanelMinSize]);
72
+ const canResizeSidebar = !!sidebarResize && hasMeasuredViewport && !isMobile && sidebarSide === "left";
73
+ const sidebarSlot = (collapsible, includeRail, embedded = false) => (embedded ? (_jsxs(EmbeddedResizableSidebar, { collapsible: collapsible, includeRail: includeRail, side: sidebarSide, variant: sidebarVariant, children: [sidebarHeader && _jsx(SidebarHeader, { children: sidebarHeader }), _jsx(SidebarContent, { children: sidebar }), sidebarFooter && _jsx(SidebarFooter, { children: sidebarFooter })] })) : (_jsxs(Sidebar, { side: sidebarSide, variant: sidebarVariant, collapsible: collapsible, children: [sidebarHeader && _jsx(SidebarHeader, { children: sidebarHeader }), _jsx(SidebarContent, { children: sidebar }), sidebarFooter && _jsx(SidebarFooter, { children: sidebarFooter }), includeRail ? _jsx(SidebarRail, {}) : null] })));
74
+ const bodySlot = (_jsxs(SidebarInset, { className: "size-full min-w-0 overflow-hidden", children: [_jsxs("header", { "data-slot": "dashboard-shell-header", className: cn("flex h-14 shrink-0 items-center justify-between gap-3 border-b bg-background px-3 md:px-4", headerClassName), children: [_jsxs("div", { "data-slot": "dashboard-shell-header-content", className: "flex min-w-0 flex-1 items-center gap-2", children: [_jsx(SidebarTrigger, { "data-slot": "dashboard-shell-mobile-trigger", "aria-label": mobileNavigationLabel, className: "md:hidden" }), _jsx("div", { className: "min-w-0 flex-1", children: header })] }), headerActions && (_jsx("div", { "data-slot": "dashboard-shell-header-actions", className: "flex shrink-0 items-center gap-2", children: headerActions }))] }), _jsxs("div", { "data-slot": "dashboard-shell-body", className: "flex min-h-0 flex-1 flex-col lg:flex-row", children: [_jsx("main", { "data-slot": "dashboard-shell-content", "aria-label": contentLabel, className: cn("min-h-0 min-w-0 flex-1 overflow-auto p-4 md:p-6", contentClassName), children: children }), inspector && (_jsx("aside", { "data-slot": "dashboard-shell-inspector", "aria-label": inspectorLabel, className: cn("min-h-0 border-t bg-background lg:w-80 lg:border-t-0 lg:border-l", inspectorClassName), children: _jsx("div", { "data-slot": "dashboard-shell-inspector-content", className: "max-h-96 overflow-auto p-4 lg:h-full lg:max-h-none", children: inspector }) }))] })] }));
75
+ return (_jsx(SidebarProvider, { "data-slot": "dashboard-shell", className: cn("min-h-svh bg-background", className), ...props, children: canResizeSidebar ? (_jsx(DashboardResizablePanelGroup, { bodySlot: bodySlot, contentPanelMinSize: contentPanelMinSize, handleLayoutChanged: handleLayoutChanged, resizableGroupId: resizableGroupId, sidebarCollapsible: sidebarCollapsible, sidebarPanelDefaultSize: sidebarPanelDefaultSize, sidebarPanelMaxSize: sidebarPanelMaxSize, sidebarPanelMinSize: sidebarPanelMinSize, sidebarSlot: sidebarSlot })) : (_jsxs(_Fragment, { children: [sidebarSlot(sidebarCollapsible, true), bodySlot] })) }));
7
76
  }
8
77
  export { DashboardShell };
@@ -1,10 +1,9 @@
1
1
  import * as React from "react";
2
2
  import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
3
- import { type WithAsChild } from "../lib/base-render";
4
3
  declare function Dialog({ ...props }: DialogPrimitive.Root.Props): React.JSX.Element;
5
- declare function DialogTrigger({ ...props }: WithAsChild<DialogPrimitive.Trigger.Props>): React.JSX.Element;
4
+ declare function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props): React.JSX.Element;
6
5
  declare function DialogPortal({ ...props }: DialogPrimitive.Portal.Props): React.JSX.Element;
7
- declare function DialogClose({ ...props }: WithAsChild<DialogPrimitive.Close.Props>): React.JSX.Element;
6
+ declare function DialogClose({ ...props }: DialogPrimitive.Close.Props): React.JSX.Element;
8
7
  declare function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props): React.JSX.Element;
9
8
  declare function DialogContent({ className, children, showCloseButton, ...props }: DialogPrimitive.Popup.Props & {
10
9
  showCloseButton?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEjE,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAKvE,iBAAS,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,IAAI,CAAC,KAAK,qBAEvD;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,CAAC,eAAe,CAAC,OAAO,CAAC,KAAK,CAAC,qBAO9E;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,MAAM,CAAC,KAAK,qBAE/D;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,qBAO1E;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,QAAQ,CAAC,KAAK,qBAWhC;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,eAAsB,EACtB,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,GAAG;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,qBAgCA;AAED,iBAAS,YAAY,CAAC,EAAE,SA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e,CAAC,QAAQ,CAAC,KAAK,qBAWhC;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,eAAsB,EACtB,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,GAAG;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,qBAgCA;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQzE;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,eAAuB,EACvB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,qBAkBA;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBAWxE;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,WAAW,CAAC,KAAK,qBAWnC;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAA"}
@@ -1,7 +1,5 @@
1
- "use client";
2
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
2
  import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
4
- import { withAsChildRender } from "../lib/base-render.js";
5
3
  import { cn } from "../lib/utils.js";
6
4
  import { Button } from "./button.js";
7
5
  import { XIcon } from "lucide-react";
@@ -9,13 +7,13 @@ function Dialog({ ...props }) {
9
7
  return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
10
8
  }
11
9
  function DialogTrigger({ ...props }) {
12
- return (_jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...withAsChildRender(props) }));
10
+ return _jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
13
11
  }
14
12
  function DialogPortal({ ...props }) {
15
13
  return _jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
16
14
  }
17
15
  function DialogClose({ ...props }) {
18
- return (_jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...withAsChildRender(props) }));
16
+ return _jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
19
17
  }
20
18
  function DialogOverlay({ className, ...props }) {
21
19
  return (_jsx(DialogPrimitive.Backdrop, { "data-slot": "dialog-overlay", className: cn("fixed inset-0 isolate z-50 bg-foreground/50 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className), ...props }));
@@ -1,9 +1,2 @@
1
- import * as React from "react";
2
- import { type DirectionProviderProps as DirectionProviderPrimitiveProps, useDirection } from "@base-ui/react/direction-provider";
3
- type DirectionProviderProps = Omit<DirectionProviderPrimitiveProps, "direction"> & {
4
- direction?: DirectionProviderPrimitiveProps["direction"];
5
- dir?: DirectionProviderPrimitiveProps["direction"];
6
- };
7
- declare function DirectionProvider({ dir, direction, ...props }: DirectionProviderProps): React.JSX.Element;
8
- export { DirectionProvider, useDirection };
1
+ export { DirectionProvider, useDirection, } from "@base-ui/react/direction-provider";
9
2
  //# sourceMappingURL=direction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"direction.d.ts","sourceRoot":"","sources":["../../src/components/direction.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,sBAAsB,IAAI,+BAA+B,EAC9D,YAAY,EACb,MAAM,mCAAmC,CAAC;AAE3C,KAAK,sBAAsB,GAAG,IAAI,CAAC,+BAA+B,EAAE,WAAW,CAAC,GAAG;IACjF,SAAS,CAAC,EAAE,+BAA+B,CAAC,WAAW,CAAC,CAAC;IACzD,GAAG,CAAC,EAAE,+BAA+B,CAAC,WAAW,CAAC,CAAC;CACpD,CAAC;AAEF,iBAAS,iBAAiB,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,qBAQ9E;AAED,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"direction.d.ts","sourceRoot":"","sources":["../../src/components/direction.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,YAAY,GACb,MAAM,mCAAmC,CAAA"}
@@ -1,7 +1 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { DirectionProvider as DirectionProviderPrimitive, useDirection, } from "@base-ui/react/direction-provider";
4
- function DirectionProvider({ dir, direction, ...props }) {
5
- return (_jsx(DirectionProviderPrimitive, { "data-slot": "direction-provider", direction: direction ?? dir, ...props }));
6
- }
7
- export { DirectionProvider, useDirection };
1
+ export { DirectionProvider, useDirection, } from "@base-ui/react/direction-provider";
@@ -1,20 +1,11 @@
1
1
  import * as React from "react";
2
2
  import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
3
- import { type WithAsChild } from "../lib/base-render";
4
- type DrawerDirection = "top" | "right" | "bottom" | "left";
5
- type DrawerProps = Omit<DrawerPrimitive.Root.Props, "onSnapPointChange" | "snapPoint" | "swipeDirection"> & {
6
- activeSnapPoint?: DrawerPrimitive.Root.Props["snapPoint"];
7
- direction?: DrawerDirection;
8
- onSnapPointChange?: DrawerPrimitive.Root.Props["onSnapPointChange"];
9
- setActiveSnapPoint?: DrawerPrimitive.Root.Props["onSnapPointChange"];
3
+ declare function Drawer({ modal, showSwipeHandle, snapPoints, swipeDirection, ...props }: DrawerPrimitive.Root.Props & {
10
4
  showSwipeHandle?: boolean;
11
- snapPoint?: DrawerPrimitive.Root.Props["snapPoint"];
12
- swipeDirection?: DrawerPrimitive.Root.Props["swipeDirection"];
13
- };
14
- declare function Drawer({ activeSnapPoint, direction, modal, onSnapPointChange, setActiveSnapPoint, showSwipeHandle, snapPoints, snapPoint, swipeDirection, ...props }: DrawerProps): React.JSX.Element;
15
- declare function DrawerTrigger({ ...props }: WithAsChild<DrawerPrimitive.Trigger.Props>): React.JSX.Element;
5
+ }): React.JSX.Element;
6
+ declare function DrawerTrigger({ ...props }: DrawerPrimitive.Trigger.Props): React.JSX.Element;
16
7
  declare function DrawerPortal({ ...props }: DrawerPrimitive.Portal.Props): React.JSX.Element;
17
- declare function DrawerClose({ ...props }: WithAsChild<DrawerPrimitive.Close.Props>): React.JSX.Element;
8
+ declare function DrawerClose({ ...props }: DrawerPrimitive.Close.Props): React.JSX.Element;
18
9
  declare function DrawerOverlay({ className, ...props }: DrawerPrimitive.Backdrop.Props): React.JSX.Element;
19
10
  declare function DrawerSwipeHandle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
20
11
  declare function DrawerContent({ className, children, ...props }: DrawerPrimitive.Popup.Props): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/components/drawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEjE,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAUvE,KAAK,eAAe,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;AAY1D,KAAK,WAAW,GAAG,IAAI,CACrB,eAAe,CAAC,IAAI,CAAC,KAAK,EAC1B,mBAAmB,GAAG,WAAW,GAAG,gBAAgB,CACrD,GAAG;IACF,eAAe,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;IACzD,SAAS,CAAC,EAAE,eAAe,CAAA;IAC3B,iBAAiB,CAAC,EAAE,eAAe,C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eAAe,CAAC,QAAQ,CAAC,KAAK,qBAWhC;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAY7B;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBA6D7B;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWzE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQzE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBAWxE;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,WAAW,CAAC,KAAK,qBAQnC;AAED,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAA"}
@@ -2,14 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
5
- import { withAsChildRender } from "../lib/base-render.js";
6
5
  import { cn } from "../lib/utils.js";
7
- const drawerDirectionToSwipeDirection = {
8
- bottom: "down",
9
- left: "left",
10
- right: "right",
11
- top: "up",
12
- };
13
6
  const DrawerContext = React.createContext(null);
14
7
  function useDrawer() {
15
8
  const context = React.useContext(DrawerContext);
@@ -18,29 +11,19 @@ function useDrawer() {
18
11
  }
19
12
  return context;
20
13
  }
21
- function Drawer({ activeSnapPoint, direction, modal = true, onSnapPointChange, setActiveSnapPoint, showSwipeHandle = false, snapPoints, snapPoint, swipeDirection = "down", ...props }) {
22
- const resolvedSnapPoint = snapPoint ?? activeSnapPoint;
23
- const resolvedSwipeDirection = direction
24
- ? drawerDirectionToSwipeDirection[direction]
25
- : swipeDirection;
26
- const handleSnapPointChange = onSnapPointChange ?? setActiveSnapPoint;
14
+ function Drawer({ modal = true, showSwipeHandle = false, snapPoints, swipeDirection = "down", ...props }) {
27
15
  const hasSnapPoints = snapPoints != null && snapPoints.length > 0;
28
- const contextValue = React.useMemo(() => ({
29
- hasSnapPoints,
30
- modal,
31
- showSwipeHandle,
32
- swipeDirection: resolvedSwipeDirection,
33
- }), [hasSnapPoints, modal, resolvedSwipeDirection, showSwipeHandle]);
34
- return (_jsx(DrawerContext.Provider, { value: contextValue, children: _jsx(DrawerPrimitive.Root, { "data-slot": "drawer", modal: modal, onSnapPointChange: handleSnapPointChange, snapPoint: resolvedSnapPoint, snapPoints: snapPoints, swipeDirection: resolvedSwipeDirection, ...props }) }));
16
+ const contextValue = React.useMemo(() => ({ hasSnapPoints, modal, showSwipeHandle, swipeDirection }), [hasSnapPoints, modal, showSwipeHandle, swipeDirection]);
17
+ return (_jsx(DrawerContext.Provider, { value: contextValue, children: _jsx(DrawerPrimitive.Root, { "data-slot": "drawer", modal: modal, snapPoints: snapPoints, swipeDirection: swipeDirection, ...props }) }));
35
18
  }
36
19
  function DrawerTrigger({ ...props }) {
37
- return (_jsx(DrawerPrimitive.Trigger, { "data-slot": "drawer-trigger", ...withAsChildRender(props) }));
20
+ return _jsx(DrawerPrimitive.Trigger, { "data-slot": "drawer-trigger", ...props });
38
21
  }
39
22
  function DrawerPortal({ ...props }) {
40
23
  return _jsx(DrawerPrimitive.Portal, { "data-slot": "drawer-portal", ...props });
41
24
  }
42
25
  function DrawerClose({ ...props }) {
43
- return (_jsx(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...withAsChildRender(props) }));
26
+ return _jsx(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...props });
44
27
  }
45
28
  function DrawerOverlay({ className, ...props }) {
46
29
  return (_jsx(DrawerPrimitive.Backdrop, { "data-slot": "drawer-overlay", className: cn("fixed inset-0 z-50 min-h-dvh bg-foreground/50 opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] select-none data-ending-style:pointer-events-none data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-snap-points:[--drawer-overlay-min-opacity:0.5] data-starting-style:opacity-0 data-swiping:duration-0 supports-backdrop-filter:backdrop-blur-xs supports-[-webkit-touch-callout:none]:absolute", className), ...props }));
@@ -1,24 +1,19 @@
1
1
  import * as React from "react";
2
2
  import { Menu as MenuPrimitive } from "@base-ui/react/menu";
3
- import { type WithAsChild } from "../lib/base-render";
4
3
  declare function DropdownMenu({ ...props }: MenuPrimitive.Root.Props): React.JSX.Element;
5
4
  declare function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props): React.JSX.Element;
6
- declare function DropdownMenuTrigger({ ...props }: WithAsChild<MenuPrimitive.Trigger.Props>): React.JSX.Element;
5
+ declare function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props): React.JSX.Element;
7
6
  declare function DropdownMenuContent({ align, alignOffset, side, sideOffset, className, ...props }: MenuPrimitive.Popup.Props & Pick<MenuPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React.JSX.Element;
8
7
  declare function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props): React.JSX.Element;
9
8
  declare function DropdownMenuLabel({ className, inset, ...props }: MenuPrimitive.GroupLabel.Props & {
10
9
  inset?: boolean;
11
10
  }): React.JSX.Element;
12
- type DropdownMenuSelectEventHandler = (event: Event) => void;
13
- type DropdownMenuItemProps = WithAsChild<Omit<MenuPrimitive.Item.Props, "onClick" | "onSelect">> & {
11
+ declare function DropdownMenuItem({ className, inset, variant, ...props }: MenuPrimitive.Item.Props & {
14
12
  inset?: boolean;
15
- onClick?: MenuPrimitive.Item.Props["onClick"];
16
- onSelect?: DropdownMenuSelectEventHandler;
17
13
  variant?: "default" | "destructive";
18
- };
19
- declare function DropdownMenuItem({ className, inset, onClick, onSelect, variant, ...props }: DropdownMenuItemProps): React.JSX.Element;
14
+ }): React.JSX.Element;
20
15
  declare function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props): React.JSX.Element;
21
- declare function DropdownMenuSubTrigger({ className, inset, children, asChild, ...props }: WithAsChild<MenuPrimitive.SubmenuTrigger.Props> & {
16
+ declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: MenuPrimitive.SubmenuTrigger.Props & {
22
17
  inset?: boolean;
23
18
  }): React.JSX.Element;
24
19
  declare function DropdownMenuSubContent({ align, alignOffset, side, sideOffset, className, ...props }: React.ComponentProps<typeof DropdownMenuContent>): React.JSX.Element;