@schandlergarcia/sf-web-components 1.1.5 → 1.2.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/dist/components/library/cards/ListCard.js +15 -15
- package/dist/components/library/cards/TableCard.js +22 -22
- package/dist/components/library/cards/TableCard.js.map +1 -1
- package/dist/components/library/cards/WidgetCard.js +4 -4
- package/dist/components/library/charts/D3Chart.js.map +1 -1
- package/dist/components/library/data/DataModeProvider.js +9 -9
- package/dist/components/library/data/DataModeProvider.js.map +1 -1
- package/dist/components/library/heroui/Collapsible.d.ts +40 -0
- package/dist/components/library/heroui/Collapsible.js +25 -0
- package/dist/components/library/heroui/Collapsible.js.map +1 -0
- package/dist/components/library/heroui/DatePicker.d.ts +67 -0
- package/dist/components/library/heroui/DatePicker.js +16 -0
- package/dist/components/library/heroui/DatePicker.js.map +1 -0
- package/dist/components/library/heroui/Dialog.d.ts +51 -0
- package/dist/components/library/heroui/Dialog.js +21 -0
- package/dist/components/library/heroui/Dialog.js.map +1 -0
- package/dist/components/library/heroui/Field.d.ts +49 -0
- package/dist/components/library/heroui/Field.js +25 -0
- package/dist/components/library/heroui/Field.js.map +1 -0
- package/dist/components/library/heroui/Popover.d.ts +51 -0
- package/dist/components/library/heroui/Popover.js +37 -0
- package/dist/components/library/heroui/Popover.js.map +1 -0
- package/dist/components/library/index.d.ts +109 -9
- package/dist/components/library/index.js +56 -0
- package/dist/components/library/index.js.map +1 -0
- package/dist/components/library/theme/AppThemeProvider.js +4 -4
- package/dist/components/library/theme/AppThemeProvider.js.map +1 -1
- package/dist/components/library/ui/Avatar.js +8 -8
- package/dist/components/workspace/ComponentRegistry.js +4 -3
- package/dist/components/workspace/ComponentRegistry.js.map +1 -1
- package/dist/index.js +235 -232
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { PopoverContent as c, Popover as n, PopoverTrigger as i } from "./Popover.js";
|
|
4
|
+
function s({ children: e, ...t }) {
|
|
5
|
+
return /* @__PURE__ */ r(n, { ...t, children: e });
|
|
6
|
+
}
|
|
7
|
+
const k = s, l = ({ children: e, date: t, dateFormat: a, placeholder: d, className: p = "", ...o }) => /* @__PURE__ */ r(i, { ...o, children: e }), D = c, h = ({ date: e, onSelect: t, ...a }) => /* @__PURE__ */ r("div", { className: "p-4", ...a, children: /* @__PURE__ */ r("p", { className: "text-sm text-slate-500", children: "Calendar placeholder - integrate react-day-picker here" }) }), f = l;
|
|
8
|
+
export {
|
|
9
|
+
k as DatePicker,
|
|
10
|
+
h as DatePickerCalendar,
|
|
11
|
+
D as DatePickerContent,
|
|
12
|
+
f as DatePickerRangeTrigger,
|
|
13
|
+
l as DatePickerTrigger,
|
|
14
|
+
s as default
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=DatePicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.js","sources":["../../../../src/components/library/heroui/DatePicker.jsx"],"sourcesContent":["import React from \"react\";\nimport { Popover, PopoverTrigger, PopoverContent } from \"./Popover\";\n\n/**\n * HeroUI v3 DatePicker — simple wrapper using Popover.\n * Full implementation would integrate with react-day-picker.\n *\n * @example\n * import { DatePicker, DatePickerTrigger, DatePickerContent } from \"@/components/library\";\n * <DatePicker>\n * <DatePickerTrigger>\n * <button>Select date</button>\n * </DatePickerTrigger>\n * <DatePickerContent>\n * <DatePickerCalendar />\n * </DatePickerContent>\n * </DatePicker>\n */\nexport default function HeroUIDatePicker({ children, ...props }) {\n return <Popover {...props}>{children}</Popover>;\n}\n\nexport const DatePicker = HeroUIDatePicker;\nexport const DatePickerTrigger = ({ children, date, dateFormat, placeholder, className = \"\", ...props }) => {\n // Accept shadcn DatePicker props but just pass through as trigger\n return <PopoverTrigger {...props}>{children}</PopoverTrigger>;\n};\nexport const DatePickerContent = PopoverContent;\nexport const DatePickerCalendar = ({ date, onSelect, ...props }) => (\n <div className=\"p-4\" {...props}>\n <p className=\"text-sm text-slate-500\">Calendar placeholder - integrate react-day-picker here</p>\n </div>\n);\nexport const DatePickerRangeTrigger = DatePickerTrigger;\n"],"names":["HeroUIDatePicker","children","props","jsx","Popover","DatePicker","DatePickerTrigger","date","dateFormat","placeholder","className","PopoverTrigger","DatePickerContent","PopoverContent","DatePickerCalendar","onSelect","DatePickerRangeTrigger"],"mappings":";;;AAkBA,SAAwBA,EAAiB,EAAE,UAAAC,GAAU,GAAGC,KAAS;AAC/D,SAAO,gBAAAC,EAACC,GAAA,EAAS,GAAGF,GAAQ,UAAAD,EAAA,CAAS;AACvC;AAEO,MAAMI,IAAaL,GACbM,IAAoB,CAAC,EAAE,UAAAL,GAAU,MAAAM,GAAM,YAAAC,GAAY,aAAAC,GAAa,WAAAC,IAAY,IAAI,GAAGR,QAEvF,gBAAAC,EAACQ,GAAA,EAAgB,GAAGT,GAAQ,UAAAD,EAAA,CAAS,GAEjCW,IAAoBC,GACpBC,IAAqB,CAAC,EAAE,MAAAP,GAAM,UAAAQ,GAAU,GAAGb,QACtD,gBAAAC,EAAC,SAAI,WAAU,OAAO,GAAGD,GACvB,UAAA,gBAAAC,EAAC,OAAE,WAAU,0BAAyB,oEAAsD,EAAA,CAC9F,GAEWa,IAAyBV;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HeroUI v3 Dialog — maps to Modal for shadcn compatibility.
|
|
3
|
+
*
|
|
4
|
+
* Sub-components via dot notation on the named `Modal` export:
|
|
5
|
+
* Modal.Backdrop, Modal.Container, Modal.Dialog,
|
|
6
|
+
* Modal.CloseTrigger, Modal.Header, Modal.Icon,
|
|
7
|
+
* Modal.Heading, Modal.Body, Modal.Footer
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* import { Dialog, DialogTrigger, DialogContent } from "@/components/library";
|
|
11
|
+
* <Dialog>
|
|
12
|
+
* <DialogTrigger>Open</DialogTrigger>
|
|
13
|
+
* <DialogContent>
|
|
14
|
+
* <DialogHeader><DialogTitle>Title</DialogTitle></DialogHeader>
|
|
15
|
+
* <DialogDescription>Content</DialogDescription>
|
|
16
|
+
* <DialogFooter>Actions</DialogFooter>
|
|
17
|
+
* </DialogContent>
|
|
18
|
+
* </Dialog>
|
|
19
|
+
*/
|
|
20
|
+
export default function HeroUIDialog(props: any): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* HeroUI v3 Dialog — maps to Modal for shadcn compatibility.
|
|
23
|
+
*
|
|
24
|
+
* Sub-components via dot notation on the named `Modal` export:
|
|
25
|
+
* Modal.Backdrop, Modal.Container, Modal.Dialog,
|
|
26
|
+
* Modal.CloseTrigger, Modal.Header, Modal.Icon,
|
|
27
|
+
* Modal.Heading, Modal.Body, Modal.Footer
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* import { Dialog, DialogTrigger, DialogContent } from "@/components/library";
|
|
31
|
+
* <Dialog>
|
|
32
|
+
* <DialogTrigger>Open</DialogTrigger>
|
|
33
|
+
* <DialogContent>
|
|
34
|
+
* <DialogHeader><DialogTitle>Title</DialogTitle></DialogHeader>
|
|
35
|
+
* <DialogDescription>Content</DialogDescription>
|
|
36
|
+
* <DialogFooter>Actions</DialogFooter>
|
|
37
|
+
* </DialogContent>
|
|
38
|
+
* </Dialog>
|
|
39
|
+
*/
|
|
40
|
+
export function Dialog(props: any): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export const DialogTrigger: ({ children, className, ...props }: import("@heroui/react").ModalTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export function DialogPortal({ children }: {
|
|
43
|
+
children: any;
|
|
44
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export const DialogClose: ({ className, ...rest }: import("@heroui/react").ModalCloseTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export const DialogOverlay: ({ children, className, isDismissable, onClick, variant, ...props }: import("@heroui/react").ModalBackdropProps) => import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export const DialogContent: ({ children, className, ...props }: import("@heroui/react").ModalDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export const DialogHeader: ({ children, className, ...props }: import("@heroui/react").ModalHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export const DialogFooter: ({ children, className, ...props }: import("@heroui/react").ModalFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export const DialogTitle: ({ children, className, ...props }: import("@heroui/react").ModalHeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export function DialogDescription(props: any): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as t, Fragment as r } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { Modal as i } from "@heroui/react";
|
|
4
|
+
function a(o) {
|
|
5
|
+
return /* @__PURE__ */ t(i, { ...o });
|
|
6
|
+
}
|
|
7
|
+
const l = a, s = i.Trigger || ((o) => /* @__PURE__ */ t("button", { ...o })), c = ({ children: o }) => /* @__PURE__ */ t(r, { children: o }), D = i.CloseTrigger || ((o) => /* @__PURE__ */ t("button", { ...o })), d = i.Backdrop || ((o) => /* @__PURE__ */ t("div", { ...o })), p = i.Dialog || i.Container || ((o) => /* @__PURE__ */ t("div", { ...o })), m = i.Header || ((o) => /* @__PURE__ */ t("div", { ...o })), u = i.Footer || ((o) => /* @__PURE__ */ t("div", { ...o })), v = i.Heading || ((o) => /* @__PURE__ */ t("h2", { ...o })), f = (o) => /* @__PURE__ */ t("p", { ...o });
|
|
8
|
+
export {
|
|
9
|
+
l as Dialog,
|
|
10
|
+
D as DialogClose,
|
|
11
|
+
p as DialogContent,
|
|
12
|
+
f as DialogDescription,
|
|
13
|
+
u as DialogFooter,
|
|
14
|
+
m as DialogHeader,
|
|
15
|
+
d as DialogOverlay,
|
|
16
|
+
c as DialogPortal,
|
|
17
|
+
v as DialogTitle,
|
|
18
|
+
s as DialogTrigger,
|
|
19
|
+
a as default
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=Dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.js","sources":["../../../../src/components/library/heroui/Dialog.jsx"],"sourcesContent":["import React from \"react\";\nimport { Modal } from \"@heroui/react\";\n\n/**\n * HeroUI v3 Dialog — maps to Modal for shadcn compatibility.\n *\n * Sub-components via dot notation on the named `Modal` export:\n * Modal.Backdrop, Modal.Container, Modal.Dialog,\n * Modal.CloseTrigger, Modal.Header, Modal.Icon,\n * Modal.Heading, Modal.Body, Modal.Footer\n *\n * @example\n * import { Dialog, DialogTrigger, DialogContent } from \"@/components/library\";\n * <Dialog>\n * <DialogTrigger>Open</DialogTrigger>\n * <DialogContent>\n * <DialogHeader><DialogTitle>Title</DialogTitle></DialogHeader>\n * <DialogDescription>Content</DialogDescription>\n * <DialogFooter>Actions</DialogFooter>\n * </DialogContent>\n * </Dialog>\n */\nexport default function HeroUIDialog(props) {\n return <Modal {...props} />;\n}\n\n// Shadcn-compatible exports\nexport const Dialog = HeroUIDialog;\nexport const DialogTrigger = Modal.Trigger || (props => <button {...props} />);\nexport const DialogPortal = ({ children }) => <>{children}</>;\nexport const DialogClose = Modal.CloseTrigger || (props => <button {...props} />);\nexport const DialogOverlay = Modal.Backdrop || (props => <div {...props} />);\nexport const DialogContent = Modal.Dialog || Modal.Container || (props => <div {...props} />);\nexport const DialogHeader = Modal.Header || (props => <div {...props} />);\nexport const DialogFooter = Modal.Footer || (props => <div {...props} />);\nexport const DialogTitle = Modal.Heading || (props => <h2 {...props} />);\nexport const DialogDescription = (props) => <p {...props} />;\n"],"names":["HeroUIDialog","props","jsx","Modal","Dialog","DialogTrigger","DialogPortal","children","DialogClose","DialogOverlay","DialogContent","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;AAsBA,SAAwBA,EAAaC,GAAO;AAC1C,SAAO,gBAAAC,EAACC,GAAA,EAAO,GAAGF,EAAA,CAAO;AAC3B;AAGO,MAAMG,IAASJ,GACTK,IAAgBF,EAAM,YAAY,OAAS,gBAAAD,EAAC,UAAA,EAAQ,GAAGD,GAAO,IAC9DK,IAAe,CAAC,EAAE,UAAAC,EAAA,6BAAkB,UAAAA,EAAA,CAAS,GAC7CC,IAAcL,EAAM,iBAAiB,OAAS,gBAAAD,EAAC,UAAA,EAAQ,GAAGD,GAAO,IACjEQ,IAAgBN,EAAM,aAAa,OAAS,gBAAAD,EAAC,OAAA,EAAK,GAAGD,GAAO,IAC5DS,IAAgBP,EAAM,UAAUA,EAAM,cAAc,CAAAF,MAAS,gBAAAC,EAAC,OAAA,EAAK,GAAGD,EAAA,CAAO,IAC7EU,IAAeR,EAAM,WAAW,OAAS,gBAAAD,EAAC,OAAA,EAAK,GAAGD,GAAO,IACzDW,IAAeT,EAAM,WAAW,OAAS,gBAAAD,EAAC,OAAA,EAAK,GAAGD,GAAO,IACzDY,IAAcV,EAAM,YAAY,OAAS,gBAAAD,EAAC,MAAA,EAAI,GAAGD,GAAO,IACxDa,IAAoB,CAACb,MAAU,gBAAAC,EAAC,KAAA,EAAG,GAAGD,EAAA,CAAO;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HeroUI v3 Field components — simple wrappers for form field layout.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* import { Field, FieldLabel, FieldError } from "@/components/library";
|
|
6
|
+
* <Field>
|
|
7
|
+
* <FieldLabel>Name</FieldLabel>
|
|
8
|
+
* <Input />
|
|
9
|
+
* <FieldError>Required</FieldError>
|
|
10
|
+
* </Field>
|
|
11
|
+
*/
|
|
12
|
+
export default function HeroUIField({ className, children, ...props }: {
|
|
13
|
+
[x: string]: any;
|
|
14
|
+
className?: string | undefined;
|
|
15
|
+
children: any;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
/**
|
|
18
|
+
* HeroUI v3 Field components — simple wrappers for form field layout.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* import { Field, FieldLabel, FieldError } from "@/components/library";
|
|
22
|
+
* <Field>
|
|
23
|
+
* <FieldLabel>Name</FieldLabel>
|
|
24
|
+
* <Input />
|
|
25
|
+
* <FieldError>Required</FieldError>
|
|
26
|
+
* </Field>
|
|
27
|
+
*/
|
|
28
|
+
export function Field({ className, children, ...props }: {
|
|
29
|
+
[x: string]: any;
|
|
30
|
+
className?: string | undefined;
|
|
31
|
+
children: any;
|
|
32
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export function FieldLabel({ className, htmlFor, children, ...props }: {
|
|
34
|
+
[x: string]: any;
|
|
35
|
+
className?: string | undefined;
|
|
36
|
+
htmlFor: any;
|
|
37
|
+
children: any;
|
|
38
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export function FieldDescription({ className, children, ...props }: {
|
|
40
|
+
[x: string]: any;
|
|
41
|
+
className?: string | undefined;
|
|
42
|
+
children: any;
|
|
43
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export function FieldError({ className, errors, children, ...props }: {
|
|
45
|
+
[x: string]: any;
|
|
46
|
+
className?: string | undefined;
|
|
47
|
+
errors: any;
|
|
48
|
+
children: any;
|
|
49
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
function n({ className: e = "", children: t, ...l }) {
|
|
4
|
+
return /* @__PURE__ */ s("div", { className: `flex flex-col gap-1.5 ${e}`, ...l, children: t });
|
|
5
|
+
}
|
|
6
|
+
const x = n, d = ({ className: e = "", htmlFor: t, children: l, ...r }) => /* @__PURE__ */ s(
|
|
7
|
+
"label",
|
|
8
|
+
{
|
|
9
|
+
htmlFor: t,
|
|
10
|
+
className: `text-sm font-medium text-slate-700 dark:text-slate-200 ${e}`,
|
|
11
|
+
...r,
|
|
12
|
+
children: l
|
|
13
|
+
}
|
|
14
|
+
), c = ({ className: e = "", children: t, ...l }) => /* @__PURE__ */ s("p", { className: `text-xs text-slate-500 dark:text-slate-400 ${e}`, ...l, children: t }), m = ({ className: e = "", errors: t, children: l, ...r }) => {
|
|
15
|
+
const a = t?.length > 0 ? t.join(", ") : l;
|
|
16
|
+
return a ? /* @__PURE__ */ s("p", { className: `text-xs text-red-600 dark:text-red-400 ${e}`, ...r, children: a }) : null;
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
x as Field,
|
|
20
|
+
c as FieldDescription,
|
|
21
|
+
m as FieldError,
|
|
22
|
+
d as FieldLabel,
|
|
23
|
+
n as default
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=Field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Field.js","sources":["../../../../src/components/library/heroui/Field.jsx"],"sourcesContent":["import React from \"react\";\n\n/**\n * HeroUI v3 Field components — simple wrappers for form field layout.\n *\n * @example\n * import { Field, FieldLabel, FieldError } from \"@/components/library\";\n * <Field>\n * <FieldLabel>Name</FieldLabel>\n * <Input />\n * <FieldError>Required</FieldError>\n * </Field>\n */\nexport default function HeroUIField({ className = \"\", children, ...props }) {\n return (\n <div className={`flex flex-col gap-1.5 ${className}`} {...props}>\n {children}\n </div>\n );\n}\n\nexport const Field = HeroUIField;\n\nexport const FieldLabel = ({ className = \"\", htmlFor, children, ...props }) => (\n <label\n htmlFor={htmlFor}\n className={`text-sm font-medium text-slate-700 dark:text-slate-200 ${className}`}\n {...props}\n >\n {children}\n </label>\n);\n\nexport const FieldDescription = ({ className = \"\", children, ...props }) => (\n <p className={`text-xs text-slate-500 dark:text-slate-400 ${className}`} {...props}>\n {children}\n </p>\n);\n\nexport const FieldError = ({ className = \"\", errors, children, ...props }) => {\n // Support both children and errors prop\n const errorContent = errors?.length > 0 ? errors.join(\", \") : children;\n\n if (!errorContent) return null;\n\n return (\n <p className={`text-xs text-red-600 dark:text-red-400 ${className}`} {...props}>\n {errorContent}\n </p>\n );\n};\n"],"names":["HeroUIField","className","children","props","jsx","Field","FieldLabel","htmlFor","FieldDescription","FieldError","errors","errorContent"],"mappings":";;AAaA,SAAwBA,EAAY,EAAE,WAAAC,IAAY,IAAI,UAAAC,GAAU,GAAGC,KAAS;AAC1E,SACE,gBAAAC,EAAC,SAAI,WAAW,yBAAyBH,CAAS,IAAK,GAAGE,GACvD,UAAAD,GACH;AAEJ;AAEO,MAAMG,IAAQL,GAERM,IAAa,CAAC,EAAE,WAAAL,IAAY,IAAI,SAAAM,GAAS,UAAAL,GAAU,GAAGC,EAAA,MACjE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,SAAAG;AAAA,IACA,WAAW,0DAA0DN,CAAS;AAAA,IAC7E,GAAGE;AAAA,IAEH,UAAAD;AAAA,EAAA;AACH,GAGWM,IAAmB,CAAC,EAAE,WAAAP,IAAY,IAAI,UAAAC,GAAU,GAAGC,EAAA,MAC9D,gBAAAC,EAAC,OAAE,WAAW,8CAA8CH,CAAS,IAAK,GAAGE,GAC1E,UAAAD,EAAA,CACH,GAGWO,IAAa,CAAC,EAAE,WAAAR,IAAY,IAAI,QAAAS,GAAQ,UAAAR,GAAU,GAAGC,QAAY;AAE5E,QAAMQ,IAAeD,GAAQ,SAAS,IAAIA,EAAO,KAAK,IAAI,IAAIR;AAE9D,SAAKS,IAGH,gBAAAP,EAAC,OAAE,WAAW,0CAA0CH,CAAS,IAAK,GAAGE,GACtE,UAAAQ,EAAA,CACH,IALwB;AAO5B;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HeroUI v3 Popover — simple popover for shadcn compatibility.
|
|
3
|
+
* Using native HTML/CSS since HeroUI v3 doesn't have a Popover component.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* import { Popover, PopoverTrigger, PopoverContent } from "@/components/library";
|
|
7
|
+
* <Popover>
|
|
8
|
+
* <PopoverTrigger>Open</PopoverTrigger>
|
|
9
|
+
* <PopoverContent>Content</PopoverContent>
|
|
10
|
+
* </Popover>
|
|
11
|
+
*/
|
|
12
|
+
export default function HeroUIPopover({ children, open, onOpenChange, ...props }: {
|
|
13
|
+
[x: string]: any;
|
|
14
|
+
children: any;
|
|
15
|
+
open: any;
|
|
16
|
+
onOpenChange: any;
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
/**
|
|
19
|
+
* HeroUI v3 Popover — simple popover for shadcn compatibility.
|
|
20
|
+
* Using native HTML/CSS since HeroUI v3 doesn't have a Popover component.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* import { Popover, PopoverTrigger, PopoverContent } from "@/components/library";
|
|
24
|
+
* <Popover>
|
|
25
|
+
* <PopoverTrigger>Open</PopoverTrigger>
|
|
26
|
+
* <PopoverContent>Content</PopoverContent>
|
|
27
|
+
* </Popover>
|
|
28
|
+
*/
|
|
29
|
+
export function Popover({ children, open, onOpenChange, ...props }: {
|
|
30
|
+
[x: string]: any;
|
|
31
|
+
children: any;
|
|
32
|
+
open: any;
|
|
33
|
+
onOpenChange: any;
|
|
34
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export function PopoverTrigger({ children, open, onOpenChange, ...props }: {
|
|
36
|
+
[x: string]: any;
|
|
37
|
+
children: any;
|
|
38
|
+
open: any;
|
|
39
|
+
onOpenChange: any;
|
|
40
|
+
}): React.DetailedReactHTMLElement<{
|
|
41
|
+
onClick: () => any;
|
|
42
|
+
}, HTMLElement>;
|
|
43
|
+
export function PopoverContent({ children, open, className, align, sideOffset, ...props }: {
|
|
44
|
+
[x: string]: any;
|
|
45
|
+
children: any;
|
|
46
|
+
open: any;
|
|
47
|
+
className?: string | undefined;
|
|
48
|
+
align?: string | undefined;
|
|
49
|
+
sideOffset?: number | undefined;
|
|
50
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
51
|
+
import React from "react";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import l from "react";
|
|
3
|
+
function p({ children: n, open: e, onOpenChange: r, ...o }) {
|
|
4
|
+
const [s, i] = l.useState(!1), a = e !== void 0, d = a ? e : s, m = (t) => {
|
|
5
|
+
a || i(t), r?.(t);
|
|
6
|
+
};
|
|
7
|
+
return /* @__PURE__ */ c("div", { className: "relative inline-block", ...o, children: l.Children.map(n, (t) => l.isValidElement(t) ? l.cloneElement(t, { open: d, onOpenChange: m }) : t) });
|
|
8
|
+
}
|
|
9
|
+
const g = p, v = ({ children: n, open: e, onOpenChange: r, ...o }) => {
|
|
10
|
+
const s = () => r?.(!e);
|
|
11
|
+
return l.cloneElement(n, {
|
|
12
|
+
...o,
|
|
13
|
+
onClick: s
|
|
14
|
+
});
|
|
15
|
+
}, C = ({ children: n, open: e, className: r = "", align: o = "center", sideOffset: s = 4, ...i }) => {
|
|
16
|
+
if (!e) return null;
|
|
17
|
+
const a = {
|
|
18
|
+
start: "left-0",
|
|
19
|
+
center: "left-1/2 -translate-x-1/2",
|
|
20
|
+
end: "right-0"
|
|
21
|
+
};
|
|
22
|
+
return /* @__PURE__ */ c(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
className: `absolute z-50 mt-${s} 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 ${a[o] || a.center} ${r}`,
|
|
26
|
+
...i,
|
|
27
|
+
children: n
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
g as Popover,
|
|
33
|
+
C as PopoverContent,
|
|
34
|
+
v as PopoverTrigger,
|
|
35
|
+
p as default
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=Popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Popover.js","sources":["../../../../src/components/library/heroui/Popover.jsx"],"sourcesContent":["import React from \"react\";\n\n/**\n * HeroUI v3 Popover — simple popover for shadcn compatibility.\n * Using native HTML/CSS since HeroUI v3 doesn't have a Popover component.\n *\n * @example\n * import { Popover, PopoverTrigger, PopoverContent } from \"@/components/library\";\n * <Popover>\n * <PopoverTrigger>Open</PopoverTrigger>\n * <PopoverContent>Content</PopoverContent>\n * </Popover>\n */\nexport default function HeroUIPopover({ children, open, onOpenChange, ...props }) {\n const [isOpen, setIsOpen] = React.useState(false);\n const isControlled = open !== undefined;\n const actualOpen = isControlled ? open : isOpen;\n\n const handleOpenChange = (newOpen) => {\n if (!isControlled) setIsOpen(newOpen);\n onOpenChange?.(newOpen);\n };\n\n return (\n <div className=\"relative inline-block\" {...props}>\n {React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child, { open: actualOpen, onOpenChange: handleOpenChange });\n }\n return child;\n })}\n </div>\n );\n}\n\nexport const Popover = HeroUIPopover;\n\nexport const PopoverTrigger = ({ children, open, onOpenChange, ...props }) => {\n const handleClick = () => onOpenChange?.(!open);\n\n return React.cloneElement(children, {\n ...props,\n onClick: handleClick,\n });\n};\n\nexport const PopoverContent = ({ children, open, className = \"\", align = \"center\", sideOffset = 4, ...props }) => {\n if (!open) return null;\n\n const alignClasses = {\n start: \"left-0\",\n center: \"left-1/2 -translate-x-1/2\",\n end: \"right-0\"\n };\n\n return (\n <div\n 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}`}\n {...props}\n >\n {children}\n </div>\n );\n};\n"],"names":["HeroUIPopover","children","open","onOpenChange","props","isOpen","setIsOpen","React","isControlled","actualOpen","handleOpenChange","newOpen","jsx","child","Popover","PopoverTrigger","handleClick","PopoverContent","className","align","sideOffset","alignClasses"],"mappings":";;AAaA,SAAwBA,EAAc,EAAE,UAAAC,GAAU,MAAAC,GAAM,cAAAC,GAAc,GAAGC,KAAS;AAChF,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAAM,SAAS,EAAK,GAC1CC,IAAeN,MAAS,QACxBO,IAAaD,IAAeN,IAAOG,GAEnCK,IAAmB,CAACC,MAAY;AACpC,IAAKH,KAAcF,EAAUK,CAAO,GACpCR,IAAeQ,CAAO;AAAA,EACxB;AAEA,SACE,gBAAAC,EAAC,OAAA,EAAI,WAAU,yBAAyB,GAAGR,GACxC,UAAAG,EAAM,SAAS,IAAIN,GAAU,CAACY,MACzBN,EAAM,eAAeM,CAAK,IACrBN,EAAM,aAAaM,GAAO,EAAE,MAAMJ,GAAY,cAAcC,GAAkB,IAEhFG,CACR,EAAA,CACH;AAEJ;AAEO,MAAMC,IAAUd,GAEVe,IAAiB,CAAC,EAAE,UAAAd,GAAU,MAAAC,GAAM,cAAAC,GAAc,GAAGC,QAAY;AAC5E,QAAMY,IAAc,MAAMb,IAAe,CAACD,CAAI;AAE9C,SAAOK,EAAM,aAAaN,GAAU;AAAA,IAClC,GAAGG;AAAA,IACH,SAASY;AAAA,EAAA,CACV;AACH,GAEaC,IAAiB,CAAC,EAAE,UAAAhB,GAAU,MAAAC,GAAM,WAAAgB,IAAY,IAAI,OAAAC,IAAQ,UAAU,YAAAC,IAAa,GAAG,GAAGhB,QAAY;AAChH,MAAI,CAACF,EAAM,QAAO;AAElB,QAAMmB,IAAe;AAAA,IACnB,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,KAAK;AAAA,EAAA;AAGP,SACE,gBAAAT;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,oBAAoBQ,CAAU,6IAA6IC,EAAaF,CAAK,KAAKE,EAAa,MAAM,IAAIH,CAAS;AAAA,MAC5O,GAAGd;AAAA,MAEH,UAAAH;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -36,6 +36,83 @@ export { default as HeroUICard } from "./heroui/Card";
|
|
|
36
36
|
export { default as HeroUIToggle } from "./heroui/Toggle";
|
|
37
37
|
export { default as HeroUITabs } from "./heroui/Tabs";
|
|
38
38
|
export { default as HeroUIAccordion } from "./heroui/Accordion";
|
|
39
|
+
export function Breadcrumb({ children, ...props }: {
|
|
40
|
+
[x: string]: any;
|
|
41
|
+
children: any;
|
|
42
|
+
}): React.DetailedReactHTMLElement<{
|
|
43
|
+
'aria-label': string;
|
|
44
|
+
}, HTMLElement>;
|
|
45
|
+
export function BreadcrumbList({ children, ...props }: {
|
|
46
|
+
[x: string]: any;
|
|
47
|
+
children: any;
|
|
48
|
+
}): React.DetailedReactHTMLElement<{
|
|
49
|
+
className: string;
|
|
50
|
+
}, HTMLElement>;
|
|
51
|
+
export function BreadcrumbItem({ children, ...props }: {
|
|
52
|
+
[x: string]: any;
|
|
53
|
+
children: any;
|
|
54
|
+
}): React.DetailedReactHTMLElement<{
|
|
55
|
+
className: string;
|
|
56
|
+
}, HTMLElement>;
|
|
57
|
+
export function BreadcrumbLink({ href, children, asChild, ...props }: {
|
|
58
|
+
[x: string]: any;
|
|
59
|
+
href: any;
|
|
60
|
+
children: any;
|
|
61
|
+
asChild: any;
|
|
62
|
+
}): React.DetailedReactHTMLElement<{
|
|
63
|
+
[x: string]: any;
|
|
64
|
+
}, HTMLElement> | React.DetailedReactHTMLElement<{
|
|
65
|
+
href: any;
|
|
66
|
+
className: string;
|
|
67
|
+
}, HTMLElement>;
|
|
68
|
+
export function BreadcrumbPage({ children, ...props }: {
|
|
69
|
+
[x: string]: any;
|
|
70
|
+
children: any;
|
|
71
|
+
}): React.DetailedReactHTMLElement<{
|
|
72
|
+
role: "link";
|
|
73
|
+
'aria-disabled': "true";
|
|
74
|
+
'aria-current': "page";
|
|
75
|
+
className: string;
|
|
76
|
+
}, HTMLElement>;
|
|
77
|
+
export function BreadcrumbSeparator({ children, ...props }: {
|
|
78
|
+
[x: string]: any;
|
|
79
|
+
children: any;
|
|
80
|
+
}): React.DetailedReactHTMLElement<{
|
|
81
|
+
role: "presentation";
|
|
82
|
+
'aria-hidden': "true";
|
|
83
|
+
}, HTMLElement>;
|
|
84
|
+
export function BreadcrumbEllipsis(props: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
85
|
+
export function PaginationContent({ children, ...props }: {
|
|
86
|
+
[x: string]: any;
|
|
87
|
+
children: any;
|
|
88
|
+
}): React.DetailedReactHTMLElement<{
|
|
89
|
+
className: string;
|
|
90
|
+
}, HTMLElement>;
|
|
91
|
+
export function PaginationItem({ children, ...props }: {
|
|
92
|
+
[x: string]: any;
|
|
93
|
+
children: any;
|
|
94
|
+
}): React.DetailedReactHTMLElement<{
|
|
95
|
+
[x: string]: any;
|
|
96
|
+
}, HTMLElement>;
|
|
97
|
+
export function PaginationLink({ href, isActive, children, ...props }: {
|
|
98
|
+
[x: string]: any;
|
|
99
|
+
href: any;
|
|
100
|
+
isActive: any;
|
|
101
|
+
children: any;
|
|
102
|
+
}): React.DetailedReactHTMLElement<{
|
|
103
|
+
href: any;
|
|
104
|
+
'aria-current': "page" | undefined;
|
|
105
|
+
className: string;
|
|
106
|
+
}, HTMLElement>;
|
|
107
|
+
export function PaginationPrevious({ href, ...props }: {
|
|
108
|
+
[x: string]: any;
|
|
109
|
+
href: any;
|
|
110
|
+
}): React.DetailedReactHTMLElement<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
111
|
+
export function PaginationNext({ href, ...props }: {
|
|
112
|
+
[x: string]: any;
|
|
113
|
+
href: any;
|
|
114
|
+
}): React.DetailedReactHTMLElement<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
115
|
+
export function PaginationEllipsis(props: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
39
116
|
export { default as HeroUIDrawer } from "./heroui/Drawer";
|
|
40
117
|
export { default as HeroUIModal } from "./heroui/Modal";
|
|
41
118
|
export { default as HeroUIDropdown } from "./heroui/Dropdown";
|
|
@@ -46,18 +123,40 @@ export { default as HeroUIBadge } from "./heroui/Badge";
|
|
|
46
123
|
export { default as HeroUIProgressBar } from "./heroui/ProgressBar";
|
|
47
124
|
export { default as HeroUIProgressCircle } from "./heroui/ProgressCircle";
|
|
48
125
|
export { default as HeroUIMeter } from "./heroui/Meter";
|
|
49
|
-
export {
|
|
126
|
+
export function SelectTrigger({ children, size, ...props }: {
|
|
127
|
+
[x: string]: any;
|
|
128
|
+
children: any;
|
|
129
|
+
size: any;
|
|
130
|
+
}): React.DetailedReactHTMLElement<{
|
|
131
|
+
[x: string]: any;
|
|
132
|
+
}, HTMLElement>;
|
|
133
|
+
export function SelectValue({ placeholder, ...props }: {
|
|
134
|
+
[x: string]: any;
|
|
135
|
+
placeholder: any;
|
|
136
|
+
}): React.DetailedReactHTMLElement<{
|
|
137
|
+
[x: string]: any;
|
|
138
|
+
}, HTMLElement>;
|
|
139
|
+
export function SelectContent({ children, ...props }: {
|
|
140
|
+
[x: string]: any;
|
|
141
|
+
children: any;
|
|
142
|
+
}): React.DetailedReactHTMLElement<{
|
|
143
|
+
[x: string]: any;
|
|
144
|
+
}, HTMLElement>;
|
|
145
|
+
export function SelectItem({ children, ...props }: {
|
|
146
|
+
[x: string]: any;
|
|
147
|
+
children: any;
|
|
148
|
+
}): React.DetailedReactHTMLElement<{
|
|
149
|
+
[x: string]: any;
|
|
150
|
+
}, HTMLElement>;
|
|
151
|
+
import React from 'react';
|
|
50
152
|
export { default as AppThemeProvider, useThemeMode } from "./theme/AppThemeProvider";
|
|
51
153
|
export { default as UICard, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "./ui/Card";
|
|
52
154
|
export { default as Alert, AlertTitle, AlertDescription, AlertAction } from "./ui/Alert";
|
|
53
|
-
export { Dialog, DialogTrigger, DialogPortal, DialogClose, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription } from "./
|
|
54
|
-
export { Field, FieldLabel, FieldDescription, FieldError } from "./
|
|
55
|
-
export {
|
|
56
|
-
export {
|
|
57
|
-
export {
|
|
58
|
-
export { DatePicker, DatePickerTrigger, DatePickerContent, DatePickerCalendar, DatePickerRangeTrigger } from "./ui/DatePicker";
|
|
59
|
-
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis } from "./ui/BreadcrumbExtras";
|
|
60
|
-
export { PaginationContent, PaginationItem, PaginationLink, PaginationPrevious, PaginationNext, PaginationEllipsis } from "./ui/PaginationExtras";
|
|
155
|
+
export { default as HeroUIDialog, Dialog, DialogTrigger, DialogPortal, DialogClose, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription } from "./heroui/Dialog";
|
|
156
|
+
export { default as HeroUIField, Field, FieldLabel, FieldDescription, FieldError } from "./heroui/Field";
|
|
157
|
+
export { default as HeroUICollapsible, Collapsible, CollapsibleTrigger, CollapsibleContent } from "./heroui/Collapsible";
|
|
158
|
+
export { default as HeroUIPopover, Popover, PopoverTrigger, PopoverContent } from "./heroui/Popover";
|
|
159
|
+
export { default as HeroUIDatePicker, DatePicker, DatePickerTrigger, DatePickerContent, DatePickerCalendar, DatePickerRangeTrigger } from "./heroui/DatePicker";
|
|
61
160
|
export { FormModal, FormRenderer, FormSection, FormField, useFormState } from "./forms";
|
|
62
161
|
export { FilterBar, SearchFilter, SelectFilter, ToggleFilter } from "./filters";
|
|
63
162
|
export { default as DataModeProvider, useDataMode } from "./data/DataModeProvider";
|
|
@@ -67,5 +166,6 @@ export { default as HeroUIBreadcrumbs, Breadcrumbs } from "./heroui/Breadcrumbs"
|
|
|
67
166
|
export { default as HeroUISeparator, Separator } from "./heroui/Separator";
|
|
68
167
|
export { default as HeroUIPagination, Pagination } from "./heroui/Pagination";
|
|
69
168
|
export { default as HeroUISkeleton, Skeleton } from "./heroui/Skeleton";
|
|
169
|
+
export { default as HeroUISelect, Select } from "./heroui/Select";
|
|
70
170
|
export { default as HeroUIKbd, Kbd } from "./heroui/Kbd";
|
|
71
171
|
export { default as HeroUIScrollShadow, ScrollShadow } from "./heroui/ScrollShadow";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import a from "react";
|
|
2
|
+
import { default as M, useThemeMode as y } from "./theme/AppThemeProvider.js";
|
|
3
|
+
import "react/jsx-runtime";
|
|
4
|
+
import { Dialog as H, DialogClose as j, DialogContent as z, DialogDescription as F, DialogFooter as G, DialogHeader as K, DialogOverlay as O, DialogPortal as R, DialogTitle as U, DialogTrigger as V, default as $ } from "./heroui/Dialog.js";
|
|
5
|
+
import { Breadcrumbs as A, Kbd as J, Pagination as Q, ScrollShadow as W, Select as X, Separator as Y, Skeleton as Z } from "@heroui/react";
|
|
6
|
+
import "framer-motion";
|
|
7
|
+
import "@heroicons/react/24/outline";
|
|
8
|
+
import "d3";
|
|
9
|
+
import { default as ee } from "./charts/GeoMap.js";
|
|
10
|
+
import "react-dom";
|
|
11
|
+
import { default as ae, useDataMode as re } from "./data/DataModeProvider.js";
|
|
12
|
+
import "@heroicons/react/24/solid";
|
|
13
|
+
const g = ({ children: e, ...t }) => a.createElement("nav", { "aria-label": "breadcrumb", ...t }, e), u = ({ children: e, ...t }) => a.createElement("ol", { className: "flex flex-wrap items-center gap-1.5 break-words text-sm text-slate-500 dark:text-slate-400", ...t }, e), x = ({ children: e, ...t }) => a.createElement("li", { className: "inline-flex items-center gap-1.5", ...t }, e), E = ({ href: e, children: t, asChild: r, ...o }) => r ? a.createElement("span", o, t) : a.createElement("a", { href: e, className: "transition-colors hover:text-slate-900 dark:hover:text-slate-50", ...o }, t), b = ({ children: e, ...t }) => a.createElement("span", { role: "link", "aria-disabled": "true", "aria-current": "page", className: "font-normal text-slate-900 dark:text-slate-50", ...t }, e), f = ({ children: e, ...t }) => a.createElement("li", { role: "presentation", "aria-hidden": "true", ...t }, e ?? "/"), D = (e) => a.createElement("span", { role: "presentation", "aria-hidden": "true", ...e }, "..."), P = ({ children: e, ...t }) => a.createElement("ul", { className: "flex flex-row items-center gap-1", ...t }, e), v = ({ children: e, ...t }) => a.createElement("li", t, e), n = ({ href: e, isActive: t, children: r, ...o }) => a.createElement("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 }, r), h = ({ href: e, ...t }) => a.createElement(n, { href: e, ...t }, "Previous"), k = ({ href: e, ...t }) => a.createElement(n, { href: e, ...t }, "Next"), S = (e) => a.createElement("span", { "aria-hidden": !0, ...e }, "..."), B = ({ children: e, size: t, ...r }) => a.createElement("button", r, e), N = ({ placeholder: e, ...t }) => a.createElement("span", t, e), w = ({ children: e, ...t }) => a.createElement("div", t, e), T = ({ children: e, ...t }) => a.createElement("div", t, e);
|
|
14
|
+
export {
|
|
15
|
+
M as AppThemeProvider,
|
|
16
|
+
g as Breadcrumb,
|
|
17
|
+
D as BreadcrumbEllipsis,
|
|
18
|
+
x as BreadcrumbItem,
|
|
19
|
+
E as BreadcrumbLink,
|
|
20
|
+
u as BreadcrumbList,
|
|
21
|
+
b as BreadcrumbPage,
|
|
22
|
+
f as BreadcrumbSeparator,
|
|
23
|
+
A as Breadcrumbs,
|
|
24
|
+
ae as DataModeProvider,
|
|
25
|
+
H as Dialog,
|
|
26
|
+
j as DialogClose,
|
|
27
|
+
z as DialogContent,
|
|
28
|
+
F as DialogDescription,
|
|
29
|
+
G as DialogFooter,
|
|
30
|
+
K as DialogHeader,
|
|
31
|
+
O as DialogOverlay,
|
|
32
|
+
R as DialogPortal,
|
|
33
|
+
U as DialogTitle,
|
|
34
|
+
V as DialogTrigger,
|
|
35
|
+
ee as GeoMap,
|
|
36
|
+
$ as HeroUIDialog,
|
|
37
|
+
J as Kbd,
|
|
38
|
+
Q as Pagination,
|
|
39
|
+
P as PaginationContent,
|
|
40
|
+
S as PaginationEllipsis,
|
|
41
|
+
v as PaginationItem,
|
|
42
|
+
n as PaginationLink,
|
|
43
|
+
k as PaginationNext,
|
|
44
|
+
h as PaginationPrevious,
|
|
45
|
+
W as ScrollShadow,
|
|
46
|
+
X as Select,
|
|
47
|
+
w as SelectContent,
|
|
48
|
+
T as SelectItem,
|
|
49
|
+
B as SelectTrigger,
|
|
50
|
+
N as SelectValue,
|
|
51
|
+
Y as Separator,
|
|
52
|
+
Z as Skeleton,
|
|
53
|
+
re as useDataMode,
|
|
54
|
+
y as useThemeMode
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/library/index.jsx"],"sourcesContent":["import React from 'react';\n\nexport { 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 UIText } from \"./ui/Text\";\nexport { default as UIContainer } from \"./ui/Container\";\nexport { default as UIChip } from \"./ui/Chip\";\nexport { default as Avatar } from \"./ui/Avatar\";\nexport { default as EmptyState } from \"./ui/EmptyState\";\nexport { default as Spinner } from \"./ui/Spinner\";\nexport { default as Label } from \"./ui/Label\";\nexport { default as Checkbox } from \"./ui/Checkbox\";\nexport { default as FieldGroup } from \"./ui/FieldGroup\";\n\n// shadcn-compatible Card with subcomponents\nexport { default as UICard, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from \"./ui/Card\";\n\n// shadcn-compatible Alert with subcomponents\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// 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 } 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 } from \"./heroui/Tabs\";\nexport { default as HeroUIAccordion } 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 }) => React.createElement('nav', { 'aria-label': 'breadcrumb', ...props }, children);\nexport const BreadcrumbList = ({ children, ...props }) => React.createElement('ol', { className: 'flex flex-wrap items-center gap-1.5 break-words text-sm text-slate-500 dark:text-slate-400', ...props }, children);\nexport const BreadcrumbItem = ({ children, ...props }) => React.createElement('li', { className: 'inline-flex items-center gap-1.5', ...props }, children);\nexport const BreadcrumbLink = ({ href, children, asChild, ...props }) => asChild ? React.createElement('span', props, children) : React.createElement('a', { href, className: 'transition-colors hover:text-slate-900 dark:hover:text-slate-50', ...props }, children);\nexport const BreadcrumbPage = ({ children, ...props }) => React.createElement('span', { role: 'link', 'aria-disabled': 'true', 'aria-current': 'page', className: 'font-normal text-slate-900 dark:text-slate-50', ...props }, children);\nexport const BreadcrumbSeparator = ({ children, ...props }) => React.createElement('li', { role: 'presentation', 'aria-hidden': 'true', ...props }, children ?? '/');\nexport const BreadcrumbEllipsis = (props) => React.createElement('span', { role: 'presentation', 'aria-hidden': 'true', ...props }, '...');\n\n// Pagination subcomponents for shadcn compatibility\nexport const PaginationContent = ({ children, ...props }) => React.createElement('ul', { className: 'flex flex-row items-center gap-1', ...props }, children);\nexport const PaginationItem = ({ children, ...props }) => React.createElement('li', props, children);\nexport const PaginationLink = ({ href, isActive, children, ...props }) => React.createElement('a', { 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);\nexport const PaginationPrevious = ({ href, ...props }) => React.createElement(PaginationLink, { href, ...props }, 'Previous');\nexport const PaginationNext = ({ href, ...props }) => React.createElement(PaginationLink, { href, ...props }, 'Next');\nexport const PaginationEllipsis = (props) => React.createElement('span', { 'aria-hidden': true, ...props }, '...');\n\n// HeroUI wrappers — overlays\nexport { default as HeroUIDrawer } from \"./heroui/Drawer\";\nexport { default as HeroUIModal } from \"./heroui/Modal\";\nexport { default as HeroUIDropdown } from \"./heroui/Dropdown\";\nexport { default as HeroUITooltip } from \"./heroui/Tooltip\";\nexport { default as HeroUIToast } from \"./heroui/Toast\";\n\n// HeroUI wrappers — feedback\nexport { default as HeroUIAlert } from \"./heroui/Alert\";\nexport { default as HeroUIBadge } from \"./heroui/Badge\";\nexport { default as HeroUIProgressBar } from \"./heroui/ProgressBar\";\nexport { default as HeroUIProgressCircle } from \"./heroui/ProgressCircle\";\nexport { default as HeroUIMeter } from \"./heroui/Meter\";\nexport { default as HeroUISkeleton, Skeleton } from \"./heroui/Skeleton\";\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 }) => React.createElement('button', props, children);\nexport const SelectValue = ({ placeholder, ...props }) => React.createElement('span', props, placeholder);\nexport const SelectContent = ({ children, ...props }) => React.createElement('div', props, children);\nexport const SelectItem = ({ children, ...props }) => React.createElement('div', props, children);\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","React","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","href","asChild","BreadcrumbPage","BreadcrumbSeparator","BreadcrumbEllipsis","PaginationContent","PaginationItem","PaginationLink","isActive","PaginationPrevious","PaginationNext","PaginationEllipsis","SelectTrigger","size","SelectValue","placeholder","SelectContent","SelectItem"],"mappings":";;;;;;;;;;;;AA0GO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,QAAYC,EAAM,cAAc,OAAO,EAAE,cAAc,cAAc,GAAGD,EAAA,GAASD,CAAQ,GACtHG,IAAiB,CAAC,EAAE,UAAAH,GAAU,GAAGC,QAAYC,EAAM,cAAc,MAAM,EAAE,WAAW,8FAA8F,GAAGD,EAAA,GAASD,CAAQ,GACtMI,IAAiB,CAAC,EAAE,UAAAJ,GAAU,GAAGC,QAAYC,EAAM,cAAc,MAAM,EAAE,WAAW,oCAAoC,GAAGD,EAAA,GAASD,CAAQ,GAC5IK,IAAiB,CAAC,EAAE,MAAAC,GAAM,UAAAN,GAAU,SAAAO,GAAS,GAAGN,EAAA,MAAYM,IAAUL,EAAM,cAAc,QAAQD,GAAOD,CAAQ,IAAIE,EAAM,cAAc,KAAK,EAAE,MAAAI,GAAM,WAAW,mEAAmE,GAAGL,EAAA,GAASD,CAAQ,GACxPQ,IAAiB,CAAC,EAAE,UAAAR,GAAU,GAAGC,EAAA,MAAYC,EAAM,cAAc,QAAQ,EAAE,MAAM,QAAQ,iBAAiB,QAAQ,gBAAgB,QAAQ,WAAW,iDAAiD,GAAGD,EAAA,GAASD,CAAQ,GAC1NS,IAAsB,CAAC,EAAE,UAAAT,GAAU,GAAGC,EAAA,MAAYC,EAAM,cAAc,MAAM,EAAE,MAAM,gBAAgB,eAAe,QAAQ,GAAGD,EAAA,GAASD,KAAY,GAAG,GACtJU,IAAqB,CAACT,MAAUC,EAAM,cAAc,QAAQ,EAAE,MAAM,gBAAgB,eAAe,QAAQ,GAAGD,EAAA,GAAS,KAAK,GAG5HU,IAAoB,CAAC,EAAE,UAAAX,GAAU,GAAGC,QAAYC,EAAM,cAAc,MAAM,EAAE,WAAW,oCAAoC,GAAGD,EAAA,GAASD,CAAQ,GAC/IY,IAAiB,CAAC,EAAE,UAAAZ,GAAU,GAAGC,EAAA,MAAYC,EAAM,cAAc,MAAMD,GAAOD,CAAQ,GACtFa,IAAiB,CAAC,EAAE,MAAAP,GAAM,UAAAQ,GAAU,UAAAd,GAAU,GAAGC,EAAA,MAAYC,EAAM,cAAc,KAAK,EAAE,MAAAI,GAAM,gBAAgBQ,IAAW,SAAS,QAAW,WAAW,gGAAgGA,IAAW,iEAAiE,4CAA4C,IAAI,GAAGb,EAAA,GAASD,CAAQ,GACxYe,IAAqB,CAAC,EAAE,MAAAT,GAAM,GAAGL,EAAA,MAAYC,EAAM,cAAcW,GAAgB,EAAE,MAAAP,GAAM,GAAGL,EAAA,GAAS,UAAU,GAC/Ge,IAAiB,CAAC,EAAE,MAAAV,GAAM,GAAGL,EAAA,MAAYC,EAAM,cAAcW,GAAgB,EAAE,MAAAP,GAAM,GAAGL,EAAA,GAAS,MAAM,GACvGgB,IAAqB,CAAChB,MAAUC,EAAM,cAAc,QAAQ,EAAE,eAAe,IAAM,GAAGD,EAAA,GAAS,KAAK,GAqBpGiB,IAAgB,CAAC,EAAE,UAAAlB,GAAU,MAAAmB,GAAM,GAAGlB,QAAYC,EAAM,cAAc,UAAUD,GAAOD,CAAQ,GAC/FoB,IAAc,CAAC,EAAE,aAAAC,GAAa,GAAGpB,EAAA,MAAYC,EAAM,cAAc,QAAQD,GAAOoB,CAAW,GAC3FC,IAAgB,CAAC,EAAE,UAAAtB,GAAU,GAAGC,EAAA,MAAYC,EAAM,cAAc,OAAOD,GAAOD,CAAQ,GACtFuB,IAAa,CAAC,EAAE,UAAAvB,GAAU,GAAGC,EAAA,MAAYC,EAAM,cAAc,OAAOD,GAAOD,CAAQ;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import t from "react";
|
|
3
|
-
import { tokens as d, getTokenCSSProperties as
|
|
3
|
+
import { tokens as d, getTokenCSSProperties as u } from "./tokens.js";
|
|
4
4
|
const a = t.createContext({
|
|
5
5
|
mode: "light",
|
|
6
6
|
theme: d,
|
|
@@ -14,7 +14,7 @@ function f(r) {
|
|
|
14
14
|
}
|
|
15
15
|
function l() {
|
|
16
16
|
if (typeof document > "u") return;
|
|
17
|
-
const r = document.documentElement, o =
|
|
17
|
+
const r = document.documentElement, o = u();
|
|
18
18
|
for (const [e, s] of Object.entries(o))
|
|
19
19
|
r.style.setProperty(e, s);
|
|
20
20
|
}
|
|
@@ -46,7 +46,7 @@ function y({ initialMode: r = "light", children: o }) {
|
|
|
46
46
|
}),
|
|
47
47
|
[e]
|
|
48
48
|
);
|
|
49
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ i(a.Provider, { value: m, children: o });
|
|
50
50
|
}
|
|
51
51
|
export {
|
|
52
52
|
y as default,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppThemeProvider.js","sources":["../../../../src/components/library/theme/AppThemeProvider.jsx"],"sourcesContent":["import React from \"react\";\nimport { tokens, getTokenCSSProperties } from \"./tokens\";\n\nconst ThemeModeContext = React.createContext({\n mode: \"light\",\n theme: tokens,\n toggle: () => {}\n});\n\nconst STORAGE_KEY = \"app-color-mode\";\n\nfunction applyHtmlDarkClass(mode) {\n if (typeof document === \"undefined\") return;\n const root = document.documentElement;\n if (mode === \"dark\") root.classList.add(\"dark\");\n else root.classList.remove(\"dark\");\n}\n\nfunction applyTokenCSSProperties() {\n if (typeof document === \"undefined\") return;\n const root = document.documentElement;\n const props = getTokenCSSProperties();\n for (const [key, value] of Object.entries(props)) {\n root.style.setProperty(key, value);\n }\n}\n\nexport function useThemeMode() {\n return React.useContext(ThemeModeContext);\n}\n\nexport default function AppThemeProvider({ initialMode = \"light\", children }) {\n const [mode, setMode] = React.useState(initialMode);\n\n React.useEffect(() => {\n applyTokenCSSProperties();\n }, []);\n\n React.useEffect(() => {\n try {\n const stored = window.localStorage.getItem(STORAGE_KEY);\n if (stored === \"light\" || stored === \"dark\") setMode(stored);\n } catch {\n // ignore\n }\n }, []);\n\n React.useEffect(() => {\n applyHtmlDarkClass(mode);\n try {\n window.localStorage.setItem(STORAGE_KEY, mode);\n } catch {\n // ignore\n }\n }, [mode]);\n\n const value = React.useMemo(\n () => ({\n mode,\n theme: tokens,\n toggle: () => setMode((m) => (m === \"dark\" ? \"light\" : \"dark\"))\n }),\n [mode]\n );\n\n return <ThemeModeContext.Provider value={value}>{children}</ThemeModeContext.Provider>;\n}\n"],"names":["ThemeModeContext","React","tokens","STORAGE_KEY","applyHtmlDarkClass","mode","root","applyTokenCSSProperties","props","getTokenCSSProperties","key","value","useThemeMode","AppThemeProvider","initialMode","children","setMode","stored","m","jsx"],"mappings":";;;AAGA,MAAMA,IAAmBC,EAAM,cAAc;AAAA,EAC3C,MAAM;AAAA,EACN,OAAOC;AAAA,EACP,QAAQ,MAAM;AAAA,EAAC;AACjB,CAAC,GAEKC,IAAc;AAEpB,SAASC,EAAmBC,GAAM;AAChC,MAAI,OAAO,WAAa,IAAa;AACrC,QAAMC,IAAO,SAAS;AACtB,EAAID,MAAS,SAAQC,EAAK,UAAU,IAAI,MAAM,IACzCA,EAAK,UAAU,OAAO,MAAM;AACnC;AAEA,SAASC,IAA0B;AACjC,MAAI,OAAO,WAAa,IAAa;AACrC,QAAMD,IAAO,SAAS,iBAChBE,IAAQC,EAAA;AACd,aAAW,CAACC,GAAKC,CAAK,KAAK,OAAO,QAAQH,CAAK;AAC7C,IAAAF,EAAK,MAAM,YAAYI,GAAKC,CAAK;AAErC;AAEO,SAASC,IAAe;AAC7B,SAAOX,EAAM,WAAWD,CAAgB;AAC1C;AAEA,SAAwBa,EAAiB,EAAE,aAAAC,IAAc,SAAS,UAAAC,KAAY;AAC5E,QAAM,CAACV,GAAMW,CAAO,IAAIf,EAAM,SAASa,CAAW;
|
|
1
|
+
{"version":3,"file":"AppThemeProvider.js","sources":["../../../../src/components/library/theme/AppThemeProvider.jsx"],"sourcesContent":["import React from \"react\";\nimport { tokens, getTokenCSSProperties } from \"./tokens\";\n\nconst ThemeModeContext = React.createContext({\n mode: \"light\",\n theme: tokens,\n toggle: () => {}\n});\n\nconst STORAGE_KEY = \"app-color-mode\";\n\nfunction applyHtmlDarkClass(mode) {\n if (typeof document === \"undefined\") return;\n const root = document.documentElement;\n if (mode === \"dark\") root.classList.add(\"dark\");\n else root.classList.remove(\"dark\");\n}\n\nfunction applyTokenCSSProperties() {\n if (typeof document === \"undefined\") return;\n const root = document.documentElement;\n const props = getTokenCSSProperties();\n for (const [key, value] of Object.entries(props)) {\n root.style.setProperty(key, value);\n }\n}\n\nexport function useThemeMode() {\n return React.useContext(ThemeModeContext);\n}\n\nexport default function AppThemeProvider({ initialMode = \"light\", children }) {\n const [mode, setMode] = React.useState(initialMode);\n\n React.useEffect(() => {\n applyTokenCSSProperties();\n }, []);\n\n React.useEffect(() => {\n try {\n const stored = window.localStorage.getItem(STORAGE_KEY);\n if (stored === \"light\" || stored === \"dark\") setMode(stored);\n } catch {\n // ignore\n }\n }, []);\n\n React.useEffect(() => {\n applyHtmlDarkClass(mode);\n try {\n window.localStorage.setItem(STORAGE_KEY, mode);\n } catch {\n // ignore\n }\n }, [mode]);\n\n const value = React.useMemo(\n () => ({\n mode,\n theme: tokens,\n toggle: () => setMode((m) => (m === \"dark\" ? \"light\" : \"dark\"))\n }),\n [mode]\n );\n\n return <ThemeModeContext.Provider value={value}>{children}</ThemeModeContext.Provider>;\n}\n"],"names":["ThemeModeContext","React","tokens","STORAGE_KEY","applyHtmlDarkClass","mode","root","applyTokenCSSProperties","props","getTokenCSSProperties","key","value","useThemeMode","AppThemeProvider","initialMode","children","setMode","stored","m","jsx"],"mappings":";;;AAGA,MAAMA,IAAmBC,EAAM,cAAc;AAAA,EAC3C,MAAM;AAAA,EACN,OAAOC;AAAA,EACP,QAAQ,MAAM;AAAA,EAAC;AACjB,CAAC,GAEKC,IAAc;AAEpB,SAASC,EAAmBC,GAAM;AAChC,MAAI,OAAO,WAAa,IAAa;AACrC,QAAMC,IAAO,SAAS;AACtB,EAAID,MAAS,SAAQC,EAAK,UAAU,IAAI,MAAM,IACzCA,EAAK,UAAU,OAAO,MAAM;AACnC;AAEA,SAASC,IAA0B;AACjC,MAAI,OAAO,WAAa,IAAa;AACrC,QAAMD,IAAO,SAAS,iBAChBE,IAAQC,EAAA;AACd,aAAW,CAACC,GAAKC,CAAK,KAAK,OAAO,QAAQH,CAAK;AAC7C,IAAAF,EAAK,MAAM,YAAYI,GAAKC,CAAK;AAErC;AAEO,SAASC,IAAe;AAC7B,SAAOX,EAAM,WAAWD,CAAgB;AAC1C;AAEA,SAAwBa,EAAiB,EAAE,aAAAC,IAAc,SAAS,UAAAC,KAAY;AAC5E,QAAM,CAACV,GAAMW,CAAO,IAAIf,EAAM,SAASa,CAAW;AAElD,EAAAb,EAAM,UAAU,MAAM;AACpB,IAAAM,EAAA;AAAA,EACF,GAAG,CAAA,CAAE,GAELN,EAAM,UAAU,MAAM;AACpB,QAAI;AACF,YAAMgB,IAAS,OAAO,aAAa,QAAQd,CAAW;AACtD,OAAIc,MAAW,WAAWA,MAAW,aAAgBA,CAAM;AAAA,IAC7D,QAAQ;AAAA,IAER;AAAA,EACF,GAAG,CAAA,CAAE,GAELhB,EAAM,UAAU,MAAM;AACpB,IAAAG,EAAmBC,CAAI;AACvB,QAAI;AACF,aAAO,aAAa,QAAQF,GAAaE,CAAI;AAAA,IAC/C,QAAQ;AAAA,IAER;AAAA,EACF,GAAG,CAACA,CAAI,CAAC;AAET,QAAMM,IAAQV,EAAM;AAAA,IAClB,OAAO;AAAA,MACL,MAAAI;AAAA,MACA,OAAOH;AAAA,MACP,QAAQ,MAAMc,EAAQ,CAACE,MAAOA,MAAM,SAAS,UAAU,MAAO;AAAA,IAAA;AAAA,IAEhE,CAACb,CAAI;AAAA,EAAA;AAGP,SAAO,gBAAAc,EAACnB,EAAiB,UAAjB,EAA0B,OAAAW,GAAe,UAAAI,EAAA,CAAS;AAC5D;"}
|
|
@@ -10,22 +10,22 @@ const o = {
|
|
|
10
10
|
brand: "bg-brand-500 text-white",
|
|
11
11
|
neutral: "bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-200"
|
|
12
12
|
};
|
|
13
|
-
function p({ src: i, name: e, initials: x, icon:
|
|
14
|
-
const
|
|
13
|
+
function p({ src: i, name: e, initials: x, icon: n, size: c = "sm", tone: d = "slate", className: s = "", ...r }) {
|
|
14
|
+
const l = o[c] ?? o.sm;
|
|
15
15
|
if (i)
|
|
16
16
|
return /* @__PURE__ */ a(
|
|
17
17
|
"img",
|
|
18
18
|
{
|
|
19
19
|
src: i,
|
|
20
20
|
alt: e ?? "",
|
|
21
|
-
className: `${
|
|
22
|
-
...
|
|
21
|
+
className: `${l} shrink-0 rounded-full border border-slate-200 object-cover dark:border-slate-800 ${s}`,
|
|
22
|
+
...r
|
|
23
23
|
}
|
|
24
24
|
);
|
|
25
|
-
if (m.isValidElement(
|
|
26
|
-
return /* @__PURE__ */ a("div", { className: `${
|
|
27
|
-
const
|
|
28
|
-
return /* @__PURE__ */ a("div", { className: `${
|
|
25
|
+
if (m.isValidElement(n))
|
|
26
|
+
return /* @__PURE__ */ a("div", { className: `${l} ${t[d] ?? t.slate} flex shrink-0 items-center justify-center rounded-full ${s}`, ...r, children: n });
|
|
27
|
+
const f = x ?? (e ? e.split(" ").map((u) => u[0]).join("").slice(0, 2).toUpperCase() : "?");
|
|
28
|
+
return /* @__PURE__ */ a("div", { className: `${l} ${t[d] ?? t.slate} flex shrink-0 items-center justify-center rounded-full font-bold ${s}`, ...r, children: f });
|
|
29
29
|
}
|
|
30
30
|
export {
|
|
31
31
|
p as default
|
|
@@ -3,6 +3,8 @@ import b from "react";
|
|
|
3
3
|
import "../library/theme/AppThemeProvider.js";
|
|
4
4
|
import u from "../library/ui/UIButton.js";
|
|
5
5
|
import p from "../library/ui/Chip.js";
|
|
6
|
+
import "../library/heroui/Dialog.js";
|
|
7
|
+
import "@heroui/react";
|
|
6
8
|
import h from "../library/cards/ChartCard.js";
|
|
7
9
|
import g from "../library/cards/MetricCard.js";
|
|
8
10
|
import f from "../library/cards/StatusCard.js";
|
|
@@ -15,7 +17,6 @@ import "../library/charts/GeoMap.js";
|
|
|
15
17
|
import "react-dom";
|
|
16
18
|
import "../library/data/DataModeProvider.js";
|
|
17
19
|
import "@heroicons/react/24/solid";
|
|
18
|
-
import "@heroui/react";
|
|
19
20
|
const y = {
|
|
20
21
|
NarrativeSummary({ summary: t, title: a }) {
|
|
21
22
|
return /* @__PURE__ */ i("div", { className: "text-sm text-slate-600 dark:text-slate-300", children: [
|
|
@@ -217,7 +218,7 @@ let C = { ...y };
|
|
|
217
218
|
function w() {
|
|
218
219
|
return C;
|
|
219
220
|
}
|
|
220
|
-
function
|
|
221
|
+
function V(t, a) {
|
|
221
222
|
const l = w()[t.type];
|
|
222
223
|
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: [
|
|
223
224
|
"Unknown component: ",
|
|
@@ -226,6 +227,6 @@ function P(t, a) {
|
|
|
226
227
|
}
|
|
227
228
|
export {
|
|
228
229
|
w as getComponentRegistry,
|
|
229
|
-
|
|
230
|
+
V as renderSchemaComponent
|
|
230
231
|
};
|
|
231
232
|
//# sourceMappingURL=ComponentRegistry.js.map
|