@itcase/ui 1.8.38 → 1.8.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Avatar_cjs_nMPCDjk8.js → Avatar_cjs_BbeDJ-No.js} +2 -2
- package/dist/{Avatar_es_B73a6TzA.js → Avatar_es_B1Ao9Im_.js} +2 -2
- package/dist/{Button_cjs_plv5-qcj.js → Button_cjs_Ctkyt2ES.js} +1 -1
- package/dist/{Button_es_BigB2Wz6.js → Button_es_BiIuX0ER.js} +1 -1
- package/dist/{ChipsGroup_cjs_DrOhD-Fc.js → ChipsGroup_cjs_p99H-9a8.js} +48 -64
- package/dist/{ChipsGroup_es_B9m4l0wN.js → ChipsGroup_es_CWq3TR_1.js} +48 -64
- package/dist/{DatePicker_cjs_DKoF73mp.js → DatePicker_cjs_D_1v2mS0.js} +3 -3
- package/dist/{DatePicker_es_CdEYxtwj.js → DatePicker_es_CQwbdG0g.js} +3 -3
- package/dist/{DropdownItem_cjs_DQvByLbN.js → DropdownItem_cjs_B1gGciTB.js} +26 -9
- package/dist/{DropdownItem_es_KppIfto7.js → DropdownItem_es_JVT4f6Nb.js} +26 -9
- package/dist/{Image_cjs_CCWqbNn4.js → Image_cjs_2zEjohYE.js} +5 -4
- package/dist/{Image_es_DZUVp0FS.js → Image_es_ChF-63wh.js} +5 -4
- package/dist/{Label_cjs_BGJfyrOL.js → Label_cjs_Mb8j2bLu.js} +1 -5
- package/dist/{Label_es_C4Px7b-N.js → Label_es_CIDBUVgO.js} +1 -5
- package/dist/{Tooltip_cjs_DHduWa-v.js → Tooltip_cjs_BBwH8sjA.js} +16 -6
- package/dist/{Tooltip_es_ltCY-w4M.js → Tooltip_es_Y2aoFQW7.js} +16 -6
- package/dist/cjs/components/Accordion.js +3 -1
- package/dist/cjs/components/Avatar.js +5 -3
- package/dist/cjs/components/AvatarStack.js +5 -3
- package/dist/cjs/components/Badge.js +3 -1
- package/dist/cjs/components/Breadcrumbs.js +3 -1
- package/dist/cjs/components/Button.js +4 -2
- package/dist/cjs/components/Cell.js +4 -2
- package/dist/cjs/components/Chips.js +5 -2
- package/dist/cjs/components/Choice.js +3 -1
- package/dist/cjs/components/CookiesWarning.js +4 -2
- package/dist/cjs/components/DatePeriod.js +8 -5
- package/dist/cjs/components/DatePicker.js +6 -4
- package/dist/cjs/components/Drawer.js +3 -1
- package/dist/cjs/components/Dropdown/stories/__mock__.js +27 -4
- package/dist/cjs/components/Dropdown.js +5 -3
- package/dist/cjs/components/HeroTitle.js +3 -1
- package/dist/cjs/components/Icon.js +3 -1
- package/dist/cjs/components/Image.js +5 -3
- package/dist/cjs/components/InputPassword.js +3 -1
- package/dist/cjs/components/Label.js +4 -2
- package/dist/cjs/components/Logo.js +7 -5
- package/dist/cjs/components/MenuItem.js +3 -1
- package/dist/cjs/components/Modal.js +3 -1
- package/dist/cjs/components/Notification.js +3 -1
- package/dist/cjs/components/Pagination.js +68 -21
- package/dist/cjs/components/Radio.js +45 -65
- package/dist/cjs/components/Response.js +8 -5
- package/dist/cjs/components/SVGContent.js +5 -3
- package/dist/cjs/components/Search.js +3 -1
- package/dist/cjs/components/Segmented.js +3 -1
- package/dist/cjs/components/Select.js +5 -3
- package/dist/cjs/components/Swiper.js +3 -1
- package/dist/cjs/components/Tab.js +3 -1
- package/dist/cjs/components/Textarea.js +1 -1
- package/dist/cjs/components/Tile.js +3 -1
- package/dist/cjs/components/Title.js +3 -1
- package/dist/cjs/components/Tooltip.js +3 -1
- package/dist/cjs/context/UrlAssetPrefix.js +17 -0
- package/dist/cjs/hoc/urlWithAssetPrefix.js +64 -0
- package/dist/cjs/hooks/useAppearanceConfig/useAppearanceConfig.js +29 -0
- package/dist/cjs/hooks/useAppearanceConfig.js +9 -0
- package/dist/components/Accordion.js +3 -1
- package/dist/components/Avatar.js +5 -3
- package/dist/components/AvatarStack.js +5 -3
- package/dist/components/Badge.js +3 -1
- package/dist/components/Breadcrumbs.js +3 -1
- package/dist/components/Button.js +4 -2
- package/dist/components/Cell.js +4 -2
- package/dist/components/Chips.js +5 -2
- package/dist/components/Choice.js +3 -1
- package/dist/components/CookiesWarning.js +4 -2
- package/dist/components/DatePeriod.js +8 -5
- package/dist/components/DatePicker.js +6 -4
- package/dist/components/Drawer.js +3 -1
- package/dist/components/Dropdown/stories/__mock__.js +26 -5
- package/dist/components/Dropdown.js +5 -3
- package/dist/components/HeroTitle.js +3 -1
- package/dist/components/Icon.js +3 -1
- package/dist/components/Image.js +5 -3
- package/dist/components/InputPassword.js +3 -1
- package/dist/components/Label.js +4 -2
- package/dist/components/Logo.js +7 -5
- package/dist/components/MenuItem.js +3 -1
- package/dist/components/Modal.js +3 -1
- package/dist/components/Notification.js +3 -1
- package/dist/components/Pagination.js +69 -22
- package/dist/components/Radio.js +45 -65
- package/dist/components/Response.js +8 -5
- package/dist/components/SVGContent.js +5 -3
- package/dist/components/Search.js +3 -1
- package/dist/components/Segmented.js +3 -1
- package/dist/components/Select.js +5 -3
- package/dist/components/Swiper.js +3 -1
- package/dist/components/Tab.js +3 -1
- package/dist/components/Textarea.js +1 -1
- package/dist/components/Tile.js +3 -1
- package/dist/components/Title.js +3 -1
- package/dist/components/Tooltip.js +3 -1
- package/dist/context/UrlAssetPrefix.js +14 -0
- package/dist/css/components/Dropdown/Dropdown.css +24 -0
- package/dist/css/components/Pagination/Pagination.css +82 -30
- package/dist/css/components/Pagination/css/__item/pagination__item.css +8 -8
- package/dist/css/components/Pagination/css/__item/pagination__item_size.css +8 -0
- package/dist/css/components/Pagination/css/__item/pagination__item_state_active.css +16 -16
- package/dist/css/components/Radio/Radio.css +44 -5
- package/dist/css/components/Select/Select.css +1 -0
- package/dist/css/components/Select/css/__indicators/select__indicators.css +1 -0
- package/dist/css/components/Swiper/Swiper.css +2 -2
- package/dist/css/styles/fill/fill.css +2 -1
- package/dist/css/styles/fill/fill_active.css +3 -0
- package/dist/css/styles/fill/fill_active_hover.css +7 -0
- package/dist/css/styles/fill/fill_hover.css +5 -9
- package/dist/hoc/urlWithAssetPrefix.js +62 -0
- package/dist/hooks/useAppearanceConfig/useAppearanceConfig.js +27 -0
- package/dist/hooks/useAppearanceConfig.js +3 -0
- package/dist/stories/ChipsOverview.mdx +10 -10
- package/dist/stories/ChipsPlayground.mdx +2 -2
- package/dist/stories/Components.mdx +378 -87
- package/dist/stories/useAppearanceConfig.mdx +83 -0
- package/dist/stories/useDevicePropsGenerator.mdx +6 -8
- package/dist/types/components/Chips/appearance/chipsDisabled.d.ts +2 -3
- package/dist/types/components/Dropdown/appearance/dropdownAccent.d.ts +5 -0
- package/dist/types/components/Dropdown/appearance/dropdownSize.d.ts +9 -0
- package/dist/types/components/Dropdown/appearance/dropdownSurface.d.ts +3 -0
- package/dist/types/components/Dropdown/stories/__mock__/index.d.ts +9 -12
- package/dist/types/components/Icon/Icon.d.ts +6 -2
- package/dist/types/components/Icon/appearance/iconDanger.d.ts +1 -0
- package/dist/types/components/Icon/appearance/iconDisabled.d.ts +1 -0
- package/dist/types/components/Icon/appearance/iconError.d.ts +1 -0
- package/dist/types/components/Icon/appearance/iconInfo.d.ts +0 -1
- package/dist/types/components/Icon/appearance/iconPrimary.d.ts +1 -0
- package/dist/types/components/Icon/appearance/iconSecondary.d.ts +1 -0
- package/dist/types/components/Icon/appearance/iconSuccess.d.ts +1 -0
- package/dist/types/components/Icon/appearance/iconSurface.d.ts +1 -0
- package/dist/types/components/Icon/appearance/iconWarning.d.ts +1 -0
- package/dist/types/components/Image/Image.d.ts +5 -2
- package/dist/types/components/Label/appearance/labelError.d.ts +0 -1
- package/dist/types/components/Label/appearance/labelGradient.d.ts +8 -0
- package/dist/types/components/Label/appearance/labelPrimary.d.ts +0 -1
- package/dist/types/components/Label/appearance/labelSuccess.d.ts +0 -1
- package/dist/types/components/Label/appearance/labelSurface.d.ts +0 -1
- package/dist/types/components/Logo/Logo.d.ts +6 -2
- package/dist/types/components/Pagination/appearance/paginationAccent.d.ts +22 -1
- package/dist/types/components/Pagination/appearance/paginationSize.d.ts +20 -1
- package/dist/types/components/Pagination/appearance/paginationSurface.d.ts +4 -1
- package/dist/types/components/Radio/Radio.appearance.d.ts +28 -48
- package/dist/types/components/Radio/appearance/radioDefault.d.ts +2 -14
- package/dist/types/components/Radio/appearance/radioDisabled.d.ts +5 -5
- package/dist/types/components/Radio/appearance/radioError.d.ts +6 -5
- package/dist/types/components/Radio/appearance/radioRequire.d.ts +5 -13
- package/dist/types/components/Radio/appearance/radioStyle.d.ts +4 -6
- package/dist/types/components/Radio/appearance/radioSuccess.d.ts +6 -5
- package/dist/types/components/Response/Response.d.ts +6 -2
- package/dist/types/components/Response/Response.interface.d.ts +3 -1
- package/dist/types/components/SVGContent/SVGContent.d.ts +5 -2
- package/dist/types/components/Select/SelectLoadingIndicator.d.ts +2 -1
- package/dist/types/config/forms/datepicker.d.ts +18 -0
- package/dist/types/config/forms/index.d.ts +3 -0
- package/dist/types/config/forms/input.d.ts +14 -0
- package/dist/types/context/UrlAssetPrefix.d.ts +12 -0
- package/dist/types/hoc/urlWithAssetPrefix.d.ts +8 -0
- package/dist/types/hooks/useAppearanceConfig/index.d.ts +1 -0
- package/dist/types/hooks/useAppearanceConfig/useAppearanceConfig.d.ts +7 -0
- package/dist/types/hooks/useDevicePropsGenerator/index.d.ts +1 -0
- package/package.json +22 -17
- package/dist/types/hooks/useDeviceTargetClass.d.ts +0 -5
|
@@ -4,7 +4,7 @@ import { useMemo } from 'react';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
6
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
7
|
-
import { I as Icon } from '../
|
|
7
|
+
import { I as Icon } from '../Tooltip_es_Y2aoFQW7.js';
|
|
8
8
|
import 'lodash/camelCase';
|
|
9
9
|
import 'lodash/castArray';
|
|
10
10
|
import 'lodash/upperFirst';
|
|
@@ -19,6 +19,8 @@ import 'lodash/maxBy';
|
|
|
19
19
|
import '../hooks/useStyles/styleAttributes.js';
|
|
20
20
|
import '../Text_es_BfLRfj-5.js';
|
|
21
21
|
import 'react-inlinesvg';
|
|
22
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
23
|
+
import '../context/UrlAssetPrefix.js';
|
|
22
24
|
import '../Link_es_DxtZLeKY.js';
|
|
23
25
|
|
|
24
26
|
var heroTitleAppearanceSize = {
|
package/dist/components/Icon.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { I as Icon, e as iconAppearance, i as iconConfig } from '../
|
|
1
|
+
export { I as Icon, e as iconAppearance, i as iconConfig } from '../Tooltip_es_Y2aoFQW7.js';
|
|
2
2
|
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
@@ -19,4 +19,6 @@ import 'lodash/maxBy';
|
|
|
19
19
|
import '../hooks/useStyles/styleAttributes.js';
|
|
20
20
|
import '../Text_es_BfLRfj-5.js';
|
|
21
21
|
import 'react-inlinesvg';
|
|
22
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
23
|
+
import '../context/UrlAssetPrefix.js';
|
|
22
24
|
import '../Link_es_DxtZLeKY.js';
|
package/dist/components/Image.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
export { I as Image } from '../
|
|
1
|
+
export { I as Image } from '../Image_es_ChF-63wh.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'clsx';
|
|
5
|
-
import '../
|
|
5
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
6
6
|
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
7
|
+
import '@itcase/common';
|
|
8
|
+
import '../context/UrlAssetPrefix.js';
|
|
9
|
+
import '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
7
10
|
import 'lodash/camelCase';
|
|
8
11
|
import 'lodash/castArray';
|
|
9
12
|
import 'lodash/upperFirst';
|
|
10
13
|
import '../context/Notifications.js';
|
|
11
14
|
import 'uuid';
|
|
12
|
-
import '@itcase/common';
|
|
13
15
|
import '../context/UIContext.js';
|
|
14
16
|
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
15
17
|
import 'react-responsive';
|
|
@@ -3,7 +3,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useState, useMemo, useCallback } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
|
-
import { I as Icon } from '../
|
|
6
|
+
import { I as Icon } from '../Tooltip_es_Y2aoFQW7.js';
|
|
7
7
|
import 'lodash/camelCase';
|
|
8
8
|
import 'lodash/castArray';
|
|
9
9
|
import 'lodash/upperFirst';
|
|
@@ -19,6 +19,8 @@ import 'lodash/maxBy';
|
|
|
19
19
|
import '../hooks/useStyles/styleAttributes.js';
|
|
20
20
|
import '../Text_es_BfLRfj-5.js';
|
|
21
21
|
import 'react-inlinesvg';
|
|
22
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
23
|
+
import '../context/UrlAssetPrefix.js';
|
|
22
24
|
import '../Link_es_DxtZLeKY.js';
|
|
23
25
|
|
|
24
26
|
var inputPasswordAppearanceDefault = {
|
package/dist/components/Label.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { L as Label, a as labelAppearance, l as labelConfig } from '../
|
|
1
|
+
export { L as Label, a as labelAppearance, l as labelConfig } from '../Label_es_CIDBUVgO.js';
|
|
2
2
|
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
@@ -17,7 +17,9 @@ import '../utils/setViewportProperty.js';
|
|
|
17
17
|
import '../hooks/useStyles/useStyles.js';
|
|
18
18
|
import 'lodash/maxBy';
|
|
19
19
|
import '../hooks/useStyles/styleAttributes.js';
|
|
20
|
-
import '../
|
|
20
|
+
import '../Tooltip_es_Y2aoFQW7.js';
|
|
21
21
|
import '../Text_es_BfLRfj-5.js';
|
|
22
22
|
import 'react-inlinesvg';
|
|
23
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
24
|
+
import '../context/UrlAssetPrefix.js';
|
|
23
25
|
import '../Link_es_DxtZLeKY.js';
|
package/dist/components/Logo.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
+
import { urlWithAssetPrefix } from '../hoc/urlWithAssetPrefix.js';
|
|
4
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
6
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
6
7
|
import { a as LinkWrapper } from '../Link_es_DxtZLeKY.js';
|
|
7
8
|
import 'react';
|
|
9
|
+
import '@itcase/common';
|
|
10
|
+
import '../context/UrlAssetPrefix.js';
|
|
8
11
|
import 'lodash/camelCase';
|
|
9
12
|
import 'lodash/castArray';
|
|
10
13
|
import 'lodash/upperFirst';
|
|
11
14
|
import '../context/Notifications.js';
|
|
12
15
|
import 'uuid';
|
|
13
|
-
import '@itcase/common';
|
|
14
16
|
import '../context/UIContext.js';
|
|
15
17
|
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
16
18
|
import 'react-responsive';
|
|
@@ -24,17 +26,17 @@ var logoConfig = {
|
|
|
24
26
|
logoConfig.appearance = appearanceConfig;
|
|
25
27
|
},
|
|
26
28
|
};
|
|
27
|
-
function Logo(props) {
|
|
29
|
+
var Logo = urlWithAssetPrefix(function Logo(props) {
|
|
28
30
|
var className = props.className, appearance = props.appearance, size = props.size, href = props.href, link = props.link, mode = props.mode;
|
|
29
31
|
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
30
32
|
var _a;
|
|
31
33
|
return (__assign(__assign({}, resultConfig), (_a = logoConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
32
34
|
}, {});
|
|
33
35
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
34
|
-
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, alignItemsClass = propsGenerator.alignItemsClass, src = propsGenerator.src, title = propsGenerator.title, alt = propsGenerator.alt,
|
|
36
|
+
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, alignItemsClass = propsGenerator.alignItemsClass, src = propsGenerator.src, title = propsGenerator.title, alt = propsGenerator.alt, widthClass = propsGenerator.widthClass;
|
|
35
37
|
// @ts-expect-error
|
|
36
38
|
var logo = useStyles(props).styles;
|
|
37
|
-
return (jsx("div", { className: clsx(className, 'logo', alignClass && "align_".concat(alignClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignItemsClass && "logo_align-items_".concat(alignItemsClass), alt, title, mode && "logo_mode_".concat(mode), size && "logo_size_".concat(size), widthClass && "width_".concat(widthClass)), style: logo, children: link || href ? (jsx(LinkWrapper, { className: "logo__link", href: link || href, children: jsx("img", { className: "logo__image", src: src
|
|
38
|
-
}
|
|
39
|
+
return (jsx("div", { className: clsx(className, 'logo', alignClass && "align_".concat(alignClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignItemsClass && "logo_align-items_".concat(alignItemsClass), alt, title, mode && "logo_mode_".concat(mode), size && "logo_size_".concat(size), widthClass && "width_".concat(widthClass)), style: logo, children: link || href ? (jsx(LinkWrapper, { className: "logo__link", href: link || href, children: jsx("img", { className: "logo__image", src: src, title: title || alt, alt: alt || title }) })) : (jsx("img", { className: "logo__image", src: src, title: title || alt, alt: alt || title })) }));
|
|
40
|
+
});
|
|
39
41
|
|
|
40
42
|
export { Logo, logoConfig };
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
6
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
7
|
-
import { I as Icon, T as Tooltip } from '../
|
|
7
|
+
import { I as Icon, T as Tooltip } from '../Tooltip_es_Y2aoFQW7.js';
|
|
8
8
|
import { L as Link } from '../Link_es_DxtZLeKY.js';
|
|
9
9
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
10
10
|
import 'lodash/camelCase';
|
|
@@ -20,6 +20,8 @@ import '../utils/setViewportProperty.js';
|
|
|
20
20
|
import 'lodash/maxBy';
|
|
21
21
|
import '../hooks/useStyles/styleAttributes.js';
|
|
22
22
|
import 'react-inlinesvg';
|
|
23
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
24
|
+
import '../context/UrlAssetPrefix.js';
|
|
23
25
|
|
|
24
26
|
var menuItemAppearanceAccent = {
|
|
25
27
|
accentPrimary: {
|
package/dist/components/Modal.js
CHANGED
|
@@ -6,7 +6,7 @@ import ReactDOM from 'react-dom';
|
|
|
6
6
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
7
7
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
8
8
|
import { O as Overlay } from '../Overlay_es_DczPjVL9.js';
|
|
9
|
-
import { b as Title } from '../
|
|
9
|
+
import { b as Title } from '../Tooltip_es_Y2aoFQW7.js';
|
|
10
10
|
import { L as Loader } from '../Loader_es_GYOr0UTX.js';
|
|
11
11
|
import 'lodash/camelCase';
|
|
12
12
|
import 'lodash/castArray';
|
|
@@ -22,6 +22,8 @@ import 'lodash/maxBy';
|
|
|
22
22
|
import '../hooks/useStyles/styleAttributes.js';
|
|
23
23
|
import '../Text_es_BfLRfj-5.js';
|
|
24
24
|
import 'react-inlinesvg';
|
|
25
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
26
|
+
import '../context/UrlAssetPrefix.js';
|
|
25
27
|
import '../Link_es_DxtZLeKY.js';
|
|
26
28
|
|
|
27
29
|
var modalAppearanceSurface = {
|
|
@@ -3,7 +3,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
5
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
6
|
-
import { I as Icon } from '../
|
|
6
|
+
import { I as Icon } from '../Tooltip_es_Y2aoFQW7.js';
|
|
7
7
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
8
8
|
import { icons20 } from '@itcase/icons/default';
|
|
9
9
|
import { useNotifications, useNotificationsAPI } from '../context/Notifications.js';
|
|
@@ -20,6 +20,8 @@ import '../utils/setViewportProperty.js';
|
|
|
20
20
|
import 'lodash/maxBy';
|
|
21
21
|
import '../hooks/useStyles/styleAttributes.js';
|
|
22
22
|
import 'react-inlinesvg';
|
|
23
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
24
|
+
import '../context/UrlAssetPrefix.js';
|
|
23
25
|
import '../Link_es_DxtZLeKY.js';
|
|
24
26
|
|
|
25
27
|
var notificationAppearanceDefault = {
|
|
@@ -6,10 +6,10 @@ import ceil from 'lodash/ceil';
|
|
|
6
6
|
import ReactPaginate from 'react-paginate';
|
|
7
7
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
8
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
9
|
-
import { D as Dropdown, a as DropdownItem } from '../
|
|
10
|
-
import { I as Icon } from '../
|
|
9
|
+
import { D as Dropdown, a as DropdownItem } from '../DropdownItem_es_JVT4f6Nb.js';
|
|
10
|
+
import { I as Icon } from '../Tooltip_es_Y2aoFQW7.js';
|
|
11
11
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
12
|
-
import {
|
|
12
|
+
import { icons14, icons24, icons16 } from '@itcase/icons/default';
|
|
13
13
|
import 'lodash/camelCase';
|
|
14
14
|
import 'lodash/castArray';
|
|
15
15
|
import 'lodash/upperFirst';
|
|
@@ -24,6 +24,8 @@ import 'lodash/maxBy';
|
|
|
24
24
|
import '../hooks/useStyles/styleAttributes.js';
|
|
25
25
|
import '../Divider_es_kY-30pft.js';
|
|
26
26
|
import 'react-inlinesvg';
|
|
27
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
28
|
+
import '../context/UrlAssetPrefix.js';
|
|
27
29
|
import '../Link_es_DxtZLeKY.js';
|
|
28
30
|
|
|
29
31
|
var paginationAppearanceAccent = {
|
|
@@ -33,8 +35,29 @@ var paginationAppearanceAccent = {
|
|
|
33
35
|
},
|
|
34
36
|
accentPrimary: {
|
|
35
37
|
fill: 'accentPrimary',
|
|
36
|
-
|
|
38
|
+
fillActive: 'accentQuaternary',
|
|
39
|
+
fillInput: 'surfacePrimary',
|
|
37
40
|
borderColor: 'accentBorderPrimary',
|
|
41
|
+
textColor: 'accentTextPrimary',
|
|
42
|
+
builderIconFillIcon: 'accentItemPrimary',
|
|
43
|
+
nextIconFillIcon: 'accentItemPrimary',
|
|
44
|
+
pageCountDescTextColor: 'surfaceTextPrimary',
|
|
45
|
+
pageCountDropdownAlignment: 'topCenter',
|
|
46
|
+
pageCountDropdownElevation: 8,
|
|
47
|
+
pageCountDropdownFill: 'surfacePrimary',
|
|
48
|
+
pageCountDropdownItemDividerFill: 'surfaceSecondary',
|
|
49
|
+
pageCountDropdownItemFill: 'surfacePrimary',
|
|
50
|
+
pageCountDropdownItemFillActive: 'accentPrimary',
|
|
51
|
+
pageCountDropdownItemFillActiveHover: 'accentActiveHover',
|
|
52
|
+
pageCountDropdownItemFillHover: 'surfaceSecondary',
|
|
53
|
+
pageCountDropdownItemLabelAlign: 'center',
|
|
54
|
+
pageCountDropdownItemLabelColor: 'surfaceTextPrimary',
|
|
55
|
+
pageCountDropdownItemLabelColorActive: 'accentTextPrimary',
|
|
56
|
+
pageCountDropdownItemLabelColorActiveHover: 'accentTextPrimary',
|
|
57
|
+
pageCountDropdownItemLabelColorHover: 'surfaceTextPrimary',
|
|
58
|
+
pageCountInputIconColor: 'surfaceItemPrimary',
|
|
59
|
+
pageCountInputTextColor: 'surfaceTextPrimary',
|
|
60
|
+
previousIconFillIcon: 'accentItemPrimary',
|
|
38
61
|
},
|
|
39
62
|
accentSecondary: {
|
|
40
63
|
fill: 'accentPrimary',
|
|
@@ -51,56 +74,76 @@ var paginationAppearanceSize = {
|
|
|
51
74
|
sizeL: {
|
|
52
75
|
size: 'l',
|
|
53
76
|
labelTextSize: 'l',
|
|
77
|
+
textSize: 'l',
|
|
78
|
+
builderIcon: icons24.General.Dot,
|
|
54
79
|
iconAfterFillSize: '24',
|
|
55
80
|
iconAfterSize: '24',
|
|
56
81
|
iconBeforeFillSize: '24',
|
|
57
82
|
iconBeforeSize: '24',
|
|
58
|
-
nextIcon:
|
|
83
|
+
nextIcon: icons24.Arrow.ChevronRightSmall,
|
|
59
84
|
pageCountDescTextSize: 'l',
|
|
60
85
|
pageCountDropdownItemDividerSize: 'xxs',
|
|
61
86
|
pageCountDropdownItemLabelSize: 'm',
|
|
62
87
|
pageCountDropdownItemSize: 'l',
|
|
63
|
-
|
|
88
|
+
pageCountDropdownItemWidth: '64',
|
|
89
|
+
pageCountInputIcon: icons14.Arrow.ChevronDownSmall,
|
|
64
90
|
pageCountInputIconFillSize: '24',
|
|
65
|
-
pageCountInputTextSize: '
|
|
66
|
-
previousIcon:
|
|
91
|
+
pageCountInputTextSize: 'l',
|
|
92
|
+
previousIcon: icons24.Arrow.ChevronLeftSmall,
|
|
67
93
|
},
|
|
68
94
|
sizeM: {
|
|
69
95
|
size: 'm',
|
|
70
96
|
labelTextSize: 'm',
|
|
97
|
+
textSize: 'm',
|
|
98
|
+
builderIcon: icons24.General.Dot,
|
|
71
99
|
iconAfterFillSize: '24',
|
|
72
100
|
iconAfterSize: '24',
|
|
73
101
|
iconBeforeFillSize: '24',
|
|
74
102
|
iconBeforeSize: '24',
|
|
75
|
-
nextIcon:
|
|
103
|
+
nextIcon: icons24.Arrow.ChevronRightSmall,
|
|
76
104
|
pageCountDescTextSize: 'm',
|
|
77
105
|
pageCountDropdownItemDividerSize: 'xxs',
|
|
78
106
|
pageCountDropdownItemLabelSize: 'm',
|
|
79
107
|
pageCountDropdownItemSize: 'l',
|
|
80
|
-
pageCountDropdownItemWidth: '64',
|
|
81
108
|
pageCountInputIcon: icons14.Arrow.ChevronDownSmall,
|
|
82
109
|
pageCountInputIconFillSize: '14',
|
|
83
110
|
pageCountInputTextSize: 'm',
|
|
84
|
-
previousIcon:
|
|
111
|
+
previousIcon: icons24.Arrow.ChevronLeftSmall,
|
|
85
112
|
},
|
|
86
113
|
sizeS: {
|
|
87
114
|
size: 's',
|
|
88
115
|
labelTextSize: 's',
|
|
116
|
+
textSize: 's',
|
|
117
|
+
builderIcon: icons24.General.Dot,
|
|
89
118
|
iconAfterFillSize: '20',
|
|
90
119
|
iconAfterSize: '20',
|
|
91
120
|
iconBeforeFillSize: '20',
|
|
92
121
|
iconBeforeSize: '20',
|
|
93
|
-
nextIcon:
|
|
94
|
-
|
|
122
|
+
nextIcon: icons16.Arrow.ChevronRightSmall,
|
|
123
|
+
pageCountDescTextSize: 's',
|
|
124
|
+
pageCountDropdownItemDividerSize: 'xxs',
|
|
125
|
+
pageCountDropdownItemLabelSize: 's',
|
|
126
|
+
pageCountDropdownItemSize: 's',
|
|
127
|
+
pageCountInputIcon: icons14.Arrow.ChevronDownSmall,
|
|
128
|
+
pageCountInputTextSize: 's',
|
|
129
|
+
previousIcon: icons16.Arrow.ChevronLeftSmall,
|
|
95
130
|
},
|
|
96
131
|
sizeXS: {
|
|
97
132
|
size: 'xs',
|
|
98
133
|
labelTextSize: 'xs',
|
|
134
|
+
textSize: 'xs',
|
|
99
135
|
beforeSize: '16',
|
|
136
|
+
// TODO: replace builderIcon: icons24.General.Dot with an builderIcon: icons14.General.Dot,
|
|
137
|
+
builderIcon: icons24.General.Dot,
|
|
100
138
|
iconAfterFillSize: '16',
|
|
101
|
-
nextIcon:
|
|
102
|
-
|
|
103
|
-
|
|
139
|
+
nextIcon: icons14.Arrow.ChevronRightSmall,
|
|
140
|
+
pageCountDescTextSize: 'xs',
|
|
141
|
+
pageCountDropdownItemDividerSize: 'xxs',
|
|
142
|
+
pageCountDropdownItemLabelSize: 'xs',
|
|
143
|
+
pageCountDropdownItemSize: 'xs',
|
|
144
|
+
pageCountInputIcon: icons14.Arrow.ChevronDownSmall,
|
|
145
|
+
pageCountInputTextSize: 'xs',
|
|
146
|
+
previousIcon: icons14.Arrow.ChevronLeftSmall,
|
|
104
147
|
},
|
|
105
148
|
};
|
|
106
149
|
|
|
@@ -121,7 +164,10 @@ var paginationAppearanceStyle = {
|
|
|
121
164
|
var paginationAppearanceSurface = {
|
|
122
165
|
surfacePrimary: {
|
|
123
166
|
fill: 'surfacePrimary',
|
|
124
|
-
|
|
167
|
+
fillActive: 'surfaceTertiary',
|
|
168
|
+
fillInput: 'surfacePrimary',
|
|
169
|
+
textColor: 'surfaceTextPrimary',
|
|
170
|
+
builderIconFillIcon: 'surfaceItemPrimary',
|
|
125
171
|
nextIconFillIcon: 'surfaceItemPrimary',
|
|
126
172
|
pageCountDescTextColor: 'surfaceTextPrimary',
|
|
127
173
|
pageCountDropdownAlignment: 'topCenter',
|
|
@@ -153,7 +199,7 @@ var paginationConfig = {
|
|
|
153
199
|
},
|
|
154
200
|
};
|
|
155
201
|
function Pagination(props) {
|
|
156
|
-
var className = props.className, appearance = props.appearance, _a = props.allItemsCount, allItemsCount = _a === void 0 ? 0 : _a, dataTestId = props.dataTestId, dataTour = props.dataTour, _b = props.pageCountArray, pageCountArray = _b === void 0 ? [10, 20, 50, 100] : _b, _c = props.pageCountDesc, pageCountDesc = _c === void 0 ? 'кол-во строк' : _c, pageCountDropdownItemDividerDirection = props.pageCountDropdownItemDividerDirection, _d = props.pageNumber, pageNumber = _d === void 0 ? 0 : _d, _e = props.perPageCount, perPageCount = _e === void 0 ? 0 : _e, isPageCount = props.isPageCount, _f = props.isPageCountDropdownReversed, isPageCountDropdownReversed = _f === void 0 ? false : _f, onChangePage = props.onChangePage, onChangePerPageCount = props.onChangePerPageCount,
|
|
202
|
+
var className = props.className, appearance = props.appearance, _a = props.allItemsCount, allItemsCount = _a === void 0 ? 0 : _a, dataTestId = props.dataTestId, dataTour = props.dataTour, _b = props.pageCountArray, pageCountArray = _b === void 0 ? [10, 20, 50, 100] : _b, _c = props.pageCountDesc, pageCountDesc = _c === void 0 ? 'кол-во строк' : _c, pageCountDropdownItemDividerDirection = props.pageCountDropdownItemDividerDirection, _d = props.pageNumber, pageNumber = _d === void 0 ? 0 : _d, _e = props.perPageCount, perPageCount = _e === void 0 ? 0 : _e, isPageCount = props.isPageCount, _f = props.isPageCountDropdownReversed, isPageCountDropdownReversed = _f === void 0 ? false : _f, isPageLabelBuilder = props.isPageLabelBuilder, isSkeleton = props.isSkeleton, onChangePage = props.onChangePage, onChangePerPageCount = props.onChangePerPageCount,
|
|
157
203
|
/**
|
|
158
204
|
* @deprecated The method should not be used
|
|
159
205
|
*/
|
|
@@ -215,14 +261,15 @@ function Pagination(props) {
|
|
|
215
261
|
return (__assign(__assign({}, resultConfig), (_a = paginationConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
216
262
|
}, {});
|
|
217
263
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
218
|
-
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;
|
|
264
|
+
var justifyContentClass = propsGenerator.justifyContentClass, fillActiveClass = propsGenerator.fillActiveClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, fillInputClass = propsGenerator.fillInputClass, fillInputHoverClass = propsGenerator.fillInputHoverClass, textColorClass = propsGenerator.textColorClass, textSizeClass = propsGenerator.textSizeClass, builderIcon = propsGenerator.builderIcon, builderIconFill = propsGenerator.builderIconFill, builderIconFillIcon = propsGenerator.builderIconFillIcon, builderIconFillSize = propsGenerator.builderIconFillSize, builderIconSize = propsGenerator.builderIconSize, 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;
|
|
219
265
|
var paginationStyles = useStyles(props).styles;
|
|
220
|
-
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:
|
|
266
|
+
return (jsxs("div", { className: clsx('pagination', sizeClass && "pagination_size_".concat(sizeClass), isSkeleton && "pagination_skeleton"), "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: clsx('pagination__item_state_active cursor_type_default', fillActiveClass && "fill_active_".concat(fillActiveClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)), activeLinkClassName: "pagination__item-link_state_active", breakClassName: "pagination__item pagination__item_break", breakLabel: "...", breakLinkClassName: "pagination__item-link", containerClassName: clsx(className, 'pagination__container', justifyContentClass &&
|
|
221
267
|
"pagination_justify-content_".concat(justifyContentClass)),
|
|
222
268
|
// pages settings
|
|
223
|
-
forcePage: paginationPageIndex, marginPagesDisplayed: marginPagesDisplayed, nextClassName:
|
|
269
|
+
forcePage: paginationPageIndex, marginPagesDisplayed: marginPagesDisplayed, nextClassName: clsx('pagination__item pagination__item_next', sizeClass && "pagination__item_size_".concat(sizeClass), fillClass && "fill_".concat(fillClass)),
|
|
224
270
|
// next button
|
|
225
|
-
nextLabel: jsx(Icon, { fill: nextIconFill, fillSize: nextIconFillSize, iconFill: nextIconFillIcon, iconSize: nextIconSize, shape: "circular", SvgImage: nextIcon }), nextLinkClassName: "pagination__item-link", pageClassName:
|
|
271
|
+
nextLabel: jsx(Icon, { fill: nextIconFill, fillSize: nextIconFillSize, iconFill: nextIconFillIcon, iconSize: nextIconSize, shape: "circular", SvgImage: nextIcon }), nextLinkClassName: "pagination__item-link", pageClassName: clsx('pagination__item', sizeClass && "pagination__item_size_".concat(sizeClass), fillClass && "fill_".concat(fillClass)), pageCount: paginationPagesCount, pageLabelBuilder: isPageLabelBuilder &&
|
|
272
|
+
(function () { return (jsx(Icon, { fill: builderIconFill, fillSize: builderIconFillSize, iconFill: builderIconFillIcon, iconSize: builderIconSize, shape: "circular", SvgImage: builderIcon })); }), pageLinkClassName: clsx('pagination__item-link', textSizeClass && "pagination__item-link_size_".concat(textSizeClass), textColorClass && 'text', textColorClass && "text-color_".concat(textColorClass)), pageRangeDisplayed: pageRangeDisplayed, previousClassName: clsx('pagination__item pagination__item_previous', sizeClass && "pagination__item_size_".concat(sizeClass), fillClass && "fill_".concat(fillClass)), 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(fillInputClass), fillHoverClass && "fill_hover_".concat(fillInputHoverClass)), 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) {
|
|
226
273
|
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 &&
|
|
227
274
|
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 &&
|
|
228
275
|
pageCountDropdownItemShowDivider, isActive: false, onClick: function (event) { return handleDropdownItemClick(event, item); } }, item));
|
package/dist/components/Radio.js
CHANGED
|
@@ -20,75 +20,56 @@ import '../hooks/useStyles/styleAttributes.js';
|
|
|
20
20
|
|
|
21
21
|
var radioAppearanceDefault = {
|
|
22
22
|
defaultPrimary: {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
fillRadioActive: 'surfaceTertiary',
|
|
26
|
-
fillRadioActiveHover: 'surfaceTertiary',
|
|
27
|
-
fillRadioHover: 'surfaceTertiary',
|
|
23
|
+
fill: 'surfaceSecondary',
|
|
24
|
+
fillCheckmark: 'surfaceQuaternary',
|
|
28
25
|
labelTextColor: 'surfaceTextPrimary',
|
|
29
26
|
descTextColor: 'surfaceTextPrimary',
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
borderColorRadioHover: 'surfaceBorderPrimary',
|
|
34
|
-
},
|
|
35
|
-
defaultSecondary: {
|
|
36
|
-
fill: 'surfacePrimary',
|
|
37
|
-
borderColor: 'surfaceBorderTertiary',
|
|
38
|
-
borderHover: 'surfaceBorderQuaternary',
|
|
39
|
-
iconBeforeFill: 'surfaceItemQuaternary',
|
|
40
|
-
iconClearFill: 'surfaceItemPrimary',
|
|
41
|
-
placeholderTextColor: 'surfaceTextSecondary',
|
|
27
|
+
borderColor: 'surfaceBorderQuaternary',
|
|
28
|
+
borderColorRadio: 'surfaceBorderQuaternary',
|
|
29
|
+
borderColorRadioActive: 'surfaceBorderQuaternary',
|
|
42
30
|
},
|
|
43
31
|
};
|
|
44
32
|
|
|
45
33
|
var radioAppearanceDisabled = {
|
|
46
34
|
disabledPrimary: {
|
|
47
|
-
fill: '
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
35
|
+
fill: 'surfaceDisabled',
|
|
36
|
+
fillCheckmark: 'surfaceQuaternary',
|
|
37
|
+
labelTextColor: 'surfaceTextDisabled',
|
|
38
|
+
descTextColor: 'surfaceTextDisabled',
|
|
39
|
+
borderColor: 'surfaceBorderDisabled',
|
|
40
|
+
borderColorRadio: 'surfaceBorderDisabled',
|
|
41
|
+
borderColorRadioActive: 'surfaceBorderDisabled',
|
|
54
42
|
},
|
|
55
43
|
};
|
|
56
44
|
|
|
57
45
|
var radioAppearanceError = {
|
|
58
|
-
|
|
59
|
-
fill: '
|
|
60
|
-
|
|
61
|
-
labelTextColor: '
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
46
|
+
errorPrimary: {
|
|
47
|
+
fill: 'errorTertiary',
|
|
48
|
+
fillCheckmark: 'errorPrimary',
|
|
49
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
50
|
+
descTextColor: 'surfaceTextPrimary',
|
|
51
|
+
borderColor: 'errorBorderQuaternary',
|
|
52
|
+
borderColorRadio: 'errorBorderQuaternary',
|
|
53
|
+
borderColorRadioActive: 'errorBorderQuaternary',
|
|
65
54
|
},
|
|
66
55
|
};
|
|
67
56
|
|
|
68
57
|
var radioAppearanceRequire = {
|
|
69
58
|
requirePrimary: {
|
|
70
59
|
fill: 'warningTertiary',
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
},
|
|
78
|
-
requireSecondary: {
|
|
79
|
-
fill: 'surfaceSecondary',
|
|
80
|
-
borderColor: 'surfaceBorderTertiary',
|
|
81
|
-
borderHover: 'surfaceBorderQuaternary',
|
|
82
|
-
iconBeforeFill: 'surfaceItemQuaternary',
|
|
83
|
-
iconClearFill: 'surfaceItemPrimary',
|
|
84
|
-
placeholderTextColor: 'surfaceTextSecondary',
|
|
60
|
+
fillCheckmark: 'warningPrimary',
|
|
61
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
62
|
+
descTextColor: 'surfaceTextPrimary',
|
|
63
|
+
borderColor: 'warningBorderSecondary',
|
|
64
|
+
borderColorRadio: 'warningBorderSecondary',
|
|
65
|
+
borderColorRadioActive: 'warningBorderSecondary',
|
|
85
66
|
},
|
|
86
67
|
};
|
|
87
68
|
|
|
88
69
|
var radioAppearanceSize = {
|
|
89
70
|
sizeM: {
|
|
90
71
|
size: 'm',
|
|
91
|
-
labelTextSize: '
|
|
72
|
+
labelTextSize: 's',
|
|
92
73
|
descTextSize: 'xs',
|
|
93
74
|
},
|
|
94
75
|
sizeXS: {
|
|
@@ -104,29 +85,28 @@ var radioAppearanceSize = {
|
|
|
104
85
|
};
|
|
105
86
|
|
|
106
87
|
var radioAppearanceStyle = {
|
|
107
|
-
|
|
108
|
-
borderColor: '
|
|
109
|
-
},
|
|
110
|
-
ghost: {
|
|
111
|
-
fill: 'none',
|
|
112
|
-
borderColor: '0',
|
|
88
|
+
solid: {
|
|
89
|
+
borderColor: 'none',
|
|
113
90
|
},
|
|
114
91
|
outlined: {
|
|
115
92
|
fill: 'none',
|
|
116
93
|
},
|
|
117
|
-
|
|
118
|
-
|
|
94
|
+
full: {},
|
|
95
|
+
ghost: {
|
|
96
|
+
fill: 'none',
|
|
97
|
+
borderColor: 'none',
|
|
119
98
|
},
|
|
120
99
|
};
|
|
121
100
|
|
|
122
101
|
var radioAppearanceSuccess = {
|
|
123
|
-
|
|
124
|
-
fill: '
|
|
125
|
-
|
|
126
|
-
labelTextColor: '
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
102
|
+
successPrimary: {
|
|
103
|
+
fill: 'successTertiary',
|
|
104
|
+
fillCheckmark: 'accentItemSecondary',
|
|
105
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
106
|
+
descTextColor: 'surfaceTextPrimary',
|
|
107
|
+
borderColor: 'accentBorderSecondary',
|
|
108
|
+
borderColorRadio: 'accentBorderSecondary',
|
|
109
|
+
borderColorRadioActive: 'accentBorderSecondary',
|
|
130
110
|
},
|
|
131
111
|
};
|
|
132
112
|
|
|
@@ -139,14 +119,14 @@ var radioConfig = {
|
|
|
139
119
|
},
|
|
140
120
|
};
|
|
141
121
|
function Radio(props) {
|
|
142
|
-
var id = props.id, className = props.className, appearance = props.appearance, label = props.label, desc = props.desc, isDisabled = props.isDisabled, checked = props.checked, _a = props.tag, Tag = _a === void 0 ? 'label' : _a, onChange = props.onChange;
|
|
122
|
+
var id = props.id, className = props.className, appearance = props.appearance, label = props.label, desc = props.desc, isDisabled = props.isDisabled, checked = props.checked, _a = props.tag, Tag = _a === void 0 ? 'label' : _a, isSkeleton = props.isSkeleton, onChange = props.onChange;
|
|
143
123
|
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
144
124
|
var _a;
|
|
145
125
|
return (__assign(__assign({}, resultConfig), (_a = radioConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
146
126
|
}, {});
|
|
147
127
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
148
|
-
var fillCheckmarkClass = propsGenerator.fillCheckmarkClass, fillClass = propsGenerator.fillClass, fillRadioActiveClass = propsGenerator.fillRadioActiveClass, fillRadioActiveHoverClass = propsGenerator.fillRadioActiveHoverClass, fillRadioClass = propsGenerator.fillRadioClass, fillRadioHoverClass = propsGenerator.fillRadioHoverClass, labelTextColor = propsGenerator.labelTextColor, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, descTextColor = propsGenerator.descTextColor, descTextSize = propsGenerator.descTextSize, descTextWeight = propsGenerator.descTextWeight, borderColorRadioActiveClass = propsGenerator.borderColorRadioActiveClass, borderColorRadioActiveHoverClass = propsGenerator.borderColorRadioActiveHoverClass, borderColorRadioClass = propsGenerator.borderColorRadioClass, borderColorRadioHoverClass = propsGenerator.borderColorRadioHoverClass, _b = propsGenerator.shapeClass, shapeClass = _b === void 0 ? 'circular' : _b;
|
|
149
|
-
return (jsxs(Tag, { className: clsx(className, 'radio', fillClass && "fill_".concat(fillClass)), htmlFor: id, children: [jsxs("div", { className:
|
|
128
|
+
var fillCheckmarkClass = propsGenerator.fillCheckmarkClass, fillClass = propsGenerator.fillClass, fillRadioActiveClass = propsGenerator.fillRadioActiveClass, fillRadioActiveHoverClass = propsGenerator.fillRadioActiveHoverClass, fillRadioClass = propsGenerator.fillRadioClass, fillRadioHoverClass = propsGenerator.fillRadioHoverClass, labelTextColor = propsGenerator.labelTextColor, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, descTextColor = propsGenerator.descTextColor, descTextSize = propsGenerator.descTextSize, descTextWeight = propsGenerator.descTextWeight, borderColorClass = propsGenerator.borderColorClass, borderColorRadioActiveClass = propsGenerator.borderColorRadioActiveClass, borderColorRadioActiveHoverClass = propsGenerator.borderColorRadioActiveHoverClass, borderColorRadioClass = propsGenerator.borderColorRadioClass, borderColorRadioHoverClass = propsGenerator.borderColorRadioHoverClass, _b = propsGenerator.shapeClass, shapeClass = _b === void 0 ? 'circular' : _b, sizeClass = propsGenerator.sizeClass;
|
|
129
|
+
return (jsxs(Tag, { className: clsx(className, 'radio', fillClass && "fill_".concat(fillClass), borderColorClass && "border-color_".concat(borderColorClass), isSkeleton && 'radio_skeleton', sizeClass && "radio_size_".concat(sizeClass)), htmlFor: id, children: [jsxs("div", { className: "radio__item", children: [jsx("input", { id: id, className: "radio__input", type: "radio", disabled: isDisabled && 'disabled', checked: checked, onChange: onChange }), jsx("div", { className: clsx('radio__state', !checked
|
|
150
130
|
? fillRadioClass && "fill_".concat(fillRadioClass)
|
|
151
131
|
: fillRadioActiveClass && "fill_active_".concat(fillRadioActiveClass), !checked
|
|
152
132
|
? fillRadioHoverClass && "fill_hover_".concat(fillRadioHoverClass)
|
|
@@ -158,7 +138,7 @@ function Radio(props) {
|
|
|
158
138
|
? borderColorRadioHoverClass &&
|
|
159
139
|
"border-color_hover_".concat(borderColorRadioHoverClass)
|
|
160
140
|
: borderColorRadioActiveHoverClass &&
|
|
161
|
-
"border-color_active_hover_".concat(borderColorRadioActiveHoverClass)), children: "\u00A0" }), jsx("div", { className: clsx('radio__state-checkmark', checked && fillCheckmarkClass && "fill_".concat(fillCheckmarkClass)), children: "\u00A0" })] }), label && (jsx(Text, { className: "radio__label", size: labelTextSize, textColor: labelTextColor, textWeight: labelTextWeight, children: label })), desc && (jsx(Text, { className: "radio__desc", size: descTextSize, textColor: descTextColor, textWeight: descTextWeight, children: desc }))] }));
|
|
141
|
+
"border-color_active_hover_".concat(borderColorRadioActiveHoverClass), shapeClass && "shape_".concat(shapeClass)), children: "\u00A0" }), jsx("div", { className: clsx('radio__state-checkmark', checked && fillCheckmarkClass && "fill_".concat(fillCheckmarkClass)), children: "\u00A0" })] }), label && (jsx(Text, { className: "radio__label", size: labelTextSize, textColor: labelTextColor, textWeight: labelTextWeight, children: label })), desc && (jsx(Text, { className: "radio__desc", size: descTextSize, textColor: descTextColor, textWeight: descTextWeight, children: desc }))] }));
|
|
162
142
|
}
|
|
163
143
|
|
|
164
144
|
export { Radio, radioAppearance, radioConfig };
|