@versaur/react 1.0.12 → 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 +1 -117
- package/dist/blocks.js +495 -714
- 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 +6 -6
- 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-Zuq8gd0f.js +0 -210
- 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;
|
|
@@ -748,7 +744,7 @@ export declare interface MenuProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
748
744
|
children: ReactNode;
|
|
749
745
|
/**
|
|
750
746
|
* Placement relative to trigger button
|
|
751
|
-
* @default "
|
|
747
|
+
* @default "undefined" (auto placement by Tooltip)
|
|
752
748
|
*/
|
|
753
749
|
placement?: MenuPlacement;
|
|
754
750
|
/**
|
|
@@ -756,11 +752,6 @@ export declare interface MenuProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
756
752
|
* @default 400
|
|
757
753
|
*/
|
|
758
754
|
maxHeight?: number;
|
|
759
|
-
/**
|
|
760
|
-
* Minimum width of the menu list in pixels
|
|
761
|
-
* @default 160
|
|
762
|
-
*/
|
|
763
|
-
minWidth?: number;
|
|
764
755
|
/**
|
|
765
756
|
* Maximum width of the menu list in pixels
|
|
766
757
|
* @default 320
|
|
@@ -896,111 +887,6 @@ export declare interface ModalRootProps extends Omit<DialogHTMLAttributes<HTMLDi
|
|
|
896
887
|
children?: ReactNode;
|
|
897
888
|
}
|
|
898
889
|
|
|
899
|
-
/**
|
|
900
|
-
* Namespace merging: Nav.Item syntax
|
|
901
|
-
*/
|
|
902
|
-
export declare const Nav: ForwardRefExoticComponent<NavProps & RefAttributes<HTMLElement>> & {
|
|
903
|
-
Item: ForwardRefExoticComponent<Omit<NavItemProps, "ref"> & RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
904
|
-
};
|
|
905
|
-
|
|
906
|
-
/**
|
|
907
|
-
* NavItem - Polymorphic navigation item
|
|
908
|
-
*
|
|
909
|
-
* Renders as button by default, but supports any element type (a, Link, custom).
|
|
910
|
-
* Supports left and right icons for flexible composition.
|
|
911
|
-
*
|
|
912
|
-
* Can be used in two modes:
|
|
913
|
-
* - Uncontrolled: Pass `active` prop and handle clicks with `onClick`
|
|
914
|
-
* - Controlled: Use within Nav with `value` and let Nav manage active state
|
|
915
|
-
*
|
|
916
|
-
* @example
|
|
917
|
-
* ```tsx
|
|
918
|
-
* // Uncontrolled
|
|
919
|
-
* <Nav>
|
|
920
|
-
* <Nav.Item active onClick={handleHome}>Home</Nav.Item>
|
|
921
|
-
* <Nav.Item>Docs</Nav.Item>
|
|
922
|
-
* </Nav>
|
|
923
|
-
*
|
|
924
|
-
* // Controlled (recommended)
|
|
925
|
-
* const [active, setActive] = useState('home');
|
|
926
|
-
* <Nav value={active} onChange={setActive}>
|
|
927
|
-
* <Nav.Item value="home">Home</Nav.Item>
|
|
928
|
-
* <Nav.Item value="docs">Docs</Nav.Item>
|
|
929
|
-
* </Nav>
|
|
930
|
-
*
|
|
931
|
-
* // With icons
|
|
932
|
-
* <Nav.Item leftIcon={HomeIcon} value="home">Home</Nav.Item>
|
|
933
|
-
* <Nav.Item rightIcon={ChevronIcon} value="more">More</Nav.Item>
|
|
934
|
-
* ```
|
|
935
|
-
*/
|
|
936
|
-
export declare const NavItem: ForwardRefExoticComponent<Omit<NavItemProps, "ref"> & RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
937
|
-
|
|
938
|
-
/**
|
|
939
|
-
* NavItem base props
|
|
940
|
-
*/
|
|
941
|
-
declare interface NavItemBaseProps {
|
|
942
|
-
/**
|
|
943
|
-
* Whether this nav item represents current page (uncontrolled)
|
|
944
|
-
* Sets aria-current="page" for anchor/Link elements
|
|
945
|
-
* Ignored if Nav has value/onChange (controlled mode)
|
|
946
|
-
*/
|
|
947
|
-
active?: boolean;
|
|
948
|
-
/**
|
|
949
|
-
* Unique identifier for this item in controlled mode
|
|
950
|
-
* When Nav has onChange, this value is passed to onChange when clicked
|
|
951
|
-
*/
|
|
952
|
-
value?: string | number;
|
|
953
|
-
/**
|
|
954
|
-
* Icon to render on the left side of the text
|
|
955
|
-
*/
|
|
956
|
-
leftIcon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
957
|
-
/**
|
|
958
|
-
* Icon to render on the right side of the text
|
|
959
|
-
*/
|
|
960
|
-
rightIcon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
961
|
-
/**
|
|
962
|
-
* Loading state - disables interaction and shows visual loading indicator
|
|
963
|
-
*/
|
|
964
|
-
loading?: boolean;
|
|
965
|
-
/**
|
|
966
|
-
* Disabled state - prevents all interactions
|
|
967
|
-
*/
|
|
968
|
-
disabled?: boolean;
|
|
969
|
-
children?: ReactNode;
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
/**
|
|
973
|
-
* Polymorphic NavItem type
|
|
974
|
-
* Defaults to "button" but supports "a", Next.js Link, React Router Link, or any custom component
|
|
975
|
-
*/
|
|
976
|
-
export declare type NavItemProps<C extends ElementType = ElementType> = PolymorphicProps<C, NavItemBaseProps>;
|
|
977
|
-
|
|
978
|
-
/**
|
|
979
|
-
* Nav props
|
|
980
|
-
*/
|
|
981
|
-
export declare interface NavProps extends Omit<HTMLAttributes<HTMLElement>, "onChange"> {
|
|
982
|
-
/**
|
|
983
|
-
* Layout direction for the navigation container
|
|
984
|
-
* @default "horizontal"
|
|
985
|
-
*/
|
|
986
|
-
direction?: "horizontal" | "vertical";
|
|
987
|
-
/**
|
|
988
|
-
* Gap between nav items
|
|
989
|
-
* Uses Versaur spacing scale: xs, sm, md, lg
|
|
990
|
-
*/
|
|
991
|
-
gap?: "xs" | "sm" | "md" | "lg";
|
|
992
|
-
/**
|
|
993
|
-
* Controlled value - which nav item is currently active
|
|
994
|
-
* @default undefined
|
|
995
|
-
*/
|
|
996
|
-
value?: string | number;
|
|
997
|
-
/**
|
|
998
|
-
* Callback when a nav item is selected
|
|
999
|
-
*/
|
|
1000
|
-
onChange?: (value: string | number) => void;
|
|
1001
|
-
children?: ReactNode;
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
890
|
/**
|
|
1005
891
|
* NoResults component - displays an empty state with icon, title, subtitle, and optional action
|
|
1006
892
|
*
|
|
@@ -1074,8 +960,6 @@ declare interface OverlayTitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
|
1074
960
|
as?: ElementType;
|
|
1075
961
|
}
|
|
1076
962
|
|
|
1077
|
-
declare type PolymorphicProps<C extends ElementType = ElementType, Props = {}> = Props & AsProp<C> & Omit<React.ComponentPropsWithoutRef<C>, keyof Props | "as">;
|
|
1078
|
-
|
|
1079
963
|
/**
|
|
1080
964
|
* Compound Sidebar component with sub-components
|
|
1081
965
|
*/
|