@itcase/ui 1.8.32 → 1.8.34
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_C-VbK2J4.js} +9 -9
- package/dist/{DatePicker_es_DEAcYDTL.js → DatePicker_es_CIEHQyHC.js} +9 -9
- 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/{Label_cjs_CZMMdwt5.js → Label_cjs_BWbVsB-u.js} +3 -3
- package/dist/{Label_es_DmDqs4Rc.js → Label_es_ouC2i_iI.js} +3 -3
- package/dist/cjs/components/Breadcrumbs/stories/__mock__.js +7 -15
- package/dist/cjs/components/Cell.js +1 -1
- package/dist/cjs/components/Choice/stories/__mock__.js +15 -15
- package/dist/cjs/components/Choice.js +33 -28
- package/dist/cjs/components/Code.js +31 -42
- package/dist/cjs/components/Dadata.js +1 -1
- package/dist/cjs/components/DatePeriod.js +3 -3
- package/dist/cjs/components/DatePicker.js +3 -3
- package/dist/cjs/components/Dropdown/stories/__mock__.js +2 -2
- package/dist/cjs/components/Input.js +1 -1
- package/dist/cjs/components/Label.js +1 -1
- package/dist/cjs/components/MenuItem.js +14 -7
- package/dist/cjs/components/Notification/stories/__mock__.js +4 -0
- package/dist/cjs/components/Notification.js +27 -9
- package/dist/cjs/components/Pagination.js +101 -20
- package/dist/cjs/components/Search.js +15 -14
- package/dist/cjs/components/Segmented/stories/__mock__.js +38 -0
- package/dist/cjs/components/Segmented.js +13 -10
- 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/Cell.js +1 -1
- package/dist/components/Choice/stories/__mock__.js +16 -16
- package/dist/components/Choice.js +33 -28
- package/dist/components/Code.js +31 -42
- package/dist/components/Dadata.js +1 -1
- package/dist/components/DatePeriod.js +3 -3
- package/dist/components/DatePicker.js +3 -3
- package/dist/components/Dropdown/stories/__mock__.js +2 -2
- package/dist/components/Input.js +1 -1
- package/dist/components/Label.js +1 -1
- package/dist/components/MenuItem.js +14 -7
- package/dist/components/Notification/stories/__mock__.js +4 -0
- package/dist/components/Notification.js +27 -9
- package/dist/components/Pagination.js +103 -22
- package/dist/components/Search.js +15 -14
- package/dist/components/Segmented/stories/__mock__.js +36 -0
- package/dist/components/Segmented.js +13 -10
- 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/Notification/Notification.css +23 -0
- package/dist/css/components/Pagination/Pagination.css +19 -6
- 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/Segmented/Segmented.css +24 -0
- package/dist/css/components/Tab/Tab.css +4 -0
- package/dist/css/styles/border-color/border-color_hover.css +3 -0
- package/dist/stories/CellOverview.mdx +3 -2
- package/dist/stories/DatePeriodPlayground.mdx +2 -2
- package/dist/stories/RangeSliderOverview.mdx +0 -3
- package/dist/stories/VideoOverview.mdx +2 -10
- package/dist/stories/VideoPlayground.mdx +2 -2
- package/dist/types/components/Breadcrumbs/stories/__mock__/index.d.ts +1 -0
- package/dist/types/components/Choice/appearance/choiceDefault.d.ts +7 -0
- package/dist/types/components/Choice/appearance/choiceDisabled.d.ts +7 -0
- package/dist/types/components/Choice/appearance/choiceRequire.d.ts +6 -0
- package/dist/types/components/Choice/appearance/choiceStyle.d.ts +4 -0
- package/dist/types/components/Choice/appearance/choiceSuccess.d.ts +6 -0
- package/dist/types/components/Choice/stories/__mock__/index.d.ts +9 -3
- 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/Label/appearance/labelInfo.d.ts +1 -1
- package/dist/types/components/MenuItem/appearance/menuItemAccent.d.ts +1 -0
- package/dist/types/components/MenuItem/appearance/menuItemError.d.ts +1 -0
- package/dist/types/components/MenuItem/appearance/menuItemStyle.d.ts +6 -4
- package/dist/types/components/MenuItem/appearance/menuItemSurface.d.ts +3 -0
- package/dist/types/components/Notification/appearance/notificationInfo.d.ts +17 -0
- package/dist/types/components/Notification/appearance/notificationStyle.d.ts +4 -4
- package/dist/types/components/Notification/stories/__mock__/index.d.ts +1 -0
- package/dist/types/components/Pagination/appearance/paginationAccent.d.ts +21 -0
- package/dist/types/components/Pagination/appearance/paginationSize.d.ts +57 -0
- package/dist/types/components/Pagination/appearance/paginationStyle.d.ts +14 -0
- package/dist/types/components/Pagination/appearance/paginationSurface.d.ts +2 -15
- 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/dist/types/components/Segmented/Segmented.interface.d.ts +1 -0
- package/dist/types/components/Segmented/appearance/segmentedSuccess.d.ts +1 -1
- package/dist/types/components/Segmented/stories/__mock__/index.d.ts +17 -0
- package/package.json +5 -5
- package/dist/types/components/Choice/appearance/choiceSurface.d.ts +0 -25
|
@@ -28,21 +28,110 @@ require('../../Divider_cjs_BmCJj3TN.js');
|
|
|
28
28
|
require('react-inlinesvg');
|
|
29
29
|
require('../../Link_cjs_DbRGq2Yk.js');
|
|
30
30
|
|
|
31
|
+
var paginationAppearanceAccent = {
|
|
32
|
+
accent: {
|
|
33
|
+
fill: 'accentPrimary',
|
|
34
|
+
fillHover: 'accentPrimaryHover',
|
|
35
|
+
},
|
|
36
|
+
accentPrimary: {
|
|
37
|
+
fill: 'accentPrimary',
|
|
38
|
+
fillHover: 'accentPrimaryHover',
|
|
39
|
+
borderColor: 'accentBorderPrimary',
|
|
40
|
+
},
|
|
41
|
+
accentSecondary: {
|
|
42
|
+
fill: 'accentPrimary',
|
|
43
|
+
fillHover: 'accentPrimaryHover',
|
|
44
|
+
labelTextColor: 'accentTextSecondary',
|
|
45
|
+
labelTextColorHover: 'accentTextSecondary',
|
|
46
|
+
borderColor: 'accentBorderPrimary',
|
|
47
|
+
loaderFill: 'accentPrimary',
|
|
48
|
+
loaderItemFill: 'accentItemPrimary',
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
var paginationAppearanceSize = {
|
|
53
|
+
sizeL: {
|
|
54
|
+
size: 'l',
|
|
55
|
+
labelTextSize: 'l',
|
|
56
|
+
iconAfterFillSize: '24',
|
|
57
|
+
iconAfterSize: '24',
|
|
58
|
+
iconBeforeFillSize: '24',
|
|
59
|
+
iconBeforeSize: '24',
|
|
60
|
+
nextIcon: _default.icons32.Arrow.ChevronRightSmall,
|
|
61
|
+
pageCountDescTextSize: 'l',
|
|
62
|
+
pageCountDropdownItemDividerSize: 'xxs',
|
|
63
|
+
pageCountDropdownItemLabelSize: 'm',
|
|
64
|
+
pageCountDropdownItemSize: 'l',
|
|
65
|
+
pageCountInputIcon: _default.icons32.Arrow.ChevronDownSmall,
|
|
66
|
+
pageCountInputIcon: _default.icons24.Arrow.ChevronDownSmall,
|
|
67
|
+
pageCountInputIcon: _default.icons32.Arrow.ChevronDownSmall,
|
|
68
|
+
pageCountInputIconFillSize: '24',
|
|
69
|
+
pageCountInputTextSize: 'm',
|
|
70
|
+
previousIcon: _default.icons32.Arrow.ChevronLeftSmall,
|
|
71
|
+
},
|
|
72
|
+
sizeM: {
|
|
73
|
+
size: 'm',
|
|
74
|
+
labelTextSize: 'm',
|
|
75
|
+
iconAfterFillSize: '24',
|
|
76
|
+
iconAfterSize: '24',
|
|
77
|
+
iconBeforeFillSize: '24',
|
|
78
|
+
iconBeforeSize: '24',
|
|
79
|
+
nextIcon: _default.icons32.Arrow.ChevronRightSmall,
|
|
80
|
+
pageCountDescTextSize: 'm',
|
|
81
|
+
pageCountDropdownItemDividerSize: 'xxs',
|
|
82
|
+
pageCountDropdownItemLabelSize: 'm',
|
|
83
|
+
pageCountDropdownItemSize: 'l',
|
|
84
|
+
pageCountDropdownItemWidth: '64',
|
|
85
|
+
pageCountInputIcon: _default.icons14.Arrow.ChevronDownSmall,
|
|
86
|
+
pageCountInputIconFillSize: '14',
|
|
87
|
+
pageCountInputTextSize: 'm',
|
|
88
|
+
previousIcon: _default.icons32.Arrow.ChevronLeftSmall,
|
|
89
|
+
},
|
|
90
|
+
sizeS: {
|
|
91
|
+
size: 's',
|
|
92
|
+
labelTextSize: 's',
|
|
93
|
+
iconAfterFillSize: '20',
|
|
94
|
+
iconAfterSize: '20',
|
|
95
|
+
iconBeforeFillSize: '20',
|
|
96
|
+
iconBeforeSize: '20',
|
|
97
|
+
nextIcon: _default.icons32.Arrow.ChevronRightSmall,
|
|
98
|
+
previousIcon: _default.icons32.Arrow.ChevronLeftSmall,
|
|
99
|
+
},
|
|
100
|
+
sizeXS: {
|
|
101
|
+
size: 'xs',
|
|
102
|
+
labelTextSize: 'xs',
|
|
103
|
+
beforeSize: '16',
|
|
104
|
+
iconAfterFillSize: '16',
|
|
105
|
+
nextIcon: _default.icons32.Arrow.ChevronRightSmall,
|
|
106
|
+
pageCountInputIcon: _default.icons32.Arrow.ChevronDownSmall,
|
|
107
|
+
previousIcon: _default.icons32.Arrow.ChevronLeftSmall,
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
var paginationAppearanceStyle = {
|
|
112
|
+
solid: {
|
|
113
|
+
borderColor: 'none',
|
|
114
|
+
},
|
|
115
|
+
outlined: {
|
|
116
|
+
fill: 'none',
|
|
117
|
+
},
|
|
118
|
+
full: {},
|
|
119
|
+
ghost: {
|
|
120
|
+
fill: 'none',
|
|
121
|
+
borderColor: 'none',
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
|
|
31
125
|
var paginationAppearanceSurface = {
|
|
32
126
|
surfacePrimary: {
|
|
33
127
|
fill: 'surfacePrimary',
|
|
34
128
|
fillHover: 'surfaceSecondary',
|
|
35
|
-
|
|
36
|
-
marginPagesDisplayed: 10,
|
|
37
|
-
nextLabel: (jsxRuntime.jsx(Tooltip.Icon, { size: "14", fillSize: "32", iconFill: "surfaceItemPrimary", shape: "circular", SvgImage: _default.icons32.Arrow.Chevron_Right_Small })),
|
|
38
|
-
pageCountDesc: 'кол-во строк',
|
|
129
|
+
nextIconFillIcon: 'surfaceItemPrimary',
|
|
39
130
|
pageCountDescTextColor: 'surfaceTextPrimary',
|
|
40
|
-
pageCountDescTextSize: 'm',
|
|
41
131
|
pageCountDropdownAlignment: 'topCenter',
|
|
42
132
|
pageCountDropdownElevation: 8,
|
|
43
133
|
pageCountDropdownFill: 'surfacePrimary',
|
|
44
134
|
pageCountDropdownItemDividerFill: 'surfaceSecondary',
|
|
45
|
-
pageCountDropdownItemDividerSize: 'xxs',
|
|
46
135
|
pageCountDropdownItemFill: 'surfacePrimary',
|
|
47
136
|
pageCountDropdownItemFillActive: 'accentPrimary',
|
|
48
137
|
pageCountDropdownItemFillActiveHover: 'accentActiveHover',
|
|
@@ -52,22 +141,14 @@ var paginationAppearanceSurface = {
|
|
|
52
141
|
pageCountDropdownItemLabelColorActive: 'accentTextPrimary',
|
|
53
142
|
pageCountDropdownItemLabelColorActiveHover: 'accentTextPrimary',
|
|
54
143
|
pageCountDropdownItemLabelColorHover: 'surfaceTextPrimary',
|
|
55
|
-
pageCountDropdownItemLabelSize: 'm',
|
|
56
|
-
pageCountDropdownItemShowDivider: true,
|
|
57
|
-
pageCountDropdownItemSize: 'l',
|
|
58
|
-
pageCountDropdownItemWidth: 'hug',
|
|
59
144
|
pageCountDropdownShape: 'rounded',
|
|
60
|
-
pageCountInputIcon: _default.icons24.Arrow.Chevron_Down_Small,
|
|
61
145
|
pageCountInputIconColor: 'surfaceItemPrimary',
|
|
62
|
-
pageCountInputIconFillSize: '24',
|
|
63
146
|
pageCountInputTextColor: 'surfaceTextPrimary',
|
|
64
|
-
|
|
65
|
-
pageRangeDisplayed: 8,
|
|
66
|
-
previousLabel: (jsxRuntime.jsx(Tooltip.Icon, { size: "14", fillSize: "32", iconFill: "surfaceItemPrimary", shape: "circular", SvgImage: _default.icons32.Arrow.Chevron_Left_Small })),
|
|
147
|
+
previousIconFillIcon: 'surfaceItemPrimary',
|
|
67
148
|
},
|
|
68
149
|
};
|
|
69
150
|
|
|
70
|
-
var paginationAppearance = tslib_es6.__assign({}, paginationAppearanceSurface);
|
|
151
|
+
var paginationAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, paginationAppearanceSurface), paginationAppearanceAccent), paginationAppearanceSize), paginationAppearanceStyle);
|
|
71
152
|
|
|
72
153
|
var paginationConfig = {
|
|
73
154
|
appearance: paginationAppearance,
|
|
@@ -138,15 +219,15 @@ function Pagination(props) {
|
|
|
138
219
|
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = paginationConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
139
220
|
}, {});
|
|
140
221
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
141
|
-
var justifyContentClass = propsGenerator.justifyContentClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, marginPagesDisplayed = propsGenerator.marginPagesDisplayed,
|
|
222
|
+
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, sizeClass = propsGenerator.sizeClass;
|
|
142
223
|
var paginationStyles = useStyles.useStyles(props).styles;
|
|
143
|
-
return (jsxRuntime.jsxs("div", { className:
|
|
224
|
+
return (jsxRuntime.jsxs("div", { className: clsx('pagination', sizeClass && "pagination_size_".concat(sizeClass)), "data-testid": dataTestId, "data-tour": dataTour, style: paginationStyles, children: [jsxRuntime.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 &&
|
|
144
225
|
"pagination_justify-content_".concat(justifyContentClass)),
|
|
145
226
|
// pages settings
|
|
146
227
|
forcePage: paginationPageIndex, marginPagesDisplayed: marginPagesDisplayed, nextClassName: "pagination__item pagination__item_next",
|
|
147
228
|
// next button
|
|
148
|
-
nextLabel:
|
|
149
|
-
return activeDropdownItem === item ? (jsxRuntime.jsx(DropdownItem.DropdownItem, { width: pageCountDropdownItemWidth, size: pageCountDropdownItemSize, fill: pageCountDropdownItemFill, fillActive: pageCountDropdownItemFillActive, fillActiveHover: pageCountDropdownItemFillActiveHover, fillHover: pageCountDropdownItemFillHover, label: item.toString(), labelTextAlign: pageCountDropdownItemLabelAlign, labelTextColor: pageCountDropdownItemLabelColor, labelTextColorActive: pageCountDropdownItemLabelColorActive,
|
|
229
|
+
nextLabel: jsxRuntime.jsx(Tooltip.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: jsxRuntime.jsx(Tooltip.Icon, { fill: previousIconFill, fillSize: previousIconFillSize, iconFill: previousIconFillIcon, iconSize: previousIconSize, shape: "circular", SvgImage: previousIcon }), previousLinkClassName: "pagination__item-link", onPageChange: _onChangePage }), isPageCount && (jsxRuntime.jsxs("div", { className: clsx(className, 'pagination__count'), children: [jsxRuntime.jsx(Text.Text, { className: "pagination__count-text", size: pageCountDescTextSize, textColor: pageCountDescTextColor, children: pageCountDesc }), jsxRuntime.jsxs("div", { className: clsx('pagination__input', 'cursor_type_pointer', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)), onClick: onClickCommandMenuButton, children: [jsxRuntime.jsx(Text.Text, { size: pageCountInputTextSize, textColor: pageCountInputTextColor, children: activeDropdownItem }), jsxRuntime.jsx(Tooltip.Icon, { fillSize: pageCountInputIconFillSize, iconFill: pageCountInputIconColor, imageSrc: pageCountInputIconSrc, SvgImage: pageCountInputIcon }), jsxRuntime.jsx(DropdownItem.Dropdown, { className: "pagination__dropdown", alignment: pageCountDropdownAlignment, fill: pageCountDropdownFill, elevation: pageCountDropdownElevation, shape: pageCountDropdownShape, isOpen: isOpenDropdown, setIsOpen: setIsOpenDropdown, children: pageCountDropdownArray.map(function (item, index) {
|
|
230
|
+
return activeDropdownItem === item ? (jsxRuntime.jsx(DropdownItem.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 &&
|
|
150
231
|
pageCountDropdownItemShowDivider, isActive: true, onClick: function (event) { return handleDropdownItemClick(event, item); } }, item)) : (jsxRuntime.jsx(DropdownItem.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 &&
|
|
151
232
|
pageCountDropdownItemShowDivider, isActive: false, onClick: function (event) { return handleDropdownItemClick(event, item); } }, item));
|
|
152
233
|
}) })] })] }))] }));
|
|
@@ -30,7 +30,7 @@ var searchAppearanceDefault = {
|
|
|
30
30
|
defaultPrimary: {
|
|
31
31
|
fill: 'surfaceSecondary',
|
|
32
32
|
borderColor: 'surfaceBorderQuaternary',
|
|
33
|
-
|
|
33
|
+
borderColorHover: 'surfaceBorderQuaternaryHover',
|
|
34
34
|
iconAfterFill: 'surfaceItemQuaternary',
|
|
35
35
|
iconBeforeFill: 'surfaceItemQuaternary',
|
|
36
36
|
iconClearFill: 'surfaceItemQuaternary',
|
|
@@ -43,7 +43,7 @@ var searchAppearanceDisabled = {
|
|
|
43
43
|
disabledPrimary: {
|
|
44
44
|
fill: 'surfaceDisabled',
|
|
45
45
|
borderColor: 'surfaceBorderDisabled',
|
|
46
|
-
|
|
46
|
+
borderColorHover: 'surfaceBorderDisabledHover',
|
|
47
47
|
iconAfterFill: 'surfaceItemPrimary',
|
|
48
48
|
iconBeforeFill: 'surfaceItemPrimary',
|
|
49
49
|
iconClearFill: 'surfaceItemPrimary',
|
|
@@ -56,7 +56,7 @@ var searchAppearanceError = {
|
|
|
56
56
|
errorPrimary: {
|
|
57
57
|
fill: 'errorTertiary',
|
|
58
58
|
borderColor: 'errorBorderQuaternary',
|
|
59
|
-
|
|
59
|
+
borderColorHover: 'errorBorderQuaternaryHover',
|
|
60
60
|
iconAfterFill: 'errorItemSecondary',
|
|
61
61
|
iconBeforeFill: 'errorItemSecondary',
|
|
62
62
|
iconClearFill: 'errorItemSecondary',
|
|
@@ -69,7 +69,7 @@ var searchAppearanceRequire = {
|
|
|
69
69
|
requirePrimary: {
|
|
70
70
|
fill: 'warningTertiary',
|
|
71
71
|
borderColor: 'warningBorderSecondary',
|
|
72
|
-
|
|
72
|
+
borderColorHover: 'warningBorderSecondaryHover',
|
|
73
73
|
iconAfterFill: 'warningItemSecondary',
|
|
74
74
|
iconBeforeFill: 'warningItemSecondary',
|
|
75
75
|
iconClearFill: 'warningItemSecondary',
|
|
@@ -124,18 +124,19 @@ var searchAppearanceSize = {
|
|
|
124
124
|
};
|
|
125
125
|
|
|
126
126
|
var searchAppearanceStyle = {
|
|
127
|
-
|
|
127
|
+
solid: {
|
|
128
128
|
borderColor: 'none',
|
|
129
|
-
|
|
130
|
-
ghost: {
|
|
131
|
-
fill: 'none',
|
|
132
|
-
borderWidth: '0',
|
|
129
|
+
borderColorHover: 'none',
|
|
133
130
|
},
|
|
134
131
|
outlined: {
|
|
135
132
|
fill: 'none',
|
|
136
133
|
},
|
|
137
|
-
|
|
138
|
-
|
|
134
|
+
full: {
|
|
135
|
+
borderColor: 'none',
|
|
136
|
+
},
|
|
137
|
+
ghost: {
|
|
138
|
+
fill: 'none',
|
|
139
|
+
borderColor: 'none',
|
|
139
140
|
},
|
|
140
141
|
};
|
|
141
142
|
|
|
@@ -143,7 +144,7 @@ var searchAppearanceSuccess = {
|
|
|
143
144
|
successPrimary: {
|
|
144
145
|
fill: 'successTertiary',
|
|
145
146
|
borderColor: 'accentBorderQuaternary',
|
|
146
|
-
|
|
147
|
+
borderColorHover: 'accentBorderQuaternary',
|
|
147
148
|
textColor: 'surfaceTextPrimary',
|
|
148
149
|
iconAfterFill: 'successItemSecondary',
|
|
149
150
|
iconBeforeFill: 'successItemSecondary',
|
|
@@ -177,9 +178,9 @@ var SearchInput = React.forwardRef(function SearchInput(props, ref) {
|
|
|
177
178
|
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = searchInputConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
178
179
|
}, {});
|
|
179
180
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
180
|
-
var size = propsGenerator.size, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass,
|
|
181
|
+
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;
|
|
181
182
|
var searchInputStyles = useStyles.useStyles(props).styles;
|
|
182
|
-
return (jsxRuntime.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),
|
|
183
|
+
return (jsxRuntime.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) && (jsxRuntime.jsx(Tooltip.Icon, { className: "search-input__icon search-input__icon-before", size: iconBeforeSize, iconFill: iconBeforeFill, imageSrc: iconBeforeSrc, SvgImage: iconBefore })), jsxRuntime.jsxs("div", { className: clsx('search-input__wrapper', inputFillClass && "fill_".concat(inputFillClass), inputShapeClass && "search-input_shape_".concat(inputShapeClass)), children: [jsxRuntime.jsx("input", { className: clsx('search-input__value', (inputTextSizeClass ||
|
|
183
184
|
inputTextWeightClass ||
|
|
184
185
|
inputTextColorClass ||
|
|
185
186
|
inputTextStyleClass) &&
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _default = require('@itcase/icons/default');
|
|
4
|
+
|
|
5
|
+
var segmentedArgsMock = {
|
|
6
|
+
activeSegment: {
|
|
7
|
+
value: 1,
|
|
8
|
+
},
|
|
9
|
+
segments: [
|
|
10
|
+
{
|
|
11
|
+
label: 'Label 1',
|
|
12
|
+
iconAfter: _default.icons24.Placeholder,
|
|
13
|
+
iconBefore: _default.icons24.Placeholder,
|
|
14
|
+
value: 1,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: 'Label 2',
|
|
18
|
+
iconAfter: _default.icons24.Placeholder,
|
|
19
|
+
iconBefore: _default.icons24.Placeholder,
|
|
20
|
+
value: 2,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: 'Label 3',
|
|
24
|
+
iconAfter: _default.icons24.Placeholder,
|
|
25
|
+
iconBefore: _default.icons24.Placeholder,
|
|
26
|
+
value: 3,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: 'Label 4',
|
|
30
|
+
iconAfter: _default.icons24.Placeholder,
|
|
31
|
+
iconBefore: _default.icons24.Placeholder,
|
|
32
|
+
value: 4,
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
shape: 'rounded',
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
exports.segmentedArgsMock = segmentedArgsMock;
|
|
@@ -4,10 +4,12 @@ var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var clsx = require('clsx');
|
|
7
|
+
var Tooltip = require('../../Tooltip_cjs_DinScDnC.js');
|
|
7
8
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
9
|
var Text = require('../../Text_cjs_C9fOm0nd.js');
|
|
10
|
+
require('../hooks/useStyles/useStyles.js');
|
|
9
11
|
require('lodash/camelCase');
|
|
10
|
-
require('lodash/
|
|
12
|
+
require('lodash/maxBy');
|
|
11
13
|
require('lodash/upperFirst');
|
|
12
14
|
require('../context/Notifications.js');
|
|
13
15
|
require('uuid');
|
|
@@ -16,9 +18,10 @@ require('../context/UIContext.js');
|
|
|
16
18
|
require('../hooks/useMediaQueries/useMediaQueries.js');
|
|
17
19
|
require('react-responsive');
|
|
18
20
|
require('../utils/setViewportProperty.js');
|
|
19
|
-
require('../hooks/useStyles/useStyles.js');
|
|
20
|
-
require('lodash/maxBy');
|
|
21
21
|
require('../hooks/useStyles/styleAttributes.js');
|
|
22
|
+
require('react-inlinesvg');
|
|
23
|
+
require('../../Link_cjs_DbRGq2Yk.js');
|
|
24
|
+
require('lodash/castArray');
|
|
22
25
|
|
|
23
26
|
var segmentedAppearanceDefault = {
|
|
24
27
|
defaultPrimary: {
|
|
@@ -35,7 +38,7 @@ var segmentedAppearanceDefault = {
|
|
|
35
38
|
fill: 'surfaceSecondary',
|
|
36
39
|
fillActive: 'accentPrimary',
|
|
37
40
|
fillActiveHover: 'accentPrimary',
|
|
38
|
-
fillHover: '
|
|
41
|
+
fillHover: 'surfaceTertiary',
|
|
39
42
|
labelTextActiveColor: 'accentTextPrimary',
|
|
40
43
|
labelTextColor: 'surfaceTextPrimary',
|
|
41
44
|
indicatorFill: 'accentPrimary',
|
|
@@ -110,7 +113,7 @@ var segmentedAppearanceStyle = {
|
|
|
110
113
|
};
|
|
111
114
|
|
|
112
115
|
var segmentedAppearanceSuccess = {
|
|
113
|
-
|
|
116
|
+
successPrimary: {
|
|
114
117
|
fill: 'successPrimary',
|
|
115
118
|
fillHover: 'successPrimaryHover',
|
|
116
119
|
labelTextColor: 'successTextSecondary',
|
|
@@ -136,7 +139,7 @@ var segmentedConfig = {
|
|
|
136
139
|
},
|
|
137
140
|
};
|
|
138
141
|
var Segmented = React.forwardRef(function (props) {
|
|
139
|
-
var className = props.className, name = props.name, appearance = props.appearance, isDisabled = props.isDisabled, _a = props.activeSegment, activeSegment = _a === void 0 ? {} : _a, segments = props.segments, setActiveSegment = props.setActiveSegment, onChange = props.onChange;
|
|
142
|
+
var className = props.className, name = props.name, appearance = props.appearance, isDisabled = props.isDisabled, _a = props.activeSegment, activeSegment = _a === void 0 ? {} : _a, segments = props.segments, isSkeleton = props.isSkeleton, setActiveSegment = props.setActiveSegment, onChange = props.onChange;
|
|
140
143
|
var controlRef = React.useRef(null);
|
|
141
144
|
var segmentsRefs = React.useMemo(function () {
|
|
142
145
|
return new Map(segments.map(function (item) { return [item.value, React.createRef()]; }));
|
|
@@ -163,17 +166,17 @@ var Segmented = React.forwardRef(function (props) {
|
|
|
163
166
|
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = segmentedConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
164
167
|
}, {});
|
|
165
168
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
166
|
-
var fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveHoverColor = propsGenerator.labelTextActiveHoverColor, labelTextColor = propsGenerator.labelTextColor, labelTextHoverColor = propsGenerator.labelTextHoverColor, labelTextSize = propsGenerator.labelTextSize, labelTextWrap = propsGenerator.labelTextWrap, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, indicatorFillClass = propsGenerator.indicatorFillClass, inputBorderColorClass = propsGenerator.inputBorderColorClass, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
|
|
167
|
-
return (jsxRuntime.jsx("div", { className: clsx(className, 'segmented', shapeClass && "segmented_shape_".concat(shapeClass), fillClass && "fill_".concat(fillClass), widthClass && "segmented_width_".concat(widthClass), sizeClass && "segmented_size_".concat(sizeClass), inputBorderColorClass && "border-color_".concat(inputBorderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass)), ref: controlRef, children: jsxRuntime.jsx("div", { className: "segmented__wrapper", children: jsxRuntime.jsxs("div", { className: clsx('segmented__wrapper-inner'), children: [segments === null || segments === void 0 ? void 0 : segments.map(function (item) { return (jsxRuntime.jsxs("div", { className: clsx('segmented__item', item.value === (activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value)
|
|
169
|
+
var fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveHoverColor = propsGenerator.labelTextActiveHoverColor, labelTextColor = propsGenerator.labelTextColor, labelTextHoverColor = propsGenerator.labelTextHoverColor, labelTextSize = propsGenerator.labelTextSize, labelTextWrap = propsGenerator.labelTextWrap, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, icon = propsGenerator.icon, iconAppearance = propsGenerator.iconAppearance, iconFill = propsGenerator.iconFill, iconFillIcon = propsGenerator.iconFillIcon, iconFillSize = propsGenerator.iconFillSize, iconShape = propsGenerator.iconShape, iconSize = propsGenerator.iconSize, iconSrc = propsGenerator.iconSrc, indicatorFillClass = propsGenerator.indicatorFillClass, inputBorderColorClass = propsGenerator.inputBorderColorClass, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
|
|
170
|
+
return (jsxRuntime.jsx("div", { className: clsx(className, 'segmented', shapeClass && "segmented_shape_".concat(shapeClass), fillClass && "fill_".concat(fillClass), widthClass && "segmented_width_".concat(widthClass), sizeClass && "segmented_size_".concat(sizeClass), inputBorderColorClass && "border-color_".concat(inputBorderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), isSkeleton && "segmented_skeleton"), ref: controlRef, children: jsxRuntime.jsx("div", { className: "segmented__wrapper", children: jsxRuntime.jsxs("div", { className: clsx('segmented__wrapper-inner'), children: [segments === null || segments === void 0 ? void 0 : segments.map(function (item) { return (jsxRuntime.jsxs("div", { className: clsx('segmented__item', item.value === (activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value)
|
|
168
171
|
? fillActiveHoverClass &&
|
|
169
172
|
"fill_active_hover_".concat(fillActiveHoverClass)
|
|
170
173
|
: fillHoverClass && "fill_hover_".concat(fillHoverClass), item.value === (activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value)
|
|
171
174
|
? fillActiveClass && "fill_active_".concat(fillActiveClass)
|
|
172
|
-
: fillClass && "fill_".concat(fillClass), item.value === (activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value) && 'segmented__item_active', onChange && 'cursor_type_pointer', isDisabled && 'cursor_type_default'), ref: segmentsRefs.get(item.value), children: [jsxRuntime.jsx("input", { id: item.label, className: "segmented__item-radio", type: "radio", name: name, checked: item.value === (activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value), value: item.value, onChange: function () { return onChangeValue(item); } }), jsxRuntime.jsx("label", { className: clsx('segmented__item-label'), htmlFor: item.label, children: jsxRuntime.jsx(Text.Text, { className: clsx('segmented__item-label-text', labelTextWrap && "word-wrap_".concat(labelTextWrap)), size: labelTextSize, textColor: item.value === (activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value)
|
|
175
|
+
: fillClass && "fill_".concat(fillClass), item.value === (activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value) && 'segmented__item_active', onChange && 'cursor_type_pointer', isDisabled && 'cursor_type_default'), ref: segmentsRefs.get(item.value), children: [(icon || iconSrc) && (jsxRuntime.jsx(Tooltip.Icon, { className: clsx('tile__icon'), appearance: iconAppearance, fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon })), jsxRuntime.jsx("input", { id: item.label, className: "segmented__item-radio", type: "radio", name: name, checked: item.value === (activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value), value: item.value, onChange: function () { return onChangeValue(item); } }), jsxRuntime.jsx("label", { className: clsx('segmented__item-label'), htmlFor: item.label, children: jsxRuntime.jsx(Text.Text, { className: clsx('segmented__item-label-text', labelTextWrap && "word-wrap_".concat(labelTextWrap)), size: labelTextSize, textColor: item.value === (activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value)
|
|
173
176
|
? labelTextActiveColor
|
|
174
177
|
: labelTextColor, textColorHover: item.value === (activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value)
|
|
175
178
|
? labelTextActiveHoverColor
|
|
176
|
-
: labelTextHoverColor, children: item.label }) })] }, item.value)); }), jsxRuntime.jsx("div", { className: clsx('segmented__indicator', indicatorFillClass && "fill_".concat(indicatorFillClass))
|
|
179
|
+
: labelTextHoverColor, children: item.label }) })] }, item.value)); }), jsxRuntime.jsx("div", { className: clsx('segmented__indicator', indicatorFillClass && "fill_".concat(indicatorFillClass)) })] }) }) }));
|
|
177
180
|
});
|
|
178
181
|
|
|
179
182
|
exports.Segmented = Segmented;
|
|
@@ -7,7 +7,12 @@ var tabListMock = {
|
|
|
7
7
|
{ key: 1, label: 'Tab 1', isActive: true },
|
|
8
8
|
{ key: 2, label: 'Tab 2', isActive: false },
|
|
9
9
|
{ key: 3, label: 'Tab 3', badgeValue: 3, isActive: false },
|
|
10
|
-
{
|
|
10
|
+
{
|
|
11
|
+
key: 4,
|
|
12
|
+
label: 'Tab 4',
|
|
13
|
+
icon: _default.icons16.Placeholder.Default,
|
|
14
|
+
isActive: false,
|
|
15
|
+
},
|
|
11
16
|
],
|
|
12
17
|
};
|
|
13
18
|
|
|
@@ -129,7 +129,7 @@ function createNotification(notification, onClose) {
|
|
|
129
129
|
var status = STATUSES.warning;
|
|
130
130
|
// let appearance = STATUSES.appearance
|
|
131
131
|
var closeByTime = 4500;
|
|
132
|
-
var
|
|
132
|
+
var appearance = '';
|
|
133
133
|
if (typeof notification === 'string') {
|
|
134
134
|
text = notification;
|
|
135
135
|
}
|
|
@@ -142,24 +142,24 @@ function createNotification(notification, onClose) {
|
|
|
142
142
|
}
|
|
143
143
|
switch (status) {
|
|
144
144
|
case 'success':
|
|
145
|
-
|
|
145
|
+
appearance = 'successPrimary';
|
|
146
146
|
break;
|
|
147
147
|
case 'info':
|
|
148
|
-
|
|
148
|
+
appearance = 'infoPrimary';
|
|
149
149
|
break;
|
|
150
150
|
case 'error':
|
|
151
|
-
|
|
151
|
+
appearance = 'errorPrimary';
|
|
152
152
|
break;
|
|
153
153
|
case 'warning':
|
|
154
|
-
|
|
154
|
+
appearance = 'warningPrimary';
|
|
155
155
|
break;
|
|
156
156
|
}
|
|
157
157
|
return {
|
|
158
158
|
id: id,
|
|
159
|
+
appearance: appearance,
|
|
159
160
|
title: title,
|
|
160
161
|
status: status,
|
|
161
162
|
text: text,
|
|
162
|
-
textColor: textColor,
|
|
163
163
|
closeByTime: closeByTime,
|
|
164
164
|
onClose: onClose,
|
|
165
165
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { icons16 } from '@itcase/icons/default';
|
|
2
|
+
|
|
1
3
|
var breadcrumbsListMock = {
|
|
2
4
|
breadcrumbsList: [
|
|
3
5
|
{
|
|
@@ -5,45 +7,35 @@ var breadcrumbsListMock = {
|
|
|
5
7
|
key: 1,
|
|
6
8
|
text: 'Text 123',
|
|
7
9
|
href: '/',
|
|
8
|
-
|
|
9
|
-
// Use url to ".storybook/assets/icons/placeholder.svg"
|
|
10
|
-
// icon: icons16.Placeholder,
|
|
10
|
+
icon: icons16.Placeholder.Default,
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
id: '2',
|
|
14
14
|
key: 2,
|
|
15
15
|
text: 'Text 123',
|
|
16
16
|
href: '/',
|
|
17
|
-
|
|
18
|
-
// Use url to ".storybook/assets/icons/placeholder.svg"
|
|
19
|
-
// icon: icons16.Placeholder,
|
|
17
|
+
icon: icons16.Placeholder.Default,
|
|
20
18
|
},
|
|
21
19
|
{
|
|
22
20
|
id: '3',
|
|
23
21
|
key: 3,
|
|
24
22
|
text: 'Text 123',
|
|
25
23
|
href: '/',
|
|
26
|
-
|
|
27
|
-
// Use url to ".storybook/assets/icons/placeholder.svg"
|
|
28
|
-
// icon: icons16.Placeholder,
|
|
24
|
+
icon: icons16.Placeholder.Default,
|
|
29
25
|
},
|
|
30
26
|
{
|
|
31
27
|
id: '4',
|
|
32
28
|
key: 4,
|
|
33
29
|
text: 'Text 123',
|
|
34
30
|
href: '/',
|
|
35
|
-
|
|
36
|
-
// Use url to ".storybook/assets/icons/placeholder.svg"
|
|
37
|
-
// icon: icons16.Placeholder,
|
|
31
|
+
icon: icons16.Placeholder.Default,
|
|
38
32
|
},
|
|
39
33
|
{
|
|
40
34
|
id: '5',
|
|
41
35
|
key: 5,
|
|
42
36
|
text: 'Text 123',
|
|
43
37
|
href: '/',
|
|
44
|
-
|
|
45
|
-
// Use url to ".storybook/assets/icons/placeholder.svg"
|
|
46
|
-
// icon: icons16.Placeholder,
|
|
38
|
+
icon: icons16.Placeholder.Default,
|
|
47
39
|
},
|
|
48
40
|
],
|
|
49
41
|
};
|
package/dist/components/Cell.js
CHANGED
|
@@ -4,7 +4,7 @@ import clsx from 'clsx';
|
|
|
4
4
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
5
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
6
6
|
import { I as Icon } from '../Tooltip_es_B0nm9irO.js';
|
|
7
|
-
import { L as Label } from '../
|
|
7
|
+
import { L as Label } from '../Label_es_ouC2i_iI.js';
|
|
8
8
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
9
9
|
import 'react';
|
|
10
10
|
import 'lodash/camelCase';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { icons24 } from '@itcase/icons/default';
|
|
2
2
|
|
|
3
3
|
var choiceListMock = {
|
|
4
4
|
active: {
|
|
@@ -7,32 +7,32 @@ var choiceListMock = {
|
|
|
7
7
|
choices: [
|
|
8
8
|
{
|
|
9
9
|
label: 'Label 1',
|
|
10
|
-
iconAfter:
|
|
11
|
-
iconBefore:
|
|
10
|
+
iconAfter: icons24.Placeholder,
|
|
11
|
+
iconBefore: icons24.Placeholder,
|
|
12
12
|
value: 1,
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
label: 'Label 2',
|
|
16
|
-
iconAfter:
|
|
17
|
-
iconBefore:
|
|
16
|
+
iconAfter: icons24.Placeholder,
|
|
17
|
+
iconBefore: icons24.Placeholder,
|
|
18
18
|
value: 2,
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
label: 'Label 3',
|
|
22
|
-
iconAfter:
|
|
23
|
-
iconBefore:
|
|
22
|
+
iconAfter: icons24.Placeholder,
|
|
23
|
+
iconBefore: icons24.Placeholder,
|
|
24
24
|
value: 3,
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
label: 'Label 4',
|
|
28
|
-
iconAfter:
|
|
29
|
-
iconBefore:
|
|
28
|
+
iconAfter: icons24.Placeholder,
|
|
29
|
+
iconBefore: icons24.Placeholder,
|
|
30
30
|
value: 4,
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
label: 'Label 5',
|
|
34
|
-
iconAfter:
|
|
35
|
-
iconBefore:
|
|
34
|
+
iconAfter: icons24.Placeholder,
|
|
35
|
+
iconBefore: icons24.Placeholder,
|
|
36
36
|
value: 5,
|
|
37
37
|
},
|
|
38
38
|
],
|
|
@@ -43,23 +43,23 @@ var choiceListIconMock = {
|
|
|
43
43
|
},
|
|
44
44
|
choices: [
|
|
45
45
|
{
|
|
46
|
-
icon:
|
|
46
|
+
icon: icons24.Placeholder,
|
|
47
47
|
value: 1,
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
|
-
icon:
|
|
50
|
+
icon: icons24.Placeholder,
|
|
51
51
|
value: 2,
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
|
-
icon:
|
|
54
|
+
icon: icons24.Placeholder,
|
|
55
55
|
value: 3,
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
|
-
icon:
|
|
58
|
+
icon: icons24.Placeholder,
|
|
59
59
|
value: 4,
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
|
-
icon:
|
|
62
|
+
icon: icons24.Placeholder,
|
|
63
63
|
value: 5,
|
|
64
64
|
},
|
|
65
65
|
],
|