@ssa-ui-kit/core 0.0.24-alpha → 0.0.26-alpha
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/components/AccordionGroup/AccordionContext.d.ts +3 -3
- package/dist/components/AccordionGroup/types.d.ts +1 -1
- package/dist/components/Badge/helpers.d.ts +2 -2
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/ButtonText.d.ts +6 -6
- package/dist/components/Button/fixtures.d.ts +6 -6
- package/dist/components/Button/helpers.d.ts +2 -2
- package/dist/components/Button/types.d.ts +5 -5
- package/dist/components/Checkbox/Checkbox.d.ts +2 -2
- package/dist/components/Checkbox/CheckboxBase.d.ts +2 -2
- package/dist/components/Checkbox/types.d.ts +2 -2
- package/dist/components/Dropdown/Dropdown.d.ts +3 -3
- package/dist/components/Dropdown/types.d.ts +3 -3
- package/dist/components/DropdownOption/DropdownOption.d.ts +2 -2
- package/dist/components/DropdownOptions/DropdownOptions.d.ts +2 -2
- package/dist/components/DropdownOptions/index.d.ts +1 -1
- package/dist/components/DropdownOptions/types.d.ts +2 -2
- package/dist/components/DropdownToggle/DropdownToggle.d.ts +3 -3
- package/dist/components/DropdownToggle/types.d.ts +1 -1
- package/dist/components/FormCheckbox/FormCheckbox.d.ts +2 -2
- package/dist/components/FormCheckbox/types.d.ts +2 -2
- package/dist/components/FormHelperText/FormHelperText.d.ts +2 -2
- package/dist/components/FormHelperText/types.d.ts +1 -1
- package/dist/components/FormRadioGroup/FormRadioGroup.d.ts +2 -2
- package/dist/components/FormRadioGroup/types.d.ts +2 -2
- package/dist/components/Icon/types.d.ts +2 -2
- package/dist/components/LargeTab/LargeTab.d.ts +2 -2
- package/dist/components/LargeTab/LargeTabBase.d.ts +2 -2
- package/dist/components/MultipleDropdown/MultipleDropdown.context.d.ts +3 -3
- package/dist/components/MultipleDropdown/MultipleDropdown.d.ts +3 -3
- package/dist/components/MultipleDropdown/types.d.ts +3 -3
- package/dist/components/MultipleDropdown/utils.d.ts +2 -2
- package/dist/components/MultipleDropdownOptions/MultipleDropdownOptions.d.ts +2 -2
- package/dist/components/MultipleDropdownOptions/index.d.ts +1 -1
- package/dist/components/MultipleDropdownOptions/types.d.ts +2 -2
- package/dist/components/Popover/PopoverTrigger.d.ts +2 -2
- package/dist/components/Radio/Radio.d.ts +2 -2
- package/dist/components/Radio/types.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
- package/dist/components/RadioGroup/types.d.ts +3 -3
- package/dist/components/ResponsiveImage/ResponsiveImage.d.ts +2 -2
- package/dist/components/ResponsiveImage/types.d.ts +1 -1
- package/dist/components/Switch/Switch.d.ts +2 -2
- package/dist/components/Switch/SwitchContext.d.ts +3 -3
- package/dist/components/Switch/types.d.ts +1 -1
- package/dist/components/Tab/Tab.d.ts +2 -2
- package/dist/components/Tab/TabBase.d.ts +2 -2
- package/dist/components/TabBar/TabBar.d.ts +2 -2
- package/dist/components/TabBar/TabBarContext.d.ts +4 -4
- package/dist/components/TabBar/stories/helpers.d.ts +2 -2
- package/dist/components/TabBar/types.d.ts +9 -11
- package/dist/components/Tooltip/ProgressChartTooltip.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.d.ts +2 -2
- package/dist/components/Tooltip/types.d.ts +12 -14
- package/dist/components/Tooltip/utils.d.ts +2 -2
- package/dist/components/TooltipContent/TooltipContent.d.ts +2 -2
- package/dist/components/TooltipContent/index.d.ts +0 -1
- package/dist/components/TooltipTrigger/TooltipTrigger.d.ts +2 -2
- package/dist/components/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -5
- package/src/components/AccordionGroup/AccordionContext.tsx +4 -4
- package/src/components/AccordionGroup/types.ts +1 -1
- package/src/components/Badge/helpers.ts +18 -16
- package/src/components/Button/Button.spec.tsx +8 -8
- package/src/components/Button/Button.tsx +3 -3
- package/src/components/Button/ButtonText.tsx +6 -6
- package/src/components/Button/fixtures.ts +14 -14
- package/src/components/Button/helpers.ts +2 -2
- package/src/components/Button/types.ts +5 -5
- package/src/components/Checkbox/Checkbox.spec.tsx +2 -2
- package/src/components/Checkbox/Checkbox.stories.tsx +2 -2
- package/src/components/Checkbox/Checkbox.tsx +2 -2
- package/src/components/Checkbox/CheckboxBase.tsx +2 -2
- package/src/components/Checkbox/types.ts +2 -2
- package/src/components/Dropdown/Dropdown.stories.tsx +3 -3
- package/src/components/Dropdown/Dropdown.tsx +4 -4
- package/src/components/Dropdown/types.ts +4 -3
- package/src/components/DropdownOption/DropdownOption.tsx +2 -2
- package/src/components/DropdownOptions/DropdownOptions.tsx +2 -2
- package/src/components/DropdownOptions/index.ts +1 -1
- package/src/components/DropdownOptions/types.ts +2 -2
- package/src/components/DropdownToggle/DropdownToggle.tsx +3 -3
- package/src/components/DropdownToggle/types.ts +1 -1
- package/src/components/FormCheckbox/FormCheckbox.tsx +2 -2
- package/src/components/FormCheckbox/types.ts +3 -3
- package/src/components/FormHelperText/FormHelperText.tsx +2 -2
- package/src/components/FormHelperText/types.ts +1 -1
- package/src/components/FormRadioGroup/FormRadioGroup.stories.tsx +2 -2
- package/src/components/FormRadioGroup/FormRadioGroup.tsx +2 -2
- package/src/components/FormRadioGroup/types.ts +3 -3
- package/src/components/Icon/Icons.spec.tsx +6 -6
- package/src/components/Icon/icons/index.tsx +3 -3
- package/src/components/Icon/types.ts +2 -2
- package/src/components/LargeTab/LargeTab.tsx +2 -2
- package/src/components/LargeTab/LargeTabBase.tsx +2 -2
- package/src/components/MultipleDropdown/MultipleDropdown.context.ts +3 -3
- package/src/components/MultipleDropdown/MultipleDropdown.tsx +7 -7
- package/src/components/MultipleDropdown/types.ts +3 -3
- package/src/components/MultipleDropdown/utils.ts +2 -2
- package/src/components/MultipleDropdownOptions/MultipleDropdownOptions.tsx +2 -2
- package/src/components/MultipleDropdownOptions/index.ts +1 -1
- package/src/components/MultipleDropdownOptions/types.ts +2 -2
- package/src/components/Popover/PopoverTrigger.tsx +3 -3
- package/src/components/Radio/Radio.tsx +2 -2
- package/src/components/Radio/types.ts +1 -1
- package/src/components/RadioGroup/RadioGroup.tsx +2 -2
- package/src/components/RadioGroup/types.ts +3 -3
- package/src/components/ResponsiveImage/ResponsiveImage.tsx +2 -2
- package/src/components/ResponsiveImage/types.ts +1 -1
- package/src/components/Switch/Switch.tsx +2 -2
- package/src/components/Switch/SwitchContext.tsx +2 -2
- package/src/components/Switch/types.ts +1 -1
- package/src/components/Tab/Tab.tsx +2 -2
- package/src/components/Tab/TabBase.tsx +2 -3
- package/src/components/TabBar/TabBar.spec.tsx +5 -5
- package/src/components/TabBar/TabBar.tsx +2 -2
- package/src/components/TabBar/TabBarContext.tsx +6 -6
- package/src/components/TabBar/stories/helpers.tsx +4 -4
- package/src/components/TabBar/types.ts +9 -12
- package/src/components/Tooltip/ProgressChartTooltip.tsx +2 -2
- package/src/components/Tooltip/Tooltip.stories.tsx +14 -29
- package/src/components/Tooltip/Tooltip.tsx +2 -2
- package/src/components/Tooltip/types.ts +12 -14
- package/src/components/Tooltip/utils.tsx +2 -2
- package/src/components/TooltipContent/TooltipContent.tsx +6 -28
- package/src/components/TooltipContent/index.ts +0 -1
- package/src/components/TooltipTrigger/TooltipTrigger.tsx +2 -2
- package/src/components/index.ts +1 -1
- package/tsbuildcache +1 -1
- package/dist/components/TooltipContent/constants.d.ts +0 -1
- package/src/components/TooltipContent/constants.ts +0 -16
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export declare const AccordionGroupContext: import("react").Context<
|
|
4
|
-
export declare const useAccordionGroupContext: () =>
|
|
2
|
+
import { AccordionGroupContextProps } from './types';
|
|
3
|
+
export declare const AccordionGroupContext: import("react").Context<AccordionGroupContextProps>;
|
|
4
|
+
export declare const useAccordionGroupContext: () => AccordionGroupContextProps;
|
|
5
5
|
export declare const AccordionGroupContextProvider: ({ children, }: {
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -38,7 +38,7 @@ export interface AccordionViewProps extends AccordionProps {
|
|
|
38
38
|
children?: React.ReactNode;
|
|
39
39
|
contentProps?: Record<string, any>;
|
|
40
40
|
}
|
|
41
|
-
export interface
|
|
41
|
+
export interface AccordionGroupContextProps {
|
|
42
42
|
openedAccordions: Array<AccordionProps> | [];
|
|
43
43
|
stayOpen: boolean;
|
|
44
44
|
setOpenedAccordions: (accordions: Array<AccordionProps>) => void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { MapIconsType } from '../Icon/types';
|
|
3
3
|
export declare const sizes: Array<keyof MainSizes>;
|
|
4
4
|
export declare const colors: Array<keyof MainColors>;
|
|
5
5
|
export declare const icons: Array<{
|
|
6
6
|
color: keyof MainColors;
|
|
7
|
-
icon: keyof
|
|
7
|
+
icon: keyof MapIconsType;
|
|
8
8
|
}>;
|
|
9
9
|
export declare const HeaderTitle: import("@emotion/styled").StyledComponent<{
|
|
10
10
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export declare const Button: import("react").ForwardRefExoticComponent<
|
|
2
|
+
import { ButtonProps } from './types';
|
|
3
|
+
export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
4
|
export default Button;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const ButtonText: ({ text, className, testId }:
|
|
3
|
-
export declare const WhiteButtonText: ({ text }:
|
|
4
|
-
export declare const GreyButtonText: ({ text }:
|
|
5
|
-
export declare const GreyLightButtonText: ({ text }:
|
|
6
|
-
export declare const DisabledButtonText: ({ text }:
|
|
1
|
+
import { ColoredButtonTextProps, ButtonTextProps } from './types';
|
|
2
|
+
export declare const ButtonText: ({ text, className, testId }: ButtonTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const WhiteButtonText: ({ text }: ColoredButtonTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const GreyButtonText: ({ text }: ColoredButtonTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const GreyLightButtonText: ({ text }: ColoredButtonTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const DisabledButtonText: ({ text }: ColoredButtonTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import Icon from '../Icon';
|
|
3
|
-
import {
|
|
4
|
-
export type TestPropsType = Omit<
|
|
3
|
+
import { ButtonProps } from './types';
|
|
4
|
+
export type TestPropsType = Omit<ButtonProps, 'isDisabled' | 'startIcon' | 'endIcon'> & {
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
startIcon?: React.ComponentProps<typeof Icon>['name'];
|
|
7
7
|
endIcon?: React.ComponentProps<typeof Icon>['name'];
|
|
8
8
|
};
|
|
9
9
|
export declare const primaryBtnSpecs: TestPropsType[];
|
|
10
10
|
export declare const secondaryBtnSpecs: {
|
|
11
|
-
variant: keyof import("./types").
|
|
11
|
+
variant: keyof import("./types").ButtonVariants | "custom" | undefined;
|
|
12
12
|
text?: string | undefined;
|
|
13
13
|
size?: keyof MainSizes | undefined;
|
|
14
14
|
'aria-labelledby'?: string | undefined;
|
|
@@ -27,7 +27,7 @@ export declare const secondaryBtnSpecs: {
|
|
|
27
27
|
endIcon?: "filter" | "circle" | "search" | "visible" | "diet" | "calendar" | "home" | "stats" | "sleep" | "trainings" | "measurements" | "settings" | "plus" | "minus" | "more" | "more-vertical" | "check" | "check-circle" | "cross" | "user" | "union" | "notification" | "information" | "warning" | "attention" | "invisible" | "log-out" | "log-in" | "email" | "lock" | "carrot-down" | "carrot-up" | "carrot-left" | "carrot-right" | "radio-on" | "arrow-up" | "arrow-down" | "archive" | "bin" | "change" | "copy" | "robot" | "chart" | "clock" | "unarchive" | "cogwheel" | "circular" | "ban-user" | "confirm-email" | "unlock" | undefined;
|
|
28
28
|
}[];
|
|
29
29
|
export declare const tertiaryBtnSpecs: {
|
|
30
|
-
variant: keyof import("./types").
|
|
30
|
+
variant: keyof import("./types").ButtonVariants | "custom" | undefined;
|
|
31
31
|
text?: string | undefined;
|
|
32
32
|
size?: keyof MainSizes | undefined;
|
|
33
33
|
'aria-labelledby'?: string | undefined;
|
|
@@ -46,7 +46,7 @@ export declare const tertiaryBtnSpecs: {
|
|
|
46
46
|
endIcon?: "filter" | "circle" | "search" | "visible" | "diet" | "calendar" | "home" | "stats" | "sleep" | "trainings" | "measurements" | "settings" | "plus" | "minus" | "more" | "more-vertical" | "check" | "check-circle" | "cross" | "user" | "union" | "notification" | "information" | "warning" | "attention" | "invisible" | "log-out" | "log-in" | "email" | "lock" | "carrot-down" | "carrot-up" | "carrot-left" | "carrot-right" | "radio-on" | "arrow-up" | "arrow-down" | "archive" | "bin" | "change" | "copy" | "robot" | "chart" | "clock" | "unarchive" | "cogwheel" | "circular" | "ban-user" | "confirm-email" | "unlock" | undefined;
|
|
47
47
|
}[];
|
|
48
48
|
export declare const infoBtnSpecs: {
|
|
49
|
-
variant: keyof import("./types").
|
|
49
|
+
variant: keyof import("./types").ButtonVariants | "custom" | undefined;
|
|
50
50
|
text?: string | undefined;
|
|
51
51
|
size?: keyof MainSizes | undefined;
|
|
52
52
|
'aria-labelledby'?: string | undefined;
|
|
@@ -65,7 +65,7 @@ export declare const infoBtnSpecs: {
|
|
|
65
65
|
endIcon?: "filter" | "circle" | "search" | "visible" | "diet" | "calendar" | "home" | "stats" | "sleep" | "trainings" | "measurements" | "settings" | "plus" | "minus" | "more" | "more-vertical" | "check" | "check-circle" | "cross" | "user" | "union" | "notification" | "information" | "warning" | "attention" | "invisible" | "log-out" | "log-in" | "email" | "lock" | "carrot-down" | "carrot-up" | "carrot-left" | "carrot-right" | "radio-on" | "arrow-up" | "arrow-down" | "archive" | "bin" | "change" | "copy" | "robot" | "chart" | "clock" | "unarchive" | "cogwheel" | "circular" | "ban-user" | "confirm-email" | "unlock" | undefined;
|
|
66
66
|
}[];
|
|
67
67
|
export declare const attentionBtnSpecs: {
|
|
68
|
-
variant: keyof import("./types").
|
|
68
|
+
variant: keyof import("./types").ButtonVariants | "custom" | undefined;
|
|
69
69
|
text?: string | undefined;
|
|
70
70
|
size?: keyof MainSizes | undefined;
|
|
71
71
|
'aria-labelledby'?: string | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { ButtonVariants } from './types';
|
|
3
3
|
export declare const sizes: Array<keyof MainSizes>;
|
|
4
|
-
export declare const variants: Array<keyof
|
|
4
|
+
export declare const variants: Array<keyof ButtonVariants>;
|
|
5
5
|
export declare const HeaderTitle: import("@emotion/styled").StyledComponent<{
|
|
6
6
|
theme?: import("@emotion/react").Theme | undefined;
|
|
7
7
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -5,32 +5,32 @@ import { MouseEventHandler } from 'react';
|
|
|
5
5
|
* https://www.w3.org/WAI/ARIA/apg/patterns/button/
|
|
6
6
|
*/
|
|
7
7
|
type ButtonAriaProps = Pick<AriaAttributes, 'aria-labelledby' | 'aria-label' | 'aria-describedby' | 'aria-disabled' | 'aria-pressed' | 'aria-current'>;
|
|
8
|
-
export interface
|
|
8
|
+
export interface ButtonProps extends ButtonAriaProps {
|
|
9
9
|
block?: boolean;
|
|
10
10
|
size?: keyof MainSizes;
|
|
11
11
|
text?: string;
|
|
12
12
|
startIcon?: React.ReactNode;
|
|
13
13
|
endIcon?: React.ReactNode;
|
|
14
|
-
variant?: keyof
|
|
14
|
+
variant?: keyof ButtonVariants | 'custom';
|
|
15
15
|
type?: 'button' | 'reset' | 'submit';
|
|
16
16
|
isDisabled?: boolean;
|
|
17
17
|
className?: string;
|
|
18
18
|
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
19
19
|
children?: React.ReactNode;
|
|
20
20
|
}
|
|
21
|
-
export interface
|
|
21
|
+
export interface ButtonVariants {
|
|
22
22
|
primary: (theme: Theme) => SerializedStyles;
|
|
23
23
|
info: (theme: Theme) => SerializedStyles;
|
|
24
24
|
secondary: (theme: Theme) => SerializedStyles;
|
|
25
25
|
tertiary: (theme: Theme) => SerializedStyles;
|
|
26
26
|
attention: (theme: Theme) => SerializedStyles;
|
|
27
27
|
}
|
|
28
|
-
export type
|
|
28
|
+
export type ButtonTextProps = {
|
|
29
29
|
text: string;
|
|
30
30
|
className?: string;
|
|
31
31
|
testId?: string;
|
|
32
32
|
};
|
|
33
|
-
export type
|
|
33
|
+
export type ColoredButtonTextProps = Required<Pick<ButtonProps, 'size'>> & {
|
|
34
34
|
text: string;
|
|
35
35
|
};
|
|
36
36
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const Checkbox: ({ text, id, onChange, isDisabled, externalState, initialState, isIndeterminate, name, isRequired, ref, register, ...rest }:
|
|
1
|
+
import { CheckboxProps } from './types';
|
|
2
|
+
declare const Checkbox: ({ text, id, onChange, isDisabled, externalState, initialState, isIndeterminate, name, isRequired, ref, register, ...rest }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Checkbox;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CheckboxProps } from './types';
|
|
2
2
|
export declare const CheckboxBase: import("@emotion/styled").StyledComponent<import("../Label/types").LabelProps & {
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
} & Pick<
|
|
4
|
+
} & Pick<CheckboxProps, "color">, {}, {}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Control, FieldPath, FieldValues, UseFormReturn } from 'react-hook-form';
|
|
2
2
|
import { MutableRefObject } from 'react';
|
|
3
|
-
export interface
|
|
3
|
+
export interface CheckboxProps extends Partial<Pick<UseFormReturn, 'register'>> {
|
|
4
4
|
text?: string;
|
|
5
5
|
id?: string;
|
|
6
6
|
onChange?: (newState: boolean) => void;
|
|
@@ -15,7 +15,7 @@ export interface ICheckboxProps extends Partial<Pick<UseFormReturn, 'register'>>
|
|
|
15
15
|
as?: React.ElementType;
|
|
16
16
|
className?: string;
|
|
17
17
|
}
|
|
18
|
-
export type IFormCheckboxProps<T extends FieldValues> = Omit<
|
|
18
|
+
export type IFormCheckboxProps<T extends FieldValues> = Omit<CheckboxProps, 'onChange' | 'name'> & {
|
|
19
19
|
name: FieldPath<T>;
|
|
20
20
|
control: Control<T>;
|
|
21
21
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
declare const Dropdown: <T extends
|
|
1
|
+
import { DropdownOptionProps } from '../DropdownOptions/types';
|
|
2
|
+
import { DropdownProps } from './types';
|
|
3
|
+
declare const Dropdown: <T extends DropdownOptionProps>({ selectedItem, isDisabled, isOpen: isInitOpen, children, onChange: handleChange, className, }: DropdownProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default Dropdown;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { DropdownOptionProps } from '../DropdownOptions';
|
|
3
3
|
import { CommonProps } from '../../types/emotion';
|
|
4
|
-
export interface
|
|
4
|
+
export interface DropdownProps<P extends DropdownOptionProps> extends CommonProps {
|
|
5
5
|
selectedItem?: P;
|
|
6
6
|
onChange?: (item: P) => void;
|
|
7
7
|
isDisabled?: boolean;
|
|
@@ -12,5 +12,5 @@ export interface IDropdownProps<P extends IDropdownOption> extends CommonProps {
|
|
|
12
12
|
}
|
|
13
13
|
export interface DropdownContextType {
|
|
14
14
|
onChange: (item?: string) => void;
|
|
15
|
-
activeItem?:
|
|
15
|
+
activeItem?: DropdownOptionProps | null;
|
|
16
16
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Theme } from '@emotion/react';
|
|
3
3
|
import { CommonProps } from '../../types/emotion';
|
|
4
|
-
interface
|
|
4
|
+
interface DropdownItemProps extends CommonProps {
|
|
5
5
|
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
6
6
|
isActive?: boolean;
|
|
7
7
|
isMultiple?: boolean;
|
|
@@ -14,5 +14,5 @@ interface IDropdownItemProps extends CommonProps {
|
|
|
14
14
|
declare const DropdownOption: import("@emotion/styled").StyledComponent<{
|
|
15
15
|
theme?: Theme | undefined;
|
|
16
16
|
as?: React.ElementType<any> | undefined;
|
|
17
|
-
} &
|
|
17
|
+
} & DropdownItemProps, React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {}>;
|
|
18
18
|
export default DropdownOption;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const DropdownOptions: ({ ariaLabelledby, id, children, }:
|
|
1
|
+
import { DropdownItemsListProps } from './types';
|
|
2
|
+
declare const DropdownOptions: ({ ariaLabelledby, id, children, }: DropdownItemsListProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DropdownOptions;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from './DropdownOptions';
|
|
2
|
-
export type {
|
|
2
|
+
export type { DropdownOptionProps } from './types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CommonProps } from '../../types/emotion';
|
|
3
|
-
export type
|
|
4
|
-
export interface
|
|
3
|
+
export type DropdownOptionProps = Record<string, string | number>;
|
|
4
|
+
export interface DropdownItemsListProps extends CommonProps {
|
|
5
5
|
ariaLabelledby?: string;
|
|
6
6
|
id?: string;
|
|
7
7
|
children?: React.ReactNode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { DropdownToggleProps } from './types';
|
|
3
3
|
export declare const DropdownToggleBase: import("@emotion/styled").StyledComponent<{
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
5
|
as?: import("react").ElementType<any> | undefined;
|
|
6
|
-
} & Pick<
|
|
7
|
-
declare const DropdownToggle: ({ onClick, onFocus, isOpen, isMultiple, selectedCount, disabled, children, ariaLabelledby, ariaControls, colors, className, }:
|
|
6
|
+
} & Pick<DropdownToggleProps, "colors" | "disabled" | "isOpen" | "isMultiple" | "selectedCount">, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
7
|
+
declare const DropdownToggle: ({ onClick, onFocus, isOpen, isMultiple, selectedCount, disabled, children, ariaLabelledby, ariaControls, colors, className, }: DropdownToggleProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default DropdownToggle;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Theme } from '@emotion/react';
|
|
3
3
|
import { CommonProps } from '../../types/emotion';
|
|
4
|
-
export interface
|
|
4
|
+
export interface DropdownToggleProps extends CommonProps {
|
|
5
5
|
onClick: (e: React.MouseEvent<HTMLElement>) => void;
|
|
6
6
|
onFocus: (e: React.FocusEvent<HTMLButtonElement, Element>) => void;
|
|
7
7
|
isOpen: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { FieldValues } from 'react-hook-form';
|
|
2
|
-
import {
|
|
3
|
-
declare const FormCheckbox: <T extends FieldValues>({ control, name, isRequired, ...props }:
|
|
2
|
+
import { FormCheckboxProps } from './types';
|
|
3
|
+
declare const FormCheckbox: <T extends FieldValues>({ control, name, isRequired, ...props }: FormCheckboxProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default FormCheckbox;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Control, FieldPath, FieldValues } from 'react-hook-form';
|
|
2
|
-
import {
|
|
3
|
-
export type
|
|
2
|
+
import { CheckboxProps } from '../..';
|
|
3
|
+
export type FormCheckboxProps<T extends FieldValues> = Omit<CheckboxProps, 'onChange' | 'name'> & {
|
|
4
4
|
name: FieldPath<T>;
|
|
5
5
|
control: Control<T>;
|
|
6
6
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const FormHelperText: ({ role, status, disabled, children, }:
|
|
1
|
+
import { FormHelperTextProps } from './types';
|
|
2
|
+
declare const FormHelperText: ({ role, status, disabled, children, }: FormHelperTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default FormHelperText;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { FieldValues } from 'react-hook-form';
|
|
2
|
-
import {
|
|
3
|
-
declare const FormRadioGroup: <T extends FieldValues>({ name, isRequired, control, children, ...props }:
|
|
2
|
+
import { FormRadioGroupProps } from './types';
|
|
3
|
+
declare const FormRadioGroup: <T extends FieldValues>({ name, isRequired, control, children, ...props }: FormRadioGroupProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default FormRadioGroup;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FieldPath, Control, FieldValues } from 'react-hook-form';
|
|
2
|
-
import {
|
|
2
|
+
import { RadioGroupProps } from '../RadioGroup/types';
|
|
3
3
|
import { CommonProps } from '../../types/emotion';
|
|
4
|
-
export type
|
|
4
|
+
export type FormRadioGroupProps<T extends FieldValues> = Omit<RadioGroupProps, 'name' | 'onChange'> & {
|
|
5
5
|
name: FieldPath<T>;
|
|
6
6
|
control: Control<T>;
|
|
7
7
|
} & CommonProps;
|
|
@@ -4,8 +4,8 @@ export interface SVGProps extends React.SVGProps<SVGSVGElement> {
|
|
|
4
4
|
size?: number;
|
|
5
5
|
}
|
|
6
6
|
export interface IconProps extends Omit<SVGProps, 'fill'> {
|
|
7
|
-
name: keyof
|
|
7
|
+
name: keyof MapIconsType;
|
|
8
8
|
}
|
|
9
|
-
export type
|
|
9
|
+
export type MapIconsType = {
|
|
10
10
|
[key in (typeof iconsList)[number]]: React.ElementType;
|
|
11
11
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const LargeTab: ({ topText, bottomText, isActive, onClick, ariaControls, tabId, }:
|
|
1
|
+
import { LargeTabProps } from '../TabBar/types';
|
|
2
|
+
declare const LargeTab: ({ topText, bottomText, isActive, onClick, ariaControls, tabId, }: LargeTabProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default LargeTab;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { LargeTabProps } from '../TabBar/types';
|
|
3
3
|
export declare const LargeTabBase: import("@emotion/styled").StyledComponent<{
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
5
|
as?: import("react").ElementType<any> | undefined;
|
|
6
|
-
} & Pick<
|
|
6
|
+
} & Pick<LargeTabProps, "isActive">, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DropdownContextType } from './types';
|
|
3
|
-
import {
|
|
4
|
-
declare const MultipleDropdownContext: React.Context<DropdownContextType<
|
|
5
|
-
export declare function useMultipleDropdownContext(): DropdownContextType<
|
|
3
|
+
import { DropdownOptionType } from '../MultipleDropdownOptions';
|
|
4
|
+
declare const MultipleDropdownContext: React.Context<DropdownContextType<DropdownOptionType>>;
|
|
5
|
+
export declare function useMultipleDropdownContext(): DropdownContextType<DropdownOptionType>;
|
|
6
6
|
export default MultipleDropdownContext;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
declare const MultipleDropdown: React.ForwardRefExoticComponent<
|
|
2
|
+
import { DropdownOptionProps } from '../DropdownOptions/types';
|
|
3
|
+
import { DropdownProps } from './types';
|
|
4
|
+
declare const MultipleDropdown: React.ForwardRefExoticComponent<DropdownProps<DropdownOptionProps> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default MultipleDropdown;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export type
|
|
2
|
+
import { DropdownOptionProps } from '../DropdownOptions/types';
|
|
3
|
+
export type DropdownProps<P extends DropdownOptionProps> = {
|
|
4
4
|
selectedItems?: P[];
|
|
5
5
|
isMultiple?: boolean;
|
|
6
6
|
isDisabled?: boolean;
|
|
@@ -12,7 +12,7 @@ export type IDropdownProps<P extends IDropdownOption> = {
|
|
|
12
12
|
label?: string;
|
|
13
13
|
onChange?: (selectedItem: string | number, isSelected: boolean) => void;
|
|
14
14
|
};
|
|
15
|
-
export interface DropdownContextType<T extends
|
|
15
|
+
export interface DropdownContextType<T extends DropdownOptionProps> {
|
|
16
16
|
onChange: (item: T) => void;
|
|
17
17
|
isMultiple?: boolean;
|
|
18
18
|
allItems: Record<string | number, T>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DropdownOptionProps } from '../..';
|
|
2
2
|
interface GetActiveItems<T> {
|
|
3
3
|
allItems: T;
|
|
4
4
|
placeholder: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const getActiveItems: <T extends Record<string | number,
|
|
6
|
+
export declare const getActiveItems: <T extends Record<string | number, DropdownOptionProps>>({ allItems, placeholder, }: GetActiveItems<T>) => (Record<string | number, string | number> | NonNullable<string | number>)[];
|
|
7
7
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const MultipleDropdownOptions: ({ ariaLabelledby, id, children, }:
|
|
1
|
+
import { DropdownItemsListProps } from './types';
|
|
2
|
+
declare const MultipleDropdownOptions: ({ ariaLabelledby, id, children, }: DropdownItemsListProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default MultipleDropdownOptions;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from './MultipleDropdownOptions';
|
|
2
|
-
export type {
|
|
2
|
+
export type { DropdownOptionType } from './types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export type
|
|
3
|
-
export interface
|
|
2
|
+
export type DropdownOptionType = Record<string, string | number>;
|
|
3
|
+
export interface DropdownItemsListProps {
|
|
4
4
|
ariaLabelledby?: string;
|
|
5
5
|
id?: string;
|
|
6
6
|
children?: React.ReactNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { ButtonProps } from '../Button/types';
|
|
2
3
|
import { PopoverTriggerProps } from './types';
|
|
3
|
-
|
|
4
|
-
export declare const PopoverTrigger: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLElement> & IButtonProps & PopoverTriggerProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
4
|
+
export declare const PopoverTrigger: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLElement> & ButtonProps & PopoverTriggerProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const Radio: ({ id, name, value, isChecked, isDisabled, isRequired, onChange, text, className, }:
|
|
1
|
+
import { RadioProps } from './types';
|
|
2
|
+
declare const Radio: ({ id, name, value, isChecked, isDisabled, isRequired, onChange, text, className, }: RadioProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Radio;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const RadioGroup: ({ name, isRequired, initialState, onChange, children, className, }:
|
|
1
|
+
import { RadioGroupProps } from './types';
|
|
2
|
+
declare const RadioGroup: ({ name, isRequired, initialState, onChange, children, className, }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default RadioGroup;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
2
|
+
import { RadioProps } from '../Radio/types';
|
|
3
|
+
export interface RadioGroupProps {
|
|
4
4
|
name: string;
|
|
5
5
|
isRequired?: boolean;
|
|
6
6
|
initialState?: string;
|
|
7
7
|
className?: string;
|
|
8
8
|
onChange: (value: string) => void;
|
|
9
|
-
children: React.ReactElement<
|
|
9
|
+
children: React.ReactElement<RadioProps>[];
|
|
10
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ResponsiveImageProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* A simple wrapper over the `<img />` tag.
|
|
4
4
|
*
|
|
@@ -6,5 +6,5 @@ import { IResponsiveImageProps } from './types';
|
|
|
6
6
|
* when testing srcSet, and use Hard Reload to force the
|
|
7
7
|
* browser to load an image of another resolution.
|
|
8
8
|
* */
|
|
9
|
-
declare const ResponsiveImage: ({ src, alt, ...props }:
|
|
9
|
+
declare const ResponsiveImage: ({ src, alt, ...props }: ResponsiveImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default ResponsiveImage;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const Switch: ({ label, isDisabled }:
|
|
1
|
+
import { SwitchProps } from './types';
|
|
2
|
+
declare const Switch: ({ label, isDisabled }: SwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Switch;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export interface
|
|
2
|
+
export interface SwitchContext {
|
|
3
3
|
isOn: boolean;
|
|
4
4
|
toggle: () => void;
|
|
5
5
|
}
|
|
6
|
-
export declare const SwitchContext: import("react").Context<
|
|
7
|
-
export declare const useSwitchContext: () =>
|
|
6
|
+
export declare const SwitchContext: import("react").Context<SwitchContext>;
|
|
7
|
+
export declare const useSwitchContext: () => SwitchContext;
|
|
8
8
|
export declare const SwitchContextProvider: ({ initialState, children, }: {
|
|
9
9
|
initialState?: boolean | undefined;
|
|
10
10
|
children: React.ReactNode;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const Tab: ({ onClick, isActive, text, ariaControls, tabId, }:
|
|
1
|
+
import { SmallTabProps } from '../TabBar/types';
|
|
2
|
+
declare const Tab: ({ onClick, isActive, text, ariaControls, tabId, }: SmallTabProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Tab;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { SmallTabProps } from '../TabBar/types';
|
|
3
3
|
export declare const TabBase: import("@emotion/styled").StyledComponent<{
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
5
|
as?: import("react").ElementType<any> | undefined;
|
|
6
|
-
} & Pick<
|
|
6
|
+
} & Pick<SmallTabProps, "isActive">, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TabBarProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* This component doesn't show contents of the selected tab,
|
|
4
4
|
* however it accepts a required `renderContent()` render
|
|
@@ -6,5 +6,5 @@ import { ITabBarProps } from './types';
|
|
|
6
6
|
* component to decide where to render the contents of the
|
|
7
7
|
* selected tab.
|
|
8
8
|
* */
|
|
9
|
-
declare const TabBar: ({ children }:
|
|
9
|
+
declare const TabBar: ({ children }: TabBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default TabBar;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export declare const TabBarContext: import("react").Context<
|
|
4
|
-
export declare const useTabBarContext: () =>
|
|
2
|
+
import { TabProps, TabBarContextProps } from './types';
|
|
3
|
+
export declare const TabBarContext: import("react").Context<TabBarContextProps>;
|
|
4
|
+
export declare const useTabBarContext: () => TabBarContextProps;
|
|
5
5
|
export declare const TabBarContextProvider: ({ initialTab, children, }: {
|
|
6
|
-
initialTab?:
|
|
6
|
+
initialTab?: TabProps | undefined;
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ITab } from '../types';
|
|
3
|
-
import TabBar from '../TabBar';
|
|
4
2
|
import { DecoratorFunction } from '@storybook/types';
|
|
3
|
+
import TabBar from '../TabBar';
|
|
4
|
+
import { TabProps } from '../types';
|
|
5
5
|
type Args = Parameters<typeof TabBar>[0];
|
|
6
6
|
export declare const TabBarWrapper: ({ children, selectedTabId, renderContent, }: {
|
|
7
7
|
children: React.ReactNode;
|