@itcase/ui 1.8.122 → 1.8.124
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_mojzcWRL.js +161 -0
- package/dist/Avatar_es_BFom0nAS.js +157 -0
- package/dist/{Button_cjs_i0Dn1pkl.js → Button_cjs_CZz8OjWi.js} +42 -30
- package/dist/{Button_es_CtH5EKJd.js → Button_es_Cn3wtv3M.js} +42 -30
- package/dist/ChipsGroup_cjs_Dgskkc1e.js +344 -0
- package/dist/{ChipsGroup_es_ayPPUwQ7.js → ChipsGroup_es_BVQ7_n0k.js} +48 -35
- package/dist/DatePicker_cjs_Lzrr9Amf.js +182 -0
- package/dist/DatePicker_es_D1LvY5RT.js +178 -0
- package/dist/Divider_cjs_DrmV2ezS.js +105 -0
- package/dist/Divider_es_BiYozVBS.js +101 -0
- package/dist/DropdownItem_cjs_rKLdFxSj.js +211 -0
- package/dist/DropdownItem_es_B-1qtEa7.js +206 -0
- package/dist/Group_cjs_DmfeUcFI.js +59 -0
- package/dist/Group_es_BU5k8f5S.js +55 -0
- package/dist/{Icon_cjs_Cz6IyOkb.js → Icon_cjs_DpFxIFv5.js} +170 -121
- package/dist/{Icon_es_BrwLifge.js → Icon_es_D5eiycFI.js} +170 -121
- package/dist/Image_cjs_CBDMUzv_.js +29 -0
- package/dist/Image_es_BHec4iVN.js +27 -0
- package/dist/{Input_cjs_Du73R-wm.js → Input_cjs_DDi5JVAV.js} +27 -19
- package/dist/{Input_es_CiDHjDqJ.js → Input_es_BnCXATnh.js} +27 -19
- package/dist/{Label_cjs_DMoaOoHi.js → Label_cjs_C-x9blCL.js} +45 -33
- package/dist/{Label_es_SULlg9bL.js → Label_es_DCqpSw_F.js} +45 -33
- package/dist/{Link_cjs_C5UsZUiF.js → Link_cjs_qKXVfU8e.js} +43 -30
- package/dist/{Link_es_XiqbdwLp.js → Link_es_P2b6ya7P.js} +43 -30
- package/dist/Loader_cjs_DIDsIq3J.js +143 -0
- package/dist/Loader_es_CmSggwbR.js +139 -0
- package/dist/Overlay_cjs_tGA2fU43.js +42 -0
- package/dist/Overlay_es_BS7OTFoy.js +38 -0
- package/dist/{Scrollbar_cjs_DcKOfcNp.js → Scrollbar_cjs_Cp-7v2Mt.js} +1 -1
- package/dist/{Scrollbar_es_CThJeCLF.js → Scrollbar_es_CcMgNvGi.js} +1 -1
- package/dist/Text_cjs_BDTjOTVB.js +69 -0
- package/dist/Text_es_CnymlElo.js +65 -0
- package/dist/cjs/components/Accordion.js +37 -34
- package/dist/cjs/components/Avatar.js +5 -6
- package/dist/cjs/components/AvatarStack/stories/__mock__.js +1 -1
- package/dist/cjs/components/AvatarStack.js +17 -16
- package/dist/cjs/components/Badge.js +3 -4
- package/dist/cjs/components/Breadcrumbs/stories/__mock__.js +1 -1
- package/dist/cjs/components/Breadcrumbs.js +27 -23
- package/dist/cjs/components/Button.js +5 -6
- package/dist/cjs/components/Cell/stories/__mock__.js +1 -1
- package/dist/cjs/components/Cell.js +28 -25
- package/dist/cjs/components/Checkbox.js +33 -26
- package/dist/cjs/components/Checkmark.js +28 -23
- package/dist/cjs/components/Chips/stories/__mock__.js +1 -1
- package/dist/cjs/components/Chips.js +4 -5
- package/dist/cjs/components/Choice/stories/__mock__.js +2 -2
- package/dist/cjs/components/Choice.js +46 -40
- package/dist/cjs/components/Code.js +34 -26
- package/dist/cjs/components/CookiesWarning.js +23 -23
- package/dist/cjs/components/Dadata.js +14 -9
- package/dist/cjs/components/DatePeriod.js +32 -30
- package/dist/cjs/components/DatePicker.js +8 -9
- package/dist/cjs/components/Divider.js +1 -2
- package/dist/cjs/components/Dot.js +5 -6
- package/dist/cjs/components/Drawer.js +23 -21
- package/dist/cjs/components/Dropdown/stories/__mock__.js +6 -6
- package/dist/cjs/components/Dropdown.js +5 -6
- package/dist/cjs/components/Flex.js +11 -12
- package/dist/cjs/components/Grid.js +15 -16
- package/dist/cjs/components/Group.js +1 -2
- package/dist/cjs/components/HTMLContent.js +5 -6
- package/dist/cjs/components/HeroTitle.js +17 -16
- package/dist/cjs/components/Icon.js +3 -4
- package/dist/cjs/components/Image.js +1 -2
- package/dist/cjs/components/Input.js +1 -2
- package/dist/cjs/components/InputPassword.js +114 -84
- package/dist/cjs/components/Label.js +4 -5
- package/dist/cjs/components/Link.js +1 -2
- package/dist/cjs/components/List.js +39 -28
- package/dist/cjs/components/Loader.js +2 -3
- package/dist/cjs/components/Logo.js +10 -11
- package/dist/cjs/components/MenuItem.js +36 -33
- package/dist/cjs/components/Modal.js +40 -38
- package/dist/cjs/components/ModalSheetBottom.js +17 -18
- package/dist/cjs/components/Notification/stories/__mock__.js +1 -1
- package/dist/cjs/components/Notification.js +31 -24
- package/dist/cjs/components/Overlay.js +1 -2
- package/dist/cjs/components/Pagination.js +43 -41
- package/dist/cjs/components/Radio.js +34 -26
- package/dist/cjs/components/RangeSlider.js +8 -9
- package/dist/cjs/components/Response/img.js +1 -1
- package/dist/cjs/components/Response.js +102 -84
- package/dist/cjs/components/SVGContent.js +6 -7
- package/dist/cjs/components/ScrollOnDrag/stories/__mock__.js +2 -2
- package/dist/cjs/components/ScrollOnDrag.js +7 -8
- package/dist/cjs/components/ScrollToView.js +8 -9
- package/dist/cjs/components/Scrollbar/stories/__mock__.js +1 -1
- package/dist/cjs/components/Scrollbar.js +1 -1
- package/dist/cjs/components/Search.js +39 -31
- package/dist/cjs/components/Segmented/stories/__mock__.js +23 -10
- package/dist/cjs/components/Segmented.js +47 -42
- package/dist/cjs/components/Select.js +118 -113
- package/dist/cjs/components/Swiper/stories/__mock__.js +3 -3
- package/dist/cjs/components/Swiper.js +27 -29
- package/dist/cjs/components/Switch.js +33 -26
- package/dist/cjs/components/Tab/stories/__mock__.js +1 -1
- package/dist/cjs/components/Tab.js +59 -69
- package/dist/cjs/components/Text.js +1 -2
- package/dist/cjs/components/Textarea.js +26 -18
- package/dist/cjs/components/Tile.js +21 -17
- package/dist/cjs/components/Title.js +3 -4
- package/dist/cjs/components/Tooltip.js +3 -4
- package/dist/cjs/components/Video/stories/__mocks__.js +1 -1
- package/dist/cjs/components/Video.js +3 -4
- package/dist/cjs/components/Warning.js +26 -20
- package/dist/cjs/context/Notifications.js +38 -42
- package/dist/cjs/context/UIContext.js +19 -17
- package/dist/cjs/context/UrlAssetPrefix.js +3 -3
- package/dist/cjs/hoc/urlWithAssetPrefix.js +13 -16
- package/dist/cjs/hooks/useActiveClasses/useActiveClasses.helpers.js +13 -40
- package/dist/cjs/hooks/useActiveClasses/useActiveClasses.interface.js +1 -1
- package/dist/cjs/hooks/useActiveClasses/useActiveClasses.js +25 -29
- package/dist/cjs/hooks/useAppearanceConfig/useAppearanceConfig.js +13 -15
- package/dist/cjs/hooks/useAppearanceConfig.js +0 -1
- package/dist/cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +21 -28
- package/dist/cjs/hooks/useDevicePropsGenerator.js +0 -1
- package/dist/cjs/hooks/useDeviceTargetClass.js +0 -1
- package/dist/cjs/hooks/useStyles/styleAttributes.js +1 -1
- package/dist/cjs/hooks/useStyles/useStyles.js +0 -1
- package/dist/cjs/hooks/useStyles.js +0 -1
- package/dist/cjs/hooks/useViewportFix.js +5 -5
- package/dist/cjs/hooks.js +1 -1
- package/dist/cjs/utils/setViewportProperty.js +3 -3
- package/dist/components/Accordion.js +37 -34
- package/dist/components/Avatar.js +5 -6
- package/dist/components/AvatarStack/stories/__mock__.js +1 -1
- package/dist/components/AvatarStack.js +17 -16
- package/dist/components/Badge.js +3 -4
- package/dist/components/Breadcrumbs/stories/__mock__.js +1 -1
- package/dist/components/Breadcrumbs.js +27 -23
- package/dist/components/Button.js +5 -6
- package/dist/components/Cell/stories/__mock__.js +1 -1
- package/dist/components/Cell.js +28 -25
- package/dist/components/Checkbox.js +33 -26
- package/dist/components/Checkmark.js +28 -23
- package/dist/components/Chips/stories/__mock__.js +1 -1
- package/dist/components/Chips.js +4 -5
- package/dist/components/Choice/stories/__mock__.js +2 -2
- package/dist/components/Choice.js +46 -40
- package/dist/components/Code.js +34 -26
- package/dist/components/CookiesWarning.js +23 -23
- package/dist/components/Dadata.js +14 -9
- package/dist/components/DatePeriod.js +32 -30
- package/dist/components/DatePicker.js +8 -9
- package/dist/components/Divider.js +1 -2
- package/dist/components/Dot.js +5 -6
- package/dist/components/Drawer.js +23 -21
- package/dist/components/Dropdown/stories/__mock__.js +6 -6
- package/dist/components/Dropdown.js +5 -6
- package/dist/components/Flex.js +11 -12
- package/dist/components/Grid.js +15 -16
- package/dist/components/Group.js +1 -2
- package/dist/components/HTMLContent.js +5 -6
- package/dist/components/HeroTitle.js +17 -16
- package/dist/components/Icon.js +3 -4
- package/dist/components/Image.js +1 -2
- package/dist/components/Input.js +1 -2
- package/dist/components/InputPassword.js +114 -84
- package/dist/components/Label.js +4 -5
- package/dist/components/Link.js +1 -2
- package/dist/components/List.js +39 -28
- package/dist/components/Loader.js +2 -3
- package/dist/components/Logo.js +10 -11
- package/dist/components/MenuItem.js +36 -33
- package/dist/components/Modal.js +40 -38
- package/dist/components/ModalSheetBottom.js +17 -18
- package/dist/components/Notification/stories/__mock__.js +1 -1
- package/dist/components/Notification.js +31 -24
- package/dist/components/Overlay.js +1 -2
- package/dist/components/Pagination.js +43 -41
- package/dist/components/Radio.js +34 -26
- package/dist/components/RangeSlider.js +8 -9
- package/dist/components/Response/img.js +1 -1
- package/dist/components/Response.js +102 -84
- package/dist/components/SVGContent.js +6 -7
- package/dist/components/ScrollOnDrag/stories/__mock__.js +2 -2
- package/dist/components/ScrollOnDrag.js +7 -8
- package/dist/components/ScrollToView.js +8 -9
- package/dist/components/Scrollbar/stories/__mock__.js +1 -1
- package/dist/components/Scrollbar.js +1 -1
- package/dist/components/Search.js +39 -31
- package/dist/components/Segmented/stories/__mock__.js +23 -10
- package/dist/components/Segmented.js +47 -42
- package/dist/components/Select.js +118 -113
- package/dist/components/Swiper/stories/__mock__.js +3 -3
- package/dist/components/Swiper.js +27 -29
- package/dist/components/Switch.js +33 -26
- package/dist/components/Tab/stories/__mock__.js +1 -1
- package/dist/components/Tab.js +59 -69
- package/dist/components/Text.js +1 -2
- package/dist/components/Textarea.js +26 -18
- package/dist/components/Tile.js +21 -17
- package/dist/components/Title.js +3 -4
- package/dist/components/Tooltip.js +3 -4
- package/dist/components/Video/stories/__mocks__.js +1 -1
- package/dist/components/Video.js +3 -4
- package/dist/components/Warning.js +26 -20
- package/dist/context/Notifications.js +38 -42
- package/dist/context/UIContext.js +19 -17
- package/dist/context/UrlAssetPrefix.js +3 -3
- package/dist/css/components/Checkmark/Checkmark.css +2 -0
- package/dist/css/components/DatePeriod/DatePeriod.css +3 -0
- package/dist/css/components/Input/Input.css +0 -8
- package/dist/css/components/InputPassword/InputPassword.css +34 -43
- package/dist/css/components/Tile/Tile.css +3 -3
- package/dist/hoc/urlWithAssetPrefix.js +13 -16
- package/dist/hooks/useActiveClasses/useActiveClasses.helpers.js +13 -40
- package/dist/hooks/useActiveClasses/useActiveClasses.interface.js +1 -1
- package/dist/hooks/useActiveClasses/useActiveClasses.js +25 -29
- package/dist/hooks/useAppearanceConfig/useAppearanceConfig.js +13 -15
- package/dist/hooks/useAppearanceConfig.js +0 -1
- package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +21 -28
- package/dist/hooks/useDevicePropsGenerator.js +0 -1
- package/dist/hooks/useDeviceTargetClass.js +0 -1
- package/dist/hooks/useStyles/styleAttributes.js +1 -1
- package/dist/hooks/useStyles/useStyles.js +0 -1
- package/dist/hooks/useStyles.js +0 -1
- package/dist/hooks/useViewportFix.js +5 -5
- package/dist/hooks.js +1 -1
- package/dist/types/components/InputPassword/InputPassword.appearance.d.ts +179 -2
- package/dist/types/components/InputPassword/appearance/inputPasswordDefault.d.ts +7 -4
- package/dist/types/components/InputPassword/appearance/inputPasswordDisabled.d.ts +6 -4
- package/dist/types/components/InputPassword/appearance/inputPasswordError.d.ts +6 -4
- package/dist/types/components/InputPassword/appearance/inputPasswordRequire.d.ts +6 -4
- package/dist/types/components/InputPassword/appearance/inputPasswordShape.d.ts +25 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordSize.d.ts +14 -28
- package/dist/types/components/InputPassword/appearance/inputPasswordStyle.d.ts +5 -5
- package/dist/types/components/InputPassword/appearance/inputPasswordSuccess.d.ts +6 -4
- package/dist/types/components/Response/Response.constant.d.ts +32 -35
- package/dist/types/components/Response/appearance/responseConfirm.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseDanger.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseEmpty.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseError.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseFail.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseNothingFound.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseRefresh.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseSuccess.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseUnableLoadData.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseWarning.d.ts +1 -0
- package/dist/types/components/Select/SelectContainer.d.ts +1 -1
- package/dist/types/components/Tab/appearance/tabSize.d.ts +0 -14
- package/dist/types/components/Tab/appearance/tabSurface.d.ts +7 -7
- package/dist/utils/setViewportProperty.js +3 -3
- package/package.json +14 -14
- package/dist/Avatar_cjs_kuE0Rueg.js +0 -157
- package/dist/Avatar_es_lx7s4Vla.js +0 -153
- package/dist/ChipsGroup_cjs_C8L3ZeD_.js +0 -331
- package/dist/DatePicker_cjs_DsIAoi01.js +0 -183
- package/dist/DatePicker_es_BP5BrEr-.js +0 -179
- package/dist/Divider_cjs_DUYtmwn2.js +0 -97
- package/dist/Divider_es_CCLBFIx6.js +0 -93
- package/dist/DropdownItem_cjs_Bhss6lyM.js +0 -207
- package/dist/DropdownItem_es_BXl6lPJx.js +0 -202
- package/dist/Group_cjs_CsJ6ICKK.js +0 -59
- package/dist/Group_es_DRqIIM9m.js +0 -55
- package/dist/Image_cjs_B6YlGx8G.js +0 -28
- package/dist/Image_es_BvYo_cHH.js +0 -26
- package/dist/Loader_cjs_D3lnxPlI.js +0 -132
- package/dist/Loader_es_BUSqFrCd.js +0 -128
- package/dist/Overlay_cjs_CcfJYN5o.js +0 -41
- package/dist/Overlay_es_DF3DAdxS.js +0 -37
- package/dist/Text_cjs_0EINiUq4.js +0 -68
- package/dist/Text_es_CwV9rjFD.js +0 -64
- package/dist/tslib.es6_cjs_CCZ3TN_7.js +0 -59
- package/dist/tslib.es6_es_Bwu1Cn-t.js +0 -56
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { _ as __assign, b as __rest } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
2
1
|
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import { useMemo } from 'react';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { PartySuggestions } from 'react-dadata';
|
|
6
|
-
import { I as Input } from '../
|
|
5
|
+
import { I as Input } from '../Input_es_BnCXATnh.js';
|
|
7
6
|
import '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
8
7
|
import '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
9
8
|
import 'lodash/camelCase';
|
|
@@ -20,15 +19,21 @@ import '../hooks.js';
|
|
|
20
19
|
import '../hooks/useStyles/styleAttributes.js';
|
|
21
20
|
|
|
22
21
|
function Dadata(props) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return
|
|
22
|
+
const { delay, input, inputProps, meta, token, setValue } = props;
|
|
23
|
+
const dadataInputProps = useMemo(() => {
|
|
24
|
+
return {
|
|
25
|
+
...inputProps,
|
|
26
|
+
className: clsx('react-dadata__input', meta.active && 'input_state_focus', meta.error &&
|
|
26
27
|
meta.touched &&
|
|
27
|
-
|
|
28
|
+
`input_state_${meta.error.key || 'error'}`),
|
|
28
29
|
// https://www.npmjs.com/package/react-dadata
|
|
29
30
|
// "Свойство value игнорируется."
|
|
30
31
|
// value: input.value,
|
|
31
|
-
inputValue: input.value,
|
|
32
|
+
inputValue: input.value,
|
|
33
|
+
onBlur: input.onBlur,
|
|
34
|
+
onChange: input.onChange,
|
|
35
|
+
onFocus: input.onFocus,
|
|
36
|
+
};
|
|
32
37
|
}, [
|
|
33
38
|
inputProps,
|
|
34
39
|
meta.active,
|
|
@@ -42,8 +47,8 @@ function Dadata(props) {
|
|
|
42
47
|
return (jsx(PartySuggestions, { minChars: 3, customInput: DadataCustomInput, delay: delay || 750, inputProps: dadataInputProps, token: token, onChange: setValue }));
|
|
43
48
|
}
|
|
44
49
|
function DadataCustomInput(props) {
|
|
45
|
-
|
|
46
|
-
return jsx(Input,
|
|
50
|
+
const { inputValue, ...otherProps } = props;
|
|
51
|
+
return jsx(Input, { ...otherProps, value: inputValue });
|
|
47
52
|
}
|
|
48
53
|
|
|
49
54
|
export { Dadata };
|
|
@@ -2,11 +2,10 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { DATE_PERIOD_INTERVALS } from '@itcase/common';
|
|
5
|
-
import { D as DatePickerInput } from '../
|
|
5
|
+
import { D as DatePickerInput } from '../DatePicker_es_D1LvY5RT.js';
|
|
6
6
|
import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
7
7
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
|
-
import { b as ChipsGroup, C as Chips } from '../
|
|
9
|
-
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
8
|
+
import { b as ChipsGroup, C as Chips } from '../ChipsGroup_es_BVQ7_n0k.js';
|
|
10
9
|
import 'date-fns/locale';
|
|
11
10
|
import 'react-datepicker';
|
|
12
11
|
import '../hooks/useStyles/useStyles.js';
|
|
@@ -21,20 +20,20 @@ import 'react-responsive';
|
|
|
21
20
|
import '../utils/setViewportProperty.js';
|
|
22
21
|
import '../hooks.js';
|
|
23
22
|
import '../hooks/useStyles/styleAttributes.js';
|
|
24
|
-
import '../
|
|
25
|
-
import '../
|
|
23
|
+
import '../Button_es_Cn3wtv3M.js';
|
|
24
|
+
import '../Icon_es_D5eiycFI.js';
|
|
26
25
|
import 'react-inlinesvg';
|
|
27
26
|
import '../hoc/urlWithAssetPrefix.js';
|
|
28
27
|
import '../context/UrlAssetPrefix.js';
|
|
29
|
-
import '../
|
|
30
|
-
import '../
|
|
31
|
-
import '../
|
|
32
|
-
import '../
|
|
33
|
-
import '../
|
|
28
|
+
import '../Link_es_P2b6ya7P.js';
|
|
29
|
+
import '../Text_es_CnymlElo.js';
|
|
30
|
+
import '../Loader_es_CmSggwbR.js';
|
|
31
|
+
import '../Input_es_BnCXATnh.js';
|
|
32
|
+
import '../Label_es_DCqpSw_F.js';
|
|
34
33
|
import '@itcase/icons/default';
|
|
35
34
|
import 'lodash/castArray';
|
|
36
35
|
|
|
37
|
-
|
|
36
|
+
const datePeriodAppearanceSize = {
|
|
38
37
|
sizeL: {
|
|
39
38
|
size: 'm',
|
|
40
39
|
chipsAppearanceSize: 'sizeL',
|
|
@@ -51,7 +50,7 @@ var datePeriodAppearanceSize = {
|
|
|
51
50
|
},
|
|
52
51
|
};
|
|
53
52
|
|
|
54
|
-
|
|
53
|
+
const datePeriodAppearanceSurface = {
|
|
55
54
|
surfacePrimary: {
|
|
56
55
|
fill: 'surfacePrimary',
|
|
57
56
|
chipsAppearance: 'surfacePrimary ghost',
|
|
@@ -70,27 +69,30 @@ var datePeriodAppearanceSurface = {
|
|
|
70
69
|
},
|
|
71
70
|
};
|
|
72
71
|
|
|
73
|
-
|
|
72
|
+
const datePeriodAppearance = {
|
|
73
|
+
...datePeriodAppearanceSurface,
|
|
74
|
+
...datePeriodAppearanceSize,
|
|
75
|
+
};
|
|
74
76
|
|
|
75
|
-
|
|
77
|
+
const datePeriodConfig = {
|
|
76
78
|
appearance: datePeriodAppearance,
|
|
77
|
-
setAppearance:
|
|
79
|
+
setAppearance: (appearanceConfig) => {
|
|
78
80
|
datePeriodConfig.appearance = appearanceConfig;
|
|
79
81
|
},
|
|
80
82
|
};
|
|
81
83
|
function DatePeriod(props) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
const { appearance, className, datePeriodIntervalsList = Object.values(DATE_PERIOD_INTERVALS), datePeriodValueEnd, datePeriodValueStart, monthsShown, selectsRange = true, isDisabled, isSkeleton, onChangeDatePeriod, onKeyDown, } = props;
|
|
85
|
+
const appearanceConfig = useAppearanceConfig(appearance, datePeriodConfig, isDisabled);
|
|
86
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
87
|
+
const { fillClass, chipsAppearance, chipsAppearanceSize, chipsShape, datePickerAppearance, datePickerAppearanceSize, datePickerInputAppearance, datePickerInputFillHover, datePickerInputSize, datePickerInputTextSize, shapeClass, sizeClass, } = propsGenerator;
|
|
88
|
+
const onClickPeriodChips = useCallback((selectedPeriodItem) => {
|
|
89
|
+
const dateStartIso = selectedPeriodItem.dateIntervalsList[0];
|
|
90
|
+
const dateEndIso = selectedPeriodItem.dateIntervalsList[1];
|
|
89
91
|
onChangeDatePeriod(new Date(dateStartIso), new Date(dateEndIso));
|
|
90
92
|
}, [onChangeDatePeriod]);
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
const checkIsChipsActive = useCallback((targetPeriodItem) => {
|
|
94
|
+
const dateStartIso = targetPeriodItem.dateIntervalsList[0];
|
|
95
|
+
const dateEndIso = targetPeriodItem.dateIntervalsList[1];
|
|
94
96
|
return (dateStartIso === datePeriodValueStart &&
|
|
95
97
|
dateEndIso === datePeriodValueEnd);
|
|
96
98
|
}, [datePeriodValueEnd, datePeriodValueStart]);
|
|
@@ -108,18 +110,18 @@ function DatePeriod(props) {
|
|
|
108
110
|
// },
|
|
109
111
|
// [onChangeDatePeriod],
|
|
110
112
|
// )
|
|
111
|
-
return (jsx("div", { className: clsx(className, 'date-period', shapeClass &&
|
|
112
|
-
appearance:
|
|
113
|
+
return (jsx("div", { className: clsx(className, 'date-period', shapeClass && `date-period_shape_${shapeClass}`, sizeClass && `date-period_size_${sizeClass}`, isSkeleton && `date-period_skeleton`, fillClass && `fill_${fillClass}`, 'cursor_type_pointer'), children: jsxs(ChipsGroup, { direction: "horizontal", children: [datePeriodIntervalsList.map((datePeriodItem) => (jsx(Chips, { appearance: `${chipsAppearance} ${chipsAppearanceSize}`, label: datePeriodItem.label, shape: chipsShape, isActive: checkIsChipsActive(datePeriodItem), onClick: () => onClickPeriodChips(datePeriodItem) }, datePeriodItem.value))), jsx(DatePickerInput, { className: "date-period__datepicker", datePickerProps: {
|
|
114
|
+
appearance: `${datePickerAppearance} ${datePickerAppearanceSize}`,
|
|
113
115
|
dateFormat: 'dd/MM/yyyy',
|
|
114
116
|
monthsShown: monthsShown,
|
|
115
|
-
selectsRange:
|
|
117
|
+
selectsRange: selectsRange,
|
|
116
118
|
showWeekNumbers: true,
|
|
117
119
|
isClearable: false,
|
|
118
120
|
isStartDefaultNull: true,
|
|
119
121
|
onKeyDown: onKeyDown,
|
|
120
122
|
}, endValue: datePeriodValueEnd, inputProps: {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
appearance: `${datePickerInputAppearance} ghost`,
|
|
124
|
+
className: `date-period__datepicker-input date-period__datepicker-input_size_${datePickerInputSize}`,
|
|
123
125
|
fillHover: datePickerInputFillHover,
|
|
124
126
|
textSize: datePickerInputTextSize,
|
|
125
127
|
placeholder: 'Выбрать период',
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { D as DatePickerInput, a as datePickerAppearance, d as datePickerConfig } from '../
|
|
2
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
1
|
+
export { D as DatePickerInput, a as datePickerAppearance, d as datePickerConfig } from '../DatePicker_es_D1LvY5RT.js';
|
|
3
2
|
import 'react/jsx-runtime';
|
|
4
3
|
import 'react';
|
|
5
4
|
import 'clsx';
|
|
@@ -21,14 +20,14 @@ import '../hooks.js';
|
|
|
21
20
|
import '../hooks/useStyles/styleAttributes.js';
|
|
22
21
|
import '../hooks/useStyles/useStyles.js';
|
|
23
22
|
import 'lodash/maxBy';
|
|
24
|
-
import '../
|
|
25
|
-
import '../
|
|
23
|
+
import '../Button_es_Cn3wtv3M.js';
|
|
24
|
+
import '../Icon_es_D5eiycFI.js';
|
|
26
25
|
import 'react-inlinesvg';
|
|
27
26
|
import '../hoc/urlWithAssetPrefix.js';
|
|
28
27
|
import '../context/UrlAssetPrefix.js';
|
|
29
|
-
import '../
|
|
30
|
-
import '../
|
|
31
|
-
import '../
|
|
32
|
-
import '../
|
|
33
|
-
import '../
|
|
28
|
+
import '../Link_es_P2b6ya7P.js';
|
|
29
|
+
import '../Text_es_CnymlElo.js';
|
|
30
|
+
import '../Loader_es_CmSggwbR.js';
|
|
31
|
+
import '../Input_es_BnCXATnh.js';
|
|
32
|
+
import '../Label_es_DCqpSw_F.js';
|
|
34
33
|
import '@itcase/icons/default';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export { D as Divider, a as dividerAppearance, d as dividerConfig } from '../
|
|
1
|
+
export { D as Divider, a as dividerAppearance, d as dividerConfig } from '../Divider_es_BiYozVBS.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'clsx';
|
|
4
4
|
import '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
5
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
6
5
|
import 'react';
|
|
7
6
|
import '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
7
|
import 'lodash/camelCase';
|
package/dist/components/Dot.js
CHANGED
|
@@ -2,7 +2,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
4
4
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
5
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
6
5
|
import 'react';
|
|
7
6
|
import 'lodash/camelCase';
|
|
8
7
|
import 'lodash/castArray';
|
|
@@ -19,12 +18,12 @@ import '../hooks/useStyles/styleAttributes.js';
|
|
|
19
18
|
import 'lodash/maxBy';
|
|
20
19
|
|
|
21
20
|
function Dot(props) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
const { className, children } = props;
|
|
22
|
+
const propsGenerator = useDevicePropsGenerator(props);
|
|
23
|
+
const { fillClass, borderColorClass, borderTypeClass, shapeClass, sizeClass, } = propsGenerator;
|
|
25
24
|
// @ts-expect-error
|
|
26
|
-
|
|
27
|
-
return (jsx("div", { className: clsx(className, 'dot', borderColorClass &&
|
|
25
|
+
const { styles } = useStyles(props);
|
|
26
|
+
return (jsx("div", { className: clsx(className, 'dot', borderColorClass && `border-color_${borderColorClass}`, borderTypeClass && `border_type_${borderTypeClass}`, fillClass && `fill_${fillClass}`, shapeClass && `dot_shape_${shapeClass}`, sizeClass && `dot_size_${sizeClass}`), style: styles, children: children }));
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
export { Dot };
|
|
@@ -2,12 +2,11 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useRef, useEffect } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import ReactDrawer from 'react-modern-drawer';
|
|
5
|
-
import { D as Divider } from '../
|
|
6
|
-
import { I as Icon, b as Title } from '../
|
|
7
|
-
import { T as Text } from '../
|
|
5
|
+
import { D as Divider } from '../Divider_es_BiYozVBS.js';
|
|
6
|
+
import { I as Icon, b as Title } from '../Icon_es_D5eiycFI.js';
|
|
7
|
+
import { T as Text } from '../Text_es_CnymlElo.js';
|
|
8
8
|
import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
9
9
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
10
|
-
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
11
10
|
import { icons24 } from '@itcase/icons/default';
|
|
12
11
|
import '../hooks/useStyles/useStyles.js';
|
|
13
12
|
import 'lodash/camelCase';
|
|
@@ -25,10 +24,10 @@ import '../hooks/useStyles/styleAttributes.js';
|
|
|
25
24
|
import 'react-inlinesvg';
|
|
26
25
|
import '../hoc/urlWithAssetPrefix.js';
|
|
27
26
|
import '../context/UrlAssetPrefix.js';
|
|
28
|
-
import '../
|
|
27
|
+
import '../Link_es_P2b6ya7P.js';
|
|
29
28
|
import 'lodash/castArray';
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
const drawerAppearanceSize = {
|
|
32
31
|
sizeH3: {
|
|
33
32
|
titleTextSize: 'h3',
|
|
34
33
|
descTextSize: 's',
|
|
@@ -37,7 +36,7 @@ var drawerAppearanceSize = {
|
|
|
37
36
|
},
|
|
38
37
|
};
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
const drawerAppearanceSurface = {
|
|
41
40
|
surfacePrimary: {
|
|
42
41
|
fill: 'surfacePrimary',
|
|
43
42
|
fillHover: 'surfacePrimaryHover',
|
|
@@ -65,36 +64,39 @@ var drawerAppearanceSurface = {
|
|
|
65
64
|
},
|
|
66
65
|
};
|
|
67
66
|
|
|
68
|
-
|
|
67
|
+
const drawerAppearance = {
|
|
68
|
+
...drawerAppearanceSize,
|
|
69
|
+
...drawerAppearanceSurface,
|
|
70
|
+
};
|
|
69
71
|
|
|
70
|
-
|
|
72
|
+
const drawerConfig = {
|
|
71
73
|
appearance: drawerAppearance,
|
|
72
|
-
setAppearance:
|
|
74
|
+
setAppearance: (appearanceConfig) => {
|
|
73
75
|
drawerConfig.appearance = appearanceConfig;
|
|
74
76
|
},
|
|
75
77
|
};
|
|
76
78
|
function Drawer(props) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
useEffect(
|
|
84
|
-
|
|
79
|
+
const { dataTestId, dataTour, className, type, appearance, title, desc, enableOverlay, stickyButton, before, after, close, isOpen, isOpenModal, onClickClose, onClose, children, } = props;
|
|
80
|
+
const _isOpen = isOpen ?? isOpenModal;
|
|
81
|
+
const isOpenPrevRef = useRef(Boolean(_isOpen));
|
|
82
|
+
const appearanceConfig = useAppearanceConfig(appearance, drawerConfig);
|
|
83
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
84
|
+
const { direction, size, titleTextColor, titleTextSize, descTextColor, descTextSize, divider, dividerSize, zeroPadding, closeIcon, closeIconFill, closeIconFillIcon, closeIconFillSize, closeIconShape, closeIconSize, closeIconSrc, } = propsGenerator;
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
const isFromOpenToClose = isOpenPrevRef.current === true && !_isOpen;
|
|
85
87
|
if (isFromOpenToClose && onClose) {
|
|
86
88
|
onClose();
|
|
87
89
|
}
|
|
88
90
|
isOpenPrevRef.current = Boolean(_isOpen);
|
|
89
|
-
|
|
91
|
+
const isNeedShowWarning = process.env.NODE_ENV === 'development' &&
|
|
90
92
|
typeof isOpenModal !== 'undefined';
|
|
91
93
|
if (isNeedShowWarning) {
|
|
92
94
|
console.warn('@itcase/ui Drawer warning: "isOpenModal" is deprecated, use "isOpen" instead.');
|
|
93
95
|
}
|
|
94
96
|
}, [_isOpen, onClose]);
|
|
95
|
-
return (jsxs(ReactDrawer, { dataTour: dataTour, className: clsx('drawer', type &&
|
|
97
|
+
return (jsxs(ReactDrawer, { dataTour: dataTour, className: clsx('drawer', type && `drawer_type_${type}`, className, dataTour && `dataTour-${dataTour}`, stickyButton && 'drawer_sticky-button', zeroPadding && 'drawer_reset-padding'), direction: direction || 'right', size: size || 600,
|
|
96
98
|
// Drawer set prefix "EZDrawer" for any id
|
|
97
|
-
customIdSuffix: dataTestId ?
|
|
99
|
+
customIdSuffix: dataTestId ? `_${dataTestId}` : undefined, enableOverlay: enableOverlay, lockBackgroundScroll: false, overlayClassName: "drawer__overlay", open: _isOpen, onClose: onClickClose, children: [before && jsx("div", { className: "drawer__before", children: before }), !close && (closeIcon || closeIconSrc) && (jsx("div", { className: "drawer__close", children: jsx(Icon, { className: "cursor_type_pointer", fill: closeIconFill, fillSize: closeIconFillSize, iconFill: closeIconFillIcon, iconSize: closeIconSize, imageSrc: closeIconSrc, shape: closeIconShape, SvgImage: closeIcon, onClick: onClickClose }) })), (title || desc) && (jsxs("div", { className: "drawer__header", children: [jsx(Title, { className: "drawer__header-title", size: titleTextSize, textColor: titleTextColor, children: title }), jsx(Text, { className: "drawer__header-desc", size: descTextSize, textColor: descTextColor, children: desc })] })), divider && (jsx(Divider, { width: "fill", size: dividerSize, fill: "surfaceTertiary" })), children && jsx("div", { className: "drawer__wrapper", children: children }), after && jsx("div", { className: "drawer__after", children: after })] }));
|
|
98
100
|
}
|
|
99
101
|
|
|
100
102
|
export { Drawer, drawerAppearance, drawerConfig };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { icons24 } from '@itcase/icons/default';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const dropdownListMock = [
|
|
4
4
|
{ key: 1, label: 'Item 1', isActive: true },
|
|
5
5
|
{ key: 2, label: 'Item 2', isActive: false },
|
|
6
6
|
{ key: 3, label: 'Item 3', badgeValue: 3, isActive: false },
|
|
@@ -31,7 +31,7 @@ var dropdownListMock = [
|
|
|
31
31
|
{ key: 8, label: 'Item 8', isActive: false },
|
|
32
32
|
{ key: 9, label: 'Item 9', isActive: false },
|
|
33
33
|
];
|
|
34
|
-
|
|
34
|
+
const dropdownListMessageMock = [
|
|
35
35
|
{ key: 1, emptyMessage: 'Item 1' },
|
|
36
36
|
{ key: 2, emptyMessage: 'Item 2' },
|
|
37
37
|
{ key: 3, emptyMessage: 'Item 3' },
|
|
@@ -42,7 +42,7 @@ var dropdownListMessageMock = [
|
|
|
42
42
|
{ key: 8, emptyMessage: 'Item 8' },
|
|
43
43
|
{ key: 9, emptyMessage: 'Item 9' },
|
|
44
44
|
];
|
|
45
|
-
|
|
45
|
+
const dropdownListBadgeMock = [
|
|
46
46
|
{ key: 1, label: 'Item 1', badgeValue: 1 },
|
|
47
47
|
{ key: 2, label: 'Item 2', badgeValue: 2 },
|
|
48
48
|
{ key: 3, label: 'Item 3', badgeValue: 3 },
|
|
@@ -53,7 +53,7 @@ var dropdownListBadgeMock = [
|
|
|
53
53
|
{ key: 8, label: 'Item 8', badgeValue: 8 },
|
|
54
54
|
{ key: 9, label: 'Item 9', badgeValue: 9 },
|
|
55
55
|
];
|
|
56
|
-
|
|
56
|
+
const dropdownListSimpleMock = [
|
|
57
57
|
{ key: 1, label: 'Item 1', isActive: true },
|
|
58
58
|
{ key: 2, label: 'Item 2', isActive: false },
|
|
59
59
|
{ key: 3, label: 'Item 3', badgeValue: 3, isActive: false },
|
|
@@ -80,7 +80,7 @@ var dropdownListSimpleMock = [
|
|
|
80
80
|
{ key: 8, label: 'Item 8', showDivider: true, isActive: false },
|
|
81
81
|
{ key: 9, label: 'Item 9', isActive: false },
|
|
82
82
|
];
|
|
83
|
-
|
|
83
|
+
const dropdownListBeforeMock = [
|
|
84
84
|
{
|
|
85
85
|
key: 1,
|
|
86
86
|
label: 'Item 1',
|
|
@@ -101,7 +101,7 @@ var dropdownListBeforeMock = [
|
|
|
101
101
|
isActive: false,
|
|
102
102
|
},
|
|
103
103
|
];
|
|
104
|
-
|
|
104
|
+
const dropdownListAfterMock = [
|
|
105
105
|
{
|
|
106
106
|
key: 1,
|
|
107
107
|
label: 'Item 1',
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export { D as Dropdown, a as DropdownItem, d as dropdownItemAppearance, b as dropdownItemConfig } from '../
|
|
1
|
+
export { D as Dropdown, a as DropdownItem, d as dropdownItemAppearance, b as dropdownItemConfig } from '../DropdownItem_es_B-1qtEa7.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'clsx';
|
|
5
5
|
import '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
7
6
|
import 'lodash/camelCase';
|
|
8
7
|
import 'lodash/castArray';
|
|
9
8
|
import 'lodash/upperFirst';
|
|
@@ -18,11 +17,11 @@ import '../hooks.js';
|
|
|
18
17
|
import '../hooks/useStyles/styleAttributes.js';
|
|
19
18
|
import '../hooks/useStyles/useStyles.js';
|
|
20
19
|
import 'lodash/maxBy';
|
|
21
|
-
import '../
|
|
20
|
+
import '../Icon_es_D5eiycFI.js';
|
|
22
21
|
import 'react-inlinesvg';
|
|
23
22
|
import '../hoc/urlWithAssetPrefix.js';
|
|
24
23
|
import '../context/UrlAssetPrefix.js';
|
|
25
24
|
import '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
26
|
-
import '../
|
|
27
|
-
import '../
|
|
28
|
-
import '../
|
|
25
|
+
import '../Link_es_P2b6ya7P.js';
|
|
26
|
+
import '../Text_es_CnymlElo.js';
|
|
27
|
+
import '../Divider_es_BiYozVBS.js';
|
package/dist/components/Flex.js
CHANGED
|
@@ -2,7 +2,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
4
4
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
5
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
6
5
|
import 'react';
|
|
7
6
|
import 'lodash/camelCase';
|
|
8
7
|
import 'lodash/castArray';
|
|
@@ -19,22 +18,22 @@ import '../hooks/useStyles/styleAttributes.js';
|
|
|
19
18
|
import 'lodash/maxBy';
|
|
20
19
|
|
|
21
20
|
function Flex(props) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
const { id, className, type, style, tag: Tag = 'div', onClick, children, } = props;
|
|
22
|
+
const propsGenerator = useDevicePropsGenerator(props);
|
|
23
|
+
const { directionClass, justifyContentClass, alignContentClass, alignItemsClass, fillClass, borderColorClass, borderTypeClass, dataTestId, dataTour, flowClass, positionClass, shapeClass, widthClass, wrapClass, } = propsGenerator;
|
|
25
24
|
// @ts-expect-error
|
|
26
|
-
|
|
27
|
-
return (jsx(Tag, { id: id, className: clsx(className, 'flex', widthClass &&
|
|
25
|
+
const { styles: flexStyles, wrapper: flexWrapperStyles } = useStyles(props);
|
|
26
|
+
return (jsx(Tag, { id: id, className: clsx(className, 'flex', widthClass && `width_${widthClass}`, alignContentClass && `flex_align-content_${alignContentClass}`, alignItemsClass && `flex_align-items_${alignItemsClass}`, directionClass && `flex_direction_${directionClass}`, fillClass && `fill_${fillClass}`, flowClass && `flex_flow_${flowClass}`, borderColorClass && `border-color_${borderColorClass}`, borderTypeClass && `border_type_${borderTypeClass}`, positionClass && `position_${positionClass}`, justifyContentClass && `flex_justify-content_${justifyContentClass}`, shapeClass && `flex_shape_${shapeClass}`, type && `flex_type_${type}`, wrapClass && `flex_wrap_${wrapClass}`), "data-test-id": dataTestId, "data-tour": dataTour, style: Object.assign({}, flexStyles, style), onClick: onClick, children: jsx("div", { className: "flex__wrapper", style: flexWrapperStyles, children: children }) }));
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
function FlexItem(props) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
const { className, htmlFor, style, tag: Tag = 'div', children } = props;
|
|
31
|
+
const propsGenerator = useDevicePropsGenerator(props);
|
|
32
|
+
const { directionClass, justifyContentClass, alignItemsClass, alignSelfClass, fillClass, fillHoverClass, dataTestId, dataTour, growClass, positionClass, shapeClass, widthClass, wrapClass, } = propsGenerator;
|
|
34
33
|
// @ts-expect-error
|
|
35
|
-
|
|
36
|
-
return (jsx(Tag, { className: clsx(className, 'flex__item', positionClass &&
|
|
37
|
-
|
|
34
|
+
const { styles: flexItemStyles } = useStyles(props);
|
|
35
|
+
return (jsx(Tag, { className: clsx(className, 'flex__item', positionClass && `position_${positionClass}`, alignItemsClass && `flex__item_align-items_${alignItemsClass}`, alignSelfClass && `flex__item_align-self_${alignSelfClass}`, directionClass && `flex__item_direction_${directionClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, growClass && `flex__item_grow_${growClass}`, justifyContentClass &&
|
|
36
|
+
`flex__item_justify-content_${justifyContentClass}`, shapeClass && `flex__item_shape_${shapeClass}`, widthClass && `width_${widthClass}`, wrapClass && `flex__item_wrap_${wrapClass}`), "data-test-id": dataTestId, "data-tour": dataTour, htmlFor: htmlFor, style: Object.assign({}, flexItemStyles, style), children: children }));
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
export { Flex, FlexItem };
|
package/dist/components/Grid.js
CHANGED
|
@@ -2,7 +2,6 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
4
4
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
5
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
6
5
|
import 'react';
|
|
7
6
|
import 'lodash/camelCase';
|
|
8
7
|
import 'lodash/castArray';
|
|
@@ -19,30 +18,30 @@ import '../hooks/useStyles/styleAttributes.js';
|
|
|
19
18
|
import 'lodash/maxBy';
|
|
20
19
|
|
|
21
20
|
function Grid(props) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
const { id, className, dataTour, type, horizontalResizing, horizontalScroll, tag: Tag = 'div', useGridSystem, verticalResizing, before, after, onClick, onDoubleClick, children, } = props;
|
|
22
|
+
const propsGenerator = useDevicePropsGenerator(props);
|
|
23
|
+
const { justifyContentClass, justifyItemsClass, alignContentClass, alignItemsClass, fillClass, fillHoverClass, borderColorClass, columnGapClass, columnsClass, heightClass, rowGapClass, rowsClass, widthClass, } = propsGenerator;
|
|
25
24
|
// @ts-expect-error
|
|
26
|
-
|
|
27
|
-
return (jsxs(Tag, { id: id, className: clsx(className, 'grid', widthClass &&
|
|
25
|
+
const { styles: gridStyles } = useStyles(props);
|
|
26
|
+
return (jsxs(Tag, { id: id, className: clsx(className, 'grid', widthClass && `width_${widthClass}`, heightClass && `height_${heightClass}`, useGridSystem && `grid_state_system`, horizontalScroll && `grid_scroll_horizontal`, type && `grid_type_${type}`, columnsClass && `grid_columns_${columnsClass}`, rowsClass && `grid_rows_${rowsClass}`, rowGapClass && `grid_row-gap_${rowGapClass}`, columnGapClass && `grid_column-gap_${columnGapClass}`, alignContentClass && `grid_align-content_${alignContentClass}`, alignItemsClass && `grid_align-items_${alignItemsClass}`, borderColorClass && `border-color_${borderColorClass}`, justifyContentClass && `grid_justify-content_${justifyContentClass}`, justifyItemsClass && `grid_justify-items_${justifyItemsClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, horizontalResizing && `grid_horizontal-resizing_${horizontalResizing}`, verticalResizing && `grid_vertical-resizing_${verticalResizing}`), dataTour: dataTour, style: gridStyles, onClick: onClick, onDoubleClick: onDoubleClick, children: [before && jsx("div", { className: "grid__before", children: before }), children, after && jsx("div", { className: "grid__after", children: after })] }));
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
function GridItem(props) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
const { id, className, style, onClick, children } = props;
|
|
31
|
+
const propsGenerator = useDevicePropsGenerator(props);
|
|
32
|
+
const { directionClass, justifySelfClass, alignSelfClass, fillClass, fillHoverClass, columnEndClass, columnGapClass, columnSpanClass, columnStartClass, dataTestId, dataTour, gapClass, heightClass, orderClass, rowEndClass, rowGapClass, rowSpanClass, rowStartClass, widthClass, } = propsGenerator;
|
|
34
33
|
// @ts-expect-error
|
|
35
|
-
|
|
36
|
-
return (jsx("div", { id: id, className: clsx(className, 'grid__item', orderClass &&
|
|
34
|
+
const { styles: gridItemStyles } = useStyles(props);
|
|
35
|
+
return (jsx("div", { id: id, className: clsx(className, 'grid__item', orderClass && `order_${orderClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, alignSelfClass && `grid__item_align-self_${alignSelfClass}`, justifySelfClass && `grid__item_justify-self_${justifySelfClass}`, columnStartClass && `grid__item_column-start_${columnStartClass}`, columnEndClass && `grid__item_column-end_${columnEndClass}`, columnSpanClass && `grid__item_column-span_${columnSpanClass}`, rowStartClass && `grid__item_row-start_${rowStartClass}`, rowEndClass && `grid__item_row-end_${rowEndClass}`, rowSpanClass && `grid__item_row-span_${rowSpanClass}`, directionClass && `direction_${directionClass}`, gapClass && `gap_${gapClass}`, widthClass && `width_${widthClass}`, heightClass && `height_${heightClass}`, rowGapClass && `row-gap_${rowGapClass}`, columnGapClass && `column-gap_${columnGapClass}`), "data-test-id": dataTestId, "data-tour": dataTour, style: Object.assign({}, gridItemStyles, style), onClick: onClick, children: children }));
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
function GridRow(props) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
const { id, className, dataTestId, dataTour, htmlFor, tag: Tag = 'div', onClick, children, } = props;
|
|
40
|
+
const propsGenerator = useDevicePropsGenerator(props);
|
|
41
|
+
const { fillClass, fillHoverClass, borderColorClass, heightClass, widthClass, } = propsGenerator;
|
|
43
42
|
// @ts-expect-error
|
|
44
|
-
|
|
45
|
-
return (jsx(Tag, { id: id, className: clsx(className, 'grid__row', widthClass &&
|
|
43
|
+
const { styles: gridRowStyles } = useStyles(props);
|
|
44
|
+
return (jsx(Tag, { id: id, className: clsx(className, 'grid__row', widthClass && `width_${widthClass}`, heightClass && `height_${heightClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, borderColorClass && `border-color_${borderColorClass}`), "data-test-id": dataTestId, "data-tour": dataTour, htmlFor: htmlFor, style: gridRowStyles, onClick: onClick, children: children }));
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
export { Grid, GridItem, GridRow };
|
package/dist/components/Group.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export { G as Group, a as groupAppearance, g as groupConfig } from '../
|
|
1
|
+
export { G as Group, a as groupAppearance, g as groupConfig } from '../Group_es_BU5k8f5S.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'clsx';
|
|
5
5
|
import '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
6
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
7
6
|
import '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
7
|
import 'lodash/camelCase';
|
|
9
8
|
import 'lodash/castArray';
|
|
@@ -2,7 +2,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
4
4
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
5
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
6
5
|
import 'react';
|
|
7
6
|
import 'lodash/camelCase';
|
|
8
7
|
import 'lodash/castArray';
|
|
@@ -19,12 +18,12 @@ import '../hooks/useStyles/styleAttributes.js';
|
|
|
19
18
|
import 'lodash/maxBy';
|
|
20
19
|
|
|
21
20
|
function HTMLContent(props) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
const { className, content, dataTour, style, onClick, children } = props;
|
|
22
|
+
const propsGenerator = useDevicePropsGenerator(props);
|
|
23
|
+
const { directionClass, flexGrowClass, justifyContentClass, alignClass, alignDirectionClass, fillClass, fillHoverClass, borderColorClass, borderTypeClass, borderWidthClass, textColorClass, textWeightClass, columnsClass, elevationClass, heightClass, shapeClass, widthClass, wrapClass, } = propsGenerator;
|
|
25
24
|
// @ts-expect-error
|
|
26
|
-
|
|
27
|
-
return (jsx("div", { className: clsx(className, 'html-content', alignClass &&
|
|
25
|
+
const { styles: htmlContentStyles } = useStyles(props);
|
|
26
|
+
return (jsx("div", { className: clsx(className, 'html-content', alignClass && `align_${alignClass}`, alignDirectionClass && `align_${alignDirectionClass}`, borderColorClass && `border-color_${borderColorClass}`, borderTypeClass && `border_type_${borderTypeClass}`, borderWidthClass && `border-width_${borderWidthClass}`, columnsClass && `html-content_columns_${columnsClass}`, directionClass && `html-content_direction_${directionClass}`, elevationClass && `elevation_${elevationClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, flexGrowClass && `flex-grow_${flexGrowClass}`, heightClass && `height_${heightClass}`, justifyContentClass && `justify-content_${justifyContentClass}`, shapeClass && `html-content_shape_${shapeClass}`, textColorClass && `text-color_${textColorClass}`, textWeightClass && `text-weight_${textWeightClass}`, wrapClass && `html-content_wrap_${wrapClass}`, widthClass && `width_${widthClass}`), dangerouslySetInnerHTML: { __html: content }, dataTour: dataTour, style: Object.assign({}, htmlContentStyles, style), onClick: onClick, children: children }));
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
export { HTMLContent };
|