@schandlergarcia/sf-web-components 1.9.37 → 1.9.39

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 (109) hide show
  1. package/package.json +4 -1
  2. package/scripts/postinstall.mjs +116 -65
  3. package/src/components/library/cards/ActionList.jsx +38 -0
  4. package/src/components/library/cards/ActivityCard.jsx +56 -0
  5. package/src/components/library/cards/BaseCard.jsx +109 -0
  6. package/src/components/library/cards/CalloutCard.jsx +37 -0
  7. package/src/components/library/cards/ChartCard.jsx +105 -0
  8. package/src/components/library/cards/FeedPanel.jsx +39 -0
  9. package/src/components/library/cards/ListCard.jsx +193 -0
  10. package/src/components/library/cards/MetricCard.jsx +109 -0
  11. package/src/components/library/cards/MetricsStrip.jsx +78 -0
  12. package/src/components/library/cards/SectionCard.jsx +83 -0
  13. package/src/components/library/cards/SemanticMetricCard.jsx +52 -0
  14. package/src/components/library/cards/SemanticMetricCardWithLoading.jsx +23 -0
  15. package/src/components/library/cards/SemanticTableCard.jsx +48 -0
  16. package/src/components/library/cards/SemanticTableCardWithLoading.jsx +22 -0
  17. package/src/components/library/cards/StatusCard.jsx +220 -0
  18. package/src/components/library/cards/TableCard.jsx +337 -0
  19. package/src/components/library/cards/WidgetCard.jsx +90 -0
  20. package/src/components/library/charts/D3Chart.jsx +109 -0
  21. package/src/components/library/charts/D3ChartTemplates.jsx +126 -0
  22. package/src/components/library/charts/GeoMap.jsx +293 -0
  23. package/src/components/library/chat/ChatBar.jsx +256 -0
  24. package/src/components/library/chat/ChatInput.jsx +89 -0
  25. package/src/components/library/chat/ChatMessage.jsx +178 -0
  26. package/src/components/library/chat/ChatMessageList.jsx +73 -0
  27. package/src/components/library/chat/ChatPanel.jsx +97 -0
  28. package/src/components/library/chat/ChatSuggestions.jsx +28 -0
  29. package/src/components/library/chat/ChatToolCall.jsx +100 -0
  30. package/src/components/library/chat/ChatTypingIndicator.jsx +23 -0
  31. package/src/components/library/chat/ChatWelcome.jsx +43 -0
  32. package/src/components/library/chat/index.jsx +10 -0
  33. package/src/components/library/chat/useChatState.jsx +130 -0
  34. package/src/components/library/data/DataModeProvider.jsx +67 -0
  35. package/src/components/library/data/DataModeToggle.jsx +36 -0
  36. package/src/components/library/data/chartDataProvider.jsx +61 -0
  37. package/src/components/library/data/filterUtils.jsx +141 -0
  38. package/src/components/library/data/useDataSource.jsx +33 -0
  39. package/src/components/library/data/usePageFilters.jsx +99 -0
  40. package/src/components/library/filters/FilterBar.jsx +95 -0
  41. package/src/components/library/filters/SearchFilter.jsx +36 -0
  42. package/src/components/library/filters/SelectFilter.jsx +55 -0
  43. package/src/components/library/filters/ToggleFilter.jsx +52 -0
  44. package/src/components/library/filters/index.jsx +4 -0
  45. package/src/components/library/forms/FormField.jsx +291 -0
  46. package/src/components/library/forms/FormModal.jsx +201 -0
  47. package/src/components/library/forms/FormRenderer.jsx +46 -0
  48. package/src/components/library/forms/FormSection.jsx +69 -0
  49. package/src/components/library/forms/index.jsx +5 -0
  50. package/src/components/library/forms/useFormState.jsx +165 -0
  51. package/src/components/library/heroui/Accordion.jsx +26 -0
  52. package/src/components/library/heroui/Alert.jsx +8 -0
  53. package/src/components/library/heroui/Badge.jsx +8 -0
  54. package/src/components/library/heroui/Breadcrumbs.jsx +22 -0
  55. package/src/components/library/heroui/Button.jsx +58 -0
  56. package/src/components/library/heroui/Card.jsx +8 -0
  57. package/src/components/library/heroui/Collapsible.jsx +42 -0
  58. package/src/components/library/heroui/DatePicker.jsx +34 -0
  59. package/src/components/library/heroui/Dialog.jsx +37 -0
  60. package/src/components/library/heroui/Drawer.jsx +32 -0
  61. package/src/components/library/heroui/Dropdown.jsx +28 -0
  62. package/src/components/library/heroui/Field.jsx +51 -0
  63. package/src/components/library/heroui/Input.jsx +6 -0
  64. package/src/components/library/heroui/Kbd.jsx +8 -0
  65. package/src/components/library/heroui/Meter.jsx +8 -0
  66. package/src/components/library/heroui/Modal.jsx +32 -0
  67. package/src/components/library/heroui/Pagination.jsx +8 -0
  68. package/src/components/library/heroui/Popover.jsx +64 -0
  69. package/src/components/library/heroui/ProgressBar.jsx +8 -0
  70. package/src/components/library/heroui/ProgressCircle.jsx +8 -0
  71. package/src/components/library/heroui/ScrollShadow.jsx +8 -0
  72. package/src/components/library/heroui/Select.jsx +37 -0
  73. package/src/components/library/heroui/Separator.jsx +8 -0
  74. package/src/components/library/heroui/Skeleton.jsx +8 -0
  75. package/src/components/library/heroui/Tabs.jsx +26 -0
  76. package/src/components/library/heroui/Toast.jsx +25 -0
  77. package/src/components/library/heroui/Toggle.jsx +14 -0
  78. package/src/components/library/heroui/Tooltip.jsx +21 -0
  79. package/src/components/library/index.jsx +146 -0
  80. package/src/components/library/layout/PageContainer.jsx +11 -0
  81. package/src/components/library/skeletons/CardSkeleton.jsx +30 -0
  82. package/src/components/library/theme/AppThemeProvider.jsx +67 -0
  83. package/src/components/library/theme/tokens.jsx +72 -0
  84. package/src/components/library/ui/Alert.jsx +80 -0
  85. package/src/components/library/ui/Avatar.jsx +44 -0
  86. package/src/components/library/ui/BreadcrumbExtras.tsx +120 -0
  87. package/src/components/library/ui/Button.jsx +61 -0
  88. package/src/components/library/ui/Card.jsx +117 -0
  89. package/src/components/library/ui/Checkbox.jsx +17 -0
  90. package/src/components/library/ui/Chip.jsx +38 -0
  91. package/src/components/library/ui/Collapsible.tsx +31 -0
  92. package/src/components/library/ui/Container.jsx +56 -0
  93. package/src/components/library/ui/DatePicker.tsx +34 -0
  94. package/src/components/library/ui/Dialog.tsx +141 -0
  95. package/src/components/library/ui/EmptyState.jsx +46 -0
  96. package/src/components/library/ui/Field.tsx +82 -0
  97. package/src/components/library/ui/FieldGroup.jsx +17 -0
  98. package/src/components/library/ui/Input.jsx +21 -0
  99. package/src/components/library/ui/Label.jsx +22 -0
  100. package/src/components/library/ui/PaginationExtras.tsx +142 -0
  101. package/src/components/library/ui/Popover.tsx +39 -0
  102. package/src/components/library/ui/Select.tsx +113 -0
  103. package/src/components/library/ui/Spinner.d.ts +10 -0
  104. package/src/components/library/ui/Spinner.jsx +64 -0
  105. package/src/components/library/ui/Text.jsx +46 -0
  106. package/src/components/library/ui/Toggle.jsx +42 -0
  107. package/src/components/workspace/ComponentRegistry.jsx +297 -0
  108. package/src/lib/index.ts +1 -0
  109. package/src/lib/utils.ts +6 -0
@@ -0,0 +1,34 @@
1
+ import React from "react";
2
+ import { Popover, PopoverTrigger, PopoverContent } from "./Popover";
3
+
4
+ /**
5
+ * HeroUI v3 DatePicker — simple wrapper using Popover.
6
+ * Full implementation would integrate with react-day-picker.
7
+ *
8
+ * @example
9
+ * import { DatePicker, DatePickerTrigger, DatePickerContent } from "@/components/library";
10
+ * <DatePicker>
11
+ * <DatePickerTrigger>
12
+ * <button>Select date</button>
13
+ * </DatePickerTrigger>
14
+ * <DatePickerContent>
15
+ * <DatePickerCalendar />
16
+ * </DatePickerContent>
17
+ * </DatePicker>
18
+ */
19
+ export default function HeroUIDatePicker({ children, ...props }) {
20
+ return <Popover {...props}>{children}</Popover>;
21
+ }
22
+
23
+ export const DatePicker = HeroUIDatePicker;
24
+ export const DatePickerTrigger = ({ children, date, dateFormat, placeholder, className = "", ...props }) => {
25
+ // Accept shadcn DatePicker props but just pass through as trigger
26
+ return <PopoverTrigger {...props}>{children}</PopoverTrigger>;
27
+ };
28
+ export const DatePickerContent = PopoverContent;
29
+ export const DatePickerCalendar = ({ date, onSelect, ...props }) => (
30
+ <div className="p-4" {...props}>
31
+ <p className="text-sm text-slate-500">Calendar placeholder - integrate react-day-picker here</p>
32
+ </div>
33
+ );
34
+ export const DatePickerRangeTrigger = DatePickerTrigger;
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ import { Modal } from "@heroui/react";
3
+
4
+ /**
5
+ * HeroUI v3 Dialog — maps to Modal for shadcn compatibility.
6
+ *
7
+ * Sub-components via dot notation on the named `Modal` export:
8
+ * Modal.Backdrop, Modal.Container, Modal.Dialog,
9
+ * Modal.CloseTrigger, Modal.Header, Modal.Icon,
10
+ * Modal.Heading, Modal.Body, Modal.Footer
11
+ *
12
+ * @example
13
+ * import { Dialog, DialogTrigger, DialogContent } from "@/components/library";
14
+ * <Dialog>
15
+ * <DialogTrigger>Open</DialogTrigger>
16
+ * <DialogContent>
17
+ * <DialogHeader><DialogTitle>Title</DialogTitle></DialogHeader>
18
+ * <DialogDescription>Content</DialogDescription>
19
+ * <DialogFooter>Actions</DialogFooter>
20
+ * </DialogContent>
21
+ * </Dialog>
22
+ */
23
+ export default function HeroUIDialog(props) {
24
+ return <Modal {...props} />;
25
+ }
26
+
27
+ // Shadcn-compatible exports
28
+ export const Dialog = HeroUIDialog;
29
+ export const DialogTrigger = Modal.Trigger || (props => <button {...props} />);
30
+ export const DialogPortal = ({ children }) => <>{children}</>;
31
+ export const DialogClose = Modal.CloseTrigger || (props => <button {...props} />);
32
+ export const DialogOverlay = Modal.Backdrop || (props => <div {...props} />);
33
+ export const DialogContent = Modal.Dialog || Modal.Container || (props => <div {...props} />);
34
+ export const DialogHeader = Modal.Header || (props => <div {...props} />);
35
+ export const DialogFooter = Modal.Footer || (props => <div {...props} />);
36
+ export const DialogTitle = Modal.Heading || (props => <h2 {...props} />);
37
+ export const DialogDescription = (props) => <p {...props} />;
@@ -0,0 +1,32 @@
1
+ import React from "react";
2
+ import { Drawer } from "@heroui/react";
3
+
4
+ /**
5
+ * HeroUI v3 Drawer — compound component.
6
+ *
7
+ * Sub-components via dot notation on the named `Drawer` export:
8
+ * Drawer.Backdrop, Drawer.Content, Drawer.Dialog,
9
+ * Drawer.Header, Drawer.Heading, Drawer.Body, Drawer.Footer,
10
+ * Drawer.Handle, Drawer.CloseTrigger
11
+ *
12
+ * @example
13
+ * import { Drawer } from "@/components/library";
14
+ * <Drawer>
15
+ * <Button>Open</Button>
16
+ * <Drawer.Backdrop>
17
+ * <Drawer.Content placement="right">
18
+ * <Drawer.Dialog>
19
+ * <Drawer.CloseTrigger />
20
+ * <Drawer.Header><Drawer.Heading>Details</Drawer.Heading></Drawer.Header>
21
+ * <Drawer.Body>…</Drawer.Body>
22
+ * <Drawer.Footer>…</Drawer.Footer>
23
+ * </Drawer.Dialog>
24
+ * </Drawer.Content>
25
+ * </Drawer.Backdrop>
26
+ * </Drawer>
27
+ */
28
+ export default function HeroUIDrawer(props) {
29
+ return <Drawer {...props} />;
30
+ }
31
+
32
+ export { Drawer };
@@ -0,0 +1,28 @@
1
+ import React from "react";
2
+ import { Dropdown } from "@heroui/react";
3
+
4
+ /**
5
+ * HeroUI v3 Dropdown — compound component.
6
+ *
7
+ * Sub-components via dot notation on the named `Dropdown` export:
8
+ * Dropdown.Trigger, Dropdown.Popover, Dropdown.Menu,
9
+ * Dropdown.Item, Dropdown.Section, Dropdown.ItemIndicator,
10
+ * Dropdown.SubmenuTrigger, Dropdown.SubmenuIndicator
11
+ *
12
+ * @example
13
+ * import { Dropdown } from "@/components/library";
14
+ * <Dropdown>
15
+ * <Button>Actions</Button>
16
+ * <Dropdown.Popover>
17
+ * <Dropdown.Menu onAction={(key) => console.log(key)}>
18
+ * <Dropdown.Item id="edit" textValue="Edit"><Label>Edit</Label></Dropdown.Item>
19
+ * <Dropdown.Item id="delete" textValue="Delete" variant="danger"><Label>Delete</Label></Dropdown.Item>
20
+ * </Dropdown.Menu>
21
+ * </Dropdown.Popover>
22
+ * </Dropdown>
23
+ */
24
+ export default function HeroUIDropdown(props) {
25
+ return <Dropdown {...props} />;
26
+ }
27
+
28
+ export { Dropdown };
@@ -0,0 +1,51 @@
1
+ import React from "react";
2
+
3
+ /**
4
+ * HeroUI v3 Field components — simple wrappers for form field layout.
5
+ *
6
+ * @example
7
+ * import { Field, FieldLabel, FieldError } from "@/components/library";
8
+ * <Field>
9
+ * <FieldLabel>Name</FieldLabel>
10
+ * <Input />
11
+ * <FieldError>Required</FieldError>
12
+ * </Field>
13
+ */
14
+ export default function HeroUIField({ className = "", children, ...props }) {
15
+ return (
16
+ <div className={`flex flex-col gap-1.5 ${className}`} {...props}>
17
+ {children}
18
+ </div>
19
+ );
20
+ }
21
+
22
+ export const Field = HeroUIField;
23
+
24
+ export const FieldLabel = ({ className = "", htmlFor, children, ...props }) => (
25
+ <label
26
+ htmlFor={htmlFor}
27
+ className={`text-sm font-medium text-slate-700 dark:text-slate-200 ${className}`}
28
+ {...props}
29
+ >
30
+ {children}
31
+ </label>
32
+ );
33
+
34
+ export const FieldDescription = ({ className = "", children, ...props }) => (
35
+ <p className={`text-xs text-slate-500 dark:text-slate-400 ${className}`} {...props}>
36
+ {children}
37
+ </p>
38
+ );
39
+
40
+ export const FieldError = ({ className = "", errors, children, ...props }) => {
41
+ // Support both children and errors prop
42
+ const errorContent = errors?.length > 0 ? errors.join(", ") : children;
43
+
44
+ if (!errorContent) return null;
45
+
46
+ return (
47
+ <p className={`text-xs text-red-600 dark:text-red-400 ${className}`} {...props}>
48
+ {errorContent}
49
+ </p>
50
+ );
51
+ };
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import { Input } from "@heroui/react";
3
+
4
+ export default function HeroUIInput(props) {
5
+ return <Input {...props} />;
6
+ }
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { Kbd } from "@heroui/react";
3
+
4
+ export default function HeroUIKbd({ children, ...props }) {
5
+ return <Kbd {...props}>{children}</Kbd>;
6
+ }
7
+
8
+ export { Kbd };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { Meter } from "@heroui/react";
3
+
4
+ export default function HeroUIMeter({ children, ...props }) {
5
+ return <Meter {...props}>{children}</Meter>;
6
+ }
7
+
8
+ export { Meter };
@@ -0,0 +1,32 @@
1
+ import React from "react";
2
+ import { Modal } from "@heroui/react";
3
+
4
+ /**
5
+ * HeroUI v3 Modal — compound component.
6
+ *
7
+ * Sub-components via dot notation on the named `Modal` export:
8
+ * Modal.Backdrop, Modal.Container, Modal.Dialog,
9
+ * Modal.CloseTrigger, Modal.Header, Modal.Icon,
10
+ * Modal.Heading, Modal.Body, Modal.Footer
11
+ *
12
+ * @example
13
+ * import { Modal } from "@/components/library";
14
+ * <Modal>
15
+ * <Button>Open</Button>
16
+ * <Modal.Backdrop>
17
+ * <Modal.Container>
18
+ * <Modal.Dialog>
19
+ * <Modal.CloseTrigger />
20
+ * <Modal.Header><Modal.Heading>Title</Modal.Heading></Modal.Header>
21
+ * <Modal.Body>…</Modal.Body>
22
+ * <Modal.Footer>…</Modal.Footer>
23
+ * </Modal.Dialog>
24
+ * </Modal.Container>
25
+ * </Modal.Backdrop>
26
+ * </Modal>
27
+ */
28
+ export default function HeroUIModal(props) {
29
+ return <Modal {...props} />;
30
+ }
31
+
32
+ export { Modal };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { Pagination } from "@heroui/react";
3
+
4
+ export default function HeroUIPagination(props) {
5
+ return <Pagination {...props} />;
6
+ }
7
+
8
+ export { Pagination };
@@ -0,0 +1,64 @@
1
+ import React from "react";
2
+
3
+ /**
4
+ * HeroUI v3 Popover — simple popover for shadcn compatibility.
5
+ * Using native HTML/CSS since HeroUI v3 doesn't have a Popover component.
6
+ *
7
+ * @example
8
+ * import { Popover, PopoverTrigger, PopoverContent } from "@/components/library";
9
+ * <Popover>
10
+ * <PopoverTrigger>Open</PopoverTrigger>
11
+ * <PopoverContent>Content</PopoverContent>
12
+ * </Popover>
13
+ */
14
+ export default function HeroUIPopover({ children, open, onOpenChange, ...props }) {
15
+ const [isOpen, setIsOpen] = React.useState(false);
16
+ const isControlled = open !== undefined;
17
+ const actualOpen = isControlled ? open : isOpen;
18
+
19
+ const handleOpenChange = (newOpen) => {
20
+ if (!isControlled) setIsOpen(newOpen);
21
+ onOpenChange?.(newOpen);
22
+ };
23
+
24
+ return (
25
+ <div className="relative inline-block" {...props}>
26
+ {React.Children.map(children, (child) => {
27
+ if (React.isValidElement(child)) {
28
+ return React.cloneElement(child, { open: actualOpen, onOpenChange: handleOpenChange });
29
+ }
30
+ return child;
31
+ })}
32
+ </div>
33
+ );
34
+ }
35
+
36
+ export const Popover = HeroUIPopover;
37
+
38
+ export const PopoverTrigger = ({ children, open, onOpenChange, ...props }) => {
39
+ const handleClick = () => onOpenChange?.(!open);
40
+
41
+ return React.cloneElement(children, {
42
+ ...props,
43
+ onClick: handleClick,
44
+ });
45
+ };
46
+
47
+ export const PopoverContent = ({ children, open, className = "", align = "center", sideOffset = 4, ...props }) => {
48
+ if (!open) return null;
49
+
50
+ const alignClasses = {
51
+ start: "left-0",
52
+ center: "left-1/2 -translate-x-1/2",
53
+ end: "right-0"
54
+ };
55
+
56
+ return (
57
+ <div
58
+ className={`absolute z-50 mt-${sideOffset} w-72 rounded-md border border-slate-200 bg-white p-4 text-slate-900 shadow-md dark:border-slate-800 dark:bg-slate-900 dark:text-slate-50 ${alignClasses[align] || alignClasses.center} ${className}`}
59
+ {...props}
60
+ >
61
+ {children}
62
+ </div>
63
+ );
64
+ };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { ProgressBar } from "@heroui/react";
3
+
4
+ export default function HeroUIProgressBar({ children, ...props }) {
5
+ return <ProgressBar {...props}>{children}</ProgressBar>;
6
+ }
7
+
8
+ export { ProgressBar };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { ProgressCircle } from "@heroui/react";
3
+
4
+ export default function HeroUIProgressCircle({ children, ...props }) {
5
+ return <ProgressCircle {...props}>{children}</ProgressCircle>;
6
+ }
7
+
8
+ export { ProgressCircle };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { ScrollShadow } from "@heroui/react";
3
+
4
+ export default function HeroUIScrollShadow({ children, ...props }) {
5
+ return <ScrollShadow {...props}>{children}</ScrollShadow>;
6
+ }
7
+
8
+ export { ScrollShadow };
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ import { Select as HeroSelect } from "@heroui/react";
3
+
4
+ /**
5
+ * HeroUI v3 Select wrapper with shadcn compatibility.
6
+ *
7
+ * Translates shadcn API to HeroUI:
8
+ * - onValueChange -> onSelectionChange
9
+ * - value -> selectedKeys
10
+ */
11
+ export default function HeroUISelect({ value, onValueChange, children, ...props }) {
12
+ // Translate shadcn API to HeroUI API
13
+ const selectedKeys = value ? [value] : [];
14
+ const handleSelectionChange = (keys) => {
15
+ const selected = Array.from(keys)[0];
16
+ onValueChange?.(selected || "");
17
+ };
18
+
19
+ return (
20
+ <HeroSelect
21
+ selectedKeys={selectedKeys}
22
+ onSelectionChange={handleSelectionChange}
23
+ {...props}
24
+ >
25
+ {children}
26
+ </HeroSelect>
27
+ );
28
+ }
29
+
30
+ // For direct HeroUI usage
31
+ export const Select = HeroUISelect;
32
+
33
+ // Shadcn-compatible subcomponents that just pass through children
34
+ export const SelectTrigger = ({ children, size, ...props }) => <>{children}</>;
35
+ export const SelectValue = ({ placeholder, ...props }) => <span {...props}>{placeholder}</span>;
36
+ export const SelectContent = ({ children, ...props }) => <>{children}</>;
37
+ export const SelectItem = ({ value, children, ...props }) => <HeroSelect.Item key={value} {...props}>{children}</HeroSelect.Item>;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { Separator } from "@heroui/react";
3
+
4
+ export default function HeroUISeparator(props) {
5
+ return <Separator {...props} />;
6
+ }
7
+
8
+ export { Separator };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { Skeleton } from "@heroui/react";
3
+
4
+ export default function HeroUISkeleton({ children, ...props }) {
5
+ return <Skeleton {...props}>{children}</Skeleton>;
6
+ }
7
+
8
+ export { Skeleton };
@@ -0,0 +1,26 @@
1
+ import React from "react";
2
+ import { Tabs } from "@heroui/react";
3
+
4
+ /**
5
+ * HeroUI v3 Tabs — compound component.
6
+ *
7
+ * Sub-components via dot notation on the named `Tabs` export:
8
+ * Tabs.List, Tabs.ListContainer, Tabs.Tab, Tabs.Panel,
9
+ * Tabs.Separator, Tabs.Indicator
10
+ *
11
+ * @example
12
+ * import { Tabs } from "@/components/library";
13
+ * <Tabs>
14
+ * <Tabs.List aria-label="Options">
15
+ * <Tabs.Tab id="overview">Overview</Tabs.Tab>
16
+ * <Tabs.Tab id="analytics">Analytics</Tabs.Tab>
17
+ * </Tabs.List>
18
+ * <Tabs.Panel id="overview">…</Tabs.Panel>
19
+ * <Tabs.Panel id="analytics">…</Tabs.Panel>
20
+ * </Tabs>
21
+ */
22
+ export default function HeroUITabs({ variant = "primary", ...props }) {
23
+ return <Tabs variant={variant} {...props} />;
24
+ }
25
+
26
+ export { Tabs };
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import { Toast, toast } from "@heroui/react";
3
+
4
+ /**
5
+ * HeroUI v3 Toast — notification system.
6
+ *
7
+ * SETUP: Add <Toast.Provider /> to your app root (_app.js).
8
+ *
9
+ * Then call the `toast` function from anywhere:
10
+ * toast("Event created");
11
+ * toast.success("Saved!");
12
+ * toast.warning("Check settings");
13
+ * toast.danger("Something failed");
14
+ * toast.promise(asyncFn(), { loading: "…", success: "Done", error: "Failed" });
15
+ *
16
+ * Sub-components via dot notation on the named `Toast` export:
17
+ * Toast.Provider, Toast.Indicator, Toast.Content,
18
+ * Toast.Title, Toast.Description, Toast.ActionButton,
19
+ * Toast.CloseButton
20
+ */
21
+ export default function HeroUIToast(props) {
22
+ return <Toast {...props} />;
23
+ }
24
+
25
+ export { Toast, toast };
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { Switch } from "@heroui/react";
3
+ import { useThemeMode } from "../theme/AppThemeProvider";
4
+
5
+ export default function HeroUIToggle({ label = "Dark mode", ...props }) {
6
+ const { mode, toggle } = useThemeMode();
7
+ const isSelected = mode === "dark";
8
+
9
+ return (
10
+ <Switch isSelected={isSelected} onChange={toggle} {...props}>
11
+ <Switch.Content>{label}</Switch.Content>
12
+ </Switch>
13
+ );
14
+ }
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { Tooltip } from "@heroui/react";
3
+
4
+ /**
5
+ * HeroUI v3 Tooltip — compound component.
6
+ *
7
+ * Sub-components via dot notation on the named `Tooltip` export:
8
+ * Tooltip.Trigger, Tooltip.Content, Tooltip.Arrow
9
+ *
10
+ * @example
11
+ * import { Tooltip } from "@/components/library";
12
+ * <Tooltip>
13
+ * <Tooltip.Trigger><Button>Hover me</Button></Tooltip.Trigger>
14
+ * <Tooltip.Content>Helpful info</Tooltip.Content>
15
+ * </Tooltip>
16
+ */
17
+ export default function HeroUITooltip(props) {
18
+ return <Tooltip {...props} />;
19
+ }
20
+
21
+ export { Tooltip };
@@ -0,0 +1,146 @@
1
+ export { default as AppThemeProvider, useThemeMode } from "./theme/AppThemeProvider";
2
+
3
+ // UI primitives
4
+ export { default as UIButton } from "./ui/Button";
5
+ export { default as UIInput } from "./ui/Input";
6
+ export { default as UIToggle } from "./ui/Toggle";
7
+ export { default as UIText } from "./ui/Text";
8
+ export { default as UICard, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "./ui/Card";
9
+ export { default as UIContainer } from "./ui/Container";
10
+ export { default as UIChip } from "./ui/Chip";
11
+ export { default as Avatar } from "./ui/Avatar";
12
+ export { default as Spinner } from "./ui/Spinner";
13
+ export { default as EmptyState } from "./ui/EmptyState";
14
+ export { default as Label } from "./ui/Label";
15
+ export { default as Checkbox } from "./ui/Checkbox";
16
+ export { default as FieldGroup } from "./ui/FieldGroup";
17
+
18
+ // Cards
19
+ export { default as BaseCard } from "./cards/BaseCard";
20
+ export { default as ChartCard } from "./cards/ChartCard";
21
+ export { default as ListCard } from "./cards/ListCard";
22
+ export { default as MetricCard } from "./cards/MetricCard";
23
+ export { default as SectionCard } from "./cards/SectionCard";
24
+ export { default as StatusCard } from "./cards/StatusCard";
25
+ export { default as TableCard } from "./cards/TableCard";
26
+ export { default as WidgetCard } from "./cards/WidgetCard";
27
+ export { default as FeedPanel } from "./cards/FeedPanel";
28
+ export { default as ActivityCard } from "./cards/ActivityCard";
29
+ export { default as MetricsStrip } from "./cards/MetricsStrip";
30
+ export { default as CalloutCard } from "./cards/CalloutCard";
31
+ export { default as ActionList } from "./cards/ActionList";
32
+
33
+ // Charts
34
+ export { default as D3Chart } from "./charts/D3Chart";
35
+ export { D3ChartTemplates } from "./charts/D3ChartTemplates";
36
+ export { default as GeoMap } from "./charts/GeoMap";
37
+
38
+ // Layout
39
+ export { default as PageContainer } from "./layout/PageContainer";
40
+
41
+ // Skeletons
42
+ export { default as CardSkeleton } from "./skeletons/CardSkeleton";
43
+
44
+ // Forms
45
+ export { FormModal, FormRenderer, FormSection, FormField, useFormState } from "./forms";
46
+
47
+ // Filters
48
+ export { FilterBar, SearchFilter, SelectFilter, ToggleFilter } from "./filters";
49
+
50
+ // Data mode
51
+ export { default as DataModeProvider, useDataMode } from "./data/DataModeProvider";
52
+ export { default as DataModeToggle } from "./data/DataModeToggle";
53
+ export { default as useDataSource } from "./data/useDataSource";
54
+
55
+ // Data utilities
56
+ export { default as usePageFilters } from "./data/usePageFilters";
57
+ export {
58
+ filterBySearch,
59
+ filterByValue,
60
+ filterByToggle,
61
+ filterByDateRange,
62
+ sortByKey,
63
+ applyFilters,
64
+ } from "./data/filterUtils";
65
+
66
+ // Chat / AI agent
67
+ export {
68
+ ChatPanel,
69
+ ChatBar,
70
+ ChatMessageList,
71
+ ChatMessage,
72
+ ChatInput,
73
+ ChatTypingIndicator,
74
+ ChatSuggestions,
75
+ ChatToolCall,
76
+ ChatWelcome,
77
+ useChatState,
78
+ } from "./chat";
79
+
80
+ // HeroUI wrappers — existing
81
+ export { default as HeroUIButton, Button } from "./heroui/Button";
82
+ export { default as HeroUIInput } from "./heroui/Input";
83
+ export { default as HeroUICard } from "./heroui/Card";
84
+ export { default as HeroUIToggle } from "./heroui/Toggle";
85
+
86
+ // HeroUI wrappers — navigation & layout
87
+ export { default as HeroUITabs, Tabs } from "./heroui/Tabs";
88
+ export { default as HeroUIAccordion, Accordion } from "./heroui/Accordion";
89
+ export { default as HeroUIBreadcrumbs, Breadcrumbs } from "./heroui/Breadcrumbs";
90
+ export { default as HeroUISeparator, Separator } from "./heroui/Separator";
91
+ export { default as HeroUIPagination, Pagination } from "./heroui/Pagination";
92
+
93
+ // Breadcrumb subcomponents for shadcn compatibility
94
+ export const Breadcrumb = ({ children, ...props }) => <nav aria-label="breadcrumb" {...props}>{children}</nav>;
95
+ export const BreadcrumbList = ({ children, ...props }) => <ol className="flex flex-wrap items-center gap-1.5 break-words text-sm text-slate-500 dark:text-slate-400" {...props}>{children}</ol>;
96
+ export const BreadcrumbItem = ({ children, ...props }) => <li className="inline-flex items-center gap-1.5" {...props}>{children}</li>;
97
+ export const BreadcrumbLink = ({ href, children, asChild, ...props }) => asChild ? <span {...props}>{children}</span> : <a href={href} className="transition-colors hover:text-slate-900 dark:hover:text-slate-50" {...props}>{children}</a>;
98
+ export const BreadcrumbPage = ({ children, ...props }) => <span role="link" aria-disabled="true" aria-current="page" className="font-normal text-slate-900 dark:text-slate-50" {...props}>{children}</span>;
99
+ export const BreadcrumbSeparator = ({ children, ...props }) => <li role="presentation" aria-hidden="true" {...props}>{children ?? "/"}</li>;
100
+ export const BreadcrumbEllipsis = (props) => <span role="presentation" aria-hidden="true" {...props}>...</span>;
101
+
102
+ // Pagination subcomponents for shadcn compatibility
103
+ export const PaginationContent = ({ children, ...props }) => <ul className="flex flex-row items-center gap-1" {...props}>{children}</ul>;
104
+ export const PaginationItem = ({ children, ...props }) => <li {...props}>{children}</li>;
105
+ export const PaginationLink = ({ href, isActive, children, ...props }) => <a href={href} aria-current={isActive ? "page" : undefined} className={`inline-flex items-center justify-center rounded-md text-sm font-medium h-9 min-w-9 px-4 py-2 ${isActive ? "bg-slate-900 text-white dark:bg-slate-50 dark:text-slate-900" : "hover:bg-slate-100 dark:hover:bg-slate-800"}`} {...props}>{children}</a>;
106
+ export const PaginationPrevious = ({ href, ...props }) => <PaginationLink href={href} {...props}>Previous</PaginationLink>;
107
+ export const PaginationNext = ({ href, ...props }) => <PaginationLink href={href} {...props}>Next</PaginationLink>;
108
+ export const PaginationEllipsis = (props) => <span aria-hidden {...props}>...</span>;
109
+
110
+ // HeroUI wrappers — overlays
111
+ export { default as HeroUIDrawer, Drawer } from "./heroui/Drawer";
112
+ export { default as HeroUIModal, Modal } from "./heroui/Modal";
113
+ export { default as HeroUIDropdown, Dropdown } from "./heroui/Dropdown";
114
+ export { default as HeroUITooltip, Tooltip } from "./heroui/Tooltip";
115
+ export { default as HeroUIToast, Toast, toast } from "./heroui/Toast";
116
+
117
+ // HeroUI wrappers — feedback
118
+ export { default as HeroUIAlert } from "./heroui/Alert";
119
+ export { default as HeroUIBadge, Badge } from "./heroui/Badge";
120
+ export { default as HeroUIProgressBar, ProgressBar } from "./heroui/ProgressBar";
121
+ export { default as HeroUIProgressCircle, ProgressCircle } from "./heroui/ProgressCircle";
122
+ export { default as HeroUIMeter, Meter } from "./heroui/Meter";
123
+ export { default as HeroUISkeleton, Skeleton } from "./heroui/Skeleton";
124
+
125
+ // shadcn-compatible components from ui/
126
+ export { default as Alert, AlertTitle, AlertDescription, AlertAction } from "./ui/Alert";
127
+
128
+ // shadcn-compatible components from heroui/ (HeroUI-based)
129
+ export { default as HeroUIDialog, Dialog, DialogTrigger, DialogPortal, DialogClose, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription } from "./heroui/Dialog";
130
+ export { default as HeroUIField, Field, FieldLabel, FieldDescription, FieldError } from "./heroui/Field";
131
+ export { default as HeroUICollapsible, Collapsible, CollapsibleTrigger, CollapsibleContent } from "./heroui/Collapsible";
132
+ export { default as HeroUIPopover, Popover, PopoverTrigger, PopoverContent } from "./heroui/Popover";
133
+ export { default as HeroUIDatePicker, DatePicker, DatePickerTrigger, DatePickerContent, DatePickerCalendar, DatePickerRangeTrigger } from "./heroui/DatePicker";
134
+
135
+ // HeroUI wrappers — pickers & forms
136
+ export { default as HeroUISelect, Select } from "./heroui/Select";
137
+
138
+ // Re-export Select subcomponents for shadcn compatibility
139
+ export const SelectTrigger = ({ children, size, ...props }) => <button {...props}>{children}</button>;
140
+ export const SelectValue = ({ placeholder, ...props }) => <span {...props}>{placeholder}</span>;
141
+ export const SelectContent = ({ children, ...props }) => <div {...props}>{children}</div>;
142
+ export const SelectItem = ({ children, ...props }) => <div {...props}>{children}</div>;
143
+
144
+ // HeroUI wrappers — utilities
145
+ export { default as HeroUIKbd, Kbd } from "./heroui/Kbd";
146
+ export { default as HeroUIScrollShadow, ScrollShadow } from "./heroui/ScrollShadow";
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+
3
+ export default function PageContainer({ className = "", children }) {
4
+ return (
5
+ <div className={["mx-auto w-full max-w-6xl px-4 sm:px-6", className].filter(Boolean).join(" ")}>
6
+ {children}
7
+ </div>
8
+ );
9
+ }
10
+
11
+