@mbao01/common 0.2.2 → 0.2.3
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/types/components/Dock/Dock.d.ts +8 -0
- package/dist/types/components/Dock/constants.d.ts +12 -0
- package/dist/types/components/Dock/index.d.ts +1 -0
- package/dist/types/components/Dock/types.d.ts +12 -0
- package/dist/types/components/Form/Input/Input.d.ts +5 -2
- package/dist/types/components/Form/Input/constants.d.ts +4 -0
- package/dist/types/components/Form/Input/types.d.ts +9 -2
- package/dist/types/components/Form/Radio/Radio.d.ts +1 -1
- package/dist/types/components/Form/Radio/types.d.ts +1 -1
- package/dist/types/components/Form/Range/Range.d.ts +1 -1
- package/dist/types/components/Form/Range/types.d.ts +1 -1
- package/dist/types/components/Form/Select/Select.d.ts +3 -0
- package/dist/types/components/Form/Select/constants.d.ts +4 -0
- package/dist/types/components/Form/Select/types.d.ts +10 -2
- package/dist/types/components/Form/Switch/Switch.d.ts +1 -1
- package/dist/types/components/Form/Switch/types.d.ts +1 -1
- package/dist/types/components/Form/TextField/TextField.d.ts +5 -1
- package/dist/types/components/Form/TextField/types.d.ts +1 -0
- package/dist/types/components/Form/Textarea/Textarea.d.ts +2 -0
- package/dist/types/components/Form/Textarea/constants.d.ts +1 -0
- package/dist/types/components/Form/Textarea/types.d.ts +7 -1
- package/dist/types/components/Form/Validator/Validator.d.ts +6 -0
- package/dist/types/components/Form/Validator/constants.d.ts +4 -0
- package/dist/types/components/Form/Validator/index.d.ts +1 -0
- package/dist/types/components/Form/Validator/types.d.ts +14 -0
- package/dist/types/components/Form/components/Fieldset/types.d.ts +1 -1
- package/dist/types/components/Form/index.d.ts +1 -0
- package/dist/types/components/Indicator/Indicator.d.ts +6 -0
- package/dist/types/components/Indicator/constants.d.ts +15 -0
- package/dist/types/components/Indicator/index.d.ts +1 -0
- package/dist/types/components/Indicator/types.d.ts +14 -0
- package/dist/types/components/Join/Join.d.ts +6 -0
- package/dist/types/components/Join/constants.d.ts +2 -0
- package/dist/types/components/Join/index.d.ts +1 -0
- package/dist/types/components/Join/types.d.ts +13 -0
- package/dist/types/components/Kbd/Kbd.d.ts +2 -0
- package/dist/types/components/Kbd/constants.d.ts +5 -0
- package/dist/types/components/Kbd/index.d.ts +1 -0
- package/dist/types/components/Kbd/types.d.ts +3 -0
- package/dist/types/components/List/List.d.ts +7 -0
- package/dist/types/components/List/constants.d.ts +5 -0
- package/dist/types/components/List/index.d.ts +1 -0
- package/dist/types/components/List/types.d.ts +6 -0
- package/dist/types/components/Resizable/Resizable.d.ts +24 -0
- package/dist/types/components/Resizable/constants.d.ts +6 -0
- package/dist/types/components/Resizable/index.d.ts +1 -0
- package/dist/types/components/Resizable/types.d.ts +7 -0
- package/dist/types/components/Sidebar/Sidebar.d.ts +5 -2
- package/dist/types/components/Stack/Stack.d.ts +2 -0
- package/dist/types/components/Stack/constants.d.ts +3 -0
- package/dist/types/components/Stack/index.d.ts +1 -0
- package/dist/types/components/Stack/types.d.ts +3 -0
- package/dist/types/components/Stat/Stat.d.ts +11 -0
- package/dist/types/components/Stat/constants.d.ts +11 -0
- package/dist/types/components/Stat/index.d.ts +1 -0
- package/dist/types/components/Stat/types.d.ts +10 -0
- package/dist/types/components/Status/Status.d.ts +2 -0
- package/dist/types/components/Status/constants.d.ts +5 -0
- package/dist/types/components/Status/index.d.ts +1 -0
- package/dist/types/components/Status/types.d.ts +3 -0
- package/dist/types/components/Text/types.d.ts +1 -1
- package/dist/types/index.d.ts +9 -0
- package/package.json +16 -14
- package/src/components/Dock/Dock.tsx +41 -0
- package/src/components/Dock/constants.ts +62 -0
- package/src/components/Dock/index.ts +1 -0
- package/src/components/Dock/types.ts +23 -0
- package/src/components/Form/Input/Input.tsx +71 -10
- package/src/components/Form/Input/constants.ts +17 -5
- package/src/components/Form/Input/types.ts +12 -4
- package/src/components/Form/Radio/types.ts +4 -1
- package/src/components/Form/Range/types.ts +4 -1
- package/src/components/Form/Select/Select.tsx +71 -10
- package/src/components/Form/Select/constants.ts +17 -0
- package/src/components/Form/Select/types.ts +11 -1
- package/src/components/Form/Switch/types.ts +4 -1
- package/src/components/Form/TextField/types.ts +1 -0
- package/src/components/Form/Textarea/Textarea.tsx +29 -3
- package/src/components/Form/Textarea/constants.ts +2 -0
- package/src/components/Form/Textarea/types.ts +9 -2
- package/src/components/Form/Validator/Validator.tsx +27 -0
- package/src/components/Form/Validator/constants.ts +18 -0
- package/src/components/Form/Validator/index.ts +1 -0
- package/src/components/Form/Validator/types.ts +30 -0
- package/src/components/Form/components/Fieldset/types.ts +1 -1
- package/src/components/Form/index.ts +1 -0
- package/src/components/Indicator/Indicator.tsx +46 -0
- package/src/components/Indicator/constants.ts +26 -0
- package/src/components/Indicator/index.ts +1 -0
- package/src/components/Indicator/types.ts +34 -0
- package/src/components/Join/Join.tsx +28 -0
- package/src/components/Join/constants.ts +5 -0
- package/src/components/Join/index.ts +1 -0
- package/src/components/Join/types.ts +29 -0
- package/src/components/Kbd/Kbd.tsx +7 -0
- package/src/components/Kbd/constants.ts +40 -0
- package/src/components/Kbd/index.ts +1 -0
- package/src/components/Kbd/types.ts +4 -0
- package/src/components/List/List.tsx +35 -0
- package/src/components/List/constants.ts +14 -0
- package/src/components/List/index.ts +1 -0
- package/src/components/List/types.ts +12 -0
- package/src/components/Resizable/Resizable.tsx +36 -0
- package/src/components/Resizable/constants.ts +22 -0
- package/src/components/Resizable/index.ts +1 -0
- package/src/components/Resizable/types.ts +13 -0
- package/src/components/Stack/Stack.tsx +11 -0
- package/src/components/Stack/constants.ts +12 -0
- package/src/components/Stack/index.ts +1 -0
- package/src/components/Stack/types.ts +5 -0
- package/src/components/Stat/Stat.tsx +55 -0
- package/src/components/Stat/constants.ts +33 -0
- package/src/components/Stat/index.ts +1 -0
- package/src/components/Stat/types.ts +31 -0
- package/src/components/Status/Status.tsx +7 -0
- package/src/components/Status/constants.ts +31 -0
- package/src/components/Status/index.ts +1 -0
- package/src/components/Status/types.ts +5 -0
- package/src/components/Text/types.ts +1 -1
- package/src/index.ts +9 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DockButtonProps, DockIconProps, DockLabelProps, DockProps } from './types';
|
|
2
|
+
declare const Dock: {
|
|
3
|
+
({ size, variant, outline, children, className, ...props }: DockProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
Button: ({ active, children, className, ...props }: DockButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
Label: ({ className, children, ...props }: DockLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Icon: ({ icon, size, className, children, ...props }: DockIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
};
|
|
8
|
+
export { Dock };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const getDockClasses: (props?: ({
|
|
2
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
3
|
+
variant?: "accent" | "default" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "ghost" | null | undefined;
|
|
4
|
+
outline?: boolean | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export declare const getDockButtonClasses: (props?: ({
|
|
7
|
+
active?: boolean | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export declare const getDockIconClasses: (props?: ({
|
|
10
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
11
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
|
+
export declare const getDockLabelClasses: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Dock } from './Dock';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LucideProps } from 'lucide-react';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { VariantProps } from '../../libs';
|
|
4
|
+
import { getDockButtonClasses, getDockClasses, getDockIconClasses, getDockLabelClasses } from './constants';
|
|
5
|
+
export type DockProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof getDockClasses>;
|
|
6
|
+
export type DockButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof getDockButtonClasses>;
|
|
7
|
+
export type DockLabelProps = React.HTMLAttributes<HTMLSpanElement> & VariantProps<typeof getDockLabelClasses>;
|
|
8
|
+
type P = Omit<LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>;
|
|
9
|
+
export type DockIconProps = P & VariantProps<typeof getDockIconClasses> & {
|
|
10
|
+
icon: React.ForwardRefExoticComponent<P>;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export declare const Input: React.ForwardRefExoticComponent<Omit<React.
|
|
2
|
+
export declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "ref" | "size"> & Omit<{
|
|
3
3
|
variant?: "accent" | "default" | "error" | "info" | "primary" | "secondary" | "success" | "warning" | "ghost" | undefined;
|
|
4
4
|
type?: string | number | undefined;
|
|
5
5
|
size?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
6
6
|
outline?: boolean | undefined;
|
|
7
7
|
wide?: boolean | undefined;
|
|
8
|
-
}, "type"> &
|
|
8
|
+
}, "type"> & {
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
labelPosition?: "start" | "end" | "floating";
|
|
11
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -5,3 +5,7 @@ export declare const getInputClasses: (props?: ({
|
|
|
5
5
|
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
6
6
|
type?: string | number | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
export declare const getFloatingLabelClasses: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
9
|
+
export declare const getInputLabelClasses: (props?: ({
|
|
10
|
+
floating?: boolean | null | undefined;
|
|
11
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { VariantProps } from '../../../libs';
|
|
2
|
-
import { getInputClasses } from './constants';
|
|
3
|
-
export type InputProps = Omit<React.
|
|
3
|
+
import { getInputClasses, getInputLabelClasses } from './constants';
|
|
4
|
+
export type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "ref"> & Omit<VariantProps<typeof getInputClasses>, "type"> & {
|
|
5
|
+
label?: ReactNode;
|
|
6
|
+
labelPosition?: "start" | "end" | "floating";
|
|
7
|
+
};
|
|
8
|
+
export type InputLabelProps = VariantProps<typeof getInputLabelClasses> & {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare const Radio: React.ForwardRefExoticComponent<Omit<React.
|
|
2
|
+
declare const Radio: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "ref" | "size"> & {
|
|
3
3
|
variant?: "accent" | "error" | "info" | "primary" | "secondary" | "success" | "warning" | undefined;
|
|
4
4
|
size?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
5
5
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { VariantProps } from '../../../libs';
|
|
2
2
|
import { getRadioClasses } from './constants';
|
|
3
|
-
export type RadioProps = Omit<React.
|
|
3
|
+
export type RadioProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "ref" | "type"> & VariantProps<typeof getRadioClasses>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare const Range: React.ForwardRefExoticComponent<Omit<React.
|
|
2
|
+
declare const Range: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "ref" | "size"> & {
|
|
3
3
|
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | undefined;
|
|
4
4
|
size?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
5
5
|
wide?: boolean | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { VariantProps } from '../../../libs';
|
|
2
2
|
import { getRangeClasses } from './constants';
|
|
3
|
-
export type RangeProps = Omit<React.
|
|
3
|
+
export type RangeProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "ref" | "type"> & VariantProps<typeof getRangeClasses>;
|
|
@@ -8,6 +8,9 @@ declare const Select: {
|
|
|
8
8
|
variant?: "accent" | "default" | "error" | "info" | "primary" | "secondary" | "success" | "warning" | undefined;
|
|
9
9
|
size?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
10
10
|
outline?: boolean | undefined;
|
|
11
|
+
} & {
|
|
12
|
+
label?: React.ReactNode;
|
|
13
|
+
labelPosition?: "start" | "end" | "floating";
|
|
11
14
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
12
15
|
Content: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
13
16
|
position?: "popper" | "item-aligned" | undefined;
|
|
@@ -17,3 +17,7 @@ export declare const getSelectContentClasses: (props?: ({
|
|
|
17
17
|
export declare const getSelectViewportClasses: (props?: ({
|
|
18
18
|
position?: "popper" | "item-aligned" | null | undefined;
|
|
19
19
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
20
|
+
export declare const getFloatingLabelClasses: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
21
|
+
export declare const getLabelForSelectClasses: (props?: ({
|
|
22
|
+
floating?: boolean | null | undefined;
|
|
23
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { VariantProps } from '../../../libs';
|
|
2
|
-
import { getSelectContentClasses, getSelectTriggerClasses, getSelectValueClasses } from './constants';
|
|
3
|
+
import { getLabelForSelectClasses, getSelectContentClasses, getSelectTriggerClasses, getSelectValueClasses } from './constants';
|
|
3
4
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
4
|
-
export type SelectTriggerProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> & VariantProps<typeof getSelectTriggerClasses
|
|
5
|
+
export type SelectTriggerProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> & VariantProps<typeof getSelectTriggerClasses> & {
|
|
6
|
+
label?: ReactNode;
|
|
7
|
+
labelPosition?: "start" | "end" | "floating";
|
|
8
|
+
};
|
|
5
9
|
export type SelectItemProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item> & VariantProps<typeof getSelectTriggerClasses>;
|
|
6
10
|
export type SelectContentProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> & VariantProps<typeof getSelectContentClasses>;
|
|
7
11
|
export type SelectValueProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Value> & VariantProps<typeof getSelectValueClasses>;
|
|
12
|
+
export type LabelForSelectProps = VariantProps<typeof getLabelForSelectClasses> & {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare const Switch: React.ForwardRefExoticComponent<Omit<React.
|
|
2
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "ref" | "size"> & {
|
|
3
3
|
variant?: "accent" | "error" | "info" | "primary" | "secondary" | "success" | "warning" | undefined;
|
|
4
4
|
size?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
5
5
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { VariantProps } from '../../../libs';
|
|
2
2
|
import { getSwitchClasses } from './constants';
|
|
3
|
-
export type SwitchProps = Omit<React.
|
|
3
|
+
export type SwitchProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "ref" | "type"> & VariantProps<typeof getSwitchClasses>;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export declare const TextField: React.ForwardRefExoticComponent<Omit<React.
|
|
2
|
+
export declare const TextField: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "ref" | "size"> & Omit<{
|
|
3
3
|
variant?: "accent" | "default" | "error" | "info" | "primary" | "secondary" | "success" | "warning" | "ghost" | undefined;
|
|
4
4
|
type?: string | number | undefined;
|
|
5
5
|
size?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
6
6
|
outline?: boolean | undefined;
|
|
7
7
|
wide?: boolean | undefined;
|
|
8
8
|
}, "type"> & {
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
labelPosition?: "start" | "end" | "floating";
|
|
11
|
+
} & {
|
|
9
12
|
info?: React.ReactNode;
|
|
13
|
+
label?: React.ReactNode;
|
|
10
14
|
error?: string | string[] | null;
|
|
11
15
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -4,5 +4,7 @@ declare const Textarea: React.ForwardRefExoticComponent<Omit<React.TextareaHTMLA
|
|
|
4
4
|
size?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
5
5
|
outline?: boolean | undefined;
|
|
6
6
|
wide?: boolean | undefined;
|
|
7
|
+
} & {
|
|
8
|
+
label?: React.ReactNode;
|
|
7
9
|
} & React.RefAttributes<HTMLTextAreaElement>>;
|
|
8
10
|
export { Textarea };
|
|
@@ -4,3 +4,4 @@ export declare const getTextareaClasses: (props?: ({
|
|
|
4
4
|
wide?: boolean | null | undefined;
|
|
5
5
|
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export declare const getFloatingLabelClasses: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { VariantProps } from '../../../libs';
|
|
2
3
|
import { getTextareaClasses } from './constants';
|
|
3
|
-
export type TextareaProps = Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "ref"> & VariantProps<typeof getTextareaClasses
|
|
4
|
+
export type TextareaProps = Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "ref"> & VariantProps<typeof getTextareaClasses> & {
|
|
5
|
+
label?: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export type TextareaLabelProps = {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { As, ValidatorHintProps, ValidatorProps } from './types';
|
|
2
|
+
declare const Validator: {
|
|
3
|
+
<T extends As>({ as, children, className, ...props }: ValidatorProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
Hint: ({ className, children, visible, ...props }: ValidatorHintProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
export { Validator };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const getValidatorClasses: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
2
|
+
export declare const getValidatorHintClasses: (props?: ({
|
|
3
|
+
visible?: boolean | null | undefined;
|
|
4
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Validator } from './Validator';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode, default as React } from 'react';
|
|
2
|
+
import { VariantProps } from '../../../libs';
|
|
3
|
+
import { Text } from '../../Text';
|
|
4
|
+
import { getValidatorClasses, getValidatorHintClasses } from './constants';
|
|
5
|
+
type FormElements = "input" | "select" | "textarea";
|
|
6
|
+
export type As<P = any> = FormElements | React.ComponentType<P> | React.ForwardRefExoticComponent<P>;
|
|
7
|
+
type AllowedElements = Pick<React.JSX.IntrinsicElements, FormElements>;
|
|
8
|
+
export type ValidatorProps<T extends As> = (T extends FormElements ? AllowedElements[T] : T extends React.ForwardRefExoticComponent<infer P> ? P : T extends React.ComponentType<infer P> ? P : never) & VariantProps<typeof getValidatorClasses> & {
|
|
9
|
+
as: T;
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
export type ValidatorHintProps = ComponentProps<typeof Text> & VariantProps<typeof getValidatorHintClasses>;
|
|
14
|
+
export {};
|
|
@@ -3,7 +3,7 @@ import { getFieldsetClasses, getFieldsetLabelClasses, getFieldsetLegendClasses }
|
|
|
3
3
|
export type FieldsetProps = React.FieldsetHTMLAttributes<HTMLFieldSetElement> & VariantProps<typeof getFieldsetClasses>;
|
|
4
4
|
export type As = "div" | "span" | "label" | "p";
|
|
5
5
|
type AllowedElements = Pick<React.JSX.IntrinsicElements, As>;
|
|
6
|
-
export type FieldsetLabelProps<T extends As> = (T extends "label" ? React.LabelHTMLAttributes<HTMLLabelElement> :
|
|
6
|
+
export type FieldsetLabelProps<T extends As> = (T extends "label" ? React.LabelHTMLAttributes<HTMLLabelElement> : AllowedElements[T]) & VariantProps<typeof getFieldsetLabelClasses> & {
|
|
7
7
|
as?: T;
|
|
8
8
|
};
|
|
9
9
|
export type FieldsetLegendProps = React.HTMLAttributes<HTMLLegendElement> & VariantProps<typeof getFieldsetLegendClasses>;
|
|
@@ -12,5 +12,6 @@ export { Checkbox, CheckboxControlled } from './Checkbox';
|
|
|
12
12
|
export { TagsInput } from './TagsInput';
|
|
13
13
|
export { Textarea } from './Textarea';
|
|
14
14
|
export { TextField } from './TextField';
|
|
15
|
+
export { Validator } from './Validator';
|
|
15
16
|
export { Label } from './components/Label';
|
|
16
17
|
export { Fieldset } from './components/Fieldset';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { As, IndicatorItemProps, IndicatorProps } from './types';
|
|
2
|
+
declare const Indicator: {
|
|
3
|
+
<T extends As>({ as, position, className, children, ...props }: IndicatorProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
Item: <T extends As>({ as, className, children, ...props }: IndicatorItemProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
export { Indicator };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const getIndicatorClasses: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
2
|
+
export declare const getIndicatorItemClasses: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
3
|
+
declare const INDICATOR_POSITION_CLASS: {
|
|
4
|
+
center: string;
|
|
5
|
+
middle: string;
|
|
6
|
+
start: string;
|
|
7
|
+
end: string;
|
|
8
|
+
top: string;
|
|
9
|
+
bottom: string;
|
|
10
|
+
};
|
|
11
|
+
type IndicatorPosition = keyof typeof INDICATOR_POSITION_CLASS;
|
|
12
|
+
export declare const getIndicatorPositionClasses: ({ position, }: {
|
|
13
|
+
position: IndicatorPosition | IndicatorPosition[];
|
|
14
|
+
}) => string;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Indicator } from './Indicator';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { VariantProps } from '../../libs';
|
|
2
|
+
import { getIndicatorClasses, getIndicatorItemClasses, getIndicatorPositionClasses } from './constants';
|
|
3
|
+
type FormElements = keyof React.JSX.IntrinsicElements;
|
|
4
|
+
export type As<P = any> = FormElements | React.ComponentType<P> | React.ForwardRefExoticComponent<P>;
|
|
5
|
+
type AllowedElements = Pick<React.JSX.IntrinsicElements, FormElements>;
|
|
6
|
+
type AsProps<T extends As> = T extends FormElements ? AllowedElements[T] : T extends React.ForwardRefExoticComponent<infer P> ? P : T extends React.ComponentType<infer P> ? P : never;
|
|
7
|
+
export type IndicatorProps<T extends As> = AsProps<T> & VariantProps<typeof getIndicatorClasses> & {
|
|
8
|
+
as: T;
|
|
9
|
+
position?: Parameters<typeof getIndicatorPositionClasses>[0]["position"];
|
|
10
|
+
};
|
|
11
|
+
export type IndicatorItemProps<T extends As> = AsProps<T> & VariantProps<typeof getIndicatorItemClasses> & {
|
|
12
|
+
as: T;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { As, JoinItemProps, JoinProps } from './types';
|
|
2
|
+
declare const Join: {
|
|
3
|
+
<T extends As>({ as, className, children, ...props }: JoinProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
Item: <T extends As>({ as, className, children, ...props }: JoinItemProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
export { Join };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Join } from './Join';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VariantProps } from '../../libs';
|
|
2
|
+
import { getJoinClasses, getJoinItemClasses } from './constants';
|
|
3
|
+
type FormElements = keyof React.JSX.IntrinsicElements;
|
|
4
|
+
export type As<P = any> = FormElements | React.ComponentType<P> | React.ForwardRefExoticComponent<P>;
|
|
5
|
+
type AllowedElements = Pick<React.JSX.IntrinsicElements, FormElements>;
|
|
6
|
+
type AsProps<T extends As> = T extends FormElements ? AllowedElements[T] : T extends React.ForwardRefExoticComponent<infer P> ? P : T extends React.ComponentType<infer P> ? P : never;
|
|
7
|
+
export type JoinProps<T extends As> = AsProps<T> & VariantProps<typeof getJoinClasses> & {
|
|
8
|
+
as: T;
|
|
9
|
+
};
|
|
10
|
+
export type JoinItemProps<T extends As> = AsProps<T> & VariantProps<typeof getJoinItemClasses> & {
|
|
11
|
+
as: T;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const getKbdClasses: (props?: ({
|
|
2
|
+
variant?: "accent" | "default" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "ghost" | null | undefined;
|
|
3
|
+
outline?: boolean | null | undefined;
|
|
4
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Kbd } from './Kbd';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ListColumnProps, ListItemProps, ListProps } from './types';
|
|
2
|
+
declare const List: {
|
|
3
|
+
({ className, children, ...props }: ListProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
Item: ({ className, children, ...props }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
Column: ({ flex, className, children, ...props }: ListColumnProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
};
|
|
7
|
+
export { List };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const getListClasses: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
2
|
+
export declare const getListItemClasses: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
3
|
+
export declare const getListColumnClasses: (props?: ({
|
|
4
|
+
flex?: "grow" | "wrap" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { List } from './List';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { VariantProps } from '../../libs';
|
|
3
|
+
import { getListClasses, getListColumnClasses, getListItemClasses } from './constants';
|
|
4
|
+
export type ListProps = React.HTMLAttributes<HTMLUListElement> & VariantProps<typeof getListClasses>;
|
|
5
|
+
export type ListItemProps = React.HTMLAttributes<HTMLLIElement> & VariantProps<typeof getListItemClasses>;
|
|
6
|
+
export type ListColumnProps = React.HTMLAttributes<HTMLLIElement> & VariantProps<typeof getListColumnClasses>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ResizableHandleProps, ResizableProps } from './types';
|
|
2
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
3
|
+
declare const Resizable: {
|
|
4
|
+
({ className, ...props }: ResizableProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
Panel: import('react').ForwardRefExoticComponent<Omit<import('react').HTMLAttributes<HTMLElement | HTMLAnchorElement | HTMLSpanElement | HTMLButtonElement | HTMLUListElement | HTMLLIElement | HTMLOListElement | HTMLObjectElement | HTMLLinkElement | HTMLSlotElement | HTMLStyleElement | HTMLTitleElement | HTMLMapElement | HTMLDialogElement | HTMLFormElement | HTMLImageElement | HTMLOptionElement | HTMLTableElement | HTMLTimeElement | HTMLBaseElement | HTMLAreaElement | HTMLAudioElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDivElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOutputElement | HTMLParagraphElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
|
|
6
|
+
className?: string | undefined;
|
|
7
|
+
collapsedSize?: number | undefined;
|
|
8
|
+
collapsible?: boolean | undefined;
|
|
9
|
+
defaultSize?: number | undefined;
|
|
10
|
+
id?: string | undefined;
|
|
11
|
+
maxSize?: number | undefined;
|
|
12
|
+
minSize?: number | undefined;
|
|
13
|
+
onCollapse?: ResizablePrimitive.PanelOnCollapse | undefined;
|
|
14
|
+
onExpand?: ResizablePrimitive.PanelOnExpand | undefined;
|
|
15
|
+
onResize?: ResizablePrimitive.PanelOnResize | undefined;
|
|
16
|
+
order?: number | undefined;
|
|
17
|
+
style?: object | undefined;
|
|
18
|
+
tagName?: keyof HTMLElementTagNameMap | undefined;
|
|
19
|
+
} & {
|
|
20
|
+
children?: import('react').ReactNode;
|
|
21
|
+
} & import('react').RefAttributes<ResizablePrimitive.ImperativePanelHandle>>;
|
|
22
|
+
Handle: ({ withHandle, bordered, className, ...props }: ResizableHandleProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
};
|
|
24
|
+
export { Resizable };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const getResizableClasses: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
2
|
+
export declare const getResizableHandleClasses: (props?: ({
|
|
3
|
+
bordered?: boolean | null | undefined;
|
|
4
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
|
+
export declare const getResizableHandleIconWrapperClasses: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
6
|
+
export declare const getResizableHandleIconClasses: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Resizable } from './Resizable';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VariantProps } from '../../libs';
|
|
2
|
+
import { getResizableClasses, getResizableHandleClasses } from './constants';
|
|
3
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
4
|
+
export type ResizableProps = React.ComponentProps<typeof ResizablePrimitive.PanelGroup> & VariantProps<typeof getResizableClasses>;
|
|
5
|
+
export type ResizableHandleProps = React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & VariantProps<typeof getResizableHandleClasses> & {
|
|
6
|
+
withHandle?: boolean;
|
|
7
|
+
};
|
|
@@ -7,13 +7,16 @@ declare const Sidebar: {
|
|
|
7
7
|
Content: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
8
8
|
Footer: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
9
|
Header: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
|
-
Input: import('react').ForwardRefExoticComponent<Omit<import('react').
|
|
10
|
+
Input: import('react').ForwardRefExoticComponent<Omit<import('react').InputHTMLAttributes<HTMLInputElement>, "ref" | "size"> & Omit<{
|
|
11
11
|
variant?: "accent" | "default" | "error" | "info" | "primary" | "secondary" | "success" | "warning" | "ghost" | undefined;
|
|
12
12
|
type?: string | number | undefined;
|
|
13
13
|
size?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
14
14
|
outline?: boolean | undefined;
|
|
15
15
|
wide?: boolean | undefined;
|
|
16
|
-
}, "type"> &
|
|
16
|
+
}, "type"> & {
|
|
17
|
+
label?: import('react').ReactNode;
|
|
18
|
+
labelPosition?: "start" | "end" | "floating";
|
|
19
|
+
} & import('react').RefAttributes<HTMLInputElement>>;
|
|
17
20
|
Inset: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
18
21
|
Provider: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
19
22
|
defaultOpen?: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stack } from './Stack';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { StatActionsProps, StatDescriptionProps, StatFigureProps, StatProps, StatsProps, StatTitleProps, StatValueProps } from './types';
|
|
2
|
+
declare const Stats: ({ direction, className, ...props }: StatsProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const Stat: {
|
|
4
|
+
({ className, position, ...props }: StatProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
Actions: ({ className, ...props }: StatActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Description: ({ className, ...props }: StatDescriptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
Figure: ({ className, ...props }: StatFigureProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
Title: ({ className, ...props }: StatTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
Value: ({ className, ...props }: StatValueProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
export { Stats, Stat };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const getStatsClasses: (props?: ({
|
|
2
|
+
direction?: "horizontal" | "vertical" | null | undefined;
|
|
3
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
4
|
+
export declare const getStatClasses: (props?: ({
|
|
5
|
+
position?: "end" | "center" | "start" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export declare const getStatTitleClasses: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
8
|
+
export declare const getStatValueClasses: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
9
|
+
export declare const getStatDescriptionClasses: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
10
|
+
export declare const getStatFigureClasses: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
11
|
+
export declare const getStatActionsClasses: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stat, Stats } from './Stat';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { VariantProps } from '../../libs';
|
|
3
|
+
import { getStatActionsClasses, getStatClasses, getStatDescriptionClasses, getStatFigureClasses, getStatsClasses, getStatTitleClasses, getStatValueClasses } from './constants';
|
|
4
|
+
export type StatsProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof getStatsClasses>;
|
|
5
|
+
export type StatProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof getStatClasses>;
|
|
6
|
+
export type StatActionsProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof getStatActionsClasses>;
|
|
7
|
+
export type StatDescriptionProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof getStatDescriptionClasses>;
|
|
8
|
+
export type StatFigureProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof getStatFigureClasses>;
|
|
9
|
+
export type StatTitleProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof getStatTitleClasses>;
|
|
10
|
+
export type StatValueProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof getStatValueClasses>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const getStatusClasses: (props?: ({
|
|
2
|
+
variant?: "accent" | "default" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "ghost" | null | undefined;
|
|
3
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
4
|
+
animate?: "ping" | "bounce" | "pulse" | "spin" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Status } from './Status';
|
|
@@ -2,7 +2,7 @@ import { VariantProps } from '../../libs';
|
|
|
2
2
|
import { getTextClasses } from './constants';
|
|
3
3
|
export type As = "h1" | "h2" | "h3" | "h4" | "h5" | "p" | "span";
|
|
4
4
|
type AllowedElements = Pick<React.JSX.IntrinsicElements, As>;
|
|
5
|
-
export type TextProps<T extends As> =
|
|
5
|
+
export type TextProps<T extends As> = AllowedElements[T] & VariantProps<typeof getTextClasses> & {
|
|
6
6
|
as?: As;
|
|
7
7
|
};
|
|
8
8
|
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -16,10 +16,19 @@ export * from './components/Card';
|
|
|
16
16
|
export * from './components/Calendar';
|
|
17
17
|
export * from './components/Collapsible';
|
|
18
18
|
export * from './components/Description';
|
|
19
|
+
export * from './components/Dock';
|
|
20
|
+
export * from './components/Indicator';
|
|
21
|
+
export * from './components/Join';
|
|
22
|
+
export * from './components/Kbd';
|
|
23
|
+
export * from './components/List';
|
|
19
24
|
export * from './components/Progress';
|
|
25
|
+
export * from './components/Resizable';
|
|
20
26
|
export * from './components/ScrollArea';
|
|
21
27
|
export * from './components/Separator';
|
|
22
28
|
export * from './components/Sonner';
|
|
29
|
+
export * from './components/Stack';
|
|
30
|
+
export * from './components/Stat';
|
|
31
|
+
export * from './components/Status';
|
|
23
32
|
export * from './components/Table';
|
|
24
33
|
export * from './components/Tabs';
|
|
25
34
|
export * from './components/Text';
|