@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.
Files changed (109) hide show
  1. package/dist/components/library/heroui/Accordion.d.ts +6 -5
  2. package/dist/components/library/heroui/Accordion.js +7 -8
  3. package/dist/components/library/heroui/Accordion.js.map +1 -1
  4. package/dist/components/library/heroui/Alert.d.ts +6 -5
  5. package/dist/components/library/heroui/Alert.js +7 -8
  6. package/dist/components/library/heroui/Alert.js.map +1 -1
  7. package/dist/components/library/heroui/Badge.d.ts +8 -5
  8. package/dist/components/library/heroui/Badge.js +2 -3
  9. package/dist/components/library/heroui/Badge.js.map +1 -1
  10. package/dist/components/library/heroui/Breadcrumbs.d.ts +5 -2
  11. package/dist/components/library/heroui/Breadcrumbs.js +4 -5
  12. package/dist/components/library/heroui/Breadcrumbs.js.map +1 -1
  13. package/dist/components/library/heroui/Button.d.ts +16 -26
  14. package/dist/components/library/heroui/Button.js +21 -22
  15. package/dist/components/library/heroui/Button.js.map +1 -1
  16. package/dist/components/library/heroui/Card.d.ts +8 -5
  17. package/dist/components/library/heroui/Card.js +6 -7
  18. package/dist/components/library/heroui/Card.js.map +1 -1
  19. package/dist/components/library/heroui/Collapsible.d.ts +19 -30
  20. package/dist/components/library/heroui/Collapsible.js +13 -13
  21. package/dist/components/library/heroui/Collapsible.js.map +1 -1
  22. package/dist/components/library/heroui/DatePicker.d.ts +24 -52
  23. package/dist/components/library/heroui/DatePicker.js +5 -6
  24. package/dist/components/library/heroui/DatePicker.js.map +1 -1
  25. package/dist/components/library/heroui/Dialog.d.ts +18 -32
  26. package/dist/components/library/heroui/Dialog.js +6 -7
  27. package/dist/components/library/heroui/Dialog.js.map +1 -1
  28. package/dist/components/library/heroui/Drawer.d.ts +6 -2
  29. package/dist/components/library/heroui/Drawer.js +2 -3
  30. package/dist/components/library/heroui/Drawer.js.map +1 -1
  31. package/dist/components/library/heroui/Dropdown.d.ts +6 -2
  32. package/dist/components/library/heroui/Dropdown.js +2 -3
  33. package/dist/components/library/heroui/Dropdown.js.map +1 -1
  34. package/dist/components/library/heroui/Field.d.ts +19 -38
  35. package/dist/components/library/heroui/Field.js +9 -10
  36. package/dist/components/library/heroui/Field.js.map +1 -1
  37. package/dist/components/library/heroui/Meter.d.ts +7 -5
  38. package/dist/components/library/heroui/Meter.js +4 -5
  39. package/dist/components/library/heroui/Meter.js.map +1 -1
  40. package/dist/components/library/heroui/Modal.d.ts +6 -2
  41. package/dist/components/library/heroui/Modal.js +2 -3
  42. package/dist/components/library/heroui/Modal.js.map +1 -1
  43. package/dist/components/library/heroui/Pagination.d.ts +6 -2
  44. package/dist/components/library/heroui/Pagination.js +4 -5
  45. package/dist/components/library/heroui/Pagination.js.map +1 -1
  46. package/dist/components/library/heroui/Popover.d.ts +23 -38
  47. package/dist/components/library/heroui/Popover.js +12 -12
  48. package/dist/components/library/heroui/Popover.js.map +1 -1
  49. package/dist/components/library/heroui/ProgressBar.d.ts +8 -5
  50. package/dist/components/library/heroui/ProgressBar.js +0 -1
  51. package/dist/components/library/heroui/ProgressBar.js.map +1 -1
  52. package/dist/components/library/heroui/ProgressCircle.d.ts +8 -5
  53. package/dist/components/library/heroui/ProgressCircle.js +0 -1
  54. package/dist/components/library/heroui/ProgressCircle.js.map +1 -1
  55. package/dist/components/library/heroui/ScrollShadow.d.ts +8 -5
  56. package/dist/components/library/heroui/ScrollShadow.js +3 -4
  57. package/dist/components/library/heroui/ScrollShadow.js.map +1 -1
  58. package/dist/components/library/heroui/Select.d.ts +31 -37
  59. package/dist/components/library/heroui/Select.js +3 -4
  60. package/dist/components/library/heroui/Select.js.map +1 -1
  61. package/dist/components/library/heroui/Separator.d.ts +6 -2
  62. package/dist/components/library/heroui/Separator.js +4 -5
  63. package/dist/components/library/heroui/Separator.js.map +1 -1
  64. package/dist/components/library/heroui/Tabs.d.ts +6 -5
  65. package/dist/components/library/heroui/Tabs.js +7 -8
  66. package/dist/components/library/heroui/Tabs.js.map +1 -1
  67. package/dist/components/library/heroui/Toggle.d.ts +5 -4
  68. package/dist/components/library/heroui/Toggle.js +5 -6
  69. package/dist/components/library/heroui/Toggle.js.map +1 -1
  70. package/dist/components/library/heroui/Tooltip.d.ts +6 -2
  71. package/dist/components/library/heroui/Tooltip.js +2 -3
  72. package/dist/components/library/heroui/Tooltip.js.map +1 -1
  73. package/package.json +1 -1
  74. package/src/components/library/heroui/{Accordion.jsx → Accordion.tsx} +8 -3
  75. package/src/components/library/heroui/Alert.tsx +13 -0
  76. package/src/components/library/heroui/Badge.tsx +14 -0
  77. package/src/components/library/heroui/{Breadcrumbs.jsx → Breadcrumbs.tsx} +5 -2
  78. package/src/components/library/heroui/{Button.jsx → Button.tsx} +26 -8
  79. package/src/components/library/heroui/Card.tsx +14 -0
  80. package/src/components/library/heroui/Collapsible.tsx +62 -0
  81. package/src/components/library/heroui/{DatePicker.jsx → DatePicker.tsx} +28 -4
  82. package/src/components/library/heroui/Dialog.tsx +43 -0
  83. package/src/components/library/heroui/{Drawer.jsx → Drawer.tsx} +6 -2
  84. package/src/components/library/heroui/{Dropdown.jsx → Dropdown.tsx} +6 -2
  85. package/src/components/library/heroui/{Field.jsx → Field.tsx} +23 -6
  86. package/src/components/library/heroui/Meter.tsx +13 -0
  87. package/src/components/library/heroui/{Modal.jsx → Modal.tsx} +5 -2
  88. package/src/components/library/heroui/Pagination.tsx +11 -0
  89. package/src/components/library/heroui/{Popover.jsx → Popover.tsx} +29 -8
  90. package/src/components/library/heroui/ProgressBar.tsx +14 -0
  91. package/src/components/library/heroui/ProgressCircle.tsx +14 -0
  92. package/src/components/library/heroui/ScrollShadow.tsx +14 -0
  93. package/src/components/library/heroui/Select.tsx +73 -0
  94. package/src/components/library/heroui/Separator.tsx +11 -0
  95. package/src/components/library/heroui/{Tabs.jsx → Tabs.tsx} +8 -3
  96. package/src/components/library/heroui/{Toggle.jsx → Toggle.tsx} +6 -2
  97. package/src/components/library/heroui/{Tooltip.jsx → Tooltip.tsx} +5 -2
  98. package/src/components/library/heroui/Alert.jsx +0 -8
  99. package/src/components/library/heroui/Badge.jsx +0 -8
  100. package/src/components/library/heroui/Card.jsx +0 -8
  101. package/src/components/library/heroui/Collapsible.jsx +0 -42
  102. package/src/components/library/heroui/Dialog.jsx +0 -37
  103. package/src/components/library/heroui/Meter.jsx +0 -8
  104. package/src/components/library/heroui/Pagination.jsx +0 -8
  105. package/src/components/library/heroui/ProgressBar.jsx +0 -8
  106. package/src/components/library/heroui/ProgressCircle.jsx +0 -8
  107. package/src/components/library/heroui/ScrollShadow.jsx +0 -8
  108. package/src/components/library/heroui/Select.jsx +0 -37
  109. package/src/components/library/heroui/Separator.jsx +0 -8
@@ -1,6 +1,9 @@
1
- export default function HeroUIProgressCircle({ children, ...props }: {
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,5 +1,4 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import "react";
3
2
  import { ProgressCircle as s } from "@heroui/react";
4
3
  import { ProgressCircle as l } from "@heroui/react";
5
4
  function f({ children: r, ...o }) {
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressCircle.js","sources":["../../../../src/components/library/heroui/ProgressCircle.jsx"],"sourcesContent":["import React from \"react\";\nimport { ProgressCircle } from \"@heroui/react\";\n\nexport default function HeroUIProgressCircle({ children, ...props }) {\n return <ProgressCircle {...props}>{children}</ProgressCircle>;\n}\n\nexport { ProgressCircle };\n"],"names":["HeroUIProgressCircle","children","props","jsx","ProgressCircle"],"mappings":";;;;AAGA,SAAwBA,EAAqB,EAAE,UAAAC,GAAU,GAAGC,KAAS;AACnE,SAAO,gBAAAC,EAACC,GAAA,EAAgB,GAAGF,GAAQ,UAAAD,EAAA,CAAS;AAC9C;"}
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
- export default function HeroUIScrollShadow({ children, ...props }: {
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 t } from "react/jsx-runtime";
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(l, { ...r, children: o });
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.jsx"],"sourcesContent":["import React from \"react\";\nimport { ScrollShadow } from \"@heroui/react\";\n\nexport default function HeroUIScrollShadow({ children, ...props }) {\n return <ScrollShadow {...props}>{children}</ScrollShadow>;\n}\n\nexport { ScrollShadow };\n"],"names":["HeroUIScrollShadow","children","props","jsx","ScrollShadow"],"mappings":";;;;AAGA,SAAwBA,EAAmB,EAAE,UAAAC,GAAU,GAAGC,KAAS;AACjE,SAAO,gBAAAC,EAACC,GAAA,EAAc,GAAGF,GAAQ,UAAAD,EAAA,CAAS;AAC5C;"}
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 default function HeroUISelect({ value, onValueChange, children, ...props }: {
9
- [x: string]: any;
10
- value: any;
11
- onValueChange: any;
12
- children: any;
13
- }): import("react/jsx-runtime").JSX.Element;
14
- /**
15
- * HeroUI v3 Select wrapper with shadcn compatibility.
16
- *
17
- * Translates shadcn API to HeroUI:
18
- * - onValueChange -> onSelectionChange
19
- * - value -> selectedKeys
20
- */
21
- export function Select({ value, onValueChange, children, ...props }: {
22
- [x: string]: any;
23
- value: any;
24
- onValueChange: any;
25
- children: any;
26
- }): import("react/jsx-runtime").JSX.Element;
27
- export function SelectTrigger({ children, size, ...props }: {
28
- [x: string]: any;
29
- children: any;
30
- size: any;
31
- }): import("react/jsx-runtime").JSX.Element;
32
- export function SelectValue({ placeholder, ...props }: {
33
- [x: string]: any;
34
- placeholder: any;
35
- }): import("react/jsx-runtime").JSX.Element;
36
- export function SelectContent({ children, ...props }: {
37
- [x: string]: any;
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: o, ...n }) {
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
- ...n,
14
- children: o
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.jsx"],"sourcesContent":["import 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 default function HeroUISelect({ value, onValueChange, children, ...props }) {\n // Translate shadcn API to HeroUI API\n const selectedKeys = value ? [value] : [];\n const handleSelectionChange = (keys) => {\n const selected = Array.from(keys)[0];\n onValueChange?.(selected || \"\");\n };\n\n return (\n <HeroSelect\n selectedKeys={selectedKeys}\n onSelectionChange={handleSelectionChange}\n {...props}\n >\n {children}\n </HeroSelect>\n );\n}\n\n// For direct HeroUI usage\nexport const Select = HeroUISelect;\n\n// Shadcn-compatible subcomponents that just pass through children\nexport const SelectTrigger = ({ children, size, ...props }) => <>{children}</>;\nexport const SelectValue = ({ placeholder, ...props }) => <span {...props}>{placeholder}</span>;\nexport const SelectContent = ({ children, ...props }) => <>{children}</>;\nexport const SelectItem = ({ value, children, ...props }) => <HeroSelect.Item key={value} {...props}>{children}</HeroSelect.Item>;\n"],"names":["HeroUISelect","value","onValueChange","children","props","jsx","HeroSelect","keys","selected"],"mappings":";;;AAUA,SAAwBA,EAAa,EAAE,OAAAC,GAAO,eAAAC,GAAe,UAAAC,GAAU,GAAGC,KAAS;AAQjF,SACE,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,cARiBL,IAAQ,CAACA,CAAK,IAAI,CAAA;AAAA,MASnC,mBAR0B,CAACM,MAAS;AACtC,cAAMC,IAAW,MAAM,KAAKD,CAAI,EAAE,CAAC;AACnC,QAAAL,IAAgBM,KAAY,EAAE;AAAA,MAChC;AAAA,MAMK,GAAGJ;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;"}
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 n } from "@heroui/react";
5
- function m(r) {
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
- n as Separator,
10
- m as default
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.jsx"],"sourcesContent":["import React from \"react\";\nimport { Separator } from \"@heroui/react\";\n\nexport default function HeroUISeparator(props) {\n return <Separator {...props} />;\n}\n\nexport { Separator };\n"],"names":["HeroUISeparator","props","jsx","Separator"],"mappings":";;;;AAGA,SAAwBA,EAAgBC,GAAO;AAC7C,SAAO,gBAAAC,EAACC,GAAA,EAAW,GAAGF,EAAA,CAAO;AAC/B;"}
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 default function HeroUITabs({ variant, ...props }: {
20
- [x: string]: any;
21
- variant?: string | undefined;
22
- }): import("react/jsx-runtime").JSX.Element;
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 t } from "react/jsx-runtime";
2
- import "react";
3
- import { Tabs as m } from "@heroui/react";
4
- import { Tabs as b } from "@heroui/react";
5
- function f({ variant: r = "primary", ...o }) {
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
- b as Tabs,
10
- f as default
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.jsx"],"sourcesContent":["import React from \"react\";\nimport { 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 default function HeroUITabs({ variant = \"primary\", ...props }) {\n return <Tabs variant={variant} {...props} />;\n}\n\nexport { Tabs };\n"],"names":["HeroUITabs","variant","props","jsx","Tabs"],"mappings":";;;;AAqBA,SAAwBA,EAAW,EAAE,SAAAC,IAAU,WAAW,GAAGC,KAAS;AACpE,SAAO,gBAAAC,EAACC,GAAA,EAAK,SAAAH,GAAmB,GAAGC,EAAA,CAAO;AAC5C;"}
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
- export default function HeroUIToggle({ label, ...props }: {
2
- [x: string]: any;
3
- label?: string | undefined;
4
- }): import("react/jsx-runtime").JSX.Element;
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 m } from "../theme/AppThemeProvider.js";
5
- function f({ label: t = "Dark mode", ...r }) {
6
- const { mode: n, toggle: i } = m();
7
- return /* @__PURE__ */ e(o, { isSelected: n === "dark", onChange: i, ...r, children: /* @__PURE__ */ e(o.Content, { children: t }) });
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
- f as default
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.jsx"],"sourcesContent":["import React from \"react\";\nimport { Switch } from \"@heroui/react\";\nimport { useThemeMode } from \"../theme/AppThemeProvider\";\n\nexport default function HeroUIToggle({ label = \"Dark mode\", ...props }) {\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":";;;;AAIA,SAAwBA,EAAa,EAAE,OAAAC,IAAQ,aAAa,GAAGC,KAAS;AACtE,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
+ {"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 default function HeroUITooltip(props: any): import("react/jsx-runtime").JSX.Element;
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
- import { Tooltip } from "@heroui/react";
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 n } from "@heroui/react";
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
- n as Tooltip,
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.jsx"],"sourcesContent":["import React from \"react\";\nimport { Tooltip } 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 default function HeroUITooltip(props) {\n return <Tooltip {...props} />;\n}\n\nexport { Tooltip };\n"],"names":["HeroUITooltip","props","jsx","Tooltip"],"mappings":";;;;AAgBA,SAAwBA,EAAcC,GAAO;AAC3C,SAAO,gBAAAC,EAACC,GAAA,EAAS,GAAGF,EAAA,CAAO;AAC7B;"}
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@schandlergarcia/sf-web-components",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "description": "Reusable Salesforce web components library with Tailwind CSS v4 and shadcn/ui",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -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 default function HeroUIAccordion({ variant = "default", ...props }) {
23
- return <Accordion variant={variant} {...props} />;
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 default function HeroUIBreadcrumbs(props) {
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 React from "react";
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] || "solid";
40
- const heroColor = colorMap[variant] || "primary";
54
+ const heroVariant = variantMap[variant];
55
+ const heroColor = colorMap[variant];
56
+
57
+ const HeroButtonAny = HeroButton as any;
41
58
 
42
59
  return (
43
- <HeroButton
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
- </HeroButton>
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 default function HeroUIDatePicker({ children, ...props }) {
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
- export const DatePickerTrigger = ({ children, date, dateFormat, placeholder, className = "", ...props }) => {
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
- export const DatePickerCalendar = ({ date, onSelect, ...props }) => (
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;