@itcase/ui 1.8.32 → 1.8.33
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/{DatePicker_cjs_BYh1Dsto.js → DatePicker_cjs_CJl9V32f.js} +8 -8
- package/dist/{DatePicker_es_DEAcYDTL.js → DatePicker_es_C2Pi6aB-.js} +8 -8
- package/dist/{Input_cjs_BAVggtkk.js → Input_cjs_arr_wxD2.js} +21 -20
- package/dist/{Input_es_CNduH28G.js → Input_es_BW6cZThr.js} +21 -20
- package/dist/cjs/components/Breadcrumbs/stories/__mock__.js +7 -15
- package/dist/cjs/components/Code.js +31 -42
- package/dist/cjs/components/Dadata.js +1 -1
- package/dist/cjs/components/DatePeriod.js +2 -2
- package/dist/cjs/components/DatePicker.js +2 -2
- package/dist/cjs/components/Input.js +1 -1
- package/dist/cjs/components/MenuItem.js +3 -1
- package/dist/cjs/components/Pagination.js +89 -17
- package/dist/cjs/components/Search.js +15 -14
- package/dist/cjs/components/Segmented.js +1 -1
- package/dist/cjs/components/Tab/stories/__mock__.js +6 -1
- package/dist/cjs/context/Notifications.js +6 -6
- package/dist/components/Breadcrumbs/stories/__mock__.js +7 -15
- package/dist/components/Code.js +31 -42
- package/dist/components/Dadata.js +1 -1
- package/dist/components/DatePeriod.js +2 -2
- package/dist/components/DatePicker.js +2 -2
- package/dist/components/Input.js +1 -1
- package/dist/components/MenuItem.js +3 -1
- package/dist/components/Pagination.js +90 -18
- package/dist/components/Search.js +15 -14
- package/dist/components/Segmented.js +1 -1
- package/dist/components/Tab/stories/__mock__.js +6 -1
- package/dist/context/Notifications.js +6 -6
- package/dist/css/components/Input/Input.css +6 -0
- package/dist/css/components/Search/Search.css +0 -1
- package/dist/css/components/Search/css/search-input/search-input.css +0 -1
- package/dist/css/components/Tab/Tab.css +4 -0
- package/dist/css/styles/border-color/border-color_hover.css +3 -0
- package/dist/types/components/Breadcrumbs/stories/__mock__/index.d.ts +1 -0
- package/dist/types/components/Code/appearance/codeDisabled.d.ts +7 -11
- package/dist/types/components/Code/appearance/codeRequire.d.ts +7 -15
- package/dist/types/components/Code/appearance/codeStyle.d.ts +9 -9
- package/dist/types/components/Code/appearance/codeSuccess.d.ts +8 -7
- package/dist/types/components/DatePicker/DatePicker.appearance.d.ts +1 -1
- package/dist/types/components/DatePicker/appearance/datePickerStyle.d.ts +1 -1
- package/dist/types/components/Input/appearance/inputDefault.d.ts +2 -2
- package/dist/types/components/Input/appearance/inputDisabled.d.ts +2 -2
- package/dist/types/components/Input/appearance/inputError.d.ts +2 -2
- package/dist/types/components/Input/appearance/inputRequire.d.ts +2 -2
- package/dist/types/components/Input/appearance/inputStyle.d.ts +7 -6
- package/dist/types/components/Input/appearance/inputSuccess.d.ts +2 -2
- package/dist/types/components/MenuItem/appearance/menuItemSurface.d.ts +2 -0
- package/dist/types/components/Pagination/appearance/paginationAccent.d.ts +21 -0
- package/dist/types/components/Pagination/appearance/paginationSize.d.ts +45 -0
- package/dist/types/components/Pagination/appearance/paginationStyle.d.ts +14 -0
- package/dist/types/components/Pagination/appearance/paginationSurface.d.ts +4 -12
- package/dist/types/components/Search/appearance/searchDefault.d.ts +1 -1
- package/dist/types/components/Search/appearance/searchDisabled.d.ts +1 -1
- package/dist/types/components/Search/appearance/searchError.d.ts +1 -1
- package/dist/types/components/Search/appearance/searchRequire.d.ts +1 -1
- package/dist/types/components/Search/appearance/searchStyle.d.ts +8 -7
- package/dist/types/components/Search/appearance/searchSuccess.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
2
|
-
import {
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useMemo, useState, useCallback } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import ceil from 'lodash/ceil';
|
|
@@ -26,21 +26,98 @@ import '../Divider_es_kY-30pft.js';
|
|
|
26
26
|
import 'react-inlinesvg';
|
|
27
27
|
import '../Link_es_DxtZLeKY.js';
|
|
28
28
|
|
|
29
|
+
var paginationAppearanceAccent = {
|
|
30
|
+
accent: {
|
|
31
|
+
fill: 'accentPrimary',
|
|
32
|
+
fillHover: 'accentPrimaryHover',
|
|
33
|
+
},
|
|
34
|
+
accentPrimary: {
|
|
35
|
+
fill: 'accentPrimary',
|
|
36
|
+
fillHover: 'accentPrimaryHover',
|
|
37
|
+
borderColor: 'accentBorderPrimary',
|
|
38
|
+
},
|
|
39
|
+
accentSecondary: {
|
|
40
|
+
fill: 'accentPrimary',
|
|
41
|
+
fillHover: 'accentPrimaryHover',
|
|
42
|
+
labelTextColor: 'accentTextSecondary',
|
|
43
|
+
labelTextColorHover: 'accentTextSecondary',
|
|
44
|
+
borderColor: 'accentBorderPrimary',
|
|
45
|
+
loaderFill: 'accentPrimary',
|
|
46
|
+
loaderItemFill: 'accentItemPrimary',
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var paginationAppearanceSize = {
|
|
51
|
+
sizeL: {
|
|
52
|
+
size: 'l',
|
|
53
|
+
labelTextSize: 'l',
|
|
54
|
+
iconAfterFillSize: '24',
|
|
55
|
+
iconAfterSize: '24',
|
|
56
|
+
iconBeforeFillSize: '24',
|
|
57
|
+
iconBeforeSize: '24',
|
|
58
|
+
pageCountDescTextSize: 'l',
|
|
59
|
+
pageCountDropdownItemDividerSize: 'xxs',
|
|
60
|
+
pageCountDropdownItemLabelSize: 'm',
|
|
61
|
+
pageCountDropdownItemSize: 'l',
|
|
62
|
+
pageCountInputIconFillSize: '24',
|
|
63
|
+
pageCountInputTextSize: 'm',
|
|
64
|
+
},
|
|
65
|
+
sizeM: {
|
|
66
|
+
size: 'm',
|
|
67
|
+
labelTextSize: 'm',
|
|
68
|
+
iconAfterFillSize: '24',
|
|
69
|
+
iconAfterSize: '24',
|
|
70
|
+
iconBeforeFillSize: '24',
|
|
71
|
+
iconBeforeSize: '24',
|
|
72
|
+
pageCountDescTextSize: 'm',
|
|
73
|
+
pageCountDropdownItemDividerSize: 'xxs',
|
|
74
|
+
pageCountDropdownItemLabelSize: 'm',
|
|
75
|
+
pageCountDropdownItemSize: 'l',
|
|
76
|
+
pageCountInputIconFillSize: '24',
|
|
77
|
+
pageCountInputTextSize: 'm',
|
|
78
|
+
},
|
|
79
|
+
sizeS: {
|
|
80
|
+
size: 's',
|
|
81
|
+
labelTextSize: 's',
|
|
82
|
+
iconAfterFillSize: '20',
|
|
83
|
+
iconAfterSize: '20',
|
|
84
|
+
iconBeforeFillSize: '20',
|
|
85
|
+
iconBeforeSize: '20',
|
|
86
|
+
},
|
|
87
|
+
sizeXS: {
|
|
88
|
+
size: 'xs',
|
|
89
|
+
labelTextSize: 'xs',
|
|
90
|
+
beforeSize: '16',
|
|
91
|
+
iconAfterFillSize: '16',
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
var paginationAppearanceStyle = {
|
|
96
|
+
solid: {
|
|
97
|
+
borderColor: 'none',
|
|
98
|
+
},
|
|
99
|
+
outlined: {
|
|
100
|
+
fill: 'none',
|
|
101
|
+
},
|
|
102
|
+
full: {},
|
|
103
|
+
ghost: {
|
|
104
|
+
fill: 'none',
|
|
105
|
+
borderColor: 'none',
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
|
|
29
109
|
var paginationAppearanceSurface = {
|
|
30
110
|
surfacePrimary: {
|
|
31
111
|
fill: 'surfacePrimary',
|
|
32
112
|
fillHover: 'surfaceSecondary',
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
nextLabel: (jsx(Icon, { size: "14", fillSize: "32", iconFill: "surfaceItemPrimary", shape: "circular", SvgImage: icons32.Arrow.Chevron_Right_Small })),
|
|
113
|
+
nextIcon: icons32.Arrow.ChevronRightSmall,
|
|
114
|
+
nextIconFillIcon: 'surfaceItemPrimary',
|
|
36
115
|
pageCountDesc: 'кол-во строк',
|
|
37
116
|
pageCountDescTextColor: 'surfaceTextPrimary',
|
|
38
|
-
pageCountDescTextSize: 'm',
|
|
39
117
|
pageCountDropdownAlignment: 'topCenter',
|
|
40
118
|
pageCountDropdownElevation: 8,
|
|
41
119
|
pageCountDropdownFill: 'surfacePrimary',
|
|
42
120
|
pageCountDropdownItemDividerFill: 'surfaceSecondary',
|
|
43
|
-
pageCountDropdownItemDividerSize: 'xxs',
|
|
44
121
|
pageCountDropdownItemFill: 'surfacePrimary',
|
|
45
122
|
pageCountDropdownItemFillActive: 'accentPrimary',
|
|
46
123
|
pageCountDropdownItemFillActiveHover: 'accentActiveHover',
|
|
@@ -50,22 +127,17 @@ var paginationAppearanceSurface = {
|
|
|
50
127
|
pageCountDropdownItemLabelColorActive: 'accentTextPrimary',
|
|
51
128
|
pageCountDropdownItemLabelColorActiveHover: 'accentTextPrimary',
|
|
52
129
|
pageCountDropdownItemLabelColorHover: 'surfaceTextPrimary',
|
|
53
|
-
pageCountDropdownItemLabelSize: 'm',
|
|
54
|
-
pageCountDropdownItemShowDivider: true,
|
|
55
|
-
pageCountDropdownItemSize: 'l',
|
|
56
130
|
pageCountDropdownItemWidth: 'hug',
|
|
57
131
|
pageCountDropdownShape: 'rounded',
|
|
58
|
-
pageCountInputIcon: icons24.Arrow.
|
|
132
|
+
pageCountInputIcon: icons24.Arrow.ChevronDownSmall,
|
|
59
133
|
pageCountInputIconColor: 'surfaceItemPrimary',
|
|
60
|
-
pageCountInputIconFillSize: '24',
|
|
61
134
|
pageCountInputTextColor: 'surfaceTextPrimary',
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
previousLabel: (jsx(Icon, { size: "14", fillSize: "32", iconFill: "surfaceItemPrimary", shape: "circular", SvgImage: icons32.Arrow.Chevron_Left_Small })),
|
|
135
|
+
previousIcon: icons32.Arrow.ChevronLeftSmall,
|
|
136
|
+
previousIconFillIcon: 'surfaceItemPrimary',
|
|
65
137
|
},
|
|
66
138
|
};
|
|
67
139
|
|
|
68
|
-
var paginationAppearance = __assign({}, paginationAppearanceSurface);
|
|
140
|
+
var paginationAppearance = __assign(__assign(__assign(__assign({}, paginationAppearanceSurface), paginationAppearanceAccent), paginationAppearanceSize), paginationAppearanceStyle);
|
|
69
141
|
|
|
70
142
|
var paginationConfig = {
|
|
71
143
|
appearance: paginationAppearance,
|
|
@@ -136,15 +208,15 @@ function Pagination(props) {
|
|
|
136
208
|
return (__assign(__assign({}, resultConfig), (_a = paginationConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
137
209
|
}, {});
|
|
138
210
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
139
|
-
var justifyContentClass = propsGenerator.justifyContentClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, marginPagesDisplayed = propsGenerator.marginPagesDisplayed,
|
|
211
|
+
var justifyContentClass = propsGenerator.justifyContentClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, marginPagesDisplayed = propsGenerator.marginPagesDisplayed, nextIcon = propsGenerator.nextIcon, nextIconFill = propsGenerator.nextIconFill, nextIconFillIcon = propsGenerator.nextIconFillIcon, nextIconFillSize = propsGenerator.nextIconFillSize, nextIconSize = propsGenerator.nextIconSize, pageCountDescTextColor = propsGenerator.pageCountDescTextColor, pageCountDescTextSize = propsGenerator.pageCountDescTextSize, pageCountDropdownAlignment = propsGenerator.pageCountDropdownAlignment, pageCountDropdownElevation = propsGenerator.pageCountDropdownElevation, pageCountDropdownFill = propsGenerator.pageCountDropdownFill, pageCountDropdownItemDividerFill = propsGenerator.pageCountDropdownItemDividerFill, pageCountDropdownItemDividerSize = propsGenerator.pageCountDropdownItemDividerSize, pageCountDropdownItemFill = propsGenerator.pageCountDropdownItemFill, pageCountDropdownItemFillActive = propsGenerator.pageCountDropdownItemFillActive, pageCountDropdownItemFillActiveHover = propsGenerator.pageCountDropdownItemFillActiveHover, pageCountDropdownItemFillHover = propsGenerator.pageCountDropdownItemFillHover, pageCountDropdownItemLabelAlign = propsGenerator.pageCountDropdownItemLabelAlign, pageCountDropdownItemLabelColor = propsGenerator.pageCountDropdownItemLabelColor, pageCountDropdownItemLabelColorActive = propsGenerator.pageCountDropdownItemLabelColorActive, pageCountDropdownItemLabelColorActiveHover = propsGenerator.pageCountDropdownItemLabelColorActiveHover, pageCountDropdownItemLabelColorHover = propsGenerator.pageCountDropdownItemLabelColorHover, pageCountDropdownItemLabelSize = propsGenerator.pageCountDropdownItemLabelSize, pageCountDropdownItemLabelWrap = propsGenerator.pageCountDropdownItemLabelWrap, pageCountDropdownItemShowDivider = propsGenerator.pageCountDropdownItemShowDivider, pageCountDropdownItemSize = propsGenerator.pageCountDropdownItemSize, pageCountDropdownItemWidth = propsGenerator.pageCountDropdownItemWidth, pageCountDropdownShape = propsGenerator.pageCountDropdownShape, pageCountInputIcon = propsGenerator.pageCountInputIcon, pageCountInputIconColor = propsGenerator.pageCountInputIconColor, pageCountInputIconFillSize = propsGenerator.pageCountInputIconFillSize, pageCountInputIconSrc = propsGenerator.pageCountInputIconSrc, pageCountInputTextColor = propsGenerator.pageCountInputTextColor, pageCountInputTextSize = propsGenerator.pageCountInputTextSize, pageRangeDisplayed = propsGenerator.pageRangeDisplayed, previousIcon = propsGenerator.previousIcon, previousIconFill = propsGenerator.previousIconFill, previousIconFillIcon = propsGenerator.previousIconFillIcon, previousIconFillSize = propsGenerator.previousIconFillSize, previousIconSize = propsGenerator.previousIconSize;
|
|
140
212
|
var paginationStyles = useStyles(props).styles;
|
|
141
213
|
return (jsxs("div", { className: "pagination", "data-testid": dataTestId, "data-tour": dataTour, style: paginationStyles, children: [jsx(ReactPaginate, { disabledClassName: "pagination__item_state_disabled cursor_type_default", disabledLinkClassName: "pagination__item_state_disabled", activeClassName: "pagination__item_state_active cursor_type_default", activeLinkClassName: "pagination__item-link_state_active", breakClassName: "pagination__item pagination__item_break", breakLabel: "...", breakLinkClassName: "pagination__item-link", containerClassName: clsx(className, 'pagination__container', justifyContentClass &&
|
|
142
214
|
"pagination_justify-content_".concat(justifyContentClass)),
|
|
143
215
|
// pages settings
|
|
144
216
|
forcePage: paginationPageIndex, marginPagesDisplayed: marginPagesDisplayed, nextClassName: "pagination__item pagination__item_next",
|
|
145
217
|
// next button
|
|
146
|
-
nextLabel:
|
|
147
|
-
return activeDropdownItem === item ? (jsx(DropdownItem, { width: pageCountDropdownItemWidth, size: pageCountDropdownItemSize, fill: pageCountDropdownItemFill, fillActive: pageCountDropdownItemFillActive, fillActiveHover: pageCountDropdownItemFillActiveHover, fillHover: pageCountDropdownItemFillHover, label: item.toString(), labelTextAlign: pageCountDropdownItemLabelAlign, labelTextColor: pageCountDropdownItemLabelColor, labelTextColorActive: pageCountDropdownItemLabelColorActive,
|
|
218
|
+
nextLabel: jsx(Icon, { fill: nextIconFill, fillSize: nextIconFillSize, iconFill: nextIconFillIcon, iconSize: nextIconSize, shape: "circular", SvgImage: nextIcon }), nextLinkClassName: "pagination__item-link", pageClassName: "pagination__item", pageCount: paginationPagesCount, pageLinkClassName: "pagination__item-link", pageRangeDisplayed: pageRangeDisplayed, previousClassName: "pagination__item pagination__item_previous", previousLabel: jsx(Icon, { fill: previousIconFill, fillSize: previousIconFillSize, iconFill: previousIconFillIcon, iconSize: previousIconSize, shape: "circular", SvgImage: previousIcon }), previousLinkClassName: "pagination__item-link", onPageChange: _onChangePage }), isPageCount && (jsxs("div", { className: clsx(className, 'pagination__count'), children: [jsx(Text, { className: "pagination__count-text", size: pageCountDescTextSize, textColor: pageCountDescTextColor, children: pageCountDesc }), jsxs("div", { className: clsx('pagination__input', 'cursor_type_pointer', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)), onClick: onClickCommandMenuButton, children: [jsx(Text, { size: pageCountInputTextSize, textColor: pageCountInputTextColor, children: activeDropdownItem }), jsx(Icon, { fillSize: pageCountInputIconFillSize, iconFill: pageCountInputIconColor, imageSrc: pageCountInputIconSrc, SvgImage: pageCountInputIcon }), jsx(Dropdown, { alignment: pageCountDropdownAlignment, fill: pageCountDropdownFill, elevation: pageCountDropdownElevation, shape: pageCountDropdownShape, isOpen: isOpenDropdown, setIsOpen: setIsOpenDropdown, children: pageCountDropdownArray.map(function (item, index) {
|
|
219
|
+
return activeDropdownItem === item ? (jsx(DropdownItem, { width: pageCountDropdownItemWidth, size: pageCountDropdownItemSize, fill: pageCountDropdownItemFill, fillActive: pageCountDropdownItemFillActive, fillActiveHover: pageCountDropdownItemFillActiveHover, fillHover: pageCountDropdownItemFillHover, label: item.toString(), labelTextAlign: pageCountDropdownItemLabelAlign, labelTextColor: pageCountDropdownItemLabelColor, labelTextColorActive: pageCountDropdownItemLabelColorActive, labelTextColorActiveHover: pageCountDropdownItemLabelColorActiveHover, labelTextColorHover: pageCountDropdownItemLabelColorHover, labelTextSize: pageCountDropdownItemLabelSize, labelTextWrap: pageCountDropdownItemLabelWrap, dividerDirection: pageCountDropdownItemDividerDirection, dividerFill: pageCountDropdownItemDividerFill, dividerSize: pageCountDropdownItemDividerSize, showDivider: index < pageCountArray.length - 1 &&
|
|
148
220
|
pageCountDropdownItemShowDivider, isActive: true, onClick: function (event) { return handleDropdownItemClick(event, item); } }, item)) : (jsx(DropdownItem, { width: pageCountDropdownItemWidth, size: pageCountDropdownItemSize, fill: pageCountDropdownItemFill, fillHover: pageCountDropdownItemFillHover, label: item.toString(), labelTextAlign: pageCountDropdownItemLabelAlign, labelTextColor: pageCountDropdownItemLabelColor, labelTextColorHover: pageCountDropdownItemLabelColorHover, labelTextSize: pageCountDropdownItemLabelSize, labelTextWrap: pageCountDropdownItemLabelWrap, dividerDirection: pageCountDropdownItemDividerDirection, dividerFill: pageCountDropdownItemDividerFill, dividerSize: pageCountDropdownItemDividerSize, showDivider: index < pageCountArray.length - 1 &&
|
|
149
221
|
pageCountDropdownItemShowDivider, isActive: false, onClick: function (event) { return handleDropdownItemClick(event, item); } }, item));
|
|
150
222
|
}) })] })] }))] }));
|
|
@@ -28,7 +28,7 @@ var searchAppearanceDefault = {
|
|
|
28
28
|
defaultPrimary: {
|
|
29
29
|
fill: 'surfaceSecondary',
|
|
30
30
|
borderColor: 'surfaceBorderQuaternary',
|
|
31
|
-
|
|
31
|
+
borderColorHover: 'surfaceBorderQuaternaryHover',
|
|
32
32
|
iconAfterFill: 'surfaceItemQuaternary',
|
|
33
33
|
iconBeforeFill: 'surfaceItemQuaternary',
|
|
34
34
|
iconClearFill: 'surfaceItemQuaternary',
|
|
@@ -41,7 +41,7 @@ var searchAppearanceDisabled = {
|
|
|
41
41
|
disabledPrimary: {
|
|
42
42
|
fill: 'surfaceDisabled',
|
|
43
43
|
borderColor: 'surfaceBorderDisabled',
|
|
44
|
-
|
|
44
|
+
borderColorHover: 'surfaceBorderDisabledHover',
|
|
45
45
|
iconAfterFill: 'surfaceItemPrimary',
|
|
46
46
|
iconBeforeFill: 'surfaceItemPrimary',
|
|
47
47
|
iconClearFill: 'surfaceItemPrimary',
|
|
@@ -54,7 +54,7 @@ var searchAppearanceError = {
|
|
|
54
54
|
errorPrimary: {
|
|
55
55
|
fill: 'errorTertiary',
|
|
56
56
|
borderColor: 'errorBorderQuaternary',
|
|
57
|
-
|
|
57
|
+
borderColorHover: 'errorBorderQuaternaryHover',
|
|
58
58
|
iconAfterFill: 'errorItemSecondary',
|
|
59
59
|
iconBeforeFill: 'errorItemSecondary',
|
|
60
60
|
iconClearFill: 'errorItemSecondary',
|
|
@@ -67,7 +67,7 @@ var searchAppearanceRequire = {
|
|
|
67
67
|
requirePrimary: {
|
|
68
68
|
fill: 'warningTertiary',
|
|
69
69
|
borderColor: 'warningBorderSecondary',
|
|
70
|
-
|
|
70
|
+
borderColorHover: 'warningBorderSecondaryHover',
|
|
71
71
|
iconAfterFill: 'warningItemSecondary',
|
|
72
72
|
iconBeforeFill: 'warningItemSecondary',
|
|
73
73
|
iconClearFill: 'warningItemSecondary',
|
|
@@ -122,18 +122,19 @@ var searchAppearanceSize = {
|
|
|
122
122
|
};
|
|
123
123
|
|
|
124
124
|
var searchAppearanceStyle = {
|
|
125
|
-
|
|
125
|
+
solid: {
|
|
126
126
|
borderColor: 'none',
|
|
127
|
-
|
|
128
|
-
ghost: {
|
|
129
|
-
fill: 'none',
|
|
130
|
-
borderWidth: '0',
|
|
127
|
+
borderColorHover: 'none',
|
|
131
128
|
},
|
|
132
129
|
outlined: {
|
|
133
130
|
fill: 'none',
|
|
134
131
|
},
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
full: {
|
|
133
|
+
borderColor: 'none',
|
|
134
|
+
},
|
|
135
|
+
ghost: {
|
|
136
|
+
fill: 'none',
|
|
137
|
+
borderColor: 'none',
|
|
137
138
|
},
|
|
138
139
|
};
|
|
139
140
|
|
|
@@ -141,7 +142,7 @@ var searchAppearanceSuccess = {
|
|
|
141
142
|
successPrimary: {
|
|
142
143
|
fill: 'successTertiary',
|
|
143
144
|
borderColor: 'accentBorderQuaternary',
|
|
144
|
-
|
|
145
|
+
borderColorHover: 'accentBorderQuaternary',
|
|
145
146
|
textColor: 'surfaceTextPrimary',
|
|
146
147
|
iconAfterFill: 'successItemSecondary',
|
|
147
148
|
iconBeforeFill: 'successItemSecondary',
|
|
@@ -175,9 +176,9 @@ var SearchInput = React.forwardRef(function SearchInput(props, ref) {
|
|
|
175
176
|
return (__assign(__assign({}, resultConfig), (_a = searchInputConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
176
177
|
}, {});
|
|
177
178
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
178
|
-
var size = propsGenerator.size, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass,
|
|
179
|
+
var size = propsGenerator.size, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, borderColorHoverClass = propsGenerator.borderColorHoverClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, iconAfter = propsGenerator.iconAfter, iconAfterFill = propsGenerator.iconAfterFill, iconAfterSize = propsGenerator.iconAfterSize, iconAfterSrc = propsGenerator.iconAfterSrc, iconBefore = propsGenerator.iconBefore, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeSize = propsGenerator.iconBeforeSize, iconBeforeSrc = propsGenerator.iconBeforeSrc, iconClear = propsGenerator.iconClear, iconClearFill = propsGenerator.iconClearFill, iconClearSize = propsGenerator.iconClearSize, iconClearSrc = propsGenerator.iconClearSrc, inputFillClass = propsGenerator.inputFillClass, inputShapeClass = propsGenerator.inputShapeClass, inputTextColorClass = propsGenerator.inputTextColorClass, inputTextSizeClass = propsGenerator.inputTextSizeClass, inputTextStyleClass = propsGenerator.inputTextStyleClass, inputTextWeightClass = propsGenerator.inputTextWeightClass, placeholderTextColor = propsGenerator.placeholderTextColor, placeholderTextSize = propsGenerator.placeholderTextSize, placeholderTextStyle = propsGenerator.placeholderTextStyle, placeholderTextWeight = propsGenerator.placeholderTextWeight, shapeClass = propsGenerator.shapeClass, widthClass = propsGenerator.widthClass;
|
|
179
180
|
var searchInputStyles = useStyles(props).styles;
|
|
180
|
-
return (jsxs("label", { className: clsx(className, 'search-input', shapeClass && "search_shape_".concat(shapeClass), fillClass && "fill_".concat(fillClass), widthClass && "width_".concat(widthClass), borderColorClass && "border-color_".concat(borderColorClass),
|
|
181
|
+
return (jsxs("label", { className: clsx(className, 'search-input', shapeClass && "search_shape_".concat(shapeClass), fillClass && "fill_".concat(fillClass), widthClass && "width_".concat(widthClass), borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), size && "search-input_size_".concat(size), type && "search-input_type_".concat(type), isSkeleton && "search-input_skeleton"), "data-tour": dataTour, style: searchInputStyles, children: [before, (iconBefore || iconBeforeSrc) && (jsx(Icon, { className: "search-input__icon search-input__icon-before", size: iconBeforeSize, iconFill: iconBeforeFill, imageSrc: iconBeforeSrc, SvgImage: iconBefore })), jsxs("div", { className: clsx('search-input__wrapper', inputFillClass && "fill_".concat(inputFillClass), inputShapeClass && "search-input_shape_".concat(inputShapeClass)), children: [jsx("input", { className: clsx('search-input__value', (inputTextSizeClass ||
|
|
181
182
|
inputTextWeightClass ||
|
|
182
183
|
inputTextColorClass ||
|
|
183
184
|
inputTextStyleClass) &&
|
|
@@ -33,7 +33,7 @@ var segmentedAppearanceDefault = {
|
|
|
33
33
|
fill: 'surfaceSecondary',
|
|
34
34
|
fillActive: 'accentPrimary',
|
|
35
35
|
fillActiveHover: 'accentPrimary',
|
|
36
|
-
fillHover: '
|
|
36
|
+
fillHover: 'surfaceTertiary',
|
|
37
37
|
labelTextActiveColor: 'accentTextPrimary',
|
|
38
38
|
labelTextColor: 'surfaceTextPrimary',
|
|
39
39
|
indicatorFill: 'accentPrimary',
|
|
@@ -5,7 +5,12 @@ var tabListMock = {
|
|
|
5
5
|
{ key: 1, label: 'Tab 1', isActive: true },
|
|
6
6
|
{ key: 2, label: 'Tab 2', isActive: false },
|
|
7
7
|
{ key: 3, label: 'Tab 3', badgeValue: 3, isActive: false },
|
|
8
|
-
{
|
|
8
|
+
{
|
|
9
|
+
key: 4,
|
|
10
|
+
label: 'Tab 4',
|
|
11
|
+
icon: icons16.Placeholder.Default,
|
|
12
|
+
isActive: false,
|
|
13
|
+
},
|
|
9
14
|
],
|
|
10
15
|
};
|
|
11
16
|
|
|
@@ -127,7 +127,7 @@ function createNotification(notification, onClose) {
|
|
|
127
127
|
var status = STATUSES.warning;
|
|
128
128
|
// let appearance = STATUSES.appearance
|
|
129
129
|
var closeByTime = 4500;
|
|
130
|
-
var
|
|
130
|
+
var appearance = '';
|
|
131
131
|
if (typeof notification === 'string') {
|
|
132
132
|
text = notification;
|
|
133
133
|
}
|
|
@@ -140,24 +140,24 @@ function createNotification(notification, onClose) {
|
|
|
140
140
|
}
|
|
141
141
|
switch (status) {
|
|
142
142
|
case 'success':
|
|
143
|
-
|
|
143
|
+
appearance = 'successPrimary';
|
|
144
144
|
break;
|
|
145
145
|
case 'info':
|
|
146
|
-
|
|
146
|
+
appearance = 'infoPrimary';
|
|
147
147
|
break;
|
|
148
148
|
case 'error':
|
|
149
|
-
|
|
149
|
+
appearance = 'errorPrimary';
|
|
150
150
|
break;
|
|
151
151
|
case 'warning':
|
|
152
|
-
|
|
152
|
+
appearance = 'warningPrimary';
|
|
153
153
|
break;
|
|
154
154
|
}
|
|
155
155
|
return {
|
|
156
156
|
id: id,
|
|
157
|
+
appearance: appearance,
|
|
157
158
|
title: title,
|
|
158
159
|
status: status,
|
|
159
160
|
text: text,
|
|
160
|
-
textColor: textColor,
|
|
161
161
|
closeByTime: closeByTime,
|
|
162
162
|
onClose: onClose,
|
|
163
163
|
};
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
&&_size {
|
|
39
39
|
@each $size in xxl, xl, l, m, s, xs, xxs {
|
|
40
40
|
&_$(size) {
|
|
41
|
+
min-height: var(--input-size-$(size)-min-height);
|
|
41
42
|
padding: var(--input-size-$(size)-padding);
|
|
42
43
|
}
|
|
43
44
|
}
|
|
@@ -78,6 +79,11 @@
|
|
|
78
79
|
--input-size-l-padding: 9px 15px;
|
|
79
80
|
--input-size-xl-padding: 13px 20px;
|
|
80
81
|
--input-size-xxl-padding: 17px 25px;
|
|
82
|
+
--input-size-s-min-height: 28px;
|
|
83
|
+
--input-size-m-min-height: 36px;
|
|
84
|
+
--input-size-l-min-height: 40px;
|
|
85
|
+
--input-size-xl-min-height: 48px;
|
|
86
|
+
--input-size-xxl-min-height: 56px;
|
|
81
87
|
|
|
82
88
|
--input-caret-color: var(--color-accent-fill-primary);
|
|
83
89
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
.border-color {
|
|
2
2
|
&_hover {
|
|
3
|
+
&_none {
|
|
4
|
+
border-color: transparent;
|
|
5
|
+
}
|
|
3
6
|
@each $type in accent, primary, secondary, tertiary, quaternary, surface,
|
|
4
7
|
error, success, warning, info, danger, gradient, disabled, hover, inverse {
|
|
5
8
|
@each $color in primary, secondary, tertiary, quaternary, accent,
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
declare const codeAppearanceDisabled: {
|
|
2
2
|
disabledPrimary: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
fill: string;
|
|
11
|
-
borderColor: string;
|
|
12
|
-
borderHover: string;
|
|
13
|
-
placeholderTextColor: string;
|
|
3
|
+
inputBorderColor: string;
|
|
4
|
+
inputBorderColorHover: string;
|
|
5
|
+
inputCaretColor: string;
|
|
6
|
+
inputFill: string;
|
|
7
|
+
inputFillHover: string;
|
|
8
|
+
inputPlaceholderTextColor: string;
|
|
9
|
+
inputTextColor: string;
|
|
14
10
|
};
|
|
15
11
|
};
|
|
16
12
|
export { codeAppearanceDisabled };
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
declare const codeAppearanceRequire: {
|
|
2
2
|
requirePrimary: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
requireSecondary: {
|
|
12
|
-
fill: string;
|
|
13
|
-
borderColor: string;
|
|
14
|
-
borderHover: string;
|
|
15
|
-
iconBeforeFill: string;
|
|
16
|
-
iconClearFill: string;
|
|
17
|
-
placeholderTextColor: string;
|
|
3
|
+
inputBorderColor: string;
|
|
4
|
+
inputBorderColorHover: string;
|
|
5
|
+
inputCaretColor: string;
|
|
6
|
+
inputFill: string;
|
|
7
|
+
inputFillHover: string;
|
|
8
|
+
inputPlaceholderTextColor: string;
|
|
9
|
+
inputTextColor: string;
|
|
18
10
|
};
|
|
19
11
|
};
|
|
20
12
|
export { codeAppearanceRequire };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
declare const codeAppearanceStyle: {
|
|
2
|
-
solid: {
|
|
3
|
-
borderColor: string;
|
|
4
|
-
};
|
|
5
|
-
outlined: {
|
|
6
|
-
fill: string;
|
|
7
|
-
};
|
|
8
2
|
full: {
|
|
9
|
-
|
|
3
|
+
inputBorderColor: string;
|
|
10
4
|
};
|
|
11
5
|
ghost: {
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
inputBorderColor: string;
|
|
7
|
+
inputFill: string;
|
|
8
|
+
};
|
|
9
|
+
outlined: {
|
|
10
|
+
inputFill: string;
|
|
11
|
+
};
|
|
12
|
+
solid: {
|
|
13
|
+
inputBorderColor: string;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
export { codeAppearanceStyle };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
declare const codeAppearanceSuccess: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
successPrimary: {
|
|
3
|
+
inputBorderColor: string;
|
|
4
|
+
inputBorderColorHover: string;
|
|
5
|
+
inputCaretColor: string;
|
|
6
|
+
inputFill: string;
|
|
7
|
+
inputFillHover: string;
|
|
8
|
+
inputPlaceholderTextColor: string;
|
|
9
|
+
inputTextColor: string;
|
|
9
10
|
};
|
|
10
11
|
};
|
|
11
12
|
export { codeAppearanceSuccess };
|
|
@@ -2,7 +2,7 @@ declare const inputAppearanceDefault: {
|
|
|
2
2
|
defaultPrimary: {
|
|
3
3
|
fill: string;
|
|
4
4
|
borderColor: string;
|
|
5
|
-
|
|
5
|
+
borderColorHover: string;
|
|
6
6
|
textColor: string;
|
|
7
7
|
textColorDisabled: string;
|
|
8
8
|
caret: string;
|
|
@@ -12,7 +12,7 @@ declare const inputAppearanceDefault: {
|
|
|
12
12
|
defaultSecondary: {
|
|
13
13
|
fill: string;
|
|
14
14
|
borderColor: string;
|
|
15
|
-
|
|
15
|
+
borderColorHover: string;
|
|
16
16
|
textColor: string;
|
|
17
17
|
textColorDisabled: string;
|
|
18
18
|
caret: string;
|
|
@@ -2,7 +2,7 @@ declare const inputAppearanceDisabled: {
|
|
|
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 inputAppearanceDisabled: {
|
|
|
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 inputAppearanceError: {
|
|
|
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 inputAppearanceError: {
|
|
|
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 inputAppearanceRequire: {
|
|
|
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 inputAppearanceRequire: {
|
|
|
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;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
declare const inputAppearanceStyle: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
fill: string;
|
|
5
|
-
borderWidth: string;
|
|
2
|
+
solid: {
|
|
3
|
+
borderColor: string;
|
|
6
4
|
};
|
|
7
5
|
outlined: {
|
|
8
6
|
fill: string;
|
|
9
7
|
};
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
full: {};
|
|
9
|
+
ghost: {
|
|
10
|
+
fill: string;
|
|
11
|
+
borderColor: string;
|
|
12
|
+
borderColorHover: string;
|
|
12
13
|
};
|
|
13
14
|
};
|
|
14
15
|
export { inputAppearanceStyle };
|
|
@@ -2,7 +2,7 @@ declare const inputAppearanceSuccess: {
|
|
|
2
2
|
successPrimary: {
|
|
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 inputAppearanceSuccess: {
|
|
|
11
11
|
successSecondary: {
|
|
12
12
|
fill: string;
|
|
13
13
|
borderColor: string;
|
|
14
|
-
|
|
14
|
+
borderColorHover: string;
|
|
15
15
|
iconBeforeFill: string;
|
|
16
16
|
iconClearFill: string;
|
|
17
17
|
placeholderTextColor: string;
|