@ztwoint/z-ui 0.1.94 → 0.1.95

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.
@@ -0,0 +1,7 @@
1
+ interface SegmentedControlProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ handleOnClick?: (id?: string) => void;
3
+ className?: string;
4
+ children: React.ReactNode;
5
+ }
6
+ declare function SegmentedControl({ handleOnClick, className, children, ...props }: SegmentedControlProps): import("react/jsx-runtime").JSX.Element;
7
+ export { SegmentedControl };
@@ -0,0 +1,12 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ declare const segmentedControlItemVariants: (props?: ({
3
+ size?: "small" | "medium" | null | undefined;
4
+ } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
5
+ interface SegmentedControlItemProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof segmentedControlItemVariants> {
6
+ leftIcon?: React.ReactNode;
7
+ rightIcon?: React.ReactNode;
8
+ id: string;
9
+ label?: string;
10
+ }
11
+ declare function SegmentedControlItem({ leftIcon, rightIcon, id, label, size, ...props }: SegmentedControlItemProps): import("react/jsx-runtime").JSX.Element;
12
+ export { SegmentedControlItem, SegmentedControlItemProps };
@@ -0,0 +1,9 @@
1
+ type UseSegmentedControlOptions = {
2
+ onSelect?: (id?: string) => void;
3
+ };
4
+ type UseSegmentedControlResult = {
5
+ containerRef: React.RefObject<HTMLDivElement | null>;
6
+ handleClick: (e: React.MouseEvent<HTMLDivElement>) => void;
7
+ };
8
+ export declare function useSegmentedControl(options?: UseSegmentedControlOptions): UseSegmentedControlResult;
9
+ export {};