@kroo-web/design-system 1.12.1 → 1.12.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/{esm/src/__tests__ → __tests__}/setup.d.ts +1 -0
- package/dist/__tests__/setup2.d.ts +1 -0
- package/dist/components/Accordion/Accordion.stories.d.ts +22 -0
- package/dist/{cjs/src/components → components}/Accordion/config.d.ts +2 -1
- package/dist/{cjs/src/components → components}/Accordion/index.d.ts +1 -1
- package/dist/components/Button/button.stories.d.ts +18 -0
- package/dist/components/Button/button.test.d.ts +1 -0
- package/dist/{esm/src/components → components}/Button/index.d.ts +2 -1
- package/dist/components/Callout/Callout.stories.d.ts +8 -0
- package/dist/components/Callout/Callout.test.d.ts +1 -0
- package/dist/{esm/src/components → components}/Callout/index.d.ts +3 -2
- package/dist/components/Card/Card.stories.d.ts +24 -0
- package/dist/{esm/src/components → components}/Card/index.d.ts +2 -1
- package/dist/components/Cards/cards.stories.d.ts +11 -0
- package/dist/{cjs/src/components → components}/Cards/index.d.ts +2 -1
- package/dist/components/Checkbox/Checkbox.test.d.ts +1 -0
- package/dist/components/Checkbox/checkBox.stories.d.ts +11 -0
- package/dist/{esm/src/components → components}/Checkbox/index.d.ts +2 -1
- package/dist/components/Columns/Columns.stories.d.ts +7 -0
- package/dist/components/Columns/columns.test.d.ts +1 -0
- package/dist/{esm/src/components → components}/Columns/index.d.ts +2 -1
- package/dist/components/ComboBox/ComboBox.stories.d.ts +13 -0
- package/dist/{esm/src/components → components}/ComboBox/index.d.ts +2 -1
- package/dist/components/DatePicker/DatePicker.stories.d.ts +12 -0
- package/dist/components/DatePicker/DatePicker.test.d.ts +1 -0
- package/dist/{cjs/src/components → components}/DatePicker/index.d.ts +2 -1
- package/dist/components/Disclosure/Disclosure.stories.d.ts +7 -0
- package/dist/{cjs/src/components → components}/Disclosure/index.d.ts +2 -1
- package/dist/components/Form/Form.stories.d.ts +7 -0
- package/dist/{cjs/src/components → components}/Form/index.d.ts +2 -1
- package/dist/components/Icon/Icon.stories.d.ts +12 -0
- package/dist/components/Icon/Icon.test.d.ts +1 -0
- package/dist/{cjs/src/components → components}/Icon/index.d.ts +2 -1
- package/dist/{esm/src/components → components}/Icon/types.d.ts +1 -0
- package/dist/{esm/src/components → components}/Link/index.d.ts +2 -1
- package/dist/components/Link/link.stories.d.ts +9 -0
- package/dist/components/Loading/Loading.stories.d.ts +8 -0
- package/dist/components/Loading/Loading.test.d.ts +1 -0
- package/dist/{esm/src/components → components}/Loading/index.d.ts +2 -1
- package/dist/components/Modal/Modal.stories.d.ts +15 -0
- package/dist/components/Modal/Modal.test.d.ts +1 -0
- package/dist/{esm/src/components → components}/Modal/index.d.ts +3 -2
- package/dist/{cjs/src/components → components}/NumberField/index.d.ts +2 -1
- package/dist/components/NumberField/numberField.stories.d.ts +15 -0
- package/dist/components/NumberField/numberField.test.d.ts +1 -0
- package/dist/components/PhoneField/PhoneField.test.d.ts +1 -0
- package/dist/{esm/src/components → components}/PhoneField/index.d.ts +2 -1
- package/dist/components/PhoneField/phoneField.stories.d.ts +8 -0
- package/dist/components/PinInput/PinInput.stories.d.ts +29 -0
- package/dist/{esm/src/components → components}/PinInput/index.d.ts +2 -1
- package/dist/{cjs/src/components → components}/Popover/index.d.ts +1 -1
- package/dist/components/Popover/popover.stories.d.ts +7 -0
- package/dist/components/ProgressIndicator/ProgressIndicator.stories.d.ts +8 -0
- package/dist/components/ProgressIndicator/ProgressIndicator.test.d.ts +1 -0
- package/dist/{cjs/src/components → components}/ProgressIndicator/index.d.ts +2 -1
- package/dist/{esm/src/components → components}/RadioGroup/index.d.ts +2 -2
- package/dist/components/RadioGroup/radioGroup.stories.d.ts +10 -0
- package/dist/components/Range/Range.test.d.ts +1 -0
- package/dist/{cjs/src/components → components}/Range/index.d.ts +2 -1
- package/dist/components/Range/range.stories.d.ts +9 -0
- package/dist/{esm/src/components → components}/Select/index.d.ts +2 -1
- package/dist/components/Select/select.stories.d.ts +13 -0
- package/dist/components/Select/select.test.d.ts +1 -0
- package/dist/components/Skeleton/Skeleton.stories.d.ts +8 -0
- package/dist/{cjs/src/components → components}/Skeleton/index.d.ts +2 -1
- package/dist/{esm/src/components → components}/Table/index.d.ts +2 -1
- package/dist/components/Table/table.stories.d.ts +8 -0
- package/dist/components/Tabs/Tabs.stories.d.ts +7 -0
- package/dist/{cjs/src/components → components}/Tabs/index.d.ts +1 -1
- package/dist/{cjs/src/components → components}/Tag/index.d.ts +3 -2
- package/dist/components/Tag/tag.stories.d.ts +9 -0
- package/dist/{esm/src/components → components}/TextField/index.d.ts +2 -1
- package/dist/components/TextField/textField.stories.d.ts +19 -0
- package/dist/components/TextField/textField.test.d.ts +1 -0
- package/dist/components/Toast/Toast.stories.d.ts +8 -0
- package/dist/{esm/src/components → components}/Toast/index.d.ts +2 -1
- package/dist/components/Tooltip/Tooltip.stories.d.ts +8 -0
- package/dist/components/Tooltip/Tooltip.test.d.ts +1 -0
- package/dist/{cjs/src/components → components}/Tooltip/index.d.ts +1 -1
- package/dist/{cjs/src/components → components}/Typography/index.d.ts +2 -1
- package/dist/components/Typography/typography.stories.d.ts +11 -0
- package/dist/components/Typography/typography.test.d.ts +1 -0
- package/dist/components/Wrapper/Wrapper.stories.d.ts +9 -0
- package/dist/{cjs/src/components → components}/Wrapper/index.d.ts +2 -1
- package/dist/{esm/src/components → components}/shared/FieldError/index.d.ts +2 -1
- package/dist/{esm/src/components → components}/shared/FieldHelper/index.d.ts +2 -1
- package/dist/components/shared/FormField/FormField.stories.d.ts +7 -0
- package/dist/{esm/src/components → components}/shared/FormField/index.d.ts +2 -1
- package/dist/consts/country-phone-codes.json.d.ts +1205 -0
- package/dist/index.js +148 -0
- package/dist/modal/focus-trap-example.png +0 -0
- package/dist/style.css +1 -0
- package/dist/{cjs/src/utils → utils}/decorators/Form/index.d.ts +2 -1
- package/dist/{cjs/src/utils → utils}/decorators/Grid/index.d.ts +2 -1
- package/package.json +21 -26
- package/dist/cjs/examples/form/index.d.ts +0 -45
- package/dist/cjs/index.js +0 -46
- package/dist/cjs/src/__tests__/setup.d.ts +0 -5
- package/dist/cjs/src/__tests__/setup2.d.ts +0 -1
- package/dist/cjs/src/components/Button/index.d.ts +0 -24
- package/dist/cjs/src/components/Callout/index.d.ts +0 -11
- package/dist/cjs/src/components/Card/index.d.ts +0 -21
- package/dist/cjs/src/components/Checkbox/index.d.ts +0 -23
- package/dist/cjs/src/components/Columns/index.d.ts +0 -6
- package/dist/cjs/src/components/ComboBox/index.d.ts +0 -51
- package/dist/cjs/src/components/Icon/types.d.ts +0 -26
- package/dist/cjs/src/components/Link/index.d.ts +0 -11
- package/dist/cjs/src/components/Loading/index.d.ts +0 -12
- package/dist/cjs/src/components/Modal/index.d.ts +0 -33
- package/dist/cjs/src/components/PhoneField/index.d.ts +0 -34
- package/dist/cjs/src/components/PinInput/index.d.ts +0 -13
- package/dist/cjs/src/components/RadioGroup/index.d.ts +0 -16
- package/dist/cjs/src/components/Select/index.d.ts +0 -42
- package/dist/cjs/src/components/Table/index.d.ts +0 -17
- package/dist/cjs/src/components/TextField/index.d.ts +0 -35
- package/dist/cjs/src/components/Toast/index.d.ts +0 -19
- package/dist/cjs/src/components/shared/FieldError/index.d.ts +0 -7
- package/dist/cjs/src/components/shared/FieldHelper/index.d.ts +0 -12
- package/dist/cjs/src/components/shared/FormField/index.d.ts +0 -10
- package/dist/esm/examples/form/index.d.ts +0 -45
- package/dist/esm/index.js +0 -46
- package/dist/esm/src/__tests__/setup2.d.ts +0 -1
- package/dist/esm/src/components/Accordion/config.d.ts +0 -11
- package/dist/esm/src/components/Accordion/index.d.ts +0 -21
- package/dist/esm/src/components/Cards/index.d.ts +0 -9
- package/dist/esm/src/components/DatePicker/index.d.ts +0 -28
- package/dist/esm/src/components/Disclosure/index.d.ts +0 -6
- package/dist/esm/src/components/Form/index.d.ts +0 -8
- package/dist/esm/src/components/Icon/consts.d.ts +0 -2
- package/dist/esm/src/components/Icon/index.d.ts +0 -8
- package/dist/esm/src/components/NumberField/index.d.ts +0 -30
- package/dist/esm/src/components/Popover/index.d.ts +0 -10
- package/dist/esm/src/components/ProgressIndicator/index.d.ts +0 -8
- package/dist/esm/src/components/Range/index.d.ts +0 -15
- package/dist/esm/src/components/Skeleton/index.d.ts +0 -7
- package/dist/esm/src/components/Tabs/index.d.ts +0 -12
- package/dist/esm/src/components/Tag/index.d.ts +0 -14
- package/dist/esm/src/components/Tooltip/index.d.ts +0 -14
- package/dist/esm/src/components/Typography/index.d.ts +0 -13
- package/dist/esm/src/components/Wrapper/index.d.ts +0 -12
- package/dist/esm/src/components/index.d.ts +0 -32
- package/dist/esm/src/hooks/useWindowSize.d.ts +0 -4
- package/dist/esm/src/index.d.ts +0 -1
- package/dist/esm/src/types/PolymorphicWithoutRef.d.ts +0 -6
- package/dist/esm/src/utils/decorators/Form/index.d.ts +0 -2
- package/dist/esm/src/utils/decorators/Grid/index.d.ts +0 -5
- package/dist/esm/src/utils/decorators/toTitleCase.d.ts +0 -1
- package/dist/types.d.ts +0 -600
- /package/dist/{cjs/src/components → components}/Icon/consts.d.ts +0 -0
- /package/dist/{cjs/src/components → components}/index.d.ts +0 -0
- /package/dist/{cjs/src/hooks → hooks}/useWindowSize.d.ts +0 -0
- /package/dist/{cjs/src/index.d.ts → index.d.ts} +0 -0
- /package/dist/styles/{components → styles/components}/toast-base.css +0 -0
- /package/dist/styles/{dev.global.css → styles/dev.global.css} +0 -0
- /package/dist/styles/{global.css → styles/global.css} +0 -0
- /package/dist/styles/{tokens → styles/tokens}/dev.tokens.css +0 -0
- /package/dist/styles/{tokens → styles/tokens}/fonts.css +0 -0
- /package/dist/styles/{tokens → styles/tokens}/index.css +0 -0
- /package/dist/styles/{tokens → styles/tokens}/marketing.css +0 -0
- /package/dist/styles/{tokens → styles/tokens}/product.css +0 -0
- /package/dist/{cjs/src/types → types}/PolymorphicWithoutRef.d.ts +0 -0
- /package/dist/{cjs/src/utils → utils}/decorators/toTitleCase.d.ts +0 -0
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { render, RenderOptions } from '@testing-library/react';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
3
|
-
declare const customRender: (ui: ReactElement, options?: Omit<RenderOptions, "wrapper">) => ReturnType<typeof render>;
|
|
4
|
-
export * from '@testing-library/react';
|
|
5
|
-
export { customRender as render };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@testing-library/jest-dom/vitest';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { PolymorphicPropsWithoutRef } from '../../types/PolymorphicWithoutRef';
|
|
3
|
-
declare const defaultElement = "button";
|
|
4
|
-
type TButtonVisualTypes = {
|
|
5
|
-
variant?: 'danger' | 'ghost' | 'primary' | 'secondary' | 'tertiary';
|
|
6
|
-
visualType?: 'button';
|
|
7
|
-
} | {
|
|
8
|
-
variant?: 'danger' | 'ghost' | 'standard';
|
|
9
|
-
visualType?: 'action';
|
|
10
|
-
} | {
|
|
11
|
-
variant?: 'outline' | 'primary' | 'secondary';
|
|
12
|
-
visualType?: 'nav';
|
|
13
|
-
} | {
|
|
14
|
-
variant?: 'primary' | 'secondary';
|
|
15
|
-
visualType?: 'text';
|
|
16
|
-
};
|
|
17
|
-
type TButtonOwnProps = {
|
|
18
|
-
as?: 'button' | 'span';
|
|
19
|
-
className?: string;
|
|
20
|
-
onlyIcon?: boolean;
|
|
21
|
-
} & PropsWithChildren & React.ButtonHTMLAttributes<HTMLButtonElement> & TButtonVisualTypes;
|
|
22
|
-
export type TButtonProps<T extends React.ElementType = typeof defaultElement> = PolymorphicPropsWithoutRef<TButtonOwnProps, T>;
|
|
23
|
-
export declare function Button<T extends React.ElementType = typeof defaultElement>({ as, children, className, onlyIcon, variant, visualType, ...rest }: TButtonProps<T>): React.JSX.Element;
|
|
24
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { TTypographyProps } from '../Typography';
|
|
3
|
-
export type TCalloutRootProps = {
|
|
4
|
-
type?: 'error' | 'positive' | 'primary' | 'secondary' | 'warning';
|
|
5
|
-
};
|
|
6
|
-
export type TCalloutTextProps = TTypographyProps<'p'>;
|
|
7
|
-
export declare const Callout: {
|
|
8
|
-
Icon: ({ size, weight, ...rest }: import("../Icon").TIconProps) => React.JSX.Element;
|
|
9
|
-
Root: ({ children, type }: PropsWithChildren<TCalloutRootProps>) => React.JSX.Element;
|
|
10
|
-
Text: ({ children, ...props }: PropsWithChildren<TCalloutTextProps>) => React.JSX.Element;
|
|
11
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { PolymorphicPropsWithoutRef } from '../../types/PolymorphicWithoutRef';
|
|
3
|
-
declare const defaultElement = "div";
|
|
4
|
-
export type TCardVariants = {
|
|
5
|
-
elementType?: 'div';
|
|
6
|
-
radius?: 'large' | 'medium' | 'none' | 'small';
|
|
7
|
-
size?: {
|
|
8
|
-
horizontal: 'extra-small' | 'large' | 'medium' | 'none' | 'small';
|
|
9
|
-
vertical: 'extra-small' | 'large' | 'medium' | 'none' | 'small';
|
|
10
|
-
};
|
|
11
|
-
visual?: 'primary' | 'secondary' | 'tertiary';
|
|
12
|
-
};
|
|
13
|
-
export interface ICardOwnProps extends React.HTMLAttributes<HTMLDivElement>, PropsWithChildren {
|
|
14
|
-
as?: 'div';
|
|
15
|
-
className?: string;
|
|
16
|
-
isSquare?: boolean;
|
|
17
|
-
variants?: TCardVariants;
|
|
18
|
-
}
|
|
19
|
-
export type ICardProps<T extends React.ElementType = typeof defaultElement> = PolymorphicPropsWithoutRef<ICardOwnProps, T>;
|
|
20
|
-
export declare function Card<T extends React.ElementType = typeof defaultElement>({ as, children, className, isSquare, variants, ...rest }: ICardProps<T>): React.JSX.Element;
|
|
21
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
import { FieldValues, Path } from 'react-hook-form';
|
|
3
|
-
export type TCheckboxProps<T extends FieldValues> = {
|
|
4
|
-
className?: string;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
id: string;
|
|
7
|
-
label: ReactNode | string;
|
|
8
|
-
name: Path<T>;
|
|
9
|
-
variant?: 'checkbox' | 'radio';
|
|
10
|
-
};
|
|
11
|
-
export declare const Checkbox: <T extends FieldValues>(props: TCheckboxProps<T>) => React.JSX.Element;
|
|
12
|
-
export type TNativeCheckboxProps = {
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
error?: {
|
|
15
|
-
message: string;
|
|
16
|
-
};
|
|
17
|
-
helper?: {
|
|
18
|
-
message: string;
|
|
19
|
-
};
|
|
20
|
-
id: string;
|
|
21
|
-
label: ReactNode | string;
|
|
22
|
-
} & React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
23
|
-
export declare const NativeCheckbox: React.ForwardRefExoticComponent<Omit<TNativeCheckboxProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
import { ComboBoxProps } from 'react-aria-components';
|
|
3
|
-
import { ControllerRenderProps, FieldValues } from 'react-hook-form';
|
|
4
|
-
export type TComboBoxItem = {
|
|
5
|
-
img?: string;
|
|
6
|
-
render?: ReactNode;
|
|
7
|
-
text: string;
|
|
8
|
-
};
|
|
9
|
-
export type TComboBoxProps = {
|
|
10
|
-
alwaysOpen?: boolean;
|
|
11
|
-
field: ControllerRenderProps<FieldValues>;
|
|
12
|
-
label: string;
|
|
13
|
-
name: string;
|
|
14
|
-
onSelect?: (item: TComboBoxItem) => void;
|
|
15
|
-
options: TComboBoxItem[];
|
|
16
|
-
};
|
|
17
|
-
export declare const ComboBox: (props: Omit<TComboBoxProps, "field">) => React.JSX.Element;
|
|
18
|
-
export declare const Field: ({ alwaysOpen, field: { onBlur, ...restField }, label, onSelect, options }: TComboBoxProps) => React.JSX.Element;
|
|
19
|
-
export type TNativeComboBoxRootProps = {
|
|
20
|
-
children: ReactNode;
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
error?: {
|
|
23
|
-
message: string;
|
|
24
|
-
};
|
|
25
|
-
helper?: {
|
|
26
|
-
message: string;
|
|
27
|
-
};
|
|
28
|
-
hideLabel?: boolean;
|
|
29
|
-
id: string;
|
|
30
|
-
label: string;
|
|
31
|
-
missing?: boolean;
|
|
32
|
-
placeholder?: string;
|
|
33
|
-
} & Omit<ComboBoxProps<TComboBoxItem>, 'children' | 'isDisabled' | 'label' | 'onOpenChange' | 'placeholder'>;
|
|
34
|
-
export declare const Root: ({ children, disabled, error, helper, hideLabel, id, label, missing, placeholder, ...rest }: TNativeComboBoxRootProps) => React.JSX.Element;
|
|
35
|
-
export declare const Options: ({ children }: {
|
|
36
|
-
children: ReactNode;
|
|
37
|
-
}) => React.JSX.Element;
|
|
38
|
-
export declare const Item: ({ children, img }: {
|
|
39
|
-
children: ReactNode;
|
|
40
|
-
img?: string;
|
|
41
|
-
}) => React.JSX.Element;
|
|
42
|
-
export declare const NativeComboBox: {
|
|
43
|
-
Item: ({ children, img }: {
|
|
44
|
-
children: ReactNode;
|
|
45
|
-
img?: string;
|
|
46
|
-
}) => React.JSX.Element;
|
|
47
|
-
Options: ({ children }: {
|
|
48
|
-
children: ReactNode;
|
|
49
|
-
}) => React.JSX.Element;
|
|
50
|
-
Root: ({ children, disabled, error, helper, hideLabel, id, label, missing, placeholder, ...rest }: TNativeComboBoxRootProps) => React.JSX.Element;
|
|
51
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import { MaterialSymbolWeightArray, SymbolCodepointsArray } from './consts';
|
|
3
|
-
export type SymbolCodepoints = (typeof SymbolCodepointsArray)[number];
|
|
4
|
-
export type MaterialSymbolWeight = (typeof MaterialSymbolWeightArray)[number];
|
|
5
|
-
export type MaterialSymbolProps = {
|
|
6
|
-
className?: string;
|
|
7
|
-
/** Default `'inherit'`
|
|
8
|
-
*
|
|
9
|
-
* Color accepts key values (`'red'`, `'blue'`, `'indigo'`, etc.), `<hex-color>`, `<rgb()>`, `<hsl()>` and `<hwb()>` values. */
|
|
10
|
-
color?: CSSProperties['color'];
|
|
11
|
-
/** Default `false`.
|
|
12
|
-
*
|
|
13
|
-
* Fill gives you the ability to modify the default icon style. A single icon can render both unfilled and filled states. */
|
|
14
|
-
fill?: boolean;
|
|
15
|
-
/** Weight and grade affect a symbol’s thickness. Adjustments to grade are more granular than adjustments to weight and have a small impact on the size of the symbol. */
|
|
16
|
-
grade?: number;
|
|
17
|
-
/** Required. The name of the icon to render. */
|
|
18
|
-
icon: SymbolCodepoints;
|
|
19
|
-
/** Default `'inherit'`.
|
|
20
|
-
*
|
|
21
|
-
* Size defines the icon width and height in pixels. For the image to look the same at different sizes, the stroke weight (thickness) changes as the icon size scales. */
|
|
22
|
-
size?: number;
|
|
23
|
-
style?: CSSProperties;
|
|
24
|
-
/** Weight defines the symbol’s stroke weight, with a range of weights between thin (100) and heavy (900). Weight can also affect the overall size of the symbol. */
|
|
25
|
-
weight?: MaterialSymbolWeight;
|
|
26
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React, { ElementType, PropsWithChildren } from 'react';
|
|
2
|
-
type PolymorphicLink<T extends ElementType> = {
|
|
3
|
-
as?: T;
|
|
4
|
-
className?: string;
|
|
5
|
-
} & PropsWithChildren;
|
|
6
|
-
type AnchorProps = {
|
|
7
|
-
as?: undefined;
|
|
8
|
-
} & React.AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
9
|
-
export type TLink<T extends ElementType> = AnchorProps | PolymorphicLink<T>;
|
|
10
|
-
export declare const Link: <T extends ElementType = "a">({ as, children, className, ...rest }: TLink<T>) => React.JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare const sizes: {
|
|
3
|
-
full: string;
|
|
4
|
-
large: string;
|
|
5
|
-
medium: string;
|
|
6
|
-
small: string;
|
|
7
|
-
};
|
|
8
|
-
export type TLoadingProps = {
|
|
9
|
-
size?: keyof typeof sizes;
|
|
10
|
-
};
|
|
11
|
-
export declare const Loading: ({ size }: TLoadingProps) => React.JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React, { ButtonHTMLAttributes, PropsWithChildren } from 'react';
|
|
2
|
-
import { TButtonProps } from '../Button';
|
|
3
|
-
export type TUseModalProps = {
|
|
4
|
-
activeModal: string;
|
|
5
|
-
close: () => void;
|
|
6
|
-
isOpen: boolean;
|
|
7
|
-
open: (value: string) => void;
|
|
8
|
-
};
|
|
9
|
-
export declare const useModal: import("zustand").UseBoundStore<import("zustand").StoreApi<TUseModalProps>>;
|
|
10
|
-
export type TModalContentProps = {
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
closeOnBackdropClick?: boolean;
|
|
13
|
-
focusTrap?: boolean;
|
|
14
|
-
value: string;
|
|
15
|
-
};
|
|
16
|
-
export type TModalControlProps = {
|
|
17
|
-
children: React.ReactNode;
|
|
18
|
-
value: string;
|
|
19
|
-
} & TButtonProps;
|
|
20
|
-
export type TModalHeaderProps = {
|
|
21
|
-
actionButtonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
22
|
-
onClick?: () => void;
|
|
23
|
-
title: string;
|
|
24
|
-
variant?: 'action';
|
|
25
|
-
};
|
|
26
|
-
export type TModalButtonProps = PropsWithChildren;
|
|
27
|
-
export declare const Buttons: ({ children }: TModalButtonProps) => React.JSX.Element;
|
|
28
|
-
export declare const Modal: {
|
|
29
|
-
Buttons: ({ children }: TModalButtonProps) => React.JSX.Element;
|
|
30
|
-
Content: ({ children, closeOnBackdropClick, focusTrap, value }: TModalContentProps) => React.JSX.Element;
|
|
31
|
-
Control: ({ children, value, ...rest }: TModalControlProps) => React.JSX.Element;
|
|
32
|
-
Header: ({ actionButtonProps, onClick, title, variant }: TModalHeaderProps) => React.JSX.Element;
|
|
33
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React, { ChangeEventHandler, DetailedHTMLProps, InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { FieldValues, Path } from 'react-hook-form';
|
|
3
|
-
export type TPhoneFieldProps<T extends FieldValues> = {
|
|
4
|
-
className?: string;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
helper?: {
|
|
7
|
-
message: ReactNode | string;
|
|
8
|
-
};
|
|
9
|
-
id: string;
|
|
10
|
-
name: Path<T>;
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
};
|
|
13
|
-
export declare const PhoneField: <T extends FieldValues>(props: TPhoneFieldProps<T>) => React.JSX.Element;
|
|
14
|
-
export type TNativeCountrySelectProps = {
|
|
15
|
-
id: string;
|
|
16
|
-
missing?: boolean;
|
|
17
|
-
onChange?: ChangeEventHandler<HTMLSelectElement>;
|
|
18
|
-
} & DetailedHTMLProps<InputHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
|
|
19
|
-
export type TNativeInputProps = {
|
|
20
|
-
className?: string;
|
|
21
|
-
error?: {
|
|
22
|
-
message: string;
|
|
23
|
-
};
|
|
24
|
-
id: string;
|
|
25
|
-
missing?: boolean;
|
|
26
|
-
placeholder: string;
|
|
27
|
-
} & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
28
|
-
export declare const NativePhoneField: {
|
|
29
|
-
CountrySelect: React.ForwardRefExoticComponent<Omit<TNativeCountrySelectProps, "ref"> & React.RefAttributes<HTMLSelectElement>>;
|
|
30
|
-
Input: React.ForwardRefExoticComponent<Omit<TNativeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
31
|
-
Root: ({ children }: {
|
|
32
|
-
children: ReactNode;
|
|
33
|
-
}) => React.JSX.Element;
|
|
34
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { OTPInputProps } from 'input-otp';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { FieldValues, Path } from 'react-hook-form';
|
|
4
|
-
export interface TPinInputProps<T extends FieldValues> {
|
|
5
|
-
isNumeric?: boolean;
|
|
6
|
-
isOTP?: boolean;
|
|
7
|
-
isPassword?: boolean;
|
|
8
|
-
label: string;
|
|
9
|
-
length: number;
|
|
10
|
-
name: Path<T>;
|
|
11
|
-
}
|
|
12
|
-
export declare const PinInput: <T extends FieldValues>(props: TPinInputProps<T>) => React.JSX.Element;
|
|
13
|
-
export declare const OTPInput: (props: Pick<OTPInputProps, "inputMode" | "onChange" | "onComplete" | "value">) => React.JSX.Element;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as RadixRadioGroup from '@radix-ui/react-radio-group';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { FieldError, FieldValues, Path } from 'react-hook-form';
|
|
4
|
-
export type TRadioGroupProps<T extends FieldValues> = {
|
|
5
|
-
error?: FieldError;
|
|
6
|
-
label: string;
|
|
7
|
-
name: Path<T>;
|
|
8
|
-
variant?: 'cards' | 'circle';
|
|
9
|
-
} & Omit<RadixRadioGroup.RadioGroupProps, 'name'>;
|
|
10
|
-
export declare const RadioGroup: {
|
|
11
|
-
Indicator: ({ className, ...props }: RadixRadioGroup.RadioGroupIndicatorProps) => React.JSX.Element;
|
|
12
|
-
Item: ({ children, className, variant, ...props }: {
|
|
13
|
-
variant?: "cards" | "circle";
|
|
14
|
-
} & RadixRadioGroup.RadioGroupItemProps) => React.JSX.Element;
|
|
15
|
-
Root: <T extends FieldValues>({ children, className, disabled, label, name, variant, ...props }: TRadioGroupProps<T>) => React.JSX.Element;
|
|
16
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React, { DetailedHTMLProps, OptionHTMLAttributes, ReactNode, SelectHTMLAttributes } from 'react';
|
|
2
|
-
import { FieldValues, Path } from 'react-hook-form';
|
|
3
|
-
export type TItem = {
|
|
4
|
-
id: string;
|
|
5
|
-
title: string;
|
|
6
|
-
};
|
|
7
|
-
export type TSelectProps<T extends FieldValues> = {
|
|
8
|
-
children?: ReactNode;
|
|
9
|
-
defaultValue?: string;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
helper?: {
|
|
12
|
-
message: string;
|
|
13
|
-
};
|
|
14
|
-
id: string;
|
|
15
|
-
items?: {
|
|
16
|
-
id: string;
|
|
17
|
-
props?: OptionHTMLAttributes<HTMLOptionElement>;
|
|
18
|
-
title: string;
|
|
19
|
-
}[];
|
|
20
|
-
label: string;
|
|
21
|
-
missing?: boolean;
|
|
22
|
-
name: Path<T>;
|
|
23
|
-
placeholder?: string;
|
|
24
|
-
};
|
|
25
|
-
export declare const Select: <T extends FieldValues>(props: TSelectProps<T>) => React.JSX.Element;
|
|
26
|
-
export type TNativeSelectProps = {
|
|
27
|
-
error?: {
|
|
28
|
-
message: string;
|
|
29
|
-
};
|
|
30
|
-
helper?: {
|
|
31
|
-
message: string;
|
|
32
|
-
};
|
|
33
|
-
id: string;
|
|
34
|
-
items: Array<{
|
|
35
|
-
id: string;
|
|
36
|
-
title: string;
|
|
37
|
-
}>;
|
|
38
|
-
label: string;
|
|
39
|
-
missing?: boolean;
|
|
40
|
-
placeholder?: string;
|
|
41
|
-
} & Omit<DetailedHTMLProps<SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, 'children'>;
|
|
42
|
-
export declare const NativeSelect: React.ForwardRefExoticComponent<Omit<TNativeSelectProps, "ref"> & React.RefAttributes<HTMLSelectElement>>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
export declare const TableRoot: ({ children }: PropsWithChildren) => React.JSX.Element;
|
|
3
|
-
export declare const TableHead: ({ children }: PropsWithChildren) => React.JSX.Element;
|
|
4
|
-
export declare const TableHeader: ({ children }: PropsWithChildren) => React.JSX.Element;
|
|
5
|
-
export declare const TableBody: ({ children }: PropsWithChildren) => React.JSX.Element;
|
|
6
|
-
export declare const TableRow: ({ children }: PropsWithChildren) => React.JSX.Element;
|
|
7
|
-
export declare const TableData: ({ children }: PropsWithChildren) => React.JSX.Element;
|
|
8
|
-
export declare const TableFooter: ({ children }: PropsWithChildren) => React.JSX.Element;
|
|
9
|
-
export declare const Table: {
|
|
10
|
-
Body: ({ children }: PropsWithChildren) => React.JSX.Element;
|
|
11
|
-
Data: ({ children }: PropsWithChildren) => React.JSX.Element;
|
|
12
|
-
Footer: ({ children }: PropsWithChildren) => React.JSX.Element;
|
|
13
|
-
Head: ({ children }: PropsWithChildren) => React.JSX.Element;
|
|
14
|
-
Header: ({ children }: PropsWithChildren) => React.JSX.Element;
|
|
15
|
-
Root: ({ children }: PropsWithChildren) => React.JSX.Element;
|
|
16
|
-
Row: ({ children }: PropsWithChildren) => React.JSX.Element;
|
|
17
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React, { DetailedHTMLProps, InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { FieldValues, Path } from 'react-hook-form';
|
|
3
|
-
export type TTextFieldProps<T extends FieldValues> = {
|
|
4
|
-
className?: string;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
disableError?: boolean;
|
|
7
|
-
helper?: {
|
|
8
|
-
message: ReactNode | string;
|
|
9
|
-
};
|
|
10
|
-
id: string;
|
|
11
|
-
label: string;
|
|
12
|
-
missing?: boolean;
|
|
13
|
-
name: Path<T>;
|
|
14
|
-
prefix?: ReactNode | string;
|
|
15
|
-
rightContent?: ReactNode | string;
|
|
16
|
-
suffix?: ReactNode | string;
|
|
17
|
-
type?: DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>['type'];
|
|
18
|
-
} & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
19
|
-
export declare const TextField: React.ForwardRefExoticComponent<Omit<TTextFieldProps<FieldValues>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
20
|
-
export type TNativeTextFieldProps = {
|
|
21
|
-
className?: string;
|
|
22
|
-
error?: {
|
|
23
|
-
message: string;
|
|
24
|
-
};
|
|
25
|
-
helper?: {
|
|
26
|
-
message: ReactNode | string;
|
|
27
|
-
};
|
|
28
|
-
id: string;
|
|
29
|
-
label: string;
|
|
30
|
-
missing?: boolean;
|
|
31
|
-
prefix?: ReactNode | string;
|
|
32
|
-
rightContent?: ReactNode | string;
|
|
33
|
-
suffix?: ReactNode | string;
|
|
34
|
-
} & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
35
|
-
export declare const NativeTextField: React.ForwardRefExoticComponent<Omit<TNativeTextFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TIconProps } from '../Icon';
|
|
3
|
-
export type TToastRootProps = {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
};
|
|
6
|
-
export type TToastTitleProps = {
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
className?: string;
|
|
9
|
-
};
|
|
10
|
-
export type TToastDescriptionProps = {
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
};
|
|
13
|
-
export type TToastIconProps = TIconProps;
|
|
14
|
-
export declare const Toast: {
|
|
15
|
-
Description: ({ children }: TToastDescriptionProps) => React.JSX.Element;
|
|
16
|
-
Icon: (props: TToastIconProps) => React.JSX.Element;
|
|
17
|
-
Root: ({ children }: TToastRootProps) => React.JSX.Element;
|
|
18
|
-
Title: ({ children, className }: TToastTitleProps) => React.JSX.Element;
|
|
19
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type TFieldHelperProps = {
|
|
3
|
-
helper: {
|
|
4
|
-
message: string;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* The id of the field helper this is required and expected to be used in conjunction with describeBy on the input field
|
|
8
|
-
* so they are associated..
|
|
9
|
-
*/
|
|
10
|
-
id: string;
|
|
11
|
-
};
|
|
12
|
-
export declare const FieldHelper: ({ helper, id }: TFieldHelperProps) => React.JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
export type TFormFieldProps = {
|
|
3
|
-
children: ReactNode;
|
|
4
|
-
error?: string;
|
|
5
|
-
helper?: ReactNode | string;
|
|
6
|
-
hideLabel?: boolean;
|
|
7
|
-
id: string;
|
|
8
|
-
label?: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const FormField: ({ children, error, helper, hideLabel, id, label }: TFormFieldProps) => React.JSX.Element;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import * as z from 'zod';
|
|
3
|
-
export declare const exampleSchema: z.ZodObject<{
|
|
4
|
-
datePicker: z.ZodDate;
|
|
5
|
-
disclosureTextField: z.ZodString;
|
|
6
|
-
numberField: z.ZodNumber;
|
|
7
|
-
processor: z.ZodString;
|
|
8
|
-
radioGroup: z.ZodString;
|
|
9
|
-
range: z.ZodNumber;
|
|
10
|
-
select: z.ZodString;
|
|
11
|
-
textField: z.ZodString;
|
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
select: string;
|
|
14
|
-
radioGroup: string;
|
|
15
|
-
range: number;
|
|
16
|
-
disclosureTextField: string;
|
|
17
|
-
numberField: number;
|
|
18
|
-
textField: string;
|
|
19
|
-
datePicker: Date;
|
|
20
|
-
processor: string;
|
|
21
|
-
}, {
|
|
22
|
-
select: string;
|
|
23
|
-
radioGroup: string;
|
|
24
|
-
range: number;
|
|
25
|
-
disclosureTextField: string;
|
|
26
|
-
numberField: number;
|
|
27
|
-
textField: string;
|
|
28
|
-
datePicker: Date;
|
|
29
|
-
processor: string;
|
|
30
|
-
}>;
|
|
31
|
-
export type TFormExample = {
|
|
32
|
-
disabled?: boolean;
|
|
33
|
-
values: {
|
|
34
|
-
currencyField?: string;
|
|
35
|
-
datePicker?: string;
|
|
36
|
-
disclosureTextField?: string;
|
|
37
|
-
numberField?: number;
|
|
38
|
-
processor?: string;
|
|
39
|
-
radioGroup?: string;
|
|
40
|
-
range?: number;
|
|
41
|
-
select?: string;
|
|
42
|
-
textField?: string;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
export declare const FormExample: ({ disabled, values }: TFormExample) => React.JSX.Element;
|