@itcase/ui 1.8.109 → 1.8.111
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_joB9qjwk.js → Avatar_cjs_CQhA8iu9.js} +2 -2
- package/dist/{Avatar_es_C3HGSiHU.js → Avatar_es__NA_FQGM.js} +2 -2
- package/dist/{Button_cjs_mau_55Fl.js → Button_cjs_B2eZhvoC.js} +5 -5
- package/dist/{Button_es_D_IlkeBp.js → Button_es_C8qinRU4.js} +5 -5
- package/dist/{ChipsGroup_cjs_D454M1-p.js → ChipsGroup_cjs_ChJ71i_A.js} +2 -2
- package/dist/{ChipsGroup_es_BKG5mK5N.js → ChipsGroup_es_Dj0Lu5zm.js} +2 -2
- package/dist/{DatePicker_cjs_Bm8nwWKa.js → DatePicker_cjs_CpN9wFK4.js} +5 -5
- package/dist/{DatePicker_es_DAV92A4A.js → DatePicker_es_B6WjNDiN.js} +5 -5
- package/dist/{DropdownItem_cjs_D2hHKA5E.js → DropdownItem_cjs_DUIefLij.js} +2 -2
- package/dist/{DropdownItem_es_D9JBMV70.js → DropdownItem_es_uFi08Joi.js} +2 -2
- package/dist/{Icon_cjs_ZerVip3X.js → Icon_cjs_D-UNVTqI.js} +6 -6
- package/dist/{Icon_es_C76te22j.js → Icon_es_Cstv1LFr.js} +6 -6
- package/dist/{Input_cjs_CFy0tfAO.js → Input_cjs_D18gXu6j.js} +23 -39
- package/dist/{Input_es_l3ry6luZ.js → Input_es_CHuhHbMo.js} +23 -39
- package/dist/{Label_cjs_CaTh_laL.js → Label_cjs_BvS_ANE3.js} +4 -4
- package/dist/{Label_es_CoIII7Ty.js → Label_es_C4Icioi8.js} +4 -4
- package/dist/{Link_cjs_BqT6eVl6.js → Link_cjs_C5UsZUiF.js} +2 -2
- package/dist/{Link_es_BnUIX0QT.js → Link_es_XiqbdwLp.js} +2 -2
- package/dist/{Loader_cjs_c6yF7akz.js → Loader_cjs_Cme6Hi0B.js} +3 -3
- package/dist/{Loader_es_C8ETXkiZ.js → Loader_es_ByhTIMxS.js} +3 -3
- package/dist/{Text_cjs_DpRclhwc.js → Text_cjs_0EINiUq4.js} +7 -4
- package/dist/{Text_es_CtCwsa3V.js → Text_es_CwV9rjFD.js} +7 -4
- package/dist/cjs/components/Accordion.js +3 -3
- package/dist/cjs/components/Avatar.js +4 -4
- package/dist/cjs/components/AvatarStack.js +4 -4
- package/dist/cjs/components/Badge.js +3 -3
- package/dist/cjs/components/Breadcrumbs.js +3 -3
- package/dist/cjs/components/Button.js +5 -5
- package/dist/cjs/components/Cell.js +4 -4
- package/dist/cjs/components/Checkbox.js +2 -2
- package/dist/cjs/components/Chips.js +4 -4
- package/dist/cjs/components/Choice.js +25 -23
- package/dist/cjs/components/Code.js +3 -3
- package/dist/cjs/components/CookiesWarning.js +5 -5
- package/dist/cjs/components/Dadata.js +1 -1
- package/dist/cjs/components/DatePeriod.js +11 -11
- package/dist/cjs/components/DatePicker.js +8 -8
- package/dist/cjs/components/Drawer.js +3 -3
- package/dist/cjs/components/Dropdown.js +4 -4
- package/dist/cjs/components/HeroTitle.js +5 -5
- package/dist/cjs/components/Icon.js +3 -3
- package/dist/cjs/components/Input.js +1 -1
- package/dist/cjs/components/InputPassword.js +6 -10
- package/dist/cjs/components/Label.js +4 -4
- package/dist/cjs/components/Link.js +1 -1
- package/dist/cjs/components/List.js +1 -1
- package/dist/cjs/components/Loader.js +2 -2
- package/dist/cjs/components/Logo.js +1 -1
- package/dist/cjs/components/MenuItem.js +4 -4
- package/dist/cjs/components/Modal.js +6 -6
- package/dist/cjs/components/ModalSheetBottom.js +5 -5
- package/dist/cjs/components/Notification.js +3 -3
- package/dist/cjs/components/Pagination.js +6 -6
- package/dist/cjs/components/Radio.js +58 -36
- package/dist/cjs/components/Response.js +5 -5
- package/dist/cjs/components/Search.js +5 -5
- package/dist/cjs/components/Segmented.js +12 -11
- package/dist/cjs/components/Select.js +104 -78
- package/dist/cjs/components/Swiper.js +3 -3
- package/dist/cjs/components/Switch.js +2 -2
- package/dist/cjs/components/Tab.js +4 -4
- package/dist/cjs/components/Text.js +1 -1
- package/dist/cjs/components/Textarea.js +31 -26
- package/dist/cjs/components/Tile.js +3 -3
- package/dist/cjs/components/Title.js +3 -3
- package/dist/cjs/components/Tooltip.js +3 -3
- package/dist/cjs/components/Warning.js +3 -3
- package/dist/cjs/hoc/urlWithAssetPrefix.js +17 -0
- package/dist/cjs/hooks/useAppearanceConfig/useAppearanceConfig.js +8 -4
- package/dist/cjs/hooks/useStyles/useStyles.js +0 -1
- package/dist/components/Accordion.js +3 -3
- package/dist/components/Avatar.js +4 -4
- package/dist/components/AvatarStack.js +4 -4
- package/dist/components/Badge.js +3 -3
- package/dist/components/Breadcrumbs.js +3 -3
- package/dist/components/Button.js +5 -5
- package/dist/components/Cell.js +4 -4
- package/dist/components/Checkbox.js +2 -2
- package/dist/components/Chips.js +4 -4
- package/dist/components/Choice.js +25 -23
- package/dist/components/Code.js +3 -3
- package/dist/components/CookiesWarning.js +5 -5
- package/dist/components/Dadata.js +1 -1
- package/dist/components/DatePeriod.js +11 -11
- package/dist/components/DatePicker.js +8 -8
- package/dist/components/Drawer.js +3 -3
- package/dist/components/Dropdown.js +4 -4
- package/dist/components/HeroTitle.js +5 -5
- package/dist/components/Icon.js +3 -3
- package/dist/components/Input.js +1 -1
- package/dist/components/InputPassword.js +6 -10
- package/dist/components/Label.js +4 -4
- package/dist/components/Link.js +1 -1
- package/dist/components/List.js +1 -1
- package/dist/components/Loader.js +2 -2
- package/dist/components/Logo.js +1 -1
- package/dist/components/MenuItem.js +4 -4
- package/dist/components/Modal.js +6 -6
- package/dist/components/ModalSheetBottom.js +5 -5
- package/dist/components/Notification.js +3 -3
- package/dist/components/Pagination.js +6 -6
- package/dist/components/Radio.js +58 -36
- package/dist/components/Response.js +5 -5
- package/dist/components/Search.js +5 -5
- package/dist/components/Segmented.js +12 -11
- package/dist/components/Select.js +104 -78
- package/dist/components/Swiper.js +3 -3
- package/dist/components/Switch.js +2 -2
- package/dist/components/Tab.js +4 -4
- package/dist/components/Text.js +1 -1
- package/dist/components/Textarea.js +31 -26
- package/dist/components/Tile.js +3 -3
- package/dist/components/Title.js +3 -3
- package/dist/components/Tooltip.js +3 -3
- package/dist/components/Warning.js +3 -3
- package/dist/css/components/Choice/Choice.css +34 -23
- package/dist/css/components/Choice/css/__item/choice__item.css +1 -1
- package/dist/css/components/Choice/css/__item/choice__item_size.css +8 -3
- package/dist/css/components/DatePicker/DatePicker.css +18 -18
- package/dist/css/components/Group/Group.css +5 -0
- package/dist/css/components/Input/Input.css +21 -19
- package/dist/css/components/Radio/Radio.css +436 -5
- package/dist/css/components/Segmented/Segmented.css +15 -17
- package/dist/css/components/Segmented/css/__item/segmaented__item.css +12 -0
- package/dist/css/components/Select/Select.css +20 -6
- package/dist/css/components/Select/css/__placeholder/select__placeholder.css +3 -0
- package/dist/css/components/Select/css/__single-value/select__single-value.css +5 -0
- package/dist/css/components/Textarea/Textarea.css +7 -6
- package/dist/css/styles/bundle.css +36 -45
- package/dist/css/styles/fill/fill.css +0 -3
- package/dist/css/styles/text-align/text-align.css +1 -1
- package/dist/css/styles/text-weight/text-weight.css +35 -41
- package/dist/hoc/urlWithAssetPrefix.js +17 -0
- package/dist/hooks/useAppearanceConfig/useAppearanceConfig.js +8 -4
- package/dist/hooks/useStyles/useStyles.js +0 -1
- package/dist/types/components/Choice/appearance/choiceDefault.d.ts +1 -0
- package/dist/types/components/Choice/appearance/choiceDisabled.d.ts +3 -1
- package/dist/types/components/Code/Code.interface.d.ts +1 -0
- package/dist/types/components/Image/Image.d.ts +1 -2
- package/dist/types/components/Input/appearance/inputDefault.d.ts +2 -2
- package/dist/types/components/Input/appearance/inputDisabled.d.ts +1 -0
- package/dist/types/components/Input/appearance/inputRequire.d.ts +1 -0
- package/dist/types/components/Input/appearance/inputShape.d.ts +4 -4
- package/dist/types/components/Input/appearance/inputStyle.d.ts +1 -0
- package/dist/types/components/Logo/Logo.d.ts +2 -2
- package/dist/types/components/Radio/Radio.appearance.d.ts +37 -16
- package/dist/types/components/Radio/appearance/radioDefault.d.ts +7 -4
- package/dist/types/components/Radio/appearance/radioDisabled.d.ts +4 -2
- package/dist/types/components/Radio/appearance/radioError.d.ts +4 -2
- package/dist/types/components/Radio/appearance/radioRequire.d.ts +4 -2
- package/dist/types/components/Radio/appearance/radioShape.d.ts +4 -4
- package/dist/types/components/Radio/appearance/radioStyle.d.ts +10 -0
- package/dist/types/components/Radio/appearance/radioSuccess.d.ts +4 -2
- package/dist/types/components/Response/Response.d.ts +2 -2
- package/dist/types/components/SVGContent/SVGContent.d.ts +1 -2
- package/dist/types/components/Segmented/appearance/segmentedWarning.d.ts +1 -0
- package/dist/types/components/Select/appearance/selectDefault.d.ts +5 -5
- package/dist/types/components/Select/appearance/selectDisabled.d.ts +0 -1
- package/dist/types/components/Select/appearance/selectError.d.ts +16 -8
- package/dist/types/components/Select/appearance/selectRequire.d.ts +16 -8
- package/dist/types/components/Select/appearance/selectShape.d.ts +4 -4
- package/dist/types/components/Select/appearance/selectSize.d.ts +3 -0
- package/dist/types/components/Select/appearance/selectStyle.d.ts +5 -4
- package/dist/types/components/Select/appearance/selectSuccess.d.ts +16 -10
- package/dist/types/components/Textarea/appearance/textareaDefault.d.ts +7 -5
- package/dist/types/components/Textarea/appearance/textareaDisabled.d.ts +2 -2
- package/dist/types/components/Textarea/appearance/textareaError.d.ts +2 -2
- package/dist/types/components/Textarea/appearance/textareaRequire.d.ts +2 -2
- package/dist/types/components/Textarea/appearance/textareaShape.d.ts +4 -4
- package/dist/types/components/Textarea/appearance/textareaStyle.d.ts +4 -2
- package/dist/types/components/Textarea/appearance/textareaSuccess.d.ts +3 -2
- package/dist/types/hoc/urlWithAssetPrefix.d.ts +27 -8
- package/dist/types/hooks/useAppearanceConfig/useAppearanceConfig.d.ts +1 -1
- package/dist/types/types/utils.d.ts +34 -0
- package/package.json +3 -3
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
declare const selectAppearanceDefault: {
|
|
2
2
|
defaultPrimary: {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
fill: string;
|
|
4
|
+
fillHover: string;
|
|
5
5
|
optionFillDisabled: string;
|
|
6
6
|
optionTextColorDisabled: string;
|
|
7
|
+
borderColor: string;
|
|
8
|
+
borderColorHover: string;
|
|
9
|
+
elevation: number;
|
|
7
10
|
badgeAppearance: string;
|
|
8
11
|
clearIconFill: string;
|
|
9
12
|
dropdownIconFill: string;
|
|
10
13
|
groupFill: string;
|
|
11
14
|
groupTextColor: string;
|
|
12
15
|
groupTextWeight: string;
|
|
13
|
-
inputBorderColor: string;
|
|
14
|
-
inputBorderColorHover: string;
|
|
15
16
|
inputCaretColor: string;
|
|
16
|
-
inputFill: string;
|
|
17
17
|
inputTextColor: string;
|
|
18
18
|
loaderAppearance: string;
|
|
19
19
|
loadingMessageTextColor: string;
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
declare const selectAppearanceError: {
|
|
2
2
|
errorPrimary: {
|
|
3
|
+
fill: string;
|
|
4
|
+
fillHover: string;
|
|
5
|
+
optionFillDisabled: string;
|
|
6
|
+
optionTextColorDisabled: string;
|
|
7
|
+
borderColor: string;
|
|
8
|
+
borderColorHover: string;
|
|
3
9
|
elevation: number;
|
|
4
|
-
errorInputBorderColor: string;
|
|
5
10
|
badgeAppearance: string;
|
|
6
11
|
clearIconFill: string;
|
|
7
12
|
dropdownIconFill: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
inputBorderColorHover: string;
|
|
13
|
+
groupFill: string;
|
|
14
|
+
groupTextColor: string;
|
|
15
|
+
groupTextWeight: string;
|
|
12
16
|
inputCaretColor: string;
|
|
13
|
-
inputFill: string;
|
|
14
|
-
inputShape: string;
|
|
15
17
|
inputTextColor: string;
|
|
18
|
+
loaderAppearance: string;
|
|
19
|
+
loadingMessageTextColor: string;
|
|
20
|
+
menuFill: string;
|
|
16
21
|
multipleItemFill: string;
|
|
17
22
|
multipleItemFillHover: string;
|
|
18
23
|
multipleItemIconFill: string;
|
|
@@ -21,9 +26,12 @@ declare const selectAppearanceError: {
|
|
|
21
26
|
noOptionsTextColor: string;
|
|
22
27
|
optionBorder: string;
|
|
23
28
|
optionFill: string;
|
|
29
|
+
optionFillActive: string;
|
|
30
|
+
optionFillActiveHover: string;
|
|
24
31
|
optionFillHover: string;
|
|
25
|
-
|
|
32
|
+
optionSelectedIconFillIcon: string;
|
|
26
33
|
optionTextColor: string;
|
|
34
|
+
optionTextColorActive: string;
|
|
27
35
|
placeholderTextColor: string;
|
|
28
36
|
requiredInputBorderColor: string;
|
|
29
37
|
};
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
declare const selectAppearanceRequire: {
|
|
2
2
|
requirePrimary: {
|
|
3
|
+
fill: string;
|
|
4
|
+
fillHover: string;
|
|
5
|
+
optionFillDisabled: string;
|
|
6
|
+
optionTextColorDisabled: string;
|
|
7
|
+
borderColor: string;
|
|
8
|
+
borderColorHover: string;
|
|
3
9
|
elevation: number;
|
|
4
|
-
errorInputBorderColor: string;
|
|
5
10
|
badgeAppearance: string;
|
|
6
11
|
clearIconFill: string;
|
|
7
12
|
dropdownIconFill: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
inputBorderColorHover: string;
|
|
13
|
+
groupFill: string;
|
|
14
|
+
groupTextColor: string;
|
|
15
|
+
groupTextWeight: string;
|
|
12
16
|
inputCaretColor: string;
|
|
13
|
-
inputFill: string;
|
|
14
|
-
inputShape: string;
|
|
15
17
|
inputTextColor: string;
|
|
18
|
+
loaderAppearance: string;
|
|
19
|
+
loadingMessageTextColor: string;
|
|
20
|
+
menuFill: string;
|
|
16
21
|
multipleItemFill: string;
|
|
17
22
|
multipleItemFillHover: string;
|
|
18
23
|
multipleItemIconFill: string;
|
|
@@ -21,9 +26,12 @@ declare const selectAppearanceRequire: {
|
|
|
21
26
|
noOptionsTextColor: string;
|
|
22
27
|
optionBorder: string;
|
|
23
28
|
optionFill: string;
|
|
29
|
+
optionFillActive: string;
|
|
30
|
+
optionFillActiveHover: string;
|
|
24
31
|
optionFillHover: string;
|
|
25
|
-
|
|
32
|
+
optionSelectedIconFillIcon: string;
|
|
26
33
|
optionTextColor: string;
|
|
34
|
+
optionTextColorActive: string;
|
|
27
35
|
placeholderTextColor: string;
|
|
28
36
|
requiredInputBorderColor: string;
|
|
29
37
|
};
|
|
@@ -2,19 +2,19 @@ declare const selectAppearanceShape: {
|
|
|
2
2
|
rounded: {
|
|
3
3
|
shape: string;
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
roundedXL: {
|
|
6
6
|
shape: string;
|
|
7
7
|
shapeStrength: string;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
roundedL: {
|
|
10
10
|
shape: string;
|
|
11
11
|
shapeStrength: string;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
roundedM: {
|
|
14
14
|
shape: string;
|
|
15
15
|
shapeStrength: string;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
roundedS: {
|
|
18
18
|
shape: string;
|
|
19
19
|
shapeStrength: string;
|
|
20
20
|
};
|
|
@@ -14,6 +14,7 @@ declare const selectAppearanceSize: {
|
|
|
14
14
|
multipleItemIcon: string;
|
|
15
15
|
multipleItemTextSize: string;
|
|
16
16
|
noOptionsTextSize: string;
|
|
17
|
+
optionSelectedIcon: string;
|
|
17
18
|
optionTextSize: string;
|
|
18
19
|
placeholderTextSize: string;
|
|
19
20
|
};
|
|
@@ -32,6 +33,7 @@ declare const selectAppearanceSize: {
|
|
|
32
33
|
multipleItemIcon: string;
|
|
33
34
|
multipleItemTextSize: string;
|
|
34
35
|
noOptionsTextSize: string;
|
|
36
|
+
optionSelectedIcon: string;
|
|
35
37
|
optionTextSize: string;
|
|
36
38
|
placeholderTextSize: string;
|
|
37
39
|
};
|
|
@@ -69,6 +71,7 @@ declare const selectAppearanceSize: {
|
|
|
69
71
|
multipleItemIcon: string;
|
|
70
72
|
multipleItemTextSize: string;
|
|
71
73
|
noOptionsTextSize: string;
|
|
74
|
+
optionSelectedIcon: string;
|
|
72
75
|
optionTextSize: string;
|
|
73
76
|
placeholderTextSize: string;
|
|
74
77
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
declare const selectAppearanceStyle: {
|
|
2
2
|
solid: {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
borderColor: string;
|
|
4
|
+
borderColorHover: string;
|
|
5
5
|
};
|
|
6
6
|
outlined: {
|
|
7
7
|
fill: string;
|
|
8
|
+
fillHover: string;
|
|
8
9
|
};
|
|
9
10
|
full: {};
|
|
10
11
|
ghost: {
|
|
11
12
|
fill: string;
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
borderColor: string;
|
|
14
|
+
borderColorHover: string;
|
|
14
15
|
};
|
|
15
16
|
};
|
|
16
17
|
export { selectAppearanceStyle };
|
|
@@ -1,31 +1,37 @@
|
|
|
1
1
|
declare const selectAppearanceSuccess: {
|
|
2
2
|
successPrimary: {
|
|
3
|
+
fill: string;
|
|
4
|
+
fillHover: string;
|
|
5
|
+
optionFillDisabled: string;
|
|
6
|
+
optionTextColorDisabled: string;
|
|
7
|
+
borderColor: string;
|
|
8
|
+
borderColorHover: string;
|
|
3
9
|
elevation: number;
|
|
4
|
-
errorInputBorderColor: string;
|
|
5
10
|
badgeAppearance: string;
|
|
6
11
|
clearIconFill: string;
|
|
7
12
|
dropdownIconFill: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
inputBorderColorHover: string;
|
|
13
|
+
groupFill: string;
|
|
14
|
+
groupTextColor: string;
|
|
15
|
+
groupTextWeight: string;
|
|
12
16
|
inputCaretColor: string;
|
|
13
|
-
inputFill: string;
|
|
14
|
-
inputShape: string;
|
|
15
17
|
inputTextColor: string;
|
|
18
|
+
loaderAppearance: string;
|
|
19
|
+
loadingMessageTextColor: string;
|
|
20
|
+
menuFill: string;
|
|
16
21
|
multipleItemFill: string;
|
|
17
22
|
multipleItemFillHover: string;
|
|
18
23
|
multipleItemIconFill: string;
|
|
19
24
|
multipleItemTextColor: string;
|
|
20
25
|
multipleTextColor: string;
|
|
21
|
-
noOptionsText: string;
|
|
22
26
|
noOptionsTextColor: string;
|
|
23
27
|
optionBorder: string;
|
|
24
28
|
optionFill: string;
|
|
29
|
+
optionFillActive: string;
|
|
30
|
+
optionFillActiveHover: string;
|
|
25
31
|
optionFillHover: string;
|
|
26
|
-
|
|
32
|
+
optionSelectedIconFillIcon: string;
|
|
27
33
|
optionTextColor: string;
|
|
28
|
-
|
|
34
|
+
optionTextColorActive: string;
|
|
29
35
|
placeholderTextColor: string;
|
|
30
36
|
requiredInputBorderColor: string;
|
|
31
37
|
};
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
declare const textareaAppearanceDefault: {
|
|
2
2
|
defaultPrimary: {
|
|
3
3
|
fill: string;
|
|
4
|
+
fillHover: string;
|
|
4
5
|
borderColor: string;
|
|
5
|
-
|
|
6
|
+
borderColorHover: string;
|
|
6
7
|
iconBeforeFill: string;
|
|
7
8
|
iconClearFill: string;
|
|
8
9
|
placeholderTextColor: string;
|
|
9
10
|
};
|
|
10
11
|
defaultSecondary: {
|
|
11
12
|
fill: string;
|
|
13
|
+
fillHover: string;
|
|
12
14
|
borderColor: string;
|
|
13
|
-
|
|
15
|
+
borderColorHover: string;
|
|
14
16
|
iconBeforeFill: string;
|
|
15
17
|
iconClearFill: string;
|
|
16
18
|
placeholderTextColor: string;
|
|
17
19
|
};
|
|
18
|
-
|
|
20
|
+
defaultTertiary: {
|
|
19
21
|
fill: string;
|
|
20
22
|
borderColor: string;
|
|
21
|
-
|
|
23
|
+
borderColorHover: string;
|
|
22
24
|
iconBeforeFill: string;
|
|
23
25
|
iconClearFill: string;
|
|
24
26
|
placeholderTextColor: string;
|
|
@@ -26,7 +28,7 @@ declare const textareaAppearanceDefault: {
|
|
|
26
28
|
defaultQuaternary: {
|
|
27
29
|
fill: string;
|
|
28
30
|
borderColor: string;
|
|
29
|
-
|
|
31
|
+
borderColorHover: string;
|
|
30
32
|
iconBeforeFill: string;
|
|
31
33
|
iconClearFill: string;
|
|
32
34
|
placeholderTextColor: string;
|
|
@@ -2,7 +2,7 @@ declare const textareaAppearanceDisabled: {
|
|
|
2
2
|
disabledPrimary: {
|
|
3
3
|
fill: string;
|
|
4
4
|
borderColor: string;
|
|
5
|
-
|
|
5
|
+
borderColorHover: string;
|
|
6
6
|
textColor: string;
|
|
7
7
|
iconBeforeFill: string;
|
|
8
8
|
iconClearFill: string;
|
|
@@ -11,7 +11,7 @@ declare const textareaAppearanceDisabled: {
|
|
|
11
11
|
disabledSecondary: {
|
|
12
12
|
fill: string;
|
|
13
13
|
borderColor: string;
|
|
14
|
-
|
|
14
|
+
borderColorHover: string;
|
|
15
15
|
iconBeforeFill: string;
|
|
16
16
|
iconClearFill: string;
|
|
17
17
|
placeholderTextColor: string;
|
|
@@ -2,7 +2,7 @@ declare const textareaAppearanceError: {
|
|
|
2
2
|
errorPrimary: {
|
|
3
3
|
fill: string;
|
|
4
4
|
borderColor: string;
|
|
5
|
-
|
|
5
|
+
borderColorHover: string;
|
|
6
6
|
textColor: string;
|
|
7
7
|
iconBeforeFill: string;
|
|
8
8
|
iconClearFill: string;
|
|
@@ -11,7 +11,7 @@ declare const textareaAppearanceError: {
|
|
|
11
11
|
errorSecondary: {
|
|
12
12
|
fill: string;
|
|
13
13
|
borderColor: string;
|
|
14
|
-
|
|
14
|
+
borderColorHover: string;
|
|
15
15
|
iconBeforeFill: string;
|
|
16
16
|
iconClearFill: string;
|
|
17
17
|
placeholderTextColor: string;
|
|
@@ -2,7 +2,7 @@ declare const textareaAppearanceRequire: {
|
|
|
2
2
|
requirePrimary: {
|
|
3
3
|
fill: string;
|
|
4
4
|
borderColor: string;
|
|
5
|
-
|
|
5
|
+
borderColorHover: string;
|
|
6
6
|
textColor: string;
|
|
7
7
|
iconBeforeFill: string;
|
|
8
8
|
iconClearFill: string;
|
|
@@ -11,7 +11,7 @@ declare const textareaAppearanceRequire: {
|
|
|
11
11
|
requireSecondary: {
|
|
12
12
|
fill: string;
|
|
13
13
|
borderColor: string;
|
|
14
|
-
|
|
14
|
+
borderColorHover: string;
|
|
15
15
|
iconBeforeFill: string;
|
|
16
16
|
iconClearFill: string;
|
|
17
17
|
placeholderTextColor: string;
|
|
@@ -5,19 +5,19 @@ declare const textareaAppearanceShape: {
|
|
|
5
5
|
rounded: {
|
|
6
6
|
shape: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
roundedXL: {
|
|
9
9
|
shape: string;
|
|
10
10
|
shapeStrength: string;
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
roundedL: {
|
|
13
13
|
shape: string;
|
|
14
14
|
shapeStrength: string;
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
roundedM: {
|
|
17
17
|
shape: string;
|
|
18
18
|
shapeStrength: string;
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
roundedS: {
|
|
21
21
|
shape: string;
|
|
22
22
|
shapeStrength: string;
|
|
23
23
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const textareaAppearanceStyle: {
|
|
2
2
|
solid: {
|
|
3
|
-
|
|
3
|
+
borderColor: string;
|
|
4
|
+
borderColorHover: string;
|
|
4
5
|
};
|
|
5
6
|
outlined: {
|
|
6
7
|
fill: string;
|
|
@@ -8,7 +9,8 @@ declare const textareaAppearanceStyle: {
|
|
|
8
9
|
full: {};
|
|
9
10
|
ghost: {
|
|
10
11
|
fill: string;
|
|
11
|
-
|
|
12
|
+
borderColor: string;
|
|
13
|
+
borderColorHover: string;
|
|
12
14
|
};
|
|
13
15
|
};
|
|
14
16
|
export { textareaAppearanceStyle };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
declare const textareaAppearanceSuccess: {
|
|
2
2
|
successPrimary: {
|
|
3
3
|
fill: string;
|
|
4
|
+
fillHover: string;
|
|
4
5
|
borderColor: string;
|
|
5
|
-
|
|
6
|
+
borderColorHover: string;
|
|
6
7
|
textColor: string;
|
|
7
8
|
iconBeforeFill: string;
|
|
8
9
|
iconClearFill: string;
|
|
@@ -11,7 +12,7 @@ declare const textareaAppearanceSuccess: {
|
|
|
11
12
|
successSecondary: {
|
|
12
13
|
fill: string;
|
|
13
14
|
borderColor: string;
|
|
14
|
-
|
|
15
|
+
borderColorHover: string;
|
|
15
16
|
iconBeforeFill: string;
|
|
16
17
|
iconClearFill: string;
|
|
17
18
|
placeholderTextColor: string;
|
|
@@ -1,9 +1,28 @@
|
|
|
1
|
-
import React
|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ComponentType, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
|
|
3
|
+
import { RequireAtLeastOneProp, RequireAtLeastOnePropError } from 'src/types';
|
|
4
|
+
type UrlPropKeys = (typeof urlPropsList)[number];
|
|
5
|
+
type OnePropCheckError = [
|
|
6
|
+
'urlWithAssetPrefix: компонент должен содержать хотя бы один из пропсов',
|
|
7
|
+
UrlPropKeys
|
|
8
|
+
];
|
|
9
|
+
declare const urlPropsList: readonly ["src", "imageSrc", "svgSrc", "placeholderUrl"];
|
|
10
|
+
/**
|
|
11
|
+
* HOC, который добавляет assetPrefix к URL-пропсам.
|
|
12
|
+
*
|
|
13
|
+
* @template P - Тип пропсов оборачиваемого компонента.
|
|
14
|
+
* @template T - Тип ref (если используется forwardRef).
|
|
15
|
+
* @template Check - Проверка на наличие хотя бы одного URL-пропа.
|
|
16
|
+
*
|
|
17
|
+
* @param WrappedComponent - Компонент, который оборачиваем.
|
|
18
|
+
* @param _error - Проверка: если ни одного URL-пропа нет, будет ошибка компиляции.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const A = (props: { src?: string }) => <div />;
|
|
22
|
+
* urlWithAssetPrefix(A); // ✅ OK
|
|
23
|
+
*
|
|
24
|
+
* const B = (props: { id: string }) => <div />;
|
|
25
|
+
* urlWithAssetPrefix(B); // ❌ TS ошибка (нет url-пропов)
|
|
26
|
+
*/
|
|
27
|
+
declare const urlWithAssetPrefix: <P extends Record<string, any>, T = unknown, OnePropCheck extends RequireAtLeastOneProp<P, UrlPropKeys> = RequireAtLeastOneProp<P, UrlPropKeys>>(WrappedComponent: ComponentType<P> | ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>, ..._error: RequireAtLeastOnePropError<OnePropCheck, OnePropCheckError>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<T>>;
|
|
9
28
|
export { urlWithAssetPrefix };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AppearanceConfig } from '../useDevicePropsGenerator';
|
|
2
|
-
declare const useAppearanceConfig: <Keys extends string, Config extends Record<"disabled" | Keys, AppearanceConfig>>(appearance: string | undefined, componentConfig: {
|
|
2
|
+
declare const useAppearanceConfig: <Keys extends string, Config extends Record<"disabled" | "disabledPrimary" | Keys, AppearanceConfig>>(appearance: string | undefined, componentConfig: {
|
|
3
3
|
appearance?: Partial<Config>;
|
|
4
4
|
}, isDisabled?: boolean) => AppearanceConfig | undefined;
|
|
5
5
|
export { useAppearanceConfig };
|
|
@@ -7,3 +7,37 @@ export type WithClassKeys<T> = T & {
|
|
|
7
7
|
[K in keyof T & string as `${K}Class`]: NonNullable<T[K]> extends string ? KebabCase<T[K]> | undefined : string | undefined;
|
|
8
8
|
};
|
|
9
9
|
export type KebabCase<S> = S extends string ? S extends `${infer F}${infer R}` ? R extends Uncapitalize<R> ? `${Lowercase<F>}${KebabCase<R>}` : `${Lowercase<F>}-${KebabCase<Uncapitalize<R>>}` : Lowercase<S> : never;
|
|
10
|
+
/**
|
|
11
|
+
* Проверяет, что у типа `P` есть хотя бы один ключ из списка `Keys`.
|
|
12
|
+
*
|
|
13
|
+
* @template P - Объект, который проверяем (обычно тип пропсов компонента).
|
|
14
|
+
* @template Keys - Набор ключей, хотя бы один из которых должен присутствовать.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* type Props = { id: string; placeholderUrl?: string };
|
|
18
|
+
*
|
|
19
|
+
* type Check1 = RequireAtLeastOneProp<Props, 'src' | 'placeholderUrl'>;
|
|
20
|
+
* // ✅ "placeholderUrl" (совпадение есть)
|
|
21
|
+
*
|
|
22
|
+
* type Check2 = RequireAtLeastOneProp<Props, 'src' | 'imageSrc'>;
|
|
23
|
+
* // ❌ never (совпадений нет)
|
|
24
|
+
*/
|
|
25
|
+
export type RequireAtLeastOneProp<P, Keys> = Extract<keyof P, Keys>;
|
|
26
|
+
/**
|
|
27
|
+
* Выводит типовую ошибку, если в `Check` нет ни одного ключа (равен `never`).
|
|
28
|
+
*
|
|
29
|
+
* @template Check - Результат проверки из `RequireAtLeastOneProp`.
|
|
30
|
+
* @template Error - Текст ошибки, который будет показан в TS.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* type Props = { id: string };
|
|
34
|
+
*
|
|
35
|
+
* type Check = RequireAtLeastOneProp<Props, 'src' | 'imageSrc'>;
|
|
36
|
+
*
|
|
37
|
+
* type ErrorCheck = RequireAtLeastOnePropError<
|
|
38
|
+
* Check,
|
|
39
|
+
* ['Компонент должен содержать хотя бы один из пропсов', 'src' | 'imageSrc']
|
|
40
|
+
* >;
|
|
41
|
+
* // ❌ TS ошибка: ["Компонент должен содержать хотя бы один из пропсов", "src" | "imageSrc"]
|
|
42
|
+
*/
|
|
43
|
+
export type RequireAtLeastOnePropError<Check, Error> = [Check] extends [never] ? Error : [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/ui",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.111",
|
|
4
4
|
"description": "UI components (Modal, Loader, Popup, etc)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Modal",
|
|
@@ -166,12 +166,12 @@
|
|
|
166
166
|
"babel-plugin-react-docgen": "^4.2.1",
|
|
167
167
|
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
168
168
|
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
169
|
-
"eslint": "9.
|
|
169
|
+
"eslint": "9.34.0",
|
|
170
170
|
"husky": "^9.1.7",
|
|
171
171
|
"lint-staged": "^16.1.5",
|
|
172
172
|
"prettier": "^3.6.2",
|
|
173
173
|
"react-docgen-typescript": "^2.4.0",
|
|
174
|
-
"rollup": "^4.
|
|
174
|
+
"rollup": "^4.48.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",
|