@itcase/ui 1.8.1 → 1.8.4
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/{Badge-Df7Zxjnk.js → Badge_cjs_DrG2tUjI.js} +12 -34
- package/dist/{Badge-BY030Mwm.js → Badge_es_Bx0NsdST.js} +12 -34
- package/dist/{Button-CWPTzaG2.js → Button_cjs_B7OmqizJ.js} +26 -25
- package/dist/{Button-DHOZJDHv.js → Button_es_CBbHMy1v.js} +26 -25
- package/dist/{Divider-BQIfjvPR.js → Divider_cjs_DakITdTv.js} +1 -1
- package/dist/{Divider-CUFKsm-9.js → Divider_es_CWsDM2Rm.js} +1 -1
- package/dist/{DropdownItem-_bKQxzEZ.js → DropdownItem_cjs_TdJHpFgg.js} +3 -3
- package/dist/{DropdownItem-Cl1pYnVf.js → DropdownItem_es_CdYP5BQN.js} +3 -3
- package/dist/{Group-utjnjUDZ.js → Group_cjs_DFmNT5Mq.js} +8 -4
- package/dist/{Group-C8NUU6k5.js → Group_es_CRGwi5XI.js} +8 -4
- package/dist/{Icon-D_BDlSSb.js → Icon_cjs_DSzfNqif.js} +3 -3
- package/dist/{Icon-BF7i3XdQ.js → Icon_es_BBmoZ7_3.js} +3 -3
- package/dist/{Input-BRhHPsGM.js → Input_cjs_DkQh0Utd.js} +1 -1
- package/dist/{Input-BH6rNRqZ.js → Input_es_Bs0gEq3L.js} +1 -1
- package/dist/{Label-DsNZ-asS.js → Label_cjs_BCjB-mxC.js} +5 -5
- package/dist/{Label-brG78nLi.js → Label_es_CZpanSdR.js} +5 -5
- package/dist/{Link-CZ8o5lGW.js → Link_cjs_yht44xJv.js} +1 -1
- package/dist/{Link-Cn7hiWmM.js → Link_es_DkW06IM-.js} +1 -1
- package/dist/{Loader-CjT6-r3I.js → Loader_cjs_D753D3li.js} +2 -2
- package/dist/{Loader-Dquhwxz4.js → Loader_es_BE4nyzXi.js} +2 -2
- package/dist/{Overlay-BoIJ-g58.js → Overlay_cjs_BTSfcGrM.js} +1 -2
- package/dist/{Overlay-Be9UCtR9.js → Overlay_es_CR7d-ISF.js} +1 -2
- package/dist/{Text-DwIx33-P.js → Text_cjs_D4xG0cKD.js} +3 -3
- package/dist/{Text-aaWArShm.js → Text_es_FJGduy7Z.js} +3 -3
- package/dist/{Title-ByfOyy-n.js → Title_cjs_iuyln-ab.js} +1 -1
- package/dist/{Title--_epIXkC.js → Title_es_ke3YylFm.js} +1 -1
- package/dist/{Tooltip-hznDyLwa.js → Tooltip_cjs_CTwksdFk.js} +3 -3
- package/dist/{Tooltip-DP32J5V6.js → Tooltip_es_H976MIb7.js} +3 -3
- package/dist/cjs/components/Accordion.js +7 -7
- package/dist/cjs/components/Avatar.js +9 -9
- package/dist/cjs/components/Badge.js +7 -7
- package/dist/cjs/components/Breadcrumbs.js +6 -6
- package/dist/cjs/components/Button.js +8 -8
- package/dist/cjs/components/Cell.js +7 -7
- package/dist/cjs/components/Checkbox.js +2 -2
- package/dist/cjs/components/Checkmark.js +1 -1
- package/dist/cjs/components/Chips.js +12 -12
- package/dist/cjs/components/Choice.js +54 -18
- package/dist/cjs/components/Code.js +1 -1
- package/dist/cjs/components/CookiesWarning.js +9 -9
- package/dist/cjs/components/DadataHintField.js +4 -4
- package/dist/cjs/components/DatePicker.js +113 -46
- package/dist/cjs/components/Divider.js +2 -2
- package/dist/cjs/components/Dot.js +1 -1
- package/dist/cjs/components/Dropdown.js +4 -4
- package/dist/cjs/components/Flex.js +1 -1
- package/dist/cjs/components/Grid.js +1 -1
- package/dist/cjs/components/Group.js +2 -2
- package/dist/cjs/components/HTMLContent.js +1 -1
- package/dist/cjs/components/HeroTitle.js +1 -1
- package/dist/cjs/components/Icon.js +6 -6
- package/dist/cjs/components/Image.js +2 -2
- package/dist/cjs/components/Input.js +2 -2
- package/dist/cjs/components/InputMask.js +3 -3
- package/dist/cjs/components/InputPassword.js +6 -6
- package/dist/cjs/components/Label.js +5 -5
- package/dist/cjs/components/Link.js +2 -2
- package/dist/cjs/components/List.js +2 -2
- package/dist/cjs/components/Loader.js +3 -3
- package/dist/cjs/components/Logo.js +2 -2
- package/dist/cjs/components/MenuItem.js +3 -3
- package/dist/cjs/components/Modal.js +5 -5
- package/dist/cjs/components/ModalSheetBottom.js +1 -1
- package/dist/cjs/components/Notification.js +2 -2
- package/dist/cjs/components/Overlay.js +2 -2
- package/dist/cjs/components/Pagination.js +14 -10
- package/dist/cjs/components/Panel.js +3 -3
- package/dist/cjs/components/Radio.js +2 -2
- package/dist/cjs/components/RangeSlider.js +1 -1
- package/dist/cjs/components/Response.js +9 -9
- package/dist/cjs/components/SVGContent.js +1 -1
- package/dist/cjs/components/ScrollOnDrag.js +3 -3
- package/dist/cjs/components/ScrollToView.js +1 -1
- package/dist/cjs/components/Scrollbar.js +1 -1
- package/dist/cjs/components/Search.js +59 -16
- package/dist/cjs/components/Segmented.js +30 -18
- package/dist/cjs/components/Select.js +10 -10
- package/dist/cjs/components/Swiper.js +2 -2
- package/dist/cjs/components/Switch.js +2 -2
- package/dist/cjs/components/Tab.js +50 -70
- package/dist/cjs/components/Text.js +2 -2
- package/dist/cjs/components/Textarea.js +132 -51
- package/dist/cjs/components/Tile.js +7 -7
- package/dist/cjs/components/Title.js +2 -2
- package/dist/cjs/components/Tooltip.js +4 -4
- package/dist/cjs/components/Video.js +1 -1
- package/dist/cjs/context/Notifications.js +2 -2
- package/dist/cjs/context/UIContext.js +4 -4
- package/dist/cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +1 -1
- package/dist/cjs/hooks/useDevicePropsGenerator.js +1 -1
- package/dist/cjs/hooks/useDeviceTargetClass.js +1 -1
- package/dist/cjs/hooks/useStyles/useStyles.js +1 -1
- package/dist/cjs/hooks/useStyles.js +1 -1
- package/dist/components/Accordion.js +7 -7
- package/dist/components/Avatar.js +9 -9
- package/dist/components/Badge.js +7 -7
- package/dist/components/Breadcrumbs.js +6 -6
- package/dist/components/Button.js +8 -8
- package/dist/components/Cell.js +7 -7
- package/dist/components/Checkbox.js +2 -2
- package/dist/components/Checkmark.js +1 -1
- package/dist/components/Chips.js +12 -12
- package/dist/components/Choice.js +54 -18
- package/dist/components/Code.js +1 -1
- package/dist/components/CookiesWarning.js +9 -9
- package/dist/components/DadataHintField.js +4 -4
- package/dist/components/DatePicker.js +113 -46
- package/dist/components/Divider.js +2 -2
- package/dist/components/Dot.js +1 -1
- package/dist/components/Dropdown.js +4 -4
- package/dist/components/Flex.js +1 -1
- package/dist/components/Grid.js +1 -1
- package/dist/components/Group.js +2 -2
- package/dist/components/HTMLContent.js +1 -1
- package/dist/components/HeroTitle.js +1 -1
- package/dist/components/Icon.js +6 -6
- package/dist/components/Image.js +2 -2
- package/dist/components/Input.js +2 -2
- package/dist/components/InputMask.js +3 -3
- package/dist/components/InputPassword.js +6 -6
- package/dist/components/Label.js +5 -5
- package/dist/components/Link.js +2 -2
- package/dist/components/List.js +2 -2
- package/dist/components/Loader.js +3 -3
- package/dist/components/Logo.js +2 -2
- package/dist/components/MenuItem.js +3 -3
- package/dist/components/Modal.js +5 -5
- package/dist/components/ModalSheetBottom.js +1 -1
- package/dist/components/Notification.js +2 -2
- package/dist/components/Overlay.js +2 -2
- package/dist/components/Pagination.js +15 -11
- package/dist/components/Panel.js +3 -3
- package/dist/components/Radio.js +2 -2
- package/dist/components/RangeSlider.js +1 -1
- package/dist/components/Response.js +9 -9
- package/dist/components/SVGContent.js +1 -1
- package/dist/components/ScrollOnDrag.js +2 -2
- package/dist/components/ScrollToView.js +1 -1
- package/dist/components/Scrollbar.js +1 -1
- package/dist/components/Search.js +59 -16
- package/dist/components/Segmented.js +30 -18
- package/dist/components/Select.js +10 -10
- package/dist/components/Swiper.js +2 -2
- package/dist/components/Switch.js +2 -2
- package/dist/components/Tab.js +50 -70
- package/dist/components/Text.js +2 -2
- package/dist/components/Textarea.js +133 -51
- package/dist/components/Tile.js +7 -7
- package/dist/components/Title.js +2 -2
- package/dist/components/Tooltip.js +4 -4
- package/dist/components/Video.js +1 -1
- package/dist/context/Notifications.js +2 -2
- package/dist/context/UIContext.js +4 -4
- package/dist/css/components/Accordion/Accordion.css +2 -0
- package/dist/css/components/Avatar/Avatar.css +15 -14
- package/dist/css/components/Badge/Badge.css +1 -0
- package/dist/css/components/Button/Button.css +8 -2
- package/dist/css/components/Cell/Cell.css +10 -9
- package/dist/css/components/Chips/Chips.css +12 -0
- package/dist/css/components/Choice/Choice.css +47 -14
- package/dist/css/components/Choice/css/__item/choice__item.css +3 -0
- package/dist/css/components/Choice/css/__item/choice__item_size.css +10 -0
- package/dist/css/components/Code/Code.css +9 -11
- package/dist/css/components/CookiesWarning/CookiesWarning.css +1 -1
- package/dist/css/components/CookiesWarning/CookiesWarning.token.css +2 -0
- package/dist/css/components/DatePicker/DatePicker.css +114 -26
- package/dist/css/components/Divider/Divider.css +3 -4
- package/dist/css/components/Dot/Dot.css +1 -0
- package/dist/css/components/Drawer/Drawer.css +4 -7
- package/dist/css/components/Dropdown/Dropdown.css +18 -3
- package/dist/css/components/Grid/Grid.css +12 -3
- package/dist/css/components/Group/Group.css +1 -1
- package/dist/css/components/Icon/Icon.css +7 -1
- package/dist/css/components/Input/Input.css +7 -9
- package/dist/css/components/InputMask/{Input.css → InputMask.css} +4 -4
- package/dist/css/components/InputPassword/InputPassword.css +1 -0
- package/dist/css/components/Loader/Loader.css +6 -0
- package/dist/css/components/Modal/Modal.css +1 -0
- package/dist/css/components/ModalSheetBottom/ModalSheetBottom.css +7 -4
- package/dist/css/components/Notification/Notification.css +1 -1
- package/dist/css/components/Notification/css/__item/notification__item_set_toast.css +1 -1
- package/dist/css/components/Pagination/Pagination.css +10 -8
- package/dist/css/components/Pagination/css/__item/pagination__item.css +1 -1
- package/dist/css/components/Pagination/css/__item/pagination__item_state_active.css +1 -4
- package/dist/css/components/Radio/Radio.css +2 -0
- package/dist/css/components/RangeSlider/RangeSlider.css +1 -1
- package/dist/css/components/Search/Search.css +5 -2
- package/dist/css/components/Search/css/search-input/search-input_size.css +1 -0
- package/dist/css/components/Segmented/Segmented.css +3 -0
- package/dist/css/components/Select/Select.css +13 -5
- package/dist/css/components/Select/css/__control/select__control_fill.css +1 -1
- package/dist/css/components/Select/css/__menu/select__menu.css +1 -1
- package/dist/css/components/Swiper/Swiper.css +3 -3
- package/dist/css/components/Tab/Tab.css +2 -2
- package/dist/css/components/Text/Text.css +15 -12
- package/dist/css/components/Textarea/Textarea.css +38 -26
- package/dist/css/components/Tile/Tile.css +9 -0
- package/dist/css/components/Tooltip/Tooltip.css +8 -1
- package/dist/css/styles/border-color/border-color.css +6 -6
- package/dist/css/styles/border-color/border-color_focus.css +7 -5
- package/dist/css/styles/border-color/border-color_hover.css +13 -9
- package/dist/css/styles/border-width/border-width.css +2 -1
- package/dist/css/styles/caret-color/caret-color.css +6 -4
- package/dist/css/styles/fill/fill.css +19 -34
- package/dist/css/styles/fill/fill_active.css +14 -25
- package/dist/css/styles/fill/fill_active_hover.css +23 -27
- package/dist/css/styles/fill/fill_hover.css +27 -33
- package/dist/css/styles/hover/hover-fill-color.css +6 -4
- package/dist/css/styles/hover/hover-item-color.css +6 -4
- package/dist/css/styles/hover/hover-text-color.css +6 -4
- package/dist/css/styles/opacity/opacity.css +3 -2
- package/dist/css/styles/placeholder-text-color/placeholder-text-color.css +6 -4
- package/dist/css/styles/svg-color/svg_fill.css +6 -9
- package/dist/css/styles/svg-color/svg_fill_hover.css +6 -4
- package/dist/css/styles/svg-color/svg_path_fill.css +6 -5
- package/dist/css/styles/text-color/text-color.css +6 -6
- package/dist/css/styles/text-color/text-color_active.css +7 -6
- package/dist/css/styles/text-color/text-color_hover.css +7 -6
- package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +1 -1
- package/dist/hooks/useDevicePropsGenerator.js +1 -1
- package/dist/hooks/useDeviceTargetClass.js +1 -1
- package/dist/hooks/useStyles/useStyles.js +1 -1
- package/dist/hooks/useStyles.js +1 -1
- package/dist/stories/Breadcrumbs.mdx +15 -0
- package/dist/stories/BreadcrumbsItem.mdx +17 -0
- package/dist/stories/Image.mdx +2 -2
- package/dist/stories/ListItem.mdx +11 -0
- package/dist/stories/Overview.mdx +15 -5
- package/dist/stories/Playground.mdx +4 -4
- package/dist/stories/Playgroynd.mdx +11 -0
- package/dist/stories/Plsyground.mdx +14 -0
- package/dist/types/components/Badge/appearance/badgeAccent.d.ts +0 -20
- package/dist/types/components/Button/appearance/buttonSize.d.ts +7 -7
- package/dist/types/components/Button/appearance/buttonSurface.d.ts +6 -5
- package/dist/types/components/Choice/appearance/choiceAccent.d.ts +1 -2
- package/dist/types/components/Choice/appearance/choiceSize.d.ts +18 -0
- package/dist/types/components/Choice/appearance/choiceStyle.d.ts +14 -0
- package/dist/types/components/Choice/appearance/choiceSurface.d.ts +5 -2
- package/dist/types/components/DadataHintField/DadataHintField.interface.d.ts +4 -2
- package/dist/types/components/DatePicker/DatePicker.appearance.d.ts +71 -12
- package/dist/types/components/DatePicker/appearance/datePickerSize.d.ts +42 -0
- package/dist/types/components/DatePicker/appearance/datePickerStyle.d.ts +26 -0
- package/dist/types/components/DatePicker/appearance/datePickerSurface.d.ts +8 -11
- package/dist/types/components/InputMask/InputMask.d.ts +5 -0
- package/dist/types/components/InputMask/index.d.ts +1 -1
- package/dist/types/components/Pagination/appearance/paginationSurface.d.ts +3 -0
- package/dist/types/components/RangeSlider/RangeSlider.interface.d.ts +1 -1
- package/dist/types/components/ScrollOnDrag/ScrollOnDrag.interface.d.ts +1 -1
- package/dist/types/components/Search/appearance/searchSize.d.ts +17 -0
- package/dist/types/components/Search/appearance/searchStyle.d.ts +14 -0
- package/dist/types/components/Search/appearance/searchSurface.d.ts +18 -0
- package/dist/types/components/Segmented/appearance/segmentedSize.d.ts +15 -0
- package/dist/types/components/Segmented/appearance/segmentedSurface.d.ts +13 -0
- package/dist/types/components/Tab/appearance/tabSize.d.ts +10 -0
- package/dist/types/components/Tab/appearance/tabStyle.d.ts +14 -0
- package/dist/types/components/Tab/appearance/tabSurface.d.ts +51 -0
- package/dist/types/components/Textarea/Textarea.appearance.d.ts +1 -2
- package/dist/types/components/Textarea/Textarea.interface.d.ts +1 -8
- package/dist/types/components/Textarea/appearance/textareaDefault.d.ts +18 -0
- package/dist/types/components/Textarea/appearance/textareaDisabled.d.ts +20 -0
- package/dist/types/components/Textarea/appearance/textareaError.d.ts +20 -0
- package/dist/types/components/Textarea/appearance/textareaRequire.d.ts +20 -0
- package/dist/types/components/Textarea/appearance/textareaSize.d.ts +31 -0
- package/dist/types/components/Textarea/appearance/textareaStyle.d.ts +14 -0
- package/dist/types/components/Textarea/appearance/textareaSuccess.d.ts +20 -0
- package/dist/types/components/Textarea/index.d.ts +1 -1
- package/dist/types/components/Video/Video.interface.d.ts +3 -1
- package/dist/types/components/Video/stories/mocks/videoSources.d.ts +6 -0
- package/dist/types/context/Notifications.d.ts +2 -2
- package/dist/types/context/UIContext.d.ts +1 -1
- package/package.json +15 -15
- package/dist/css/styles/fill/fill_disabled.css +0 -33
- package/dist/stories/Avatar.mdx +0 -23
- package/dist/stories/Badge.mdx +0 -13
- package/dist/stories/Button.mdx +0 -12
- package/dist/stories/Cell.mdx +0 -7
- package/dist/stories/Checkbox.mdx +0 -12
- package/dist/stories/Checkmark.mdx +0 -10
- package/dist/stories/Chips.mdx +0 -37
- package/dist/stories/Choice.mdx +0 -11
- package/dist/stories/Code.mdx +0 -11
- package/dist/stories/DatePicker.mdx +0 -31
- package/dist/stories/HeroTitle.mdx +0 -31
- package/dist/stories/Textarea.mdx +0 -15
- package/dist/stories/Title.mdx +0 -31
- package/dist/stories/Tooltip.mdx +0 -19
- package/dist/types/components/InputMask/Input.d.ts +0 -5
- /package/dist/{Image-DuIBtUq5.js → Image_cjs_DuIBtUq5.js} +0 -0
- /package/dist/{Image-CSzHhlA1.js → Image_es_CSzHhlA1.js} +0 -0
- /package/dist/{Scrollbar-DcKOfcNp.js → Scrollbar_cjs_DcKOfcNp.js} +0 -0
- /package/dist/{Scrollbar-CThJeCLF.js → Scrollbar_es_CThJeCLF.js} +0 -0
- /package/dist/{tslib.es6-CCZ3TN_7.js → tslib.es6_cjs_CCZ3TN_7.js} +0 -0
- /package/dist/{tslib.es6-Bwu1Cn-t.js → tslib.es6_es_Bwu1Cn-t.js} +0 -0
- /package/dist/types/components/InputMask/{Input.interface.d.ts → InputMask.interface.d.ts} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('../../tslib.
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var clsx = require('clsx');
|
|
7
7
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
8
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
9
|
-
var Icon = require('../../
|
|
10
|
-
var Loader = require('../../
|
|
11
|
-
var Text = require('../../
|
|
9
|
+
var Icon = require('../../Icon_cjs_DSzfNqif.js');
|
|
10
|
+
var Loader = require('../../Loader_cjs_D753D3li.js');
|
|
11
|
+
var Text = require('../../Text_cjs_D4xG0cKD.js');
|
|
12
12
|
require('lodash/camelCase');
|
|
13
13
|
require('lodash/castArray');
|
|
14
14
|
require('lodash/upperFirst');
|
|
@@ -22,21 +22,54 @@ require('../utils/setViewportProperty.js');
|
|
|
22
22
|
require('lodash/maxBy');
|
|
23
23
|
require('../hooks/useStyles/styleAttributes.js');
|
|
24
24
|
require('react-inlinesvg');
|
|
25
|
-
require('../../
|
|
26
|
-
require('../../
|
|
27
|
-
require('../../
|
|
25
|
+
require('../../Link_cjs_yht44xJv.js');
|
|
26
|
+
require('../../Tooltip_cjs_CTwksdFk.js');
|
|
27
|
+
require('../../Title_cjs_iuyln-ab.js');
|
|
28
28
|
|
|
29
29
|
var choiceAppearanceAccent = {
|
|
30
30
|
accentPrimary: {
|
|
31
31
|
fill: 'surfacePrimary',
|
|
32
|
-
|
|
32
|
+
fillItemActive: 'accentPrimary',
|
|
33
33
|
labelTextActiveColor: 'accentTextPrimary',
|
|
34
34
|
labelTextColor: 'surfaceTextPrimary',
|
|
35
|
-
labelTextSize: 's',
|
|
36
35
|
borderColor: 'surfaceBorderSecondary',
|
|
37
36
|
},
|
|
38
37
|
};
|
|
39
38
|
|
|
39
|
+
var choiceAppearanceSize = {
|
|
40
|
+
sizeL: {
|
|
41
|
+
size: 'l',
|
|
42
|
+
labelTextSize: 'm',
|
|
43
|
+
iconSize: '24',
|
|
44
|
+
},
|
|
45
|
+
sizeM: {
|
|
46
|
+
size: 'm',
|
|
47
|
+
labelTextSize: 'm',
|
|
48
|
+
iconSize: '24',
|
|
49
|
+
},
|
|
50
|
+
sizeS: {
|
|
51
|
+
size: 's',
|
|
52
|
+
labelTextSize: 's',
|
|
53
|
+
iconSize: '20',
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
var choiceAppearanceStyle = {
|
|
58
|
+
full: {
|
|
59
|
+
/* border / fill */
|
|
60
|
+
},
|
|
61
|
+
ghost: {
|
|
62
|
+
fill: 'none',
|
|
63
|
+
borderWidth: '0',
|
|
64
|
+
},
|
|
65
|
+
outlined: {
|
|
66
|
+
fill: 'none',
|
|
67
|
+
},
|
|
68
|
+
solid: {
|
|
69
|
+
borderWidth: '0',
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
|
|
40
73
|
var choiceAppearanceSurface = {
|
|
41
74
|
surfacePrimary: {
|
|
42
75
|
fill: 'surfacePrimary',
|
|
@@ -46,7 +79,10 @@ var choiceAppearanceSurface = {
|
|
|
46
79
|
fillItemHover: 'surfaceItemSecondary',
|
|
47
80
|
labelTextActiveColor: 'surfaceTextPrimary',
|
|
48
81
|
labelTextColor: 'surfaceTextPrimary',
|
|
49
|
-
|
|
82
|
+
labelTextWrap: 'nowrap',
|
|
83
|
+
borderColor: 'surfaceBorderSecondary',
|
|
84
|
+
iconBeforeFill: 'surfaceItemPrimary',
|
|
85
|
+
iconBeforeFillActive: 'surfaceItemPrimary',
|
|
50
86
|
},
|
|
51
87
|
surfaceSecondary: {
|
|
52
88
|
fill: 'surfaceSecondary',
|
|
@@ -55,11 +91,11 @@ var choiceAppearanceSurface = {
|
|
|
55
91
|
fillItemHover: 'surfacePrimary',
|
|
56
92
|
labelTextActiveColor: 'surfaceTextPrimary',
|
|
57
93
|
labelTextColor: 'surfaceTextPrimary',
|
|
58
|
-
|
|
94
|
+
labelTextWrap: 'nowrap',
|
|
59
95
|
},
|
|
60
96
|
};
|
|
61
97
|
|
|
62
|
-
var choiceAppearance = tslib_es6.__assign(tslib_es6.__assign({}, choiceAppearanceAccent), choiceAppearanceSurface);
|
|
98
|
+
var choiceAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, choiceAppearanceAccent), choiceAppearanceStyle), choiceAppearanceSize), choiceAppearanceSurface);
|
|
63
99
|
|
|
64
100
|
var choiceConfig = {
|
|
65
101
|
appearance: choiceAppearance,
|
|
@@ -68,7 +104,7 @@ var choiceConfig = {
|
|
|
68
104
|
},
|
|
69
105
|
};
|
|
70
106
|
function Choice(props) {
|
|
71
|
-
var id = props.id, className = props.className,
|
|
107
|
+
var id = props.id, className = props.className, name = props.name, appearance = props.appearance, _a = props.isDisabled, isDisabled = _a === void 0 ? false : _a, _b = props.active, active = _b === void 0 ? { value: undefined } : _b, dataTestId = props.dataTestId, dataTour = props.dataTour, icon = props.icon, itemAfter = props.itemAfter, itemBefore = props.itemBefore, _c = props.options, options = _c === void 0 ? [] : _c, before = props.before, after = props.after, _d = props.isCheckbox, isCheckbox = _d === void 0 ? false : _d, _e = props.isLoading, isLoading = _e === void 0 ? false : _e, setActiveSegment = props.setActiveSegment;
|
|
72
108
|
var controlRef = React.useRef(null);
|
|
73
109
|
var optionsRefs = React.useMemo(function () {
|
|
74
110
|
return new Map(options.map(function (item) { return [item.value, React.createRef()]; }));
|
|
@@ -82,13 +118,13 @@ function Choice(props) {
|
|
|
82
118
|
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = choiceConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
83
119
|
}, {});
|
|
84
120
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
85
|
-
var fillClass = propsGenerator.fillClass, fillItemActiveClass = propsGenerator.fillItemActiveClass, fillItemActiveDisabledClass = propsGenerator.fillItemActiveDisabledClass, fillItemActiveHoverClass = propsGenerator.fillItemActiveHoverClass, fillItemClass = propsGenerator.fillItemClass, fillItemDisabledClass = propsGenerator.fillItemDisabledClass, fillItemHoverClass = propsGenerator.fillItemHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveColorDisabled = propsGenerator.labelTextActiveColorDisabled, labelTextColor = propsGenerator.labelTextColor, labelTextColorDisabled = propsGenerator.labelTextColorDisabled, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, iconFillDisabled = propsGenerator.iconFillDisabled,
|
|
121
|
+
var size = propsGenerator.size, fillClass = propsGenerator.fillClass, fillItemActiveClass = propsGenerator.fillItemActiveClass, fillItemActiveDisabledClass = propsGenerator.fillItemActiveDisabledClass, fillItemActiveHoverClass = propsGenerator.fillItemActiveHoverClass, fillItemClass = propsGenerator.fillItemClass, fillItemDisabledClass = propsGenerator.fillItemDisabledClass, fillItemHoverClass = propsGenerator.fillItemHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveColorDisabled = propsGenerator.labelTextActiveColorDisabled, labelTextColor = propsGenerator.labelTextColor, labelTextColorDisabled = propsGenerator.labelTextColorDisabled, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, iconAfterFillDisabled = propsGenerator.iconAfterFillDisabled, iconBeforeFillDisabled = propsGenerator.iconBeforeFillDisabled, iconFillDisabled = propsGenerator.iconFillDisabled, iconActive = propsGenerator.iconActive, iconAfter = propsGenerator.iconAfter, iconAfterActive = propsGenerator.iconAfterActive, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillActive = propsGenerator.iconAfterFillActive, iconAfterSize = propsGenerator.iconAfterSize, iconBefore = propsGenerator.iconBefore, iconBeforeActive = propsGenerator.iconBeforeActive, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillActive = propsGenerator.iconBeforeFillActive, iconBeforeSize = propsGenerator.iconBeforeSize, iconFill = propsGenerator.iconFill, iconFillActive = propsGenerator.iconFillActive, iconSize = propsGenerator.iconSize, shapeClass = propsGenerator.shapeClass, shapeItemClass = propsGenerator.shapeItemClass, wrapClass = propsGenerator.wrapClass;
|
|
86
122
|
var styles = useStyles.useStyles(props).styles;
|
|
87
|
-
return (jsxRuntime.jsxs("div", { id: id, className: clsx(className, 'choice',
|
|
123
|
+
return (jsxRuntime.jsxs("div", { id: id, className: clsx(className, 'choice', size && "choice_size_".concat(size), fillClass && "fill_".concat(fillClass), wrapClass && "choice_wrap_".concat(wrapClass)), "data-testid": dataTestId && "".concat(dataTestId, "Choice"), "data-tour": dataTour, ref: controlRef, style: styles, children: [before && jsxRuntime.jsx("div", { className: "choice__before", children: before }), isLoading ? (jsxRuntime.jsx(Loader.Loader, { width: "fill", height: "fill", fill: "surfacePrimary", itemFill: "surfaceItemAccent" })) : (jsxRuntime.jsx(React.Fragment, { children: options.map(function (item) {
|
|
88
124
|
var isActive = typeof active === 'object'
|
|
89
125
|
? String(item.value) === String(active.value)
|
|
90
126
|
: String(item.value) === String(active);
|
|
91
|
-
return (jsxRuntime.jsxs("div", { className: clsx('choice__item', !isDisabled
|
|
127
|
+
return (jsxRuntime.jsxs("div", { className: clsx('choice__item', size && "choice__item_size_".concat(size), shapeClass && "choice_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), !isDisabled
|
|
92
128
|
? fillItemClass && "fill_".concat(fillItemClass)
|
|
93
129
|
: fillItemDisabledClass &&
|
|
94
130
|
"fill_disabled_".concat(fillItemDisabledClass), !isDisabled
|
|
@@ -106,13 +142,13 @@ function Choice(props) {
|
|
|
106
142
|
: fillItemDisabledClass &&
|
|
107
143
|
"fill_disabled_".concat(fillItemDisabledClass), isActive &&
|
|
108
144
|
isDisabled &&
|
|
109
|
-
'choice__item_active_state_disabled', isActive && 'choice__item_active', shapeItemClass && "choice__item_shape_".concat(shapeItemClass)), ref: optionsRefs.get(item.value), children: [jsxRuntime.jsx("input", { id: "".concat(name, "-").concat(item.value), className: "choice__item-radio", type: isCheckbox ? 'checkbox' : 'radio', name: name, disabled: isDisabled, checked: isActive, value: item.value, onChange: function (event) { return onChange(event, item); } }), jsxRuntime.jsxs("label", { className: clsx('choice__item-label', isDisabled && 'choice__item-label_state_disabled'), htmlFor: "".concat(name, "-").concat(item.value), children: [itemBefore, item.label && (jsxRuntime.jsx(Text.Text, { size: labelTextSize, textColor: isActive
|
|
145
|
+
'choice__item_active_state_disabled', isActive && 'choice__item_active', shapeItemClass && "choice__item_shape_".concat(shapeItemClass)), ref: optionsRefs.get(item.value), children: [jsxRuntime.jsx("input", { id: "".concat(name, "-").concat(item.value), className: "choice__item-radio", type: isCheckbox ? 'checkbox' : 'radio', name: name, disabled: isDisabled, checked: isActive, value: item.value, onChange: function (event) { return onChange(event, item); } }), jsxRuntime.jsxs("label", { className: clsx('choice__item-label', isDisabled && 'choice__item-label_state_disabled'), htmlFor: "".concat(name, "-").concat(item.value), children: [itemBefore, (iconBefore || iconBeforeActive) && (jsxRuntime.jsx(Icon.Icon, { className: "choice__item-icon", iconFillDisabled: isDisabled ? iconBeforeFillDisabled : undefined, iconFill: isActive ? iconBeforeFillActive : iconBeforeFill, iconSize: iconBeforeSize, SvgImage: isActive ? iconBeforeActive : iconBefore })), item.label && (jsxRuntime.jsx(Text.Text, { size: labelTextSize, textColor: isActive
|
|
110
146
|
? !isDisabled
|
|
111
147
|
? labelTextActiveColor
|
|
112
148
|
: labelTextActiveColorDisabled
|
|
113
149
|
: !isDisabled
|
|
114
150
|
? labelTextColor
|
|
115
|
-
: labelTextColorDisabled, textWeight: labelTextWeight, children: item.label })), (icon ||
|
|
151
|
+
: labelTextColorDisabled, textWeight: labelTextWeight, textWrap: labelTextWrap, children: item.label })), (icon || iconActive) && (jsxRuntime.jsx(Icon.Icon, { className: "choice__item-icon", iconFillDisabled: isDisabled ? iconFillDisabled : undefined, iconFill: isActive ? iconFillActive : iconFill, iconSize: iconSize, SvgImage: isActive ? iconActive : icon })), (iconAfter || iconAfterActive) && (jsxRuntime.jsx(Icon.Icon, { className: "choice__item-icon", iconFillDisabled: isDisabled ? iconAfterFillDisabled : undefined, iconFill: isActive ? iconAfterFillActive : iconAfterFill, iconSize: iconAfterSize, SvgImage: isActive ? iconAfterActive : iconAfter })), itemAfter] })] }, "".concat(name, "-").concat(item.value)));
|
|
116
152
|
}) })), after && jsxRuntime.jsx("div", { className: "choice__after", children: after })] }));
|
|
117
153
|
}
|
|
118
154
|
|
|
@@ -5,10 +5,10 @@ var React = require('react');
|
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var Cookies = require('js-cookie');
|
|
7
7
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
|
-
var Button = require('../../
|
|
9
|
-
var Group = require('../../
|
|
10
|
-
var Text = require('../../
|
|
11
|
-
require('../../tslib.
|
|
8
|
+
var Button = require('../../Button_cjs_B7OmqizJ.js');
|
|
9
|
+
var Group = require('../../Group_cjs_DFmNT5Mq.js');
|
|
10
|
+
var Text = require('../../Text_cjs_D4xG0cKD.js');
|
|
11
|
+
require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
12
12
|
require('lodash/camelCase');
|
|
13
13
|
require('lodash/castArray');
|
|
14
14
|
require('lodash/upperFirst');
|
|
@@ -19,15 +19,15 @@ require('../context/UIContext.js');
|
|
|
19
19
|
require('../hooks/useMediaQueries/useMediaQueries.js');
|
|
20
20
|
require('react-responsive');
|
|
21
21
|
require('../utils/setViewportProperty.js');
|
|
22
|
-
require('../../
|
|
22
|
+
require('../../Icon_cjs_DSzfNqif.js');
|
|
23
23
|
require('react-inlinesvg');
|
|
24
24
|
require('../hooks/useStyles/useStyles.js');
|
|
25
25
|
require('lodash/maxBy');
|
|
26
26
|
require('../hooks/useStyles/styleAttributes.js');
|
|
27
|
-
require('../../
|
|
28
|
-
require('../../
|
|
29
|
-
require('../../
|
|
30
|
-
require('../../
|
|
27
|
+
require('../../Link_cjs_yht44xJv.js');
|
|
28
|
+
require('../../Tooltip_cjs_CTwksdFk.js');
|
|
29
|
+
require('../../Title_cjs_iuyln-ab.js');
|
|
30
|
+
require('../../Loader_cjs_D753D3li.js');
|
|
31
31
|
|
|
32
32
|
function CookiesWarning(props) {
|
|
33
33
|
var className = props.className, _a = props.message, message = _a === void 0 ? 'The site uses cookies to collect technical information, to optimize the design and improvement of the website, and to provide certain functions. By using the website, you agree to the use of «cookies».' : _a, textColor = props.textColor, textSize = props.textSize, buttonFill = props.buttonFill, buttonFillHover = props.buttonFillHover, _b = props.buttonLabel, buttonLabel = _b === void 0 ? 'I agree' : _b, buttonLabelSize = props.buttonLabelSize, buttonLabelTextColor = props.buttonLabelTextColor, buttonShape = props.buttonShape, buttonSize = props.buttonSize, buttonWidth = props.buttonWidth, _c = props.isHideOnScroll, isHideOnScroll = _c === void 0 ? false : _c;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('../../tslib.
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var clsx = require('clsx');
|
|
7
7
|
var reactDadata = require('react-dadata');
|
|
8
|
-
var Input = require('../../
|
|
8
|
+
var Input = require('../../Input_cjs_DkQh0Utd.js');
|
|
9
9
|
require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
10
10
|
require('lodash/camelCase');
|
|
11
11
|
require('lodash/castArray');
|
|
@@ -38,9 +38,9 @@ function DadataHintField(props) {
|
|
|
38
38
|
input.onBlur,
|
|
39
39
|
input.onChange,
|
|
40
40
|
]);
|
|
41
|
-
return (jsxRuntime.jsx(reactDadata.PartySuggestions, { minChars: 3, customInput:
|
|
41
|
+
return (jsxRuntime.jsx(reactDadata.PartySuggestions, { minChars: 3, customInput: DadataCustomInput, delay: delay || 750, inputProps: dadataInputProps, token: token, onChange: setValue }));
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function DadataCustomInput(props) {
|
|
44
44
|
var inputValue = props.inputValue, otherProps = tslib_es6.__rest(props, ["inputValue"]);
|
|
45
45
|
return jsxRuntime.jsx(Input.Input, tslib_es6.__assign({}, otherProps, { value: inputValue }));
|
|
46
46
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('../../tslib.
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var clsx = require('clsx');
|
|
@@ -8,11 +8,11 @@ var locale = require('date-fns/locale');
|
|
|
8
8
|
var DatePicker = require('react-datepicker');
|
|
9
9
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
10
10
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
11
|
-
var Button = require('../../
|
|
12
|
-
var Icon = require('../../
|
|
13
|
-
var Input = require('../../
|
|
14
|
-
var Label = require('../../
|
|
15
|
-
var Text = require('../../
|
|
11
|
+
var Button = require('../../Button_cjs_B7OmqizJ.js');
|
|
12
|
+
var Icon = require('../../Icon_cjs_DSzfNqif.js');
|
|
13
|
+
var Input = require('../../Input_cjs_DkQh0Utd.js');
|
|
14
|
+
var Label = require('../../Label_cjs_BCjB-mxC.js');
|
|
15
|
+
var Text = require('../../Text_cjs_D4xG0cKD.js');
|
|
16
16
|
require('lodash/camelCase');
|
|
17
17
|
require('lodash/castArray');
|
|
18
18
|
require('lodash/upperFirst');
|
|
@@ -25,45 +25,118 @@ require('react-responsive');
|
|
|
25
25
|
require('../utils/setViewportProperty.js');
|
|
26
26
|
require('lodash/maxBy');
|
|
27
27
|
require('../hooks/useStyles/styleAttributes.js');
|
|
28
|
-
require('../../
|
|
29
|
-
require('../../
|
|
28
|
+
require('../../Link_cjs_yht44xJv.js');
|
|
29
|
+
require('../../Loader_cjs_D753D3li.js');
|
|
30
30
|
require('react-inlinesvg');
|
|
31
|
-
require('../../
|
|
32
|
-
require('../../
|
|
31
|
+
require('../../Tooltip_cjs_CTwksdFk.js');
|
|
32
|
+
require('../../Title_cjs_iuyln-ab.js');
|
|
33
|
+
|
|
34
|
+
// import { icon14, icon16 } from '@itcase/icons/default'
|
|
35
|
+
var datePickerSize = {
|
|
36
|
+
sizeS: {
|
|
37
|
+
datePickerProps: {
|
|
38
|
+
daySize: 'xs',
|
|
39
|
+
dayTextSize: 'm',
|
|
40
|
+
iconFillSize: 24,
|
|
41
|
+
// iconLeft: icon14.ChevronLeft,
|
|
42
|
+
// iconRight: icon14.ChevronRight,
|
|
43
|
+
},
|
|
44
|
+
inputProps: {
|
|
45
|
+
size: 's',
|
|
46
|
+
textSize: 's',
|
|
47
|
+
// clearIcon: icon14.Clear,
|
|
48
|
+
clearIconSize: 16,
|
|
49
|
+
clearLabelTextSize: 'm',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
sizeM: {
|
|
53
|
+
datePickerProps: {
|
|
54
|
+
daySize: 'xs',
|
|
55
|
+
dayTextSize: 'm',
|
|
56
|
+
iconFillSize: 24,
|
|
57
|
+
// iconLeft: icon14.ChevronLeft,
|
|
58
|
+
// iconRight: icon14.ChevronRight,
|
|
59
|
+
},
|
|
60
|
+
inputProps: {
|
|
61
|
+
size: 'm',
|
|
62
|
+
textSize: 'm',
|
|
63
|
+
// clearIcon: icon14.Clear,
|
|
64
|
+
clearIconSize: 16,
|
|
65
|
+
clearLabelTextSize: 'm',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
sizeL: {
|
|
69
|
+
datePickerProps: {
|
|
70
|
+
daySize: 'xs',
|
|
71
|
+
dayTextSize: 'm',
|
|
72
|
+
iconFillSize: 24,
|
|
73
|
+
// iconLeft: icon14.ChevronLeft,
|
|
74
|
+
// iconRight: icon14.ChevronRight,
|
|
75
|
+
},
|
|
76
|
+
inputProps: {
|
|
77
|
+
size: 'l',
|
|
78
|
+
textSize: 'l',
|
|
79
|
+
// clearIcon: icon14.Clear,
|
|
80
|
+
clearIconSize: 16,
|
|
81
|
+
clearLabelTextSize: 'm',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
var datePickerStyle = {
|
|
87
|
+
solid: {
|
|
88
|
+
datePickerProps: {},
|
|
89
|
+
inputProps: {
|
|
90
|
+
borderWidth: '0',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
outlined: {
|
|
94
|
+
datePickerProps: {},
|
|
95
|
+
inputProps: {
|
|
96
|
+
fill: 'none',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
ghost: {
|
|
100
|
+
datePickerProps: {},
|
|
101
|
+
inputProps: {
|
|
102
|
+
fill: 'none',
|
|
103
|
+
borderWidth: '0',
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
full: {
|
|
107
|
+
datePickerProps: {},
|
|
108
|
+
inputProps: {},
|
|
109
|
+
},
|
|
110
|
+
};
|
|
33
111
|
|
|
34
112
|
var datePickerAppearanceSurface = {
|
|
35
113
|
surfacePrimary: {
|
|
36
|
-
|
|
114
|
+
datePickerProps: {
|
|
37
115
|
daySize: 'xs',
|
|
38
116
|
dayTextColor: 'surfaceTextPrimary',
|
|
39
117
|
dayTextShape: 'rounded',
|
|
40
118
|
dayTextSize: 'm',
|
|
119
|
+
iconFillHover: 'surfaceSecondary',
|
|
41
120
|
iconItemFill: 'surfaceItemPrimary',
|
|
42
|
-
|
|
43
|
-
monthTextSize: 'xl',
|
|
44
|
-
monthTextWeight: '400',
|
|
45
|
-
yearTextColor: 'surfaceTextPrimary',
|
|
46
|
-
yearTextSize: 'xl',
|
|
47
|
-
yearTextWeight: '400',
|
|
121
|
+
iconShape: 'circular',
|
|
48
122
|
},
|
|
49
|
-
|
|
50
|
-
width: '200',
|
|
123
|
+
inputProps: {
|
|
51
124
|
width: 'fill',
|
|
52
|
-
size: 'm',
|
|
53
125
|
fill: 'surfacePrimary',
|
|
54
126
|
fillHover: 'surfacePrimary',
|
|
55
|
-
borderColor: '
|
|
127
|
+
borderColor: 'surfaceBorderPrimary',
|
|
56
128
|
textColor: 'surfaceTextPrimary',
|
|
57
|
-
textSize: 'm',
|
|
58
129
|
caret: 'surfaceItemPrimary',
|
|
59
|
-
|
|
130
|
+
clearIconItemFill: 'surfaceItemQuaternary',
|
|
131
|
+
clearIconItemFillHover: 'surfaceItemPrimary',
|
|
132
|
+
clearLabelTextColor: 'surfaceTextPrimary',
|
|
133
|
+
clearLabelTextColorHover: 'surfaceTextAccent',
|
|
60
134
|
placeholderTextColor: 'surfaceTextSecondary',
|
|
61
|
-
shape: 'rounded',
|
|
62
135
|
},
|
|
63
136
|
},
|
|
64
137
|
};
|
|
65
138
|
|
|
66
|
-
var datePickerAppearance = tslib_es6.__assign({}, datePickerAppearanceSurface);
|
|
139
|
+
var datePickerAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, datePickerAppearanceSurface), datePickerSize), datePickerStyle);
|
|
67
140
|
|
|
68
141
|
var datePickerConfig = {
|
|
69
142
|
appearance: datePickerAppearance,
|
|
@@ -72,8 +145,14 @@ var datePickerConfig = {
|
|
|
72
145
|
},
|
|
73
146
|
};
|
|
74
147
|
function DatePickerInput(props) {
|
|
75
|
-
var className = props.className, appearance = props.appearance,
|
|
148
|
+
var className = props.className, appearance = props.appearance, endValue = props.endValue, _a = props.inputProps, inputProps = _a === void 0 ? {} : _a, value = props.value, onChange = props.onChange;
|
|
76
149
|
var datepickerRef = React.useRef(null);
|
|
150
|
+
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
151
|
+
var _a;
|
|
152
|
+
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = datePickerConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
153
|
+
}, {});
|
|
154
|
+
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
155
|
+
var _b = propsGenerator.datePickerProps, datePickerProps = _b === void 0 ? {} : _b, widthClass = propsGenerator.widthClass;
|
|
77
156
|
var start = React.useMemo(function () {
|
|
78
157
|
if (value) {
|
|
79
158
|
if (typeof value === 'string') {
|
|
@@ -95,8 +174,8 @@ function DatePickerInput(props) {
|
|
|
95
174
|
}
|
|
96
175
|
return endValue;
|
|
97
176
|
}, [endValue]);
|
|
98
|
-
var
|
|
99
|
-
var
|
|
177
|
+
var _c = React.useState(start), startDate = _c[0], setStartDate = _c[1];
|
|
178
|
+
var _d = React.useState(end), endDate = _d[0], setEndDate = _d[1];
|
|
100
179
|
var handleChange = React.useCallback(function (_a) {
|
|
101
180
|
var newStartDate = _a[0], newEndDate = _a[1];
|
|
102
181
|
onChange && onChange(newStartDate, newEndDate);
|
|
@@ -113,7 +192,7 @@ function DatePickerInput(props) {
|
|
|
113
192
|
]);
|
|
114
193
|
var renderCustomHeader = React.useCallback(function (_a) {
|
|
115
194
|
var decreaseMonth = _a.decreaseMonth, increaseMonth = _a.increaseMonth, monthDate = _a.monthDate;
|
|
116
|
-
return (jsxRuntime.jsxs("div", { className: "react-datepicker__header--div", children: [datePickerProps.iconLeft && (jsxRuntime.jsx(Icon.Icon, { className: "react-datepicker__icon",
|
|
195
|
+
return (jsxRuntime.jsxs("div", { className: "react-datepicker__header--div", children: [datePickerProps.iconLeft && (jsxRuntime.jsx(Icon.Icon, { className: "react-datepicker__icon", fill: datePickerProps.iconFill, fillHover: datePickerProps.iconFillHover, fillSize: datePickerProps.iconFillSize, iconFill: datePickerProps.iconItemFill, shape: datePickerProps.iconShape, SvgImage: datePickerProps.iconLeft, onClick: decreaseMonth })), jsxRuntime.jsxs("div", { className: "react-datepicker__data", children: [jsxRuntime.jsx(Text.Text, { className: "react-datepicker__month", size: datePickerProps.monthTextSize, textColor: datePickerProps.monthTextColor, textWeight: datePickerProps.monthTextWeight, children: monthDate.toLocaleString('ru-RU', { month: 'long' }) }), jsxRuntime.jsx(Text.Text, { className: "react-datepicker__year", size: datePickerProps.yearTextSize, textColor: datePickerProps.yearTextColor, textWeight: datePickerProps.yearTextWeight, children: monthDate.toLocaleString('ru-RU', { year: 'numeric' }) })] }), datePickerProps.iconRight && (jsxRuntime.jsx(Icon.Icon, { className: "react-datepicker__icon", fill: datePickerProps.iconFill, fillHover: datePickerProps.iconFillHover, fillSize: datePickerProps.iconFillSize, iconFill: datePickerProps.iconItemFill, shape: datePickerProps.iconShape, SvgImage: datePickerProps.iconRight, onClick: increaseMonth }))] }));
|
|
117
196
|
}, [
|
|
118
197
|
datePickerProps.iconFill,
|
|
119
198
|
datePickerProps.iconFillHover,
|
|
@@ -122,7 +201,6 @@ function DatePickerInput(props) {
|
|
|
122
201
|
datePickerProps.iconLeft,
|
|
123
202
|
datePickerProps.iconRight,
|
|
124
203
|
datePickerProps.iconShape,
|
|
125
|
-
datePickerProps.iconSize,
|
|
126
204
|
datePickerProps.monthTextColor,
|
|
127
205
|
datePickerProps.monthTextSize,
|
|
128
206
|
datePickerProps.monthTextWeight,
|
|
@@ -136,22 +214,15 @@ function DatePickerInput(props) {
|
|
|
136
214
|
React.useEffect(function () {
|
|
137
215
|
setEndDate(end);
|
|
138
216
|
}, [end]);
|
|
139
|
-
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
140
|
-
var _a;
|
|
141
|
-
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = datePickerConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
142
|
-
}, {});
|
|
143
|
-
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
144
|
-
var widthClass = propsGenerator.widthClass;
|
|
145
|
-
// @ts-expect-error
|
|
146
217
|
var datePickerStyles = useStyles.useStyles(props).styles;
|
|
147
|
-
|
|
218
|
+
console.log(inputProps);
|
|
219
|
+
return (jsxRuntime.jsx("div", { className: clsx(className, 'datepicker', (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.monthsShown) && 'datepicker_multiple-months', (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.customTimeInput) && 'datepicker_button', widthClass && "datepicker_width_".concat(widthClass)), style: datePickerStyles, children: jsxRuntime.jsx(DatePicker, tslib_es6.__assign({ minDate: (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.disablePastDays) ? new Date() : undefined, customInput: jsxRuntime.jsx(DatePickerCustomInput, { datepickerRef: datepickerRef, inputProps: inputProps, isClearable: datePickerProps.isClearable }), endDate: (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.selectsRange) ? endDate : undefined, locale: locale.ru, popperClassName: (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.popper) &&
|
|
148
220
|
"react-datepicker-popper-".concat(datePickerProps.popper), ref: datepickerRef, renderCustomHeader: renderCustomHeader, renderDayContents: renderDayContents, selected: startDate, startDate: startDate, onChange: (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.selectsRange) ? handleChange : onChange }, datePickerProps, {
|
|
149
221
|
// Important for use custom clear button
|
|
150
222
|
isClearable: false })) }));
|
|
151
223
|
}
|
|
152
224
|
var DatePickerCustomInput = React.forwardRef(function (props, ref) {
|
|
153
|
-
var
|
|
154
|
-
var datePickerAppearance = props.datePickerAppearance, inputIcon = props.inputIcon, inputProps = props.inputProps, value = props.value, isClearable = props.isClearable;
|
|
225
|
+
var inputIcon = props.inputIcon, inputProps = props.inputProps, value = props.value, isClearable = props.isClearable;
|
|
155
226
|
var multipleValue = React.useMemo(function () {
|
|
156
227
|
if (value) {
|
|
157
228
|
var twoDates = value.split(' - ');
|
|
@@ -159,10 +230,8 @@ var DatePickerCustomInput = React.forwardRef(function (props, ref) {
|
|
|
159
230
|
}
|
|
160
231
|
return '';
|
|
161
232
|
}, [value]);
|
|
162
|
-
|
|
163
|
-
return (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx(Input.Input, tslib_es6.__assign({}, inputAppearanceProps, props, inputProps, { className: "datepicker__input", autocomplete: "off", ref: ref, value: multipleValue })), inputIcon && jsxRuntime.jsx(DatePickerInputIcon, tslib_es6.__assign({}, props)), isClearable && jsxRuntime.jsx(DatePickerClearButton, tslib_es6.__assign({}, props))] }));
|
|
233
|
+
return (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx(Input.Input, tslib_es6.__assign({}, props, inputProps, { className: "datepicker__input", autocomplete: "off", ref: ref, value: multipleValue })), inputIcon && jsxRuntime.jsx(DatePickerInputIcon, tslib_es6.__assign({}, inputProps)), isClearable && jsxRuntime.jsx(DatePickerClearButton, tslib_es6.__assign({}, inputProps))] }));
|
|
164
234
|
});
|
|
165
|
-
DatePickerCustomInput.displayName = 'DatePickerCustomInput';
|
|
166
235
|
function DatePickerClearButton(props) {
|
|
167
236
|
var clearIcon = props.clearIcon, clearIconFill = props.clearIconFill, clearIconFillHover = props.clearIconFillHover, clearIconFillSize = props.clearIconFillSize, clearIconItemFill = props.clearIconItemFill, clearIconItemFillHover = props.clearIconItemFillHover, clearIconShape = props.clearIconShape, clearIconSize = props.clearIconSize, clearIconSrc = props.clearIconSrc, clearLabel = props.clearLabel, clearLabelTextColor = props.clearLabelTextColor, clearLabelTextColorHover = props.clearLabelTextColorHover, clearLabelTextSize = props.clearLabelTextSize, datepickerRef = props.datepickerRef;
|
|
168
237
|
var onClick = React.useCallback(function (event) {
|
|
@@ -170,14 +239,12 @@ function DatePickerClearButton(props) {
|
|
|
170
239
|
(_a = datepickerRef === null || datepickerRef === void 0 ? void 0 : datepickerRef.current) === null || _a === void 0 ? void 0 : _a.onClearClick(event);
|
|
171
240
|
(_b = datepickerRef === null || datepickerRef === void 0 ? void 0 : datepickerRef.current) === null || _b === void 0 ? void 0 : _b.handleFocus(event);
|
|
172
241
|
}, []);
|
|
173
|
-
return (jsxRuntime.
|
|
242
|
+
return (jsxRuntime.jsx(React.Fragment, { children: clearLabel ? (jsxRuntime.jsx(Label.Label, { className: clsx('react-datepicker__clear-label', 'cursor_type_pointer'), label: clearLabel, labelTextColor: clearLabelTextColor, labelTextColorHover: clearLabelTextColorHover, labelTextSize: clearLabelTextSize, onClick: onClick })) : ((clearIcon || clearIconSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('react-datepicker__clear-icon', 'cursor_type_pointer'), size: clearIconSize, fill: clearIconFill, fillHover: clearIconFillHover, fillSize: clearIconFillSize, iconFill: clearIconItemFill, iconFillHover: clearIconItemFillHover, imageSrc: clearIconSrc, shape: clearIconShape, SvgImage: clearIcon, onClick: onClick }))) }));
|
|
174
243
|
}
|
|
175
|
-
DatePickerClearButton.displayName = 'DatePickerClearButton';
|
|
176
244
|
function DatePickerInputIcon(props) {
|
|
177
245
|
var inputIcon = props.inputIcon, inputIconFill = props.inputIconFill, inputIconFillHover = props.inputIconFillHover, inputIconFillSize = props.inputIconFillSize, inputIconItemFill = props.inputIconItemFill, inputIconShape = props.inputIconShape, inputIconSize = props.inputIconSize, inputIconSrc = props.inputIconSrc, onClick = props.onClick;
|
|
178
246
|
return (jsxRuntime.jsx(Icon.Icon, { className: clsx('react-datepicker__input-icon', 'cursor_type_pointer'), size: inputIconSize, fill: inputIconFill, fillHover: inputIconFillHover, fillSize: inputIconFillSize, iconFill: inputIconItemFill, imageSrc: inputIconSrc, shape: inputIconShape, SvgImage: inputIcon, onClick: function () { return onClick && onClick(); } }));
|
|
179
247
|
}
|
|
180
|
-
DatePickerInputIcon.displayName = 'DatePickerInputIcon';
|
|
181
248
|
|
|
182
249
|
exports.DatePickerInput = DatePickerInput;
|
|
183
250
|
exports.datePickerAppearance = datePickerAppearance;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var Divider = require('../../
|
|
4
|
-
require('../../tslib.
|
|
3
|
+
var Divider = require('../../Divider_cjs_DakITdTv.js');
|
|
4
|
+
require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
5
5
|
require('react/jsx-runtime');
|
|
6
6
|
require('clsx');
|
|
7
7
|
require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
@@ -4,7 +4,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
4
4
|
var clsx = require('clsx');
|
|
5
5
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
6
6
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
7
|
-
require('../../tslib.
|
|
7
|
+
require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
8
8
|
require('react');
|
|
9
9
|
require('lodash/camelCase');
|
|
10
10
|
require('lodash/castArray');
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var DropdownItem = require('../../
|
|
3
|
+
var DropdownItem = require('../../DropdownItem_cjs_TdJHpFgg.js');
|
|
4
4
|
require('react/jsx-runtime');
|
|
5
5
|
require('react');
|
|
6
6
|
require('clsx');
|
|
7
7
|
require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
|
-
require('../../tslib.
|
|
8
|
+
require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
9
9
|
require('lodash/camelCase');
|
|
10
10
|
require('lodash/castArray');
|
|
11
11
|
require('lodash/upperFirst');
|
|
@@ -19,8 +19,8 @@ require('../utils/setViewportProperty.js');
|
|
|
19
19
|
require('../hooks/useStyles/useStyles.js');
|
|
20
20
|
require('lodash/maxBy');
|
|
21
21
|
require('../hooks/useStyles/styleAttributes.js');
|
|
22
|
-
require('../../
|
|
23
|
-
require('../../
|
|
22
|
+
require('../../Divider_cjs_DakITdTv.js');
|
|
23
|
+
require('../../Text_cjs_D4xG0cKD.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
@@ -4,7 +4,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
4
4
|
var clsx = require('clsx');
|
|
5
5
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
6
6
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
7
|
-
require('../../tslib.
|
|
7
|
+
require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
8
8
|
require('react');
|
|
9
9
|
require('lodash/camelCase');
|
|
10
10
|
require('lodash/castArray');
|
|
@@ -4,7 +4,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
4
4
|
var clsx = require('clsx');
|
|
5
5
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
6
6
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
7
|
-
require('../../tslib.
|
|
7
|
+
require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
8
8
|
require('react');
|
|
9
9
|
require('lodash/camelCase');
|
|
10
10
|
require('lodash/castArray');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var Group = require('../../
|
|
4
|
-
require('../../tslib.
|
|
3
|
+
var Group = require('../../Group_cjs_DFmNT5Mq.js');
|
|
4
|
+
require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
5
5
|
require('react/jsx-runtime');
|
|
6
6
|
require('react');
|
|
7
7
|
require('clsx');
|
|
@@ -4,7 +4,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
4
4
|
var clsx = require('clsx');
|
|
5
5
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
6
6
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
7
|
-
require('../../tslib.
|
|
7
|
+
require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
8
8
|
require('react');
|
|
9
9
|
require('lodash/camelCase');
|
|
10
10
|
require('lodash/castArray');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var Icon = require('../../
|
|
4
|
-
require('../../tslib.
|
|
3
|
+
var Icon = require('../../Icon_cjs_DSzfNqif.js');
|
|
4
|
+
require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
5
5
|
require('react/jsx-runtime');
|
|
6
6
|
require('react');
|
|
7
7
|
require('clsx');
|
|
@@ -20,10 +20,10 @@ require('../utils/setViewportProperty.js');
|
|
|
20
20
|
require('../hooks/useStyles/useStyles.js');
|
|
21
21
|
require('lodash/maxBy');
|
|
22
22
|
require('../hooks/useStyles/styleAttributes.js');
|
|
23
|
-
require('../../
|
|
24
|
-
require('../../
|
|
25
|
-
require('../../
|
|
26
|
-
require('../../
|
|
23
|
+
require('../../Link_cjs_yht44xJv.js');
|
|
24
|
+
require('../../Tooltip_cjs_CTwksdFk.js');
|
|
25
|
+
require('../../Text_cjs_D4xG0cKD.js');
|
|
26
|
+
require('../../Title_cjs_iuyln-ab.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|