@synerise/ds-date-picker 1.4.1 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/DatePicker.const.js +6 -3
- package/dist/DatePicker.d.ts +2 -2
- package/dist/DatePicker.js +61 -101
- package/dist/DatePicker.styles.d.ts +4 -4
- package/dist/DatePicker.styles.js +17 -14
- package/dist/DatePicker.types.d.ts +6 -6
- package/dist/DatePicker.types.js +1 -1
- package/dist/Elements/DayPicker/DayPicker.d.ts +3 -3
- package/dist/Elements/DayPicker/DayPicker.js +60 -60
- package/dist/Elements/DayPicker/DayPicker.styles.d.ts +6 -6
- package/dist/Elements/DayPicker/DayPicker.styles.js +18 -75
- package/dist/Elements/DayPicker/DayPicker.types.d.ts +4 -4
- package/dist/Elements/DayPicker/DayPicker.types.js +1 -1
- package/dist/Elements/DecadePicker/DecadePicker.d.ts +2 -2
- package/dist/Elements/DecadePicker/DecadePicker.js +85 -71
- package/dist/Elements/DecadePicker/DecadePicker.types.js +1 -1
- package/dist/Elements/Footer/Footer.d.ts +3 -3
- package/dist/Elements/Footer/Footer.js +39 -55
- package/dist/Elements/Footer/Footer.styles.d.ts +4 -4
- package/dist/Elements/Footer/Footer.styles.js +13 -7
- package/dist/Elements/Footer/Footer.types.d.ts +2 -2
- package/dist/Elements/Footer/Footer.types.js +1 -1
- package/dist/Elements/GridPicker/GridPicker.d.ts +2 -2
- package/dist/Elements/GridPicker/GridPicker.js +36 -44
- package/dist/Elements/GridPicker/GridPicker.styles.d.ts +2 -2
- package/dist/Elements/GridPicker/GridPicker.styles.js +9 -19
- package/dist/Elements/GridPicker/GridPicker.types.d.ts +1 -1
- package/dist/Elements/GridPicker/GridPicker.types.js +1 -1
- package/dist/Elements/MonthPicker/MonthPicker.d.ts +3 -3
- package/dist/Elements/MonthPicker/MonthPicker.js +85 -85
- package/dist/Elements/MonthPicker/MonthPicker.types.d.ts +1 -1
- package/dist/Elements/MonthPicker/MonthPicker.types.js +1 -1
- package/dist/Elements/Navbar/Navbar.d.ts +2 -2
- package/dist/Elements/Navbar/Navbar.js +31 -69
- package/dist/Elements/Navbar/Navbar.styles.d.ts +6 -6
- package/dist/Elements/Navbar/Navbar.styles.js +19 -19
- package/dist/Elements/Navbar/Navbar.types.d.ts +1 -1
- package/dist/Elements/Navbar/Navbar.types.js +1 -1
- package/dist/Elements/PickerInput/PickerInput.d.ts +5 -5
- package/dist/Elements/PickerInput/PickerInput.js +56 -80
- package/dist/Elements/PickerInput/PickerInput.styles.d.ts +8 -8
- package/dist/Elements/PickerInput/PickerInput.styles.js +35 -40
- package/dist/Elements/PickerInput/PickerInput.types.d.ts +5 -5
- package/dist/Elements/PickerInput/PickerInput.types.js +1 -1
- package/dist/Elements/QuickPicks/QuickPicks.d.ts +2 -2
- package/dist/Elements/QuickPicks/QuickPicks.js +48 -29
- package/dist/Elements/QuickPicks/QuickPicks.styles.d.ts +1 -1
- package/dist/Elements/QuickPicks/QuickPicks.styles.js +6 -5
- package/dist/Elements/TimePicker/TimePicker.d.ts +2 -2
- package/dist/Elements/TimePicker/TimePicker.js +32 -47
- package/dist/Elements/TimePicker/TimePicker.styles.d.ts +1 -1
- package/dist/Elements/TimePicker/TimePicker.styles.js +6 -3
- package/dist/Elements/TimePicker/TimePicker.types.js +1 -1
- package/dist/Elements/YearPicker/YearPicker.d.ts +2 -2
- package/dist/Elements/YearPicker/YearPicker.js +90 -83
- package/dist/Elements/YearPicker/YearPicker.types.js +1 -1
- package/dist/RawDatePicker/RawDatePicker.d.ts +4 -4
- package/dist/RawDatePicker/RawDatePicker.js +202 -222
- package/dist/RawDatePicker/RawDatePicker.types.d.ts +1 -1
- package/dist/RawDatePicker/RawDatePicker.types.js +1 -1
- package/dist/fns.d.ts +22 -22
- package/dist/fns.js +46 -44
- package/dist/format.js +38 -17
- package/dist/index.js +15 -7
- package/dist/localeUtils.d.ts +1 -1
- package/dist/localeUtils.js +34 -52
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/dist/utils/getDefaultTexts.d.ts +2 -2
- package/dist/utils/getDefaultTexts.js +17 -24
- package/dist/utils.js +44 -19
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.4.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-picker@1.4.2...@synerise/ds-date-picker@1.4.3) (2026-04-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-date-picker
|
|
9
|
+
|
|
10
|
+
## [1.4.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-picker@1.4.1...@synerise/ds-date-picker@1.4.2) (2026-03-24)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @synerise/ds-date-picker
|
|
13
|
+
|
|
6
14
|
## [1.4.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-picker@1.4.0...@synerise/ds-date-picker@1.4.1) (2026-03-20)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @synerise/ds-date-picker
|
package/dist/DatePicker.const.js
CHANGED
package/dist/DatePicker.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DatePickerProps } from './DatePicker.types';
|
|
3
3
|
declare const DatePicker: ({ autoFocus, disabled, texts, format, valueFormatOptions, value, onApply, showTime, onValueChange, onClear, errorText, popoverPlacement, prefixel, error, onDropdownVisibleChange, dropdownProps, suffixel, hideNow, readOnly, renderTrigger, inputProps, allowClear, overlayHTMLAttributes, triggerHTMLAttributes, ...rest }: DatePickerProps) => React.JSX.Element;
|
|
4
4
|
export default DatePicker;
|
package/dist/DatePicker.js
CHANGED
|
@@ -1,115 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
var _useState2 = useState(value),
|
|
43
|
-
selectedDate = _useState2[0],
|
|
44
|
-
setSelectedDate = _useState2[1];
|
|
45
|
-
var intl = useIntl();
|
|
46
|
-
var allTexts = getDefaultTexts(intl, texts);
|
|
47
|
-
useEffect(function () {
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect, useCallback } from "react";
|
|
3
|
+
import { useIntl } from "react-intl";
|
|
4
|
+
import Dropdown from "@synerise/ds-dropdown";
|
|
5
|
+
import { TRIGGER_PROPS } from "./DatePicker.const.js";
|
|
6
|
+
import { OverlayContainer } from "./DatePicker.styles.js";
|
|
7
|
+
import PickerInput from "./Elements/PickerInput/PickerInput.js";
|
|
8
|
+
import RawDatePicker from "./RawDatePicker/RawDatePicker.js";
|
|
9
|
+
import { getDefaultTexts } from "./utils/getDefaultTexts.js";
|
|
10
|
+
const DatePicker = ({
|
|
11
|
+
autoFocus,
|
|
12
|
+
disabled,
|
|
13
|
+
texts,
|
|
14
|
+
format,
|
|
15
|
+
valueFormatOptions,
|
|
16
|
+
value,
|
|
17
|
+
onApply,
|
|
18
|
+
showTime,
|
|
19
|
+
onValueChange,
|
|
20
|
+
onClear,
|
|
21
|
+
errorText,
|
|
22
|
+
popoverPlacement,
|
|
23
|
+
prefixel,
|
|
24
|
+
error,
|
|
25
|
+
onDropdownVisibleChange,
|
|
26
|
+
dropdownProps,
|
|
27
|
+
suffixel,
|
|
28
|
+
hideNow,
|
|
29
|
+
readOnly,
|
|
30
|
+
renderTrigger,
|
|
31
|
+
inputProps,
|
|
32
|
+
allowClear = true,
|
|
33
|
+
overlayHTMLAttributes,
|
|
34
|
+
triggerHTMLAttributes,
|
|
35
|
+
...rest
|
|
36
|
+
}) => {
|
|
37
|
+
const [dropVisible, setDropVisible] = useState(autoFocus || false);
|
|
38
|
+
const [selectedDate, setSelectedDate] = useState(value);
|
|
39
|
+
const intl = useIntl();
|
|
40
|
+
const allTexts = getDefaultTexts(intl, texts);
|
|
41
|
+
useEffect(() => {
|
|
48
42
|
setSelectedDate(value);
|
|
49
43
|
}, [value]);
|
|
50
|
-
|
|
44
|
+
const onValueChangeCallback = useCallback((val) => {
|
|
51
45
|
onValueChange && onValueChange(val);
|
|
52
46
|
}, [onValueChange]);
|
|
53
|
-
|
|
47
|
+
const onApplyCallback = useCallback((val) => {
|
|
54
48
|
onApply && onApply(val);
|
|
55
49
|
setSelectedDate(val);
|
|
56
50
|
setDropVisible(false);
|
|
57
51
|
}, [onApply]);
|
|
58
|
-
|
|
59
|
-
onDropdownVisibleChange
|
|
60
|
-
dropdownProps
|
|
52
|
+
const handleOpenChange = useCallback((newOpen) => {
|
|
53
|
+
onDropdownVisibleChange?.(newOpen);
|
|
54
|
+
dropdownProps?.onOpenChange?.(newOpen);
|
|
61
55
|
setDropVisible(newOpen);
|
|
62
56
|
}, [dropdownProps, onDropdownVisibleChange]);
|
|
63
|
-
|
|
57
|
+
const handleClear = useCallback(() => {
|
|
64
58
|
setDropVisible(false);
|
|
65
|
-
setSelectedDate(
|
|
59
|
+
setSelectedDate(void 0);
|
|
66
60
|
onClear && onClear();
|
|
67
61
|
}, [onClear]);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
prefixel: prefixel,
|
|
82
|
-
suffixel: suffixel,
|
|
83
|
-
clearTooltip: allTexts.clearTooltip,
|
|
84
|
-
highlight: !!dropVisible && !disabled,
|
|
85
|
-
error: error,
|
|
86
|
-
errorText: errorText,
|
|
87
|
-
readOnly: readOnly,
|
|
88
|
-
triggerHTMLAttributes: triggerHTMLAttributes
|
|
89
|
-
}));
|
|
90
|
-
return readOnly ? trigger : /*#__PURE__*/React.createElement(Dropdown, _extends({
|
|
91
|
-
overlay: /*#__PURE__*/React.createElement(S.OverlayContainer, _extends({
|
|
92
|
-
"data-testid": "date-picker-overlay-container"
|
|
93
|
-
}, overlayHTMLAttributes), /*#__PURE__*/React.createElement(RawDatePicker, _extends({}, rest, {
|
|
94
|
-
showTime: showTime,
|
|
95
|
-
texts: allTexts,
|
|
96
|
-
onApply: onApplyCallback,
|
|
97
|
-
onValueChange: onValueChangeCallback,
|
|
98
|
-
value: selectedDate,
|
|
99
|
-
hideNow: hideNow
|
|
100
|
-
}))),
|
|
101
|
-
trigger: ['click'],
|
|
102
|
-
placement: popoverPlacement,
|
|
103
|
-
disabled: disabled,
|
|
104
|
-
size: "min-match-trigger",
|
|
105
|
-
asChild: false
|
|
106
|
-
}, dropdownProps, {
|
|
107
|
-
onOpenChange: handleOpenChange,
|
|
108
|
-
open: ((dropdownProps == null ? void 0 : dropdownProps.open) || dropVisible) && !disabled,
|
|
109
|
-
popoverProps: _extends({
|
|
110
|
-
testId: 'date-picker'
|
|
111
|
-
}, dropdownProps == null ? void 0 : dropdownProps.popoverProps),
|
|
112
|
-
popoverTriggerProps: _extends({}, TRIGGER_PROPS, dropdownProps == null ? void 0 : dropdownProps.popoverTriggerProps)
|
|
113
|
-
}), trigger);
|
|
62
|
+
const trigger = renderTrigger?.() || /* @__PURE__ */ jsx(PickerInput, { ...inputProps, disabled, allowClear, autoFocus: !disabled && autoFocus, value: selectedDate, showTime, onClick: !readOnly ? () => {
|
|
63
|
+
setDropVisible(!dropVisible);
|
|
64
|
+
} : void 0, format, valueFormatOptions, onClear: handleClear, placeholder: allTexts.inputPlaceholder, prefixel, suffixel, clearTooltip: allTexts.clearTooltip, highlight: !!dropVisible && !disabled, error, errorText, readOnly, triggerHTMLAttributes });
|
|
65
|
+
return readOnly ? trigger : /* @__PURE__ */ jsx(Dropdown, { overlay: /* @__PURE__ */ jsx(OverlayContainer, { "data-testid": "date-picker-overlay-container", ...overlayHTMLAttributes, children: /* @__PURE__ */ jsx(RawDatePicker, { ...rest, showTime, texts: allTexts, onApply: onApplyCallback, onValueChange: onValueChangeCallback, value: selectedDate, hideNow }) }), trigger: ["click"], placement: popoverPlacement, disabled, size: "min-match-trigger", asChild: false, ...dropdownProps, onOpenChange: handleOpenChange, open: (dropdownProps?.open || dropVisible) && !disabled, popoverProps: {
|
|
66
|
+
testId: "date-picker",
|
|
67
|
+
...dropdownProps?.popoverProps
|
|
68
|
+
}, popoverTriggerProps: {
|
|
69
|
+
...TRIGGER_PROPS,
|
|
70
|
+
...dropdownProps?.popoverTriggerProps
|
|
71
|
+
}, children: trigger });
|
|
72
|
+
};
|
|
73
|
+
export {
|
|
74
|
+
DatePicker as default
|
|
114
75
|
};
|
|
115
|
-
export default DatePicker;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const Container: import(
|
|
2
|
-
export declare const ContentWrapper: import(
|
|
1
|
+
export declare const Container: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const ContentWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
3
3
|
withQuickPicks?: boolean;
|
|
4
4
|
}, never>;
|
|
5
|
-
export declare const PickerWrapper: import(
|
|
6
|
-
export declare const OverlayContainer: import(
|
|
5
|
+
export declare const PickerWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const OverlayContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const Container = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "DatePickerstyles__Container",
|
|
4
4
|
componentId: "sc-1kprsne-0"
|
|
5
|
-
})(["background-color:", ";user-select:none;padding-top:12px;> *:not(:last-child){border-bottom:1px solid ", ";}.ds-date-picker-nav{.long-prev,.long-next{display:none;}}"],
|
|
6
|
-
|
|
7
|
-
}, function (props) {
|
|
8
|
-
return props.theme.palette['grey-200'];
|
|
9
|
-
});
|
|
10
|
-
export var ContentWrapper = styled.div.withConfig({
|
|
5
|
+
})(["background-color:", ";user-select:none;padding-top:12px;> *:not(:last-child){border-bottom:1px solid ", ";}.ds-date-picker-nav{.long-prev,.long-next{display:none;}}"], (props) => props.theme.palette.white, (props) => props.theme.palette["grey-200"]);
|
|
6
|
+
const ContentWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
11
7
|
displayName: "DatePickerstyles__ContentWrapper",
|
|
12
8
|
componentId: "sc-1kprsne-1"
|
|
13
|
-
})(["", ""],
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
})(["", ""], (props) => props.withQuickPicks && `
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
`);
|
|
13
|
+
const PickerWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
17
14
|
displayName: "DatePickerstyles__PickerWrapper",
|
|
18
15
|
componentId: "sc-1kprsne-2"
|
|
19
16
|
})(["display:grid;min-width:318px;align-items:stretch;justify-content:stretch;grid-template-rows:48px 300px 1fr;"]);
|
|
20
|
-
|
|
17
|
+
const OverlayContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
21
18
|
displayName: "DatePickerstyles__OverlayContainer",
|
|
22
19
|
componentId: "sc-1kprsne-3"
|
|
23
|
-
})(["overflow:visible;min-width:318px;"]);
|
|
20
|
+
})(["overflow:visible;min-width:318px;"]);
|
|
21
|
+
export {
|
|
22
|
+
Container,
|
|
23
|
+
ContentWrapper,
|
|
24
|
+
OverlayContainer,
|
|
25
|
+
PickerWrapper
|
|
26
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { HTMLAttributes, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { IntlShape } from 'react-intl';
|
|
3
|
+
import { DateToFormatOptions } from '@synerise/ds-core';
|
|
4
|
+
import { DropdownSharedProps } from '@synerise/ds-dropdown';
|
|
5
|
+
import { InputProps } from '@synerise/ds-input';
|
|
6
|
+
import { DataAttributes } from '@synerise/ds-utils';
|
|
7
7
|
export type QuickPick = {
|
|
8
8
|
label: ReactNode;
|
|
9
9
|
value: Date;
|
package/dist/DatePicker.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const _default: React.FC<import(
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DayPickerProps } from './DayPicker.types';
|
|
3
|
+
declare const _default: React.FC<import('react-intl').WithIntlProps<DayPickerProps>> & {
|
|
4
4
|
WrappedComponent: React.ComponentType<DayPickerProps>;
|
|
5
5
|
};
|
|
6
6
|
export default _default;
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { injectIntl } from "react-intl";
|
|
3
|
+
import { useDataFormat } from "@synerise/ds-core";
|
|
4
|
+
import "date-fns/addDays";
|
|
5
|
+
import fnsAddMonths from "date-fns/addMonths";
|
|
6
|
+
import "date-fns/addSeconds";
|
|
7
|
+
import fnsAddYears from "date-fns/addYears";
|
|
8
|
+
import "date-fns/differenceInSeconds";
|
|
9
|
+
import "date-fns/differenceInYears";
|
|
10
|
+
import "date-fns/endOfDay";
|
|
11
|
+
import "date-fns/endOfMonth";
|
|
12
|
+
import "date-fns/format";
|
|
13
|
+
import "date-fns/getSeconds";
|
|
14
|
+
import "date-fns/getYear";
|
|
15
|
+
import "date-fns/isAfter";
|
|
16
|
+
import "date-fns/isBefore";
|
|
17
|
+
import "date-fns/isEqual";
|
|
18
|
+
import "date-fns/isSameDay";
|
|
19
|
+
import "date-fns/isSameMonth";
|
|
20
|
+
import "date-fns/isSameYear";
|
|
21
|
+
import "date-fns/setDate";
|
|
22
|
+
import "date-fns/setMonth";
|
|
23
|
+
import "date-fns/setYear";
|
|
24
|
+
import "date-fns/startOfDay";
|
|
25
|
+
import "date-fns/startOfMonth";
|
|
26
|
+
import fnsFormat from "../../format.js";
|
|
27
|
+
import localeUtils from "../../localeUtils.js";
|
|
28
|
+
import Navbar from "../Navbar/Navbar.js";
|
|
29
|
+
import { Link } from "../Navbar/Navbar.styles.js";
|
|
30
|
+
import { DayPicker as DayPicker$1 } from "./DayPicker.styles.js";
|
|
31
|
+
const captionElement = () => null;
|
|
32
|
+
const Picker = (props) => {
|
|
33
|
+
const {
|
|
34
|
+
month,
|
|
35
|
+
onMonthChange,
|
|
36
|
+
onMonthNameClick,
|
|
37
|
+
onYearNameClick,
|
|
38
|
+
hideLongNext,
|
|
39
|
+
hideLongPrev,
|
|
40
|
+
hideShortNext,
|
|
41
|
+
hideShortPrev,
|
|
42
|
+
renderNavbar,
|
|
43
|
+
intl,
|
|
44
|
+
modifiers,
|
|
45
|
+
...rest
|
|
46
|
+
} = props;
|
|
47
|
+
const {
|
|
48
|
+
firstDayOfWeek
|
|
49
|
+
} = useDataFormat();
|
|
50
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
51
|
+
renderNavbar ? renderNavbar(props) : /* @__PURE__ */ jsx(Navbar, { title: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52
|
+
/* @__PURE__ */ jsx(Link, { "data-testid": "datapicker-nav-title-monthpicker-link", onClick: onMonthNameClick, children: fnsFormat(month, "MMM", intl.locale) }),
|
|
53
|
+
" ",
|
|
54
|
+
/* @__PURE__ */ jsx(Link, { "data-testid": "datapicker-nav-title-yearpicker-link", onClick: onYearNameClick, children: fnsFormat(month, "yyyy", intl.locale) })
|
|
55
|
+
] }), onLongPrev: hideLongPrev ? void 0 : () => onMonthChange && onMonthChange(fnsAddYears(month, -1)), onShortPrev: hideShortPrev ? void 0 : () => onMonthChange && onMonthChange(fnsAddMonths(month, -1)), onLongNext: hideLongNext ? void 0 : () => onMonthChange && onMonthChange(fnsAddYears(month, 1)), onShortNext: hideShortNext ? void 0 : () => onMonthChange && onMonthChange(fnsAddMonths(month, 1)) }, "head"),
|
|
56
|
+
/* @__PURE__ */ jsx(DayPicker$1, { month, firstDayOfWeek, captionElement, locale: intl.locale, localeUtils, modifiers, ...rest }, "body")
|
|
57
|
+
] });
|
|
15
58
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
onMonthNameClick = props.onMonthNameClick,
|
|
20
|
-
onYearNameClick = props.onYearNameClick,
|
|
21
|
-
hideLongNext = props.hideLongNext,
|
|
22
|
-
hideLongPrev = props.hideLongPrev,
|
|
23
|
-
hideShortNext = props.hideShortNext,
|
|
24
|
-
hideShortPrev = props.hideShortPrev,
|
|
25
|
-
renderNavbar = props.renderNavbar,
|
|
26
|
-
intl = props.intl,
|
|
27
|
-
modifiers = props.modifiers,
|
|
28
|
-
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
29
|
-
var _useDataFormat = useDataFormat(),
|
|
30
|
-
firstDayOfWeek = _useDataFormat.firstDayOfWeek;
|
|
31
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, renderNavbar ? renderNavbar(props) : /*#__PURE__*/React.createElement(Navbar, {
|
|
32
|
-
title: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(S.Link, {
|
|
33
|
-
"data-testid": "datapicker-nav-title-monthpicker-link",
|
|
34
|
-
onClick: onMonthNameClick
|
|
35
|
-
}, fnsFormat(month, 'MMM', intl.locale)), ' ', /*#__PURE__*/React.createElement(S.Link, {
|
|
36
|
-
"data-testid": "datapicker-nav-title-yearpicker-link",
|
|
37
|
-
onClick: onYearNameClick
|
|
38
|
-
}, fnsFormat(month, 'yyyy', intl.locale))),
|
|
39
|
-
onLongPrev: hideLongPrev ? undefined : function () {
|
|
40
|
-
return onMonthChange && onMonthChange(fnsAddYears(month, -1));
|
|
41
|
-
},
|
|
42
|
-
onShortPrev: hideShortPrev ? undefined : function () {
|
|
43
|
-
return onMonthChange && onMonthChange(fnsAddMonths(month, -1));
|
|
44
|
-
},
|
|
45
|
-
onLongNext: hideLongNext ? undefined : function () {
|
|
46
|
-
return onMonthChange && onMonthChange(fnsAddYears(month, 1));
|
|
47
|
-
},
|
|
48
|
-
onShortNext: hideShortNext ? undefined : function () {
|
|
49
|
-
return onMonthChange && onMonthChange(fnsAddMonths(month, 1));
|
|
50
|
-
},
|
|
51
|
-
key: "head"
|
|
52
|
-
}), /*#__PURE__*/React.createElement(DayPicker, _extends({
|
|
53
|
-
month: month,
|
|
54
|
-
firstDayOfWeek: firstDayOfWeek,
|
|
55
|
-
captionElement: captionElement,
|
|
56
|
-
key: "body",
|
|
57
|
-
locale: intl.locale,
|
|
58
|
-
localeUtils: localeUtils,
|
|
59
|
-
modifiers: modifiers
|
|
60
|
-
}, rest)));
|
|
59
|
+
const DayPicker = injectIntl(Picker);
|
|
60
|
+
export {
|
|
61
|
+
DayPicker as default
|
|
61
62
|
};
|
|
62
|
-
export default injectIntl(Picker);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import DayPickerBase from 'react-day-picker';
|
|
2
|
-
export declare const DayBackground: import(
|
|
3
|
-
export declare const DayForeground: import(
|
|
4
|
-
export declare const DayText: import(
|
|
5
|
-
export declare const DayTooltip: import(
|
|
6
|
-
export declare const DayPicker: import(
|
|
1
|
+
import { default as DayPickerBase } from 'react-day-picker';
|
|
2
|
+
export declare const DayBackground: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const DayForeground: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const DayText: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
5
|
+
export declare const DayTooltip: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const DayPicker: import('styled-components').StyledComponent<typeof DayPickerBase, any, {}, never>;
|
|
@@ -1,88 +1,31 @@
|
|
|
1
|
-
import DayPickerBase from
|
|
2
|
-
import styled from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
export var DayBackground = styled.div.withConfig({
|
|
1
|
+
import DayPickerBase from "react-day-picker";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
const DaySelectorPrefix = `.DayPicker-Day`;
|
|
4
|
+
const daySelector = (modifier) => `${DaySelectorPrefix}--${modifier}`;
|
|
5
|
+
const DayBackground = /* @__PURE__ */ styled.div.withConfig({
|
|
8
6
|
displayName: "DayPickerstyles__DayBackground",
|
|
9
7
|
componentId: "sc-oi7l9r-0"
|
|
10
8
|
})([""]);
|
|
11
|
-
|
|
9
|
+
const DayForeground = /* @__PURE__ */ styled.div.withConfig({
|
|
12
10
|
displayName: "DayPickerstyles__DayForeground",
|
|
13
11
|
componentId: "sc-oi7l9r-1"
|
|
14
12
|
})(["border-radius:50%;"]);
|
|
15
|
-
|
|
13
|
+
const DayText = /* @__PURE__ */ styled.div.withConfig({
|
|
16
14
|
displayName: "DayPickerstyles__DayText",
|
|
17
15
|
componentId: "sc-oi7l9r-2"
|
|
18
|
-
})(["color:", ";border-radius:50%;"],
|
|
19
|
-
|
|
20
|
-
});
|
|
21
|
-
export var DayTooltip = styled.div.withConfig({
|
|
16
|
+
})(["color:", ";border-radius:50%;"], (props) => props.theme.palette["grey-700"]);
|
|
17
|
+
const DayTooltip = /* @__PURE__ */ styled.div.withConfig({
|
|
22
18
|
displayName: "DayPickerstyles__DayTooltip",
|
|
23
19
|
componentId: "sc-oi7l9r-3"
|
|
24
20
|
})(["display:none;"]);
|
|
25
|
-
|
|
21
|
+
const DayPicker = /* @__PURE__ */ styled(DayPickerBase).withConfig({
|
|
26
22
|
displayName: "DayPickerstyles__DayPicker",
|
|
27
23
|
componentId: "sc-oi7l9r-4"
|
|
28
|
-
})(["display:inline-block;font-size:12px;.DayPicker-wrapper{position:relative;flex-direction:row;}.DayPicker-Months{display:flex;flex-wrap:wrap;justify-content:center;}.DayPicker-Month{display:table;margin:8px;border-spacing:0;border-collapse:collapse;}.DayPicker-Weekdays{display:table-header-group;}.DayPicker-WeekdaysRow{display:table-row;}.DayPicker-Weekday{min-width:39px;height:32px;display:table-cell;vertical-align:middle;text-align:center;font-weight:500;}.DayPicker-Weekday abbr[title]{border-bottom:none;text-decoration:none;}.DayPicker-Body{display:table-row-group;}.DayPicker-Week{display:table-row;}.DayPicker--interactionDisabled ", "{cursor:default;}", "{width:40px;height:40px;display:table-cell;cursor:pointer;position:relative;box-sizing:border-box;> div{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;margin:4px;min-width:32px;}&--start > ", "{border-top-left-radius:50%;border-bottom-left-radius:50%;}&--end > ", "{border-top-right-radius:50%;border-bottom-right-radius:50%;}&--today{font-weight:500;}&--today", "{& > ", "{font-weight:400;}}&--entered", ":not(", "){& > ", "{border-color:", ";margin-right:0;margin-left:4px;}& > ", "{margin-right:0;background-color:", ";}}&--entered", ":not(", "){& > ", "{border-color:", ";margin-right:4px;margin-left:4px;}& > ", "{margin-right:4px;background-color:", ";}}&--entered:not(", "):not(", "){& > ", "{background-color:", ";}}&--today", ":not(", "){& > ", "{background-color:", ";}}&--today", ":not(", "){& > ", "{background-color:transparent;font-weight:400;color:", ";}& > ", "{background-color:", ";}& > ", "{border:2px solid transparent;}}&--today:not(", "){& > ", "{background-color:", ";color:", ";}& > ", "{border:2px solid ", ";}}&--entered > ", "{background-color:", ";}&--entered > ", "{color:", ";}&--entered-start:not(", ") > ", "{border-top-left-radius:50%;border-bottom-left-radius:50%;}&--entered-end:not(", ") > ", "{border-top-right-radius:50%;border-bottom-right-radius:50%;}&--outside{& > ", "{color:", ";}}&--disabled{cursor:default;& > ", "{color:", ";}}}", ":not(", "):not(", "):not(", "),", ":not(", "):not(", "):not(", "){&:last-child > ", "{border-top-right-radius:50%;border-bottom-right-radius:50%;margin-right:4px;padding-right:0;}&:first-child > ", "{border-top-left-radius:50%;border-bottom-left-radius:50%;margin-left:4px;padding-left:0;}}", ":not(", "):not(", "){& > div{padding-left:4px;margin-left:0;padding-right:4px;margin-right:0;}& > ", "{background-color:", ";}& > ", "{color:", ";}&", "{& > ", "{background-color:", ";}& > ", "{color:inherit;}}}", ":not(", "):not(", "){& > div{padding-left:4px;margin-left:0;padding-right:4px;margin-right:0;text-align:center;}&& > ", "{background-color:", ";}&& > ", "{color:", ";}&", "{&& > ", "{background-color:", ";}&& > ", "{color:inherit;}}}", ":not(", "):not(", "){& > ", "{border-radius:50%;font-weight:500;color:", ";background-color:", ";margin-right:4px;padding-left:0px;padding-right:0px;}& > ", "{background-color:", ";}& > div{padding-left:0px;margin-left:4px;}}", ":not(", "):not(", "):last-child,", ":not(", "):not(", "):first-child{& > div{margin-right:4px;}& > ", "{background-color:", ";}}", ":not(", "):not(", "){& > ", "{border-radius:50%;font-weight:500;background-color:", ";color:", ";margin-left:4px;padding-left:4px;}& > div{padding-right:4px;margin-right:4px;}}", ":not(", "):not(", "){& > div{padding-right:4px;}}", ":not(", "):hover{position:relative;", "{height:24px;position:absolute;top:-30px;margin-left:calc(-50% + 16px);display:block;white-space:nowrap;background-color:rgba(56,67,80,0.9);padding:3px 8px;border-radius:3px;z-index:9;font-weight:400;color:", ";}}", ":not(", "):not(", "),", ":not(", "){& > ", "{background:transparent;}}", "{& > ", "{border-radius:50%;}}&.relative{", ":not(", "):not(", "){& > ", "{font-weight:500;}", ":not(", "):not(", "){& > ", "{background-color:", ";}& > ", "{color:", ";}}}"], DaySelectorPrefix, DaySelectorPrefix, DayBackground, DayBackground, daySelector(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}, daySelector('entered-start'), daySelector('entered-end'), DayBackground, function (props) {
|
|
37
|
-
return props.theme.palette['blue-100'];
|
|
38
|
-
}, daySelector('entered-start') + daySelector('entered-end'), daySelector('selected'), DayBackground, function (props) {
|
|
39
|
-
return props.theme.palette['grey-050'];
|
|
40
|
-
}, daySelector('entered'), daySelector('selected'), DayText, function (props) {
|
|
41
|
-
return props.theme.palette['blue-600'];
|
|
42
|
-
}, DayBackground, function (props) {
|
|
43
|
-
return props.theme.palette['blue-100'];
|
|
44
|
-
}, DayForeground, daySelector('selected'), DayText, function (props) {
|
|
45
|
-
return props.theme.palette['yellow-100'];
|
|
46
|
-
}, function (props) {
|
|
47
|
-
return props.theme.palette['yellow-600'];
|
|
48
|
-
}, DayForeground, function (props) {
|
|
49
|
-
return props.theme.palette['yellow-600'];
|
|
50
|
-
}, DayBackground, function (props) {
|
|
51
|
-
return props.theme.palette['grey-050'];
|
|
52
|
-
}, DayText, function (props) {
|
|
53
|
-
return props.theme.palette['blue-600'];
|
|
54
|
-
}, daySelector('selected'), DayBackground, daySelector('selected'), DayBackground, DayText, function (props) {
|
|
55
|
-
return props.theme.palette['grey-400'];
|
|
56
|
-
}, DayText, function (props) {
|
|
57
|
-
return props.theme.palette['grey-400'];
|
|
58
|
-
}, daySelector('selected'), daySelector('disabled'), daySelector('end'), daySelector('start'), daySelector('entered'), daySelector('disabled'), daySelector('end'), daySelector('start'), DayBackground, DayBackground, daySelector('selected'), daySelector('disabled'), daySelector('outside'), DayBackground, function (props) {
|
|
59
|
-
return props.theme.palette['blue-100'];
|
|
60
|
-
}, DayText, function (props) {
|
|
61
|
-
return props.theme.palette['blue-600'];
|
|
62
|
-
}, daySelector('ghost'), DayBackground, function (props) {
|
|
63
|
-
return props.theme.palette['blue-600'];
|
|
64
|
-
}, DayText, daySelector('entered'), daySelector('disabled'), daySelector('entered-start'), DayBackground, function (props) {
|
|
65
|
-
return props.theme.palette['grey-050'];
|
|
66
|
-
}, DayText, function (props) {
|
|
67
|
-
return props.theme.palette['blue-600'];
|
|
68
|
-
}, daySelector('ghost'), DayBackground, function (props) {
|
|
69
|
-
return props.theme.palette['blue-600'];
|
|
70
|
-
}, DayText, daySelector('start'), daySelector('disabled'), daySelector('outside'), DayText, function (props) {
|
|
71
|
-
return props.theme.palette.white;
|
|
72
|
-
}, function (props) {
|
|
73
|
-
return props.theme.palette['blue-600'];
|
|
74
|
-
}, DayBackground, function (props) {
|
|
75
|
-
return props.theme.palette['blue-100'];
|
|
76
|
-
}, daySelector('start'), daySelector('disabled'), daySelector('outside'), daySelector('end'), daySelector('disabled'), daySelector('outside'), DayBackground, function (props) {
|
|
77
|
-
return props.theme.palette.white;
|
|
78
|
-
}, daySelector('end'), daySelector('disabled'), daySelector('outside'), DayText, function (props) {
|
|
79
|
-
return props.theme.palette['blue-600'];
|
|
80
|
-
}, function (props) {
|
|
81
|
-
return props.theme.palette.white;
|
|
82
|
-
}, daySelector('end') + daySelector('start'), daySelector('disabled'), daySelector('outside'), daySelector('selected'), daySelector('disabled'), DayTooltip, function (props) {
|
|
83
|
-
return props.theme.palette.white;
|
|
84
|
-
}, daySelector('initial'), daySelector('disabled'), daySelector('entered'), daySelector('initial-entered'), daySelector('disabled'), DayBackground, daySelector('outside') + daySelector('entered') + daySelector('selected'), DayBackground, daySelector('start') + daySelector('selected'), daySelector('disabled'), daySelector('outside'), DayText, daySelector('selected'), daySelector('disabled'), daySelector('outside'), DayBackground, function (props) {
|
|
85
|
-
return props.theme.palette['blue-100'];
|
|
86
|
-
}, DayText, function (props) {
|
|
87
|
-
return props.theme.palette['blue-600'];
|
|
88
|
-
});
|
|
24
|
+
})(["display:inline-block;font-size:12px;.DayPicker-wrapper{position:relative;flex-direction:row;}.DayPicker-Months{display:flex;flex-wrap:wrap;justify-content:center;}.DayPicker-Month{display:table;margin:8px;border-spacing:0;border-collapse:collapse;}.DayPicker-Weekdays{display:table-header-group;}.DayPicker-WeekdaysRow{display:table-row;}.DayPicker-Weekday{min-width:39px;height:32px;display:table-cell;vertical-align:middle;text-align:center;font-weight:500;}.DayPicker-Weekday abbr[title]{border-bottom:none;text-decoration:none;}.DayPicker-Body{display:table-row-group;}.DayPicker-Week{display:table-row;}.DayPicker--interactionDisabled ", "{cursor:default;}", "{width:40px;height:40px;display:table-cell;cursor:pointer;position:relative;box-sizing:border-box;> div{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;margin:4px;min-width:32px;}&--start > ", "{border-top-left-radius:50%;border-bottom-left-radius:50%;}&--end > ", "{border-top-right-radius:50%;border-bottom-right-radius:50%;}&--today{font-weight:500;}&--today", "{& > ", "{font-weight:400;}}&--entered", ":not(", "){& > ", "{border-color:", ";margin-right:0;margin-left:4px;}& > ", "{margin-right:0;background-color:", ";}}&--entered", ":not(", "){& > ", "{border-color:", ";margin-right:4px;margin-left:4px;}& > ", "{margin-right:4px;background-color:", ";}}&--entered:not(", "):not(", "){& > ", "{background-color:", ";}}&--today", ":not(", "){& > ", "{background-color:", ";}}&--today", ":not(", "){& > ", "{background-color:transparent;font-weight:400;color:", ";}& > ", "{background-color:", ";}& > ", "{border:2px solid transparent;}}&--today:not(", "){& > ", "{background-color:", ";color:", ";}& > ", "{border:2px solid ", ";}}&--entered > ", "{background-color:", ";}&--entered > ", "{color:", ";}&--entered-start:not(", ") > ", "{border-top-left-radius:50%;border-bottom-left-radius:50%;}&--entered-end:not(", ") > ", "{border-top-right-radius:50%;border-bottom-right-radius:50%;}&--outside{& > ", "{color:", ";}}&--disabled{cursor:default;& > ", "{color:", ";}}}", ":not(", "):not(", "):not(", "),", ":not(", "):not(", "):not(", "){&:last-child > ", "{border-top-right-radius:50%;border-bottom-right-radius:50%;margin-right:4px;padding-right:0;}&:first-child > ", "{border-top-left-radius:50%;border-bottom-left-radius:50%;margin-left:4px;padding-left:0;}}", ":not(", "):not(", "){& > div{padding-left:4px;margin-left:0;padding-right:4px;margin-right:0;}& > ", "{background-color:", ";}& > ", "{color:", ";}&", "{& > ", "{background-color:", ";}& > ", "{color:inherit;}}}", ":not(", "):not(", "){& > div{padding-left:4px;margin-left:0;padding-right:4px;margin-right:0;text-align:center;}&& > ", "{background-color:", ";}&& > ", "{color:", ";}&", "{&& > ", "{background-color:", ";}&& > ", "{color:inherit;}}}", ":not(", "):not(", "){& > ", "{border-radius:50%;font-weight:500;color:", ";background-color:", ";margin-right:4px;padding-left:0px;padding-right:0px;}& > ", "{background-color:", ";}& > div{padding-left:0px;margin-left:4px;}}", ":not(", "):not(", "):last-child,", ":not(", "):not(", "):first-child{& > div{margin-right:4px;}& > ", "{background-color:", ";}}", ":not(", "):not(", "){& > ", "{border-radius:50%;font-weight:500;background-color:", ";color:", ";margin-left:4px;padding-left:4px;}& > div{padding-right:4px;margin-right:4px;}}", ":not(", "):not(", "){& > div{padding-right:4px;}}", ":not(", "):hover{position:relative;", "{height:24px;position:absolute;top:-30px;margin-left:calc(-50% + 16px);display:block;white-space:nowrap;background-color:rgba(56,67,80,0.9);padding:3px 8px;border-radius:3px;z-index:9;font-weight:400;color:", ";}}", ":not(", "):not(", "),", ":not(", "){& > ", "{background:transparent;}}", "{& > ", "{border-radius:50%;}}&.relative{", ":not(", "):not(", "){& > ", "{font-weight:500;}", ":not(", "):not(", "){& > ", "{background-color:", ";}& > ", "{color:", ";}}}"], DaySelectorPrefix, DaySelectorPrefix, DayBackground, DayBackground, daySelector("selected"), DayText, daySelector("entered-start"), daySelector("entered-end"), DayForeground, (props) => props.theme.palette["blue-300"], DayBackground, (props) => props.theme.palette["blue-100"], daySelector("entered-end"), daySelector("entered-start"), DayForeground, (props) => props.theme.palette["blue-300"], DayBackground, (props) => props.theme.palette["blue-100"], daySelector("entered-start"), daySelector("entered-end"), DayBackground, (props) => props.theme.palette["blue-100"], daySelector("entered-start") + daySelector("entered-end"), daySelector("selected"), DayBackground, (props) => props.theme.palette["grey-050"], daySelector("entered"), daySelector("selected"), DayText, (props) => props.theme.palette["blue-600"], DayBackground, (props) => props.theme.palette["blue-100"], DayForeground, daySelector("selected"), DayText, (props) => props.theme.palette["yellow-100"], (props) => props.theme.palette["yellow-600"], DayForeground, (props) => props.theme.palette["yellow-600"], DayBackground, (props) => props.theme.palette["grey-050"], DayText, (props) => props.theme.palette["blue-600"], daySelector("selected"), DayBackground, daySelector("selected"), DayBackground, DayText, (props) => props.theme.palette["grey-400"], DayText, (props) => props.theme.palette["grey-400"], daySelector("selected"), daySelector("disabled"), daySelector("end"), daySelector("start"), daySelector("entered"), daySelector("disabled"), daySelector("end"), daySelector("start"), DayBackground, DayBackground, daySelector("selected"), daySelector("disabled"), daySelector("outside"), DayBackground, (props) => props.theme.palette["blue-100"], DayText, (props) => props.theme.palette["blue-600"], daySelector("ghost"), DayBackground, (props) => props.theme.palette["blue-600"], DayText, daySelector("entered"), daySelector("disabled"), daySelector("entered-start"), DayBackground, (props) => props.theme.palette["grey-050"], DayText, (props) => props.theme.palette["blue-600"], daySelector("ghost"), DayBackground, (props) => props.theme.palette["blue-600"], DayText, daySelector("start"), daySelector("disabled"), daySelector("outside"), DayText, (props) => props.theme.palette.white, (props) => props.theme.palette["blue-600"], DayBackground, (props) => props.theme.palette["blue-100"], daySelector("start"), daySelector("disabled"), daySelector("outside"), daySelector("end"), daySelector("disabled"), daySelector("outside"), DayBackground, (props) => props.theme.palette.white, daySelector("end"), daySelector("disabled"), daySelector("outside"), DayText, (props) => props.theme.palette["blue-600"], (props) => props.theme.palette.white, daySelector("end") + daySelector("start"), daySelector("disabled"), daySelector("outside"), daySelector("selected"), daySelector("disabled"), DayTooltip, (props) => props.theme.palette.white, daySelector("initial"), daySelector("disabled"), daySelector("entered"), daySelector("initial-entered"), daySelector("disabled"), DayBackground, daySelector("outside") + daySelector("entered") + daySelector("selected"), DayBackground, daySelector("start") + daySelector("selected"), daySelector("disabled"), daySelector("outside"), DayText, daySelector("selected"), daySelector("disabled"), daySelector("outside"), DayBackground, (props) => props.theme.palette["blue-100"], DayText, (props) => props.theme.palette["blue-600"]);
|
|
25
|
+
export {
|
|
26
|
+
DayBackground,
|
|
27
|
+
DayForeground,
|
|
28
|
+
DayPicker,
|
|
29
|
+
DayText,
|
|
30
|
+
DayTooltip
|
|
31
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as MomentLocaleUtils } from 'react-day-picker/moment';
|
|
3
|
+
import { DayModifiers, Modifier, Modifiers } from 'react-day-picker/types/Modifiers';
|
|
4
|
+
import { IntlShape } from 'react-intl';
|
|
5
5
|
export type DayPickerProps = {
|
|
6
6
|
month: Date;
|
|
7
7
|
onMonthChange?: (month: Date) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DecadePickerProps, DecadePickerState } from './DecadePicker.types';
|
|
3
3
|
export default class DecadePicker extends React.PureComponent<DecadePickerProps, DecadePickerState> {
|
|
4
4
|
state: DecadePickerState;
|
|
5
5
|
getSnapshotBeforeUpdate(prevProps: Readonly<DecadePickerProps>): null;
|