@versaur/react 1.0.13 → 1.0.14
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/blocks.d.ts +0 -111
- package/dist/blocks.js +530 -747
- package/dist/drawer-DRv9k7lp.js +120 -0
- package/dist/forms.d.ts +125 -0
- package/dist/forms.js +618 -321
- package/dist/helpers-DTL6qrTe.js +129 -0
- package/dist/{overlay-parts-Zq9CuT31.js → overlay-parts-CFeD8VN0.js} +3 -3
- package/dist/primitive.d.ts +2 -0
- package/dist/primitive.js +8 -9
- package/dist/tooltip-BMKVL6jz.js +170 -0
- package/dist/utils.d.ts +87 -0
- package/dist/utils.js +62 -5
- package/package.json +2 -2
- package/dist/tooltip-_eEMRSo8.js +0 -268
- package/dist/use-data-attrs-iPFyfiKN.js +0 -16
package/dist/blocks.d.ts
CHANGED
|
@@ -98,10 +98,6 @@ declare interface AppLayoutType extends ForwardRefExoticComponent<AppLayoutRootP
|
|
|
98
98
|
SideRight: ForwardRefExoticComponent<AppLayoutRegionProps & RefAttributes<HTMLElement>>;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
declare interface AsProp<C extends ElementType = ElementType> {
|
|
102
|
-
as?: C;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
101
|
export declare namespace AttributeList {
|
|
106
102
|
export type Layout = AttributeList_2.Layout;
|
|
107
103
|
export type Props = AttributeListProps;
|
|
@@ -891,111 +887,6 @@ export declare interface ModalRootProps extends Omit<DialogHTMLAttributes<HTMLDi
|
|
|
891
887
|
children?: ReactNode;
|
|
892
888
|
}
|
|
893
889
|
|
|
894
|
-
/**
|
|
895
|
-
* Namespace merging: Nav.Item syntax
|
|
896
|
-
*/
|
|
897
|
-
export declare const Nav: ForwardRefExoticComponent<NavProps & RefAttributes<HTMLElement>> & {
|
|
898
|
-
Item: ForwardRefExoticComponent<Omit<NavItemProps, "ref"> & RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
899
|
-
};
|
|
900
|
-
|
|
901
|
-
/**
|
|
902
|
-
* NavItem - Polymorphic navigation item
|
|
903
|
-
*
|
|
904
|
-
* Renders as button by default, but supports any element type (a, Link, custom).
|
|
905
|
-
* Supports left and right icons for flexible composition.
|
|
906
|
-
*
|
|
907
|
-
* Can be used in two modes:
|
|
908
|
-
* - Uncontrolled: Pass `active` prop and handle clicks with `onClick`
|
|
909
|
-
* - Controlled: Use within Nav with `value` and let Nav manage active state
|
|
910
|
-
*
|
|
911
|
-
* @example
|
|
912
|
-
* ```tsx
|
|
913
|
-
* // Uncontrolled
|
|
914
|
-
* <Nav>
|
|
915
|
-
* <Nav.Item active onClick={handleHome}>Home</Nav.Item>
|
|
916
|
-
* <Nav.Item>Docs</Nav.Item>
|
|
917
|
-
* </Nav>
|
|
918
|
-
*
|
|
919
|
-
* // Controlled (recommended)
|
|
920
|
-
* const [active, setActive] = useState('home');
|
|
921
|
-
* <Nav value={active} onChange={setActive}>
|
|
922
|
-
* <Nav.Item value="home">Home</Nav.Item>
|
|
923
|
-
* <Nav.Item value="docs">Docs</Nav.Item>
|
|
924
|
-
* </Nav>
|
|
925
|
-
*
|
|
926
|
-
* // With icons
|
|
927
|
-
* <Nav.Item leftIcon={HomeIcon} value="home">Home</Nav.Item>
|
|
928
|
-
* <Nav.Item rightIcon={ChevronIcon} value="more">More</Nav.Item>
|
|
929
|
-
* ```
|
|
930
|
-
*/
|
|
931
|
-
export declare const NavItem: ForwardRefExoticComponent<Omit<NavItemProps, "ref"> & RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
932
|
-
|
|
933
|
-
/**
|
|
934
|
-
* NavItem base props
|
|
935
|
-
*/
|
|
936
|
-
declare interface NavItemBaseProps {
|
|
937
|
-
/**
|
|
938
|
-
* Whether this nav item represents current page (uncontrolled)
|
|
939
|
-
* Sets aria-current="page" for anchor/Link elements
|
|
940
|
-
* Ignored if Nav has value/onChange (controlled mode)
|
|
941
|
-
*/
|
|
942
|
-
active?: boolean;
|
|
943
|
-
/**
|
|
944
|
-
* Unique identifier for this item in controlled mode
|
|
945
|
-
* When Nav has onChange, this value is passed to onChange when clicked
|
|
946
|
-
*/
|
|
947
|
-
value?: string | number;
|
|
948
|
-
/**
|
|
949
|
-
* Icon to render on the left side of the text
|
|
950
|
-
*/
|
|
951
|
-
leftIcon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
952
|
-
/**
|
|
953
|
-
* Icon to render on the right side of the text
|
|
954
|
-
*/
|
|
955
|
-
rightIcon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
956
|
-
/**
|
|
957
|
-
* Loading state - disables interaction and shows visual loading indicator
|
|
958
|
-
*/
|
|
959
|
-
loading?: boolean;
|
|
960
|
-
/**
|
|
961
|
-
* Disabled state - prevents all interactions
|
|
962
|
-
*/
|
|
963
|
-
disabled?: boolean;
|
|
964
|
-
children?: ReactNode;
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
/**
|
|
968
|
-
* Polymorphic NavItem type
|
|
969
|
-
* Defaults to "button" but supports "a", Next.js Link, React Router Link, or any custom component
|
|
970
|
-
*/
|
|
971
|
-
export declare type NavItemProps<C extends ElementType = ElementType> = PolymorphicProps<C, NavItemBaseProps>;
|
|
972
|
-
|
|
973
|
-
/**
|
|
974
|
-
* Nav props
|
|
975
|
-
*/
|
|
976
|
-
export declare interface NavProps extends Omit<HTMLAttributes<HTMLElement>, "onChange"> {
|
|
977
|
-
/**
|
|
978
|
-
* Layout direction for the navigation container
|
|
979
|
-
* @default "horizontal"
|
|
980
|
-
*/
|
|
981
|
-
direction?: "horizontal" | "vertical";
|
|
982
|
-
/**
|
|
983
|
-
* Gap between nav items
|
|
984
|
-
* Uses Versaur spacing scale: xs, sm, md, lg
|
|
985
|
-
*/
|
|
986
|
-
gap?: "xs" | "sm" | "md" | "lg";
|
|
987
|
-
/**
|
|
988
|
-
* Controlled value - which nav item is currently active
|
|
989
|
-
* @default undefined
|
|
990
|
-
*/
|
|
991
|
-
value?: string | number;
|
|
992
|
-
/**
|
|
993
|
-
* Callback when a nav item is selected
|
|
994
|
-
*/
|
|
995
|
-
onChange?: (value: string | number) => void;
|
|
996
|
-
children?: ReactNode;
|
|
997
|
-
}
|
|
998
|
-
|
|
999
890
|
/**
|
|
1000
891
|
* NoResults component - displays an empty state with icon, title, subtitle, and optional action
|
|
1001
892
|
*
|
|
@@ -1069,8 +960,6 @@ declare interface OverlayTitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
|
1069
960
|
as?: ElementType;
|
|
1070
961
|
}
|
|
1071
962
|
|
|
1072
|
-
declare type PolymorphicProps<C extends ElementType = ElementType, Props = {}> = Props & AsProp<C> & Omit<React.ComponentPropsWithoutRef<C>, keyof Props | "as">;
|
|
1073
|
-
|
|
1074
963
|
/**
|
|
1075
964
|
* Compound Sidebar component with sub-components
|
|
1076
965
|
*/
|