banhatten-ui 0.1.1 → 0.1.2
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.mts +108 -1
- package/dist/index.d.ts +108 -1
- package/dist/index.js +450 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +444 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -803,4 +803,111 @@ interface TooltipProps extends Omit<React.ComponentPropsWithoutRef<typeof Toolti
|
|
|
803
803
|
}
|
|
804
804
|
declare function Tooltip({ children, content, title, subtitle, size, variant, side, sideOffset, delayDuration, showArrow, contentClassName, ...rootProps }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
805
805
|
|
|
806
|
-
|
|
806
|
+
declare const dropdownTriggerVariants: (props?: ({
|
|
807
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
808
|
+
error?: boolean | null | undefined;
|
|
809
|
+
disabled?: boolean | null | undefined;
|
|
810
|
+
focused?: boolean | null | undefined;
|
|
811
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
812
|
+
declare const focusRingVariants: (props?: ({
|
|
813
|
+
error?: boolean | null | undefined;
|
|
814
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
815
|
+
interface DropdownInputProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size" | "value">, Omit<VariantProps<typeof dropdownTriggerVariants>, "disabled" | "focused" | "error"> {
|
|
816
|
+
/** Label text displayed above the trigger */
|
|
817
|
+
label?: string;
|
|
818
|
+
/** Whether the field is optional (displays "(Optional)" next to label) */
|
|
819
|
+
optional?: boolean;
|
|
820
|
+
/** Helper text displayed below the trigger */
|
|
821
|
+
helperText?: string;
|
|
822
|
+
/** Error message displayed below the trigger (overrides helperText when present) */
|
|
823
|
+
errorMessage?: string;
|
|
824
|
+
/** Placeholder text when no value is selected */
|
|
825
|
+
placeholder?: string;
|
|
826
|
+
/** Selected value(s) — only used to derive placeholder vs filled styling */
|
|
827
|
+
value?: string | string[];
|
|
828
|
+
/** Display text for the selected value(s) */
|
|
829
|
+
displayValue?: string;
|
|
830
|
+
/** Whether the dropdown is open */
|
|
831
|
+
open?: boolean;
|
|
832
|
+
/** Callback when dropdown open state changes */
|
|
833
|
+
onOpenChange?: (open: boolean) => void;
|
|
834
|
+
/** Show selection count badge */
|
|
835
|
+
showIndicator?: boolean;
|
|
836
|
+
/** Selection count for indicator badge */
|
|
837
|
+
indicatorCount?: number;
|
|
838
|
+
/** Material Symbol name for left icon (e.g., "account_circle", "search") */
|
|
839
|
+
leftIcon?: string;
|
|
840
|
+
/** Icon variant style. Default: "outlined" */
|
|
841
|
+
iconVariant?: IconProps["variant"];
|
|
842
|
+
/** Render filled variant of icons */
|
|
843
|
+
iconFilled?: boolean;
|
|
844
|
+
/** Render custom left element (overrides leftIcon) */
|
|
845
|
+
leftElement?: React.ReactNode;
|
|
846
|
+
}
|
|
847
|
+
declare const DropdownInput: React.ForwardRefExoticComponent<DropdownInputProps & React.RefAttributes<HTMLButtonElement>>;
|
|
848
|
+
|
|
849
|
+
interface DropdownOption {
|
|
850
|
+
/** Unique value for the option */
|
|
851
|
+
value: string;
|
|
852
|
+
/** Display label for the option */
|
|
853
|
+
label: string;
|
|
854
|
+
/** Optional left icon (Material Symbol name) */
|
|
855
|
+
leftIcon?: string;
|
|
856
|
+
/** Whether this option is disabled */
|
|
857
|
+
disabled?: boolean;
|
|
858
|
+
}
|
|
859
|
+
interface DropdownProps extends Omit<DropdownInputProps, "value" | "open" | "onOpenChange" | "displayValue" | "showIndicator" | "indicatorCount"> {
|
|
860
|
+
/** Array of options for simple usage */
|
|
861
|
+
options?: DropdownOption[];
|
|
862
|
+
/** Selected value (single select) or values (multi-select) */
|
|
863
|
+
value?: string | string[];
|
|
864
|
+
/** Callback when selection changes */
|
|
865
|
+
onValueChange?: (value: string | string[]) => void;
|
|
866
|
+
/** Enable multi-select mode */
|
|
867
|
+
multiple?: boolean;
|
|
868
|
+
/** Custom render for options (overrides options prop) */
|
|
869
|
+
children?: React.ReactNode;
|
|
870
|
+
/** Custom display value (overrides auto-generated display) */
|
|
871
|
+
displayValue?: string;
|
|
872
|
+
/** Width of the dropdown menu. Default: matches trigger width */
|
|
873
|
+
menuWidth?: "trigger" | "auto" | number;
|
|
874
|
+
/** Maximum height of the menu before scrolling. Default: 300 */
|
|
875
|
+
maxHeight?: number;
|
|
876
|
+
/** Align menu relative to trigger. Default: "start" */
|
|
877
|
+
align?: "start" | "center" | "end";
|
|
878
|
+
/** Side offset from trigger. Default: 4 */
|
|
879
|
+
sideOffset?: number;
|
|
880
|
+
}
|
|
881
|
+
declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLButtonElement>>;
|
|
882
|
+
interface DropdownItemProps {
|
|
883
|
+
/** Unique value for this option */
|
|
884
|
+
value: string;
|
|
885
|
+
/** Display content */
|
|
886
|
+
children: React.ReactNode;
|
|
887
|
+
/** Whether this option is currently selected */
|
|
888
|
+
selected?: boolean;
|
|
889
|
+
/** Callback when option is selected */
|
|
890
|
+
onSelect?: (value: string) => void;
|
|
891
|
+
/** Left icon (Material Symbol name) */
|
|
892
|
+
leftIcon?: string;
|
|
893
|
+
/** Whether this option is disabled */
|
|
894
|
+
disabled?: boolean;
|
|
895
|
+
/** Whether dropdown is in multi-select mode (shows checkbox) */
|
|
896
|
+
multiple?: boolean;
|
|
897
|
+
/** Additional class names */
|
|
898
|
+
className?: string;
|
|
899
|
+
}
|
|
900
|
+
declare const DropdownItem: React.ForwardRefExoticComponent<DropdownItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
901
|
+
interface DropdownGroupProps {
|
|
902
|
+
/** Optional section heading */
|
|
903
|
+
heading?: React.ReactNode;
|
|
904
|
+
/** DropdownItem children */
|
|
905
|
+
children: React.ReactNode;
|
|
906
|
+
/** ID for accessibility (aria-labelledby) */
|
|
907
|
+
headingId?: string;
|
|
908
|
+
/** Additional class names */
|
|
909
|
+
className?: string;
|
|
910
|
+
}
|
|
911
|
+
declare const DropdownGroup: React.ForwardRefExoticComponent<DropdownGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
912
|
+
|
|
913
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, type AlertAction, type AlertProps, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarGroupSize, AvatarProfile, type AvatarProfileProps, type AvatarProps, Badge, type BadgeProps, Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbList, BreadcrumbListItem, type BreadcrumbListItemProps, type BreadcrumbListProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Button, ButtonGroup, ButtonGroupItem, type ButtonGroupItemProps, type ButtonGroupProps, type ButtonGroupSize, type ButtonProps, Checkbox, CheckboxCard, type CheckboxCardProps, type CheckboxProps, CloseButton, type CloseButtonProps, ColorPalette, Divider, type DividerProps, Dropdown, DropdownGroup, type DropdownGroupProps, DropdownInput, type DropdownInputProps, DropdownItem, type DropdownItemProps, type DropdownOption, type DropdownProps, FeaturedIcon, type FeaturedIconProps, Icon, type IconProps, type IconSize, Input, type InputPreset, type InputProps, Menu, MenuGroup, type MenuGroupProps, MenuHeading, type MenuHeadingProps, MenuItem, type MenuItemProps, type MenuItemType, type MenuProps, ProgressBar, type ProgressBarProps, Radio, RadioCard, type RadioCardProps, type RadioProps, Sidebar, SidebarAccountCard, type SidebarAccountCardProps, SidebarContext, type SidebarContextValue, SidebarMenuItem, type SidebarMenuItemProps, type SidebarProps, SidebarSubmenuItem, type SidebarSubmenuItemProps, Slider, type SliderDoubleProps, SliderHandle, type SliderHandleProps, type SliderProps, type SliderSingleProps, type SliderVariant, Tag, type TagProps, TextArea, type TextAreaProps, Toggle, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, TooltipTrigger, accordionTriggerVariants, alertVariants, avatarProfileVariants, avatarVariants, badgeVariants, breadcrumbItemVariants, breadcrumbListVariants, breadcrumbSeparatorVariants, buttonGroupItemVariants, buttonGroupVariants, buttonVariants, closeButtonVariants, dividerVariants, focusRingVariants as dropdownFocusRingVariants, dropdownTriggerVariants, featuredIconVariants, iconVariants, inputWrapperVariants as inputVariants, menuGroupVariants, menuHeadingVariants, menuItemVariants, menuVariants, progressBarFillVariants, progressBarTrackVariants, sidebarAccountCardVariants, sidebarMenuItemVariants, sidebarSubmenuItemVariants, sidebarVariants, sliderHandleCircleVariants, tagVariants, textareaWrapperVariants as textareaVariants, thumbVariants, toggleVariants, tooltipContentVariants, useSidebarContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -803,4 +803,111 @@ interface TooltipProps extends Omit<React.ComponentPropsWithoutRef<typeof Toolti
|
|
|
803
803
|
}
|
|
804
804
|
declare function Tooltip({ children, content, title, subtitle, size, variant, side, sideOffset, delayDuration, showArrow, contentClassName, ...rootProps }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
805
805
|
|
|
806
|
-
|
|
806
|
+
declare const dropdownTriggerVariants: (props?: ({
|
|
807
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
808
|
+
error?: boolean | null | undefined;
|
|
809
|
+
disabled?: boolean | null | undefined;
|
|
810
|
+
focused?: boolean | null | undefined;
|
|
811
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
812
|
+
declare const focusRingVariants: (props?: ({
|
|
813
|
+
error?: boolean | null | undefined;
|
|
814
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
815
|
+
interface DropdownInputProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size" | "value">, Omit<VariantProps<typeof dropdownTriggerVariants>, "disabled" | "focused" | "error"> {
|
|
816
|
+
/** Label text displayed above the trigger */
|
|
817
|
+
label?: string;
|
|
818
|
+
/** Whether the field is optional (displays "(Optional)" next to label) */
|
|
819
|
+
optional?: boolean;
|
|
820
|
+
/** Helper text displayed below the trigger */
|
|
821
|
+
helperText?: string;
|
|
822
|
+
/** Error message displayed below the trigger (overrides helperText when present) */
|
|
823
|
+
errorMessage?: string;
|
|
824
|
+
/** Placeholder text when no value is selected */
|
|
825
|
+
placeholder?: string;
|
|
826
|
+
/** Selected value(s) — only used to derive placeholder vs filled styling */
|
|
827
|
+
value?: string | string[];
|
|
828
|
+
/** Display text for the selected value(s) */
|
|
829
|
+
displayValue?: string;
|
|
830
|
+
/** Whether the dropdown is open */
|
|
831
|
+
open?: boolean;
|
|
832
|
+
/** Callback when dropdown open state changes */
|
|
833
|
+
onOpenChange?: (open: boolean) => void;
|
|
834
|
+
/** Show selection count badge */
|
|
835
|
+
showIndicator?: boolean;
|
|
836
|
+
/** Selection count for indicator badge */
|
|
837
|
+
indicatorCount?: number;
|
|
838
|
+
/** Material Symbol name for left icon (e.g., "account_circle", "search") */
|
|
839
|
+
leftIcon?: string;
|
|
840
|
+
/** Icon variant style. Default: "outlined" */
|
|
841
|
+
iconVariant?: IconProps["variant"];
|
|
842
|
+
/** Render filled variant of icons */
|
|
843
|
+
iconFilled?: boolean;
|
|
844
|
+
/** Render custom left element (overrides leftIcon) */
|
|
845
|
+
leftElement?: React.ReactNode;
|
|
846
|
+
}
|
|
847
|
+
declare const DropdownInput: React.ForwardRefExoticComponent<DropdownInputProps & React.RefAttributes<HTMLButtonElement>>;
|
|
848
|
+
|
|
849
|
+
interface DropdownOption {
|
|
850
|
+
/** Unique value for the option */
|
|
851
|
+
value: string;
|
|
852
|
+
/** Display label for the option */
|
|
853
|
+
label: string;
|
|
854
|
+
/** Optional left icon (Material Symbol name) */
|
|
855
|
+
leftIcon?: string;
|
|
856
|
+
/** Whether this option is disabled */
|
|
857
|
+
disabled?: boolean;
|
|
858
|
+
}
|
|
859
|
+
interface DropdownProps extends Omit<DropdownInputProps, "value" | "open" | "onOpenChange" | "displayValue" | "showIndicator" | "indicatorCount"> {
|
|
860
|
+
/** Array of options for simple usage */
|
|
861
|
+
options?: DropdownOption[];
|
|
862
|
+
/** Selected value (single select) or values (multi-select) */
|
|
863
|
+
value?: string | string[];
|
|
864
|
+
/** Callback when selection changes */
|
|
865
|
+
onValueChange?: (value: string | string[]) => void;
|
|
866
|
+
/** Enable multi-select mode */
|
|
867
|
+
multiple?: boolean;
|
|
868
|
+
/** Custom render for options (overrides options prop) */
|
|
869
|
+
children?: React.ReactNode;
|
|
870
|
+
/** Custom display value (overrides auto-generated display) */
|
|
871
|
+
displayValue?: string;
|
|
872
|
+
/** Width of the dropdown menu. Default: matches trigger width */
|
|
873
|
+
menuWidth?: "trigger" | "auto" | number;
|
|
874
|
+
/** Maximum height of the menu before scrolling. Default: 300 */
|
|
875
|
+
maxHeight?: number;
|
|
876
|
+
/** Align menu relative to trigger. Default: "start" */
|
|
877
|
+
align?: "start" | "center" | "end";
|
|
878
|
+
/** Side offset from trigger. Default: 4 */
|
|
879
|
+
sideOffset?: number;
|
|
880
|
+
}
|
|
881
|
+
declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLButtonElement>>;
|
|
882
|
+
interface DropdownItemProps {
|
|
883
|
+
/** Unique value for this option */
|
|
884
|
+
value: string;
|
|
885
|
+
/** Display content */
|
|
886
|
+
children: React.ReactNode;
|
|
887
|
+
/** Whether this option is currently selected */
|
|
888
|
+
selected?: boolean;
|
|
889
|
+
/** Callback when option is selected */
|
|
890
|
+
onSelect?: (value: string) => void;
|
|
891
|
+
/** Left icon (Material Symbol name) */
|
|
892
|
+
leftIcon?: string;
|
|
893
|
+
/** Whether this option is disabled */
|
|
894
|
+
disabled?: boolean;
|
|
895
|
+
/** Whether dropdown is in multi-select mode (shows checkbox) */
|
|
896
|
+
multiple?: boolean;
|
|
897
|
+
/** Additional class names */
|
|
898
|
+
className?: string;
|
|
899
|
+
}
|
|
900
|
+
declare const DropdownItem: React.ForwardRefExoticComponent<DropdownItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
901
|
+
interface DropdownGroupProps {
|
|
902
|
+
/** Optional section heading */
|
|
903
|
+
heading?: React.ReactNode;
|
|
904
|
+
/** DropdownItem children */
|
|
905
|
+
children: React.ReactNode;
|
|
906
|
+
/** ID for accessibility (aria-labelledby) */
|
|
907
|
+
headingId?: string;
|
|
908
|
+
/** Additional class names */
|
|
909
|
+
className?: string;
|
|
910
|
+
}
|
|
911
|
+
declare const DropdownGroup: React.ForwardRefExoticComponent<DropdownGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
912
|
+
|
|
913
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, type AlertAction, type AlertProps, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarGroupSize, AvatarProfile, type AvatarProfileProps, type AvatarProps, Badge, type BadgeProps, Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbList, BreadcrumbListItem, type BreadcrumbListItemProps, type BreadcrumbListProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Button, ButtonGroup, ButtonGroupItem, type ButtonGroupItemProps, type ButtonGroupProps, type ButtonGroupSize, type ButtonProps, Checkbox, CheckboxCard, type CheckboxCardProps, type CheckboxProps, CloseButton, type CloseButtonProps, ColorPalette, Divider, type DividerProps, Dropdown, DropdownGroup, type DropdownGroupProps, DropdownInput, type DropdownInputProps, DropdownItem, type DropdownItemProps, type DropdownOption, type DropdownProps, FeaturedIcon, type FeaturedIconProps, Icon, type IconProps, type IconSize, Input, type InputPreset, type InputProps, Menu, MenuGroup, type MenuGroupProps, MenuHeading, type MenuHeadingProps, MenuItem, type MenuItemProps, type MenuItemType, type MenuProps, ProgressBar, type ProgressBarProps, Radio, RadioCard, type RadioCardProps, type RadioProps, Sidebar, SidebarAccountCard, type SidebarAccountCardProps, SidebarContext, type SidebarContextValue, SidebarMenuItem, type SidebarMenuItemProps, type SidebarProps, SidebarSubmenuItem, type SidebarSubmenuItemProps, Slider, type SliderDoubleProps, SliderHandle, type SliderHandleProps, type SliderProps, type SliderSingleProps, type SliderVariant, Tag, type TagProps, TextArea, type TextAreaProps, Toggle, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, TooltipTrigger, accordionTriggerVariants, alertVariants, avatarProfileVariants, avatarVariants, badgeVariants, breadcrumbItemVariants, breadcrumbListVariants, breadcrumbSeparatorVariants, buttonGroupItemVariants, buttonGroupVariants, buttonVariants, closeButtonVariants, dividerVariants, focusRingVariants as dropdownFocusRingVariants, dropdownTriggerVariants, featuredIconVariants, iconVariants, inputWrapperVariants as inputVariants, menuGroupVariants, menuHeadingVariants, menuItemVariants, menuVariants, progressBarFillVariants, progressBarTrackVariants, sidebarAccountCardVariants, sidebarMenuItemVariants, sidebarSubmenuItemVariants, sidebarVariants, sliderHandleCircleVariants, tagVariants, textareaWrapperVariants as textareaVariants, thumbVariants, toggleVariants, tooltipContentVariants, useSidebarContext };
|