@schandlergarcia/sf-web-components 2.4.0 → 2.5.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.
- package/.a4drules/skills/command-center-builder/SKILL.md +3 -2
- package/.a4drules/skills/component-library/SKILL.md +50 -4
- package/.a4drules/skills/component-library/card-components.md +88 -0
- package/.a4drules/skills/component-library/when-to-use.md +1 -0
- package/CHANGELOG.md +24 -0
- package/dist/components/library/cards/KanbanBoard.js +313 -0
- package/dist/components/library/cards/KanbanBoard.js.map +1 -0
- package/dist/components/library/index.js +60 -57
- package/dist/components/library/index.js.map +1 -1
- package/dist/components/workspace/ComponentRegistry.js +5 -2
- package/dist/components/workspace/ComponentRegistry.js.map +1 -1
- package/dist/index.js +84 -82
- package/dist/index.js.map +1 -1
- package/package.json +7 -1
- package/src/components/library/cards/KanbanBoard.jsx +507 -0
- package/src/components/library/index.jsx +1 -0
|
@@ -1,67 +1,70 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { default as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { default as E, useThemeMode as H } from "./theme/AppThemeProvider.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "framer-motion";
|
|
5
5
|
import "@heroicons/react/24/outline";
|
|
6
|
+
import "@dnd-kit/core";
|
|
7
|
+
import "@dnd-kit/sortable";
|
|
8
|
+
import "@dnd-kit/utilities";
|
|
6
9
|
import "d3";
|
|
7
|
-
import { default as
|
|
10
|
+
import { default as A } from "./charts/GeoMap.js";
|
|
8
11
|
import "react-dom";
|
|
9
|
-
import { default as
|
|
10
|
-
import { Accordion as
|
|
11
|
-
import { Dialog as
|
|
12
|
+
import { default as G, useDataMode as K } from "./data/DataModeProvider.js";
|
|
13
|
+
import { Accordion as U, Badge as V, Breadcrumbs as $, Drawer as q, Dropdown as J, Kbd as Q, Meter as R, Modal as W, Pagination as X, ProgressBar as Y, ProgressCircle as Z, ScrollShadow as _, Separator as ee, Skeleton as te, Tabs as ae, Toast as re, Tooltip as oe, toast as ie } from "@heroui/react";
|
|
14
|
+
import { Dialog as se, DialogClose as le, DialogContent as ce, DialogDescription as de, DialogFooter as me, DialogHeader as pe, DialogOverlay as ge, DialogPortal as ue, DialogTitle as xe, DialogTrigger as be, default as fe } from "./heroui/Dialog.js";
|
|
12
15
|
import "@heroicons/react/24/solid";
|
|
13
|
-
const
|
|
16
|
+
const b = ({ children: e, ...t }) => /* @__PURE__ */ a("nav", { "aria-label": "breadcrumb", ...t, children: e }), f = ({ children: e, ...t }) => /* @__PURE__ */ a("ol", { className: "flex flex-wrap items-center gap-1.5 break-words text-sm text-slate-500 dark:text-slate-400", ...t, children: e }), h = ({ children: e, ...t }) => /* @__PURE__ */ a("li", { className: "inline-flex items-center gap-1.5", ...t, children: e }), D = ({ href: e, children: t, asChild: r, ...o }) => r ? /* @__PURE__ */ a("span", { ...o, children: t }) : /* @__PURE__ */ a("a", { href: e, className: "transition-colors hover:text-slate-900 dark:hover:text-slate-50", ...o, children: t }), P = ({ children: e, ...t }) => /* @__PURE__ */ a("span", { role: "link", "aria-disabled": "true", "aria-current": "page", className: "font-normal text-slate-900 dark:text-slate-50", ...t, children: e }), v = ({ children: e, ...t }) => /* @__PURE__ */ a("li", { role: "presentation", "aria-hidden": "true", ...t, children: e ?? "/" }), k = (e) => /* @__PURE__ */ a("span", { role: "presentation", "aria-hidden": "true", ...e, children: "..." }), B = ({ children: e, ...t }) => /* @__PURE__ */ a("ul", { className: "flex flex-row items-center gap-1", ...t, children: e }), S = ({ children: e, ...t }) => /* @__PURE__ */ a("li", { ...t, children: e }), i = ({ href: e, isActive: t, children: r, ...o }) => /* @__PURE__ */ a("a", { href: e, "aria-current": t ? "page" : void 0, className: `inline-flex items-center justify-center rounded-md text-sm font-medium h-9 min-w-9 px-4 py-2 ${t ? "bg-slate-900 text-white dark:bg-slate-50 dark:text-slate-900" : "hover:bg-slate-100 dark:hover:bg-slate-800"}`, ...o, children: r }), w = ({ href: e, ...t }) => /* @__PURE__ */ a(i, { href: e, ...t, children: "Previous" }), N = ({ href: e, ...t }) => /* @__PURE__ */ a(i, { href: e, ...t, children: "Next" }), T = (e) => /* @__PURE__ */ a("span", { "aria-hidden": !0, ...e, children: "..." }), M = ({ children: e, size: t, ...r }) => /* @__PURE__ */ a("button", { ...r, children: e }), C = ({ placeholder: e, ...t }) => /* @__PURE__ */ a("span", { ...t, children: e }), I = ({ children: e, ...t }) => /* @__PURE__ */ a("div", { ...t, children: e }), y = ({ children: e, ...t }) => /* @__PURE__ */ a("div", { ...t, children: e });
|
|
14
17
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
18
|
+
U as Accordion,
|
|
19
|
+
E as AppThemeProvider,
|
|
20
|
+
V as Badge,
|
|
21
|
+
b as Breadcrumb,
|
|
22
|
+
k as BreadcrumbEllipsis,
|
|
23
|
+
h as BreadcrumbItem,
|
|
24
|
+
D as BreadcrumbLink,
|
|
25
|
+
f as BreadcrumbList,
|
|
26
|
+
P as BreadcrumbPage,
|
|
27
|
+
v as BreadcrumbSeparator,
|
|
28
|
+
$ as Breadcrumbs,
|
|
29
|
+
G as DataModeProvider,
|
|
30
|
+
se as Dialog,
|
|
31
|
+
le as DialogClose,
|
|
32
|
+
ce as DialogContent,
|
|
33
|
+
de as DialogDescription,
|
|
34
|
+
me as DialogFooter,
|
|
35
|
+
pe as DialogHeader,
|
|
36
|
+
ge as DialogOverlay,
|
|
37
|
+
ue as DialogPortal,
|
|
38
|
+
xe as DialogTitle,
|
|
39
|
+
be as DialogTrigger,
|
|
40
|
+
q as Drawer,
|
|
41
|
+
J as Dropdown,
|
|
42
|
+
A as GeoMap,
|
|
43
|
+
fe as HeroUIDialog,
|
|
44
|
+
Q as Kbd,
|
|
45
|
+
R as Meter,
|
|
46
|
+
W as Modal,
|
|
47
|
+
X as Pagination,
|
|
48
|
+
B as PaginationContent,
|
|
49
|
+
T as PaginationEllipsis,
|
|
50
|
+
S as PaginationItem,
|
|
48
51
|
i as PaginationLink,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
52
|
+
N as PaginationNext,
|
|
53
|
+
w as PaginationPrevious,
|
|
54
|
+
Y as ProgressBar,
|
|
55
|
+
Z as ProgressCircle,
|
|
56
|
+
_ as ScrollShadow,
|
|
57
|
+
I as SelectContent,
|
|
58
|
+
y as SelectItem,
|
|
59
|
+
M as SelectTrigger,
|
|
60
|
+
C as SelectValue,
|
|
61
|
+
ee as Separator,
|
|
62
|
+
te as Skeleton,
|
|
63
|
+
ae as Tabs,
|
|
64
|
+
re as Toast,
|
|
65
|
+
oe as Tooltip,
|
|
66
|
+
ie as toast,
|
|
67
|
+
K as useDataMode,
|
|
68
|
+
H as useThemeMode
|
|
66
69
|
};
|
|
67
70
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/library/index.jsx"],"sourcesContent":["export { default as AppThemeProvider, useThemeMode } from \"./theme/AppThemeProvider\";\n\n// UI primitives\nexport { default as UIButton } from \"./ui/UIButton\";\nexport { default as UIInput } from \"./ui/UIInput\";\nexport { default as UIToggle } from \"./ui/Toggle\";\nexport { default as UIText } from \"./ui/Text\";\nexport { default as UICard, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from \"./ui/Card\";\nexport { default as UIContainer } from \"./ui/Container\";\nexport { default as UIChip } from \"./ui/Chip\";\nexport { default as Avatar } from \"./ui/Avatar\";\nexport { default as Spinner } from \"./ui/Spinner\";\nexport { default as EmptyState } from \"./ui/EmptyState\";\nexport { default as Label } from \"./ui/Label\";\nexport { default as Checkbox } from \"./ui/Checkbox\";\nexport { default as FieldGroup } from \"./ui/FieldGroup\";\n\n// Cards\nexport { default as BaseCard } from \"./cards/BaseCard\";\nexport { default as ChartCard } from \"./cards/ChartCard\";\nexport { default as ListCard } from \"./cards/ListCard\";\nexport { default as MetricCard } from \"./cards/MetricCard\";\nexport { default as SectionCard } from \"./cards/SectionCard\";\nexport { default as StatusCard } from \"./cards/StatusCard\";\nexport { default as TableCard } from \"./cards/TableCard\";\nexport { default as WidgetCard } from \"./cards/WidgetCard\";\nexport { default as FeedPanel } from \"./cards/FeedPanel\";\nexport { default as ActivityCard } from \"./cards/ActivityCard\";\nexport { default as MetricsStrip } from \"./cards/MetricsStrip\";\nexport { default as CalloutCard } from \"./cards/CalloutCard\";\nexport { default as ActionList } from \"./cards/ActionList\";\n\n// Charts\nexport { default as D3Chart } from \"./charts/D3Chart\";\nexport { D3ChartTemplates } from \"./charts/D3ChartTemplates\";\nexport { default as GeoMap } from \"./charts/GeoMap\";\n\n// Layout\nexport { default as PageContainer } from \"./layout/PageContainer\";\n\n// Skeletons\nexport { default as CardSkeleton } from \"./skeletons/CardSkeleton\";\n\n// Forms\nexport { FormModal, FormRenderer, FormSection, FormField, useFormState } from \"./forms\";\n\n// Filters\nexport { FilterBar, SearchFilter, SelectFilter, ToggleFilter } from \"./filters\";\n\n// Data mode\nexport { default as DataModeProvider, useDataMode } from \"./data/DataModeProvider\";\nexport { default as DataModeToggle } from \"./data/DataModeToggle\";\nexport { default as useDataSource } from \"./data/useDataSource\";\n\n// Data utilities\nexport { default as usePageFilters } from \"./data/usePageFilters\";\nexport {\n filterBySearch,\n filterByValue,\n filterByToggle,\n filterByDateRange,\n sortByKey,\n applyFilters,\n} from \"./data/filterUtils\";\n\n// Chat / AI agent\nexport {\n ChatPanel,\n ChatBar,\n ChatMessageList,\n ChatMessage,\n ChatInput,\n ChatTypingIndicator,\n ChatSuggestions,\n ChatToolCall,\n ChatWelcome,\n useChatState,\n} from \"./chat\";\n\n// HeroUI wrappers — existing\nexport { default as HeroUIButton, Button } from \"./heroui/Button\";\nexport { default as HeroUIInput } from \"./heroui/Input\";\nexport { default as HeroUICard } from \"./heroui/Card\";\nexport { default as HeroUIToggle } from \"./heroui/Toggle\";\n\n// HeroUI wrappers — navigation & layout\nexport { default as HeroUITabs, Tabs } from \"./heroui/Tabs\";\nexport { default as HeroUIAccordion, Accordion } from \"./heroui/Accordion\";\nexport { default as HeroUIBreadcrumbs, Breadcrumbs } from \"./heroui/Breadcrumbs\";\nexport { default as HeroUISeparator, Separator } from \"./heroui/Separator\";\nexport { default as HeroUIPagination, Pagination } from \"./heroui/Pagination\";\n\n// Breadcrumb subcomponents for shadcn compatibility\nexport const Breadcrumb = ({ children, ...props }) => <nav aria-label=\"breadcrumb\" {...props}>{children}</nav>;\nexport 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>;\nexport const BreadcrumbItem = ({ children, ...props }) => <li className=\"inline-flex items-center gap-1.5\" {...props}>{children}</li>;\nexport 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>;\nexport 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>;\nexport const BreadcrumbSeparator = ({ children, ...props }) => <li role=\"presentation\" aria-hidden=\"true\" {...props}>{children ?? \"/\"}</li>;\nexport const BreadcrumbEllipsis = (props) => <span role=\"presentation\" aria-hidden=\"true\" {...props}>...</span>;\n\n// Pagination subcomponents for shadcn compatibility\nexport const PaginationContent = ({ children, ...props }) => <ul className=\"flex flex-row items-center gap-1\" {...props}>{children}</ul>;\nexport const PaginationItem = ({ children, ...props }) => <li {...props}>{children}</li>;\nexport 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>;\nexport const PaginationPrevious = ({ href, ...props }) => <PaginationLink href={href} {...props}>Previous</PaginationLink>;\nexport const PaginationNext = ({ href, ...props }) => <PaginationLink href={href} {...props}>Next</PaginationLink>;\nexport const PaginationEllipsis = (props) => <span aria-hidden {...props}>...</span>;\n\n// HeroUI wrappers — overlays\nexport { default as HeroUIDrawer, Drawer } from \"./heroui/Drawer\";\nexport { default as HeroUIModal, Modal } from \"./heroui/Modal\";\nexport { default as HeroUIDropdown, Dropdown } from \"./heroui/Dropdown\";\nexport { default as HeroUITooltip, Tooltip } from \"./heroui/Tooltip\";\nexport { default as HeroUIToast, Toast, toast } from \"./heroui/Toast\";\n\n// HeroUI wrappers — feedback\nexport { default as HeroUIAlert } from \"./heroui/Alert\";\nexport { default as HeroUIBadge, Badge } from \"./heroui/Badge\";\nexport { default as HeroUIProgressBar, ProgressBar } from \"./heroui/ProgressBar\";\nexport { default as HeroUIProgressCircle, ProgressCircle } from \"./heroui/ProgressCircle\";\nexport { default as HeroUIMeter, Meter } from \"./heroui/Meter\";\nexport { default as HeroUISkeleton, Skeleton } from \"./heroui/Skeleton\";\n\n// shadcn-compatible components from ui/\nexport { default as Alert, AlertTitle, AlertDescription, AlertAction } from \"./ui/Alert\";\n\n// shadcn-compatible components from heroui/ (HeroUI-based)\nexport { default as HeroUIDialog, Dialog, DialogTrigger, DialogPortal, DialogClose, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription } from \"./heroui/Dialog\";\nexport { default as HeroUIField, Field, FieldLabel, FieldDescription, FieldError } from \"./heroui/Field\";\nexport { default as HeroUICollapsible, Collapsible, CollapsibleTrigger, CollapsibleContent } from \"./heroui/Collapsible\";\nexport { default as HeroUIPopover, Popover, PopoverTrigger, PopoverContent } from \"./heroui/Popover\";\nexport { default as HeroUIDatePicker, DatePicker, DatePickerTrigger, DatePickerContent, DatePickerCalendar, DatePickerRangeTrigger } from \"./heroui/DatePicker\";\n\n// HeroUI wrappers — pickers & forms\nexport { default as HeroUISelect, Select } from \"./heroui/Select\";\n\n// Re-export Select subcomponents for shadcn compatibility\nexport const SelectTrigger = ({ children, size, ...props }) => <button {...props}>{children}</button>;\nexport const SelectValue = ({ placeholder, ...props }) => <span {...props}>{placeholder}</span>;\nexport const SelectContent = ({ children, ...props }) => <div {...props}>{children}</div>;\nexport const SelectItem = ({ children, ...props }) => <div {...props}>{children}</div>;\n\n// HeroUI wrappers — utilities\nexport { default as HeroUIKbd, Kbd } from \"./heroui/Kbd\";\nexport { default as HeroUIScrollShadow, ScrollShadow } from \"./heroui/ScrollShadow\";\n"],"names":["Breadcrumb","children","props","jsx","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","href","asChild","BreadcrumbPage","BreadcrumbSeparator","BreadcrumbEllipsis","PaginationContent","PaginationItem","PaginationLink","isActive","PaginationPrevious","PaginationNext","PaginationEllipsis","SelectTrigger","size","SelectValue","placeholder","SelectContent","SelectItem"],"mappings":";;;;;;;;;;;;AA6FO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,EAAA,MAAY,gBAAAC,EAAC,OAAA,EAAI,cAAW,cAAc,GAAGD,GAAQ,U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AP,GAAM,UAAAQ,GAAU,UAAAd,GAAU,GAAGC,EAAA,MAAY,gBAAAC,EAAC,KAAA,EAAE,MAAAI,GAAY,gBAAcQ,IAAW,SAAS,QAAW,WAAW,gGAAgGA,IAAW,iEAAiE,4CAA4C,IAAK,GAAGb,GAAQ,UAAAD,EAAA,CAAS,GACrXe,IAAqB,CAAC,EAAE,MAAAT,GAAM,GAAGL,EAAA,MAAY,gBAAAC,EAACW,GAAA,EAAe,MAAAP,GAAa,GAAGL,GAAO,UAAA,WAAA,CAAQ,GAC5Fe,IAAiB,CAAC,EAAE,MAAAV,GAAM,GAAGL,EAAA,MAAY,gBAAAC,EAACW,GAAA,EAAe,MAAAP,GAAa,GAAGL,GAAO,UAAA,OAAA,CAAI,GACpFgB,IAAqB,CAAChB,MAAU,gBAAAC,EAAC,UAAK,eAAW,IAAE,GAAGD,GAAO,UAAA,MAAA,CAAG,GA+BhEiB,IAAgB,CAAC,EAAE,UAAAlB,GAAU,MAAAmB,GAAM,GAAGlB,QAAY,gBAAAC,EAAC,UAAA,EAAQ,GAAGD,GAAQ,UAAAD,EAAA,CAAS,GAC/EoB,IAAc,CAAC,EAAE,aAAAC,GAAa,GAAGpB,EAAA,MAAY,gBAAAC,EAAC,QAAA,EAAM,GAAGD,GAAQ,UAAAoB,EAAA,CAAY,GAC3EC,IAAgB,CAAC,EAAE,UAAAtB,GAAU,GAAGC,EAAA,MAAY,gBAAAC,EAAC,OAAA,EAAK,GAAGD,GAAQ,UAAAD,EAAA,CAAS,GACtEuB,IAAa,CAAC,EAAE,UAAAvB,GAAU,GAAGC,EAAA,MAAY,gBAAAC,EAAC,OAAA,EAAK,GAAGD,GAAQ,UAAAD,EAAA,CAAS;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/library/index.jsx"],"sourcesContent":["export { default as AppThemeProvider, useThemeMode } from \"./theme/AppThemeProvider\";\n\n// UI primitives\nexport { default as UIButton } from \"./ui/UIButton\";\nexport { default as UIInput } from \"./ui/UIInput\";\nexport { default as UIToggle } from \"./ui/Toggle\";\nexport { default as UIText } from \"./ui/Text\";\nexport { default as UICard, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from \"./ui/Card\";\nexport { default as UIContainer } from \"./ui/Container\";\nexport { default as UIChip } from \"./ui/Chip\";\nexport { default as Avatar } from \"./ui/Avatar\";\nexport { default as Spinner } from \"./ui/Spinner\";\nexport { default as EmptyState } from \"./ui/EmptyState\";\nexport { default as Label } from \"./ui/Label\";\nexport { default as Checkbox } from \"./ui/Checkbox\";\nexport { default as FieldGroup } from \"./ui/FieldGroup\";\n\n// Cards\nexport { default as BaseCard } from \"./cards/BaseCard\";\nexport { default as ChartCard } from \"./cards/ChartCard\";\nexport { default as ListCard } from \"./cards/ListCard\";\nexport { default as MetricCard } from \"./cards/MetricCard\";\nexport { default as SectionCard } from \"./cards/SectionCard\";\nexport { default as StatusCard } from \"./cards/StatusCard\";\nexport { default as TableCard } from \"./cards/TableCard\";\nexport { default as WidgetCard } from \"./cards/WidgetCard\";\nexport { default as FeedPanel } from \"./cards/FeedPanel\";\nexport { default as ActivityCard } from \"./cards/ActivityCard\";\nexport { default as MetricsStrip } from \"./cards/MetricsStrip\";\nexport { default as CalloutCard } from \"./cards/CalloutCard\";\nexport { default as ActionList } from \"./cards/ActionList\";\nexport { default as KanbanBoard } from \"./cards/KanbanBoard\";\n\n// Charts\nexport { default as D3Chart } from \"./charts/D3Chart\";\nexport { D3ChartTemplates } from \"./charts/D3ChartTemplates\";\nexport { default as GeoMap } from \"./charts/GeoMap\";\n\n// Layout\nexport { default as PageContainer } from \"./layout/PageContainer\";\n\n// Skeletons\nexport { default as CardSkeleton } from \"./skeletons/CardSkeleton\";\n\n// Forms\nexport { FormModal, FormRenderer, FormSection, FormField, useFormState } from \"./forms\";\n\n// Filters\nexport { FilterBar, SearchFilter, SelectFilter, ToggleFilter } from \"./filters\";\n\n// Data mode\nexport { default as DataModeProvider, useDataMode } from \"./data/DataModeProvider\";\nexport { default as DataModeToggle } from \"./data/DataModeToggle\";\nexport { default as useDataSource } from \"./data/useDataSource\";\n\n// Data utilities\nexport { default as usePageFilters } from \"./data/usePageFilters\";\nexport {\n filterBySearch,\n filterByValue,\n filterByToggle,\n filterByDateRange,\n sortByKey,\n applyFilters,\n} from \"./data/filterUtils\";\n\n// Chat / AI agent\nexport {\n ChatPanel,\n ChatBar,\n ChatMessageList,\n ChatMessage,\n ChatInput,\n ChatTypingIndicator,\n ChatSuggestions,\n ChatToolCall,\n ChatWelcome,\n useChatState,\n} from \"./chat\";\n\n// HeroUI wrappers — existing\nexport { default as HeroUIButton, Button } from \"./heroui/Button\";\nexport { default as HeroUIInput } from \"./heroui/Input\";\nexport { default as HeroUICard } from \"./heroui/Card\";\nexport { default as HeroUIToggle } from \"./heroui/Toggle\";\n\n// HeroUI wrappers — navigation & layout\nexport { default as HeroUITabs, Tabs } from \"./heroui/Tabs\";\nexport { default as HeroUIAccordion, Accordion } from \"./heroui/Accordion\";\nexport { default as HeroUIBreadcrumbs, Breadcrumbs } from \"./heroui/Breadcrumbs\";\nexport { default as HeroUISeparator, Separator } from \"./heroui/Separator\";\nexport { default as HeroUIPagination, Pagination } from \"./heroui/Pagination\";\n\n// Breadcrumb subcomponents for shadcn compatibility\nexport const Breadcrumb = ({ children, ...props }) => <nav aria-label=\"breadcrumb\" {...props}>{children}</nav>;\nexport 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>;\nexport const BreadcrumbItem = ({ children, ...props }) => <li className=\"inline-flex items-center gap-1.5\" {...props}>{children}</li>;\nexport 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>;\nexport 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>;\nexport const BreadcrumbSeparator = ({ children, ...props }) => <li role=\"presentation\" aria-hidden=\"true\" {...props}>{children ?? \"/\"}</li>;\nexport const BreadcrumbEllipsis = (props) => <span role=\"presentation\" aria-hidden=\"true\" {...props}>...</span>;\n\n// Pagination subcomponents for shadcn compatibility\nexport const PaginationContent = ({ children, ...props }) => <ul className=\"flex flex-row items-center gap-1\" {...props}>{children}</ul>;\nexport const PaginationItem = ({ children, ...props }) => <li {...props}>{children}</li>;\nexport 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>;\nexport const PaginationPrevious = ({ href, ...props }) => <PaginationLink href={href} {...props}>Previous</PaginationLink>;\nexport const PaginationNext = ({ href, ...props }) => <PaginationLink href={href} {...props}>Next</PaginationLink>;\nexport const PaginationEllipsis = (props) => <span aria-hidden {...props}>...</span>;\n\n// HeroUI wrappers — overlays\nexport { default as HeroUIDrawer, Drawer } from \"./heroui/Drawer\";\nexport { default as HeroUIModal, Modal } from \"./heroui/Modal\";\nexport { default as HeroUIDropdown, Dropdown } from \"./heroui/Dropdown\";\nexport { default as HeroUITooltip, Tooltip } from \"./heroui/Tooltip\";\nexport { default as HeroUIToast, Toast, toast } from \"./heroui/Toast\";\n\n// HeroUI wrappers — feedback\nexport { default as HeroUIAlert } from \"./heroui/Alert\";\nexport { default as HeroUIBadge, Badge } from \"./heroui/Badge\";\nexport { default as HeroUIProgressBar, ProgressBar } from \"./heroui/ProgressBar\";\nexport { default as HeroUIProgressCircle, ProgressCircle } from \"./heroui/ProgressCircle\";\nexport { default as HeroUIMeter, Meter } from \"./heroui/Meter\";\nexport { default as HeroUISkeleton, Skeleton } from \"./heroui/Skeleton\";\n\n// shadcn-compatible components from ui/\nexport { default as Alert, AlertTitle, AlertDescription, AlertAction } from \"./ui/Alert\";\n\n// shadcn-compatible components from heroui/ (HeroUI-based)\nexport { default as HeroUIDialog, Dialog, DialogTrigger, DialogPortal, DialogClose, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription } from \"./heroui/Dialog\";\nexport { default as HeroUIField, Field, FieldLabel, FieldDescription, FieldError } from \"./heroui/Field\";\nexport { default as HeroUICollapsible, Collapsible, CollapsibleTrigger, CollapsibleContent } from \"./heroui/Collapsible\";\nexport { default as HeroUIPopover, Popover, PopoverTrigger, PopoverContent } from \"./heroui/Popover\";\nexport { default as HeroUIDatePicker, DatePicker, DatePickerTrigger, DatePickerContent, DatePickerCalendar, DatePickerRangeTrigger } from \"./heroui/DatePicker\";\n\n// HeroUI wrappers — pickers & forms\nexport { default as HeroUISelect, Select } from \"./heroui/Select\";\n\n// Re-export Select subcomponents for shadcn compatibility\nexport const SelectTrigger = ({ children, size, ...props }) => <button {...props}>{children}</button>;\nexport const SelectValue = ({ placeholder, ...props }) => <span {...props}>{placeholder}</span>;\nexport const SelectContent = ({ children, ...props }) => <div {...props}>{children}</div>;\nexport const SelectItem = ({ children, ...props }) => <div {...props}>{children}</div>;\n\n// HeroUI wrappers — utilities\nexport { default as HeroUIKbd, Kbd } from \"./heroui/Kbd\";\nexport { default as HeroUIScrollShadow, ScrollShadow } from \"./heroui/ScrollShadow\";\n"],"names":["Breadcrumb","children","props","jsx","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","href","asChild","BreadcrumbPage","BreadcrumbSeparator","BreadcrumbEllipsis","PaginationContent","PaginationItem","PaginationLink","isActive","PaginationPrevious","PaginationNext","PaginationEllipsis","SelectTrigger","size","SelectValue","placeholder","SelectContent","SelectItem"],"mappings":";;;;;;;;;;;;;;;AA8FO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,EAAA,MAAY,gBAAAC,EAAC,OA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line";
|
|
12
|
+
import "@dnd-kit/core";
|
|
13
|
+
import "@dnd-kit/sortable";
|
|
14
|
+
import "@dnd-kit/utilities";
|
|
12
15
|
import v from "../library/charts/D3Chart.js";
|
|
13
16
|
import { D3ChartTemplates as N } from "../library/charts/D3ChartTemplates.js";
|
|
14
17
|
import "../library/charts/GeoMap.js";
|
|
@@ -218,7 +221,7 @@ let C = { ...y };
|
|
|
218
221
|
function w() {
|
|
219
222
|
return C;
|
|
220
223
|
}
|
|
221
|
-
function
|
|
224
|
+
function F(t, a) {
|
|
222
225
|
const l = w()[t.type];
|
|
223
226
|
return l ? /* @__PURE__ */ e(l, { ...t.props ?? {} }, t.id ?? a) : /* @__PURE__ */ i("div", { className: "rounded-lg border border-dashed border-slate-300 p-3 text-xs text-slate-500 dark:border-slate-700", children: [
|
|
224
227
|
"Unknown component: ",
|
|
@@ -227,6 +230,6 @@ function V(t, a) {
|
|
|
227
230
|
}
|
|
228
231
|
export {
|
|
229
232
|
w as getComponentRegistry,
|
|
230
|
-
|
|
233
|
+
F as renderSchemaComponent
|
|
231
234
|
};
|
|
232
235
|
//# sourceMappingURL=ComponentRegistry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentRegistry.js","sources":["../../../src/components/workspace/ComponentRegistry.jsx"],"sourcesContent":["import React from \"react\";\nimport {\n BaseCard,\n MetricCard,\n TableCard,\n ChartCard,\n D3Chart,\n D3ChartTemplates,\n StatusCard,\n ListCard,\n UIButton,\n UIChip,\n UIText\n} from \"@/components/library\";\n\nconst BUILTIN_COMPONENTS = {\n NarrativeSummary({ summary, title }) {\n return (\n <div className=\"text-sm text-slate-600 dark:text-slate-300\">\n {title && <div className=\"mb-1 font-medium text-slate-900 dark:text-slate-50\">{title}</div>}\n {summary}\n </div>\n );\n },\n\n MetricsStrip({ metrics = [], title, collapsible = false, collapsed: initialCollapsed = false }) {\n const [collapsed, setCollapsed] = React.useState(initialCollapsed);\n\n const items = metrics.length ? metrics : [\n { label: \"Metric A\", value: \"—\", trend: null },\n { label: \"Metric B\", value: \"—\", trend: null },\n { label: \"Metric C\", value: \"—\", trend: null }\n ];\n\n if (collapsible && collapsed) {\n return (\n <button\n type=\"button\"\n onClick={() => setCollapsed(false)}\n className=\"flex w-full items-center justify-between rounded-lg border border-slate-200 bg-white px-3 py-2 text-left text-xs text-slate-500 hover:bg-slate-50 dark:border-slate-800 dark:bg-slate-900 dark:text-slate-400 dark:hover:bg-slate-800\"\n >\n <span>{title ?? \"Metrics\"}: {items.map(m => `${m.label} ${m.value}`).join(\" · \")}</span>\n <span>▸</span>\n </button>\n );\n }\n\n return (\n <div className=\"rounded-xl border border-slate-200 bg-white p-3 dark:border-slate-800 dark:bg-slate-900\">\n {(title || collapsible) && (\n <div className=\"mb-2 flex items-center justify-between\">\n <span className=\"text-xs font-medium text-slate-500 dark:text-slate-400\">{title ?? \"Metrics\"}</span>\n {collapsible && (\n <button\n type=\"button\"\n onClick={() => setCollapsed(true)}\n className=\"text-xs text-slate-400 hover:text-slate-600 dark:text-slate-500 dark:hover:text-slate-300\"\n >\n Collapse\n </button>\n )}\n </div>\n )}\n <div className=\"flex flex-wrap gap-4\">\n {items.map((m) => (\n <div key={m.label} className=\"min-w-[80px]\">\n <div className=\"text-xs text-slate-400 dark:text-slate-500\">{m.label}</div>\n <div className=\"flex items-baseline gap-1.5\">\n <span className=\"text-sm font-semibold text-slate-700 dark:text-slate-200\">{m.value}</span>\n {m.trend && (\n <span className={`text-xs ${String(m.trend).startsWith?.(\"+\") || m.trend > 0 ? \"text-red-500\" : \"text-emerald-500\"}`}>\n {typeof m.trend === \"number\" ? (m.trend > 0 ? `+${m.trend}` : m.trend) : m.trend}\n </span>\n )}\n </div>\n </div>\n ))}\n </div>\n </div>\n );\n },\n\n ItemList({ items = [], title, onItemClick }) {\n const [expanded, setExpanded] = React.useState(null);\n if (!items.length) {\n return <div className=\"text-sm text-slate-500 dark:text-slate-400\">No items.</div>;\n }\n return (\n <div className=\"space-y-2\">\n {title && (\n <div className=\"flex items-center justify-between\">\n <span className=\"text-sm font-medium text-slate-900 dark:text-slate-50\">{title}</span>\n <span className=\"text-xs text-slate-400 dark:text-slate-500\">{items.length} items</span>\n </div>\n )}\n <div className=\"space-y-1.5\">\n {items.map((item, idx) => (\n <div key={item.id ?? idx} className=\"rounded-xl border border-slate-200 bg-white dark:border-slate-800 dark:bg-slate-900\">\n <button\n type=\"button\"\n onClick={() => {\n setExpanded(expanded === (item.id ?? idx) ? null : (item.id ?? idx));\n onItemClick?.(item);\n }}\n className=\"flex w-full items-start justify-between gap-3 p-3 text-left\"\n >\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-start justify-between gap-2\">\n <div className=\"text-sm font-medium text-slate-900 dark:text-slate-50\">\n {item.title ?? item.name ?? `Item ${idx + 1}`}\n </div>\n {item.status && (\n <UIChip tone={item.status === \"critical\" ? \"danger\" : item.status === \"warning\" ? \"warning\" : \"neutral\"} className=\"shrink-0\">\n {item.status}\n </UIChip>\n )}\n </div>\n {item.description && (\n <div className=\"mt-1 text-xs text-slate-500 dark:text-slate-400\">{item.description}</div>\n )}\n </div>\n </button>\n {expanded === (item.id ?? idx) && item.actions && (\n <div className=\"border-t border-slate-100 px-3 py-2 dark:border-slate-800\">\n <div className=\"flex flex-wrap gap-1.5\">\n {item.actions.map((action, i) => (\n <button\n key={typeof action === \"string\" ? action : action.label}\n type=\"button\"\n className={`rounded-md px-2.5 py-1 text-xs font-medium transition-colors ${\n i === 0\n ? \"bg-slate-900 text-white hover:bg-slate-800 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-200\"\n : \"bg-slate-100 text-slate-700 hover:bg-slate-200 dark:bg-slate-800 dark:text-slate-300 dark:hover:bg-slate-700\"\n }`}\n >\n {typeof action === \"string\" ? action : action.label}\n </button>\n ))}\n </div>\n </div>\n )}\n </div>\n ))}\n </div>\n </div>\n );\n },\n\n DataTable({ title, subtitle, columns = [], data = [], rows, searchable = true, sortable = true, paginated = true, pageSize = 5 }) {\n const tableData = data.length ? data : (rows ?? []);\n const cols = columns.length ? columns : [\n { key: \"name\", label: \"Name\" },\n { key: \"status\", label: \"Status\" },\n { key: \"value\", label: \"Value\" }\n ];\n return (\n <TableCard\n title={title ?? \"Data\"}\n subtitle={subtitle}\n columns={cols}\n data={tableData}\n searchable={searchable}\n sortable={sortable}\n paginated={paginated}\n pageSize={pageSize}\n />\n );\n },\n\n DataChart({ title, subtitle, chartType = \"line\", data = [], height = 200 }) {\n const series = data.length ? data : Array.from({ length: 12 }, (_, i) => ({ x: i, y: Math.random() * 100 }));\n return (\n <ChartCard\n title={title ?? \"Trend\"}\n subtitle={subtitle ?? \"Data visualization\"}\n chartType={chartType}\n height={height}\n chart={\n <D3Chart\n data={series}\n responsive\n height={height}\n ariaLabel={title}\n renderChart={(svg, d, dims, opts) => D3ChartTemplates.lineChart(svg, d, dims, opts)}\n options={{ xKey: \"x\", yKey: \"y\", showGrid: true, showAxes: true }}\n />\n }\n />\n );\n },\n\n MetricCard({ title, label, value, trend, change, changeType, color, icon, description }) {\n return (\n <MetricCard\n title={title ?? label}\n value={value ?? \"—\"}\n trend={trend}\n change={change}\n changeType={changeType}\n color={color}\n icon={icon}\n description={description}\n />\n );\n },\n\n StatusCard({ title, subtitle, status, items, layout, showProgress, showTimestamp }) {\n return (\n <StatusCard\n title={title}\n subtitle={subtitle}\n status={status}\n items={items}\n layout={layout}\n showProgress={showProgress}\n showTimestamp={showTimestamp}\n />\n );\n },\n\n ActionList({ actions = [], title, onAction }) {\n return (\n <div className=\"rounded-2xl border border-slate-200 bg-white p-4 dark:border-slate-800 dark:bg-slate-900\">\n {title && <div className=\"mb-3 text-sm font-medium text-slate-900 dark:text-slate-50\">{title}</div>}\n <div className=\"flex flex-wrap gap-2\">\n {actions.map((action, i) => (\n <UIButton\n key={i}\n size=\"sm\"\n variant={i === 0 ? \"primary\" : \"outline\"}\n onClick={() => onAction?.(action)}\n >\n {typeof action === \"string\" ? action : action.label}\n </UIButton>\n ))}\n </div>\n </div>\n );\n },\n\n CalloutCard({ title, message, tone = \"neutral\" }) {\n const toneClasses = {\n neutral: \"border-slate-200 bg-slate-50 text-slate-700 dark:border-slate-800 dark:bg-slate-950/30 dark:text-slate-200\",\n success: \"border-emerald-200 bg-emerald-50 text-emerald-800 dark:border-emerald-900/40 dark:bg-emerald-950/20 dark:text-emerald-200\",\n warning: \"border-amber-200 bg-amber-50 text-amber-800 dark:border-amber-900/40 dark:bg-amber-950/20 dark:text-amber-200\",\n danger: \"border-rose-200 bg-rose-50 text-rose-800 dark:border-rose-900/40 dark:bg-rose-950/20 dark:text-rose-200\"\n };\n return (\n <div className={`rounded-xl border p-4 ${toneClasses[tone] ?? toneClasses.neutral}`}>\n {title && <div className=\"mb-1 text-sm font-semibold\">{title}</div>}\n <div className=\"text-sm\">{message}</div>\n </div>\n );\n },\n\n Divider() {\n return <div className=\"h-px bg-slate-200 dark:bg-slate-800\" />;\n },\n\n Spacer({ size = \"md\" }) {\n const heights = { sm: \"h-2\", md: \"h-4\", lg: \"h-6\" };\n return <div className={heights[size] ?? heights.md} />;\n }\n};\n\nlet _registry = { ...BUILTIN_COMPONENTS };\n\nexport function getComponentRegistry() {\n return _registry;\n}\n\nexport function registerComponent(type, Component) {\n _registry = { ..._registry, [type]: Component };\n}\n\nexport function registerComponents(map) {\n _registry = { ..._registry, ...map };\n}\n\nexport function renderSchemaComponent(component, index) {\n const registry = getComponentRegistry();\n const Component = registry[component.type];\n if (!Component) {\n return (\n <div key={index} className=\"rounded-lg border border-dashed border-slate-300 p-3 text-xs text-slate-500 dark:border-slate-700\">\n Unknown component: {component.type}\n </div>\n );\n }\n return <Component key={component.id ?? index} {...(component.props ?? {})} />;\n}\n\nexport function renderSchema(components = []) {\n return components.map((c, i) => renderSchemaComponent(c, i));\n}\n\nexport default BUILTIN_COMPONENTS;\n"],"names":["BUILTIN_COMPONENTS","summary","title","jsxs","jsx","metrics","collapsible","initialCollapsed","collapsed","setCollapsed","React","items","m","onItemClick","expanded","setExpanded","item","idx","UIChip","action","i","subtitle","columns","data","rows","searchable","sortable","paginated","pageSize","tableData","cols","TableCard","chartType","height","series","_","ChartCard","D3Chart","svg","d","dims","opts","D3ChartTemplates","label","value","trend","change","changeType","color","icon","description","MetricCard","status","layout","showProgress","showTimestamp","StatusCard","actions","onAction","UIButton","message","tone","toneClasses","size","heights","_registry","getComponentRegistry","renderSchemaComponent","component","index","Component"],"mappings":";;;;;;;;;;;;;;;;;;;AAeA,MAAMA,IAAqB;AAAA,EACzB,iBAAiB,EAAE,SAAAC,GAAS,OAAAC,KAAS;AACnC,WACE,gBAAAC,EAAC,OAAA,EAAI,WAAU,8CACZ,UAAA;AAAA,MAAAD,KAAS,gBAAAE,EAAC,OAAA,EAAI,WAAU,sDAAsD,UAAAF,GAAM;AAAA,MACpFD;AAAA,IAAA,GACH;AAAA,EAEJ;AAAA,EAEA,aAAa,EAAE,SAAAI,IAAU,CAAA,GAAI,OAAAH,GAAO,aAAAI,IAAc,IAAO,WAAWC,IAAmB,MAAS;AAC9F,UAAM,CAACC,GAAWC,CAAY,IAAIC,EAAM,SAASH,CAAgB,GAE3DI,IAAQN,EAAQ,SAASA,IAAU;AAAA,MACvC,EAAE,OAAO,YAAY,OAAO,KAAK,OAAO,KAAA;AAAA,MACxC,EAAE,OAAO,YAAY,OAAO,KAAK,OAAO,KAAA;AAAA,MACxC,EAAE,OAAO,YAAY,OAAO,KAAK,OAAO,KAAA;AAAA,IAAK;AAG/C,WAAIC,KAAeE,IAEf,gBAAAL;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,SAAS,MAAMM,EAAa,EAAK;AAAA,QACjC,WAAU;AAAA,QAEV,UAAA;AAAA,UAAA,gBAAAN,EAAC,QAAA,EAAM,UAAA;AAAA,YAAAD,KAAS;AAAA,YAAU;AAAA,YAAGS,EAAM,IAAI,CAAAC,MAAK,GAAGA,EAAE,KAAK,IAAIA,EAAE,KAAK,EAAE,EAAE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A,EAAI,WAAU,WAAW,UAAAwD,EAAA,CAAQ;AAAA,IAAA,GACpC;AAAA,EAEJ;AAAA,EAEA,UAAU;AACR,WAAO,gBAAAxD,EAAC,OAAA,EAAI,WAAU,sCAAA,CAAsC;AAAA,EAC9D;AAAA,EAEA,OAAO,EAAE,MAAA2D,IAAO,QAAQ;AACtB,UAAMC,IAAU,EAAE,IAAI,OAAO,IAAI,OAAO,IAAI,MAAA;AAC5C,6BAAQ,OAAA,EAAI,WAAWA,EAAQD,CAAI,KAAKC,EAAQ,IAAI;AAAA,EACtD;AACF;AAEA,IAAIC,IAAY,EAAE,GAAGjE,EAAA;AAEd,SAASkE,IAAuB;AACrC,SAAOD;AACT;AAUO,SAASE,EAAsBC,GAAWC,GAAO;AAEtD,QAAMC,IADWJ,EAAA,EACUE,EAAU,IAAI;AACzC,SAAKE,IAOE,gBAAAlE,EAACkE,KAAuC,GAAIF,EAAU,SAAS,CAAA,KAA/CA,EAAU,MAAMC,CAAoC,IALvE,gBAAAlE,EAAC,OAAA,EAAgB,WAAU,qGAAoG,UAAA;AAAA,IAAA;AAAA,IACzGiE,EAAU;AAAA,EAAA,EAAA,GADtBC,CAEV;AAIN;"}
|
|
1
|
+
{"version":3,"file":"ComponentRegistry.js","sources":["../../../src/components/workspace/ComponentRegistry.jsx"],"sourcesContent":["import React from \"react\";\nimport {\n BaseCard,\n MetricCard,\n TableCard,\n ChartCard,\n D3Chart,\n D3ChartTemplates,\n StatusCard,\n ListCard,\n UIButton,\n UIChip,\n UIText\n} from \"@/components/library\";\n\nconst BUILTIN_COMPONENTS = {\n NarrativeSummary({ summary, title }) {\n return (\n <div className=\"text-sm text-slate-600 dark:text-slate-300\">\n {title && <div className=\"mb-1 font-medium text-slate-900 dark:text-slate-50\">{title}</div>}\n {summary}\n </div>\n );\n },\n\n MetricsStrip({ metrics = [], title, collapsible = false, collapsed: initialCollapsed = false }) {\n const [collapsed, setCollapsed] = React.useState(initialCollapsed);\n\n const items = metrics.length ? metrics : [\n { label: \"Metric A\", value: \"—\", trend: null },\n { label: \"Metric B\", value: \"—\", trend: null },\n { label: \"Metric C\", value: \"—\", trend: null }\n ];\n\n if (collapsible && collapsed) {\n return (\n <button\n type=\"button\"\n onClick={() => setCollapsed(false)}\n className=\"flex w-full items-center justify-between rounded-lg border border-slate-200 bg-white px-3 py-2 text-left text-xs text-slate-500 hover:bg-slate-50 dark:border-slate-800 dark:bg-slate-900 dark:text-slate-400 dark:hover:bg-slate-800\"\n >\n <span>{title ?? \"Metrics\"}: {items.map(m => `${m.label} ${m.value}`).join(\" · \")}</span>\n <span>▸</span>\n </button>\n );\n }\n\n return (\n <div className=\"rounded-xl border border-slate-200 bg-white p-3 dark:border-slate-800 dark:bg-slate-900\">\n {(title || collapsible) && (\n <div className=\"mb-2 flex items-center justify-between\">\n <span className=\"text-xs font-medium text-slate-500 dark:text-slate-400\">{title ?? \"Metrics\"}</span>\n {collapsible && (\n <button\n type=\"button\"\n onClick={() => setCollapsed(true)}\n className=\"text-xs text-slate-400 hover:text-slate-600 dark:text-slate-500 dark:hover:text-slate-300\"\n >\n Collapse\n </button>\n )}\n </div>\n )}\n <div className=\"flex flex-wrap gap-4\">\n {items.map((m) => (\n <div key={m.label} className=\"min-w-[80px]\">\n <div className=\"text-xs text-slate-400 dark:text-slate-500\">{m.label}</div>\n <div className=\"flex items-baseline gap-1.5\">\n <span className=\"text-sm font-semibold text-slate-700 dark:text-slate-200\">{m.value}</span>\n {m.trend && (\n <span className={`text-xs ${String(m.trend).startsWith?.(\"+\") || m.trend > 0 ? \"text-red-500\" : \"text-emerald-500\"}`}>\n {typeof m.trend === \"number\" ? (m.trend > 0 ? `+${m.trend}` : m.trend) : m.trend}\n </span>\n )}\n </div>\n </div>\n ))}\n </div>\n </div>\n );\n },\n\n ItemList({ items = [], title, onItemClick }) {\n const [expanded, setExpanded] = React.useState(null);\n if (!items.length) {\n return <div className=\"text-sm text-slate-500 dark:text-slate-400\">No items.</div>;\n }\n return (\n <div className=\"space-y-2\">\n {title && (\n <div className=\"flex items-center justify-between\">\n <span className=\"text-sm font-medium text-slate-900 dark:text-slate-50\">{title}</span>\n <span className=\"text-xs text-slate-400 dark:text-slate-500\">{items.length} items</span>\n </div>\n )}\n <div className=\"space-y-1.5\">\n {items.map((item, idx) => (\n <div key={item.id ?? idx} className=\"rounded-xl border border-slate-200 bg-white dark:border-slate-800 dark:bg-slate-900\">\n <button\n type=\"button\"\n onClick={() => {\n setExpanded(expanded === (item.id ?? idx) ? null : (item.id ?? idx));\n onItemClick?.(item);\n }}\n className=\"flex w-full items-start justify-between gap-3 p-3 text-left\"\n >\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-start justify-between gap-2\">\n <div className=\"text-sm font-medium text-slate-900 dark:text-slate-50\">\n {item.title ?? item.name ?? `Item ${idx + 1}`}\n </div>\n {item.status && (\n <UIChip tone={item.status === \"critical\" ? \"danger\" : item.status === \"warning\" ? \"warning\" : \"neutral\"} className=\"shrink-0\">\n {item.status}\n </UIChip>\n )}\n </div>\n {item.description && (\n <div className=\"mt-1 text-xs text-slate-500 dark:text-slate-400\">{item.description}</div>\n )}\n </div>\n </button>\n {expanded === (item.id ?? idx) && item.actions && (\n <div className=\"border-t border-slate-100 px-3 py-2 dark:border-slate-800\">\n <div className=\"flex flex-wrap gap-1.5\">\n {item.actions.map((action, i) => (\n <button\n key={typeof action === \"string\" ? action : action.label}\n type=\"button\"\n className={`rounded-md px-2.5 py-1 text-xs font-medium transition-colors ${\n i === 0\n ? \"bg-slate-900 text-white hover:bg-slate-800 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-200\"\n : \"bg-slate-100 text-slate-700 hover:bg-slate-200 dark:bg-slate-800 dark:text-slate-300 dark:hover:bg-slate-700\"\n }`}\n >\n {typeof action === \"string\" ? action : action.label}\n </button>\n ))}\n </div>\n </div>\n )}\n </div>\n ))}\n </div>\n </div>\n );\n },\n\n DataTable({ title, subtitle, columns = [], data = [], rows, searchable = true, sortable = true, paginated = true, pageSize = 5 }) {\n const tableData = data.length ? data : (rows ?? []);\n const cols = columns.length ? columns : [\n { key: \"name\", label: \"Name\" },\n { key: \"status\", label: \"Status\" },\n { key: \"value\", label: \"Value\" }\n ];\n return (\n <TableCard\n title={title ?? \"Data\"}\n subtitle={subtitle}\n columns={cols}\n data={tableData}\n searchable={searchable}\n sortable={sortable}\n paginated={paginated}\n pageSize={pageSize}\n />\n );\n },\n\n DataChart({ title, subtitle, chartType = \"line\", data = [], height = 200 }) {\n const series = data.length ? data : Array.from({ length: 12 }, (_, i) => ({ x: i, y: Math.random() * 100 }));\n return (\n <ChartCard\n title={title ?? \"Trend\"}\n subtitle={subtitle ?? \"Data visualization\"}\n chartType={chartType}\n height={height}\n chart={\n <D3Chart\n data={series}\n responsive\n height={height}\n ariaLabel={title}\n renderChart={(svg, d, dims, opts) => D3ChartTemplates.lineChart(svg, d, dims, opts)}\n options={{ xKey: \"x\", yKey: \"y\", showGrid: true, showAxes: true }}\n />\n }\n />\n );\n },\n\n MetricCard({ title, label, value, trend, change, changeType, color, icon, description }) {\n return (\n <MetricCard\n title={title ?? label}\n value={value ?? \"—\"}\n trend={trend}\n change={change}\n changeType={changeType}\n color={color}\n icon={icon}\n description={description}\n />\n );\n },\n\n StatusCard({ title, subtitle, status, items, layout, showProgress, showTimestamp }) {\n return (\n <StatusCard\n title={title}\n subtitle={subtitle}\n status={status}\n items={items}\n layout={layout}\n showProgress={showProgress}\n showTimestamp={showTimestamp}\n />\n );\n },\n\n ActionList({ actions = [], title, onAction }) {\n return (\n <div className=\"rounded-2xl border border-slate-200 bg-white p-4 dark:border-slate-800 dark:bg-slate-900\">\n {title && <div className=\"mb-3 text-sm font-medium text-slate-900 dark:text-slate-50\">{title}</div>}\n <div className=\"flex flex-wrap gap-2\">\n {actions.map((action, i) => (\n <UIButton\n key={i}\n size=\"sm\"\n variant={i === 0 ? \"primary\" : \"outline\"}\n onClick={() => onAction?.(action)}\n >\n {typeof action === \"string\" ? action : action.label}\n </UIButton>\n ))}\n </div>\n </div>\n );\n },\n\n CalloutCard({ title, message, tone = \"neutral\" }) {\n const toneClasses = {\n neutral: \"border-slate-200 bg-slate-50 text-slate-700 dark:border-slate-800 dark:bg-slate-950/30 dark:text-slate-200\",\n success: \"border-emerald-200 bg-emerald-50 text-emerald-800 dark:border-emerald-900/40 dark:bg-emerald-950/20 dark:text-emerald-200\",\n warning: \"border-amber-200 bg-amber-50 text-amber-800 dark:border-amber-900/40 dark:bg-amber-950/20 dark:text-amber-200\",\n danger: \"border-rose-200 bg-rose-50 text-rose-800 dark:border-rose-900/40 dark:bg-rose-950/20 dark:text-rose-200\"\n };\n return (\n <div className={`rounded-xl border p-4 ${toneClasses[tone] ?? toneClasses.neutral}`}>\n {title && <div className=\"mb-1 text-sm font-semibold\">{title}</div>}\n <div className=\"text-sm\">{message}</div>\n </div>\n );\n },\n\n Divider() {\n return <div className=\"h-px bg-slate-200 dark:bg-slate-800\" />;\n },\n\n Spacer({ size = \"md\" }) {\n const heights = { sm: \"h-2\", md: \"h-4\", lg: \"h-6\" };\n return <div className={heights[size] ?? heights.md} />;\n }\n};\n\nlet _registry = { ...BUILTIN_COMPONENTS };\n\nexport function getComponentRegistry() {\n return _registry;\n}\n\nexport function registerComponent(type, Component) {\n _registry = { ..._registry, [type]: Component };\n}\n\nexport function registerComponents(map) {\n _registry = { ..._registry, ...map };\n}\n\nexport function renderSchemaComponent(component, index) {\n const registry = getComponentRegistry();\n const Component = registry[component.type];\n if (!Component) {\n return (\n <div key={index} className=\"rounded-lg border border-dashed border-slate-300 p-3 text-xs text-slate-500 dark:border-slate-700\">\n Unknown component: {component.type}\n </div>\n );\n }\n return <Component key={component.id ?? index} {...(component.props ?? {})} />;\n}\n\nexport function renderSchema(components = []) {\n return components.map((c, i) => renderSchemaComponent(c, i));\n}\n\nexport default BUILTIN_COMPONENTS;\n"],"names":["BUILTIN_COMPONENTS","summary","title","jsxs","jsx","metrics","collapsible","initialCollapsed","collapsed","setCollapsed","React","items","m","onItemClick","expanded","setExpanded","item","idx","UIChip","action","i","subtitle","columns","data","rows","searchable","sortable","paginated","pageSize","tableData","cols","TableCard","chartType","height","series","_","ChartCard","D3Chart","svg","d","dims","opts","D3ChartTemplates","label","value","trend","change","changeType","color","icon","description","MetricCard","status","layout","showProgress","showTimestamp","StatusCard","actions","onAction","UIButton","message","tone","toneClasses","size","heights","_registry","getComponentRegistry","renderSchemaComponent","component","index","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAeA,MAAMA,IAAqB;AAAA,EACzB,iBAAiB,EAAE,SAAAC,GAAS,OAAAC,KAAS;AACnC,WACE,gBAAAC,EAAC,OAAA,EAAI,WAAU,8CACZ,UAAA;AAAA,MAAAD,KAAS,gBAAAE,EAAC,OAAA,EAAI,WAAU,sDAAsD,UAAAF,GAAM;AAAA,MACpFD;AAAA,IAAA,GACH;AAAA,EAEJ;AAAA,EAEA,aAAa,EAAE,SAAAI,IAAU,CAAA,GAAI,OAAAH,GAAO,aAAAI,IAAc,IAAO,WAAWC,IAAmB,MAAS;AAC9F,UAAM,CAACC,GAAWC,CAAY,IAAIC,EAAM,SAASH,CAAgB,GAE3DI,IAAQN,EAAQ,SAASA,IAAU;AAAA,MACvC,EAAE,OAAO,YAAY,OAAO,KAAK,OAAO,KAAA;AAAA,MACxC,EAAE,OAAO,YAAY,OAAO,KAAK,OAAO,KAAA;AAAA,MACxC,EAAE,OAAO,YAAY,OAAO,KAAK,OAAO,KAAA;AAAA,IAAK;AAG/C,WAAIC,KAAeE,IAEf,gBAAAL;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,SAAS,MAAMM,EAAa,EAAK;AAAA,QACjC,WAAU;AAAA,QAEV,UAAA;AAAA,UAAA,gBAAAN,EAAC,QAAA,EAAM,UAAA;AAAA,YAAAD,KAAS;AAAA,YAAU;AAAA,YAAGS,EAAM,IAAI,CAAAC,MAAK,GAAGA,EAAE,KAAK,IAAIA,EAAE,KAAK,EAAE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C,OAAA,EAAI,WAAU,WAAW,UAAAwD,EAAA,CAAQ;AAAA,IAAA,GACpC;AAAA,EAEJ;AAAA,EAEA,UAAU;AACR,WAAO,gBAAAxD,EAAC,OAAA,EAAI,WAAU,sCAAA,CAAsC;AAAA,EAC9D;AAAA,EAEA,OAAO,EAAE,MAAA2D,IAAO,QAAQ;AACtB,UAAMC,IAAU,EAAE,IAAI,OAAO,IAAI,OAAO,IAAI,MAAA;AAC5C,6BAAQ,OAAA,EAAI,WAAWA,EAAQD,CAAI,KAAKC,EAAQ,IAAI;AAAA,EACtD;AACF;AAEA,IAAIC,IAAY,EAAE,GAAGjE,EAAA;AAEd,SAASkE,IAAuB;AACrC,SAAOD;AACT;AAUO,SAASE,EAAsBC,GAAWC,GAAO;AAEtD,QAAMC,IADWJ,EAAA,EACUE,EAAU,IAAI;AACzC,SAAKE,IAOE,gBAAAlE,EAACkE,KAAuC,GAAIF,EAAU,SAAS,CAAA,KAA/CA,EAAU,MAAMC,CAAoC,IALvE,gBAAAlE,EAAC,OAAA,EAAgB,WAAU,qGAAoG,UAAA;AAAA,IAAA;AAAA,IACzGiE,EAAU;AAAA,EAAA,EAAA,GADtBC,CAEV;AAIN;"}
|
package/dist/index.js
CHANGED
|
@@ -59,35 +59,36 @@ import { default as oo } from "./components/library/heroui/Tabs.js";
|
|
|
59
59
|
import { default as to } from "./components/library/heroui/Toast.js";
|
|
60
60
|
import { default as fo } from "./components/library/heroui/Toggle.js";
|
|
61
61
|
import { default as po } from "./components/library/heroui/Tooltip.js";
|
|
62
|
-
import { default as mo } from "./components/library/
|
|
63
|
-
import { default as xo } from "./components/library/
|
|
64
|
-
import { default as go } from "./components/library/cards/
|
|
65
|
-
import { default as co } from "./components/library/cards/
|
|
66
|
-
import { default as Uo } from "./components/library/
|
|
67
|
-
import { default as Po } from "./components/library/
|
|
68
|
-
import { default as So } from "./components/library/
|
|
69
|
-
import { default as Bo } from "./components/library/
|
|
70
|
-
import { default as ho } from "./components/library/
|
|
71
|
-
import { default as Mo } from "./components/library/
|
|
72
|
-
import { default as Ao } from "./components/library/cards/
|
|
73
|
-
import { default as vo } from "./components/library/
|
|
74
|
-
import { default as wo } from "./components/library/
|
|
75
|
-
import {
|
|
76
|
-
import { default as qo } from "./components/library/ui/
|
|
77
|
-
import { default as Jo } from "./components/library/ui/
|
|
78
|
-
import { default as Xo } from "./components/library/ui/
|
|
79
|
-
import { default as Zo } from "./components/library/ui/
|
|
80
|
-
import { default as $o } from "./components/library/ui/
|
|
81
|
-
import { default as ra } from "./components/library/
|
|
82
|
-
import { default as aa } from "./components/library/
|
|
83
|
-
import { default as la } from "./components/library/
|
|
84
|
-
import { default as da } from "./components/library/
|
|
85
|
-
import { default as pa } from "./components/library/
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
62
|
+
import { default as mo } from "./components/library/cards/KanbanBoard.js";
|
|
63
|
+
import { default as xo } from "./components/library/ui/Label.js";
|
|
64
|
+
import { default as go } from "./components/library/cards/ListCard.js";
|
|
65
|
+
import { default as co } from "./components/library/cards/MetricCard.js";
|
|
66
|
+
import { default as Uo } from "./components/library/cards/MetricsStrip.js";
|
|
67
|
+
import { default as Po } from "./components/library/layout/PageContainer.js";
|
|
68
|
+
import { default as So } from "./components/library/filters/SearchFilter.js";
|
|
69
|
+
import { default as Bo } from "./components/library/cards/SectionCard.js";
|
|
70
|
+
import { default as ho } from "./components/library/filters/SelectFilter.js";
|
|
71
|
+
import { default as Mo } from "./components/library/ui/Spinner.js";
|
|
72
|
+
import { default as Ao } from "./components/library/cards/StatusCard.js";
|
|
73
|
+
import { default as vo } from "./components/library/cards/TableCard.js";
|
|
74
|
+
import { default as wo } from "./components/library/filters/ToggleFilter.js";
|
|
75
|
+
import { default as Ko } from "./components/library/ui/UIButton.js";
|
|
76
|
+
import { Card as Go, CardContent as Vo, CardDescription as Wo, CardFooter as No, CardHeader as Oo, CardTitle as jo, default as qo } from "./components/library/ui/Card.js";
|
|
77
|
+
import { default as Jo } from "./components/library/ui/Chip.js";
|
|
78
|
+
import { default as Xo } from "./components/library/ui/Container.js";
|
|
79
|
+
import { default as Zo } from "./components/library/ui/UIInput.js";
|
|
80
|
+
import { default as $o } from "./components/library/ui/Text.js";
|
|
81
|
+
import { default as ra } from "./components/library/ui/Toggle.js";
|
|
82
|
+
import { default as aa } from "./components/library/cards/WidgetCard.js";
|
|
83
|
+
import { default as la } from "./components/library/chat/useChatState.js";
|
|
84
|
+
import { default as da } from "./components/library/data/useDataSource.js";
|
|
85
|
+
import { default as pa } from "./components/library/forms/useFormState.js";
|
|
86
|
+
import { default as ma } from "./components/library/data/usePageFilters.js";
|
|
87
|
+
import { Accordion as xa, Badge as na, Breadcrumbs as ga, Drawer as Ca, Dropdown as ca, Kbd as Ia, Meter as Ua, Modal as Da, Pagination as Pa, ProgressBar as Ha, ProgressCircle as Sa, ScrollShadow as Ta, Separator as Ba, Skeleton as ba, Tabs as ha, Toast as Fa, Tooltip as Ma, toast as ka } from "@heroui/react";
|
|
88
|
+
import { D3ChartTemplates as ya } from "./components/library/charts/D3ChartTemplates.js";
|
|
89
|
+
import { applyFilters as La, filterByDateRange as wa, filterBySearch as Ea, filterByToggle as Ka, filterByValue as Ra, sortByKey as Ga } from "./components/library/data/filterUtils.js";
|
|
89
90
|
export {
|
|
90
|
-
|
|
91
|
+
xa as Accordion,
|
|
91
92
|
H as ActionList,
|
|
92
93
|
T as ActivityCard,
|
|
93
94
|
b as Alert,
|
|
@@ -96,7 +97,7 @@ export {
|
|
|
96
97
|
M as AlertTitle,
|
|
97
98
|
A as AppThemeProvider,
|
|
98
99
|
L as Avatar,
|
|
99
|
-
|
|
100
|
+
na as Badge,
|
|
100
101
|
E as BaseCard,
|
|
101
102
|
t as Breadcrumb,
|
|
102
103
|
l as BreadcrumbEllipsis,
|
|
@@ -105,16 +106,16 @@ export {
|
|
|
105
106
|
s as BreadcrumbList,
|
|
106
107
|
p as BreadcrumbPage,
|
|
107
108
|
u as BreadcrumbSeparator,
|
|
108
|
-
|
|
109
|
+
ga as Breadcrumbs,
|
|
109
110
|
Oe as Button,
|
|
110
111
|
R as CalloutCard,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
Go as Card,
|
|
113
|
+
Vo as CardContent,
|
|
114
|
+
Wo as CardDescription,
|
|
115
|
+
No as CardFooter,
|
|
116
|
+
Oo as CardHeader,
|
|
116
117
|
V as CardSkeleton,
|
|
117
|
-
|
|
118
|
+
jo as CardTitle,
|
|
118
119
|
N as ChartCard,
|
|
119
120
|
j as ChatBar,
|
|
120
121
|
z as ChatInput,
|
|
@@ -130,7 +131,7 @@ export {
|
|
|
130
131
|
Xe as CollapsibleContent,
|
|
131
132
|
Ye as CollapsibleTrigger,
|
|
132
133
|
ue as D3Chart,
|
|
133
|
-
|
|
134
|
+
ya as D3ChartTemplates,
|
|
134
135
|
ie as DataModeProvider,
|
|
135
136
|
ge as DataModeToggle,
|
|
136
137
|
$e as DatePicker,
|
|
@@ -148,8 +149,8 @@ export {
|
|
|
148
149
|
xr as DialogPortal,
|
|
149
150
|
nr as DialogTitle,
|
|
150
151
|
gr as DialogTrigger,
|
|
151
|
-
|
|
152
|
-
|
|
152
|
+
Ca as Drawer,
|
|
153
|
+
ca as Dropdown,
|
|
153
154
|
ce as EmptyState,
|
|
154
155
|
Ue as FeedPanel,
|
|
155
156
|
Hr as Field,
|
|
@@ -191,15 +192,16 @@ export {
|
|
|
191
192
|
to as HeroUIToast,
|
|
192
193
|
fo as HeroUIToggle,
|
|
193
194
|
po as HeroUITooltip,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
xo as
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
co as
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
195
|
+
mo as KanbanBoard,
|
|
196
|
+
Ia as Kbd,
|
|
197
|
+
xo as Label,
|
|
198
|
+
go as ListCard,
|
|
199
|
+
Ua as Meter,
|
|
200
|
+
co as MetricCard,
|
|
201
|
+
Uo as MetricsStrip,
|
|
202
|
+
Da as Modal,
|
|
203
|
+
Po as PageContainer,
|
|
204
|
+
Pa as Pagination,
|
|
203
205
|
m as PaginationContent,
|
|
204
206
|
i as PaginationEllipsis,
|
|
205
207
|
x as PaginationItem,
|
|
@@ -209,47 +211,47 @@ export {
|
|
|
209
211
|
Gr as Popover,
|
|
210
212
|
Vr as PopoverContent,
|
|
211
213
|
Wr as PopoverTrigger,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
Ha as ProgressBar,
|
|
215
|
+
Sa as ProgressCircle,
|
|
216
|
+
Ta as ScrollShadow,
|
|
217
|
+
So as SearchFilter,
|
|
218
|
+
Bo as SectionCard,
|
|
217
219
|
Yr as Select,
|
|
218
220
|
c as SelectContent,
|
|
219
|
-
|
|
221
|
+
ho as SelectFilter,
|
|
220
222
|
I as SelectItem,
|
|
221
223
|
U as SelectTrigger,
|
|
222
224
|
D as SelectValue,
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
225
|
+
Ba as Separator,
|
|
226
|
+
ba as Skeleton,
|
|
227
|
+
Mo as Spinner,
|
|
228
|
+
Ao as StatusCard,
|
|
229
|
+
vo as TableCard,
|
|
230
|
+
ha as Tabs,
|
|
231
|
+
Fa as Toast,
|
|
232
|
+
wo as ToggleFilter,
|
|
233
|
+
Ma as Tooltip,
|
|
234
|
+
Ko as UIButton,
|
|
235
|
+
qo as UICard,
|
|
236
|
+
Jo as UIChip,
|
|
237
|
+
Xo as UIContainer,
|
|
238
|
+
Zo as UIInput,
|
|
239
|
+
$o as UIText,
|
|
240
|
+
ra as UIToggle,
|
|
241
|
+
aa as WidgetCard,
|
|
242
|
+
La as applyFilters,
|
|
241
243
|
o as cn,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
244
|
+
wa as filterByDateRange,
|
|
245
|
+
Ea as filterBySearch,
|
|
246
|
+
Ka as filterByToggle,
|
|
247
|
+
Ra as filterByValue,
|
|
248
|
+
Ga as sortByKey,
|
|
249
|
+
ka as toast,
|
|
250
|
+
la as useChatState,
|
|
249
251
|
xe as useDataMode,
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
252
|
+
da as useDataSource,
|
|
253
|
+
pa as useFormState,
|
|
254
|
+
ma as usePageFilters,
|
|
253
255
|
y as useThemeMode
|
|
254
256
|
};
|
|
255
257
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schandlergarcia/sf-web-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Reusable Salesforce web components library with Tailwind CSS v4 and shadcn/ui",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -56,6 +56,9 @@
|
|
|
56
56
|
"brand:list": "node node_modules/@schandlergarcia/sf-web-components/scripts/apply-brand.mjs --list"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
+
"@dnd-kit/core": "^6.0.0",
|
|
60
|
+
"@dnd-kit/sortable": "^8.0.0 || ^9.0.0 || ^10.0.0",
|
|
61
|
+
"@dnd-kit/utilities": "^3.0.0",
|
|
59
62
|
"@heroicons/react": "^2.0.0",
|
|
60
63
|
"@heroui/react": "^3.0.0",
|
|
61
64
|
"@heroui/styles": "^3.0.0",
|
|
@@ -84,6 +87,9 @@
|
|
|
84
87
|
"tailwind-merge": "^3.5.0"
|
|
85
88
|
},
|
|
86
89
|
"devDependencies": {
|
|
90
|
+
"@dnd-kit/core": "^6.3.1",
|
|
91
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
92
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
87
93
|
"@heroicons/react": "^2.2.0",
|
|
88
94
|
"@heroui/react": "^3.0.1",
|
|
89
95
|
"@heroui/styles": "^3.0.1",
|