@pushwoosh/dumb-components 1.1.65 → 1.1.67
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.
|
@@ -18,7 +18,8 @@ export const CalendarSuperForm = props => {
|
|
|
18
18
|
visibleCount,
|
|
19
19
|
monthWidth,
|
|
20
20
|
gap,
|
|
21
|
-
firstDayOfWeek
|
|
21
|
+
firstDayOfWeek,
|
|
22
|
+
footerContent
|
|
22
23
|
} = props;
|
|
23
24
|
const isRangePicker = mode === 'range-date' || mode === 'range-datetime';
|
|
24
25
|
const withTime = mode === 'single-datetime' || mode === 'range-datetime';
|
|
@@ -78,16 +79,16 @@ export const CalendarSuperForm = props => {
|
|
|
78
79
|
visibleCount: visibleCount !== undefined ? visibleCount : isRangePicker ? 2 : 1,
|
|
79
80
|
monthWidth: monthWidth,
|
|
80
81
|
gap: gap,
|
|
81
|
-
renderAfter: withTime || maxDays && maxDays > 0 ? () => {
|
|
82
|
+
renderAfter: withTime || maxDays && maxDays > 0 || footerContent ? () => {
|
|
82
83
|
return React.createElement(Vertical, {
|
|
83
84
|
"$gap": 8,
|
|
84
85
|
"$margin": {
|
|
85
86
|
top: 16
|
|
86
87
|
}
|
|
87
|
-
}, maxDays && maxDays > 0 && React.createElement(Text, {
|
|
88
|
+
}, React.createElement(Vertical, null, maxDays && maxDays > 0 && React.createElement(Text, {
|
|
88
89
|
"$variant": "footnote",
|
|
89
90
|
"$color": Color.LOCKED
|
|
90
|
-
}, `Max length: ${maxDays} days`), withTime && timezone && onChangeTimezone && React.createElement(CalendarTimeAndTimezoneSection, {
|
|
91
|
+
}, `Max length: ${maxDays} days`), footerContent), withTime && timezone && onChangeTimezone && React.createElement(CalendarTimeAndTimezoneSection, {
|
|
91
92
|
isRangePicker: isRangePicker,
|
|
92
93
|
value: value,
|
|
93
94
|
onChange: onChange,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
1
2
|
import { type DateStruct, type DateTimeStruct, type RangeValue, type SingleValue, type TzValue } from '../types';
|
|
2
3
|
interface BaseProps {
|
|
3
4
|
/** Количество видимых месяцев. */
|
|
@@ -12,6 +13,8 @@ interface BaseProps {
|
|
|
12
13
|
disableOnAndAfter?: DateStruct;
|
|
13
14
|
/** Первый день недели: 0 - воскресенье, 1 - понедельник. По умолчанию 0. */
|
|
14
15
|
firstDayOfWeek?: 0 | 1;
|
|
16
|
+
/** Кастомный футер-аннотация, который рендерится после календаря и после min/max days limitation. */
|
|
17
|
+
footerContent?: ReactNode;
|
|
15
18
|
}
|
|
16
19
|
export type CalendarMode = 'single-date' | 'single-datetime' | 'range-date' | 'range-datetime';
|
|
17
20
|
export interface CalendarSingleDateProps extends BaseProps {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pushwoosh/dumb-components",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.67",
|
|
4
4
|
"description": "React components to build Pushwoosh products",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"pre-commit": "check",
|
|
19
19
|
"engines": {
|
|
20
|
-
"node": ">=
|
|
20
|
+
"node": ">= 22",
|
|
21
21
|
"npm": ">= 7"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|