@alfalab/core-components-calendar-range 7.7.8 → 7.8.1

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.
Files changed (56) hide show
  1. package/Component.d.ts +4 -0
  2. package/components/divider/Component.js +1 -1
  3. package/components/divider/index.css +8 -8
  4. package/cssm/Component.d.ts +4 -0
  5. package/cssm/shared/index.d.ts +1 -0
  6. package/cssm/shared/index.js +9 -0
  7. package/cssm/utils.d.ts +6 -1
  8. package/cssm/utils.js +10 -0
  9. package/cssm/views/index.module.css +5 -1
  10. package/cssm/views/static.js +11 -7
  11. package/esm/Component.d.ts +4 -0
  12. package/esm/components/divider/Component.js +1 -1
  13. package/esm/components/divider/index.css +8 -8
  14. package/esm/index.module-3db56f4f.js +4 -0
  15. package/esm/shared/index.d.ts +1 -0
  16. package/esm/shared/index.js +1 -0
  17. package/esm/utils.d.ts +6 -1
  18. package/esm/utils.js +10 -1
  19. package/esm/views/index.css +12 -8
  20. package/esm/views/popover.js +1 -1
  21. package/esm/views/static.js +12 -8
  22. package/index.module-fc7ba92f.js +6 -0
  23. package/modern/Component.d.ts +4 -0
  24. package/modern/components/divider/Component.js +1 -1
  25. package/modern/components/divider/index.css +8 -8
  26. package/modern/index.module-9214722c.js +4 -0
  27. package/modern/shared/index.d.ts +1 -0
  28. package/modern/shared/index.js +1 -0
  29. package/modern/utils.d.ts +6 -1
  30. package/modern/utils.js +10 -1
  31. package/modern/views/index.css +12 -8
  32. package/modern/views/popover.js +1 -1
  33. package/modern/views/static.js +12 -8
  34. package/moderncssm/Component.d.ts +4 -0
  35. package/moderncssm/shared/index.d.ts +1 -0
  36. package/moderncssm/shared/index.js +1 -0
  37. package/moderncssm/utils.d.ts +6 -1
  38. package/moderncssm/utils.js +10 -1
  39. package/moderncssm/views/index.module.css +5 -0
  40. package/moderncssm/views/static.js +11 -7
  41. package/package.json +7 -6
  42. package/shared/index.d.ts +1 -0
  43. package/shared/index.js +9 -0
  44. package/src/Component.tsx +5 -0
  45. package/src/shared/index.ts +1 -0
  46. package/src/utils.ts +10 -0
  47. package/src/views/index.module.css +6 -0
  48. package/src/views/static.tsx +44 -34
  49. package/utils.d.ts +6 -1
  50. package/utils.js +10 -0
  51. package/views/index.css +12 -8
  52. package/views/popover.js +1 -1
  53. package/views/static.js +12 -8
  54. package/esm/index.module-d3baf04c.js +0 -4
  55. package/index.module-79a5a9cb.js +0 -6
  56. package/modern/index.module-d3a797b9.js +0 -4
@@ -0,0 +1 @@
1
+ export { getCalendarRangeTestIds } from '../utils.js';
package/modern/utils.d.ts CHANGED
@@ -1,2 +1,7 @@
1
1
  declare const isDayButton: (node: HTMLElement | null) => string | false | null | undefined;
2
- export { isDayButton };
2
+ declare function getCalendarRangeTestIds(dataTestId: string): {
3
+ component: string;
4
+ calendarContainerFrom: string;
5
+ calendarContainerTo: string;
6
+ };
7
+ export { isDayButton, getCalendarRangeTestIds };
package/modern/utils.js CHANGED
@@ -1,3 +1,12 @@
1
+ import { getDataTestId } from '@alfalab/core-components-shared/modern';
2
+
1
3
  const isDayButton = (node) => node && node.tagName === 'BUTTON' && node.dataset.date;
4
+ function getCalendarRangeTestIds(dataTestId) {
5
+ return {
6
+ component: dataTestId,
7
+ calendarContainerFrom: getDataTestId(dataTestId, 'container-from'),
8
+ calendarContainerTo: getDataTestId(dataTestId, 'container-to'),
9
+ };
10
+ }
2
11
 
3
- export { isDayButton };
12
+ export { getCalendarRangeTestIds, isDayButton };
@@ -1,4 +1,4 @@
1
- /* hash: brnst */
1
+ /* hash: 1o0oo */
2
2
  :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -45,16 +45,20 @@
45
45
  /* disabled */
46
46
 
47
47
  /* marker */
48
- } .calendar-range__component_1paco {
48
+ } .calendar-range__component_fem4f {
49
49
  display: flex
50
- } .calendar-range__component_1paco button[aria-selected='true'] {
50
+ } .calendar-range__component_fem4f button[aria-selected='true'] {
51
51
  cursor: pointer;
52
- } .calendar-range__component_1paco *[class*='errorIcon_'] {
52
+ } .calendar-range__component_fem4f *[class*='errorIcon_'] {
53
53
  display: none;
54
- } .calendar-range__component_1paco *[class*='calendarIcon_'] {
54
+ } .calendar-range__component_fem4f *[class*='calendarIcon_'] {
55
55
  margin-right: var(--gap-0);
56
- } .calendar-range__static_1paco .calendar-range__calendar_1paco {
56
+ } .calendar-range__static_fem4f .calendar-range__calendar_fem4f {
57
57
  width: var(--calendar-inner-width)
58
- } .calendar-range__static_1paco .calendar-range__calendar_1paco > div:first-child {
58
+ } .calendar-range__static_fem4f .calendar-range__calendar_fem4f > div:first-child {
59
59
  padding: var(--gap-16) var(--gap-0) var(--gap-12);
60
- }
60
+ } .calendar-range__calendarContainer_fem4f {
61
+ width: var(--calendar-inner-width);
62
+ display: flex;
63
+ justify-content: center;
64
+ }
@@ -7,7 +7,7 @@ import { isCompleteDateInput } from '@alfalab/core-components-date-input/modern'
7
7
  import { useDidUpdateEffect } from '@alfalab/hooks';
8
8
  import { Divider } from '../components/divider/Component.js';
9
9
  import { usePopoverViewMonthes } from '../hooks.js';
10
- import { s as styles } from '../index.module-d3a797b9.js';
10
+ import { s as styles } from '../index.module-9214722c.js';
11
11
 
12
12
  const CalendarRangePopover = ({ className, defaultMonth = startOfMonth(new Date()).getTime(), minDate, maxDate, valueFrom = '', valueTo = '', onDateFromChange = () => null, onDateToChange = () => null, onChange = () => null, onError, inputFromProps = {}, inputToProps = {}, offDays, events, returnInvalidDates = false, dataTestId, }) => {
13
13
  const [inputFromValue, setInputFromValue] = useState(valueFrom);
@@ -10,13 +10,14 @@ import { CalendarDesktop } from '@alfalab/core-components-calendar/modern/deskto
10
10
  import { usePeriodWithReset } from '@alfalab/core-components-calendar/modern/shared';
11
11
  import { isValidInputValue, parseDateString, formatDate } from '@alfalab/core-components-calendar-input/modern/shared';
12
12
  import { isCompleteDateInput, DateInput } from '@alfalab/core-components-date-input/modern';
13
+ import { getDataTestId } from '@alfalab/core-components-shared/modern';
13
14
  import { Divider } from '../components/divider/Component.js';
14
15
  import { useStaticViewMonthes, useSelectionProps } from '../hooks.js';
15
16
  import { isDayButton } from '../utils.js';
16
- import { s as styles } from '../index.module-d3a797b9.js';
17
+ import { s as styles } from '../index.module-9214722c.js';
17
18
 
18
19
  /* eslint-disable complexity */
19
- const CalendarRangeStatic = ({ className, defaultMonth = startOfMonth(new Date()).getTime(), defaultMonthPosition = 'left', minDate, maxDate, valueFrom = '', valueTo = '', onDateFromChange = () => null, onDateToChange = () => null, onChange = () => null, onError, inputFromProps = {}, inputToProps = {}, offDays, events, returnInvalidDates = false, dataTestId, }) => {
20
+ const CalendarRangeStatic = ({ className, defaultMonth = startOfMonth(new Date()).getTime(), defaultMonthPosition = 'left', minDate, maxDate, valueFrom = '', valueTo = '', onDateFromChange = () => null, onDateToChange = () => null, onChange = () => null, onError, inputFromProps = {}, inputToProps = {}, offDays, events, returnInvalidDates = false, dataTestId, calendarContainerClassName, }) => {
20
21
  const [inputFromValue, setInputFromValue] = useState(valueFrom);
21
22
  const [inputToValue, setInputToValue] = useState(valueTo);
22
23
  let dateFrom = isValidInputValue(inputFromValue, minDate, maxDate, offDays)
@@ -160,17 +161,20 @@ const CalendarRangeStatic = ({ className, defaultMonth = startOfMonth(new Date()
160
161
  React.createElement(DateInput, { ...dateInputFromProps, mobileMode: dateInputFromProps.mobileMode === 'popover'
161
162
  ? 'input'
162
163
  : dateInputFromProps.mobileMode, value: inputFromValue, onChange: handleInputFromChange, onClear: handleClearFrom, onBlur: handleValidInputFrom, error: bothInvalid || inputFromInvalid || dateInputFromProps.error, clear: true, block: true }),
163
- React.createElement(CalendarFromComponent, { ...calendarFromProps, className: cn(styles.calendar, calendarFromProps?.className), month: monthFrom, selectorView: 'month-only', offDays: offDays, events: events, onChange: period.updatePeriod, onMonthChange: handleMonthFromChange, minDate: minDate, maxDate: minMaxInSameMonth
164
- ? maxDate
165
- : maxDate && max([maxDate, endOfMonth(subMonths(maxDate, 1))]).getTime(), ...rangeProps })),
164
+ React.createElement("div", { className: cn(styles.calendarContainer, calendarContainerClassName), "data-test-id": getDataTestId(dataTestId, 'container-from') },
165
+ React.createElement(CalendarFromComponent, { ...calendarFromProps, className: cn(styles.calendar, calendarFromProps?.className), month: monthFrom, selectorView: 'month-only', offDays: offDays, events: events, onChange: period.updatePeriod, onMonthChange: handleMonthFromChange, minDate: minDate, maxDate: minMaxInSameMonth
166
+ ? maxDate
167
+ : maxDate &&
168
+ max([maxDate, endOfMonth(subMonths(maxDate, 1))]).getTime(), ...rangeProps }))),
166
169
  React.createElement(Divider, { inputFromProps: inputFromProps, inputToProps: inputToProps }),
167
170
  React.createElement("div", null,
168
171
  React.createElement(DateInput, { ...dateInputToProps, mobileMode: dateInputToProps.mobileMode === 'popover'
169
172
  ? 'input'
170
173
  : dateInputToProps.mobileMode, value: inputToValue, onChange: handleInputToChange, onClear: handleClearTo, onBlur: handleValidInputTo, error: bothInvalid || inputToInvalid || dateInputToProps.error, clear: true, block: true }),
171
- React.createElement(CalendarToComponent, { ...calendarToProps, className: cn(styles.calendar, calendarToProps?.className), month: monthTo, selectorView: 'month-only', offDays: offDays, events: events, onChange: period.updatePeriod, onMonthChange: handleMonthToChange, minDate: minMaxInSameMonth
172
- ? minDate
173
- : minDate && startOfMonth(addMonths(minDate, 1)).getTime(), maxDate: maxDate, ...rangeProps }))));
174
+ React.createElement("div", { "data-test-id": getDataTestId(dataTestId, 'container-to') },
175
+ React.createElement(CalendarToComponent, { ...calendarToProps, className: cn(styles.calendar, calendarToProps?.className), month: monthTo, selectorView: 'month-only', offDays: offDays, events: events, onChange: period.updatePeriod, onMonthChange: handleMonthToChange, minDate: minMaxInSameMonth
176
+ ? minDate
177
+ : minDate && startOfMonth(addMonths(minDate, 1)).getTime(), maxDate: maxDate, ...rangeProps })))));
174
178
  };
175
179
 
176
180
  export { CalendarRangeStatic };
@@ -85,6 +85,10 @@ type CalendarRangeProps = {
85
85
  * Возвращать невалидную дату для кастомной валидации
86
86
  */
87
87
  returnInvalidDates?: boolean;
88
+ /**
89
+ * Дополнительный класс для контейнера календаря
90
+ */
91
+ calendarContainerClassName?: string;
88
92
  };
89
93
  declare const CalendarRange: FC<CalendarRangeProps>;
90
94
  export { CalendarRangeProps, CalendarRange };
@@ -0,0 +1 @@
1
+ export { getCalendarRangeTestIds } from "../utils";
@@ -0,0 +1 @@
1
+ export { getCalendarRangeTestIds } from '../utils.js';
@@ -1,2 +1,7 @@
1
1
  declare const isDayButton: (node: HTMLElement | null) => string | false | null | undefined;
2
- export { isDayButton };
2
+ declare function getCalendarRangeTestIds(dataTestId: string): {
3
+ component: string;
4
+ calendarContainerFrom: string;
5
+ calendarContainerTo: string;
6
+ };
7
+ export { isDayButton, getCalendarRangeTestIds };
@@ -1,3 +1,12 @@
1
+ import { getDataTestId } from '@alfalab/core-components-shared/moderncssm';
2
+
1
3
  const isDayButton = (node) => node && node.tagName === 'BUTTON' && node.dataset.date;
4
+ function getCalendarRangeTestIds(dataTestId) {
5
+ return {
6
+ component: dataTestId,
7
+ calendarContainerFrom: getDataTestId(dataTestId, 'container-from'),
8
+ calendarContainerTo: getDataTestId(dataTestId, 'container-to'),
9
+ };
10
+ }
2
11
 
3
- export { isDayButton };
12
+ export { getCalendarRangeTestIds, isDayButton };
@@ -40,3 +40,8 @@
40
40
  .static .calendar > div:first-child {
41
41
  padding: var(--gap-16) var(--gap-0) var(--gap-12);
42
42
  }
43
+ .calendarContainer {
44
+ width: var(--calendar-inner-width);
45
+ display: flex;
46
+ justify-content: center;
47
+ }
@@ -10,13 +10,14 @@ import { CalendarDesktop } from '@alfalab/core-components-calendar/moderncssm/de
10
10
  import { usePeriodWithReset } from '@alfalab/core-components-calendar/moderncssm/shared';
11
11
  import { isValidInputValue, parseDateString, formatDate } from '@alfalab/core-components-calendar-input/moderncssm/shared';
12
12
  import { isCompleteDateInput, DateInput } from '@alfalab/core-components-date-input/moderncssm';
13
+ import { getDataTestId } from '@alfalab/core-components-shared/moderncssm';
13
14
  import { Divider } from '../components/divider/Component.js';
14
15
  import { useStaticViewMonthes, useSelectionProps } from '../hooks.js';
15
16
  import { isDayButton } from '../utils.js';
16
17
  import styles from './index.module.css';
17
18
 
18
19
  /* eslint-disable complexity */
19
- const CalendarRangeStatic = ({ className, defaultMonth = startOfMonth(new Date()).getTime(), defaultMonthPosition = 'left', minDate, maxDate, valueFrom = '', valueTo = '', onDateFromChange = () => null, onDateToChange = () => null, onChange = () => null, onError, inputFromProps = {}, inputToProps = {}, offDays, events, returnInvalidDates = false, dataTestId, }) => {
20
+ const CalendarRangeStatic = ({ className, defaultMonth = startOfMonth(new Date()).getTime(), defaultMonthPosition = 'left', minDate, maxDate, valueFrom = '', valueTo = '', onDateFromChange = () => null, onDateToChange = () => null, onChange = () => null, onError, inputFromProps = {}, inputToProps = {}, offDays, events, returnInvalidDates = false, dataTestId, calendarContainerClassName, }) => {
20
21
  const [inputFromValue, setInputFromValue] = useState(valueFrom);
21
22
  const [inputToValue, setInputToValue] = useState(valueTo);
22
23
  let dateFrom = isValidInputValue(inputFromValue, minDate, maxDate, offDays)
@@ -160,17 +161,20 @@ const CalendarRangeStatic = ({ className, defaultMonth = startOfMonth(new Date()
160
161
  React.createElement(DateInput, { ...dateInputFromProps, mobileMode: dateInputFromProps.mobileMode === 'popover'
161
162
  ? 'input'
162
163
  : dateInputFromProps.mobileMode, value: inputFromValue, onChange: handleInputFromChange, onClear: handleClearFrom, onBlur: handleValidInputFrom, error: bothInvalid || inputFromInvalid || dateInputFromProps.error, clear: true, block: true }),
163
- React.createElement(CalendarFromComponent, { ...calendarFromProps, className: cn(styles.calendar, calendarFromProps?.className), month: monthFrom, selectorView: 'month-only', offDays: offDays, events: events, onChange: period.updatePeriod, onMonthChange: handleMonthFromChange, minDate: minDate, maxDate: minMaxInSameMonth
164
- ? maxDate
165
- : maxDate && max([maxDate, endOfMonth(subMonths(maxDate, 1))]).getTime(), ...rangeProps })),
164
+ React.createElement("div", { className: cn(styles.calendarContainer, calendarContainerClassName), "data-test-id": getDataTestId(dataTestId, 'container-from') },
165
+ React.createElement(CalendarFromComponent, { ...calendarFromProps, className: cn(styles.calendar, calendarFromProps?.className), month: monthFrom, selectorView: 'month-only', offDays: offDays, events: events, onChange: period.updatePeriod, onMonthChange: handleMonthFromChange, minDate: minDate, maxDate: minMaxInSameMonth
166
+ ? maxDate
167
+ : maxDate &&
168
+ max([maxDate, endOfMonth(subMonths(maxDate, 1))]).getTime(), ...rangeProps }))),
166
169
  React.createElement(Divider, { inputFromProps: inputFromProps, inputToProps: inputToProps }),
167
170
  React.createElement("div", null,
168
171
  React.createElement(DateInput, { ...dateInputToProps, mobileMode: dateInputToProps.mobileMode === 'popover'
169
172
  ? 'input'
170
173
  : dateInputToProps.mobileMode, value: inputToValue, onChange: handleInputToChange, onClear: handleClearTo, onBlur: handleValidInputTo, error: bothInvalid || inputToInvalid || dateInputToProps.error, clear: true, block: true }),
171
- React.createElement(CalendarToComponent, { ...calendarToProps, className: cn(styles.calendar, calendarToProps?.className), month: monthTo, selectorView: 'month-only', offDays: offDays, events: events, onChange: period.updatePeriod, onMonthChange: handleMonthToChange, minDate: minMaxInSameMonth
172
- ? minDate
173
- : minDate && startOfMonth(addMonths(minDate, 1)).getTime(), maxDate: maxDate, ...rangeProps }))));
174
+ React.createElement("div", { "data-test-id": getDataTestId(dataTestId, 'container-to') },
175
+ React.createElement(CalendarToComponent, { ...calendarToProps, className: cn(styles.calendar, calendarToProps?.className), month: monthTo, selectorView: 'month-only', offDays: offDays, events: events, onChange: period.updatePeriod, onMonthChange: handleMonthToChange, minDate: minMaxInSameMonth
176
+ ? minDate
177
+ : minDate && startOfMonth(addMonths(minDate, 1)).getTime(), maxDate: maxDate, ...rangeProps })))));
174
178
  };
175
179
 
176
180
  export { CalendarRangeStatic };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-calendar-range",
3
- "version": "7.7.8",
3
+ "version": "7.8.1",
4
4
  "description": "Calendar range component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -16,14 +16,15 @@
16
16
  "react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
17
17
  },
18
18
  "dependencies": {
19
- "@alfalab/core-components-calendar": "^7.17.1",
20
- "@alfalab/core-components-calendar-input": "^10.4.11",
21
- "@alfalab/core-components-date-input": "^4.4.10",
22
- "@alfalab/hooks": "^1.13.0",
19
+ "@alfalab/core-components-calendar": "^7.17.3",
20
+ "@alfalab/core-components-calendar-input": "^10.4.13",
21
+ "@alfalab/core-components-date-input": "^4.4.12",
22
+ "@alfalab/core-components-shared": "^0.14.1",
23
+ "@alfalab/hooks": "^1.13.1",
23
24
  "classnames": "^2.5.1",
24
25
  "date-fns": "^2.16.1",
25
26
  "tslib": "^2.4.0"
26
27
  },
27
- "themesVersion": "13.6.0",
28
+ "themesVersion": "13.7.0",
28
29
  "varsVersion": "9.16.0"
29
30
  }
@@ -0,0 +1 @@
1
+ export { getCalendarRangeTestIds } from "../utils";
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var utils = require('../utils.js');
6
+
7
+
8
+
9
+ exports.getCalendarRangeTestIds = utils.getCalendarRangeTestIds;
package/src/Component.tsx CHANGED
@@ -101,6 +101,11 @@ export type CalendarRangeProps = {
101
101
  * Возвращать невалидную дату для кастомной валидации
102
102
  */
103
103
  returnInvalidDates?: boolean;
104
+
105
+ /**
106
+ * Дополнительный класс для контейнера календаря
107
+ */
108
+ calendarContainerClassName?: string;
104
109
  };
105
110
 
106
111
  export const CalendarRange: FC<CalendarRangeProps> = ({
@@ -0,0 +1 @@
1
+ export { getCalendarRangeTestIds } from '../utils';
package/src/utils.ts CHANGED
@@ -1,2 +1,12 @@
1
+ import { getDataTestId } from '@alfalab/core-components-shared';
2
+
1
3
  export const isDayButton = (node: HTMLElement | null) =>
2
4
  node && node.tagName === 'BUTTON' && node.dataset.date;
5
+
6
+ export function getCalendarRangeTestIds(dataTestId: string) {
7
+ return {
8
+ component: dataTestId,
9
+ calendarContainerFrom: getDataTestId(dataTestId, 'container-from'),
10
+ calendarContainerTo: getDataTestId(dataTestId, 'container-to'),
11
+ };
12
+ }
@@ -26,3 +26,9 @@
26
26
  }
27
27
  }
28
28
  }
29
+
30
+ .calendarContainer {
31
+ width: var(--calendar-inner-width);
32
+ display: flex;
33
+ justify-content: center;
34
+ }
@@ -20,6 +20,7 @@ import {
20
20
  DateInputProps,
21
21
  isCompleteDateInput,
22
22
  } from '@alfalab/core-components-date-input';
23
+ import { getDataTestId } from '@alfalab/core-components-shared';
23
24
 
24
25
  import { CalendarRangeProps } from '../Component';
25
26
  import { Divider } from '../components/divider';
@@ -53,6 +54,7 @@ export const CalendarRangeStatic: FC<CalendarRangeStaticProps> = ({
53
54
  events,
54
55
  returnInvalidDates = false,
55
56
  dataTestId,
57
+ calendarContainerClassName,
56
58
  }) => {
57
59
  const [inputFromValue, setInputFromValue] = useState<string>(valueFrom);
58
60
  const [inputToValue, setInputToValue] = useState<string>(valueTo);
@@ -278,23 +280,29 @@ export const CalendarRangeStatic: FC<CalendarRangeStaticProps> = ({
278
280
  clear={true}
279
281
  block={true}
280
282
  />
281
- <CalendarFromComponent
282
- {...calendarFromProps}
283
- className={cn(styles.calendar, calendarFromProps?.className)}
284
- month={monthFrom}
285
- selectorView='month-only'
286
- offDays={offDays}
287
- events={events}
288
- onChange={period.updatePeriod}
289
- onMonthChange={handleMonthFromChange}
290
- minDate={minDate}
291
- maxDate={
292
- minMaxInSameMonth
293
- ? maxDate
294
- : maxDate && max([maxDate, endOfMonth(subMonths(maxDate, 1))]).getTime()
295
- }
296
- {...rangeProps}
297
- />
283
+ <div
284
+ className={cn(styles.calendarContainer, calendarContainerClassName)}
285
+ data-test-id={getDataTestId(dataTestId, 'container-from')}
286
+ >
287
+ <CalendarFromComponent
288
+ {...calendarFromProps}
289
+ className={cn(styles.calendar, calendarFromProps?.className)}
290
+ month={monthFrom}
291
+ selectorView='month-only'
292
+ offDays={offDays}
293
+ events={events}
294
+ onChange={period.updatePeriod}
295
+ onMonthChange={handleMonthFromChange}
296
+ minDate={minDate}
297
+ maxDate={
298
+ minMaxInSameMonth
299
+ ? maxDate
300
+ : maxDate &&
301
+ max([maxDate, endOfMonth(subMonths(maxDate, 1))]).getTime()
302
+ }
303
+ {...rangeProps}
304
+ />
305
+ </div>
298
306
  </div>
299
307
 
300
308
  <Divider inputFromProps={inputFromProps} inputToProps={inputToProps} />
@@ -315,23 +323,25 @@ export const CalendarRangeStatic: FC<CalendarRangeStaticProps> = ({
315
323
  clear={true}
316
324
  block={true}
317
325
  />
318
- <CalendarToComponent
319
- {...calendarToProps}
320
- className={cn(styles.calendar, calendarToProps?.className)}
321
- month={monthTo}
322
- selectorView='month-only'
323
- offDays={offDays}
324
- events={events}
325
- onChange={period.updatePeriod}
326
- onMonthChange={handleMonthToChange}
327
- minDate={
328
- minMaxInSameMonth
329
- ? minDate
330
- : minDate && startOfMonth(addMonths(minDate, 1)).getTime()
331
- }
332
- maxDate={maxDate}
333
- {...rangeProps}
334
- />
326
+ <div data-test-id={getDataTestId(dataTestId, 'container-to')}>
327
+ <CalendarToComponent
328
+ {...calendarToProps}
329
+ className={cn(styles.calendar, calendarToProps?.className)}
330
+ month={monthTo}
331
+ selectorView='month-only'
332
+ offDays={offDays}
333
+ events={events}
334
+ onChange={period.updatePeriod}
335
+ onMonthChange={handleMonthToChange}
336
+ minDate={
337
+ minMaxInSameMonth
338
+ ? minDate
339
+ : minDate && startOfMonth(addMonths(minDate, 1)).getTime()
340
+ }
341
+ maxDate={maxDate}
342
+ {...rangeProps}
343
+ />
344
+ </div>
335
345
  </div>
336
346
  </div>
337
347
  );
package/utils.d.ts CHANGED
@@ -1,2 +1,7 @@
1
1
  declare const isDayButton: (node: HTMLElement | null) => string | false | null | undefined;
2
- export { isDayButton };
2
+ declare function getCalendarRangeTestIds(dataTestId: string): {
3
+ component: string;
4
+ calendarContainerFrom: string;
5
+ calendarContainerTo: string;
6
+ };
7
+ export { isDayButton, getCalendarRangeTestIds };
package/utils.js CHANGED
@@ -2,8 +2,18 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var coreComponentsShared = require('@alfalab/core-components-shared');
6
+
5
7
  var isDayButton = function (node) {
6
8
  return node && node.tagName === 'BUTTON' && node.dataset.date;
7
9
  };
10
+ function getCalendarRangeTestIds(dataTestId) {
11
+ return {
12
+ component: dataTestId,
13
+ calendarContainerFrom: coreComponentsShared.getDataTestId(dataTestId, 'container-from'),
14
+ calendarContainerTo: coreComponentsShared.getDataTestId(dataTestId, 'container-to'),
15
+ };
16
+ }
8
17
 
18
+ exports.getCalendarRangeTestIds = getCalendarRangeTestIds;
9
19
  exports.isDayButton = isDayButton;
package/views/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: brnst */
1
+ /* hash: 1o0oo */
2
2
  :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -45,16 +45,20 @@
45
45
  /* disabled */
46
46
 
47
47
  /* marker */
48
- } .calendar-range__component_1paco {
48
+ } .calendar-range__component_fem4f {
49
49
  display: flex
50
- } .calendar-range__component_1paco button[aria-selected='true'] {
50
+ } .calendar-range__component_fem4f button[aria-selected='true'] {
51
51
  cursor: pointer;
52
- } .calendar-range__component_1paco *[class*='errorIcon_'] {
52
+ } .calendar-range__component_fem4f *[class*='errorIcon_'] {
53
53
  display: none;
54
- } .calendar-range__component_1paco *[class*='calendarIcon_'] {
54
+ } .calendar-range__component_fem4f *[class*='calendarIcon_'] {
55
55
  margin-right: var(--gap-0);
56
- } .calendar-range__static_1paco .calendar-range__calendar_1paco {
56
+ } .calendar-range__static_fem4f .calendar-range__calendar_fem4f {
57
57
  width: var(--calendar-inner-width)
58
- } .calendar-range__static_1paco .calendar-range__calendar_1paco > div:first-child {
58
+ } .calendar-range__static_fem4f .calendar-range__calendar_fem4f > div:first-child {
59
59
  padding: var(--gap-16) var(--gap-0) var(--gap-12);
60
- }
60
+ } .calendar-range__calendarContainer_fem4f {
61
+ width: var(--calendar-inner-width);
62
+ display: flex;
63
+ justify-content: center;
64
+ }
package/views/popover.js CHANGED
@@ -12,7 +12,7 @@ var coreComponentsDateInput = require('@alfalab/core-components-date-input');
12
12
  var hooks$1 = require('@alfalab/hooks');
13
13
  var components_divider_Component = require('../components/divider/Component.js');
14
14
  var hooks = require('../hooks.js');
15
- var index_module = require('../index.module-79a5a9cb.js');
15
+ var index_module = require('../index.module-fc7ba92f.js');
16
16
 
17
17
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
18
18