@loccal/ui 0.0.0-stage → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/LICENSE +21 -0
  3. package/README.md +38 -3
  4. package/dist/components/ui/accordion.d.ts +6 -0
  5. package/dist/components/ui/accordion.js +17 -0
  6. package/dist/components/ui/ai-panel.d.ts +47 -0
  7. package/dist/components/ui/ai-panel.js +74 -0
  8. package/dist/components/ui/alert-dialog.d.ts +18 -0
  9. package/dist/components/ui/alert-dialog.js +42 -0
  10. package/dist/components/ui/alert.d.ts +10 -0
  11. package/dist/components/ui/alert.js +27 -0
  12. package/dist/components/ui/avatar.d.ts +11 -0
  13. package/dist/components/ui/avatar.js +23 -0
  14. package/dist/components/ui/badge.d.ts +7 -0
  15. package/dist/components/ui/badge.js +36 -0
  16. package/dist/components/ui/breadcrumb.d.ts +10 -0
  17. package/dist/components/ui/breadcrumb.js +36 -0
  18. package/dist/components/ui/button-group.d.ts +10 -0
  19. package/dist/components/ui/button-group.js +36 -0
  20. package/dist/components/ui/button.d.ts +8 -0
  21. package/dist/components/ui/button.js +34 -0
  22. package/dist/components/ui/calendar.d.ts +10 -0
  23. package/dist/components/ui/calendar.js +76 -0
  24. package/dist/components/ui/card.d.ts +11 -0
  25. package/dist/components/ui/card.js +24 -0
  26. package/dist/components/ui/chart.d.ts +44 -0
  27. package/dist/components/ui/chart.js +132 -0
  28. package/dist/components/ui/checkbox.d.ts +3 -0
  29. package/dist/components/ui/checkbox.js +9 -0
  30. package/dist/components/ui/code-view.d.ts +31 -0
  31. package/dist/components/ui/code-view.js +62 -0
  32. package/dist/components/ui/collapsible.d.ts +5 -0
  33. package/dist/components/ui/collapsible.js +13 -0
  34. package/dist/components/ui/command-block.d.ts +28 -0
  35. package/dist/components/ui/command-block.js +58 -0
  36. package/dist/components/ui/command.d.ts +19 -0
  37. package/dist/components/ui/command.js +35 -0
  38. package/dist/components/ui/connection-status.d.ts +29 -0
  39. package/dist/components/ui/connection-status.js +26 -0
  40. package/dist/components/ui/context-menu.d.ts +29 -0
  41. package/dist/components/ui/context-menu.js +51 -0
  42. package/dist/components/ui/data-table.d.ts +49 -0
  43. package/dist/components/ui/data-table.js +100 -0
  44. package/dist/components/ui/dialog.d.ts +18 -0
  45. package/dist/components/ui/dialog.js +37 -0
  46. package/dist/components/ui/drawer.d.ts +16 -0
  47. package/dist/components/ui/drawer.js +75 -0
  48. package/dist/components/ui/dropdown-menu.d.ts +29 -0
  49. package/dist/components/ui/dropdown-menu.js +51 -0
  50. package/dist/components/ui/dropzone.d.ts +11 -0
  51. package/dist/components/ui/dropzone.js +39 -0
  52. package/dist/components/ui/empty.d.ts +11 -0
  53. package/dist/components/ui/empty.js +33 -0
  54. package/dist/components/ui/field.d.ts +24 -0
  55. package/dist/components/ui/field.js +68 -0
  56. package/dist/components/ui/file-tree.d.ts +42 -0
  57. package/dist/components/ui/file-tree.js +88 -0
  58. package/dist/components/ui/file-type-icon.d.ts +16 -0
  59. package/dist/components/ui/file-type-icon.js +19 -0
  60. package/dist/components/ui/hash-chain.d.ts +43 -0
  61. package/dist/components/ui/hash-chain.js +34 -0
  62. package/dist/components/ui/history-palette.d.ts +37 -0
  63. package/dist/components/ui/history-palette.js +44 -0
  64. package/dist/components/ui/hover-card.d.ts +5 -0
  65. package/dist/components/ui/hover-card.js +14 -0
  66. package/dist/components/ui/icon-base.d.ts +15 -0
  67. package/dist/components/ui/icon-base.js +18 -0
  68. package/dist/components/ui/icon.d.ts +15 -0
  69. package/dist/components/ui/icon.js +32 -0
  70. package/dist/components/ui/icons-compat.d.ts +32 -0
  71. package/dist/components/ui/icons-compat.js +34 -0
  72. package/dist/components/ui/icons.d.ts +1048 -0
  73. package/dist/components/ui/icons.js +264 -0
  74. package/dist/components/ui/input-group.d.ts +18 -0
  75. package/dist/components/ui/input-group.js +57 -0
  76. package/dist/components/ui/input-otp.d.ts +11 -0
  77. package/dist/components/ui/input-otp.js +21 -0
  78. package/dist/components/ui/input.d.ts +3 -0
  79. package/dist/components/ui/input.js +7 -0
  80. package/dist/components/ui/kbd.d.ts +3 -0
  81. package/dist/components/ui/kbd.js +9 -0
  82. package/dist/components/ui/label.d.ts +3 -0
  83. package/dist/components/ui/label.js +7 -0
  84. package/dist/components/ui/locale-switch.d.ts +9 -0
  85. package/dist/components/ui/locale-switch.js +31 -0
  86. package/dist/components/ui/log-panel.d.ts +28 -0
  87. package/dist/components/ui/log-panel.js +59 -0
  88. package/dist/components/ui/menubar.d.ts +29 -0
  89. package/dist/components/ui/menubar.js +56 -0
  90. package/dist/components/ui/metric-grid.d.ts +20 -0
  91. package/dist/components/ui/metric-grid.js +14 -0
  92. package/dist/components/ui/model-list.d.ts +33 -0
  93. package/dist/components/ui/model-list.js +69 -0
  94. package/dist/components/ui/navigation-menu.d.ts +11 -0
  95. package/dist/components/ui/navigation-menu.js +31 -0
  96. package/dist/components/ui/number-field.d.ts +29 -0
  97. package/dist/components/ui/number-field.js +65 -0
  98. package/dist/components/ui/pagination.d.ts +17 -0
  99. package/dist/components/ui/pagination.js +26 -0
  100. package/dist/components/ui/pane-tree.d.ts +18 -0
  101. package/dist/components/ui/pane-tree.js +65 -0
  102. package/dist/components/ui/popover.d.ts +9 -0
  103. package/dist/components/ui/popover.js +23 -0
  104. package/dist/components/ui/progress.d.ts +7 -0
  105. package/dist/components/ui/progress.js +20 -0
  106. package/dist/components/ui/radio-group.d.ts +5 -0
  107. package/dist/components/ui/radio-group.js +12 -0
  108. package/dist/components/ui/resizable.d.ts +7 -0
  109. package/dist/components/ui/resizable.js +14 -0
  110. package/dist/components/ui/scroll-area.d.ts +5 -0
  111. package/dist/components/ui/scroll-area.js +11 -0
  112. package/dist/components/ui/select.d.ts +15 -0
  113. package/dist/components/ui/select.js +34 -0
  114. package/dist/components/ui/separator.d.ts +3 -0
  115. package/dist/components/ui/separator.js +8 -0
  116. package/dist/components/ui/settings-layout.d.ts +31 -0
  117. package/dist/components/ui/settings-layout.js +45 -0
  118. package/dist/components/ui/sheet.d.ts +14 -0
  119. package/dist/components/ui/sheet.js +37 -0
  120. package/dist/components/ui/shell-picker.d.ts +18 -0
  121. package/dist/components/ui/shell-picker.js +17 -0
  122. package/dist/components/ui/skeleton.d.ts +2 -0
  123. package/dist/components/ui/skeleton.js +6 -0
  124. package/dist/components/ui/slider.d.ts +3 -0
  125. package/dist/components/ui/slider.js +12 -0
  126. package/dist/components/ui/sonner.d.ts +3 -0
  127. package/dist/components/ui/sonner.js +25 -0
  128. package/dist/components/ui/spinner.d.ts +2 -0
  129. package/dist/components/ui/spinner.js +7 -0
  130. package/dist/components/ui/split-button.d.ts +21 -0
  131. package/dist/components/ui/split-button.js +14 -0
  132. package/dist/components/ui/stat.d.ts +10 -0
  133. package/dist/components/ui/stat.js +8 -0
  134. package/dist/components/ui/status-bar.d.ts +13 -0
  135. package/dist/components/ui/status-bar.js +15 -0
  136. package/dist/components/ui/stepper.d.ts +13 -0
  137. package/dist/components/ui/stepper.js +11 -0
  138. package/dist/components/ui/switch.d.ts +5 -0
  139. package/dist/components/ui/switch.js +8 -0
  140. package/dist/components/ui/table.d.ts +10 -0
  141. package/dist/components/ui/table.js +28 -0
  142. package/dist/components/ui/tabs.d.ts +10 -0
  143. package/dist/components/ui/tabs.js +29 -0
  144. package/dist/components/ui/terminal-tabs.d.ts +31 -0
  145. package/dist/components/ui/terminal-tabs.js +109 -0
  146. package/dist/components/ui/terminal-view.d.ts +51 -0
  147. package/dist/components/ui/terminal-view.js +189 -0
  148. package/dist/components/ui/textarea.d.ts +3 -0
  149. package/dist/components/ui/textarea.js +6 -0
  150. package/dist/components/ui/timeline.d.ts +9 -0
  151. package/dist/components/ui/timeline.js +18 -0
  152. package/dist/components/ui/toggle-group.d.ts +11 -0
  153. package/dist/components/ui/toggle-group.js +24 -0
  154. package/dist/components/ui/toggle.d.ts +8 -0
  155. package/dist/components/ui/toggle.js +26 -0
  156. package/dist/components/ui/tooltip.d.ts +6 -0
  157. package/dist/components/ui/tooltip.js +17 -0
  158. package/dist/components/ui/tree-view.d.ts +20 -0
  159. package/dist/components/ui/tree-view.js +41 -0
  160. package/dist/components/ui/window-frame.d.ts +35 -0
  161. package/dist/components/ui/window-frame.js +49 -0
  162. package/dist/lib/ai-markdown.d.ts +13 -0
  163. package/dist/lib/ai-markdown.js +46 -0
  164. package/dist/lib/command-risk.d.ts +6 -0
  165. package/dist/lib/command-risk.js +42 -0
  166. package/dist/lib/file-icons.d.ts +18 -0
  167. package/dist/lib/file-icons.js +136 -0
  168. package/dist/lib/file-kind.d.ts +10 -0
  169. package/dist/lib/file-kind.js +63 -0
  170. package/dist/lib/format.d.ts +9 -0
  171. package/dist/lib/format.js +30 -0
  172. package/dist/lib/i18n-core.d.ts +20 -0
  173. package/dist/lib/i18n-core.js +36 -0
  174. package/dist/lib/i18n.d.ts +15 -0
  175. package/dist/lib/i18n.js +68 -0
  176. package/dist/lib/icon-data.d.ts +276 -0
  177. package/dist/lib/icon-data.js +307 -0
  178. package/dist/lib/icon-shapes.d.ts +14 -0
  179. package/dist/lib/icon-shapes.js +47 -0
  180. package/dist/lib/log-filter.d.ts +23 -0
  181. package/dist/lib/log-filter.js +44 -0
  182. package/dist/lib/number-field.d.ts +11 -0
  183. package/dist/lib/number-field.js +30 -0
  184. package/dist/lib/pane-tree.d.ts +39 -0
  185. package/dist/lib/pane-tree.js +92 -0
  186. package/dist/lib/platform.d.ts +10 -0
  187. package/dist/lib/platform.js +24 -0
  188. package/dist/lib/shell-meta.d.ts +7 -0
  189. package/dist/lib/shell-meta.js +70 -0
  190. package/dist/lib/syntax.d.ts +16 -0
  191. package/dist/lib/syntax.js +540 -0
  192. package/dist/lib/tab-order.d.ts +6 -0
  193. package/dist/lib/tab-order.js +24 -0
  194. package/dist/lib/table-sort.d.ts +16 -0
  195. package/dist/lib/table-sort.js +66 -0
  196. package/dist/lib/terminal-themes.d.ts +30 -0
  197. package/dist/lib/terminal-themes.js +90 -0
  198. package/dist/lib/utils.d.ts +2 -0
  199. package/dist/lib/utils.js +5 -0
  200. package/dist-cdn/loccal-ui.css +971 -0
  201. package/dist-cdn/loccal-ui.min.js +1 -0
  202. package/dist-wc/base.d.ts +31 -0
  203. package/dist-wc/base.js +104 -0
  204. package/dist-wc/button.d.ts +12 -0
  205. package/dist-wc/button.js +47 -0
  206. package/dist-wc/calendar.d.ts +16 -0
  207. package/dist-wc/calendar.js +106 -0
  208. package/dist-wc/choice.d.ts +17 -0
  209. package/dist-wc/choice.js +76 -0
  210. package/dist-wc/command.d.ts +32 -0
  211. package/dist-wc/command.js +181 -0
  212. package/dist-wc/data-table.d.ts +22 -0
  213. package/dist-wc/data-table.js +128 -0
  214. package/dist-wc/dialog.d.ts +29 -0
  215. package/dist-wc/dialog.js +94 -0
  216. package/dist-wc/disclosure.d.ts +17 -0
  217. package/dist-wc/disclosure.js +91 -0
  218. package/dist-wc/fields2.d.ts +38 -0
  219. package/dist-wc/fields2.js +133 -0
  220. package/dist-wc/file-tree.d.ts +19 -0
  221. package/dist-wc/file-tree.js +97 -0
  222. package/dist-wc/floating.d.ts +32 -0
  223. package/dist-wc/floating.js +91 -0
  224. package/dist-wc/index.d.ts +23 -0
  225. package/dist-wc/index.js +24 -0
  226. package/dist-wc/input-otp.d.ts +14 -0
  227. package/dist-wc/input-otp.js +82 -0
  228. package/dist-wc/navigation-menu.d.ts +14 -0
  229. package/dist-wc/navigation-menu.js +75 -0
  230. package/dist-wc/number-field.d.ts +13 -0
  231. package/dist-wc/number-field.js +67 -0
  232. package/dist-wc/resizable.d.ts +14 -0
  233. package/dist-wc/resizable.js +57 -0
  234. package/dist-wc/select.d.ts +17 -0
  235. package/dist-wc/select.js +80 -0
  236. package/dist-wc/static.d.ts +1 -0
  237. package/dist-wc/static.js +175 -0
  238. package/dist-wc/status-bar.d.ts +11 -0
  239. package/dist-wc/status-bar.js +54 -0
  240. package/dist-wc/styles.css +971 -0
  241. package/dist-wc/tabs.d.ts +16 -0
  242. package/dist-wc/tabs.js +62 -0
  243. package/dist-wc/terminal-tabs.d.ts +16 -0
  244. package/dist-wc/terminal-tabs.js +79 -0
  245. package/dist-wc/toaster.d.ts +16 -0
  246. package/dist-wc/toaster.js +68 -0
  247. package/dist-wc/toggle.d.ts +30 -0
  248. package/dist-wc/toggle.js +101 -0
  249. package/dist-wc/tree.d.ts +17 -0
  250. package/dist-wc/tree.js +72 -0
  251. package/docs/ARQUITETURA-VANILLA.md +54 -0
  252. package/docs/VERSIONING.md +88 -0
  253. package/package.json +1078 -6
  254. package/styles.css +476 -0
@@ -0,0 +1,7 @@
1
+ import * as ResizablePrimitive from "react-resizable-panels";
2
+ declare function ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps): import("react").JSX.Element;
3
+ declare function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps): import("react").JSX.Element;
4
+ declare function ResizableHandle({ withHandle, className, ...props }: ResizablePrimitive.SeparatorProps & {
5
+ withHandle?: boolean;
6
+ }): import("react").JSX.Element;
7
+ export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { cn } from "../../lib/utils.js";
4
+ import * as ResizablePrimitive from "react-resizable-panels";
5
+ function ResizablePanelGroup({ className, ...props }) {
6
+ return (_jsx(ResizablePrimitive.Group, { "data-slot": "resizable-panel-group", className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className), ...props }));
7
+ }
8
+ function ResizablePanel({ ...props }) {
9
+ return _jsx(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
10
+ }
11
+ function ResizableHandle({ withHandle, className, ...props }) {
12
+ return (_jsx(ResizablePrimitive.Separator, { "data-slot": "resizable-handle", className: cn("relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90", className), ...props, children: withHandle && (_jsx("div", { className: "z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border" })) }));
13
+ }
14
+ export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
3
+ declare function ScrollArea({ className, children, ...props }: ScrollAreaPrimitive.Root.Props): React.JSX.Element;
4
+ declare function ScrollBar({ className, orientation, ...props }: ScrollAreaPrimitive.Scrollbar.Props): React.JSX.Element;
5
+ export { ScrollArea, ScrollBar };
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
4
+ import { cn } from "../../lib/utils.js";
5
+ function ScrollArea({ className, children, ...props }) {
6
+ return (_jsxs(ScrollAreaPrimitive.Root, { "data-slot": "scroll-area", className: cn("relative", className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] }));
7
+ }
8
+ function ScrollBar({ className, orientation = "vertical", ...props }) {
9
+ return (_jsx(ScrollAreaPrimitive.Scrollbar, { "data-slot": "scroll-area-scrollbar", "data-orientation": orientation, orientation: orientation, className: cn("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent", className), ...props, children: _jsx(ScrollAreaPrimitive.Thumb, { "data-slot": "scroll-area-thumb", className: "relative flex-1 rounded-full bg-border" }) }));
10
+ }
11
+ export { ScrollArea, ScrollBar };
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import { Select as SelectPrimitive } from "@base-ui/react/select";
3
+ declare const Select: typeof SelectPrimitive.Root;
4
+ declare function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props): React.JSX.Element;
5
+ declare function SelectValue({ className, ...props }: SelectPrimitive.Value.Props): React.JSX.Element;
6
+ declare function SelectTrigger({ className, size, children, ...props }: SelectPrimitive.Trigger.Props & {
7
+ size?: "sm" | "default";
8
+ }): React.JSX.Element;
9
+ declare function SelectContent({ className, children, side, sideOffset, align, alignOffset, alignItemWithTrigger, ...props }: SelectPrimitive.Popup.Props & Pick<SelectPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger">): React.JSX.Element;
10
+ declare function SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props): React.JSX.Element;
11
+ declare function SelectItem({ className, children, ...props }: SelectPrimitive.Item.Props): React.JSX.Element;
12
+ declare function SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props): React.JSX.Element;
13
+ declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>): React.JSX.Element;
14
+ declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>): React.JSX.Element;
15
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
@@ -0,0 +1,34 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Select as SelectPrimitive } from "@base-ui/react/select";
4
+ import { cn } from "../../lib/utils.js";
5
+ import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "./icons.js";
6
+ const Select = SelectPrimitive.Root;
7
+ function SelectGroup({ className, ...props }) {
8
+ return (_jsx(SelectPrimitive.Group, { "data-slot": "select-group", className: cn("scroll-my-1 p-1", className), ...props }));
9
+ }
10
+ function SelectValue({ className, ...props }) {
11
+ return (_jsx(SelectPrimitive.Value, { "data-slot": "select-value", className: cn("flex flex-1 text-left", className), ...props }));
12
+ }
13
+ function SelectTrigger({ className, size = "default", children, ...props }) {
14
+ return (_jsxs(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": size, className: cn("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { render: _jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })] }));
15
+ }
16
+ function SelectContent({ className, children, side = "bottom", sideOffset = 4, align = "center", alignOffset = 0, alignItemWithTrigger = true, ...props }) {
17
+ return (_jsx(SelectPrimitive.Portal, { children: _jsx(SelectPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, alignItemWithTrigger: alignItemWithTrigger, className: "isolate z-50", children: _jsxs(SelectPrimitive.Popup, { "data-slot": "select-content", "data-align-trigger": alignItemWithTrigger, className: cn("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-floating duration-100 data-[align-trigger=true]:animate-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, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.List, { children: children }), _jsx(SelectScrollDownButton, {})] }) }) }));
18
+ }
19
+ function SelectLabel({ className, ...props }) {
20
+ return (_jsx(SelectPrimitive.GroupLabel, { "data-slot": "select-label", className: cn("px-1.5 py-1 text-xs text-muted-foreground", className), ...props }));
21
+ }
22
+ function SelectItem({ className, children, ...props }) {
23
+ return (_jsxs(SelectPrimitive.Item, { "data-slot": "select-item", className: cn("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**: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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className), ...props, children: [_jsx(SelectPrimitive.ItemText, { className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap", children: children }), _jsx(SelectPrimitive.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" }) })] }));
24
+ }
25
+ function SelectSeparator({ className, ...props }) {
26
+ return (_jsx(SelectPrimitive.Separator, { "data-slot": "select-separator", className: cn("pointer-events-none -mx-1 my-1 h-px bg-border", className), ...props }));
27
+ }
28
+ function SelectScrollUpButton({ className, ...props }) {
29
+ return (_jsx(SelectPrimitive.ScrollUpArrow, { "data-slot": "select-scroll-up-button", className: cn("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: _jsx(ChevronUpIcon, {}) }));
30
+ }
31
+ function SelectScrollDownButton({ className, ...props }) {
32
+ return (_jsx(SelectPrimitive.ScrollDownArrow, { "data-slot": "select-scroll-down-button", className: cn("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: _jsx(ChevronDownIcon, {}) }));
33
+ }
34
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
@@ -0,0 +1,3 @@
1
+ import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
2
+ declare function Separator({ className, orientation, ...props }: SeparatorPrimitive.Props): import("react").JSX.Element;
3
+ export { Separator };
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
4
+ import { cn } from "../../lib/utils.js";
5
+ function Separator({ className, orientation = "horizontal", ...props }) {
6
+ return (_jsx(SeparatorPrimitive, { "data-slot": "separator", orientation: orientation, className: cn("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch", className), ...props }));
7
+ }
8
+ export { Separator };
@@ -0,0 +1,31 @@
1
+ import * as React from "react";
2
+ type SettingsNavItem = {
3
+ id: string;
4
+ label: string;
5
+ icon?: React.ReactNode;
6
+ };
7
+ type SettingsLayoutLabels = {
8
+ save: string;
9
+ reset: string;
10
+ unsaved: string;
11
+ nav: string;
12
+ };
13
+ type SettingsLayoutProps = {
14
+ sections: SettingsNavItem[];
15
+ activeId: string;
16
+ onActiveChange: (id: string) => void;
17
+ /** Ha alteracoes pendentes: habilita Salvar/Descartar e mostra o aviso. */
18
+ dirty?: boolean;
19
+ onSave?: () => void;
20
+ onReset?: () => void;
21
+ labels?: Partial<SettingsLayoutLabels>;
22
+ children: React.ReactNode;
23
+ className?: string;
24
+ };
25
+ declare function SettingsLayout({ sections, activeId, onActiveChange, dirty, onSave, onReset, labels, children, className, }: SettingsLayoutProps): React.JSX.Element;
26
+ declare function SettingsSection({ title, description, children, className, ...props }: Omit<React.ComponentProps<"section">, "title"> & {
27
+ title: React.ReactNode;
28
+ description?: React.ReactNode;
29
+ }): React.JSX.Element;
30
+ export { SettingsLayout, SettingsSection };
31
+ export type { SettingsNavItem, SettingsLayoutProps };
@@ -0,0 +1,45 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { cn } from "../../lib/utils.js";
5
+ import { Button } from "./button.js";
6
+ const DEFAULT_LABELS = {
7
+ save: "Salvar",
8
+ reset: "Descartar",
9
+ unsaved: "Alterações não salvas",
10
+ nav: "Seções de configuração",
11
+ };
12
+ function SettingsLayout({ sections, activeId, onActiveChange, dirty = false, onSave, onReset, labels, children, className, }) {
13
+ const l = { ...DEFAULT_LABELS, ...labels };
14
+ const navRef = React.useRef(null);
15
+ const onNavKeyDown = (e, index) => {
16
+ let next = -1;
17
+ if (e.key === "ArrowDown")
18
+ next = (index + 1) % sections.length;
19
+ else if (e.key === "ArrowUp")
20
+ next = (index - 1 + sections.length) % sections.length;
21
+ else if (e.key === "Home")
22
+ next = 0;
23
+ else if (e.key === "End")
24
+ next = sections.length - 1;
25
+ if (next === -1)
26
+ return;
27
+ e.preventDefault();
28
+ onActiveChange(sections[next].id);
29
+ navRef.current?.querySelectorAll("button")[next]?.focus();
30
+ };
31
+ return (_jsxs("div", { "data-slot": "settings-layout", onKeyDown: (e) => {
32
+ if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "s") {
33
+ e.preventDefault();
34
+ if (dirty)
35
+ onSave?.();
36
+ }
37
+ }, className: cn("flex size-full min-h-0 flex-col bg-background", className), children: [_jsxs("div", { className: "flex min-h-0 flex-1", children: [_jsx("nav", { ref: navRef, "aria-label": l.nav, className: "flex w-48 shrink-0 flex-col gap-0.5 overflow-y-auto border-r bg-sidebar p-2", children: sections.map((s, index) => {
38
+ const active = s.id === activeId;
39
+ return (_jsxs("button", { type: "button", "aria-current": active ? "page" : undefined, tabIndex: active ? 0 : -1, onClick: () => onActiveChange(s.id), onKeyDown: (e) => onNavKeyDown(e, index), className: cn("flex h-8 items-center gap-2 rounded-md px-2 text-left text-sm text-muted-foreground outline-none transition-colors", "hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/60", "aria-[current=page]:bg-accent aria-[current=page]:text-foreground [&_svg]:size-4 [&_svg]:shrink-0"), children: [s.icon, _jsx("span", { className: "truncate", children: s.label })] }, s.id));
40
+ }) }), _jsx("div", { "data-slot": "settings-content", className: "min-w-0 flex-1 overflow-y-auto px-6 py-5", children: _jsx("div", { className: "mx-auto flex max-w-2xl flex-col gap-8", children: children }) })] }), _jsxs("footer", { className: "flex h-11 shrink-0 items-center justify-end gap-2 border-t bg-sidebar px-4", children: [_jsx("span", { role: "status", "aria-live": "polite", className: cn("mr-auto text-xs text-warning transition-opacity", dirty ? "opacity-100" : "opacity-0"), children: l.unsaved }), _jsx(Button, { type: "button", size: "sm", variant: "ghost", disabled: !dirty, onClick: onReset, children: l.reset }), _jsx(Button, { type: "button", size: "sm", disabled: !dirty, onClick: onSave, children: l.save })] })] }));
41
+ }
42
+ function SettingsSection({ title, description, children, className, ...props }) {
43
+ return (_jsxs("section", { "data-slot": "settings-section", className: cn("flex flex-col gap-4", className), ...props, children: [_jsxs("header", { className: "flex flex-col gap-1 border-b pb-2", children: [_jsx("h2", { className: "text-base font-semibold", children: title }), description ? _jsx("p", { className: "text-sm text-muted-foreground", children: description }) : null] }), children] }));
44
+ }
45
+ export { SettingsLayout, SettingsSection };
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
3
+ declare function Sheet({ ...props }: SheetPrimitive.Root.Props): React.JSX.Element;
4
+ declare function SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props): React.JSX.Element;
5
+ declare function SheetClose({ ...props }: SheetPrimitive.Close.Props): React.JSX.Element;
6
+ declare function SheetContent({ className, children, side, showCloseButton, ...props }: SheetPrimitive.Popup.Props & {
7
+ side?: "top" | "right" | "bottom" | "left";
8
+ showCloseButton?: boolean;
9
+ }): React.JSX.Element;
10
+ declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
+ declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
12
+ declare function SheetTitle({ className, ...props }: SheetPrimitive.Title.Props): React.JSX.Element;
13
+ declare function SheetDescription({ className, ...props }: SheetPrimitive.Description.Props): React.JSX.Element;
14
+ export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
4
+ import { cn } from "../../lib/utils.js";
5
+ import { Button } from "./button.js";
6
+ import { XIcon } from "./icons.js";
7
+ function Sheet({ ...props }) {
8
+ return _jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
9
+ }
10
+ function SheetTrigger({ ...props }) {
11
+ return _jsx(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
12
+ }
13
+ function SheetClose({ ...props }) {
14
+ return _jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
15
+ }
16
+ function SheetPortal({ ...props }) {
17
+ return _jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
18
+ }
19
+ function SheetOverlay({ className, ...props }) {
20
+ return (_jsx(SheetPrimitive.Backdrop, { "data-slot": "sheet-overlay", className: cn("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs", className), ...props }));
21
+ }
22
+ function SheetContent({ className, children, side = "right", showCloseButton = true, ...props }) {
23
+ return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Popup, { "data-slot": "sheet-content", "data-side": side, className: cn("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className), ...props, children: [children, showCloseButton && (_jsxs(SheetPrimitive.Close, { "data-slot": "sheet-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm" }), children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
24
+ }
25
+ function SheetHeader({ className, ...props }) {
26
+ return (_jsx("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-0.5 p-4", className), ...props }));
27
+ }
28
+ function SheetFooter({ className, ...props }) {
29
+ return (_jsx("div", { "data-slot": "sheet-footer", className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props }));
30
+ }
31
+ function SheetTitle({ className, ...props }) {
32
+ return (_jsx(SheetPrimitive.Title, { "data-slot": "sheet-title", className: cn("text-base font-medium text-foreground", className), ...props }));
33
+ }
34
+ function SheetDescription({ className, ...props }) {
35
+ return (_jsx(SheetPrimitive.Description, { "data-slot": "sheet-description", className: cn("text-sm text-muted-foreground", className), ...props }));
36
+ }
37
+ export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
@@ -0,0 +1,18 @@
1
+ import * as React from "react";
2
+ type ShellPickerProps = {
3
+ /** Caminhos de executavel detectados pelo backend. */
4
+ shells: string[];
5
+ value?: string;
6
+ onValueChange?: (shell: string) => void;
7
+ /** Texto do item que usa a deteccao automatica; omita para nao oferecer a opcao. */
8
+ autoLabel?: string;
9
+ placeholder?: string;
10
+ size?: "sm" | "default";
11
+ disabled?: boolean;
12
+ className?: string;
13
+ };
14
+ /** Valor reservado para "detectar automaticamente". O backend recebe string vazia. */
15
+ declare const AUTO_SHELL = "";
16
+ declare function ShellPicker({ shells, value, onValueChange, autoLabel, placeholder, size, disabled, className, }: ShellPickerProps): React.JSX.Element;
17
+ export { ShellPicker, AUTO_SHELL };
18
+ export type { ShellPickerProps };
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./select.js";
5
+ import { shellLabel } from "../../lib/shell-meta.js";
6
+ /** Valor reservado para "detectar automaticamente". O backend recebe string vazia. */
7
+ const AUTO_SHELL = "";
8
+ /** Chave interna do item automatico: o Select nao aceita string vazia como valor selecionado. */
9
+ const AUTO_KEY = "__auto__";
10
+ function ShellPicker({ shells, value = AUTO_SHELL, onValueChange, autoLabel, placeholder = "Selecione um shell", size = "default", disabled, className, }) {
11
+ const items = React.useMemo(() => {
12
+ const list = shells.map((path) => ({ value: path, label: shellLabel(path), path }));
13
+ return autoLabel ? [{ value: AUTO_KEY, label: autoLabel, path: "" }, ...list] : list;
14
+ }, [shells, autoLabel]);
15
+ return (_jsxs(Select, { items: items, value: value === AUTO_SHELL && autoLabel ? AUTO_KEY : value, disabled: disabled, onValueChange: (next) => onValueChange?.(typeof next === "string" && next !== AUTO_KEY ? next : AUTO_SHELL), children: [_jsx(SelectTrigger, { size: size, className: className, "aria-label": placeholder, children: _jsx(SelectValue, { placeholder: placeholder }) }), _jsx(SelectContent, { children: items.map((item) => (_jsxs(SelectItem, { value: item.value, children: [_jsx("span", { children: item.label }), item.path ? (_jsx("span", { className: "ml-2 max-w-56 truncate font-mono text-[11px] text-muted-foreground", children: item.path })) : null] }, item.value))) })] }));
16
+ }
17
+ export { ShellPicker, AUTO_SHELL };
@@ -0,0 +1,2 @@
1
+ declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
2
+ export { Skeleton };
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../lib/utils.js";
3
+ function Skeleton({ className, ...props }) {
4
+ return (_jsx("div", { "data-slot": "skeleton", className: cn("animate-pulse rounded-md bg-muted", className), ...props }));
5
+ }
6
+ export { Skeleton };
@@ -0,0 +1,3 @@
1
+ import { Slider as SliderPrimitive } from "@base-ui/react/slider";
2
+ declare function Slider({ className, defaultValue, value, min, max, ...props }: SliderPrimitive.Root.Props): import("react").JSX.Element;
3
+ export { Slider };
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Slider as SliderPrimitive } from "@base-ui/react/slider";
3
+ import { cn } from "../../lib/utils.js";
4
+ function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }) {
5
+ const _values = Array.isArray(value)
6
+ ? value
7
+ : Array.isArray(defaultValue)
8
+ ? defaultValue
9
+ : [min, max];
10
+ return (_jsx(SliderPrimitive.Root, { className: cn("data-horizontal:w-full data-vertical:h-full", className), "data-slot": "slider", defaultValue: defaultValue, value: value, min: min, max: max, thumbAlignment: "edge", ...props, children: _jsxs(SliderPrimitive.Control, { className: "relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col", children: [_jsx(SliderPrimitive.Track, { "data-slot": "slider-track", className: "relative grow overflow-hidden rounded-full bg-muted select-none data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1", children: _jsx(SliderPrimitive.Indicator, { "data-slot": "slider-range", className: "bg-primary select-none data-horizontal:h-full data-vertical:w-full" }) }), Array.from({ length: _values.length }, (_, index) => (_jsx(SliderPrimitive.Thumb, { "data-slot": "slider-thumb", className: "relative block size-3 shrink-0 rounded-full border border-ring bg-white ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 disabled:pointer-events-none disabled:opacity-50" }, index)))] }) }));
11
+ }
12
+ export { Slider };
@@ -0,0 +1,3 @@
1
+ import { type ToasterProps } from "sonner";
2
+ declare const Toaster: ({ ...props }: ToasterProps) => import("react").JSX.Element;
3
+ export { Toaster };
@@ -0,0 +1,25 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useTheme } from "next-themes";
4
+ import { Toaster as Sonner } from "sonner";
5
+ import { CheckCircleIcon as CircleCheckIcon, InfoIcon, AlertTriangleIcon as TriangleAlertIcon, XOctagonIcon as OctagonXIcon, LoaderIcon as Loader2Icon } from "./icons.js";
6
+ const Toaster = ({ ...props }) => {
7
+ const { theme = "system" } = useTheme();
8
+ return (_jsx(Sonner, { theme: theme, className: "toaster group", icons: {
9
+ success: (_jsx(CircleCheckIcon, { className: "size-4" })),
10
+ info: (_jsx(InfoIcon, { className: "size-4" })),
11
+ warning: (_jsx(TriangleAlertIcon, { className: "size-4" })),
12
+ error: (_jsx(OctagonXIcon, { className: "size-4" })),
13
+ loading: (_jsx(Loader2Icon, { className: "size-4 animate-spin" })),
14
+ }, style: {
15
+ "--normal-bg": "var(--popover)",
16
+ "--normal-text": "var(--popover-foreground)",
17
+ "--normal-border": "var(--border)",
18
+ "--border-radius": "var(--radius)",
19
+ }, toastOptions: {
20
+ classNames: {
21
+ toast: "cn-toast",
22
+ },
23
+ }, ...props }));
24
+ };
25
+ export { Toaster };
@@ -0,0 +1,2 @@
1
+ declare function Spinner({ className, ...props }: React.ComponentProps<"svg">): import("react").JSX.Element;
2
+ export { Spinner };
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { LoaderIcon as Loader2Icon } from "./icons.js";
4
+ function Spinner({ className, ...props }) {
5
+ return (_jsx(Loader2Icon, { "data-slot": "spinner", role: "status", "aria-label": "Loading", className: cn("size-4 animate-spin", className), ...props }));
6
+ }
7
+ export { Spinner };
@@ -0,0 +1,21 @@
1
+ import * as React from "react";
2
+ type SplitButtonLabels = {
3
+ more: string;
4
+ };
5
+ type SplitButtonProps = {
6
+ /** Conteudo da acao principal. */
7
+ children: React.ReactNode;
8
+ /** Acao principal (clique na parte esquerda). */
9
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
10
+ /** Itens do menu: use DropdownMenuItem & cia. */
11
+ menu: React.ReactNode;
12
+ variant?: "default" | "outline" | "secondary" | "ghost";
13
+ size?: "xs" | "sm" | "default";
14
+ disabled?: boolean;
15
+ labels?: Partial<SplitButtonLabels>;
16
+ className?: string;
17
+ };
18
+ /** Acao primaria com menu de alternativas, como "Executar" / "Executar como administrador". */
19
+ declare function SplitButton({ children, onClick, menu, variant, size, disabled, labels, className }: SplitButtonProps): React.JSX.Element;
20
+ export { SplitButton };
21
+ export type { SplitButtonProps };
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Button } from "./button.js";
4
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from "./dropdown-menu.js";
5
+ import { ChevronDownIcon } from "./icons.js";
6
+ import { cn } from "../../lib/utils.js";
7
+ const DEFAULT_LABELS = { more: "Mais opções" };
8
+ const triggerSize = { xs: "icon-xs", sm: "icon-sm", default: "icon" };
9
+ /** Acao primaria com menu de alternativas, como "Executar" / "Executar como administrador". */
10
+ function SplitButton({ children, onClick, menu, variant = "default", size = "default", disabled, labels, className }) {
11
+ const l = { ...DEFAULT_LABELS, ...labels };
12
+ return (_jsxs("div", { "data-slot": "split-button", role: "group", className: cn("inline-flex items-stretch", className), children: [_jsx(Button, { type: "button", variant: variant, size: size, disabled: disabled, onClick: onClick, className: "rounded-r-none border-r-0", children: children }), _jsx("span", { "aria-hidden": true, className: cn("w-px self-stretch", variant === "default" ? "bg-primary-foreground/25" : "bg-border") }), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { render: _jsx(Button, { type: "button", variant: variant, size: triggerSize[size], disabled: disabled, "aria-label": l.more, className: "rounded-l-none border-l-0" }), children: _jsx(ChevronDownIcon, {}) }), _jsx(DropdownMenuContent, { align: "end", className: "w-auto min-w-44", children: menu })] })] }));
13
+ }
14
+ export { SplitButton };
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ type StatProps = React.ComponentProps<"div"> & {
3
+ label: string;
4
+ value: React.ReactNode;
5
+ delta?: number;
6
+ hint?: React.ReactNode;
7
+ invertDelta?: boolean;
8
+ };
9
+ declare function Stat({ label, value, delta, hint, invertDelta, className, children, ...props }: StatProps): React.JSX.Element;
10
+ export { Stat };
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ArrowDownRightIcon, ArrowUpRightIcon } from "./icons.js";
3
+ import { cn } from "../../lib/utils.js";
4
+ function Stat({ label, value, delta, hint, invertDelta, className, children, ...props }) {
5
+ const positive = delta !== undefined && (invertDelta ? delta < 0 : delta >= 0);
6
+ return (_jsxs("div", { "data-slot": "stat", className: cn("flex flex-col gap-2 rounded-xl bg-card p-4 text-card-foreground shadow-surface", className), ...props, children: [_jsx("span", { className: "text-xs font-medium text-muted-foreground", children: label }), _jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-2xl font-semibold tracking-tight tabular", children: value }), delta !== undefined ? (_jsxs("span", { className: cn("inline-flex items-center gap-0.5 rounded-sm px-1 font-mono text-[11px] tabular", positive ? "bg-success/12 text-success" : "bg-destructive/12 text-destructive"), children: [delta >= 0 ? _jsx(ArrowUpRightIcon, { className: "size-3" }) : _jsx(ArrowDownRightIcon, { className: "size-3" }), Math.abs(delta).toFixed(1), "%"] })) : null] }), hint ? _jsx("span", { className: "text-xs text-muted-foreground", children: hint }) : null, children] }));
7
+ }
8
+ export { Stat };
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ declare function StatusBar({ className, density, ...props }: React.ComponentProps<"footer"> & {
3
+ density?: "default" | "compact";
4
+ }): React.JSX.Element;
5
+ declare function StatusBarItem({ className, tone, ...props }: React.ComponentProps<"span"> & {
6
+ tone?: "default" | "brand" | "success" | "warning" | "destructive";
7
+ }): React.JSX.Element;
8
+ declare function StatusBarSpacer(): React.JSX.Element;
9
+ declare function StatusDot({ className, tone }: {
10
+ className?: string;
11
+ tone?: "success" | "warning" | "destructive" | "brand";
12
+ }): React.JSX.Element;
13
+ export { StatusBar, StatusBarItem, StatusBarSpacer, StatusDot };
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../lib/utils.js";
3
+ function StatusBar({ className, density = "default", ...props }) {
4
+ return (_jsx("footer", { "data-slot": "status-bar", "data-density": density, className: cn("flex h-7 data-[density=compact]:h-6 shrink-0 items-center gap-0.5 border-t bg-sidebar px-1.5 font-mono text-[11px] text-muted-foreground tabular select-none", className), ...props }));
5
+ }
6
+ function StatusBarItem({ className, tone = "default", ...props }) {
7
+ return (_jsx("span", { "data-slot": "status-bar-item", "data-tone": tone, className: cn("inline-flex h-5 items-center gap-1.5 rounded-sm px-1.5 whitespace-nowrap [&_svg]:size-3", "data-[tone=brand]:text-brand data-[tone=success]:text-success data-[tone=warning]:text-warning data-[tone=destructive]:text-destructive", className), ...props }));
8
+ }
9
+ function StatusBarSpacer() {
10
+ return _jsx("span", { "aria-hidden": true, className: "flex-1" });
11
+ }
12
+ function StatusDot({ className, tone = "success" }) {
13
+ return (_jsx("span", { "aria-hidden": true, "data-tone": tone, className: cn("relative inline-flex size-1.5 rounded-full", "data-[tone=success]:bg-success data-[tone=warning]:bg-warning data-[tone=destructive]:bg-destructive data-[tone=brand]:bg-brand", className) }));
14
+ }
15
+ export { StatusBar, StatusBarItem, StatusBarSpacer, StatusDot };
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ type Step = {
3
+ title: string;
4
+ description?: string;
5
+ };
6
+ type StepperProps = React.ComponentProps<"ol"> & {
7
+ steps: Step[];
8
+ current: number;
9
+ orientation?: "horizontal" | "vertical";
10
+ };
11
+ declare function Stepper({ steps, current, orientation, className, ...props }: StepperProps): React.JSX.Element;
12
+ export { Stepper };
13
+ export type { Step };
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CheckIcon } from "./icons.js";
3
+ import { cn } from "../../lib/utils.js";
4
+ function Stepper({ steps, current, orientation = "horizontal", className, ...props }) {
5
+ return (_jsx("ol", { "data-slot": "stepper", "data-orientation": orientation, className: cn("flex", orientation === "horizontal" ? "w-full items-start" : "flex-col", className), ...props, children: steps.map((step, index) => {
6
+ const state = index < current ? "complete" : index === current ? "current" : "upcoming";
7
+ const isLast = index === steps.length - 1;
8
+ return (_jsxs("li", { "data-state": state, "aria-current": state === "current" ? "step" : undefined, className: cn("group/step relative flex", orientation === "horizontal" ? "flex-1 flex-col gap-3" : "gap-3 pb-6 last:pb-0"), children: [_jsxs("div", { className: cn("flex items-center", orientation === "vertical" && "flex-col"), children: [_jsx("span", { className: cn("relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full font-mono text-xs tabular transition-colors", "group-data-[state=complete]/step:bg-primary group-data-[state=complete]/step:text-primary-foreground", "group-data-[state=current]/step:bg-background group-data-[state=current]/step:text-foreground group-data-[state=current]/step:ring-2 group-data-[state=current]/step:ring-brand", "group-data-[state=upcoming]/step:bg-muted group-data-[state=upcoming]/step:text-muted-foreground group-data-[state=upcoming]/step:ring-1 group-data-[state=upcoming]/step:ring-border"), children: state === "complete" ? _jsx(CheckIcon, { className: "size-3.5", strokeWidth: 2.5 }) : index + 1 }), !isLast ? (_jsx("span", { "aria-hidden": true, className: cn("bg-border group-data-[state=complete]/step:bg-primary", orientation === "horizontal" ? "mx-2 h-px flex-1" : "absolute top-8 bottom-1 left-3.5 w-px") })) : null] }), _jsxs("div", { className: cn("flex flex-col gap-0.5", orientation === "horizontal" && "pr-4"), children: [_jsx("span", { className: "text-sm font-medium text-foreground group-data-[state=upcoming]/step:text-muted-foreground", children: step.title }), step.description ? (_jsx("span", { className: "text-xs leading-relaxed text-muted-foreground", children: step.description })) : null] })] }, step.title));
9
+ }) }));
10
+ }
11
+ export { Stepper };
@@ -0,0 +1,5 @@
1
+ import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
2
+ declare function Switch({ className, size, ...props }: SwitchPrimitive.Root.Props & {
3
+ size?: "sm" | "default";
4
+ }): import("react").JSX.Element;
5
+ export { Switch };
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
4
+ import { cn } from "../../lib/utils.js";
5
+ function Switch({ className, size = "default", ...props }) {
6
+ return (_jsx(SwitchPrimitive.Root, { "data-slot": "switch", "data-size": size, className: cn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", className), ...props, children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground" }) }));
7
+ }
8
+ export { Switch };
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ declare function Table({ className, ...props }: React.ComponentProps<"table">): React.JSX.Element;
3
+ declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): React.JSX.Element;
4
+ declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): React.JSX.Element;
5
+ declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): React.JSX.Element;
6
+ declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): React.JSX.Element;
7
+ declare function TableHead({ className, ...props }: React.ComponentProps<"th">): React.JSX.Element;
8
+ declare function TableCell({ className, ...props }: React.ComponentProps<"td">): React.JSX.Element;
9
+ declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): React.JSX.Element;
10
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { cn } from "../../lib/utils.js";
4
+ function Table({ className, ...props }) {
5
+ return (_jsx("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: _jsx("table", { "data-slot": "table", className: cn("w-full caption-bottom text-sm", className), ...props }) }));
6
+ }
7
+ function TableHeader({ className, ...props }) {
8
+ return (_jsx("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props }));
9
+ }
10
+ function TableBody({ className, ...props }) {
11
+ return (_jsx("tbody", { "data-slot": "table-body", className: cn("[&_tr:last-child]:border-0", className), ...props }));
12
+ }
13
+ function TableFooter({ className, ...props }) {
14
+ return (_jsx("tfoot", { "data-slot": "table-footer", className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className), ...props }));
15
+ }
16
+ function TableRow({ className, ...props }) {
17
+ return (_jsx("tr", { "data-slot": "table-row", className: cn("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", className), ...props }));
18
+ }
19
+ function TableHead({ className, ...props }) {
20
+ return (_jsx("th", { "data-slot": "table-head", className: cn("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0", className), ...props }));
21
+ }
22
+ function TableCell({ className, ...props }) {
23
+ return (_jsx("td", { "data-slot": "table-cell", className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className), ...props }));
24
+ }
25
+ function TableCaption({ className, ...props }) {
26
+ return (_jsx("caption", { "data-slot": "table-caption", className: cn("mt-4 text-sm text-muted-foreground", className), ...props }));
27
+ }
28
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
@@ -0,0 +1,10 @@
1
+ import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare function Tabs({ className, orientation, ...props }: TabsPrimitive.Root.Props): import("react").JSX.Element;
4
+ declare const tabsListVariants: (props?: ({
5
+ variant?: "line" | "default" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare function TabsList({ className, variant, ...props }: TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>): import("react").JSX.Element;
8
+ declare function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props): import("react").JSX.Element;
9
+ declare function TabsContent({ className, ...props }: TabsPrimitive.Panel.Props): import("react").JSX.Element;
10
+ export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../../lib/utils.js";
6
+ function Tabs({ className, orientation = "horizontal", ...props }) {
7
+ return (_jsx(TabsPrimitive.Root, { "data-slot": "tabs", "data-orientation": orientation, className: cn("group/tabs flex gap-2 data-horizontal:flex-col", className), ...props }));
8
+ }
9
+ const tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none", {
10
+ variants: {
11
+ variant: {
12
+ default: "bg-muted",
13
+ line: "gap-1 bg-transparent",
14
+ },
15
+ },
16
+ defaultVariants: {
17
+ variant: "default",
18
+ },
19
+ });
20
+ function TabsList({ className, variant = "default", ...props }) {
21
+ return (_jsx(TabsPrimitive.List, { "data-slot": "tabs-list", "data-variant": variant, className: cn(tabsListVariants({ variant }), className), ...props }));
22
+ }
23
+ function TabsTrigger({ className, ...props }) {
24
+ return (_jsx(TabsPrimitive.Tab, { "data-slot": "tabs-trigger", className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className), ...props }));
25
+ }
26
+ function TabsContent({ className, ...props }) {
27
+ return (_jsx(TabsPrimitive.Panel, { "data-slot": "tabs-content", className: cn("flex-1 text-sm outline-none", className), ...props }));
28
+ }
29
+ export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };