@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
|
@@ -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';
|
|
@@ -9,7 +9,7 @@ import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
|
9
9
|
import { D as Dropdown, a as DropdownItem } from '../DropdownItem_es_BMnIhUSe.js';
|
|
10
10
|
import { I as Icon } from '../Tooltip_es_B0nm9irO.js';
|
|
11
11
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
12
|
-
import { icons32, icons24 } from '@itcase/icons/default';
|
|
12
|
+
import { icons32, icons14, icons24 } from '@itcase/icons/default';
|
|
13
13
|
import 'lodash/camelCase';
|
|
14
14
|
import 'lodash/castArray';
|
|
15
15
|
import 'lodash/upperFirst';
|
|
@@ -26,21 +26,110 @@ 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
|
+
nextIcon: icons32.Arrow.ChevronRightSmall,
|
|
59
|
+
pageCountDescTextSize: 'l',
|
|
60
|
+
pageCountDropdownItemDividerSize: 'xxs',
|
|
61
|
+
pageCountDropdownItemLabelSize: 'm',
|
|
62
|
+
pageCountDropdownItemSize: 'l',
|
|
63
|
+
pageCountInputIcon: icons32.Arrow.ChevronDownSmall,
|
|
64
|
+
pageCountInputIcon: icons24.Arrow.ChevronDownSmall,
|
|
65
|
+
pageCountInputIcon: icons32.Arrow.ChevronDownSmall,
|
|
66
|
+
pageCountInputIconFillSize: '24',
|
|
67
|
+
pageCountInputTextSize: 'm',
|
|
68
|
+
previousIcon: icons32.Arrow.ChevronLeftSmall,
|
|
69
|
+
},
|
|
70
|
+
sizeM: {
|
|
71
|
+
size: 'm',
|
|
72
|
+
labelTextSize: 'm',
|
|
73
|
+
iconAfterFillSize: '24',
|
|
74
|
+
iconAfterSize: '24',
|
|
75
|
+
iconBeforeFillSize: '24',
|
|
76
|
+
iconBeforeSize: '24',
|
|
77
|
+
nextIcon: icons32.Arrow.ChevronRightSmall,
|
|
78
|
+
pageCountDescTextSize: 'm',
|
|
79
|
+
pageCountDropdownItemDividerSize: 'xxs',
|
|
80
|
+
pageCountDropdownItemLabelSize: 'm',
|
|
81
|
+
pageCountDropdownItemSize: 'l',
|
|
82
|
+
pageCountDropdownItemWidth: '64',
|
|
83
|
+
pageCountInputIcon: icons14.Arrow.ChevronDownSmall,
|
|
84
|
+
pageCountInputIconFillSize: '14',
|
|
85
|
+
pageCountInputTextSize: 'm',
|
|
86
|
+
previousIcon: icons32.Arrow.ChevronLeftSmall,
|
|
87
|
+
},
|
|
88
|
+
sizeS: {
|
|
89
|
+
size: 's',
|
|
90
|
+
labelTextSize: 's',
|
|
91
|
+
iconAfterFillSize: '20',
|
|
92
|
+
iconAfterSize: '20',
|
|
93
|
+
iconBeforeFillSize: '20',
|
|
94
|
+
iconBeforeSize: '20',
|
|
95
|
+
nextIcon: icons32.Arrow.ChevronRightSmall,
|
|
96
|
+
previousIcon: icons32.Arrow.ChevronLeftSmall,
|
|
97
|
+
},
|
|
98
|
+
sizeXS: {
|
|
99
|
+
size: 'xs',
|
|
100
|
+
labelTextSize: 'xs',
|
|
101
|
+
beforeSize: '16',
|
|
102
|
+
iconAfterFillSize: '16',
|
|
103
|
+
nextIcon: icons32.Arrow.ChevronRightSmall,
|
|
104
|
+
pageCountInputIcon: icons32.Arrow.ChevronDownSmall,
|
|
105
|
+
previousIcon: icons32.Arrow.ChevronLeftSmall,
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
var paginationAppearanceStyle = {
|
|
110
|
+
solid: {
|
|
111
|
+
borderColor: 'none',
|
|
112
|
+
},
|
|
113
|
+
outlined: {
|
|
114
|
+
fill: 'none',
|
|
115
|
+
},
|
|
116
|
+
full: {},
|
|
117
|
+
ghost: {
|
|
118
|
+
fill: 'none',
|
|
119
|
+
borderColor: 'none',
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
|
|
29
123
|
var paginationAppearanceSurface = {
|
|
30
124
|
surfacePrimary: {
|
|
31
125
|
fill: 'surfacePrimary',
|
|
32
126
|
fillHover: 'surfaceSecondary',
|
|
33
|
-
|
|
34
|
-
marginPagesDisplayed: 10,
|
|
35
|
-
nextLabel: (jsx(Icon, { size: "14", fillSize: "32", iconFill: "surfaceItemPrimary", shape: "circular", SvgImage: icons32.Arrow.Chevron_Right_Small })),
|
|
36
|
-
pageCountDesc: 'кол-во строк',
|
|
127
|
+
nextIconFillIcon: 'surfaceItemPrimary',
|
|
37
128
|
pageCountDescTextColor: 'surfaceTextPrimary',
|
|
38
|
-
pageCountDescTextSize: 'm',
|
|
39
129
|
pageCountDropdownAlignment: 'topCenter',
|
|
40
130
|
pageCountDropdownElevation: 8,
|
|
41
131
|
pageCountDropdownFill: 'surfacePrimary',
|
|
42
132
|
pageCountDropdownItemDividerFill: 'surfaceSecondary',
|
|
43
|
-
pageCountDropdownItemDividerSize: 'xxs',
|
|
44
133
|
pageCountDropdownItemFill: 'surfacePrimary',
|
|
45
134
|
pageCountDropdownItemFillActive: 'accentPrimary',
|
|
46
135
|
pageCountDropdownItemFillActiveHover: 'accentActiveHover',
|
|
@@ -50,22 +139,14 @@ var paginationAppearanceSurface = {
|
|
|
50
139
|
pageCountDropdownItemLabelColorActive: 'accentTextPrimary',
|
|
51
140
|
pageCountDropdownItemLabelColorActiveHover: 'accentTextPrimary',
|
|
52
141
|
pageCountDropdownItemLabelColorHover: 'surfaceTextPrimary',
|
|
53
|
-
pageCountDropdownItemLabelSize: 'm',
|
|
54
|
-
pageCountDropdownItemShowDivider: true,
|
|
55
|
-
pageCountDropdownItemSize: 'l',
|
|
56
|
-
pageCountDropdownItemWidth: 'hug',
|
|
57
142
|
pageCountDropdownShape: 'rounded',
|
|
58
|
-
pageCountInputIcon: icons24.Arrow.Chevron_Down_Small,
|
|
59
143
|
pageCountInputIconColor: 'surfaceItemPrimary',
|
|
60
|
-
pageCountInputIconFillSize: '24',
|
|
61
144
|
pageCountInputTextColor: 'surfaceTextPrimary',
|
|
62
|
-
|
|
63
|
-
pageRangeDisplayed: 8,
|
|
64
|
-
previousLabel: (jsx(Icon, { size: "14", fillSize: "32", iconFill: "surfaceItemPrimary", shape: "circular", SvgImage: icons32.Arrow.Chevron_Left_Small })),
|
|
145
|
+
previousIconFillIcon: 'surfaceItemPrimary',
|
|
65
146
|
},
|
|
66
147
|
};
|
|
67
148
|
|
|
68
|
-
var paginationAppearance = __assign({}, paginationAppearanceSurface);
|
|
149
|
+
var paginationAppearance = __assign(__assign(__assign(__assign({}, paginationAppearanceSurface), paginationAppearanceAccent), paginationAppearanceSize), paginationAppearanceStyle);
|
|
69
150
|
|
|
70
151
|
var paginationConfig = {
|
|
71
152
|
appearance: paginationAppearance,
|
|
@@ -136,15 +217,15 @@ function Pagination(props) {
|
|
|
136
217
|
return (__assign(__assign({}, resultConfig), (_a = paginationConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
137
218
|
}, {});
|
|
138
219
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
139
|
-
var justifyContentClass = propsGenerator.justifyContentClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, marginPagesDisplayed = propsGenerator.marginPagesDisplayed,
|
|
220
|
+
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;
|
|
140
221
|
var paginationStyles = useStyles(props).styles;
|
|
141
|
-
return (jsxs("div", { className:
|
|
222
|
+
return (jsxs("div", { className: clsx('pagination', sizeClass && "pagination_size_".concat(sizeClass)), "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
223
|
"pagination_justify-content_".concat(justifyContentClass)),
|
|
143
224
|
// pages settings
|
|
144
225
|
forcePage: paginationPageIndex, marginPagesDisplayed: marginPagesDisplayed, nextClassName: "pagination__item pagination__item_next",
|
|
145
226
|
// 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,
|
|
227
|
+
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, { className: "pagination__dropdown", alignment: pageCountDropdownAlignment, fill: pageCountDropdownFill, elevation: pageCountDropdownElevation, shape: pageCountDropdownShape, isOpen: isOpenDropdown, setIsOpen: setIsOpenDropdown, children: pageCountDropdownArray.map(function (item, index) {
|
|
228
|
+
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
229
|
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
230
|
pageCountDropdownItemShowDivider, isActive: false, onClick: function (event) { return handleDropdownItemClick(event, item); } }, item));
|
|
150
231
|
}) })] })] }))] }));
|
|
@@ -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) &&
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { icons24 } from '@itcase/icons/default';
|
|
2
|
+
|
|
3
|
+
var segmentedArgsMock = {
|
|
4
|
+
activeSegment: {
|
|
5
|
+
value: 1,
|
|
6
|
+
},
|
|
7
|
+
segments: [
|
|
8
|
+
{
|
|
9
|
+
label: 'Label 1',
|
|
10
|
+
iconAfter: icons24.Placeholder,
|
|
11
|
+
iconBefore: icons24.Placeholder,
|
|
12
|
+
value: 1,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
label: 'Label 2',
|
|
16
|
+
iconAfter: icons24.Placeholder,
|
|
17
|
+
iconBefore: icons24.Placeholder,
|
|
18
|
+
value: 2,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: 'Label 3',
|
|
22
|
+
iconAfter: icons24.Placeholder,
|
|
23
|
+
iconBefore: icons24.Placeholder,
|
|
24
|
+
value: 3,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: 'Label 4',
|
|
28
|
+
iconAfter: icons24.Placeholder,
|
|
29
|
+
iconBefore: icons24.Placeholder,
|
|
30
|
+
value: 4,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
shape: 'rounded',
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { segmentedArgsMock };
|
|
@@ -2,10 +2,12 @@ import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import React, { useRef, useMemo, createRef, useCallback, useEffect } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
+
import { I as Icon } from '../Tooltip_es_B0nm9irO.js';
|
|
5
6
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
7
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
8
|
+
import '../hooks/useStyles/useStyles.js';
|
|
7
9
|
import 'lodash/camelCase';
|
|
8
|
-
import 'lodash/
|
|
10
|
+
import 'lodash/maxBy';
|
|
9
11
|
import 'lodash/upperFirst';
|
|
10
12
|
import '../context/Notifications.js';
|
|
11
13
|
import 'uuid';
|
|
@@ -14,9 +16,10 @@ import '../context/UIContext.js';
|
|
|
14
16
|
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
15
17
|
import 'react-responsive';
|
|
16
18
|
import '../utils/setViewportProperty.js';
|
|
17
|
-
import '../hooks/useStyles/useStyles.js';
|
|
18
|
-
import 'lodash/maxBy';
|
|
19
19
|
import '../hooks/useStyles/styleAttributes.js';
|
|
20
|
+
import 'react-inlinesvg';
|
|
21
|
+
import '../Link_es_DxtZLeKY.js';
|
|
22
|
+
import 'lodash/castArray';
|
|
20
23
|
|
|
21
24
|
var segmentedAppearanceDefault = {
|
|
22
25
|
defaultPrimary: {
|
|
@@ -33,7 +36,7 @@ var segmentedAppearanceDefault = {
|
|
|
33
36
|
fill: 'surfaceSecondary',
|
|
34
37
|
fillActive: 'accentPrimary',
|
|
35
38
|
fillActiveHover: 'accentPrimary',
|
|
36
|
-
fillHover: '
|
|
39
|
+
fillHover: 'surfaceTertiary',
|
|
37
40
|
labelTextActiveColor: 'accentTextPrimary',
|
|
38
41
|
labelTextColor: 'surfaceTextPrimary',
|
|
39
42
|
indicatorFill: 'accentPrimary',
|
|
@@ -108,7 +111,7 @@ var segmentedAppearanceStyle = {
|
|
|
108
111
|
};
|
|
109
112
|
|
|
110
113
|
var segmentedAppearanceSuccess = {
|
|
111
|
-
|
|
114
|
+
successPrimary: {
|
|
112
115
|
fill: 'successPrimary',
|
|
113
116
|
fillHover: 'successPrimaryHover',
|
|
114
117
|
labelTextColor: 'successTextSecondary',
|
|
@@ -134,7 +137,7 @@ var segmentedConfig = {
|
|
|
134
137
|
},
|
|
135
138
|
};
|
|
136
139
|
var Segmented = React.forwardRef(function (props) {
|
|
137
|
-
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;
|
|
140
|
+
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;
|
|
138
141
|
var controlRef = useRef(null);
|
|
139
142
|
var segmentsRefs = useMemo(function () {
|
|
140
143
|
return new Map(segments.map(function (item) { return [item.value, createRef()]; }));
|
|
@@ -161,17 +164,17 @@ var Segmented = React.forwardRef(function (props) {
|
|
|
161
164
|
return (__assign(__assign({}, resultConfig), (_a = segmentedConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
162
165
|
}, {});
|
|
163
166
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
164
|
-
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;
|
|
165
|
-
return (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: jsx("div", { className: "segmented__wrapper", children: jsxs("div", { className: clsx('segmented__wrapper-inner'), children: [segments === null || segments === void 0 ? void 0 : segments.map(function (item) { return (jsxs("div", { className: clsx('segmented__item', item.value === (activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value)
|
|
167
|
+
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;
|
|
168
|
+
return (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: jsx("div", { className: "segmented__wrapper", children: jsxs("div", { className: clsx('segmented__wrapper-inner'), children: [segments === null || segments === void 0 ? void 0 : segments.map(function (item) { return (jsxs("div", { className: clsx('segmented__item', item.value === (activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value)
|
|
166
169
|
? fillActiveHoverClass &&
|
|
167
170
|
"fill_active_hover_".concat(fillActiveHoverClass)
|
|
168
171
|
: fillHoverClass && "fill_hover_".concat(fillHoverClass), item.value === (activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value)
|
|
169
172
|
? fillActiveClass && "fill_active_".concat(fillActiveClass)
|
|
170
|
-
: 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: [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); } }), jsx("label", { className: clsx('segmented__item-label'), htmlFor: item.label, children: jsx(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
|
+
: 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) && (jsx(Icon, { className: clsx('tile__icon'), appearance: iconAppearance, fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon })), 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); } }), jsx("label", { className: clsx('segmented__item-label'), htmlFor: item.label, children: jsx(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)
|
|
171
174
|
? labelTextActiveColor
|
|
172
175
|
: labelTextColor, textColorHover: item.value === (activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value)
|
|
173
176
|
? labelTextActiveHoverColor
|
|
174
|
-
: labelTextHoverColor, children: item.label }) })] }, item.value)); }), jsx("div", { className: clsx('segmented__indicator', indicatorFillClass && "fill_".concat(indicatorFillClass))
|
|
177
|
+
: labelTextHoverColor, children: item.label }) })] }, item.value)); }), jsx("div", { className: clsx('segmented__indicator', indicatorFillClass && "fill_".concat(indicatorFillClass)) })] }) }) }));
|
|
175
178
|
});
|
|
176
179
|
|
|
177
180
|
export { Segmented, segmentedAppearance, segmentedConfig };
|
|
@@ -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
|
|
|
@@ -23,6 +23,29 @@
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
.notification {
|
|
27
|
+
&&_float {
|
|
28
|
+
background: none;
|
|
29
|
+
padding: 0;
|
|
30
|
+
position: fixed;
|
|
31
|
+
top: 0;
|
|
32
|
+
right: 0;
|
|
33
|
+
z-index: 1000;
|
|
34
|
+
^&__wrapper {
|
|
35
|
+
width: 100%;
|
|
36
|
+
position: relative;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-flow: column nowrap;
|
|
39
|
+
align-items: flex-end;
|
|
40
|
+
top: 20px;
|
|
41
|
+
right: 40px;
|
|
42
|
+
gap: 20px;
|
|
43
|
+
^^&__item {
|
|
44
|
+
width: 320px;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
26
49
|
.notification__item {
|
|
27
50
|
&_float {
|
|
28
51
|
width: 100%;
|
|
@@ -14,20 +14,28 @@
|
|
|
14
14
|
align-items: center;
|
|
15
15
|
gap: 8px;
|
|
16
16
|
&-text {
|
|
17
|
-
color: var(--surface-text-primary);
|
|
18
17
|
display: block;
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
20
|
&__input {
|
|
22
|
-
background: var(--color-surface-fill-primary);
|
|
23
|
-
border: solid 1px
|
|
24
|
-
var(--pagination-input-color, --color-surface-border-tertiary);
|
|
25
|
-
border-radius: 8px;
|
|
26
21
|
position: relative;
|
|
27
22
|
display: flex;
|
|
28
23
|
justify-content: center;
|
|
29
24
|
align-items: center;
|
|
30
|
-
|
|
25
|
+
}
|
|
26
|
+
&__dropdown {
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
.pagination {
|
|
30
|
+
@each $size in xxl, xl, l, m, s, xs, xxs {
|
|
31
|
+
&_size_$(size) {
|
|
32
|
+
^&__input {
|
|
33
|
+
min-width: var(--pagination-input-size-$(size)-min-width);
|
|
34
|
+
min-height: var(--pagination-input-size-$(size)-min-height);
|
|
35
|
+
padding: var(--pagination-input-size-$(size)-padding);
|
|
36
|
+
gap: var(--pagination-input-size-$(size)-gap);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
31
39
|
}
|
|
32
40
|
}
|
|
33
41
|
.pagination {
|
|
@@ -142,4 +150,9 @@
|
|
|
142
150
|
--paginator-item-disabled-fill-hover: none;
|
|
143
151
|
--paginator-item-disabled-text: var(--color-surface-text-primary);
|
|
144
152
|
--paginator-item-disabled-icon: var(--color-surface-item-disabled);
|
|
153
|
+
|
|
154
|
+
--pagination-input-size-m-padding: 0 12px;
|
|
155
|
+
--pagination-input-size-m-gap: 4px;
|
|
156
|
+
--pagination-input-size-m-min-height: 32px;
|
|
157
|
+
--pagination-input-size-m-min-width: 64px;
|
|
145
158
|
}
|
|
@@ -114,6 +114,30 @@
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
+
.segmented {
|
|
118
|
+
&&_skeleton {
|
|
119
|
+
background-size: 200% !important;
|
|
120
|
+
border: none;
|
|
121
|
+
animation: segmentedSkeleton 3s infinite linear !important;
|
|
122
|
+
background-image: linear-gradient(
|
|
123
|
+
90deg,
|
|
124
|
+
var(--color-surface-fill-secondary),
|
|
125
|
+
var(--color-surface-fill-tertiary),
|
|
126
|
+
var(--color-surface-fill-secondary)
|
|
127
|
+
) !important;
|
|
128
|
+
& * {
|
|
129
|
+
opacity: 0%;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
@keyframes segmentedSkeleton {
|
|
134
|
+
0% {
|
|
135
|
+
background-position: 200%;
|
|
136
|
+
}
|
|
137
|
+
100% {
|
|
138
|
+
background-position: -200%;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
117
141
|
:root {
|
|
118
142
|
--segmented-item-size-l-padding: 14px 16px;
|
|
119
143
|
--segmented-item-size-m-padding: 12px 16px;
|
|
@@ -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,6 +1,7 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/blocks'
|
|
2
2
|
|
|
3
3
|
import * as CellStories from '../stories/CellDemo.stories'
|
|
4
|
+
import * as CellStoriesDirection from '../stories/CellDirection.stories'
|
|
4
5
|
|
|
5
6
|
<Meta title="Molecules / Cell / Overview" />
|
|
6
7
|
|
|
@@ -12,10 +13,10 @@ import * as CellStories from '../stories/CellDemo.stories'
|
|
|
12
13
|
|
|
13
14
|
## Vertical
|
|
14
15
|
|
|
15
|
-
<Story of={
|
|
16
|
+
<Story of={CellStoriesDirection.Vertical} />
|
|
16
17
|
|
|
17
18
|
## Horizontal
|
|
18
19
|
|
|
19
|
-
<Story of={
|
|
20
|
+
<Story of={CellStoriesDirection.Horizontal} />
|
|
20
21
|
|
|
21
22
|
|