@itcase/ui 1.8.0 → 1.8.3
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-DJxd2_t4.js → Button_cjs_B7OmqizJ.js} +26 -25
- package/dist/{Button-K5n8BI_w.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-CdAS1E-G.js → DropdownItem_cjs_TdJHpFgg.js} +7 -7
- package/dist/{DropdownItem-f29l8dds.js → DropdownItem_es_CdYP5BQN.js} +7 -7
- 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-C_HeI9UK.js → Input_cjs_DkQh0Utd.js} +3 -3
- package/dist/{Input-v52BiIsb.js → Input_es_Bs0gEq3L.js} +3 -3
- 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-CZVsMYl6.js → Loader_cjs_D753D3li.js} +3 -3
- package/dist/{Loader-BnhUh-g6.js → Loader_es_BE4nyzXi.js} +3 -3
- 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 +9 -9
- package/dist/cjs/components/Choice.js +99 -53
- 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 +119 -47
- 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 +6 -6
- 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 +26 -54
- 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 +5 -3
- 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 +9 -9
- package/dist/components/Choice.js +100 -54
- 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 +119 -47
- 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 +6 -6
- 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 +27 -55
- 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 +5 -3
- 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 +72 -47
- package/dist/css/components/Choice/css/__item/choice__item.css +8 -16
- package/dist/css/components/Choice/css/__item/choice__item_shape.css +11 -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.token.css +2 -0
- package/dist/css/components/DatePicker/DatePicker.css +113 -28
- 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 +34 -28
- package/dist/css/components/Grid/Grid.css +62 -11
- package/dist/css/components/Grid/css/__item/grid__item_column.css +13 -1
- package/dist/css/components/Grid/css/__item/grid__item_justify-self.css +4 -1
- package/dist/css/components/Grid/css/__item/grid__item_row.css +2 -1
- package/dist/css/components/Group/Group.css +1 -1
- package/dist/css/components/Icon/Icon.css +6 -0
- package/dist/css/components/Input/Input.css +7 -6
- 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 +6 -0
- package/dist/css/components/Pagination/Pagination.css +16 -12
- package/dist/css/components/Pagination/css/__item/pagination__item.css +4 -5
- 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/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 +2 -0
- 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 +7 -0
- 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 +18 -15
- package/dist/css/styles/fill/fill_active_hover.css +54 -8
- package/dist/css/styles/fill/fill_hover.css +46 -19
- 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 +10 -0
- 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 +25 -0
- package/dist/types/components/DadataHintField/DadataHintField.interface.d.ts +4 -2
- package/dist/types/components/DatePicker/DatePicker.appearance.d.ts +97 -2
- package/dist/types/components/DatePicker/appearance/datePickerSize.d.ts +51 -0
- package/dist/types/components/DatePicker/appearance/datePickerStyle.d.ts +26 -0
- package/dist/types/components/DatePicker/appearance/datePickerSurface.d.ts +27 -0
- 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 +37 -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 +4 -3
- package/dist/types/context/UIContext.d.ts +1 -1
- package/package.json +25 -25
- 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
package/dist/components/Chips.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { _ as __assign } from '../tslib.
|
|
1
|
+
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
6
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
7
|
-
import { I as Icon } from '../
|
|
8
|
-
import { T as Text } from '../
|
|
7
|
+
import { I as Icon } from '../Icon_es_BBmoZ7_3.js';
|
|
8
|
+
import { T as Text } from '../Text_es_FJGduy7Z.js';
|
|
9
9
|
import 'lodash/camelCase';
|
|
10
10
|
import 'lodash/castArray';
|
|
11
11
|
import 'lodash/upperFirst';
|
|
@@ -19,9 +19,9 @@ import '../utils/setViewportProperty.js';
|
|
|
19
19
|
import 'lodash/maxBy';
|
|
20
20
|
import '../hooks/useStyles/styleAttributes.js';
|
|
21
21
|
import 'react-inlinesvg';
|
|
22
|
-
import '../
|
|
23
|
-
import '../
|
|
24
|
-
import '../
|
|
22
|
+
import '../Link_es_DkW06IM-.js';
|
|
23
|
+
import '../Tooltip_es_H976MIb7.js';
|
|
24
|
+
import '../Title_es_ke3YylFm.js';
|
|
25
25
|
|
|
26
26
|
var chipsAppearanceAccent = {
|
|
27
27
|
accent: {
|
|
@@ -129,9 +129,9 @@ function Chips(props) {
|
|
|
129
129
|
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveHoverColor = propsGenerator.labelTextActiveHoverColor, labelTextColor = propsGenerator.labelTextColor, labelTextHoverColor = propsGenerator.labelTextHoverColor, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, cursorClass = propsGenerator.cursorClass, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass;
|
|
130
130
|
// @ts-expect-error
|
|
131
131
|
var chipsStyles = useStyles(props).styles;
|
|
132
|
-
return (jsx("div", { className: clsx(className, 'chips', isActive && 'chips_state_active',
|
|
133
|
-
? "fill_".concat(fillClass)
|
|
134
|
-
: "fill_active_".concat(fillActiveClass), !isActive
|
|
132
|
+
return (jsx("div", { className: clsx(className, 'chips', isActive && 'chips_state_active', !isActive
|
|
133
|
+
? fillClass && "fill_".concat(fillClass)
|
|
134
|
+
: fillActiveClass && "fill_active_".concat(fillActiveClass), !isActive
|
|
135
135
|
? fillHoverClass && "fill_hover_".concat(fillHoverClass)
|
|
136
136
|
: fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "chips_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "chips_size_".concat(sizeClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), isDisabled && "chips_state_disabled", cursorClass && "cursor_".concat(cursorClass), onClick && 'cursor_type_pointer'), "data-testid": dataTestId && "".concat(dataTestId, "Chips"), "data-tour": dataTour, style: chipsStyles, onClick: !isDisabled ? onClick : undefined, children: jsxs("div", { className: "chips__inner", children: [(iconBefore || iconBeforeSrc) && (jsx(Icon, { className: "chips__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), typeof label === 'string' ? (jsx(Text, { className: "chips__label", size: labelTextSize, textColor: labelTextColor, textColor: labelTextColor, textColorActive: isActive && labelTextActiveColor, textColorHover: !isDisabled && !isActive
|
|
137
137
|
? labelTextHoverColor
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { _ as __assign } from '../tslib.
|
|
2
|
-
import {
|
|
1
|
+
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React, { useRef, useMemo, createRef, useCallback } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
6
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
7
|
-
import { I as Icon } from '../
|
|
8
|
-
import { L as Loader } from '../
|
|
9
|
-
import { T as Text } from '../
|
|
7
|
+
import { I as Icon } from '../Icon_es_BBmoZ7_3.js';
|
|
8
|
+
import { L as Loader } from '../Loader_es_BE4nyzXi.js';
|
|
9
|
+
import { T as Text } from '../Text_es_FJGduy7Z.js';
|
|
10
10
|
import 'lodash/camelCase';
|
|
11
11
|
import 'lodash/castArray';
|
|
12
12
|
import 'lodash/upperFirst';
|
|
@@ -20,34 +20,81 @@ import '../utils/setViewportProperty.js';
|
|
|
20
20
|
import 'lodash/maxBy';
|
|
21
21
|
import '../hooks/useStyles/styleAttributes.js';
|
|
22
22
|
import 'react-inlinesvg';
|
|
23
|
-
import '../
|
|
24
|
-
import '../
|
|
25
|
-
import '../
|
|
23
|
+
import '../Link_es_DkW06IM-.js';
|
|
24
|
+
import '../Tooltip_es_H976MIb7.js';
|
|
25
|
+
import '../Title_es_ke3YylFm.js';
|
|
26
26
|
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
size: 'normal',
|
|
27
|
+
var choiceAppearanceAccent = {
|
|
28
|
+
accentPrimary: {
|
|
30
29
|
fill: 'surfacePrimary',
|
|
31
|
-
|
|
30
|
+
fillItemActive: 'accentPrimary',
|
|
32
31
|
labelTextActiveColor: 'accentTextPrimary',
|
|
33
32
|
labelTextColor: 'surfaceTextPrimary',
|
|
33
|
+
borderColor: 'surfaceBorderSecondary',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var choiceAppearanceSize = {
|
|
38
|
+
sizeL: {
|
|
39
|
+
size: 'l',
|
|
40
|
+
labelTextSize: 'm',
|
|
41
|
+
iconSize: '24',
|
|
42
|
+
},
|
|
43
|
+
sizeM: {
|
|
44
|
+
size: 'm',
|
|
45
|
+
labelTextSize: 'm',
|
|
46
|
+
iconSize: '24',
|
|
47
|
+
},
|
|
48
|
+
sizeS: {
|
|
49
|
+
size: 's',
|
|
34
50
|
labelTextSize: 's',
|
|
51
|
+
iconSize: '20',
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
var choiceAppearanceStyle = {
|
|
56
|
+
full: {
|
|
57
|
+
/* border / fill */
|
|
58
|
+
},
|
|
59
|
+
ghost: {
|
|
60
|
+
fill: 'none',
|
|
61
|
+
borderWidth: '0',
|
|
62
|
+
},
|
|
63
|
+
outlined: {
|
|
64
|
+
fill: 'none',
|
|
65
|
+
},
|
|
66
|
+
solid: {
|
|
67
|
+
borderWidth: '0',
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
var choiceAppearanceSurface = {
|
|
72
|
+
surfacePrimary: {
|
|
73
|
+
fill: 'accentPrimary',
|
|
74
|
+
fillItem: 'surfaceItemInverse',
|
|
75
|
+
fillItemActive: 'surfaceItemSecondary',
|
|
76
|
+
fillItemActiveHover: 'surfaceItemTertiary',
|
|
77
|
+
fillItemHover: 'surfaceItemSecondary',
|
|
78
|
+
labelTextActiveColor: 'surfaceTextPrimary',
|
|
79
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
80
|
+
labelTextWrap: 'nowrap',
|
|
35
81
|
borderColor: 'surfaceBorderSecondary',
|
|
36
|
-
|
|
82
|
+
iconBeforeFill: 'surfaceItemPrimary',
|
|
83
|
+
iconBeforeFillActive: 'surfaceItemPrimary',
|
|
37
84
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
85
|
+
surfaceSecondary: {
|
|
86
|
+
fill: 'surfaceSecondary',
|
|
87
|
+
fillItem: 'surfacePrimary',
|
|
88
|
+
fillItemActive: 'surfacePrimary',
|
|
89
|
+
fillItemHover: 'surfacePrimary',
|
|
43
90
|
labelTextActiveColor: 'surfaceTextPrimary',
|
|
44
91
|
labelTextColor: 'surfaceTextPrimary',
|
|
45
|
-
|
|
46
|
-
borderColor: 'surfaceBorderTertiary',
|
|
47
|
-
shape: 'rounded',
|
|
92
|
+
labelTextWrap: 'nowrap',
|
|
48
93
|
},
|
|
49
94
|
};
|
|
50
95
|
|
|
96
|
+
var choiceAppearance = __assign(__assign(__assign(__assign({}, choiceAppearanceAccent), choiceAppearanceStyle), choiceAppearanceSize), choiceAppearanceSurface);
|
|
97
|
+
|
|
51
98
|
var choiceConfig = {
|
|
52
99
|
appearance: choiceAppearance,
|
|
53
100
|
setAppearance: function (appearanceConfig) {
|
|
@@ -55,7 +102,7 @@ var choiceConfig = {
|
|
|
55
102
|
},
|
|
56
103
|
};
|
|
57
104
|
function Choice(props) {
|
|
58
|
-
var id = props.id, className = props.className,
|
|
105
|
+
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;
|
|
59
106
|
var controlRef = useRef(null);
|
|
60
107
|
var optionsRefs = useMemo(function () {
|
|
61
108
|
return new Map(options.map(function (item) { return [item.value, createRef()]; }));
|
|
@@ -69,39 +116,38 @@ function Choice(props) {
|
|
|
69
116
|
return (__assign(__assign({}, resultConfig), (_a = choiceConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
70
117
|
}, {});
|
|
71
118
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
72
|
-
var
|
|
73
|
-
// @ts-expect-error
|
|
119
|
+
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;
|
|
74
120
|
var styles = useStyles(props).styles;
|
|
75
|
-
return (
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
121
|
+
return (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 && jsx("div", { className: "choice__before", children: before }), isLoading ? (jsx(Loader, { width: "fill", height: "fill", fill: "surfacePrimary", itemFill: "surfaceItemAccent" })) : (jsx(React.Fragment, { children: options.map(function (item) {
|
|
122
|
+
var isActive = typeof active === 'object'
|
|
123
|
+
? String(item.value) === String(active.value)
|
|
124
|
+
: String(item.value) === String(active);
|
|
125
|
+
return (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
|
|
126
|
+
? fillItemClass && "fill_".concat(fillItemClass)
|
|
127
|
+
: fillItemDisabledClass &&
|
|
128
|
+
"fill_disabled_".concat(fillItemDisabledClass), !isDisabled
|
|
129
|
+
? fillItemHoverClass && "fill_hover_".concat(fillItemHoverClass)
|
|
130
|
+
: null, !isActive && isDisabled && 'choice__item_state_disabled', isActive &&
|
|
131
|
+
fillItemActiveHoverClass &&
|
|
132
|
+
"fill_active_hover_".concat(fillItemActiveHoverClass), isActive
|
|
133
|
+
? !isDisabled
|
|
134
|
+
? fillItemActiveClass &&
|
|
135
|
+
"fill_active_".concat(fillItemActiveClass)
|
|
136
|
+
: fillItemActiveDisabledClass &&
|
|
137
|
+
"fill_active_disabled_".concat(fillItemActiveDisabledClass)
|
|
138
|
+
: !isDisabled
|
|
139
|
+
? fillItemClass && "fill_".concat(fillItemClass)
|
|
140
|
+
: fillItemDisabledClass &&
|
|
141
|
+
"fill_disabled_".concat(fillItemDisabledClass), isActive &&
|
|
142
|
+
isDisabled &&
|
|
143
|
+
'choice__item_active_state_disabled', isActive && 'choice__item_active', shapeItemClass && "choice__item_shape_".concat(shapeItemClass)), ref: optionsRefs.get(item.value), children: [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); } }), jsxs("label", { className: clsx('choice__item-label', isDisabled && 'choice__item-label_state_disabled'), htmlFor: "".concat(name, "-").concat(item.value), children: [itemBefore, (iconBefore || iconBeforeActive) && (jsx(Icon, { className: "choice__item-icon", iconFillDisabled: isDisabled ? iconBeforeFillDisabled : undefined, iconFill: isActive ? iconBeforeFillActive : iconBeforeFill, iconSize: iconBeforeSize, SvgImage: isActive ? iconBeforeActive : iconBefore })), item.label && (jsx(Text, { size: labelTextSize, textColor: isActive
|
|
144
|
+
? !isDisabled
|
|
145
|
+
? labelTextActiveColor
|
|
146
|
+
: labelTextActiveColorDisabled
|
|
147
|
+
: !isDisabled
|
|
148
|
+
? labelTextColor
|
|
149
|
+
: labelTextColorDisabled, textWeight: labelTextWeight, textWrap: labelTextWrap, children: item.label })), (icon || iconActive) && (jsx(Icon, { className: "choice__item-icon", iconFillDisabled: isDisabled ? iconFillDisabled : undefined, iconFill: isActive ? iconFillActive : iconFill, iconSize: iconSize, SvgImage: isActive ? iconActive : icon })), (iconAfter || iconAfterActive) && (jsx(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)));
|
|
150
|
+
}) })), after && jsx("div", { className: "choice__after", children: after })] }));
|
|
105
151
|
}
|
|
106
152
|
|
|
107
153
|
export { Choice, choiceAppearance, choiceConfig };
|
package/dist/components/Code.js
CHANGED
|
@@ -3,10 +3,10 @@ import { useRef, useMemo, useCallback, useEffect } from 'react';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import Cookies from 'js-cookie';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
|
-
import { B as Button } from '../
|
|
7
|
-
import { G as Group } from '../
|
|
8
|
-
import { T as Text } from '../
|
|
9
|
-
import '../tslib.
|
|
6
|
+
import { B as Button } from '../Button_es_CBbHMy1v.js';
|
|
7
|
+
import { G as Group } from '../Group_es_CRGwi5XI.js';
|
|
8
|
+
import { T as Text } from '../Text_es_FJGduy7Z.js';
|
|
9
|
+
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
10
10
|
import 'lodash/camelCase';
|
|
11
11
|
import 'lodash/castArray';
|
|
12
12
|
import 'lodash/upperFirst';
|
|
@@ -17,15 +17,15 @@ import '../context/UIContext.js';
|
|
|
17
17
|
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
18
18
|
import 'react-responsive';
|
|
19
19
|
import '../utils/setViewportProperty.js';
|
|
20
|
-
import '../
|
|
20
|
+
import '../Icon_es_BBmoZ7_3.js';
|
|
21
21
|
import 'react-inlinesvg';
|
|
22
22
|
import '../hooks/useStyles/useStyles.js';
|
|
23
23
|
import 'lodash/maxBy';
|
|
24
24
|
import '../hooks/useStyles/styleAttributes.js';
|
|
25
|
-
import '../
|
|
26
|
-
import '../
|
|
27
|
-
import '../
|
|
28
|
-
import '../
|
|
25
|
+
import '../Link_es_DkW06IM-.js';
|
|
26
|
+
import '../Tooltip_es_H976MIb7.js';
|
|
27
|
+
import '../Title_es_ke3YylFm.js';
|
|
28
|
+
import '../Loader_es_BE4nyzXi.js';
|
|
29
29
|
|
|
30
30
|
function CookiesWarning(props) {
|
|
31
31
|
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,9 +1,9 @@
|
|
|
1
|
-
import { _ as __assign, b as __rest } from '../tslib.
|
|
1
|
+
import { _ as __assign, b as __rest } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { PartySuggestions } from 'react-dadata';
|
|
6
|
-
import { I as Input } from '../
|
|
6
|
+
import { I as Input } from '../Input_es_Bs0gEq3L.js';
|
|
7
7
|
import '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
8
|
import 'lodash/camelCase';
|
|
9
9
|
import 'lodash/castArray';
|
|
@@ -36,9 +36,9 @@ function DadataHintField(props) {
|
|
|
36
36
|
input.onBlur,
|
|
37
37
|
input.onChange,
|
|
38
38
|
]);
|
|
39
|
-
return (jsx(PartySuggestions, { minChars: 3, customInput:
|
|
39
|
+
return (jsx(PartySuggestions, { minChars: 3, customInput: DadataCustomInput, delay: delay || 750, inputProps: dadataInputProps, token: token, onChange: setValue }));
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function DadataCustomInput(props) {
|
|
42
42
|
var inputValue = props.inputValue, otherProps = __rest(props, ["inputValue"]);
|
|
43
43
|
return jsx(Input, __assign({}, otherProps, { value: inputValue }));
|
|
44
44
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __assign } from '../tslib.
|
|
1
|
+
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React, { useMemo, useCallback, useRef, useState, useEffect } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
@@ -6,11 +6,12 @@ import { ru } from 'date-fns/locale';
|
|
|
6
6
|
import DatePicker from 'react-datepicker';
|
|
7
7
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
8
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
9
|
-
import { B as Button } from '../
|
|
10
|
-
import { I as Icon } from '../
|
|
11
|
-
import { I as Input } from '../
|
|
12
|
-
import { L as Label } from '../
|
|
13
|
-
import { T as Text } from '../
|
|
9
|
+
import { B as Button } from '../Button_es_CBbHMy1v.js';
|
|
10
|
+
import { I as Icon } from '../Icon_es_BBmoZ7_3.js';
|
|
11
|
+
import { I as Input } from '../Input_es_Bs0gEq3L.js';
|
|
12
|
+
import { L as Label } from '../Label_es_CZpanSdR.js';
|
|
13
|
+
import { T as Text } from '../Text_es_FJGduy7Z.js';
|
|
14
|
+
import { icon14 } from '@itcase/icons/default';
|
|
14
15
|
import 'lodash/camelCase';
|
|
15
16
|
import 'lodash/castArray';
|
|
16
17
|
import 'lodash/upperFirst';
|
|
@@ -23,41 +24,118 @@ import 'react-responsive';
|
|
|
23
24
|
import '../utils/setViewportProperty.js';
|
|
24
25
|
import 'lodash/maxBy';
|
|
25
26
|
import '../hooks/useStyles/styleAttributes.js';
|
|
26
|
-
import '../
|
|
27
|
-
import '../
|
|
27
|
+
import '../Link_es_DkW06IM-.js';
|
|
28
|
+
import '../Loader_es_BE4nyzXi.js';
|
|
28
29
|
import 'react-inlinesvg';
|
|
29
|
-
import '../
|
|
30
|
-
import '../
|
|
30
|
+
import '../Tooltip_es_H976MIb7.js';
|
|
31
|
+
import '../Title_es_ke3YylFm.js';
|
|
31
32
|
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
var datePickerSize = {
|
|
34
|
+
sizeS: {
|
|
35
|
+
datePickerProps: {
|
|
36
|
+
daySize: 'xs',
|
|
37
|
+
dayTextSize: 'm',
|
|
38
|
+
iconFillSize: 24,
|
|
39
|
+
iconLeft: icon14.ChevronLeft,
|
|
40
|
+
iconRight: icon14.ChevronRight,
|
|
41
|
+
},
|
|
42
|
+
inputProps: {
|
|
43
|
+
size: 's',
|
|
44
|
+
textSize: 's',
|
|
45
|
+
clearIcon: icon14.Clear,
|
|
46
|
+
clearIconSize: 16,
|
|
47
|
+
clearLabelTextSize: 'm',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
sizeM: {
|
|
51
|
+
datePickerProps: {
|
|
52
|
+
daySize: 'xs',
|
|
53
|
+
dayTextSize: 'm',
|
|
54
|
+
iconFillSize: 24,
|
|
55
|
+
iconLeft: icon14.ChevronLeft,
|
|
56
|
+
iconRight: icon14.ChevronRight,
|
|
57
|
+
},
|
|
58
|
+
inputProps: {
|
|
59
|
+
size: 'm',
|
|
60
|
+
textSize: 'm',
|
|
61
|
+
clearIcon: icon14.Clear,
|
|
62
|
+
clearIconSize: 16,
|
|
63
|
+
clearLabelTextSize: 'm',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
sizeL: {
|
|
67
|
+
datePickerProps: {
|
|
68
|
+
daySize: 'xs',
|
|
69
|
+
dayTextSize: 'm',
|
|
70
|
+
iconFillSize: 24,
|
|
71
|
+
iconLeft: icon14.ChevronLeft,
|
|
72
|
+
iconRight: icon14.ChevronRight,
|
|
73
|
+
},
|
|
74
|
+
inputProps: {
|
|
75
|
+
size: 'l',
|
|
76
|
+
textSize: 'l',
|
|
77
|
+
clearIcon: icon14.Clear,
|
|
78
|
+
clearIconSize: 16,
|
|
79
|
+
clearLabelTextSize: 'm',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
var datePickerStyle = {
|
|
85
|
+
solid: {
|
|
86
|
+
datePickerProps: {},
|
|
87
|
+
inputProps: {
|
|
88
|
+
borderWidth: '0',
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
outlined: {
|
|
92
|
+
datePickerProps: {},
|
|
93
|
+
inputProps: {
|
|
94
|
+
fill: 'none',
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
ghost: {
|
|
98
|
+
datePickerProps: {},
|
|
99
|
+
inputProps: {
|
|
100
|
+
fill: 'none',
|
|
101
|
+
borderWidth: '0',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
full: {
|
|
105
|
+
datePickerProps: {},
|
|
106
|
+
inputProps: {},
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
var datePickerAppearanceSurface = {
|
|
111
|
+
surfacePrimary: {
|
|
112
|
+
datePickerProps: {
|
|
35
113
|
daySize: 'xs',
|
|
36
114
|
dayTextColor: 'surfaceTextPrimary',
|
|
37
115
|
dayTextShape: 'rounded',
|
|
38
116
|
dayTextSize: 'm',
|
|
117
|
+
iconFillHover: 'surfaceSecondary',
|
|
39
118
|
iconItemFill: 'surfaceItemPrimary',
|
|
40
|
-
|
|
41
|
-
monthTextSize: 'xl',
|
|
42
|
-
monthTextWeight: '400',
|
|
43
|
-
yearTextColor: 'surfaceTextPrimary',
|
|
44
|
-
yearTextSize: 'xl',
|
|
45
|
-
yearTextWeight: '400',
|
|
119
|
+
iconShape: 'circular',
|
|
46
120
|
},
|
|
47
|
-
|
|
48
|
-
width: '
|
|
49
|
-
|
|
50
|
-
|
|
121
|
+
inputProps: {
|
|
122
|
+
width: 'fill',
|
|
123
|
+
fill: 'surfacePrimary',
|
|
124
|
+
fillHover: 'surfacePrimary',
|
|
125
|
+
borderColor: 'surfaceBorderPrimary',
|
|
51
126
|
textColor: 'surfaceTextPrimary',
|
|
52
|
-
textSize: 'm',
|
|
53
127
|
caret: 'surfaceItemPrimary',
|
|
128
|
+
clearIconItemFill: 'surfaceItemQuaternary',
|
|
129
|
+
clearIconItemFillHover: 'surfaceItemPrimary',
|
|
130
|
+
clearLabelTextColor: 'surfaceTextPrimary',
|
|
131
|
+
clearLabelTextColorHover: 'surfaceTextAccent',
|
|
54
132
|
placeholderTextColor: 'surfaceTextSecondary',
|
|
55
|
-
shape: 'rounded',
|
|
56
133
|
},
|
|
57
|
-
shape: 'rounded',
|
|
58
134
|
},
|
|
59
135
|
};
|
|
60
136
|
|
|
137
|
+
var datePickerAppearance = __assign(__assign(__assign({}, datePickerAppearanceSurface), datePickerSize), datePickerStyle);
|
|
138
|
+
|
|
61
139
|
var datePickerConfig = {
|
|
62
140
|
appearance: datePickerAppearance,
|
|
63
141
|
setAppearance: function (appearanceConfig) {
|
|
@@ -65,8 +143,14 @@ var datePickerConfig = {
|
|
|
65
143
|
},
|
|
66
144
|
};
|
|
67
145
|
function DatePickerInput(props) {
|
|
68
|
-
var className = props.className, appearance = props.appearance,
|
|
146
|
+
var className = props.className, appearance = props.appearance, endValue = props.endValue, _a = props.inputProps, inputProps = _a === void 0 ? {} : _a, value = props.value, onChange = props.onChange;
|
|
69
147
|
var datepickerRef = useRef(null);
|
|
148
|
+
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
149
|
+
var _a;
|
|
150
|
+
return (__assign(__assign({}, resultConfig), (_a = datePickerConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
151
|
+
}, {});
|
|
152
|
+
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
153
|
+
var _b = propsGenerator.datePickerProps, datePickerProps = _b === void 0 ? {} : _b, widthClass = propsGenerator.widthClass;
|
|
70
154
|
var start = useMemo(function () {
|
|
71
155
|
if (value) {
|
|
72
156
|
if (typeof value === 'string') {
|
|
@@ -88,8 +172,8 @@ function DatePickerInput(props) {
|
|
|
88
172
|
}
|
|
89
173
|
return endValue;
|
|
90
174
|
}, [endValue]);
|
|
91
|
-
var
|
|
92
|
-
var
|
|
175
|
+
var _c = useState(start), startDate = _c[0], setStartDate = _c[1];
|
|
176
|
+
var _d = useState(end), endDate = _d[0], setEndDate = _d[1];
|
|
93
177
|
var handleChange = useCallback(function (_a) {
|
|
94
178
|
var newStartDate = _a[0], newEndDate = _a[1];
|
|
95
179
|
onChange && onChange(newStartDate, newEndDate);
|
|
@@ -106,7 +190,7 @@ function DatePickerInput(props) {
|
|
|
106
190
|
]);
|
|
107
191
|
var renderCustomHeader = useCallback(function (_a) {
|
|
108
192
|
var decreaseMonth = _a.decreaseMonth, increaseMonth = _a.increaseMonth, monthDate = _a.monthDate;
|
|
109
|
-
return (jsxs("div", { className: "react-datepicker__header--div", children: [datePickerProps.iconLeft && (jsx(Icon, { className: "react-datepicker__icon",
|
|
193
|
+
return (jsxs("div", { className: "react-datepicker__header--div", children: [datePickerProps.iconLeft && (jsx(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 })), jsxs("div", { className: "react-datepicker__data", children: [jsx(Text, { className: "react-datepicker__month", size: datePickerProps.monthTextSize, textColor: datePickerProps.monthTextColor, textWeight: datePickerProps.monthTextWeight, children: monthDate.toLocaleString('ru-RU', { month: 'long' }) }), jsx(Text, { className: "react-datepicker__year", size: datePickerProps.yearTextSize, textColor: datePickerProps.yearTextColor, textWeight: datePickerProps.yearTextWeight, children: monthDate.toLocaleString('ru-RU', { year: 'numeric' }) })] }), datePickerProps.iconRight && (jsx(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 }))] }));
|
|
110
194
|
}, [
|
|
111
195
|
datePickerProps.iconFill,
|
|
112
196
|
datePickerProps.iconFillHover,
|
|
@@ -115,7 +199,6 @@ function DatePickerInput(props) {
|
|
|
115
199
|
datePickerProps.iconLeft,
|
|
116
200
|
datePickerProps.iconRight,
|
|
117
201
|
datePickerProps.iconShape,
|
|
118
|
-
datePickerProps.iconSize,
|
|
119
202
|
datePickerProps.monthTextColor,
|
|
120
203
|
datePickerProps.monthTextSize,
|
|
121
204
|
datePickerProps.monthTextWeight,
|
|
@@ -129,22 +212,15 @@ function DatePickerInput(props) {
|
|
|
129
212
|
useEffect(function () {
|
|
130
213
|
setEndDate(end);
|
|
131
214
|
}, [end]);
|
|
132
|
-
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
133
|
-
var _a;
|
|
134
|
-
return (__assign(__assign({}, resultConfig), (_a = datePickerConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
135
|
-
}, {});
|
|
136
|
-
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
137
|
-
var widthClass = propsGenerator.widthClass;
|
|
138
|
-
// @ts-expect-error
|
|
139
215
|
var datePickerStyles = useStyles(props).styles;
|
|
140
|
-
|
|
216
|
+
console.log(inputProps);
|
|
217
|
+
return (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: jsx(DatePicker, __assign({ minDate: (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.disablePastDays) ? new Date() : undefined, customInput: jsx(DatePickerCustomInput, { datepickerRef: datepickerRef, inputProps: inputProps, isClearable: datePickerProps.isClearable }), endDate: (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.selectsRange) ? endDate : undefined, locale: ru, popperClassName: (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.popper) &&
|
|
141
218
|
"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, {
|
|
142
219
|
// Important for use custom clear button
|
|
143
220
|
isClearable: false })) }));
|
|
144
221
|
}
|
|
145
222
|
var DatePickerCustomInput = React.forwardRef(function (props, ref) {
|
|
146
|
-
var
|
|
147
|
-
var datePickerAppearance = props.datePickerAppearance, inputIcon = props.inputIcon, inputProps = props.inputProps, value = props.value, isClearable = props.isClearable;
|
|
223
|
+
var inputIcon = props.inputIcon, inputProps = props.inputProps, value = props.value, isClearable = props.isClearable;
|
|
148
224
|
var multipleValue = useMemo(function () {
|
|
149
225
|
if (value) {
|
|
150
226
|
var twoDates = value.split(' - ');
|
|
@@ -152,10 +228,8 @@ var DatePickerCustomInput = React.forwardRef(function (props, ref) {
|
|
|
152
228
|
}
|
|
153
229
|
return '';
|
|
154
230
|
}, [value]);
|
|
155
|
-
|
|
156
|
-
return (jsxs(React.Fragment, { children: [jsx(Input, __assign({}, inputAppearanceProps, props, inputProps, { className: "datepicker__input", autocomplete: "off", ref: ref, value: multipleValue })), inputIcon && jsx(DatePickerInputIcon, __assign({}, props)), isClearable && jsx(DatePickerClearButton, __assign({}, props))] }));
|
|
231
|
+
return (jsxs(React.Fragment, { children: [jsx(Input, __assign({}, props, inputProps, { className: "datepicker__input", autocomplete: "off", ref: ref, value: multipleValue })), inputIcon && jsx(DatePickerInputIcon, __assign({}, inputProps)), isClearable && jsx(DatePickerClearButton, __assign({}, inputProps))] }));
|
|
157
232
|
});
|
|
158
|
-
DatePickerCustomInput.displayName = 'DatePickerCustomInput';
|
|
159
233
|
function DatePickerClearButton(props) {
|
|
160
234
|
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;
|
|
161
235
|
var onClick = useCallback(function (event) {
|
|
@@ -163,13 +237,11 @@ function DatePickerClearButton(props) {
|
|
|
163
237
|
(_a = datepickerRef === null || datepickerRef === void 0 ? void 0 : datepickerRef.current) === null || _a === void 0 ? void 0 : _a.onClearClick(event);
|
|
164
238
|
(_b = datepickerRef === null || datepickerRef === void 0 ? void 0 : datepickerRef.current) === null || _b === void 0 ? void 0 : _b.handleFocus(event);
|
|
165
239
|
}, []);
|
|
166
|
-
return (
|
|
240
|
+
return (jsx(React.Fragment, { children: clearLabel ? (jsx(Label, { className: clsx('react-datepicker__clear-label', 'cursor_type_pointer'), label: clearLabel, labelTextColor: clearLabelTextColor, labelTextColorHover: clearLabelTextColorHover, labelTextSize: clearLabelTextSize, onClick: onClick })) : ((clearIcon || clearIconSrc) && (jsx(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 }))) }));
|
|
167
241
|
}
|
|
168
|
-
DatePickerClearButton.displayName = 'DatePickerClearButton';
|
|
169
242
|
function DatePickerInputIcon(props) {
|
|
170
243
|
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;
|
|
171
244
|
return (jsx(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(); } }));
|
|
172
245
|
}
|
|
173
|
-
DatePickerInputIcon.displayName = 'DatePickerInputIcon';
|
|
174
246
|
|
|
175
247
|
export { DatePickerInput, datePickerAppearance, datePickerConfig };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { D as Divider, a as dividerAppearance, d as dividerConfig } from '../
|
|
2
|
-
import '../tslib.
|
|
1
|
+
export { D as Divider, a as dividerAppearance, d as dividerConfig } from '../Divider_es_CWsDM2Rm.js';
|
|
2
|
+
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'clsx';
|
|
5
5
|
import '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
package/dist/components/Dot.js
CHANGED
|
@@ -2,7 +2,7 @@ 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.
|
|
5
|
+
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'lodash/camelCase';
|
|
8
8
|
import 'lodash/castArray';
|