@farmzone/fz-react-ui 1.2.4 → 1.2.5

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/index.d.cts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as react from 'react';
2
- import react__default, { ReactNode, ButtonHTMLAttributes, Ref, CSSProperties, InputHTMLAttributes, TextareaHTMLAttributes, ComponentProps, HTMLAttributes, RefObject, SVGProps } from 'react';
2
+ import react__default, { ReactNode, ComponentProps, CSSProperties, ButtonHTMLAttributes, Ref, InputHTMLAttributes, TextareaHTMLAttributes, HTMLAttributes, RefObject, SVGProps } from 'react';
3
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
3
4
  import * as SwitchPrimitive from '@radix-ui/react-switch';
4
5
  import * as SelectPrimitive from '@radix-ui/react-select';
5
6
  import * as class_variance_authority_types from 'class-variance-authority/types';
@@ -28,25 +29,16 @@ interface BadgeProps {
28
29
  }
29
30
  declare function Badge(props: BadgeProps): react.JSX.Element;
30
31
 
31
- type ButtonVariant = "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "ghost" | "link" | "metal" | "inkstone" | "inkstone-outline" | "inkstone-ghost" | "inkstone-danger";
32
- type ButtonSize = "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | "link";
33
- interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
34
- ref?: Ref<HTMLButtonElement>;
35
- asChild?: boolean;
36
- variant?: ButtonVariant;
37
- size?: ButtonSize;
38
- tooltip?: ReactNode;
39
- tooltipPosition?: "top" | "bottom";
40
- tooltipClassName?: string;
41
- tooltipContentClassName?: string;
42
- }
43
- declare function Button(props: ButtonProps): react.JSX.Element;
32
+ declare function TooltipContent({ className, sideOffset, children, arrowClassName, ...props }: react.ComponentProps<typeof TooltipPrimitive.Content> & {
33
+ arrowClassName?: string;
34
+ }): react.JSX.Element;
44
35
 
36
+ type TooltipPosition = NonNullable<ComponentProps<typeof TooltipContent>["side"]>;
45
37
  interface TooltipProps {
46
38
  children: ReactNode;
47
39
  text?: ReactNode;
48
40
  content: ReactNode;
49
- position?: "top" | "bottom";
41
+ position?: TooltipPosition;
50
42
  className?: string;
51
43
  triggerClassName?: string;
52
44
  arrowClassName?: string;
@@ -62,6 +54,20 @@ interface TooltipProps {
62
54
  }
63
55
  declare function Tooltip(props: TooltipProps): react.JSX.Element;
64
56
 
57
+ type ButtonVariant = "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "ghost" | "link" | "metal" | "inkstone" | "inkstone-outline" | "inkstone-ghost" | "inkstone-danger";
58
+ type ButtonSize = "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | "link";
59
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
60
+ ref?: Ref<HTMLButtonElement>;
61
+ asChild?: boolean;
62
+ variant?: ButtonVariant;
63
+ size?: ButtonSize;
64
+ tooltip?: ReactNode;
65
+ tooltipPosition?: TooltipPosition;
66
+ tooltipClassName?: string;
67
+ tooltipContentClassName?: string;
68
+ }
69
+ declare function Button(props: ButtonProps): react.JSX.Element;
70
+
65
71
  interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "defaultChecked" | "checked"> {
66
72
  checked: boolean;
67
73
  label?: string;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as react from 'react';
2
- import react__default, { ReactNode, ButtonHTMLAttributes, Ref, CSSProperties, InputHTMLAttributes, TextareaHTMLAttributes, ComponentProps, HTMLAttributes, RefObject, SVGProps } from 'react';
2
+ import react__default, { ReactNode, ComponentProps, CSSProperties, ButtonHTMLAttributes, Ref, InputHTMLAttributes, TextareaHTMLAttributes, HTMLAttributes, RefObject, SVGProps } from 'react';
3
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
3
4
  import * as SwitchPrimitive from '@radix-ui/react-switch';
4
5
  import * as SelectPrimitive from '@radix-ui/react-select';
5
6
  import * as class_variance_authority_types from 'class-variance-authority/types';
@@ -28,25 +29,16 @@ interface BadgeProps {
28
29
  }
29
30
  declare function Badge(props: BadgeProps): react.JSX.Element;
30
31
 
31
- type ButtonVariant = "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "ghost" | "link" | "metal" | "inkstone" | "inkstone-outline" | "inkstone-ghost" | "inkstone-danger";
32
- type ButtonSize = "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | "link";
33
- interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
34
- ref?: Ref<HTMLButtonElement>;
35
- asChild?: boolean;
36
- variant?: ButtonVariant;
37
- size?: ButtonSize;
38
- tooltip?: ReactNode;
39
- tooltipPosition?: "top" | "bottom";
40
- tooltipClassName?: string;
41
- tooltipContentClassName?: string;
42
- }
43
- declare function Button(props: ButtonProps): react.JSX.Element;
32
+ declare function TooltipContent({ className, sideOffset, children, arrowClassName, ...props }: react.ComponentProps<typeof TooltipPrimitive.Content> & {
33
+ arrowClassName?: string;
34
+ }): react.JSX.Element;
44
35
 
36
+ type TooltipPosition = NonNullable<ComponentProps<typeof TooltipContent>["side"]>;
45
37
  interface TooltipProps {
46
38
  children: ReactNode;
47
39
  text?: ReactNode;
48
40
  content: ReactNode;
49
- position?: "top" | "bottom";
41
+ position?: TooltipPosition;
50
42
  className?: string;
51
43
  triggerClassName?: string;
52
44
  arrowClassName?: string;
@@ -62,6 +54,20 @@ interface TooltipProps {
62
54
  }
63
55
  declare function Tooltip(props: TooltipProps): react.JSX.Element;
64
56
 
57
+ type ButtonVariant = "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "ghost" | "link" | "metal" | "inkstone" | "inkstone-outline" | "inkstone-ghost" | "inkstone-danger";
58
+ type ButtonSize = "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | "link";
59
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
60
+ ref?: Ref<HTMLButtonElement>;
61
+ asChild?: boolean;
62
+ variant?: ButtonVariant;
63
+ size?: ButtonSize;
64
+ tooltip?: ReactNode;
65
+ tooltipPosition?: TooltipPosition;
66
+ tooltipClassName?: string;
67
+ tooltipContentClassName?: string;
68
+ }
69
+ declare function Button(props: ButtonProps): react.JSX.Element;
70
+
65
71
  interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "defaultChecked" | "checked"> {
66
72
  checked: boolean;
67
73
  label?: string;