@itcase/ui 1.8.128 → 1.8.129

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.
@@ -149,7 +149,7 @@ function DatePickerInput(props) {
149
149
  yearTextWeight,
150
150
  ]);
151
151
  const { styles: datePickerStyles } = useStyles.useStyles(props);
152
- return (jsxRuntime.jsx("div", { className: clsx(className, 'datepicker', monthsShown && 'datepicker_multiple-months', customTimeInput && 'datepicker_button', sizeClass && `datepicker_size_${sizeClass}`, widthClass && `datepicker_width_${widthClass}`), style: datePickerStyles, children: jsxRuntime.jsx(DatePicker, { minDate: disablePastDays ? new Date() : undefined, customInput: jsxRuntime.jsx(DatePickerCustomInput, { datepickerRef: datepickerRef, inputProps: inputProps, isClearable: isClearable }), endDate: selectsRange ? dateEnd : undefined, locale: locale.ru, popperClassName: popper && `react-datepicker-popper-${popper}`, popperPlacement: popperPlacement, ref: datepickerRef, renderCustomHeader: renderCustomHeader, renderDayContents: renderDayContents, selected: dateStart, startDate: dateStart, onChange: selectsRange ? handleChange : onChange, ...datePickerProps,
152
+ return (jsxRuntime.jsx("div", { className: clsx(className, 'datepicker', monthsShown && 'datepicker_multiple-months', customTimeInput && 'datepicker_button', sizeClass && `datepicker_size_${sizeClass}`, widthClass && `datepicker_width_${widthClass}`), style: datePickerStyles, children: jsxRuntime.jsx(DatePicker, { ref: datepickerRef, minDate: disablePastDays ? new Date() : undefined, customInput: jsxRuntime.jsx(DatePickerCustomInput, { datepickerRef: datepickerRef, inputProps: inputProps, isClearable: isClearable }), endDate: selectsRange ? dateEnd : undefined, locale: locale.ru, popperClassName: popper && `react-datepicker-popper-${popper}`, popperPlacement: popperPlacement, renderCustomHeader: renderCustomHeader, renderDayContents: renderDayContents, selected: dateStart, startDate: dateStart, onChange: selectsRange ? handleChange : onChange, ...datePickerProps,
153
153
  // Important for use custom clear button
154
154
  isClearable: false }) }));
155
155
  }
@@ -162,7 +162,7 @@ const DatePickerCustomInput = React.forwardRef((props, ref) => {
162
162
  }
163
163
  return '';
164
164
  }, [value]);
165
- return (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx(Input.Input, { ...props, ...inputProps, className: clsx(inputProps.className, 'datepicker__input'), autocomplete: "off", ref: ref, value: multipleValue }), inputIcon && jsxRuntime.jsx(DatePickerInputIcon, { ...inputProps }), isClearable && jsxRuntime.jsx(DatePickerClearButton, { ...inputProps })] }));
165
+ return (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx(Input.Input, { ...props, ...inputProps, className: clsx(inputProps.className, 'datepicker__input'), ref: ref, autocomplete: "off", value: multipleValue }), inputIcon && jsxRuntime.jsx(DatePickerInputIcon, { ...inputProps }), isClearable && jsxRuntime.jsx(DatePickerClearButton, { ...inputProps })] }));
166
166
  });
167
167
  function DatePickerClearButton(props) {
168
168
  const { clearIcon, clearIconFill, clearIconFillHover, clearIconFillSize, clearIconItemFill, clearIconItemFillHover, clearIconShape, clearIconSize, clearIconSrc, clearLabel, clearLabelTextColor, clearLabelTextColorHover, clearLabelTextSize, datepickerRef, } = props;
@@ -147,7 +147,7 @@ function DatePickerInput(props) {
147
147
  yearTextWeight,
148
148
  ]);
149
149
  const { styles: datePickerStyles } = useStyles(props);
150
- return (jsx("div", { className: clsx(className, 'datepicker', monthsShown && 'datepicker_multiple-months', customTimeInput && 'datepicker_button', sizeClass && `datepicker_size_${sizeClass}`, widthClass && `datepicker_width_${widthClass}`), style: datePickerStyles, children: jsx(DatePicker, { minDate: disablePastDays ? new Date() : undefined, customInput: jsx(DatePickerCustomInput, { datepickerRef: datepickerRef, inputProps: inputProps, isClearable: isClearable }), endDate: selectsRange ? dateEnd : undefined, locale: ru, popperClassName: popper && `react-datepicker-popper-${popper}`, popperPlacement: popperPlacement, ref: datepickerRef, renderCustomHeader: renderCustomHeader, renderDayContents: renderDayContents, selected: dateStart, startDate: dateStart, onChange: selectsRange ? handleChange : onChange, ...datePickerProps,
150
+ return (jsx("div", { className: clsx(className, 'datepicker', monthsShown && 'datepicker_multiple-months', customTimeInput && 'datepicker_button', sizeClass && `datepicker_size_${sizeClass}`, widthClass && `datepicker_width_${widthClass}`), style: datePickerStyles, children: jsx(DatePicker, { ref: datepickerRef, minDate: disablePastDays ? new Date() : undefined, customInput: jsx(DatePickerCustomInput, { datepickerRef: datepickerRef, inputProps: inputProps, isClearable: isClearable }), endDate: selectsRange ? dateEnd : undefined, locale: ru, popperClassName: popper && `react-datepicker-popper-${popper}`, popperPlacement: popperPlacement, renderCustomHeader: renderCustomHeader, renderDayContents: renderDayContents, selected: dateStart, startDate: dateStart, onChange: selectsRange ? handleChange : onChange, ...datePickerProps,
151
151
  // Important for use custom clear button
152
152
  isClearable: false }) }));
153
153
  }
@@ -160,7 +160,7 @@ const DatePickerCustomInput = React.forwardRef((props, ref) => {
160
160
  }
161
161
  return '';
162
162
  }, [value]);
163
- return (jsxs(React.Fragment, { children: [jsx(Input, { ...props, ...inputProps, className: clsx(inputProps.className, 'datepicker__input'), autocomplete: "off", ref: ref, value: multipleValue }), inputIcon && jsx(DatePickerInputIcon, { ...inputProps }), isClearable && jsx(DatePickerClearButton, { ...inputProps })] }));
163
+ return (jsxs(React.Fragment, { children: [jsx(Input, { ...props, ...inputProps, className: clsx(inputProps.className, 'datepicker__input'), ref: ref, autocomplete: "off", value: multipleValue }), inputIcon && jsx(DatePickerInputIcon, { ...inputProps }), isClearable && jsx(DatePickerClearButton, { ...inputProps })] }));
164
164
  });
165
165
  function DatePickerClearButton(props) {
166
166
  const { clearIcon, clearIconFill, clearIconFillHover, clearIconFillSize, clearIconItemFill, clearIconItemFillHover, clearIconShape, clearIconSize, clearIconSrc, clearLabel, clearLabelTextColor, clearLabelTextColorHover, clearLabelTextSize, datepickerRef, } = props;
@@ -4,7 +4,7 @@ var jsxRuntime = require('react/jsx-runtime');
4
4
  var React = require('react');
5
5
  var clsx = require('clsx');
6
6
  var common = require('@itcase/common');
7
- var DatePicker = require('../../DatePicker_cjs_jhKYHjBs.js');
7
+ var DatePicker = require('../../DatePicker_cjs_BLOiIsfD.js');
8
8
  var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
9
9
  var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
10
10
  var ChipsGroup = require('../../ChipsGroup_cjs_BMkiDYau.js');
@@ -35,20 +35,43 @@ require('../../Label_cjs_D2YMjCoS.js');
35
35
  require('@itcase/icons/default');
36
36
  require('lodash/castArray');
37
37
 
38
+ const datePeriodAppearanceShape = {
39
+ circular: {
40
+ shape: 'circular',
41
+ },
42
+ rounded: {
43
+ shape: 'rounded',
44
+ },
45
+ roundedXL: {
46
+ shape: 'rounded',
47
+ shapeStrength: '2m',
48
+ },
49
+ roundedL: {
50
+ shape: 'rounded',
51
+ shapeStrength: '1_5m',
52
+ },
53
+ roundedM: {
54
+ shape: 'rounded',
55
+ shapeStrength: '1m',
56
+ },
57
+ roundedS: {
58
+ shape: 'rounded',
59
+ shapeStrength: '0_5m',
60
+ },
61
+ };
62
+
38
63
  const datePeriodAppearanceSize = {
39
64
  sizeL: {
40
- size: 'm',
41
- chipsAppearanceSize: 'sizeL',
65
+ size: 'l',
66
+ chipsAppearanceSize: 'sizeXL',
42
67
  datePickerAppearanceSize: 'sizeM',
43
- datePickerInputSize: 'l',
44
- datePickerInputTextSize: 'm',
68
+ datePickerInputAppearanceSize: 'sizeM',
45
69
  },
46
70
  sizeM: {
47
71
  size: 'm',
48
72
  chipsAppearanceSize: 'sizeL',
49
73
  datePickerAppearanceSize: 'sizeM',
50
- datePickerInputSize: 'm',
51
- datePickerInputTextSize: 'm',
74
+ datePickerInputAppearanceSize: 'sizeM',
52
75
  },
53
76
  };
54
77
 
@@ -74,6 +97,7 @@ const datePeriodAppearanceSurface = {
74
97
  const datePeriodAppearance = {
75
98
  ...datePeriodAppearanceSurface,
76
99
  ...datePeriodAppearanceSize,
100
+ ...datePeriodAppearanceShape,
77
101
  };
78
102
 
79
103
  const datePeriodConfig = {
@@ -86,7 +110,7 @@ function DatePeriod(props) {
86
110
  const { appearance, className, datePeriodIntervalsList = Object.values(common.DATE_PERIOD_INTERVALS), datePeriodValueEnd, datePeriodValueStart, monthsShown, selectsRange = true, isDisabled, isSkeleton, onChangeDatePeriod, onKeyDown, } = props;
87
111
  const appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, datePeriodConfig, isDisabled);
88
112
  const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
89
- const { fillClass, chipsAppearance, chipsAppearanceSize, chipsShape, datePickerAppearance, datePickerAppearanceSize, datePickerInputAppearance, datePickerInputFillHover, datePickerInputSize, datePickerInputTextSize, shapeClass, sizeClass, } = propsGenerator;
113
+ const { fillClass, chipsAppearance, chipsAppearanceSize, chipsShape, datePickerAppearance, datePickerAppearanceSize, datePickerInputAppearance, datePickerInputAppearanceSize, datePickerInputFillHover, datePickerInputSize, datePickerInputTextSize, shapeClass, shapeStrengthClass, sizeClass, } = propsGenerator;
90
114
  const onClickPeriodChips = React.useCallback((selectedPeriodItem) => {
91
115
  const dateStartIso = selectedPeriodItem.dateIntervalsList[0];
92
116
  const dateEndIso = selectedPeriodItem.dateIntervalsList[1];
@@ -112,7 +136,7 @@ function DatePeriod(props) {
112
136
  // },
113
137
  // [onChangeDatePeriod],
114
138
  // )
115
- return (jsxRuntime.jsx("div", { className: clsx(className, 'date-period', shapeClass && `date-period_shape_${shapeClass}`, sizeClass && `date-period_size_${sizeClass}`, isSkeleton && `date-period_skeleton`, fillClass && `fill_${fillClass}`, 'cursor_type_pointer'), children: jsxRuntime.jsxs(ChipsGroup.ChipsGroup, { direction: "horizontal", children: [datePeriodIntervalsList.map((datePeriodItem) => (jsxRuntime.jsx(ChipsGroup.Chips, { appearance: `${chipsAppearance} ${chipsAppearanceSize}`, label: datePeriodItem.label, shape: chipsShape, isActive: checkIsChipsActive(datePeriodItem), onClick: () => onClickPeriodChips(datePeriodItem) }, datePeriodItem.value))), jsxRuntime.jsx(DatePicker.DatePickerInput, { className: "date-period__datepicker", datePickerProps: {
139
+ return (jsxRuntime.jsx("div", { className: clsx(className, 'date-period', shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, sizeClass && `date-period_size_${sizeClass}`, isSkeleton && `date-period_skeleton`, fillClass && `fill_${fillClass}`, 'cursor_type_pointer'), children: jsxRuntime.jsxs(ChipsGroup.ChipsGroup, { className: "date-period__choice", direction: "horizontal", children: [datePeriodIntervalsList.map((datePeriodItem) => (jsxRuntime.jsx(ChipsGroup.Chips, { appearance: `${chipsAppearance} ${chipsAppearanceSize}`, label: datePeriodItem.label, shape: chipsShape, isActive: checkIsChipsActive(datePeriodItem), onClick: () => onClickPeriodChips(datePeriodItem) }, datePeriodItem.value))), jsxRuntime.jsx(DatePicker.DatePickerInput, { className: "date-period__datepicker", datePickerProps: {
116
140
  appearance: `${datePickerAppearance} ${datePickerAppearanceSize}`,
117
141
  dateFormat: 'dd/MM/yyyy',
118
142
  monthsShown: monthsShown,
@@ -122,7 +146,7 @@ function DatePeriod(props) {
122
146
  isStartDefaultNull: true,
123
147
  onKeyDown: onKeyDown,
124
148
  }, endValue: datePeriodValueEnd, inputProps: {
125
- appearance: `${datePickerInputAppearance} ghost`,
149
+ appearance: `${datePickerInputAppearance} ${datePickerInputAppearanceSize} ghost`,
126
150
  className: `date-period__datepicker-input date-period__datepicker-input_size_${datePickerInputSize}`,
127
151
  fillHover: datePickerInputFillHover,
128
152
  textSize: datePickerInputTextSize,
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var DatePicker = require('../../DatePicker_cjs_jhKYHjBs.js');
3
+ var DatePicker = require('../../DatePicker_cjs_BLOiIsfD.js');
4
4
  require('react/jsx-runtime');
5
5
  require('react');
6
6
  require('clsx');
@@ -244,7 +244,7 @@ function MenuItem(props) {
244
244
  : fillActiveHoverClass && `fill_active_hover_${fillActiveHoverClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass
245
245
  ? `shape-strength_${shapeStrengthClass}`
246
246
  : shapeClass === 'rounded' && 'shape-strength_default', typeClass && `menu-item_type_${typeClass}`, widthClass && `width_${widthClass}`, justifyContentClass &&
247
- `menu-item_justify-content_${justifyContentClass}`, isSkeleton && `menu-item_skeleton`), style: menuItem, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: [jsxRuntime.jsxs(Link.Link, { className: clsx('menu-item__wrapper', alignDirectionClass && `align_${alignDirectionClass}`, alignClass && `align_${alignClass}`), href: link || href, LinkComponent: LinkComponent, rel: rel, target: target, underline: underline, children: [before, children || (jsxRuntime.jsxs(React.Fragment, { children: [(iconBefore || iconBeforeSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('menu-item__icon_before', iconBadgeValue && 'menu-item__icon_before-badge'), fill: iconBeforeFill, fillSize: iconBeforeFillSize, badgeAppearance: iconBadgeAppearance, badgeClass: 'menu-item__icon_before_badge', badgeShape: iconBadgeShape, badgeSize: iconBadgeSize, badgeTextColor: iconBadgeTextColor, badgeTextSize: iconBadgeTextSize, badgeValue: iconBadgeValue, iconFill: iconBeforeFillIcon, iconSize: iconBeforeSize, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), label && (jsxRuntime.jsx(Text.Text, { className: "menu-item__label", size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorDisabled: labelTextColorDisabled, textColorHover: labelTextColorHover, textStyle: labelStyle, textWeight: labelWeight, textWrap: labelWrap, isActive: isActive, isDisabled: isDisabled, children: label })), (iconAfter || iconAfterSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('menu-item__icon_after', iconBadgeValue && 'menu-item__icon_after-badge'), fill: iconAfterFill, fillSize: iconAfterFillSize, badgeAppearance: iconBadgeAppearance, badgeClass: "menu-item__icon_after_badge", badgeShape: iconBadgeShape, badgeSize: iconBadgeSize, badgeTextColor: iconBadgeTextColor, badgeTextSize: iconBadgeTextSize, badgeValue: iconBadgeValue, iconFill: iconAfterFillIcon, iconSize: iconAfterSize, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter }))] })), after] }), showTooltip && (jsxRuntime.jsx(Icon.Tooltip, { appearance: tooltipAppearance, className: "menu-item__tooltip", ref: tooltipRef, minWidth: "auto", size: tooltipSize, fill: tooltipFill, left: "100%", zIndex: "100", titleTextColor: tooltipTitleTextColor, marginLeft: "3m", text: tooltipText, textColor: tooltipTextColor, textSize: tooltipTextSize,
247
+ `menu-item_justify-content_${justifyContentClass}`, isSkeleton && `menu-item_skeleton`), style: menuItem, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: [jsxRuntime.jsxs(Link.Link, { className: clsx('menu-item__wrapper', alignDirectionClass && `align_${alignDirectionClass}`, alignClass && `align_${alignClass}`), href: link || href, LinkComponent: LinkComponent, rel: rel, target: target, underline: underline, children: [before, children || (jsxRuntime.jsxs(React.Fragment, { children: [(iconBefore || iconBeforeSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('menu-item__icon_before', iconBadgeValue && 'menu-item__icon_before-badge'), fill: iconBeforeFill, fillSize: iconBeforeFillSize, badgeAppearance: iconBadgeAppearance, badgeClass: 'menu-item__icon_before_badge', badgeShape: iconBadgeShape, badgeSize: iconBadgeSize, badgeTextColor: iconBadgeTextColor, badgeTextSize: iconBadgeTextSize, badgeValue: iconBadgeValue, iconFill: iconBeforeFillIcon, iconSize: iconBeforeSize, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), label && (jsxRuntime.jsx(Text.Text, { className: "menu-item__label", size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorDisabled: labelTextColorDisabled, textColorHover: labelTextColorHover, textStyle: labelStyle, textWeight: labelWeight, textWrap: labelWrap, isActive: isActive, isDisabled: isDisabled, children: label })), (iconAfter || iconAfterSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('menu-item__icon_after', iconBadgeValue && 'menu-item__icon_after-badge'), fill: iconAfterFill, fillSize: iconAfterFillSize, badgeAppearance: iconBadgeAppearance, badgeClass: "menu-item__icon_after_badge", badgeShape: iconBadgeShape, badgeSize: iconBadgeSize, badgeTextColor: iconBadgeTextColor, badgeTextSize: iconBadgeTextSize, badgeValue: iconBadgeValue, iconFill: iconAfterFillIcon, iconSize: iconAfterSize, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter }))] })), after] }), showTooltip && (jsxRuntime.jsx(Icon.Tooltip, { appearance: tooltipAppearance, className: "menu-item__tooltip", ref: tooltipRef, minWidth: "auto", size: tooltipSize, fill: tooltipFill, left: "100%", zIndex: "100", titleTextColor: tooltipTitleTextColor, paddingLeft: "3m", text: tooltipText, textColor: tooltipTextColor, textSize: tooltipTextSize,
248
248
  // centering="vertical"
249
249
  shape: tooltipShape, shapeStrength: tooltipShapeStrength, isTooltipDisableState: true }))] }));
250
250
  }
@@ -44,7 +44,7 @@ const modalSheetBottomAppearance = {
44
44
  const modalSheetBottomConfig = {
45
45
  appearance: modalSheetBottomAppearance};
46
46
  const ModalSheetBottom = React.forwardRef(function Modal(props, ref) {
47
- const { appearance, initialIsOpen, title, isDisabled, closeButton, onCloseModalSheetBottom, onOpenModalSheetBottom, children, } = props;
47
+ const { appearance, initialIsOpen, title, closeButton, isDisabled, onCloseModalSheetBottom, onOpenModalSheetBottom, children, } = props;
48
48
  const [isOpen, setIsOpen] = React.useState(initialIsOpen);
49
49
  const openModalSheetBottom = React.useCallback(() => {
50
50
  setIsOpen(true);
@@ -65,7 +65,7 @@ const ModalSheetBottom = React.forwardRef(function Modal(props, ref) {
65
65
  const { titleTextColor, titleTextColorHover, titleTextSize, titleTextTruncate, titleTextWeight, titleTextWidth, titleTextWrap, zeroPadding, } = propsGenerator;
66
66
  // @ts-expect-error
67
67
  const { styles } = useStyles.useStyles(props);
68
- return (jsxRuntime.jsxs(reactModalSheet.Sheet, { className: "modal-sheet-bottom", isOpen: isOpen, onClose: closeModalSheetBottom, ...props, children: [jsxRuntime.jsxs(reactModalSheet.Sheet.Container, { className: "modal-sheet-bottom__container", style: styles, children: [jsxRuntime.jsx(reactModalSheet.Sheet.Header, { className: "modal-sheet-bottom__header", children: closeButton && (jsxRuntime.jsx("div", { className: "modal-sheet-bottom__close", onClick: closeModalSheetBottom, children: closeButton })) }), jsxRuntime.jsx(reactModalSheet.Sheet.Content, { className: "modal-sheet-bottom__content", children: jsxRuntime.jsx(reactModalSheet.Sheet.Scroller, { autoPadding: true, children: jsxRuntime.jsxs("div", { className: clsx('modal-sheet-bottom__content-wrapper', zeroPadding && 'modal-sheet-bottom__content-reset-padding'), children: [title && (jsxRuntime.jsx(Icon.Title, { className: "modal__title", width: titleTextWidth, size: titleTextSize, textColor: titleTextColor, textColorHover: titleTextColorHover, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, children: title })), children] }) }) })] }), jsxRuntime.jsx(reactModalSheet.Sheet.Backdrop, { className: "modal-sheet-bottom__backdrop", onClick: closeModalSheetBottom })] }));
68
+ return (jsxRuntime.jsxs(reactModalSheet.Sheet, { className: "modal-sheet-bottom", isOpen: isOpen, onClose: closeModalSheetBottom, ...props, children: [jsxRuntime.jsxs(reactModalSheet.Sheet.Container, { className: "modal-sheet-bottom__container", style: styles, children: [jsxRuntime.jsx(reactModalSheet.Sheet.Header, { className: "modal-sheet-bottom__header", children: closeButton && (jsxRuntime.jsx("div", { className: "modal-sheet-bottom__close", onClick: closeModalSheetBottom, children: closeButton })) }), jsxRuntime.jsx(reactModalSheet.Sheet.Content, { className: "modal-sheet-bottom__content", children: jsxRuntime.jsxs("div", { className: clsx('modal-sheet-bottom__content-wrapper', zeroPadding && 'modal-sheet-bottom__content-reset-padding'), children: [title && (jsxRuntime.jsx(Icon.Title, { className: "modal__title", width: titleTextWidth, size: titleTextSize, textColor: titleTextColor, textColorHover: titleTextColorHover, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, children: title })), children] }) })] }), jsxRuntime.jsx(reactModalSheet.Sheet.Backdrop, { className: "modal-sheet-bottom__backdrop", onClick: closeModalSheetBottom })] }));
69
69
  });
70
70
 
71
71
  exports.ModalSheetBottom = ModalSheetBottom;
@@ -2,7 +2,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { useCallback } from 'react';
3
3
  import clsx from 'clsx';
4
4
  import { DATE_PERIOD_INTERVALS } from '@itcase/common';
5
- import { D as DatePickerInput } from '../DatePicker_es_D2nmwYIx.js';
5
+ import { D as DatePickerInput } from '../DatePicker_es_VslTy9Qw.js';
6
6
  import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
7
7
  import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
8
8
  import { b as ChipsGroup, C as Chips } from '../ChipsGroup_es_Czu95rkL.js';
@@ -33,20 +33,43 @@ import '../Label_es_B5uGQwNN.js';
33
33
  import '@itcase/icons/default';
34
34
  import 'lodash/castArray';
35
35
 
36
+ const datePeriodAppearanceShape = {
37
+ circular: {
38
+ shape: 'circular',
39
+ },
40
+ rounded: {
41
+ shape: 'rounded',
42
+ },
43
+ roundedXL: {
44
+ shape: 'rounded',
45
+ shapeStrength: '2m',
46
+ },
47
+ roundedL: {
48
+ shape: 'rounded',
49
+ shapeStrength: '1_5m',
50
+ },
51
+ roundedM: {
52
+ shape: 'rounded',
53
+ shapeStrength: '1m',
54
+ },
55
+ roundedS: {
56
+ shape: 'rounded',
57
+ shapeStrength: '0_5m',
58
+ },
59
+ };
60
+
36
61
  const datePeriodAppearanceSize = {
37
62
  sizeL: {
38
- size: 'm',
39
- chipsAppearanceSize: 'sizeL',
63
+ size: 'l',
64
+ chipsAppearanceSize: 'sizeXL',
40
65
  datePickerAppearanceSize: 'sizeM',
41
- datePickerInputSize: 'l',
42
- datePickerInputTextSize: 'm',
66
+ datePickerInputAppearanceSize: 'sizeM',
43
67
  },
44
68
  sizeM: {
45
69
  size: 'm',
46
70
  chipsAppearanceSize: 'sizeL',
47
71
  datePickerAppearanceSize: 'sizeM',
48
- datePickerInputSize: 'm',
49
- datePickerInputTextSize: 'm',
72
+ datePickerInputAppearanceSize: 'sizeM',
50
73
  },
51
74
  };
52
75
 
@@ -72,6 +95,7 @@ const datePeriodAppearanceSurface = {
72
95
  const datePeriodAppearance = {
73
96
  ...datePeriodAppearanceSurface,
74
97
  ...datePeriodAppearanceSize,
98
+ ...datePeriodAppearanceShape,
75
99
  };
76
100
 
77
101
  const datePeriodConfig = {
@@ -84,7 +108,7 @@ function DatePeriod(props) {
84
108
  const { appearance, className, datePeriodIntervalsList = Object.values(DATE_PERIOD_INTERVALS), datePeriodValueEnd, datePeriodValueStart, monthsShown, selectsRange = true, isDisabled, isSkeleton, onChangeDatePeriod, onKeyDown, } = props;
85
109
  const appearanceConfig = useAppearanceConfig(appearance, datePeriodConfig, isDisabled);
86
110
  const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
87
- const { fillClass, chipsAppearance, chipsAppearanceSize, chipsShape, datePickerAppearance, datePickerAppearanceSize, datePickerInputAppearance, datePickerInputFillHover, datePickerInputSize, datePickerInputTextSize, shapeClass, sizeClass, } = propsGenerator;
111
+ const { fillClass, chipsAppearance, chipsAppearanceSize, chipsShape, datePickerAppearance, datePickerAppearanceSize, datePickerInputAppearance, datePickerInputAppearanceSize, datePickerInputFillHover, datePickerInputSize, datePickerInputTextSize, shapeClass, shapeStrengthClass, sizeClass, } = propsGenerator;
88
112
  const onClickPeriodChips = useCallback((selectedPeriodItem) => {
89
113
  const dateStartIso = selectedPeriodItem.dateIntervalsList[0];
90
114
  const dateEndIso = selectedPeriodItem.dateIntervalsList[1];
@@ -110,7 +134,7 @@ function DatePeriod(props) {
110
134
  // },
111
135
  // [onChangeDatePeriod],
112
136
  // )
113
- return (jsx("div", { className: clsx(className, 'date-period', shapeClass && `date-period_shape_${shapeClass}`, sizeClass && `date-period_size_${sizeClass}`, isSkeleton && `date-period_skeleton`, fillClass && `fill_${fillClass}`, 'cursor_type_pointer'), children: jsxs(ChipsGroup, { direction: "horizontal", children: [datePeriodIntervalsList.map((datePeriodItem) => (jsx(Chips, { appearance: `${chipsAppearance} ${chipsAppearanceSize}`, label: datePeriodItem.label, shape: chipsShape, isActive: checkIsChipsActive(datePeriodItem), onClick: () => onClickPeriodChips(datePeriodItem) }, datePeriodItem.value))), jsx(DatePickerInput, { className: "date-period__datepicker", datePickerProps: {
137
+ return (jsx("div", { className: clsx(className, 'date-period', shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, sizeClass && `date-period_size_${sizeClass}`, isSkeleton && `date-period_skeleton`, fillClass && `fill_${fillClass}`, 'cursor_type_pointer'), children: jsxs(ChipsGroup, { className: "date-period__choice", direction: "horizontal", children: [datePeriodIntervalsList.map((datePeriodItem) => (jsx(Chips, { appearance: `${chipsAppearance} ${chipsAppearanceSize}`, label: datePeriodItem.label, shape: chipsShape, isActive: checkIsChipsActive(datePeriodItem), onClick: () => onClickPeriodChips(datePeriodItem) }, datePeriodItem.value))), jsx(DatePickerInput, { className: "date-period__datepicker", datePickerProps: {
114
138
  appearance: `${datePickerAppearance} ${datePickerAppearanceSize}`,
115
139
  dateFormat: 'dd/MM/yyyy',
116
140
  monthsShown: monthsShown,
@@ -120,7 +144,7 @@ function DatePeriod(props) {
120
144
  isStartDefaultNull: true,
121
145
  onKeyDown: onKeyDown,
122
146
  }, endValue: datePeriodValueEnd, inputProps: {
123
- appearance: `${datePickerInputAppearance} ghost`,
147
+ appearance: `${datePickerInputAppearance} ${datePickerInputAppearanceSize} ghost`,
124
148
  className: `date-period__datepicker-input date-period__datepicker-input_size_${datePickerInputSize}`,
125
149
  fillHover: datePickerInputFillHover,
126
150
  textSize: datePickerInputTextSize,
@@ -1,4 +1,4 @@
1
- export { D as DatePickerInput, a as datePickerAppearance, d as datePickerConfig } from '../DatePicker_es_D2nmwYIx.js';
1
+ export { D as DatePickerInput, a as datePickerAppearance, d as datePickerConfig } from '../DatePicker_es_VslTy9Qw.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
4
4
  import 'clsx';
@@ -242,7 +242,7 @@ function MenuItem(props) {
242
242
  : fillActiveHoverClass && `fill_active_hover_${fillActiveHoverClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass
243
243
  ? `shape-strength_${shapeStrengthClass}`
244
244
  : shapeClass === 'rounded' && 'shape-strength_default', typeClass && `menu-item_type_${typeClass}`, widthClass && `width_${widthClass}`, justifyContentClass &&
245
- `menu-item_justify-content_${justifyContentClass}`, isSkeleton && `menu-item_skeleton`), style: menuItem, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: [jsxs(Link, { className: clsx('menu-item__wrapper', alignDirectionClass && `align_${alignDirectionClass}`, alignClass && `align_${alignClass}`), href: link || href, LinkComponent: LinkComponent, rel: rel, target: target, underline: underline, children: [before, children || (jsxs(React.Fragment, { children: [(iconBefore || iconBeforeSrc) && (jsx(Icon, { className: clsx('menu-item__icon_before', iconBadgeValue && 'menu-item__icon_before-badge'), fill: iconBeforeFill, fillSize: iconBeforeFillSize, badgeAppearance: iconBadgeAppearance, badgeClass: 'menu-item__icon_before_badge', badgeShape: iconBadgeShape, badgeSize: iconBadgeSize, badgeTextColor: iconBadgeTextColor, badgeTextSize: iconBadgeTextSize, badgeValue: iconBadgeValue, iconFill: iconBeforeFillIcon, iconSize: iconBeforeSize, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), label && (jsx(Text, { className: "menu-item__label", size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorDisabled: labelTextColorDisabled, textColorHover: labelTextColorHover, textStyle: labelStyle, textWeight: labelWeight, textWrap: labelWrap, isActive: isActive, isDisabled: isDisabled, children: label })), (iconAfter || iconAfterSrc) && (jsx(Icon, { className: clsx('menu-item__icon_after', iconBadgeValue && 'menu-item__icon_after-badge'), fill: iconAfterFill, fillSize: iconAfterFillSize, badgeAppearance: iconBadgeAppearance, badgeClass: "menu-item__icon_after_badge", badgeShape: iconBadgeShape, badgeSize: iconBadgeSize, badgeTextColor: iconBadgeTextColor, badgeTextSize: iconBadgeTextSize, badgeValue: iconBadgeValue, iconFill: iconAfterFillIcon, iconSize: iconAfterSize, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter }))] })), after] }), showTooltip && (jsx(Tooltip, { appearance: tooltipAppearance, className: "menu-item__tooltip", ref: tooltipRef, minWidth: "auto", size: tooltipSize, fill: tooltipFill, left: "100%", zIndex: "100", titleTextColor: tooltipTitleTextColor, marginLeft: "3m", text: tooltipText, textColor: tooltipTextColor, textSize: tooltipTextSize,
245
+ `menu-item_justify-content_${justifyContentClass}`, isSkeleton && `menu-item_skeleton`), style: menuItem, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: [jsxs(Link, { className: clsx('menu-item__wrapper', alignDirectionClass && `align_${alignDirectionClass}`, alignClass && `align_${alignClass}`), href: link || href, LinkComponent: LinkComponent, rel: rel, target: target, underline: underline, children: [before, children || (jsxs(React.Fragment, { children: [(iconBefore || iconBeforeSrc) && (jsx(Icon, { className: clsx('menu-item__icon_before', iconBadgeValue && 'menu-item__icon_before-badge'), fill: iconBeforeFill, fillSize: iconBeforeFillSize, badgeAppearance: iconBadgeAppearance, badgeClass: 'menu-item__icon_before_badge', badgeShape: iconBadgeShape, badgeSize: iconBadgeSize, badgeTextColor: iconBadgeTextColor, badgeTextSize: iconBadgeTextSize, badgeValue: iconBadgeValue, iconFill: iconBeforeFillIcon, iconSize: iconBeforeSize, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), label && (jsx(Text, { className: "menu-item__label", size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorDisabled: labelTextColorDisabled, textColorHover: labelTextColorHover, textStyle: labelStyle, textWeight: labelWeight, textWrap: labelWrap, isActive: isActive, isDisabled: isDisabled, children: label })), (iconAfter || iconAfterSrc) && (jsx(Icon, { className: clsx('menu-item__icon_after', iconBadgeValue && 'menu-item__icon_after-badge'), fill: iconAfterFill, fillSize: iconAfterFillSize, badgeAppearance: iconBadgeAppearance, badgeClass: "menu-item__icon_after_badge", badgeShape: iconBadgeShape, badgeSize: iconBadgeSize, badgeTextColor: iconBadgeTextColor, badgeTextSize: iconBadgeTextSize, badgeValue: iconBadgeValue, iconFill: iconAfterFillIcon, iconSize: iconAfterSize, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter }))] })), after] }), showTooltip && (jsx(Tooltip, { appearance: tooltipAppearance, className: "menu-item__tooltip", ref: tooltipRef, minWidth: "auto", size: tooltipSize, fill: tooltipFill, left: "100%", zIndex: "100", titleTextColor: tooltipTitleTextColor, paddingLeft: "3m", text: tooltipText, textColor: tooltipTextColor, textSize: tooltipTextSize,
246
246
  // centering="vertical"
247
247
  shape: tooltipShape, shapeStrength: tooltipShapeStrength, isTooltipDisableState: true }))] }));
248
248
  }
@@ -42,7 +42,7 @@ const modalSheetBottomAppearance = {
42
42
  const modalSheetBottomConfig = {
43
43
  appearance: modalSheetBottomAppearance};
44
44
  const ModalSheetBottom = React.forwardRef(function Modal(props, ref) {
45
- const { appearance, initialIsOpen, title, isDisabled, closeButton, onCloseModalSheetBottom, onOpenModalSheetBottom, children, } = props;
45
+ const { appearance, initialIsOpen, title, closeButton, isDisabled, onCloseModalSheetBottom, onOpenModalSheetBottom, children, } = props;
46
46
  const [isOpen, setIsOpen] = useState(initialIsOpen);
47
47
  const openModalSheetBottom = useCallback(() => {
48
48
  setIsOpen(true);
@@ -63,7 +63,7 @@ const ModalSheetBottom = React.forwardRef(function Modal(props, ref) {
63
63
  const { titleTextColor, titleTextColorHover, titleTextSize, titleTextTruncate, titleTextWeight, titleTextWidth, titleTextWrap, zeroPadding, } = propsGenerator;
64
64
  // @ts-expect-error
65
65
  const { styles } = useStyles(props);
66
- return (jsxs(Sheet, { className: "modal-sheet-bottom", isOpen: isOpen, onClose: closeModalSheetBottom, ...props, children: [jsxs(Sheet.Container, { className: "modal-sheet-bottom__container", style: styles, children: [jsx(Sheet.Header, { className: "modal-sheet-bottom__header", children: closeButton && (jsx("div", { className: "modal-sheet-bottom__close", onClick: closeModalSheetBottom, children: closeButton })) }), jsx(Sheet.Content, { className: "modal-sheet-bottom__content", children: jsx(Sheet.Scroller, { autoPadding: true, children: jsxs("div", { className: clsx('modal-sheet-bottom__content-wrapper', zeroPadding && 'modal-sheet-bottom__content-reset-padding'), children: [title && (jsx(Title, { className: "modal__title", width: titleTextWidth, size: titleTextSize, textColor: titleTextColor, textColorHover: titleTextColorHover, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, children: title })), children] }) }) })] }), jsx(Sheet.Backdrop, { className: "modal-sheet-bottom__backdrop", onClick: closeModalSheetBottom })] }));
66
+ return (jsxs(Sheet, { className: "modal-sheet-bottom", isOpen: isOpen, onClose: closeModalSheetBottom, ...props, children: [jsxs(Sheet.Container, { className: "modal-sheet-bottom__container", style: styles, children: [jsx(Sheet.Header, { className: "modal-sheet-bottom__header", children: closeButton && (jsx("div", { className: "modal-sheet-bottom__close", onClick: closeModalSheetBottom, children: closeButton })) }), jsx(Sheet.Content, { className: "modal-sheet-bottom__content", children: jsxs("div", { className: clsx('modal-sheet-bottom__content-wrapper', zeroPadding && 'modal-sheet-bottom__content-reset-padding'), children: [title && (jsx(Title, { className: "modal__title", width: titleTextWidth, size: titleTextSize, textColor: titleTextColor, textColorHover: titleTextColorHover, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, children: title })), children] }) })] }), jsx(Sheet.Backdrop, { className: "modal-sheet-bottom__backdrop", onClick: closeModalSheetBottom })] }));
67
67
  });
68
68
 
69
69
  export { ModalSheetBottom, modalSheetBottomAppearance };
@@ -42,9 +42,6 @@
42
42
  }
43
43
  }
44
44
  :root {
45
- /* Default */
46
- --chips-shape-rounded-default: 8px;
47
-
48
45
  /* Size XXL */
49
46
  --chips-xxl-gap: 4px;
50
47
  --chips-xxl-padding: 12px 16px;
@@ -1,5 +1,8 @@
1
1
  .date-period {
2
2
  display: flex;
3
+ &__choice {
4
+ align-items: center !important;
5
+ }
3
6
  &__datepicker {
4
7
  min-width: 220px;
5
8
  }
@@ -27,19 +30,6 @@
27
30
  background-position: -200%;
28
31
  }
29
32
  }
30
- .date-period {
31
- &_shape {
32
- &_circular {
33
- border-radius: 50%;
34
- }
35
- &_geometric {
36
- border-radius: 0;
37
- }
38
- &_rounded {
39
- border-radius: var(--date-period-shape-default);
40
- }
41
- }
42
- }
43
33
  .date-period {
44
34
  &_size {
45
35
  @each $size in xxs, xs, s, m, l, xl, xxl {
@@ -60,25 +50,20 @@
60
50
  }
61
51
  }
62
52
  :root {
63
- --date-period-shape-default: 8px;
64
-
65
53
  /* Size XXL */
66
54
  --date-period-xxl-padding: 2m 2m;
67
55
  --date-period-xxl-min-width: 48px;
68
56
  --date-period-xxl-min-height: 48px;
69
- --date-period-xxl-shape-rounded: 8px;
70
57
 
71
58
  /* Size XL */
72
59
  --date-period-xl-padding: 1m 1m;
73
60
  --date-period-xl-min-width: 40px;
74
61
  --date-period-xl-min-height: 40px;
75
- --date-period-xl-shape-rounded: 8px;
76
62
 
77
63
  /* Size L */
78
- --date-period-l-padding: 0.5m 0.5m;
64
+ --date-period-l-padding: 0.25m 0.25m;
79
65
  --date-period-l-min-width: 32px;
80
- --date-period-l-min-height: 32px;
81
- --date-period-l-shape-rounded: 8px;
66
+ --date-period-l-min-height: 48px;
82
67
  --date-period-datepicker-input-l-padding: 0.5m 12px;
83
68
  --date-period-datepicker-input-l-min-height: 32px;
84
69
 
@@ -86,23 +71,19 @@
86
71
  --date-period-m-padding: 2px;
87
72
  --date-period-m-min-width: 36px;
88
73
  --date-period-m-min-height: 36px;
89
- --date-period-m-shape-rounded: 8px;
90
74
 
91
75
  /* Size S */
92
76
  --date-period-s-padding: 0.25m 0.5m;
93
77
  --date-period-s-min-width: 24px;
94
78
  --date-period-s-min-height: 24px;
95
- --date-period-s-shape-rounded: 8px;
96
79
 
97
80
  /* Size XS */
98
81
  --date-period-xs-padding: 0.5m 0.5m;
99
82
  --date-period-xs-min-width: 20px;
100
83
  --date-period-xs-min-height: 20px;
101
- --date-period-xs-shape-rounded: 8px;
102
84
 
103
85
  /* Size XXS */
104
86
  --date-period-xxs-padding: 0.25m 0.25m;
105
87
  --date-period-xxs-min-width: 16px;
106
88
  --date-period-xxs-min-height: 16px;
107
- --date-period-xxs-shape-rounded: 8px;
108
89
  }
@@ -1359,7 +1359,9 @@ h2.react-datepicker__current-month {
1359
1359
  );
1360
1360
 
1361
1361
  --date-picker-day-selected-background: var(--color-accent-fill-primary);
1362
- --date-picker-day-selected-background-hover: var(--color-accent-fill-hover);
1362
+ --date-picker-day-selected-background-hover: var(
1363
+ --color-accent-fill-secondary
1364
+ );
1363
1365
  --date-picker-day-selected-text-color: var(--color-accent-text-primary);
1364
1366
  --date-picker-day-selected-text-hover-color: var(--color-accent-text-primary);
1365
1367