@itcase/ui 1.9.51 → 1.9.52
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/{Avatar_cjs_CZ0XJ6d2.js → Avatar_cjs_CvbURI0f.js} +1 -1
- package/dist/{Avatar_es_B2gMldVe.js → Avatar_es_CV-ffIJu.js} +1 -1
- package/dist/{ChipsGroup_cjs_D0xy5I4S.js → ChipsGroup_cjs_CE-nNENH.js} +2 -4
- package/dist/{ChipsGroup_es_C_dgXLfC.js → ChipsGroup_es_CxqwFgoo.js} +2 -4
- package/dist/{Image_cjs_C_FMjUjx.js → Image_cjs_Hvjp2QDB.js} +2 -2
- package/dist/{Image_es_Ca7UQOkj.js → Image_es_DpOCNWpn.js} +2 -2
- package/dist/{SelectContainer_cjs_DshFNYWN.js → SelectContainer_cjs_qWAMLIkz.js} +5 -5
- package/dist/{SelectContainer_es_BQ3-SqL2.js → SelectContainer_es_kRH4DsEh.js} +5 -5
- package/dist/cjs/components/Avatar.js +2 -2
- package/dist/cjs/components/AvatarStack.js +2 -2
- package/dist/cjs/components/Checkbox.js +47 -50
- package/dist/cjs/components/Checkmark.js +31 -6
- package/dist/cjs/components/Chips.js +1 -1
- package/dist/cjs/components/DatePeriod.js +8 -8
- package/dist/cjs/components/DatePicker.js +4 -4
- package/dist/cjs/components/Drawer.js +23 -24
- package/dist/cjs/components/Image.js +1 -1
- package/dist/cjs/components/InputPassword.js +1 -1
- package/dist/cjs/components/Select/stories/__mock__.js +4 -4
- package/dist/cjs/components/Select.js +2 -2
- package/dist/cjs/components/Tile.js +2 -1
- package/dist/cjs/context/Notifications.js +1 -1
- package/dist/cjs/context/UIContext.js +7 -1
- package/dist/cjs/hooks/useActiveClasses/useActiveClasses.helpers.js +9 -9
- package/dist/cjs/hooks/useActiveClasses/useActiveClasses.js +3 -3
- package/dist/cjs/hooks/useStyles/styleAttributes.js +166 -43
- package/dist/cjs/hooks/useStyles/useStyles.js +169 -155
- package/dist/cjs/utils/mergeAppearanceKeys.js +14 -1
- package/dist/components/Avatar.js +2 -2
- package/dist/components/AvatarStack.js +2 -2
- package/dist/components/Checkbox.js +47 -50
- package/dist/components/Checkmark.js +31 -6
- package/dist/components/Chips.js +1 -1
- package/dist/components/DatePeriod.js +8 -8
- package/dist/components/DatePicker.js +4 -4
- package/dist/components/Drawer.js +23 -24
- package/dist/components/Image.js +1 -1
- package/dist/components/InputPassword.js +1 -1
- package/dist/components/Select/stories/__mock__.js +4 -4
- package/dist/components/Select.js +2 -2
- package/dist/components/Tile.js +2 -1
- package/dist/context/Notifications.js +1 -1
- package/dist/context/UIContext.js +7 -1
- package/dist/css/styles/bundles.css +102 -97
- package/dist/hooks/useActiveClasses/useActiveClasses.helpers.js +9 -9
- package/dist/hooks/useActiveClasses/useActiveClasses.js +3 -3
- package/dist/hooks/useStyles/styleAttributes.js +166 -43
- package/dist/hooks/useStyles/useStyles.js +169 -155
- package/dist/types/components/Avatar/Avatar.interface.d.ts +2 -2
- package/dist/types/components/AvatarStack/AvatarStack.interface.d.ts +9 -15
- package/dist/types/components/Breadcrumbs/Breadcrumbs.interface.d.ts +9 -8
- package/dist/types/components/Checkbox/Checkbox.interface.d.ts +3 -3
- package/dist/types/components/Checkbox/appearance/checkboxShape.d.ts +3 -0
- package/dist/types/components/Checkmark/Checkmark.interface.d.ts +8 -2
- package/dist/types/components/Checkmark/appearance/checkmarkError.d.ts +3 -0
- package/dist/types/components/Checkmark/stories/CheckmarkError.stories.d.ts +23 -0
- package/dist/types/components/Chips/Chips.interface.d.ts +2 -2
- package/dist/types/components/DatePeriod/DatePeriod.interface.d.ts +20 -19
- package/dist/types/components/DatePeriod/stories/DatePeriodSize.stories.d.ts +3 -0
- package/dist/types/components/DatePicker/DatePicker.interface.d.ts +4 -3
- package/dist/types/components/HeroTitle/HeroTitle.interface.d.ts +1 -1
- package/dist/types/components/Link/Link.interface.d.ts +1 -1
- package/dist/types/components/List/List.interface.d.ts +1 -1
- package/dist/types/components/Loader/Loader.interface.d.ts +4 -3
- package/dist/types/components/MenuItem/MenuItem.interface.d.ts +1 -1
- package/dist/types/components/Notification/Notification.interface.d.ts +2 -2
- package/dist/types/components/Search/Search.interface.d.ts +10 -9
- package/dist/types/components/Search/SearchInput.d.ts +7 -7
- package/dist/types/components/Search/stories/SearchInputDefault.stories.d.ts +7 -7
- package/dist/types/components/Search/stories/SearchInputDemo.stories.d.ts +7 -7
- package/dist/types/components/Search/stories/SearchInputDisabled.stories.d.ts +7 -7
- package/dist/types/components/Search/stories/SearchInputError.stories.d.ts +7 -7
- package/dist/types/components/Search/stories/SearchInputRequire.stories.d.ts +7 -7
- package/dist/types/components/Search/stories/SearchInputShape.stories.d.ts +7 -7
- package/dist/types/components/Search/stories/SearchInputSize.stories.d.ts +7 -7
- package/dist/types/components/Search/stories/SearchInputStyle.stories.d.ts +7 -7
- package/dist/types/components/Search/stories/SearchInputSuccess.stories.d.ts +7 -7
- package/dist/types/components/Select/Select.interface.d.ts +9 -7
- package/dist/types/components/Select/SelectContainer.d.ts +4 -1
- package/dist/types/components/Select/SelectMultiValue.d.ts +2 -2
- package/dist/types/components/Select/stories/Select.stories.d.ts +5 -3
- package/dist/types/components/Select/stories/SelectDefault.stories.d.ts +5 -3
- package/dist/types/components/Select/stories/SelectDisabled.stories.d.ts +5 -3
- package/dist/types/components/Select/stories/SelectError.stories.d.ts +5 -3
- package/dist/types/components/Select/stories/SelectRequire.stories.d.ts +5 -3
- package/dist/types/components/Select/stories/SelectShape.stories.d.ts +5 -3
- package/dist/types/components/Select/stories/SelectSize.stories.d.ts +5 -3
- package/dist/types/components/Select/stories/SelectStyle.stories.d.ts +5 -3
- package/dist/types/components/Select/stories/SelectSuccess.stories.d.ts +5 -3
- package/dist/types/components/Select/stories/__mock__/index.d.ts +2 -2
- package/dist/types/components/Swiper/Swiper.interface.d.ts +2 -11
- package/dist/types/components/Text/Text.interface.d.ts +2 -2
- package/dist/types/context/Notifications.d.ts +1 -1
- package/dist/types/context/Notifications.interface.d.ts +2 -1
- package/dist/types/context/UIContext.d.ts +10 -4
- package/dist/types/hooks/useActiveClasses/useActiveClasses.interface.d.ts +1 -2
- package/dist/types/hooks/useStyles/styleAttributes.d.ts +2 -3
- package/dist/types/hooks/useStyles/styleAttributes.interface.d.ts +9 -3
- package/dist/types/hooks/useStyles/useStyles.d.ts +4 -1
- package/dist/types/utils/mergeAppearanceKeys.d.ts +6 -1
- package/dist/utils/mergeAppearanceKeys.js +14 -1
- package/package.json +12 -12
- package/dist/{DatePicker_cjs_avA-OHmZ.js → DatePicker_cjs_BJzVpk0o.js} +3 -3
- package/dist/{DatePicker_es_ungoFvip.js → DatePicker_es_BP0iWHMt.js} +3 -3
|
@@ -21,14 +21,14 @@ declare const meta: {
|
|
|
21
21
|
iconClearSize?: import("../../Icon/Icon.interface").IconProps["size"];
|
|
22
22
|
iconClearSrc?: import("../../Icon/Icon.interface").IconProps["imageSrc"];
|
|
23
23
|
inputFill?: import("@itcase/types-ui").FillProps;
|
|
24
|
-
inputTextColor?: import("
|
|
25
|
-
inputTextSize?: import("
|
|
26
|
-
inputTextStyle?: "
|
|
24
|
+
inputTextColor?: import("../../Text/Text.interface").TextProps["textColor"];
|
|
25
|
+
inputTextSize?: import("../../Text/Text.interface").TextProps["size"];
|
|
26
|
+
inputTextStyle?: import("../../Text/Text.interface").TextProps["textStyle"];
|
|
27
27
|
inputTextWeight?: import("@itcase/types-ui").TextWeightProps;
|
|
28
|
-
placeholderTextColor?: import("
|
|
29
|
-
placeholderTextSize?: import("
|
|
30
|
-
placeholderTextStyle?: "
|
|
31
|
-
placeholderTextWeight?: import("
|
|
28
|
+
placeholderTextColor?: import("../../Text/Text.interface").TextProps["textColor"];
|
|
29
|
+
placeholderTextSize?: import("../../Text/Text.interface").TextProps["size"];
|
|
30
|
+
placeholderTextStyle?: import("../../Text/Text.interface").TextProps["textStyle"];
|
|
31
|
+
placeholderTextWeight?: import("../../Text/Text.interface").TextProps["textWeight"];
|
|
32
32
|
shape?: import("@itcase/types-ui").ShapeProps;
|
|
33
33
|
shapeStrength?: import("@itcase/types-ui").ShapeStrengthProps;
|
|
34
34
|
size?: import("@itcase/types-ui").SizeProps;
|
|
@@ -21,14 +21,14 @@ declare const meta: {
|
|
|
21
21
|
iconClearSize?: import("../../Icon/Icon.interface").IconProps["size"];
|
|
22
22
|
iconClearSrc?: import("../../Icon/Icon.interface").IconProps["imageSrc"];
|
|
23
23
|
inputFill?: import("@itcase/types-ui").FillProps;
|
|
24
|
-
inputTextColor?: import("
|
|
25
|
-
inputTextSize?: import("
|
|
26
|
-
inputTextStyle?: "
|
|
24
|
+
inputTextColor?: import("../../Text/Text.interface").TextProps["textColor"];
|
|
25
|
+
inputTextSize?: import("../../Text/Text.interface").TextProps["size"];
|
|
26
|
+
inputTextStyle?: import("../../Text/Text.interface").TextProps["textStyle"];
|
|
27
27
|
inputTextWeight?: import("@itcase/types-ui").TextWeightProps;
|
|
28
|
-
placeholderTextColor?: import("
|
|
29
|
-
placeholderTextSize?: import("
|
|
30
|
-
placeholderTextStyle?: "
|
|
31
|
-
placeholderTextWeight?: import("
|
|
28
|
+
placeholderTextColor?: import("../../Text/Text.interface").TextProps["textColor"];
|
|
29
|
+
placeholderTextSize?: import("../../Text/Text.interface").TextProps["size"];
|
|
30
|
+
placeholderTextStyle?: import("../../Text/Text.interface").TextProps["textStyle"];
|
|
31
|
+
placeholderTextWeight?: import("../../Text/Text.interface").TextProps["textWeight"];
|
|
32
32
|
shape?: import("@itcase/types-ui").ShapeProps;
|
|
33
33
|
shapeStrength?: import("@itcase/types-ui").ShapeStrengthProps;
|
|
34
34
|
size?: import("@itcase/types-ui").SizeProps;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import { GroupBase, PropsValue } from 'react-select';
|
|
2
|
+
import { ActionMeta, GroupBase, OnChangeValue, PropsValue, SingleValue } from 'react-select';
|
|
3
3
|
import { Props } from 'react-select/base';
|
|
4
4
|
import { Option as SelectOption } from '@itcase/types-core';
|
|
5
|
-
import { AppearanceShapeKey, AppearanceSizeKey, AppearanceStateKeysDefault, AppearanceStyleKey, BorderColorHoverProps, BorderColorProps, BorderTypeProps,
|
|
5
|
+
import { AppearanceShapeKey, AppearanceSizeKey, AppearanceStateKeysDefault, AppearanceStyleKey, BorderColorHoverProps, BorderColorProps, BorderTypeProps, CompositeAppearanceStateKeys, DirectionProps, FillHoverProps, FillProps, ShapeProps, ShapeStrengthProps, SizeProps, WidthProps } from '@itcase/types-ui';
|
|
6
6
|
import { BadgeProps } from 'src/components/Badge/Badge.interface';
|
|
7
7
|
import { DividerProps } from 'src/components/Divider/Divider.interface';
|
|
8
8
|
import { DropdownProps } from 'src/components/Dropdown/Dropdown.interface';
|
|
9
9
|
import { IconProps } from 'src/components/Icon/Icon.interface';
|
|
10
10
|
import { LoaderProps } from 'src/components/Loader/Loader.interface';
|
|
11
11
|
import { TextProps } from 'src/components/Text/Text.interface';
|
|
12
|
-
type SelectAppearanceProps<Option
|
|
12
|
+
type SelectAppearanceProps<Option> = {
|
|
13
13
|
after?: React.ReactNode;
|
|
14
|
-
appearance?:
|
|
14
|
+
appearance?: CompositeAppearanceStateKeys;
|
|
15
15
|
badgeAppearance?: BadgeProps['appearance'];
|
|
16
16
|
badgeAppearanceSize?: AppearanceSizeKey;
|
|
17
17
|
badgeSize?: BadgeProps['size'];
|
|
@@ -127,12 +127,14 @@ type SelectAppearanceProps<Option = SelectOption> = {
|
|
|
127
127
|
};
|
|
128
128
|
type AppearanceKeys = AppearanceShapeKey | AppearanceSizeKey | AppearanceStateKeysDefault | AppearanceStyleKey;
|
|
129
129
|
type SelectAppearance = {
|
|
130
|
-
[key in AppearanceKeys]?: SelectAppearanceProps
|
|
130
|
+
[key in AppearanceKeys]?: SelectAppearanceProps<SelectOption>;
|
|
131
131
|
};
|
|
132
132
|
type SelectConfig = {
|
|
133
133
|
appearance: SelectAppearance;
|
|
134
134
|
setAppearance: (appearanceConfig: SelectAppearance) => void;
|
|
135
135
|
};
|
|
136
|
-
type SelectProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = Partial<Pick<Props<Option, IsMulti, Group>, 'className' | 'closeMenuOnSelect' | 'filterOption' | 'hideSelectedOptions' | 'hideValueContainer' | 'instanceId' | 'isClearable' | 'isDisabled' | 'isLoading' | 'isMulti' | 'isSearchable' | 'loadingMessage' | '
|
|
137
|
-
type SelectPropsCustom<Option> = SelectAppearanceProps<Option> & {
|
|
136
|
+
type SelectProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = Partial<Pick<Props<Option, IsMulti, Group>, 'className' | 'closeMenuOnSelect' | 'filterOption' | 'hideSelectedOptions' | 'hideValueContainer' | 'instanceId' | 'isClearable' | 'isDisabled' | 'isLoading' | 'isMulti' | 'isSearchable' | 'loadingMessage' | 'onInputChange' | 'openMenuOnClick' | 'options' | 'value'>> & SelectAppearanceProps<Option> & SelectPropsCustom<Option>;
|
|
137
|
+
type SelectPropsCustom<Option> = SelectAppearanceProps<Option> & {
|
|
138
|
+
onChange?: (newValue: OnChangeValue<Option, boolean> | SingleValue<Option>, actionMeta?: ActionMeta<Option>) => void;
|
|
139
|
+
};
|
|
138
140
|
export type { SelectAppearance, SelectAppearanceProps, SelectConfig, SelectProps, SelectPropsCustom, };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { GroupBase, SelectInstance } from 'react-select';
|
|
3
|
+
import { Option as SelectOptionType } from '@itcase/types-core';
|
|
3
4
|
import { SelectConfig } from './Select.interface';
|
|
4
5
|
declare const selectConfig: SelectConfig;
|
|
5
|
-
declare const SelectContainer: React.ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<
|
|
6
|
+
declare const SelectContainer: React.ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<SelectOptionType, boolean, GroupBase<SelectOptionType>>, "value" | "isLoading" | "className" | "isDisabled" | "options" | "isClearable" | "closeMenuOnSelect" | "filterOption" | "hideSelectedOptions" | "hideValueContainer" | "instanceId" | "isMulti" | "isSearchable" | "loadingMessage" | "onInputChange" | "openMenuOnClick">> & import("./Select.interface").SelectAppearanceProps<SelectOptionType> & {
|
|
7
|
+
onChange?: (newValue: import("react-select").OnChangeValue<SelectOptionType, boolean>, actionMeta?: import("react-select").ActionMeta<SelectOptionType>) => void;
|
|
8
|
+
} & React.RefAttributes<SelectInstance<SelectOptionType, boolean, GroupBase<SelectOptionType>>>>;
|
|
6
9
|
export { selectConfig, SelectContainer };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GroupBase, MultiValueProps } from 'react-select';
|
|
2
|
-
import { Option } from '@itcase/types-core';
|
|
3
|
-
declare const SelectMultiValue: <
|
|
2
|
+
import { Option as SelectOption } from '@itcase/types-core';
|
|
3
|
+
declare const SelectMultiValue: <Option extends SelectOption, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: MultiValueProps<Option, IsMulti, Group>) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export { SelectMultiValue };
|
|
@@ -2,7 +2,9 @@ import { Option } from '@itcase/types-core';
|
|
|
2
2
|
import { SelectPropsCustom } from '../Select.interface';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: import("react").ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<Option, boolean, import("react-select").GroupBase<Option>>, "value" | "isLoading" | "className" | "isDisabled" | "options" | "isClearable" | "closeMenuOnSelect" | "filterOption" | "hideSelectedOptions" | "hideValueContainer" | "instanceId" | "isMulti" | "isSearchable" | "loadingMessage" | "onInputChange" | "openMenuOnClick">> & import("../Select.interface").SelectAppearanceProps<Option> & {
|
|
6
|
+
onChange?: (newValue: import("react-select").OnChangeValue<Option, boolean>, actionMeta?: import("react-select").ActionMeta<Option>) => void;
|
|
7
|
+
} & import("react").RefAttributes<import("react-select").SelectInstance<Option, boolean, import("react-select").GroupBase<Option>>>>;
|
|
6
8
|
args: {
|
|
7
9
|
appearance: string;
|
|
8
10
|
elevation: number;
|
|
@@ -16,14 +18,14 @@ declare const meta: {
|
|
|
16
18
|
label: string;
|
|
17
19
|
value: string;
|
|
18
20
|
}[];
|
|
19
|
-
isDisabled?: undefined;
|
|
20
21
|
value?: undefined;
|
|
22
|
+
isDisabled?: undefined;
|
|
21
23
|
isFixed?: undefined;
|
|
22
24
|
isSelected?: undefined;
|
|
23
25
|
} | {
|
|
24
26
|
label: string;
|
|
25
|
-
isDisabled: boolean;
|
|
26
27
|
value: string;
|
|
28
|
+
isDisabled: boolean;
|
|
27
29
|
options?: undefined;
|
|
28
30
|
isFixed?: undefined;
|
|
29
31
|
isSelected?: undefined;
|
|
@@ -2,7 +2,9 @@ import { Option } from '@itcase/types-core';
|
|
|
2
2
|
import { SelectPropsCustom } from '../Select.interface';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: import("react").ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<Option, boolean, import("react-select").GroupBase<Option>>, "value" | "isLoading" | "className" | "isDisabled" | "options" | "isClearable" | "closeMenuOnSelect" | "filterOption" | "hideSelectedOptions" | "hideValueContainer" | "instanceId" | "isMulti" | "isSearchable" | "loadingMessage" | "onInputChange" | "openMenuOnClick">> & import("../Select.interface").SelectAppearanceProps<Option> & {
|
|
6
|
+
onChange?: (newValue: import("react-select").OnChangeValue<Option, boolean>, actionMeta?: import("react-select").ActionMeta<Option>) => void;
|
|
7
|
+
} & import("react").RefAttributes<import("react-select").SelectInstance<Option, boolean, import("react-select").GroupBase<Option>>>>;
|
|
6
8
|
args: {
|
|
7
9
|
appearance: string;
|
|
8
10
|
elevation: number;
|
|
@@ -16,14 +18,14 @@ declare const meta: {
|
|
|
16
18
|
label: string;
|
|
17
19
|
value: string;
|
|
18
20
|
}[];
|
|
19
|
-
isDisabled?: undefined;
|
|
20
21
|
value?: undefined;
|
|
22
|
+
isDisabled?: undefined;
|
|
21
23
|
isFixed?: undefined;
|
|
22
24
|
isSelected?: undefined;
|
|
23
25
|
} | {
|
|
24
26
|
label: string;
|
|
25
|
-
isDisabled: boolean;
|
|
26
27
|
value: string;
|
|
28
|
+
isDisabled: boolean;
|
|
27
29
|
options?: undefined;
|
|
28
30
|
isFixed?: undefined;
|
|
29
31
|
isSelected?: undefined;
|
|
@@ -2,7 +2,9 @@ import { Option } from '@itcase/types-core';
|
|
|
2
2
|
import { SelectPropsCustom } from '../Select.interface';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: import("react").ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<Option, boolean, import("react-select").GroupBase<Option>>, "value" | "isLoading" | "className" | "isDisabled" | "options" | "isClearable" | "closeMenuOnSelect" | "filterOption" | "hideSelectedOptions" | "hideValueContainer" | "instanceId" | "isMulti" | "isSearchable" | "loadingMessage" | "onInputChange" | "openMenuOnClick">> & import("../Select.interface").SelectAppearanceProps<Option> & {
|
|
6
|
+
onChange?: (newValue: import("react-select").OnChangeValue<Option, boolean>, actionMeta?: import("react-select").ActionMeta<Option>) => void;
|
|
7
|
+
} & import("react").RefAttributes<import("react-select").SelectInstance<Option, boolean, import("react-select").GroupBase<Option>>>>;
|
|
6
8
|
args: {
|
|
7
9
|
appearance: string;
|
|
8
10
|
elevation: number;
|
|
@@ -16,14 +18,14 @@ declare const meta: {
|
|
|
16
18
|
label: string;
|
|
17
19
|
value: string;
|
|
18
20
|
}[];
|
|
19
|
-
isDisabled?: undefined;
|
|
20
21
|
value?: undefined;
|
|
22
|
+
isDisabled?: undefined;
|
|
21
23
|
isFixed?: undefined;
|
|
22
24
|
isSelected?: undefined;
|
|
23
25
|
} | {
|
|
24
26
|
label: string;
|
|
25
|
-
isDisabled: boolean;
|
|
26
27
|
value: string;
|
|
28
|
+
isDisabled: boolean;
|
|
27
29
|
options?: undefined;
|
|
28
30
|
isFixed?: undefined;
|
|
29
31
|
isSelected?: undefined;
|
|
@@ -2,7 +2,9 @@ import { Option } from '@itcase/types-core';
|
|
|
2
2
|
import { SelectPropsCustom } from '../Select.interface';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: import("react").ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<Option, boolean, import("react-select").GroupBase<Option>>, "value" | "isLoading" | "className" | "isDisabled" | "options" | "isClearable" | "closeMenuOnSelect" | "filterOption" | "hideSelectedOptions" | "hideValueContainer" | "instanceId" | "isMulti" | "isSearchable" | "loadingMessage" | "onInputChange" | "openMenuOnClick">> & import("../Select.interface").SelectAppearanceProps<Option> & {
|
|
6
|
+
onChange?: (newValue: import("react-select").OnChangeValue<Option, boolean>, actionMeta?: import("react-select").ActionMeta<Option>) => void;
|
|
7
|
+
} & import("react").RefAttributes<import("react-select").SelectInstance<Option, boolean, import("react-select").GroupBase<Option>>>>;
|
|
6
8
|
args: {
|
|
7
9
|
appearance: string;
|
|
8
10
|
elevation: number;
|
|
@@ -16,14 +18,14 @@ declare const meta: {
|
|
|
16
18
|
label: string;
|
|
17
19
|
value: string;
|
|
18
20
|
}[];
|
|
19
|
-
isDisabled?: undefined;
|
|
20
21
|
value?: undefined;
|
|
22
|
+
isDisabled?: undefined;
|
|
21
23
|
isFixed?: undefined;
|
|
22
24
|
isSelected?: undefined;
|
|
23
25
|
} | {
|
|
24
26
|
label: string;
|
|
25
|
-
isDisabled: boolean;
|
|
26
27
|
value: string;
|
|
28
|
+
isDisabled: boolean;
|
|
27
29
|
options?: undefined;
|
|
28
30
|
isFixed?: undefined;
|
|
29
31
|
isSelected?: undefined;
|
|
@@ -2,7 +2,9 @@ import { Option } from '@itcase/types-core';
|
|
|
2
2
|
import { SelectPropsCustom } from '../Select.interface';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: import("react").ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<Option, boolean, import("react-select").GroupBase<Option>>, "value" | "isLoading" | "className" | "isDisabled" | "options" | "isClearable" | "closeMenuOnSelect" | "filterOption" | "hideSelectedOptions" | "hideValueContainer" | "instanceId" | "isMulti" | "isSearchable" | "loadingMessage" | "onInputChange" | "openMenuOnClick">> & import("../Select.interface").SelectAppearanceProps<Option> & {
|
|
6
|
+
onChange?: (newValue: import("react-select").OnChangeValue<Option, boolean>, actionMeta?: import("react-select").ActionMeta<Option>) => void;
|
|
7
|
+
} & import("react").RefAttributes<import("react-select").SelectInstance<Option, boolean, import("react-select").GroupBase<Option>>>>;
|
|
6
8
|
args: {
|
|
7
9
|
appearance: string;
|
|
8
10
|
elevation: number;
|
|
@@ -16,14 +18,14 @@ declare const meta: {
|
|
|
16
18
|
label: string;
|
|
17
19
|
value: string;
|
|
18
20
|
}[];
|
|
19
|
-
isDisabled?: undefined;
|
|
20
21
|
value?: undefined;
|
|
22
|
+
isDisabled?: undefined;
|
|
21
23
|
isFixed?: undefined;
|
|
22
24
|
isSelected?: undefined;
|
|
23
25
|
} | {
|
|
24
26
|
label: string;
|
|
25
|
-
isDisabled: boolean;
|
|
26
27
|
value: string;
|
|
28
|
+
isDisabled: boolean;
|
|
27
29
|
options?: undefined;
|
|
28
30
|
isFixed?: undefined;
|
|
29
31
|
isSelected?: undefined;
|
|
@@ -2,7 +2,9 @@ import { Option } from '@itcase/types-core';
|
|
|
2
2
|
import { SelectPropsCustom } from '../Select.interface';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: import("react").ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<Option, boolean, import("react-select").GroupBase<Option>>, "value" | "isLoading" | "className" | "isDisabled" | "options" | "isClearable" | "closeMenuOnSelect" | "filterOption" | "hideSelectedOptions" | "hideValueContainer" | "instanceId" | "isMulti" | "isSearchable" | "loadingMessage" | "onInputChange" | "openMenuOnClick">> & import("../Select.interface").SelectAppearanceProps<Option> & {
|
|
6
|
+
onChange?: (newValue: import("react-select").OnChangeValue<Option, boolean>, actionMeta?: import("react-select").ActionMeta<Option>) => void;
|
|
7
|
+
} & import("react").RefAttributes<import("react-select").SelectInstance<Option, boolean, import("react-select").GroupBase<Option>>>>;
|
|
6
8
|
args: {
|
|
7
9
|
appearance: string;
|
|
8
10
|
elevation: number;
|
|
@@ -16,14 +18,14 @@ declare const meta: {
|
|
|
16
18
|
label: string;
|
|
17
19
|
value: string;
|
|
18
20
|
}[];
|
|
19
|
-
isDisabled?: undefined;
|
|
20
21
|
value?: undefined;
|
|
22
|
+
isDisabled?: undefined;
|
|
21
23
|
isFixed?: undefined;
|
|
22
24
|
isSelected?: undefined;
|
|
23
25
|
} | {
|
|
24
26
|
label: string;
|
|
25
|
-
isDisabled: boolean;
|
|
26
27
|
value: string;
|
|
28
|
+
isDisabled: boolean;
|
|
27
29
|
options?: undefined;
|
|
28
30
|
isFixed?: undefined;
|
|
29
31
|
isSelected?: undefined;
|
|
@@ -2,7 +2,9 @@ import { Option } from '@itcase/types-core';
|
|
|
2
2
|
import { SelectPropsCustom } from '../Select.interface';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: import("react").ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<Option, boolean, import("react-select").GroupBase<Option>>, "value" | "isLoading" | "className" | "isDisabled" | "options" | "isClearable" | "closeMenuOnSelect" | "filterOption" | "hideSelectedOptions" | "hideValueContainer" | "instanceId" | "isMulti" | "isSearchable" | "loadingMessage" | "onInputChange" | "openMenuOnClick">> & import("../Select.interface").SelectAppearanceProps<Option> & {
|
|
6
|
+
onChange?: (newValue: import("react-select").OnChangeValue<Option, boolean>, actionMeta?: import("react-select").ActionMeta<Option>) => void;
|
|
7
|
+
} & import("react").RefAttributes<import("react-select").SelectInstance<Option, boolean, import("react-select").GroupBase<Option>>>>;
|
|
6
8
|
args: {
|
|
7
9
|
appearance: string;
|
|
8
10
|
elevation: number;
|
|
@@ -16,14 +18,14 @@ declare const meta: {
|
|
|
16
18
|
label: string;
|
|
17
19
|
value: string;
|
|
18
20
|
}[];
|
|
19
|
-
isDisabled?: undefined;
|
|
20
21
|
value?: undefined;
|
|
22
|
+
isDisabled?: undefined;
|
|
21
23
|
isFixed?: undefined;
|
|
22
24
|
isSelected?: undefined;
|
|
23
25
|
} | {
|
|
24
26
|
label: string;
|
|
25
|
-
isDisabled: boolean;
|
|
26
27
|
value: string;
|
|
28
|
+
isDisabled: boolean;
|
|
27
29
|
options?: undefined;
|
|
28
30
|
isFixed?: undefined;
|
|
29
31
|
isSelected?: undefined;
|
|
@@ -2,7 +2,9 @@ import { Option } from '@itcase/types-core';
|
|
|
2
2
|
import { SelectPropsCustom } from '../Select.interface';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: import("react").ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<Option, boolean, import("react-select").GroupBase<Option>>, "value" | "isLoading" | "className" | "isDisabled" | "options" | "isClearable" | "closeMenuOnSelect" | "filterOption" | "hideSelectedOptions" | "hideValueContainer" | "instanceId" | "isMulti" | "isSearchable" | "loadingMessage" | "onInputChange" | "openMenuOnClick">> & import("../Select.interface").SelectAppearanceProps<Option> & {
|
|
6
|
+
onChange?: (newValue: import("react-select").OnChangeValue<Option, boolean>, actionMeta?: import("react-select").ActionMeta<Option>) => void;
|
|
7
|
+
} & import("react").RefAttributes<import("react-select").SelectInstance<Option, boolean, import("react-select").GroupBase<Option>>>>;
|
|
6
8
|
args: {
|
|
7
9
|
elevation: number;
|
|
8
10
|
hideSelectedOptions: boolean;
|
|
@@ -15,14 +17,14 @@ declare const meta: {
|
|
|
15
17
|
label: string;
|
|
16
18
|
value: string;
|
|
17
19
|
}[];
|
|
18
|
-
isDisabled?: undefined;
|
|
19
20
|
value?: undefined;
|
|
21
|
+
isDisabled?: undefined;
|
|
20
22
|
isFixed?: undefined;
|
|
21
23
|
isSelected?: undefined;
|
|
22
24
|
} | {
|
|
23
25
|
label: string;
|
|
24
|
-
isDisabled: boolean;
|
|
25
26
|
value: string;
|
|
27
|
+
isDisabled: boolean;
|
|
26
28
|
options?: undefined;
|
|
27
29
|
isFixed?: undefined;
|
|
28
30
|
isSelected?: undefined;
|
|
@@ -2,7 +2,9 @@ import { Option } from '@itcase/types-core';
|
|
|
2
2
|
import { SelectPropsCustom } from '../Select.interface';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: import("react").ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<Partial<Pick<import("react-select/base").Props<Option, boolean, import("react-select").GroupBase<Option>>, "value" | "isLoading" | "className" | "isDisabled" | "options" | "isClearable" | "closeMenuOnSelect" | "filterOption" | "hideSelectedOptions" | "hideValueContainer" | "instanceId" | "isMulti" | "isSearchable" | "loadingMessage" | "onInputChange" | "openMenuOnClick">> & import("../Select.interface").SelectAppearanceProps<Option> & {
|
|
6
|
+
onChange?: (newValue: import("react-select").OnChangeValue<Option, boolean>, actionMeta?: import("react-select").ActionMeta<Option>) => void;
|
|
7
|
+
} & import("react").RefAttributes<import("react-select").SelectInstance<Option, boolean, import("react-select").GroupBase<Option>>>>;
|
|
6
8
|
args: {
|
|
7
9
|
appearance: string;
|
|
8
10
|
elevation: number;
|
|
@@ -16,14 +18,14 @@ declare const meta: {
|
|
|
16
18
|
label: string;
|
|
17
19
|
value: string;
|
|
18
20
|
}[];
|
|
19
|
-
isDisabled?: undefined;
|
|
20
21
|
value?: undefined;
|
|
22
|
+
isDisabled?: undefined;
|
|
21
23
|
isFixed?: undefined;
|
|
22
24
|
isSelected?: undefined;
|
|
23
25
|
} | {
|
|
24
26
|
label: string;
|
|
25
|
-
isDisabled: boolean;
|
|
26
27
|
value: string;
|
|
28
|
+
isDisabled: boolean;
|
|
27
29
|
options?: undefined;
|
|
28
30
|
isFixed?: undefined;
|
|
29
31
|
isSelected?: undefined;
|
|
@@ -10,14 +10,14 @@ export namespace SelectDefaultMock {
|
|
|
10
10
|
label: string;
|
|
11
11
|
value: string;
|
|
12
12
|
}[];
|
|
13
|
-
isDisabled?: undefined;
|
|
14
13
|
value?: undefined;
|
|
14
|
+
isDisabled?: undefined;
|
|
15
15
|
isFixed?: undefined;
|
|
16
16
|
isSelected?: undefined;
|
|
17
17
|
} | {
|
|
18
18
|
label: string;
|
|
19
|
-
isDisabled: boolean;
|
|
20
19
|
value: string;
|
|
20
|
+
isDisabled: boolean;
|
|
21
21
|
options?: undefined;
|
|
22
22
|
isFixed?: undefined;
|
|
23
23
|
isSelected?: undefined;
|
|
@@ -6,17 +6,6 @@ import { StyleAttributes } from 'src/hooks/useStyles/styleAttributes.interface';
|
|
|
6
6
|
type SwiperAppearanceProps = {
|
|
7
7
|
align?: AlignProps;
|
|
8
8
|
alignDirection?: DirectionProps;
|
|
9
|
-
allowTouchMove?: boolean;
|
|
10
|
-
autoHeight?: boolean;
|
|
11
|
-
breakpoints?: {
|
|
12
|
-
[ratio: string]: SwiperOptions;
|
|
13
|
-
[width: number]: SwiperOptions;
|
|
14
|
-
};
|
|
15
|
-
children?: ReactNode;
|
|
16
|
-
className?: string;
|
|
17
|
-
dataTestId?: string;
|
|
18
|
-
dataTour?: string;
|
|
19
|
-
direction?: 'horizontal' | 'vertical';
|
|
20
9
|
fill?: FillProps;
|
|
21
10
|
shape?: ShapeProps;
|
|
22
11
|
};
|
|
@@ -31,6 +20,8 @@ type SwiperProps = StyleAttributes & SwiperAppearanceProps & {
|
|
|
31
20
|
};
|
|
32
21
|
children?: ReactNode;
|
|
33
22
|
className?: string;
|
|
23
|
+
dataTestId?: string;
|
|
24
|
+
dataTour?: string;
|
|
34
25
|
direction?: 'horizontal' | 'vertical';
|
|
35
26
|
forwardedRef: Ref<SwiperRef>;
|
|
36
27
|
freeMode?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import { AppearanceKeysDefault, AppearanceShapeKey, AppearanceSizeKey, AppearanceStyleKey, CompositeAppearanceSizePxKey, TextAlignProps, TextColorActiveHoverProps, TextColorActiveProps, TextColorHoverProps, TextColorProps, TextFontProps, TextSizeProps, TextTagProps, TextWeightProps, TextWrapProps } from '@itcase/types-ui';
|
|
2
|
+
import { AppearanceKeysDefault, AppearanceShapeKey, AppearanceSizeKey, AppearanceStyleKey, CompositeAppearanceSizePxKey, TextAlignProps, TextColorActiveHoverProps, TextColorActiveProps, TextColorHoverProps, TextColorProps, TextFontProps, TextSizeProps, TextStyleProps, TextTagProps, TextWeightProps, TextWrapProps } from '@itcase/types-ui';
|
|
3
3
|
import { StyleAttributes } from 'src/hooks/useStyles/styleAttributes.interface';
|
|
4
4
|
type TextAppearanceProps = {
|
|
5
5
|
cursor?: string;
|
|
@@ -13,7 +13,7 @@ type TextAppearanceProps = {
|
|
|
13
13
|
textColorGradient?: string;
|
|
14
14
|
textColorHover?: TextColorHoverProps | TextColorProps;
|
|
15
15
|
textFont?: TextFontProps;
|
|
16
|
-
textStyle?:
|
|
16
|
+
textStyle?: TextStyleProps;
|
|
17
17
|
textTruncate?: boolean;
|
|
18
18
|
textWeight?: TextWeightProps;
|
|
19
19
|
textWrap?: TextWrapProps;
|
|
@@ -3,7 +3,7 @@ import type { CreatedNotification, Notification, NotificationsProviderProps } fr
|
|
|
3
3
|
declare function NotificationsProvider(props: NotificationsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function useNotifications(): Notification[];
|
|
5
5
|
declare function useNotificationsAPI(): {
|
|
6
|
-
hideNotifications: (targetId
|
|
6
|
+
hideNotifications: (targetId?: GeneratedId) => void;
|
|
7
7
|
showNotification: (notification: string | CreatedNotification, onClose?: SimpleCallback) => void;
|
|
8
8
|
notificationStatuses: {
|
|
9
9
|
readonly error: "error";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { GeneratedId } from '@itcase/types-core';
|
|
3
|
+
import { ButtonProps } from 'src/components/Button/Button.interface';
|
|
3
4
|
import { NotificationProps } from 'src/components/Notification/Notification.interface';
|
|
4
5
|
interface Notification {
|
|
5
6
|
id: GeneratedId;
|
|
@@ -17,7 +18,7 @@ interface Notification {
|
|
|
17
18
|
title: string;
|
|
18
19
|
type?: 'float' | 'global' | 'toast';
|
|
19
20
|
isLoading: boolean;
|
|
20
|
-
onClickButton:
|
|
21
|
+
onClickButton: ButtonProps['onClick'];
|
|
21
22
|
onClose?: () => void;
|
|
22
23
|
}
|
|
23
24
|
interface CreatedNotification {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
type DeviceType = '' | 'desktop' | 'mobile' | 'tablet';
|
|
2
3
|
type UIProviderProps = {
|
|
3
4
|
children?: ReactNode;
|
|
4
5
|
userDeviceState?: {
|
|
6
|
+
deviceCurrentMainType: DeviceType;
|
|
7
|
+
deviceCurrentType: string;
|
|
8
|
+
deviceTypesList: string[];
|
|
5
9
|
isDesktop?: boolean;
|
|
6
10
|
isMobile?: boolean;
|
|
7
11
|
isTablet?: boolean;
|
|
@@ -9,9 +13,11 @@ type UIProviderProps = {
|
|
|
9
13
|
};
|
|
10
14
|
declare const UIProvider: import("react").NamedExoticComponent<UIProviderProps>;
|
|
11
15
|
declare function useUserDeviceContext(): {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
deviceCurrentMainType: DeviceType;
|
|
17
|
+
deviceCurrentType: string;
|
|
18
|
+
deviceTypesList: string[];
|
|
19
|
+
isDesktop?: boolean;
|
|
20
|
+
isMobile?: boolean;
|
|
21
|
+
isTablet?: boolean;
|
|
16
22
|
};
|
|
17
23
|
export { UIProvider, useUserDeviceContext };
|
|
@@ -3,9 +3,8 @@ type SuffixComponents = (typeof suffix)[number];
|
|
|
3
3
|
type SpecialSuffix<T extends string> = T extends 'HTMLContent' ? 'htmlContent' : Uncapitalize<T>;
|
|
4
4
|
type SuffixKeys = SpecialSuffix<SuffixComponents>;
|
|
5
5
|
interface PropsGenerator {
|
|
6
|
-
[key: string]:
|
|
6
|
+
[key: string]: any | number | string | undefined;
|
|
7
7
|
getProp?: (propKey: string) => number | string | undefined;
|
|
8
|
-
getClassName?: <K extends string, P = undefined>(propKey: K, params?: P) => string;
|
|
9
8
|
}
|
|
10
9
|
interface UseActiveClassesReturn {
|
|
11
10
|
rootClasses: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
1
2
|
import type * as CSS from 'csstype';
|
|
2
3
|
import { HeightProps, ResizeModeProps, WidthProps } from '@itcase/types-ui';
|
|
3
4
|
export interface StyleAttributes {
|
|
@@ -129,13 +130,18 @@ type LabelInterface<T> = {
|
|
|
129
130
|
type ImageInterface<T> = {
|
|
130
131
|
[P in keyof T as `${P & string}Image`]: T[P];
|
|
131
132
|
};
|
|
133
|
+
export type CSSPropertiesKey = keyof CSSProperties;
|
|
132
134
|
export interface TypeStyleWrapperAttributes extends WrappedInterface<StyleAttributes> {
|
|
133
135
|
}
|
|
134
136
|
export interface TypeStyleLabelAttributes extends LabelInterface<StyleAttributes> {
|
|
135
137
|
}
|
|
136
138
|
export interface TypeStyleImageAttributes extends ImageInterface<StyleAttributes> {
|
|
137
139
|
}
|
|
138
|
-
export type
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
export type StyleValidator = [
|
|
141
|
+
StyleAttributes['width'],
|
|
142
|
+
{
|
|
143
|
+
validate?: (value: string) => boolean;
|
|
144
|
+
}
|
|
145
|
+
];
|
|
146
|
+
export type StyleAttributeOrValidator = StyleAttributes | StyleValidator;
|
|
141
147
|
export {};
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { ComponentProps } from '../useDevicePropsGenerator/useDevicePropsGenerator.interface';
|
|
3
|
+
declare function useStyles<Props extends ComponentProps>(props: Props): Record<string, CSSProperties>;
|
|
4
|
+
export { useStyles };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
type MergeAppearanceKeysReturn = any;
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* mergeAppearanceKeys(' ', '1', undefined, '2', '1') === '1 2'
|
|
5
|
+
*/
|
|
6
|
+
declare const mergeAppearanceKeys: (...appearances: Array<string | undefined>) => MergeAppearanceKeysReturn;
|
|
2
7
|
export { mergeAppearanceKeys };
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* mergeAppearanceKeys(' ', '1', undefined, '2', '1') === '1 2'
|
|
4
|
+
*/
|
|
5
|
+
const mergeAppearanceKeys = (...appearances) => {
|
|
6
|
+
const trimmedAppearances = appearances
|
|
7
|
+
.map((appearance) => appearance?.trim())
|
|
8
|
+
.filter(Boolean);
|
|
9
|
+
if (trimmedAppearances.length < 2) {
|
|
10
|
+
return trimmedAppearances[0] ?? '';
|
|
11
|
+
}
|
|
12
|
+
const uniqueAppearances = Array.from(new Set(trimmedAppearances));
|
|
13
|
+
return uniqueAppearances.join(' ');
|
|
14
|
+
};
|
|
2
15
|
|
|
3
16
|
export { mergeAppearanceKeys };
|