@itcase/ui 1.8.108 → 1.8.109
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_bOSuIjlv.js → Avatar_cjs_joB9qjwk.js} +36 -60
- package/dist/{Avatar_es_CEiiRkAd.js → Avatar_es_C3HGSiHU.js} +36 -60
- package/dist/{Button_cjs_eGfgY2Dz.js → Button_cjs_mau_55Fl.js} +6 -6
- package/dist/{Button_es_CEXL2diU.js → Button_es_D_IlkeBp.js} +6 -6
- package/dist/{ChipsGroup_cjs_DKLEgUi2.js → ChipsGroup_cjs_D454M1-p.js} +2 -2
- package/dist/{ChipsGroup_es_vMh6YMRm.js → ChipsGroup_es_BKG5mK5N.js} +2 -2
- package/dist/{DatePicker_cjs_T63y9kcH.js → DatePicker_cjs_Bm8nwWKa.js} +4 -4
- package/dist/{DatePicker_es_B87jj8h6.js → DatePicker_es_DAV92A4A.js} +4 -4
- package/dist/{DropdownItem_cjs_BGp4XAme.js → DropdownItem_cjs_D2hHKA5E.js} +2 -2
- package/dist/{DropdownItem_es_BwdenrJx.js → DropdownItem_es_D9JBMV70.js} +2 -2
- package/dist/{Icon_cjs_LSfBwmrG.js → Icon_cjs_ZerVip3X.js} +32 -47
- package/dist/{Icon_es_BYO1LdXJ.js → Icon_es_C76te22j.js} +32 -47
- package/dist/{Label_cjs_Df_mrKBf.js → Label_cjs_CaTh_laL.js} +2 -2
- package/dist/{Label_es_Dl5zb0RD.js → Label_es_CoIII7Ty.js} +2 -2
- package/dist/{Loader_cjs_Db9diKuF.js → Loader_cjs_c6yF7akz.js} +1 -1
- package/dist/{Loader_es_AhHU-s7_.js → Loader_es_C8ETXkiZ.js} +1 -1
- package/dist/{Text_cjs_CeJHeRfI.js → Text_cjs_DpRclhwc.js} +2 -5
- package/dist/{Text_es_BXh9Y3hR.js → Text_es_CtCwsa3V.js} +2 -5
- package/dist/cjs/components/Accordion.js +4 -3
- package/dist/cjs/components/Avatar.js +5 -4
- package/dist/cjs/components/AvatarStack.js +5 -4
- package/dist/cjs/components/Badge.js +4 -3
- package/dist/cjs/components/Breadcrumbs.js +4 -3
- package/dist/cjs/components/Button.js +6 -5
- package/dist/cjs/components/Cell.js +5 -4
- package/dist/cjs/components/Checkbox.js +3 -2
- package/dist/cjs/components/Checkmark.js +2 -1
- package/dist/cjs/components/Chips.js +5 -4
- package/dist/cjs/components/Choice.js +5 -4
- package/dist/cjs/components/Code.js +2 -0
- package/dist/cjs/components/CookiesWarning.js +6 -5
- package/dist/cjs/components/Dadata.js +2 -0
- package/dist/cjs/components/DatePeriod.js +8 -7
- package/dist/cjs/components/DatePicker.js +8 -7
- package/dist/cjs/components/Divider.js +2 -1
- package/dist/cjs/components/Dot.js +2 -1
- package/dist/cjs/components/Drawer.js +3 -2
- package/dist/cjs/components/Dropdown.js +5 -4
- package/dist/cjs/components/Flex.js +2 -1
- package/dist/cjs/components/Grid.js +2 -1
- package/dist/cjs/components/Group.js +2 -1
- package/dist/cjs/components/HTMLContent.js +2 -1
- package/dist/cjs/components/HeroTitle.js +4 -3
- package/dist/cjs/components/Icon.js +4 -3
- package/dist/cjs/components/Image.js +2 -1
- package/dist/cjs/components/Input.js +2 -0
- package/dist/cjs/components/InputPassword.js +4 -3
- package/dist/cjs/components/Label.js +5 -4
- package/dist/cjs/components/Link.js +2 -1
- package/dist/cjs/components/List.js +2 -1
- package/dist/cjs/components/Loader.js +4 -3
- package/dist/cjs/components/Logo.js +2 -1
- package/dist/cjs/components/MenuItem.js +4 -3
- package/dist/cjs/components/Modal.js +5 -4
- package/dist/cjs/components/ModalSheetBottom.js +4 -3
- package/dist/cjs/components/Notification.js +4 -3
- package/dist/cjs/components/Overlay.js +2 -1
- package/dist/cjs/components/Pagination.js +5 -4
- package/dist/cjs/components/Radio.js +6 -2
- package/dist/cjs/components/RangeSlider.js +2 -1
- package/dist/cjs/components/Response.js +6 -5
- package/dist/cjs/components/SVGContent.js +2 -1
- package/dist/cjs/components/ScrollOnDrag.js +2 -1
- package/dist/cjs/components/ScrollToView.js +2 -1
- package/dist/cjs/components/Search.js +4 -3
- package/dist/cjs/components/Segmented.js +3 -2
- package/dist/cjs/components/Select.js +4 -3
- package/dist/cjs/components/Swiper.js +4 -3
- package/dist/cjs/components/Switch.js +3 -2
- package/dist/cjs/components/Tab.js +14 -16
- package/dist/cjs/components/Text.js +3 -2
- package/dist/cjs/components/Textarea.js +2 -0
- package/dist/cjs/components/Tile.js +4 -3
- package/dist/cjs/components/Title.js +4 -3
- package/dist/cjs/components/Tooltip.js +4 -3
- package/dist/cjs/components/Video.js +1 -0
- package/dist/cjs/components/Warning.js +4 -3
- package/dist/cjs/hooks/useActiveClasses/useActiveClasses.helpers.js +120 -0
- package/dist/cjs/hooks/useActiveClasses/useActiveClasses.interface.js +65 -0
- package/dist/cjs/hooks/useActiveClasses/useActiveClasses.js +64 -0
- package/dist/cjs/hooks/useActiveClasses.js +9 -0
- package/dist/cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +11 -1
- package/dist/cjs/hooks/useDevicePropsGenerator.js +2 -0
- package/dist/cjs/hooks/useStyles/useStyles.js +5 -3
- package/dist/cjs/hooks/useStyles.js +1 -0
- package/dist/cjs/hooks.js +9 -0
- package/dist/components/Accordion.js +4 -3
- package/dist/components/Avatar.js +5 -4
- package/dist/components/AvatarStack.js +5 -4
- package/dist/components/Badge.js +4 -3
- package/dist/components/Breadcrumbs.js +4 -3
- package/dist/components/Button.js +6 -5
- package/dist/components/Cell.js +5 -4
- package/dist/components/Checkbox.js +3 -2
- package/dist/components/Checkmark.js +2 -1
- package/dist/components/Chips.js +5 -4
- package/dist/components/Choice.js +5 -4
- package/dist/components/Code.js +2 -0
- package/dist/components/CookiesWarning.js +6 -5
- package/dist/components/Dadata.js +2 -0
- package/dist/components/DatePeriod.js +8 -7
- package/dist/components/DatePicker.js +8 -7
- package/dist/components/Divider.js +2 -1
- package/dist/components/Dot.js +2 -1
- package/dist/components/Drawer.js +3 -2
- package/dist/components/Dropdown.js +5 -4
- package/dist/components/Flex.js +2 -1
- package/dist/components/Grid.js +2 -1
- package/dist/components/Group.js +2 -1
- package/dist/components/HTMLContent.js +2 -1
- package/dist/components/HeroTitle.js +4 -3
- package/dist/components/Icon.js +4 -3
- package/dist/components/Image.js +2 -1
- package/dist/components/Input.js +2 -0
- package/dist/components/InputPassword.js +4 -3
- package/dist/components/Label.js +5 -4
- package/dist/components/Link.js +2 -1
- package/dist/components/List.js +2 -1
- package/dist/components/Loader.js +4 -3
- package/dist/components/Logo.js +2 -1
- package/dist/components/MenuItem.js +4 -3
- package/dist/components/Modal.js +5 -4
- package/dist/components/ModalSheetBottom.js +4 -3
- package/dist/components/Notification.js +4 -3
- package/dist/components/Overlay.js +2 -1
- package/dist/components/Pagination.js +5 -4
- package/dist/components/Radio.js +6 -2
- package/dist/components/RangeSlider.js +2 -1
- package/dist/components/Response.js +6 -5
- package/dist/components/SVGContent.js +2 -1
- package/dist/components/ScrollOnDrag.js +2 -1
- package/dist/components/ScrollToView.js +2 -1
- package/dist/components/Search.js +4 -3
- package/dist/components/Segmented.js +3 -2
- package/dist/components/Select.js +4 -3
- package/dist/components/Swiper.js +4 -3
- package/dist/components/Switch.js +3 -2
- package/dist/components/Tab.js +14 -16
- package/dist/components/Text.js +3 -2
- package/dist/components/Textarea.js +2 -0
- package/dist/components/Tile.js +4 -3
- package/dist/components/Title.js +4 -3
- package/dist/components/Tooltip.js +4 -3
- package/dist/components/Video.js +1 -0
- package/dist/components/Warning.js +4 -3
- package/dist/css/components/Icon/Icon.css +12 -19
- package/dist/hooks/useActiveClasses/useActiveClasses.helpers.js +116 -0
- package/dist/hooks/useActiveClasses/useActiveClasses.interface.js +63 -0
- package/dist/hooks/useActiveClasses/useActiveClasses.js +62 -0
- package/dist/hooks/useActiveClasses.js +3 -0
- package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +11 -1
- package/dist/hooks/useDevicePropsGenerator.js +2 -0
- package/dist/hooks/useStyles/useStyles.js +5 -3
- package/dist/hooks/useStyles.js +1 -0
- package/dist/hooks.js +7 -0
- package/dist/stories/useActiveClasses.mdx +134 -0
- package/dist/types/components/Avatar/Avatar.appearance.d.ts +1878 -2
- package/dist/types/components/Avatar/Avatar.interface.d.ts +48 -37
- package/dist/types/components/Avatar/appearance/avatarDefault.d.ts +2 -19
- package/dist/types/components/Avatar/appearance/avatarShape.d.ts +2 -24
- package/dist/types/components/Avatar/appearance/avatarSize.d.ts +2 -83
- package/dist/types/components/Avatar/appearance/avatarStyle.d.ts +2 -15
- package/dist/types/components/Badge/Badge.appearance.d.ts +986 -228
- package/dist/types/components/Badge/Badge.interface.d.ts +6 -6
- package/dist/types/components/Badge/appearance/badgeAccent.d.ts +2 -37
- package/dist/types/components/Badge/appearance/badgeDanger.d.ts +2 -16
- package/dist/types/components/Badge/appearance/badgeDisabled.d.ts +2 -14
- package/dist/types/components/Badge/appearance/badgeError.d.ts +2 -16
- package/dist/types/components/Badge/appearance/badgeInfo.d.ts +2 -15
- package/dist/types/components/Badge/appearance/badgePrimary.d.ts +2 -16
- package/dist/types/components/Badge/appearance/badgeSecondary.d.ts +2 -16
- package/dist/types/components/Badge/appearance/badgeShape.d.ts +2 -24
- package/dist/types/components/Badge/appearance/badgeSize.d.ts +2 -31
- package/dist/types/components/Badge/appearance/badgeStyle.d.ts +2 -13
- package/dist/types/components/Badge/appearance/badgeSuccess.d.ts +2 -16
- package/dist/types/components/Badge/appearance/badgeSurface.d.ts +2 -24
- package/dist/types/components/Badge/appearance/badgeWarning.d.ts +2 -16
- package/dist/types/components/Icon/Icon.d.ts +30 -6
- package/dist/types/components/Icon/Icon.interface.d.ts +2 -0
- package/dist/types/components/Radio/Radio.appearance.d.ts +3 -0
- package/dist/types/components/Radio/appearance/radioDefault.d.ts +3 -0
- package/dist/types/components/Tab/appearance/tabSurface.d.ts +1 -0
- package/dist/types/components/Text/Text.appearance.d.ts +698 -2
- package/dist/types/components/Text/Text.interface.d.ts +32 -47
- package/dist/types/components/Text/appearance/textSize.d.ts +2 -23
- package/dist/types/components/Title/Title.appearance.d.ts +2225 -2
- package/dist/types/components/Title/Title.interface.d.ts +56 -38
- package/dist/types/components/Title/appearance/titleAccent.d.ts +2 -19
- package/dist/types/components/Title/appearance/titleDanger.d.ts +2 -6
- package/dist/types/components/Title/appearance/titleDisabled.d.ts +2 -19
- package/dist/types/components/Title/appearance/titleError.d.ts +2 -10
- package/dist/types/components/Title/appearance/titleInfo.d.ts +2 -20
- package/dist/types/components/Title/appearance/titlePrimary.d.ts +2 -7
- package/dist/types/components/Title/appearance/titleRequire.d.ts +2 -19
- package/dist/types/components/Title/appearance/titleSecondary.d.ts +2 -7
- package/dist/types/components/Title/appearance/titleSize.d.ts +2 -44
- package/dist/types/components/Title/appearance/titleStyle.d.ts +2 -15
- package/dist/types/components/Title/appearance/titleSuccess.d.ts +2 -10
- package/dist/types/components/Title/appearance/titleSurface.d.ts +2 -24
- package/dist/types/components/Title/appearance/titleWarning.d.ts +2 -10
- package/dist/types/hooks/index.helpers.d.ts +3 -0
- package/dist/types/hooks/useActiveClasses/index.d.ts +2 -0
- package/dist/types/hooks/useActiveClasses/useActiveClasses.d.ts +3 -0
- package/dist/types/hooks/useActiveClasses/useActiveClasses.helpers.d.ts +5 -0
- package/dist/types/hooks/useActiveClasses/useActiveClasses.interface.d.ts +26 -0
- package/dist/types/hooks/useDevicePropsGenerator/useDevicePropsGenerator.d.ts +1 -1
- package/dist/types/hooks/useStyles/styleAttributes.interface.d.ts +3 -0
- package/package.json +6 -6
|
@@ -1,52 +1,70 @@
|
|
|
1
|
-
import { CSSProperties,
|
|
2
|
-
import { AppearanceKeysDefault, FillProps, SvgFillProps, TextAlignProps, TextColorActiveProps, TextColorHoverProps, TextColorProps,
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { AppearanceKeysDefault, AppearanceShapeKey, AppearanceStyleKey, AppearanceTitleSizeKey, CompositeAppearanceTitleKey, DirectionHVProps, FillHoverProps, FillProps, SvgFillHoverProps, SvgFillProps, TextAlignProps, TextColorActiveHoverProps, TextColorActiveProps, TextColorHoverProps, TextColorProps, TextSizeProps, TextTagProps, TextWeightProps, TextWrapProps, TitleSizeProps } from '@itcase/types';
|
|
3
3
|
import { StyleAttributes } from 'src/hooks/useStyles/styleAttributes.interface';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { IconProps } from '../Icon/Icon.interface';
|
|
5
|
+
type TitleAppearanceProps = {
|
|
6
|
+
direction?: string;
|
|
6
7
|
fill?: FillProps;
|
|
8
|
+
fillHover?: FillHoverProps;
|
|
9
|
+
iconAfter?: IconProps['SvgImage'];
|
|
10
|
+
iconAfterFill?: IconProps['fill'];
|
|
11
|
+
iconAfterFillIcon?: IconProps['iconFill'];
|
|
12
|
+
iconAfterFillSize?: IconProps['fillSize'];
|
|
13
|
+
iconAfterShape?: IconProps['shape'];
|
|
14
|
+
iconAfterSize?: IconProps['iconSize'];
|
|
15
|
+
iconAfterSrc?: IconProps['imageSrc'];
|
|
16
|
+
iconBadgeAppearance?: IconProps['badgeAppearance'];
|
|
17
|
+
iconBadgeShape?: IconProps['badgeShape'];
|
|
18
|
+
iconBadgeSize?: IconProps['badgeSize'];
|
|
19
|
+
iconBadgeTextColor?: TextColorProps;
|
|
20
|
+
iconBadgeTextSize?: TextSizeProps;
|
|
21
|
+
iconBadgeValue?: IconProps['badgeValue'];
|
|
22
|
+
iconBefore?: IconProps['SvgImage'];
|
|
23
|
+
iconBeforeFill?: IconProps['fill'];
|
|
24
|
+
iconBeforeFillIcon?: IconProps['iconFill'];
|
|
25
|
+
iconBeforeFillSize?: IconProps['fillSize'];
|
|
26
|
+
iconBeforeShape?: IconProps['shape'];
|
|
27
|
+
iconBeforeSize?: IconProps['iconSize'];
|
|
28
|
+
iconBeforeSrc?: IconProps['imageSrc'];
|
|
7
29
|
size?: TitleSizeProps;
|
|
8
|
-
sizeDesktop?: TitleSizeProps;
|
|
9
|
-
sizeMobile?: TitleSizeProps;
|
|
10
|
-
sizeTablet?: TitleSizeProps;
|
|
11
30
|
svgFill?: SvgFillProps;
|
|
12
|
-
svgFillHover?:
|
|
31
|
+
svgFillHover?: SvgFillHoverProps;
|
|
32
|
+
textAlign?: TextAlignProps;
|
|
13
33
|
textColor?: TextColorProps;
|
|
14
34
|
textColorActive?: TextColorActiveProps;
|
|
35
|
+
textColorActiveHover?: TextColorActiveHoverProps;
|
|
36
|
+
textColorDisabled?: string;
|
|
15
37
|
textColorHover?: TextColorHoverProps;
|
|
16
|
-
|
|
17
|
-
|
|
38
|
+
textStyle?: string;
|
|
39
|
+
textTruncate?: boolean;
|
|
18
40
|
textWeight?: TextWeightProps;
|
|
19
41
|
textWrap?: TextWrapProps;
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
type AppearanceKeys = AppearanceKeysDefault & {};
|
|
23
|
-
export type TitleAppearanceType = {
|
|
24
|
-
[key in AppearanceKeys]: TitleThemeColor;
|
|
42
|
+
wrapperDirection?: DirectionHVProps;
|
|
25
43
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
after?: any;
|
|
34
|
-
afterWrapper?: any;
|
|
35
|
-
appearance?: AppearanceKeys;
|
|
36
|
-
before?: any;
|
|
37
|
-
beforeWrapper?: any;
|
|
38
|
-
children: ReactNode;
|
|
44
|
+
type TitleProps = StyleAttributes & TitleAppearanceProps & {
|
|
45
|
+
after?: string;
|
|
46
|
+
afterWrapper?: string;
|
|
47
|
+
appearance?: CompositeAppearanceTitleKey;
|
|
48
|
+
before?: string;
|
|
49
|
+
beforeWrapper?: string;
|
|
50
|
+
children?: ReactNode;
|
|
39
51
|
className?: string;
|
|
52
|
+
dataTestId?: string;
|
|
40
53
|
dataTour?: string;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
54
|
+
isActive?: boolean;
|
|
55
|
+
isDisabled?: boolean;
|
|
56
|
+
isSkeleton?: boolean;
|
|
57
|
+
onClick: () => void;
|
|
44
58
|
style?: CSSProperties;
|
|
45
|
-
tag
|
|
59
|
+
tag: TextTagProps;
|
|
46
60
|
text?: string;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
61
|
+
};
|
|
62
|
+
type TitleAppearanceKey = AppearanceKeysDefault | AppearanceShapeKey | AppearanceStyleKey | AppearanceTitleSizeKey;
|
|
63
|
+
type TitleAppearance = {
|
|
64
|
+
[key in TitleAppearanceKey]?: TitleAppearanceProps;
|
|
65
|
+
};
|
|
66
|
+
type TitleConfig = {
|
|
67
|
+
appearance: TitleAppearance;
|
|
68
|
+
setAppearance: (appearanceConfig: TitleAppearance) => void;
|
|
69
|
+
};
|
|
70
|
+
export type { TitleAppearance, TitleConfig, TitleProps };
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
fill: string;
|
|
4
|
-
fillHover: string;
|
|
5
|
-
};
|
|
6
|
-
accentPrimary: {
|
|
7
|
-
fill: string;
|
|
8
|
-
fillHover: string;
|
|
9
|
-
borderColor: string;
|
|
10
|
-
};
|
|
11
|
-
accentSecondary: {
|
|
12
|
-
fill: string;
|
|
13
|
-
fillHover: string;
|
|
14
|
-
labelTextColor: string;
|
|
15
|
-
labelTextColorHover: string;
|
|
16
|
-
borderColor: string;
|
|
17
|
-
loaderItemFill: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
1
|
+
import { TitleAppearance } from '../Title.interface';
|
|
2
|
+
declare const titleAppearanceAccent: TitleAppearance;
|
|
20
3
|
export { titleAppearanceAccent };
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
fill: string;
|
|
4
|
-
borderColor: string;
|
|
5
|
-
borderHover: string;
|
|
6
|
-
textColor: string;
|
|
7
|
-
iconBeforeFill: string;
|
|
8
|
-
iconClearFill: string;
|
|
9
|
-
placeholderTextColor: string;
|
|
10
|
-
};
|
|
11
|
-
disabledSecondary: {
|
|
12
|
-
fill: string;
|
|
13
|
-
borderColor: string;
|
|
14
|
-
borderHover: string;
|
|
15
|
-
iconBeforeFill: string;
|
|
16
|
-
iconClearFill: string;
|
|
17
|
-
placeholderTextColor: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
1
|
+
import { TitleAppearance } from '../Title.interface';
|
|
2
|
+
declare const titleAppearanceDisabled: TitleAppearance;
|
|
20
3
|
export { titleAppearanceDisabled };
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
fill: string;
|
|
4
|
-
fillHover: string;
|
|
5
|
-
labelTextColor: string;
|
|
6
|
-
labelTextColorHover: string;
|
|
7
|
-
loaderFill: string;
|
|
8
|
-
loaderItemFill: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
1
|
+
import { TitleAppearance } from '../Title.interface';
|
|
2
|
+
declare const titleAppearanceError: TitleAppearance;
|
|
11
3
|
export { titleAppearanceError };
|
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
fill: string;
|
|
4
|
-
fillHover: string;
|
|
5
|
-
labelTextColor: string;
|
|
6
|
-
labelTextColorHover: string;
|
|
7
|
-
borderColor: string;
|
|
8
|
-
loaderFill: string;
|
|
9
|
-
loaderItemFill: string;
|
|
10
|
-
};
|
|
11
|
-
infoSecondary: {
|
|
12
|
-
fill: string;
|
|
13
|
-
fillHover: string;
|
|
14
|
-
labelTextColor: string;
|
|
15
|
-
labelTextColorHover: string;
|
|
16
|
-
borderColor: string;
|
|
17
|
-
loaderFill: string;
|
|
18
|
-
loaderItemFill: string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
1
|
+
import { TitleAppearance } from '../Title.interface';
|
|
2
|
+
declare const titleAppearanceInfo: TitleAppearance;
|
|
21
3
|
export { titleAppearanceInfo };
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
fill: string;
|
|
4
|
-
fillHover: string;
|
|
5
|
-
labelTextColor: string;
|
|
6
|
-
};
|
|
7
|
-
};
|
|
1
|
+
import { TitleAppearance } from '../Title.interface';
|
|
2
|
+
declare const titleAppearancePrimary: TitleAppearance;
|
|
8
3
|
export { titleAppearancePrimary };
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
fill: string;
|
|
4
|
-
borderColor: string;
|
|
5
|
-
borderHover: string;
|
|
6
|
-
textColor: string;
|
|
7
|
-
iconBeforeFill: string;
|
|
8
|
-
iconClearFill: string;
|
|
9
|
-
placeholderTextColor: string;
|
|
10
|
-
};
|
|
11
|
-
requireSecondary: {
|
|
12
|
-
fill: string;
|
|
13
|
-
borderColor: string;
|
|
14
|
-
borderHover: string;
|
|
15
|
-
iconBeforeFill: string;
|
|
16
|
-
iconClearFill: string;
|
|
17
|
-
placeholderTextColor: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
1
|
+
import { TitleAppearance } from '../Title.interface';
|
|
2
|
+
declare const titleAppearanceRequire: TitleAppearance;
|
|
20
3
|
export { titleAppearanceRequire };
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
fill: string;
|
|
4
|
-
fillHover: string;
|
|
5
|
-
labelTextColor: string;
|
|
6
|
-
};
|
|
7
|
-
};
|
|
1
|
+
import { TitleAppearance } from '../Title.interface';
|
|
2
|
+
declare const titleAppearanceSecondary: TitleAppearance;
|
|
8
3
|
export { titleAppearanceSecondary };
|
|
@@ -1,45 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
size: string;
|
|
4
|
-
iconAfterFillSize: string;
|
|
5
|
-
iconAfterSize: string;
|
|
6
|
-
iconBeforeFillSize: string;
|
|
7
|
-
iconBeforeSize: string;
|
|
8
|
-
};
|
|
9
|
-
h2: {
|
|
10
|
-
size: string;
|
|
11
|
-
iconAfterFillSize: string;
|
|
12
|
-
iconAfterSize: string;
|
|
13
|
-
iconBeforeFillSize: string;
|
|
14
|
-
iconBeforeSize: string;
|
|
15
|
-
};
|
|
16
|
-
h3: {
|
|
17
|
-
size: string;
|
|
18
|
-
iconAfterFillSize: string;
|
|
19
|
-
iconAfterSize: string;
|
|
20
|
-
iconBeforeFillSize: string;
|
|
21
|
-
iconBeforeSize: string;
|
|
22
|
-
};
|
|
23
|
-
h4: {
|
|
24
|
-
size: string;
|
|
25
|
-
iconAfterFillSize: string;
|
|
26
|
-
iconAfterSize: string;
|
|
27
|
-
iconBeforeFillSize: string;
|
|
28
|
-
iconBeforeSize: string;
|
|
29
|
-
};
|
|
30
|
-
h5: {
|
|
31
|
-
size: string;
|
|
32
|
-
iconAfterFillSize: string;
|
|
33
|
-
iconAfterSize: string;
|
|
34
|
-
iconBeforeFillSize: string;
|
|
35
|
-
iconBeforeSize: string;
|
|
36
|
-
};
|
|
37
|
-
h6: {
|
|
38
|
-
size: string;
|
|
39
|
-
iconAfterFillSize: string;
|
|
40
|
-
iconAfterSize: string;
|
|
41
|
-
iconBeforeFillSize: string;
|
|
42
|
-
iconBeforeSize: string;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
1
|
+
import { TitleAppearance } from '../Title.interface';
|
|
2
|
+
declare const titleAppearanceSize: TitleAppearance;
|
|
45
3
|
export { titleAppearanceSize };
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
borderColor: string;
|
|
4
|
-
};
|
|
5
|
-
ghost: {
|
|
6
|
-
fill: string;
|
|
7
|
-
borderColor: string;
|
|
8
|
-
};
|
|
9
|
-
outlined: {
|
|
10
|
-
fill: string;
|
|
11
|
-
};
|
|
12
|
-
solid: {
|
|
13
|
-
borderColor: string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
1
|
+
import { TitleAppearance } from '../Title.interface';
|
|
2
|
+
declare const titleAppearanceStyle: TitleAppearance;
|
|
16
3
|
export { titleAppearanceStyle };
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
fill: string;
|
|
4
|
-
fillHover: string;
|
|
5
|
-
labelTextColor: string;
|
|
6
|
-
labelTextColorHover: string;
|
|
7
|
-
loaderFill: string;
|
|
8
|
-
loaderItemFill: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
1
|
+
import { TitleAppearance } from '../Title.interface';
|
|
2
|
+
declare const titleAppearanceSuccess: TitleAppearance;
|
|
11
3
|
export { titleAppearanceSuccess };
|
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
fill: string;
|
|
4
|
-
fillHover: string;
|
|
5
|
-
labelTextColor: string;
|
|
6
|
-
};
|
|
7
|
-
surfaceSecondary: {
|
|
8
|
-
fill: string;
|
|
9
|
-
fillHover: string;
|
|
10
|
-
labelTextColor: string;
|
|
11
|
-
loaderFill: string;
|
|
12
|
-
loaderItemFill: string;
|
|
13
|
-
};
|
|
14
|
-
surfaceTertiary: {
|
|
15
|
-
fill: string;
|
|
16
|
-
fillHover: string;
|
|
17
|
-
labelTextColor: string;
|
|
18
|
-
};
|
|
19
|
-
surfaceQuaternary: {
|
|
20
|
-
fill: string;
|
|
21
|
-
fillHover: string;
|
|
22
|
-
labelTextColor: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
1
|
+
import { TitleAppearance } from '../Title.interface';
|
|
2
|
+
declare const titleAppearanceSurface: TitleAppearance;
|
|
25
3
|
export { titleAppearanceSurface };
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
fill: string;
|
|
4
|
-
fillHover: string;
|
|
5
|
-
labelTextColor: string;
|
|
6
|
-
labelTextColorHover: string;
|
|
7
|
-
loaderFill: string;
|
|
8
|
-
loaderItemFill: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
1
|
+
import { TitleAppearance } from '../Title.interface';
|
|
2
|
+
declare const titleAppearanceWarning: TitleAppearance;
|
|
11
3
|
export { titleAppearanceWarning };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { StyleAttributeOrValidator } from 'src/hooks/useStyles/styleAttributes.interface';
|
|
2
|
+
declare const getStyleAttributeKey: (targetStyleAttribute: StyleAttributeOrValidator) => "fixed" | "hug" | "fill" | import("src/hooks/useStyles/styleAttributes.interface").StyleAttributes | import("csstype").Property.Width<0 | (string & {})> | undefined;
|
|
3
|
+
export { getStyleAttributeKey };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RulesConfig } from './useActiveClasses.interface';
|
|
2
|
+
declare const CLASS_RULES: Record<string, RulesConfig[]>;
|
|
3
|
+
declare const formatState: (key: string) => string;
|
|
4
|
+
declare const toKebabCase: (str: string) => string;
|
|
5
|
+
export { CLASS_RULES, formatState, toKebabCase };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare const suffix: readonly ["Button", "Checkbox", "Radio", "Checkmark", "Avatar", "AvatarStack", "Badge", "Breadcrumbs", "Cell", "Chips", "Choice", "Code", "CookiesWarning", "Dadata", "DatePeriod", "Divider", "Dot", "Drawer", "Dropdown", "DropdownItem", "Flex", "Grid", "Group", "HeroTitle", "HTMLContent", "Icon", "Image", "Input", "InputPassword", "Label", "Link", "List", "Loader", "Logo", "MenuItem", "Modal", "ModalSheetBottom", "Notification", "Overlay", "Pagination", "RangeSlider", "Response", "ScrollBar", "ScrollOnDrag", "ScrollToView", "Search", "Segmented", "Select", "SvgContent", "Swiper", "Switch", "Tab", "Text", "Textarea", "Tile", "Title", "Tooltip", "Video", "Warning"];
|
|
2
|
+
type SuffixComponents = (typeof suffix)[number];
|
|
3
|
+
type SpecialSuffix<T extends string> = T extends 'HTMLContent' ? 'htmlContent' : Uncapitalize<T>;
|
|
4
|
+
type SuffixKeys = SpecialSuffix<SuffixComponents>;
|
|
5
|
+
interface PropsGenerator {
|
|
6
|
+
[key: string]: string;
|
|
7
|
+
}
|
|
8
|
+
interface UseActiveClassesReturn {
|
|
9
|
+
rootClasses: string;
|
|
10
|
+
suffixClasses: Record<SuffixKeys, string>;
|
|
11
|
+
}
|
|
12
|
+
interface UseActiveClasses {
|
|
13
|
+
propsGenerator: PropsGenerator;
|
|
14
|
+
suffixes?: SuffixComponents[];
|
|
15
|
+
isActive?: boolean;
|
|
16
|
+
isDisabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface RulesConfig {
|
|
19
|
+
key: string;
|
|
20
|
+
stateFn?: (params: {
|
|
21
|
+
isActive?: boolean;
|
|
22
|
+
isDisabled?: boolean;
|
|
23
|
+
}) => boolean;
|
|
24
|
+
}
|
|
25
|
+
export { suffix };
|
|
26
|
+
export type { SuffixComponents, SuffixKeys, UseActiveClassesReturn, UseActiveClasses, RulesConfig, };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { KebabCase, WithClassKeys } from 'src/types';
|
|
2
2
|
import type { AppearanceConfig, ComponentProps, GeneratorGetClassParams as GP } from './useDevicePropsGenerator.interface';
|
|
3
3
|
declare function useDevicePropsGenerator<Props extends ComponentProps>(componentProps: Props, appearanceConfig?: AppearanceConfig): Props & {
|
|
4
|
-
getProp(propKey: string): string;
|
|
4
|
+
getProp(propKey: string): number | string | undefined;
|
|
5
5
|
getClassName<K extends keyof Props, P extends GP | undefined = undefined>(propKey: K, params?: P): ReturnGetClassName<Props, K, P>;
|
|
6
6
|
} & WithClassKeys<Props>;
|
|
7
7
|
type ReturnGetClassName<Props, K extends keyof Props, Params = undefined> = Params extends undefined ? NonNullable<Props[K]> extends string ? KebabCase<NonNullable<Props[K]>> : string : Props[K];
|
|
@@ -135,4 +135,7 @@ export interface TypeStyleLabelAttributes extends LabelInterface<StyleAttributes
|
|
|
135
135
|
}
|
|
136
136
|
export interface TypeStyleImageAttributes extends ImageInterface<StyleAttributes> {
|
|
137
137
|
}
|
|
138
|
+
export type StyleAttributeOrValidator = StyleAttributes | [StyleAttributes['width'], {
|
|
139
|
+
validate?: (value: string) => boolean;
|
|
140
|
+
}];
|
|
138
141
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/ui",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.109",
|
|
4
4
|
"description": "UI components (Modal, Loader, Popup, etc)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Modal",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"@emotion/is-prop-valid": "^1.3.1",
|
|
104
104
|
"@itcase/common": "^1.2.29",
|
|
105
105
|
"@itcase/icons": "^1.2.19",
|
|
106
|
-
"@itcase/storybook-config": "^1.1.
|
|
106
|
+
"@itcase/storybook-config": "^1.1.112",
|
|
107
107
|
"@itcase/tokens-am": "^1.1.19",
|
|
108
108
|
"@itcase/tokens-baikal": "^1.1.17",
|
|
109
109
|
"@itcase/tokens-palette": "^1.1.11",
|
|
@@ -139,9 +139,9 @@
|
|
|
139
139
|
"@babel/preset-react": "^7.27.1",
|
|
140
140
|
"@commitlint/cli": "^19.8.1",
|
|
141
141
|
"@commitlint/config-conventional": "^19.8.1",
|
|
142
|
-
"@itcase/config": "^1.0.
|
|
142
|
+
"@itcase/config": "^1.0.56",
|
|
143
143
|
"@itcase/lint": "^1.1.37",
|
|
144
|
-
"@itcase/types": "^1.0.
|
|
144
|
+
"@itcase/types": "^1.0.42",
|
|
145
145
|
"@rollup/plugin-alias": "^5.1.1",
|
|
146
146
|
"@rollup/plugin-babel": "^6.0.4",
|
|
147
147
|
"@rollup/plugin-commonjs": "^28.0.6",
|
|
@@ -171,13 +171,13 @@
|
|
|
171
171
|
"lint-staged": "^16.1.5",
|
|
172
172
|
"prettier": "^3.6.2",
|
|
173
173
|
"react-docgen-typescript": "^2.4.0",
|
|
174
|
-
"rollup": "^4.47.
|
|
174
|
+
"rollup": "^4.47.1",
|
|
175
175
|
"rollup-plugin-copy": "^3.5.0",
|
|
176
176
|
"rollup-plugin-dts": "^6.2.3",
|
|
177
177
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
178
178
|
"rollup-preserve-directives": "^1.1.3",
|
|
179
179
|
"semantic-release": "^24.2.7",
|
|
180
|
-
"storybook": "^9.1.
|
|
180
|
+
"storybook": "^9.1.3",
|
|
181
181
|
"stylelint": "^16.23.1",
|
|
182
182
|
"typescript": "^5.9.2"
|
|
183
183
|
}
|