@schandlergarcia/sf-web-components 1.5.0 → 1.7.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/heroui/Accordion.d.ts +6 -5
- package/dist/components/library/heroui/Accordion.js +7 -8
- package/dist/components/library/heroui/Accordion.js.map +1 -1
- package/dist/components/library/heroui/Alert.d.ts +6 -5
- package/dist/components/library/heroui/Alert.js +7 -8
- package/dist/components/library/heroui/Alert.js.map +1 -1
- package/dist/components/library/heroui/Badge.d.ts +8 -5
- package/dist/components/library/heroui/Badge.js +2 -3
- package/dist/components/library/heroui/Badge.js.map +1 -1
- package/dist/components/library/heroui/Breadcrumbs.d.ts +5 -2
- package/dist/components/library/heroui/Breadcrumbs.js +4 -5
- package/dist/components/library/heroui/Breadcrumbs.js.map +1 -1
- package/dist/components/library/heroui/Button.d.ts +16 -26
- package/dist/components/library/heroui/Button.js +21 -22
- package/dist/components/library/heroui/Button.js.map +1 -1
- package/dist/components/library/heroui/Card.d.ts +8 -5
- package/dist/components/library/heroui/Card.js +6 -7
- package/dist/components/library/heroui/Card.js.map +1 -1
- package/dist/components/library/heroui/Collapsible.d.ts +19 -30
- package/dist/components/library/heroui/Collapsible.js +13 -13
- package/dist/components/library/heroui/Collapsible.js.map +1 -1
- package/dist/components/library/heroui/DatePicker.d.ts +24 -52
- package/dist/components/library/heroui/DatePicker.js +5 -6
- package/dist/components/library/heroui/DatePicker.js.map +1 -1
- package/dist/components/library/heroui/Dialog.d.ts +18 -32
- package/dist/components/library/heroui/Dialog.js +6 -7
- package/dist/components/library/heroui/Dialog.js.map +1 -1
- package/dist/components/library/heroui/Drawer.d.ts +6 -2
- package/dist/components/library/heroui/Drawer.js +2 -3
- package/dist/components/library/heroui/Drawer.js.map +1 -1
- package/dist/components/library/heroui/Dropdown.d.ts +6 -2
- package/dist/components/library/heroui/Dropdown.js +2 -3
- package/dist/components/library/heroui/Dropdown.js.map +1 -1
- package/dist/components/library/heroui/Field.d.ts +19 -38
- package/dist/components/library/heroui/Field.js +9 -10
- package/dist/components/library/heroui/Field.js.map +1 -1
- package/dist/components/library/heroui/Meter.d.ts +7 -5
- package/dist/components/library/heroui/Meter.js +4 -5
- package/dist/components/library/heroui/Meter.js.map +1 -1
- package/dist/components/library/heroui/Modal.d.ts +6 -2
- package/dist/components/library/heroui/Modal.js +2 -3
- package/dist/components/library/heroui/Modal.js.map +1 -1
- package/dist/components/library/heroui/Pagination.d.ts +6 -2
- package/dist/components/library/heroui/Pagination.js +4 -5
- package/dist/components/library/heroui/Pagination.js.map +1 -1
- package/dist/components/library/heroui/Popover.d.ts +23 -38
- package/dist/components/library/heroui/Popover.js +12 -12
- package/dist/components/library/heroui/Popover.js.map +1 -1
- package/dist/components/library/heroui/ProgressBar.d.ts +8 -5
- package/dist/components/library/heroui/ProgressBar.js +0 -1
- package/dist/components/library/heroui/ProgressBar.js.map +1 -1
- package/dist/components/library/heroui/ProgressCircle.d.ts +8 -5
- package/dist/components/library/heroui/ProgressCircle.js +0 -1
- package/dist/components/library/heroui/ProgressCircle.js.map +1 -1
- package/dist/components/library/heroui/ScrollShadow.d.ts +8 -5
- package/dist/components/library/heroui/ScrollShadow.js +3 -4
- package/dist/components/library/heroui/ScrollShadow.js.map +1 -1
- package/dist/components/library/heroui/Select.d.ts +31 -37
- package/dist/components/library/heroui/Select.js +3 -4
- package/dist/components/library/heroui/Select.js.map +1 -1
- package/dist/components/library/heroui/Separator.d.ts +6 -2
- package/dist/components/library/heroui/Separator.js +4 -5
- package/dist/components/library/heroui/Separator.js.map +1 -1
- package/dist/components/library/heroui/Tabs.d.ts +6 -5
- package/dist/components/library/heroui/Tabs.js +7 -8
- package/dist/components/library/heroui/Tabs.js.map +1 -1
- package/dist/components/library/heroui/Toggle.d.ts +5 -4
- package/dist/components/library/heroui/Toggle.js +5 -6
- package/dist/components/library/heroui/Toggle.js.map +1 -1
- package/dist/components/library/heroui/Tooltip.d.ts +6 -2
- package/dist/components/library/heroui/Tooltip.js +2 -3
- package/dist/components/library/heroui/Tooltip.js.map +1 -1
- package/package.json +1 -1
- package/src/components/library/heroui/{Accordion.jsx → Accordion.tsx} +8 -3
- package/src/components/library/heroui/Alert.tsx +13 -0
- package/src/components/library/heroui/Badge.tsx +14 -0
- package/src/components/library/heroui/{Breadcrumbs.jsx → Breadcrumbs.tsx} +5 -2
- package/src/components/library/heroui/{Button.jsx → Button.tsx} +26 -8
- package/src/components/library/heroui/Card.tsx +14 -0
- package/src/components/library/heroui/Collapsible.tsx +62 -0
- package/src/components/library/heroui/{DatePicker.jsx → DatePicker.tsx} +28 -4
- package/src/components/library/heroui/Dialog.tsx +43 -0
- package/src/components/library/heroui/{Drawer.jsx → Drawer.tsx} +6 -2
- package/src/components/library/heroui/{Dropdown.jsx → Dropdown.tsx} +6 -2
- package/src/components/library/heroui/{Field.jsx → Field.tsx} +23 -6
- package/src/components/library/heroui/Meter.tsx +13 -0
- package/src/components/library/heroui/{Modal.jsx → Modal.tsx} +5 -2
- package/src/components/library/heroui/Pagination.tsx +11 -0
- package/src/components/library/heroui/{Popover.jsx → Popover.tsx} +29 -8
- package/src/components/library/heroui/ProgressBar.tsx +14 -0
- package/src/components/library/heroui/ProgressCircle.tsx +14 -0
- package/src/components/library/heroui/ScrollShadow.tsx +14 -0
- package/src/components/library/heroui/Select.tsx +73 -0
- package/src/components/library/heroui/Separator.tsx +11 -0
- package/src/components/library/heroui/{Tabs.jsx → Tabs.tsx} +8 -3
- package/src/components/library/heroui/{Toggle.jsx → Toggle.tsx} +6 -2
- package/src/components/library/heroui/{Tooltip.jsx → Tooltip.tsx} +5 -2
- package/src/components/library/heroui/Alert.jsx +0 -8
- package/src/components/library/heroui/Badge.jsx +0 -8
- package/src/components/library/heroui/Card.jsx +0 -8
- package/src/components/library/heroui/Collapsible.jsx +0 -42
- package/src/components/library/heroui/Dialog.jsx +0 -37
- package/src/components/library/heroui/Meter.jsx +0 -8
- package/src/components/library/heroui/Pagination.jsx +0 -8
- package/src/components/library/heroui/ProgressBar.jsx +0 -8
- package/src/components/library/heroui/ProgressCircle.jsx +0 -8
- package/src/components/library/heroui/ScrollShadow.jsx +0 -8
- package/src/components/library/heroui/Select.jsx +0 -37
- package/src/components/library/heroui/Separator.jsx +0 -8
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
[x: string]: any;
|
|
3
|
-
children: any;
|
|
4
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export { ProgressCircle };
|
|
1
|
+
import type { ReactNode } from "react";
|
|
6
2
|
import { ProgressCircle } from "@heroui/react";
|
|
3
|
+
import type { ProgressCircleProps } from "@heroui/react";
|
|
4
|
+
export interface HeroUIProgressCircleProps extends ProgressCircleProps {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export default function HeroUIProgressCircle({ children, ...props }: HeroUIProgressCircleProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export { ProgressCircle };
|
|
9
|
+
export type { ProgressCircleProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressCircle.js","sources":["../../../../src/components/library/heroui/ProgressCircle.
|
|
1
|
+
{"version":3,"file":"ProgressCircle.js","sources":["../../../../src/components/library/heroui/ProgressCircle.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { ProgressCircle } from \"@heroui/react\";\nimport type { ProgressCircleProps } from \"@heroui/react\";\n\nexport interface HeroUIProgressCircleProps extends ProgressCircleProps {\n children?: ReactNode;\n}\n\nexport default function HeroUIProgressCircle({ children, ...props }: HeroUIProgressCircleProps) {\n return <ProgressCircle {...props}>{children}</ProgressCircle>;\n}\n\nexport { ProgressCircle };\nexport type { ProgressCircleProps };\n"],"names":["HeroUIProgressCircle","children","props","jsx","ProgressCircle"],"mappings":";;;AAQA,SAAwBA,EAAqB,EAAE,UAAAC,GAAU,GAAGC,KAAoC;AAC9F,SAAO,gBAAAC,EAACC,GAAA,EAAgB,GAAGF,GAAQ,UAAAD,EAAA,CAAS;AAC9C;"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
[x: string]: any;
|
|
3
|
-
children: any;
|
|
4
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export { ScrollShadow };
|
|
1
|
+
import type { ReactNode } from "react";
|
|
6
2
|
import { ScrollShadow } from "@heroui/react";
|
|
3
|
+
import type { ScrollShadowProps } from "@heroui/react";
|
|
4
|
+
export interface HeroUIScrollShadowProps extends ScrollShadowProps {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export default function HeroUIScrollShadow({ children, ...props }: HeroUIScrollShadowProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export { ScrollShadow };
|
|
9
|
+
export type { ScrollShadowProps };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "react";
|
|
3
|
-
import { ScrollShadow as l } from "@heroui/react";
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { ScrollShadow as t } from "@heroui/react";
|
|
4
3
|
import { ScrollShadow as c } from "@heroui/react";
|
|
5
4
|
function e({ children: o, ...r }) {
|
|
6
|
-
return /* @__PURE__ */ t
|
|
5
|
+
return /* @__PURE__ */ l(t, { ...r, children: o });
|
|
7
6
|
}
|
|
8
7
|
export {
|
|
9
8
|
c as ScrollShadow,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollShadow.js","sources":["../../../../src/components/library/heroui/ScrollShadow.
|
|
1
|
+
{"version":3,"file":"ScrollShadow.js","sources":["../../../../src/components/library/heroui/ScrollShadow.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { ScrollShadow } from \"@heroui/react\";\nimport type { ScrollShadowProps } from \"@heroui/react\";\n\nexport interface HeroUIScrollShadowProps extends ScrollShadowProps {\n children?: ReactNode;\n}\n\nexport default function HeroUIScrollShadow({ children, ...props }: HeroUIScrollShadowProps) {\n return <ScrollShadow {...props}>{children}</ScrollShadow>;\n}\n\nexport { ScrollShadow };\nexport type { ScrollShadowProps };\n"],"names":["HeroUIScrollShadow","children","props","jsx","ScrollShadow"],"mappings":";;;AAQA,SAAwBA,EAAmB,EAAE,UAAAC,GAAU,GAAGC,KAAkC;AAC1F,SAAO,gBAAAC,EAACC,GAAA,EAAc,GAAGF,GAAQ,UAAAD,EAAA,CAAS;AAC5C;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
/**
|
|
2
3
|
* HeroUI v3 Select wrapper with shadcn compatibility.
|
|
3
4
|
*
|
|
@@ -5,40 +6,33 @@
|
|
|
5
6
|
* - onValueChange -> onSelectionChange
|
|
6
7
|
* - value -> selectedKeys
|
|
7
8
|
*/
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
value:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
export
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
children: any;
|
|
39
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
40
|
-
export function SelectItem({ value, children, ...props }: {
|
|
41
|
-
[x: string]: any;
|
|
42
|
-
value: any;
|
|
43
|
-
children: any;
|
|
44
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export interface HeroUISelectProps {
|
|
10
|
+
value?: string;
|
|
11
|
+
onValueChange?: (value: string) => void;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}
|
|
15
|
+
export default function HeroUISelect({ value, onValueChange, children, ...props }: HeroUISelectProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const Select: typeof HeroUISelect;
|
|
17
|
+
export interface SelectTriggerProps {
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
size?: string;
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}
|
|
22
|
+
export declare const SelectTrigger: ({ children }: SelectTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export interface SelectValueProps {
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}
|
|
27
|
+
export declare const SelectValue: ({ placeholder }: SelectValueProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export interface SelectContentProps {
|
|
29
|
+
children?: React.ReactNode;
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}
|
|
32
|
+
export declare const SelectContent: ({ children }: SelectContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export interface SelectItemProps {
|
|
34
|
+
value: string;
|
|
35
|
+
children?: React.ReactNode;
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
}
|
|
38
|
+
export declare const SelectItem: ({ value, children, ...props }: SelectItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
2
|
import { Select as s } from "@heroui/react";
|
|
4
|
-
function h({ value: e, onValueChange: t, children:
|
|
3
|
+
function h({ value: e, onValueChange: t, children: n, ...o }) {
|
|
5
4
|
return /* @__PURE__ */ l(
|
|
6
5
|
s,
|
|
7
6
|
{
|
|
@@ -10,8 +9,8 @@ function h({ value: e, onValueChange: t, children: o, ...n }) {
|
|
|
10
9
|
const r = Array.from(c)[0];
|
|
11
10
|
t?.(r || "");
|
|
12
11
|
},
|
|
13
|
-
...
|
|
14
|
-
children:
|
|
12
|
+
...o,
|
|
13
|
+
children: n
|
|
15
14
|
}
|
|
16
15
|
);
|
|
17
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../../../src/components/library/heroui/Select.
|
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../../../src/components/library/heroui/Select.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Select as HeroSelect } from \"@heroui/react\";\n\n/**\n * HeroUI v3 Select wrapper with shadcn compatibility.\n *\n * Translates shadcn API to HeroUI:\n * - onValueChange -> onSelectionChange\n * - value -> selectedKeys\n */\nexport interface HeroUISelectProps {\n value?: string;\n onValueChange?: (value: string) => void;\n children?: React.ReactNode;\n [key: string]: any;\n}\n\nexport default function HeroUISelect({ value, onValueChange, children, ...props }: HeroUISelectProps) {\n // Translate shadcn API to HeroUI API\n const selectedKeys = value ? [value] : [];\n const handleSelectionChange = (keys: any) => {\n const selected = Array.from(keys)[0] as string;\n onValueChange?.(selected || \"\");\n };\n\n const HeroSelectAny = HeroSelect as any;\n return (\n <HeroSelectAny\n selectedKeys={selectedKeys}\n onSelectionChange={handleSelectionChange}\n {...props}\n >\n {children}\n </HeroSelectAny>\n );\n}\n\n// For direct HeroUI usage\nexport const Select = HeroUISelect;\n\n// Shadcn-compatible subcomponents that just pass through children\nexport interface SelectTriggerProps {\n children?: React.ReactNode;\n size?: string;\n [key: string]: any;\n}\n\nexport const SelectTrigger = ({ children }: SelectTriggerProps) => <>{children}</>;\n\nexport interface SelectValueProps {\n placeholder?: string;\n [key: string]: any;\n}\n\nexport const SelectValue = ({ placeholder }: SelectValueProps) => <span>{placeholder}</span>;\n\nexport interface SelectContentProps {\n children?: React.ReactNode;\n [key: string]: any;\n}\n\nexport const SelectContent = ({ children }: SelectContentProps) => <>{children}</>;\n\nexport interface SelectItemProps {\n value: string;\n children?: React.ReactNode;\n [key: string]: any;\n}\n\nexport const SelectItem = ({ value, children, ...props }: SelectItemProps) => {\n const HeroSelectAny = HeroSelect as any;\n return <HeroSelectAny.Item key={value} {...props}>{children}</HeroSelectAny.Item>;\n};\n"],"names":["HeroUISelect","value","onValueChange","children","props","jsx","HeroSelect","keys","selected"],"mappings":";;AAiBA,SAAwBA,EAAa,EAAE,OAAAC,GAAO,eAAAC,GAAe,UAAAC,GAAU,GAAGC,KAA4B;AASpG,SACE,gBAAAC;AAAA,IAFoBC;AAAAA,IAEnB;AAAA,MACC,cATiBL,IAAQ,CAACA,CAAK,IAAI,CAAA;AAAA,MAUnC,mBAT0B,CAACM,MAAc;AAC3C,cAAMC,IAAW,MAAM,KAAKD,CAAI,EAAE,CAAC;AACnC,QAAAL,IAAgBM,KAAY,EAAE;AAAA,MAChC;AAAA,MAOK,GAAGJ;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
export default function HeroUISeparator(props: any): import("react/jsx-runtime").JSX.Element;
|
|
2
|
-
export { Separator };
|
|
3
1
|
import { Separator } from "@heroui/react";
|
|
2
|
+
import type { SeparatorProps } from "@heroui/react";
|
|
3
|
+
export interface HeroUISeparatorProps extends SeparatorProps {
|
|
4
|
+
}
|
|
5
|
+
export default function HeroUISeparator(props: HeroUISeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export { Separator };
|
|
7
|
+
export type { SeparatorProps };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
2
|
import { Separator as t } from "@heroui/react";
|
|
4
|
-
import { Separator as
|
|
5
|
-
function
|
|
3
|
+
import { Separator as i } from "@heroui/react";
|
|
4
|
+
function p(r) {
|
|
6
5
|
return /* @__PURE__ */ o(t, { ...r });
|
|
7
6
|
}
|
|
8
7
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
i as Separator,
|
|
9
|
+
p as default
|
|
11
10
|
};
|
|
12
11
|
//# sourceMappingURL=Separator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.js","sources":["../../../../src/components/library/heroui/Separator.
|
|
1
|
+
{"version":3,"file":"Separator.js","sources":["../../../../src/components/library/heroui/Separator.tsx"],"sourcesContent":["import { Separator } from \"@heroui/react\";\nimport type { SeparatorProps } from \"@heroui/react\";\n\nexport interface HeroUISeparatorProps extends SeparatorProps {}\n\nexport default function HeroUISeparator(props: HeroUISeparatorProps) {\n return <Separator {...props} />;\n}\n\nexport { Separator };\nexport type { SeparatorProps };\n"],"names":["HeroUISeparator","props","jsx","Separator"],"mappings":";;;AAKA,SAAwBA,EAAgBC,GAA6B;AACnE,SAAO,gBAAAC,EAACC,GAAA,EAAW,GAAGF,EAAA,CAAO;AAC/B;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Tabs } from "@heroui/react";
|
|
1
2
|
/**
|
|
2
3
|
* HeroUI v3 Tabs — compound component.
|
|
3
4
|
*
|
|
@@ -16,9 +17,9 @@
|
|
|
16
17
|
* <Tabs.Panel id="analytics">…</Tabs.Panel>
|
|
17
18
|
* </Tabs>
|
|
18
19
|
*/
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
20
|
+
export interface HeroUITabsProps {
|
|
21
|
+
variant?: string;
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}
|
|
24
|
+
export default function HeroUITabs({ variant, ...props }: HeroUITabsProps): import("react/jsx-runtime").JSX.Element;
|
|
23
25
|
export { Tabs };
|
|
24
|
-
import { Tabs } from "@heroui/react";
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "react";
|
|
3
|
-
import { Tabs as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return /* @__PURE__ */ t(m, { variant: r, ...o });
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { Tabs as s } from "@heroui/react";
|
|
3
|
+
import { Tabs as p } from "@heroui/react";
|
|
4
|
+
function b({ variant: r = "primary", ...o }) {
|
|
5
|
+
return /* @__PURE__ */ a(s, { variant: r, ...o });
|
|
7
6
|
}
|
|
8
7
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
p as Tabs,
|
|
9
|
+
b as default
|
|
11
10
|
};
|
|
12
11
|
//# sourceMappingURL=Tabs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","sources":["../../../../src/components/library/heroui/Tabs.
|
|
1
|
+
{"version":3,"file":"Tabs.js","sources":["../../../../src/components/library/heroui/Tabs.tsx"],"sourcesContent":["import { Tabs } from \"@heroui/react\";\n\n/**\n * HeroUI v3 Tabs — compound component.\n *\n * Sub-components via dot notation on the named `Tabs` export:\n * Tabs.List, Tabs.ListContainer, Tabs.Tab, Tabs.Panel,\n * Tabs.Separator, Tabs.Indicator\n *\n * @example\n * import { Tabs } from \"@/components/library\";\n * <Tabs>\n * <Tabs.List aria-label=\"Options\">\n * <Tabs.Tab id=\"overview\">Overview</Tabs.Tab>\n * <Tabs.Tab id=\"analytics\">Analytics</Tabs.Tab>\n * </Tabs.List>\n * <Tabs.Panel id=\"overview\">…</Tabs.Panel>\n * <Tabs.Panel id=\"analytics\">…</Tabs.Panel>\n * </Tabs>\n */\nexport interface HeroUITabsProps {\n variant?: string;\n [key: string]: any;\n}\n\nexport default function HeroUITabs({ variant = \"primary\", ...props }: HeroUITabsProps) {\n const TabsAny = Tabs as any;\n return <TabsAny variant={variant} {...props} />;\n}\n\nexport { Tabs };\n"],"names":["HeroUITabs","variant","props","jsx","Tabs"],"mappings":";;;AAyBA,SAAwBA,EAAW,EAAE,SAAAC,IAAU,WAAW,GAAGC,KAA0B;AAErF,SAAO,gBAAAC,EADSC,GACR,EAAQ,SAAAH,GAAmB,GAAGC,EAAA,CAAO;AAC/C;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
label?: string
|
|
4
|
-
}
|
|
1
|
+
import type { SwitchProps } from "@heroui/react";
|
|
2
|
+
export interface HeroUIToggleProps extends Omit<SwitchProps, 'isSelected' | 'onChange'> {
|
|
3
|
+
label?: string;
|
|
4
|
+
}
|
|
5
|
+
export default function HeroUIToggle({ label, ...props }: HeroUIToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
2
|
import { Switch as o } from "@heroui/react";
|
|
4
|
-
import { useThemeMode as
|
|
5
|
-
function
|
|
6
|
-
const { mode: n, toggle:
|
|
7
|
-
return /* @__PURE__ */ e(o, { isSelected: n === "dark", onChange:
|
|
3
|
+
import { useThemeMode as i } from "../theme/AppThemeProvider.js";
|
|
4
|
+
function a({ label: t = "Dark mode", ...r }) {
|
|
5
|
+
const { mode: n, toggle: d } = i();
|
|
6
|
+
return /* @__PURE__ */ e(o, { isSelected: n === "dark", onChange: d, ...r, children: /* @__PURE__ */ e(o.Content, { children: t }) });
|
|
8
7
|
}
|
|
9
8
|
export {
|
|
10
|
-
|
|
9
|
+
a as default
|
|
11
10
|
};
|
|
12
11
|
//# sourceMappingURL=Toggle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toggle.js","sources":["../../../../src/components/library/heroui/Toggle.
|
|
1
|
+
{"version":3,"file":"Toggle.js","sources":["../../../../src/components/library/heroui/Toggle.tsx"],"sourcesContent":["import { Switch } from \"@heroui/react\";\nimport type { SwitchProps } from \"@heroui/react\";\nimport { useThemeMode } from \"../theme/AppThemeProvider\";\n\nexport interface HeroUIToggleProps extends Omit<SwitchProps, 'isSelected' | 'onChange'> {\n label?: string;\n}\n\nexport default function HeroUIToggle({ label = \"Dark mode\", ...props }: HeroUIToggleProps) {\n const { mode, toggle } = useThemeMode();\n const isSelected = mode === \"dark\";\n\n return (\n <Switch isSelected={isSelected} onChange={toggle} {...props}>\n <Switch.Content>{label}</Switch.Content>\n </Switch>\n );\n}\n"],"names":["HeroUIToggle","label","props","mode","toggle","useThemeMode","jsx","Switch"],"mappings":";;;AAQA,SAAwBA,EAAa,EAAE,OAAAC,IAAQ,aAAa,GAAGC,KAA4B;AACzF,QAAM,EAAE,MAAAC,GAAM,QAAAC,EAAA,IAAWC,EAAA;AAGzB,SACE,gBAAAC,EAACC,GAAA,EAAO,YAHSJ,MAAS,QAGM,UAAUC,GAAS,GAAGF,GACpD,UAAA,gBAAAI,EAACC,EAAO,SAAP,EAAgB,UAAAN,EAAA,CAAM,GACzB;AAEJ;"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Tooltip } from "@heroui/react";
|
|
2
|
+
import type { TooltipProps } from "@heroui/react";
|
|
1
3
|
/**
|
|
2
4
|
* HeroUI v3 Tooltip — compound component.
|
|
3
5
|
*
|
|
@@ -11,6 +13,8 @@
|
|
|
11
13
|
* <Tooltip.Content>Helpful info</Tooltip.Content>
|
|
12
14
|
* </Tooltip>
|
|
13
15
|
*/
|
|
14
|
-
export
|
|
16
|
+
export interface HeroUITooltipProps extends TooltipProps {
|
|
17
|
+
}
|
|
18
|
+
export default function HeroUITooltip(props: HeroUITooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
15
19
|
export { Tooltip };
|
|
16
|
-
|
|
20
|
+
export type { TooltipProps };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
2
|
import { Tooltip as t } from "@heroui/react";
|
|
4
|
-
import { Tooltip as
|
|
3
|
+
import { Tooltip as l } from "@heroui/react";
|
|
5
4
|
function e(o) {
|
|
6
5
|
return /* @__PURE__ */ r(t, { ...o });
|
|
7
6
|
}
|
|
8
7
|
export {
|
|
9
|
-
|
|
8
|
+
l as Tooltip,
|
|
10
9
|
e as default
|
|
11
10
|
};
|
|
12
11
|
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sources":["../../../../src/components/library/heroui/Tooltip.
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sources":["../../../../src/components/library/heroui/Tooltip.tsx"],"sourcesContent":["import { Tooltip } from \"@heroui/react\";\nimport type { TooltipProps } from \"@heroui/react\";\n\n/**\n * HeroUI v3 Tooltip — compound component.\n *\n * Sub-components via dot notation on the named `Tooltip` export:\n * Tooltip.Trigger, Tooltip.Content, Tooltip.Arrow\n *\n * @example\n * import { Tooltip } from \"@/components/library\";\n * <Tooltip>\n * <Tooltip.Trigger><Button>Hover me</Button></Tooltip.Trigger>\n * <Tooltip.Content>Helpful info</Tooltip.Content>\n * </Tooltip>\n */\nexport interface HeroUITooltipProps extends TooltipProps {}\n\nexport default function HeroUITooltip(props: HeroUITooltipProps) {\n return <Tooltip {...props} />;\n}\n\nexport { Tooltip };\nexport type { TooltipProps };\n"],"names":["HeroUITooltip","props","jsx","Tooltip"],"mappings":";;;AAkBA,SAAwBA,EAAcC,GAA2B;AAC/D,SAAO,gBAAAC,EAACC,GAAA,EAAS,GAAGF,EAAA,CAAO;AAC7B;"}
|
package/package.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { Accordion } from "@heroui/react";
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -19,8 +18,14 @@ import { Accordion } from "@heroui/react";
|
|
|
19
18
|
* </Accordion.Item>
|
|
20
19
|
* </Accordion>
|
|
21
20
|
*/
|
|
22
|
-
export
|
|
23
|
-
|
|
21
|
+
export interface HeroUIAccordionProps {
|
|
22
|
+
variant?: string;
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default function HeroUIAccordion({ variant = "default", ...props }: HeroUIAccordionProps) {
|
|
27
|
+
const AccordionAny = Accordion as any;
|
|
28
|
+
return <AccordionAny variant={variant} {...props} />;
|
|
24
29
|
}
|
|
25
30
|
|
|
26
31
|
export { Accordion };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Alert } from "@heroui/react";
|
|
2
|
+
|
|
3
|
+
export interface HeroUIAlertProps {
|
|
4
|
+
variant?: string;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default function HeroUIAlert({ variant = "default", ...props }: HeroUIAlertProps) {
|
|
9
|
+
const AlertAny = Alert as any;
|
|
10
|
+
return <AlertAny variant={variant} {...props} />;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { Alert };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { Badge } from "@heroui/react";
|
|
3
|
+
import type { BadgeProps } from "@heroui/react";
|
|
4
|
+
|
|
5
|
+
export interface HeroUIBadgeProps extends BadgeProps {
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default function HeroUIBadge({ children, ...props }: HeroUIBadgeProps) {
|
|
10
|
+
return <Badge {...props}>{children}</Badge>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { Badge };
|
|
14
|
+
export type { BadgeProps };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { Breadcrumbs } from "@heroui/react";
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -15,7 +14,11 @@ import { Breadcrumbs } from "@heroui/react";
|
|
|
15
14
|
* <Breadcrumbs.Item>Profile</Breadcrumbs.Item>
|
|
16
15
|
* </Breadcrumbs>
|
|
17
16
|
*/
|
|
18
|
-
export
|
|
17
|
+
export interface HeroUIBreadcrumbsProps {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default function HeroUIBreadcrumbs(props: HeroUIBreadcrumbsProps) {
|
|
19
22
|
return <Breadcrumbs {...props} />;
|
|
20
23
|
}
|
|
21
24
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
2
|
import { Button as HeroButton } from "@heroui/react";
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -9,6 +9,21 @@ import { Button as HeroButton } from "@heroui/react";
|
|
|
9
9
|
* - outline -> bordered
|
|
10
10
|
* - ghost -> light
|
|
11
11
|
*/
|
|
12
|
+
|
|
13
|
+
type ShadcnVariant = "primary" | "secondary" | "destructive" | "outline" | "ghost";
|
|
14
|
+
|
|
15
|
+
export interface HeroUIButtonProps {
|
|
16
|
+
variant?: ShadcnVariant;
|
|
17
|
+
size?: "sm" | "md" | "lg";
|
|
18
|
+
fullWidth?: boolean;
|
|
19
|
+
onClick?: () => void;
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
className?: string;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
type?: "button" | "submit" | "reset";
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}
|
|
26
|
+
|
|
12
27
|
export default function HeroUIButton({
|
|
13
28
|
variant = "primary",
|
|
14
29
|
size = "md",
|
|
@@ -17,9 +32,9 @@ export default function HeroUIButton({
|
|
|
17
32
|
children,
|
|
18
33
|
className = "",
|
|
19
34
|
...props
|
|
20
|
-
}) {
|
|
35
|
+
}: HeroUIButtonProps) {
|
|
21
36
|
// Map shadcn variants to HeroUI variants
|
|
22
|
-
const variantMap = {
|
|
37
|
+
const variantMap: Record<ShadcnVariant, string> = {
|
|
23
38
|
primary: "solid",
|
|
24
39
|
secondary: "solid",
|
|
25
40
|
destructive: "solid",
|
|
@@ -28,7 +43,7 @@ export default function HeroUIButton({
|
|
|
28
43
|
};
|
|
29
44
|
|
|
30
45
|
// Map shadcn variants to HeroUI colors
|
|
31
|
-
const colorMap = {
|
|
46
|
+
const colorMap: Record<ShadcnVariant, string> = {
|
|
32
47
|
primary: "primary",
|
|
33
48
|
secondary: "default",
|
|
34
49
|
destructive: "danger",
|
|
@@ -36,11 +51,13 @@ export default function HeroUIButton({
|
|
|
36
51
|
ghost: "default"
|
|
37
52
|
};
|
|
38
53
|
|
|
39
|
-
const heroVariant = variantMap[variant]
|
|
40
|
-
const heroColor = colorMap[variant]
|
|
54
|
+
const heroVariant = variantMap[variant];
|
|
55
|
+
const heroColor = colorMap[variant];
|
|
56
|
+
|
|
57
|
+
const HeroButtonAny = HeroButton as any;
|
|
41
58
|
|
|
42
59
|
return (
|
|
43
|
-
<
|
|
60
|
+
<HeroButtonAny
|
|
44
61
|
variant={heroVariant}
|
|
45
62
|
color={heroColor}
|
|
46
63
|
size={size}
|
|
@@ -50,9 +67,10 @@ export default function HeroUIButton({
|
|
|
50
67
|
{...props}
|
|
51
68
|
>
|
|
52
69
|
{children}
|
|
53
|
-
</
|
|
70
|
+
</HeroButtonAny>
|
|
54
71
|
);
|
|
55
72
|
}
|
|
56
73
|
|
|
57
74
|
// Also export as Button for shadcn compatibility
|
|
58
75
|
export const Button = HeroUIButton;
|
|
76
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { Card } from "@heroui/react";
|
|
3
|
+
import type { CardProps } from "@heroui/react";
|
|
4
|
+
|
|
5
|
+
export interface HeroUICardProps extends CardProps {
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default function HeroUICard({ children, ...props }: HeroUICardProps) {
|
|
10
|
+
return <Card {...props}>{children}</Card>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { Card };
|
|
14
|
+
export type { CardProps };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Accordion } from "@heroui/react";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* HeroUI v3 Collapsible — maps to Accordion for shadcn compatibility.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import { Collapsible, CollapsibleTrigger, CollapsibleContent } from "@/components/library";
|
|
9
|
+
* <Collapsible open={isOpen} onOpenChange={setIsOpen}>
|
|
10
|
+
* <CollapsibleTrigger>Toggle</CollapsibleTrigger>
|
|
11
|
+
* <CollapsibleContent>Content</CollapsibleContent>
|
|
12
|
+
* </Collapsible>
|
|
13
|
+
*/
|
|
14
|
+
export interface HeroUICollapsibleProps {
|
|
15
|
+
open?: boolean;
|
|
16
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default function HeroUICollapsible({ open, onOpenChange, children, ...props }: HeroUICollapsibleProps) {
|
|
22
|
+
// Map shadcn props to HeroUI Accordion
|
|
23
|
+
const selectedKeys = open ? ["item"] : [];
|
|
24
|
+
const AccordionAny = Accordion as any;
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<AccordionAny
|
|
28
|
+
selectedKeys={selectedKeys}
|
|
29
|
+
onSelectionChange={(keys: any) => {
|
|
30
|
+
const isOpen = Array.from(keys).includes("item");
|
|
31
|
+
onOpenChange?.(isOpen);
|
|
32
|
+
}}
|
|
33
|
+
{...props}
|
|
34
|
+
>
|
|
35
|
+
<AccordionAny.Item key="item" aria-label="Collapsible content">
|
|
36
|
+
{children}
|
|
37
|
+
</AccordionAny.Item>
|
|
38
|
+
</AccordionAny>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const Collapsible = HeroUICollapsible;
|
|
43
|
+
|
|
44
|
+
export interface CollapsibleTriggerProps {
|
|
45
|
+
children?: React.ReactNode;
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const CollapsibleTrigger = ({ children, ...props }: CollapsibleTriggerProps) => {
|
|
50
|
+
const AccordionAny = Accordion as any;
|
|
51
|
+
return <AccordionAny.Trigger {...props}>{children}</AccordionAny.Trigger>;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export interface CollapsibleContentProps {
|
|
55
|
+
children?: React.ReactNode;
|
|
56
|
+
[key: string]: any;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const CollapsibleContent = ({ children, ...props }: CollapsibleContentProps) => {
|
|
60
|
+
const AccordionAny = Accordion as any;
|
|
61
|
+
return <AccordionAny.Panel {...props}>{children}</AccordionAny.Panel>;
|
|
62
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { Popover, PopoverTrigger, PopoverContent } from "./Popover";
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -16,19 +16,43 @@ import { Popover, PopoverTrigger, PopoverContent } from "./Popover";
|
|
|
16
16
|
* </DatePickerContent>
|
|
17
17
|
* </DatePicker>
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
19
|
+
export interface HeroUIDatePickerProps {
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default function HeroUIDatePicker({ children, ...props }: HeroUIDatePickerProps) {
|
|
20
25
|
return <Popover {...props}>{children}</Popover>;
|
|
21
26
|
}
|
|
22
27
|
|
|
23
28
|
export const DatePicker = HeroUIDatePicker;
|
|
24
|
-
|
|
29
|
+
|
|
30
|
+
export interface DatePickerTriggerProps {
|
|
31
|
+
children?: React.ReactNode;
|
|
32
|
+
date?: Date;
|
|
33
|
+
dateFormat?: string;
|
|
34
|
+
placeholder?: string;
|
|
35
|
+
className?: string;
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const DatePickerTrigger = ({ children, date, dateFormat, placeholder, className = "", ...props }: DatePickerTriggerProps) => {
|
|
25
40
|
// Accept shadcn DatePicker props but just pass through as trigger
|
|
26
41
|
return <PopoverTrigger {...props}>{children}</PopoverTrigger>;
|
|
27
42
|
};
|
|
43
|
+
|
|
28
44
|
export const DatePickerContent = PopoverContent;
|
|
29
|
-
|
|
45
|
+
|
|
46
|
+
export interface DatePickerCalendarProps {
|
|
47
|
+
date?: Date;
|
|
48
|
+
onSelect?: (date: Date) => void;
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export const DatePickerCalendar = ({ date, onSelect, ...props }: DatePickerCalendarProps) => (
|
|
30
53
|
<div className="p-4" {...props}>
|
|
31
54
|
<p className="text-sm text-slate-500">Calendar placeholder - integrate react-day-picker here</p>
|
|
32
55
|
</div>
|
|
33
56
|
);
|
|
57
|
+
|
|
34
58
|
export const DatePickerRangeTrigger = DatePickerTrigger;
|