@telus-uds/components-web 2.44.0 → 3.0.0
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/.eslintrc.cjs +26 -0
- package/CHANGELOG.md +13 -2
- package/babel.config.cjs +4 -0
- package/jest.config.cjs +29 -0
- package/lib/Badge/Badge.js +21 -29
- package/lib/Badge/index.js +2 -10
- package/lib/BlockQuote/BlockQuote.js +31 -39
- package/lib/BlockQuote/index.js +2 -10
- package/lib/Breadcrumbs/Breadcrumbs.js +39 -49
- package/lib/Breadcrumbs/Item/Item.js +26 -34
- package/lib/Breadcrumbs/index.js +1 -13
- package/lib/Callout/Callout.js +19 -27
- package/lib/Callout/index.js +2 -10
- package/lib/Card/Card.js +44 -54
- package/lib/Card/CardContent.js +17 -25
- package/lib/Card/CardFooter.js +16 -24
- package/lib/Card/index.js +2 -10
- package/lib/Countdown/Countdown.js +34 -42
- package/lib/Countdown/Segment.js +26 -34
- package/lib/Countdown/constants.js +4 -14
- package/lib/Countdown/dictionary.js +2 -9
- package/lib/Countdown/index.js +2 -10
- package/lib/Countdown/types.js +18 -28
- package/lib/Countdown/useCountdown.js +4 -11
- package/lib/DatePicker/CalendarContainer.js +6 -12
- package/lib/DatePicker/DatePicker.js +94 -103
- package/lib/DatePicker/dictionary.js +1 -8
- package/lib/DatePicker/index.js +2 -10
- package/lib/DatePicker/reactDatesCss.js +3 -10
- package/lib/Disclaimer/Disclaimer.js +15 -23
- package/lib/Disclaimer/index.js +1 -13
- package/lib/ExpandCollapseMini/ExpandCollapseMini.js +16 -24
- package/lib/ExpandCollapseMini/ExpandCollapseMiniControl.js +17 -26
- package/lib/ExpandCollapseMini/index.js +2 -10
- package/lib/Footnote/Footnote.js +85 -95
- package/lib/Footnote/FootnoteLink.js +25 -33
- package/lib/Footnote/dictionary.js +2 -9
- package/lib/Footnote/index.js +4 -12
- package/lib/IconButton/IconButton.js +12 -20
- package/lib/IconButton/index.js +2 -10
- package/lib/Image/Image.js +17 -25
- package/lib/Image/index.js +6 -18
- package/lib/Image/server.js +4 -12
- package/lib/List/List.js +2 -9
- package/lib/List/ListItem.js +10 -18
- package/lib/List/index.js +4 -12
- package/lib/NavigationBar/NavigationBar.js +51 -59
- package/lib/NavigationBar/NavigationItem.js +19 -27
- package/lib/NavigationBar/NavigationSubMenu.js +34 -40
- package/lib/NavigationBar/collapseItems.js +1 -11
- package/lib/NavigationBar/index.js +4 -12
- package/lib/NavigationBar/resolveItemSelection.js +1 -8
- package/lib/OptimizeImage/OptimizeImage.js +26 -34
- package/lib/OptimizeImage/index.js +2 -10
- package/lib/OptimizeImage/utils/getFallbackUrl.js +3 -10
- package/lib/OptimizeImage/utils/getImageUrls.js +9 -16
- package/lib/OptimizeImage/utils/getOptimizedUrl.js +3 -10
- package/lib/OptimizeImage/utils/hasWebpSupport.js +1 -7
- package/lib/OptimizeImage/utils/index.js +5 -34
- package/lib/OptimizeImage/utils/isSvgUrl.js +1 -7
- package/lib/OrderedList/Item.js +28 -36
- package/lib/OrderedList/ItemBase.js +8 -16
- package/lib/OrderedList/OrderedList.js +22 -30
- package/lib/OrderedList/OrderedListBase.js +12 -20
- package/lib/OrderedList/constants.js +1 -8
- package/lib/OrderedList/index.js +4 -12
- package/lib/Paragraph/Paragraph.js +22 -30
- package/lib/Paragraph/index.js +2 -10
- package/lib/PreviewCard/AuthorDate.js +17 -21
- package/lib/PreviewCard/PreviewCard.js +40 -49
- package/lib/PreviewCard/index.js +2 -10
- package/lib/PriceLockup/PriceLockup.js +56 -64
- package/lib/PriceLockup/index.js +2 -10
- package/lib/PriceLockup/tokens.js +2 -9
- package/lib/Progress/ProgressBar.js +17 -24
- package/lib/Progress/index.js +4 -12
- package/lib/QuantitySelector/QuantitySelector.js +55 -63
- package/lib/QuantitySelector/SideButton.js +15 -23
- package/lib/QuantitySelector/dictionary.js +2 -9
- package/lib/QuantitySelector/index.js +2 -10
- package/lib/QuantitySelector/styles.js +4 -13
- package/lib/ResponsiveImage/ResponsiveImage.js +29 -37
- package/lib/ResponsiveImage/index.js +2 -10
- package/lib/Ribbon/Ribbon.js +22 -30
- package/lib/Ribbon/index.js +2 -10
- package/lib/SkeletonProvider/SkeletonImage.js +14 -22
- package/lib/SkeletonProvider/SkeletonProvider.js +17 -25
- package/lib/SkeletonProvider/SkeletonTypography.js +14 -22
- package/lib/SkeletonProvider/index.js +2 -10
- package/lib/Span/Span.js +23 -31
- package/lib/Span/index.js +2 -10
- package/lib/Spinner/Spinner.js +43 -51
- package/lib/Spinner/SpinnerContent.js +21 -29
- package/lib/Spinner/constants.js +4 -14
- package/lib/Spinner/index.js +2 -10
- package/lib/StoryCard/StoryCard.js +40 -49
- package/lib/StoryCard/index.js +2 -10
- package/lib/Table/Body.js +7 -15
- package/lib/Table/Cell.js +28 -38
- package/lib/Table/Header.js +11 -19
- package/lib/Table/Row.js +8 -16
- package/lib/Table/SubHeading.js +10 -18
- package/lib/Table/Table.js +26 -35
- package/lib/Table/index.js +12 -20
- package/lib/TermsAndConditions/ExpandCollapse.js +22 -30
- package/lib/TermsAndConditions/TermsAndConditions.js +52 -60
- package/lib/TermsAndConditions/dictionary.js +2 -9
- package/lib/TermsAndConditions/index.js +1 -13
- package/lib/Testimonial/Testimonial.js +37 -45
- package/lib/Testimonial/index.js +2 -10
- package/lib/Toast/Toast.js +32 -42
- package/lib/Toast/index.js +2 -10
- package/lib/Video/ControlBar/ControlBar.js +73 -81
- package/lib/Video/ControlBar/Controls/VideoButton/VideoButton.js +16 -24
- package/lib/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +27 -35
- package/lib/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +27 -36
- package/lib/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +30 -38
- package/lib/Video/MiddleControlButton/MiddleControlButton.js +16 -24
- package/lib/Video/Video.js +74 -83
- package/lib/Video/index.js +2 -10
- package/lib/Video/videoText.js +1 -8
- package/lib/VideoPicker/VideoPicker.js +43 -53
- package/lib/VideoPicker/VideoPickerPlayer.js +17 -25
- package/lib/VideoPicker/VideoPickerThumbnail.js +38 -46
- package/lib/VideoPicker/VideoSlider.js +17 -26
- package/lib/VideoPicker/index.js +2 -10
- package/lib/VideoPicker/videoPropType.js +9 -18
- package/lib/WaffleGrid/WaffleGrid.js +33 -43
- package/lib/WaffleGrid/index.js +2 -10
- package/lib/WebVideo/WebVideo.js +42 -52
- package/lib/WebVideo/index.js +2 -10
- package/lib/WebVideo/utils/index.js +3 -11
- package/lib/baseExports.js +18 -431
- package/lib/index.js +38 -323
- package/lib/server.js +4 -12
- package/lib/shared/ConditionalWrapper/ConditionalWrapper.js +9 -17
- package/lib/shared/ConditionalWrapper/index.js +2 -10
- package/lib/shared/FullBleedContent/FullBleedContent.js +21 -29
- package/lib/shared/FullBleedContent/getFullBleedBorderRadius.js +1 -8
- package/lib/shared/FullBleedContent/index.js +4 -24
- package/lib/shared/FullBleedContent/useFullBleedContentProps.js +4 -11
- package/lib/shared/VideoSplash/SplashButton/SplashButton.js +19 -27
- package/lib/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +27 -35
- package/lib/shared/VideoSplash/VideoSplash.js +24 -32
- package/lib/shared/VideoSplash/helpers.js +5 -14
- package/lib/utils/index.js +10 -75
- package/lib/utils/isElementFocusable.js +1 -8
- package/lib/utils/logger.js +6 -15
- package/lib/utils/media.js +5 -11
- package/lib/utils/renderStructuredContent.js +8 -15
- package/lib/utils/ssr.js +5 -12
- package/lib/utils/theming/get-theme-from-server.js +2 -10
- package/lib/utils/theming/with-client-theme.js +9 -17
- package/lib/utils/theming/with-server-theme.js +11 -19
- package/lib/utils/transforms.js +3 -11
- package/lib/utils/useOverlaidPosition.js +15 -23
- package/lib/utils/useTypographyTheme.js +6 -13
- package/package.json +18 -20
- package/src/Card/Card.jsx +2 -2
- package/src/DatePicker/DatePicker.jsx +1 -2
- package/src/PreviewCard/AuthorDate.jsx +5 -3
- package/src/utils/logger.js +2 -2
- package/lib-module/Badge/Badge.js +0 -121
- package/lib-module/Badge/index.js +0 -2
- package/lib-module/BlockQuote/BlockQuote.js +0 -204
- package/lib-module/BlockQuote/index.js +0 -2
- package/lib-module/Breadcrumbs/Breadcrumbs.js +0 -250
- package/lib-module/Breadcrumbs/Item/Item.js +0 -175
- package/lib-module/Breadcrumbs/index.js +0 -1
- package/lib-module/Callout/Callout.js +0 -135
- package/lib-module/Callout/index.js +0 -2
- package/lib-module/Card/Card.js +0 -251
- package/lib-module/Card/CardContent.js +0 -90
- package/lib-module/Card/CardFooter.js +0 -78
- package/lib-module/Card/index.js +0 -2
- package/lib-module/Countdown/Countdown.js +0 -169
- package/lib-module/Countdown/Segment.js +0 -96
- package/lib-module/Countdown/constants.js +0 -4
- package/lib-module/Countdown/dictionary.js +0 -22
- package/lib-module/Countdown/index.js +0 -2
- package/lib-module/Countdown/types.js +0 -24
- package/lib-module/Countdown/useCountdown.js +0 -26
- package/lib-module/DatePicker/CalendarContainer.js +0 -208
- package/lib-module/DatePicker/DatePicker.js +0 -519
- package/lib-module/DatePicker/dictionary.js +0 -119
- package/lib-module/DatePicker/index.js +0 -2
- package/lib-module/DatePicker/reactDatesCss.js +0 -3
- package/lib-module/Disclaimer/Disclaimer.js +0 -54
- package/lib-module/Disclaimer/index.js +0 -1
- package/lib-module/ExpandCollapseMini/ExpandCollapseMini.js +0 -73
- package/lib-module/ExpandCollapseMini/ExpandCollapseMiniControl.js +0 -117
- package/lib-module/ExpandCollapseMini/index.js +0 -2
- package/lib-module/Footnote/Footnote.js +0 -632
- package/lib-module/Footnote/FootnoteLink.js +0 -118
- package/lib-module/Footnote/dictionary.js +0 -12
- package/lib-module/Footnote/index.js +0 -4
- package/lib-module/IconButton/IconButton.js +0 -55
- package/lib-module/IconButton/index.js +0 -2
- package/lib-module/Image/Image.js +0 -83
- package/lib-module/Image/index.js +0 -9
- package/lib-module/Image/server.js +0 -4
- package/lib-module/List/List.js +0 -2
- package/lib-module/List/ListItem.js +0 -28
- package/lib-module/List/index.js +0 -4
- package/lib-module/NavigationBar/NavigationBar.js +0 -224
- package/lib-module/NavigationBar/NavigationItem.js +0 -87
- package/lib-module/NavigationBar/NavigationSubMenu.js +0 -162
- package/lib-module/NavigationBar/collapseItems.js +0 -41
- package/lib-module/NavigationBar/index.js +0 -4
- package/lib-module/NavigationBar/resolveItemSelection.js +0 -16
- package/lib-module/OptimizeImage/OptimizeImage.js +0 -92
- package/lib-module/OptimizeImage/index.js +0 -2
- package/lib-module/OptimizeImage/utils/getFallbackUrl.js +0 -7
- package/lib-module/OptimizeImage/utils/getImageUrls.js +0 -12
- package/lib-module/OptimizeImage/utils/getOptimizedUrl.js +0 -17
- package/lib-module/OptimizeImage/utils/hasWebpSupport.js +0 -28
- package/lib-module/OptimizeImage/utils/index.js +0 -5
- package/lib-module/OptimizeImage/utils/isSvgUrl.js +0 -3
- package/lib-module/OrderedList/Item.js +0 -145
- package/lib-module/OrderedList/ItemBase.js +0 -27
- package/lib-module/OrderedList/OrderedList.js +0 -86
- package/lib-module/OrderedList/OrderedListBase.js +0 -45
- package/lib-module/OrderedList/constants.js +0 -2
- package/lib-module/OrderedList/index.js +0 -4
- package/lib-module/Paragraph/Paragraph.js +0 -90
- package/lib-module/Paragraph/index.js +0 -2
- package/lib-module/PreviewCard/AuthorDate.js +0 -57
- package/lib-module/PreviewCard/PreviewCard.js +0 -209
- package/lib-module/PreviewCard/index.js +0 -2
- package/lib-module/PriceLockup/PriceLockup.js +0 -335
- package/lib-module/PriceLockup/index.js +0 -2
- package/lib-module/PriceLockup/tokens.js +0 -55
- package/lib-module/Progress/ProgressBar.js +0 -83
- package/lib-module/Progress/index.js +0 -4
- package/lib-module/QuantitySelector/QuantitySelector.js +0 -261
- package/lib-module/QuantitySelector/SideButton.js +0 -70
- package/lib-module/QuantitySelector/dictionary.js +0 -26
- package/lib-module/QuantitySelector/index.js +0 -2
- package/lib-module/QuantitySelector/styles.js +0 -9
- package/lib-module/ResponsiveImage/ResponsiveImage.js +0 -95
- package/lib-module/ResponsiveImage/index.js +0 -2
- package/lib-module/Ribbon/Ribbon.js +0 -216
- package/lib-module/Ribbon/index.js +0 -2
- package/lib-module/SkeletonProvider/SkeletonImage.js +0 -39
- package/lib-module/SkeletonProvider/SkeletonProvider.js +0 -57
- package/lib-module/SkeletonProvider/SkeletonTypography.js +0 -38
- package/lib-module/SkeletonProvider/index.js +0 -2
- package/lib-module/Span/Span.js +0 -72
- package/lib-module/Span/index.js +0 -2
- package/lib-module/Spinner/Spinner.js +0 -215
- package/lib-module/Spinner/SpinnerContent.js +0 -94
- package/lib-module/Spinner/constants.js +0 -4
- package/lib-module/Spinner/index.js +0 -2
- package/lib-module/StoryCard/StoryCard.js +0 -212
- package/lib-module/StoryCard/index.js +0 -2
- package/lib-module/Table/Body.js +0 -17
- package/lib-module/Table/Cell.js +0 -176
- package/lib-module/Table/Header.js +0 -25
- package/lib-module/Table/Row.js +0 -19
- package/lib-module/Table/SubHeading.js +0 -23
- package/lib-module/Table/Table.js +0 -114
- package/lib-module/Table/index.js +0 -12
- package/lib-module/TermsAndConditions/ExpandCollapse.js +0 -153
- package/lib-module/TermsAndConditions/TermsAndConditions.js +0 -277
- package/lib-module/TermsAndConditions/dictionary.js +0 -16
- package/lib-module/TermsAndConditions/index.js +0 -1
- package/lib-module/Testimonial/Testimonial.js +0 -234
- package/lib-module/Testimonial/index.js +0 -2
- package/lib-module/Toast/Toast.js +0 -158
- package/lib-module/Toast/index.js +0 -2
- package/lib-module/Video/ControlBar/ControlBar.js +0 -288
- package/lib-module/Video/ControlBar/Controls/VideoButton/VideoButton.js +0 -70
- package/lib-module/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +0 -163
- package/lib-module/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +0 -203
- package/lib-module/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +0 -191
- package/lib-module/Video/MiddleControlButton/MiddleControlButton.js +0 -71
- package/lib-module/Video/Video.js +0 -959
- package/lib-module/Video/index.js +0 -2
- package/lib-module/Video/videoText.js +0 -55
- package/lib-module/VideoPicker/VideoPicker.js +0 -190
- package/lib-module/VideoPicker/VideoPickerPlayer.js +0 -48
- package/lib-module/VideoPicker/VideoPickerThumbnail.js +0 -218
- package/lib-module/VideoPicker/VideoSlider.js +0 -82
- package/lib-module/VideoPicker/index.js +0 -2
- package/lib-module/VideoPicker/videoPropType.js +0 -10
- package/lib-module/WaffleGrid/WaffleGrid.js +0 -157
- package/lib-module/WaffleGrid/index.js +0 -2
- package/lib-module/WebVideo/WebVideo.js +0 -191
- package/lib-module/WebVideo/index.js +0 -2
- package/lib-module/WebVideo/utils/index.js +0 -50
- package/lib-module/baseExports.js +0 -19
- package/lib-module/index.js +0 -40
- package/lib-module/server.js +0 -5
- package/lib-module/shared/ConditionalWrapper/ConditionalWrapper.js +0 -22
- package/lib-module/shared/ConditionalWrapper/index.js +0 -2
- package/lib-module/shared/FullBleedContent/FullBleedContent.js +0 -101
- package/lib-module/shared/FullBleedContent/getFullBleedBorderRadius.js +0 -55
- package/lib-module/shared/FullBleedContent/index.js +0 -4
- package/lib-module/shared/FullBleedContent/useFullBleedContentProps.js +0 -55
- package/lib-module/shared/VideoSplash/SplashButton/SplashButton.js +0 -84
- package/lib-module/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +0 -223
- package/lib-module/shared/VideoSplash/VideoSplash.js +0 -65
- package/lib-module/shared/VideoSplash/helpers.js +0 -23
- package/lib-module/utils/index.js +0 -10
- package/lib-module/utils/isElementFocusable.js +0 -8
- package/lib-module/utils/logger.js +0 -18
- package/lib-module/utils/media.js +0 -39
- package/lib-module/utils/renderStructuredContent.js +0 -66
- package/lib-module/utils/ssr.js +0 -37
- package/lib-module/utils/theming/get-theme-from-server.js +0 -16
- package/lib-module/utils/theming/with-client-theme.js +0 -24
- package/lib-module/utils/theming/with-server-theme.js +0 -26
- package/lib-module/utils/transforms.js +0 -4
- package/lib-module/utils/useOverlaidPosition.js +0 -216
- package/lib-module/utils/useTypographyTheme.js +0 -24
|
@@ -1,25 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
16
|
-
var _lodash = require("lodash");
|
|
17
|
-
var _CalendarContainer = _interopRequireDefault(require("./CalendarContainer"));
|
|
18
|
-
var _dictionary = _interopRequireDefault(require("./dictionary"));
|
|
19
|
-
var _utils = require("../utils");
|
|
20
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
-
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import momentPropTypes from 'react-moment-proptypes';
|
|
5
|
+
import 'react-dates/initialize';
|
|
6
|
+
import { SingleDatePicker, DayPickerSingleDateController } from 'react-dates';
|
|
7
|
+
import { IconButton, TextInput, Portal, selectSystemProps, useCopy, useViewport, useThemeTokens, applyTextStyles, getTokensPropType, useSafeLayoutEffect } from '@telus-uds/components-base';
|
|
8
|
+
import moment from 'moment';
|
|
9
|
+
import { isUndefined, throttle } from 'lodash';
|
|
10
|
+
import CalendarContainer from './CalendarContainer';
|
|
11
|
+
import dictionary from './dictionary';
|
|
12
|
+
import { htmlAttrs } from '../utils';
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
23
15
|
const dateFormat = 'DD / MM / YYYY';
|
|
24
16
|
const dateFormatWithoutSpaces = 'DD/MM/YYYY';
|
|
25
17
|
const getResponsiveDaySize = function () {
|
|
@@ -38,21 +30,21 @@ const getResponsiveCircleSize = function () {
|
|
|
38
30
|
}
|
|
39
31
|
return inline ? 44 : 26;
|
|
40
32
|
};
|
|
41
|
-
const MonthCenterContainer = /*#__PURE__*/
|
|
33
|
+
const MonthCenterContainer = /*#__PURE__*/styled.div.withConfig({
|
|
42
34
|
displayName: "DatePicker__MonthCenterContainer",
|
|
43
35
|
componentId: "components-web__sc-mz8fi3-0"
|
|
44
36
|
})({
|
|
45
37
|
display: 'flex',
|
|
46
38
|
justifyContent: 'center'
|
|
47
39
|
});
|
|
48
|
-
const DateInputWrapper = /*#__PURE__*/
|
|
40
|
+
const DateInputWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
49
41
|
displayName: "DatePicker__DateInputWrapper",
|
|
50
42
|
componentId: "components-web__sc-mz8fi3-1"
|
|
51
43
|
})({
|
|
52
44
|
display: 'flex',
|
|
53
45
|
flexDirection: 'column'
|
|
54
46
|
});
|
|
55
|
-
const PortalPositionedContainer = /*#__PURE__*/
|
|
47
|
+
const PortalPositionedContainer = /*#__PURE__*/styled.div.withConfig({
|
|
56
48
|
displayName: "DatePicker__PortalPositionedContainer",
|
|
57
49
|
componentId: "components-web__sc-mz8fi3-2"
|
|
58
50
|
})({
|
|
@@ -72,10 +64,10 @@ const PortalPositionedContainer = /*#__PURE__*/_styledComponents.default.div.wit
|
|
|
72
64
|
});
|
|
73
65
|
const validDatePattern = /^([0-2][0-9]|3[0-1])(\/)(0[1-9]|1[0-2])\2(\d{4})$/;
|
|
74
66
|
const getInitialVisibleMonth = (initialVisibleMonth, inputDate) => {
|
|
75
|
-
if (initialVisibleMonth === '' || inputDate instanceof
|
|
67
|
+
if (initialVisibleMonth === '' || inputDate instanceof moment) {
|
|
76
68
|
return null;
|
|
77
69
|
}
|
|
78
|
-
return () => (
|
|
70
|
+
return () => moment(initialVisibleMonth);
|
|
79
71
|
};
|
|
80
72
|
|
|
81
73
|
/**
|
|
@@ -99,7 +91,7 @@ const getInitialVisibleMonth = (initialVisibleMonth, inputDate) => {
|
|
|
99
91
|
* - Optimized for keyboard interaction and tablet touch
|
|
100
92
|
* - Recommended for viewports greater than or equal to 576px
|
|
101
93
|
*/
|
|
102
|
-
const DatePicker = /*#__PURE__*/
|
|
94
|
+
const DatePicker = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
103
95
|
var _dictionary$copy;
|
|
104
96
|
let {
|
|
105
97
|
copy = 'en',
|
|
@@ -123,16 +115,16 @@ const DatePicker = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
|
123
115
|
initialVisibleMonth = '',
|
|
124
116
|
...rest
|
|
125
117
|
} = _ref3;
|
|
126
|
-
const [inputDate, setInputDate] =
|
|
127
|
-
const [inputText, setInputText] =
|
|
128
|
-
const textInputRef =
|
|
129
|
-
const prevButtonRef =
|
|
130
|
-
const [datePickerPosition, setDatePickerPosition] =
|
|
118
|
+
const [inputDate, setInputDate] = React.useState(date instanceof moment ? date : undefined);
|
|
119
|
+
const [inputText, setInputText] = React.useState(date instanceof moment ? date.format(dateFormat) : '');
|
|
120
|
+
const textInputRef = React.useRef();
|
|
121
|
+
const prevButtonRef = React.useRef();
|
|
122
|
+
const [datePickerPosition, setDatePickerPosition] = React.useState({
|
|
131
123
|
left: 0,
|
|
132
124
|
top: 0
|
|
133
125
|
});
|
|
134
|
-
const datePickerRef =
|
|
135
|
-
|
|
126
|
+
const datePickerRef = React.useRef(null);
|
|
127
|
+
useSafeLayoutEffect(() => {
|
|
136
128
|
const updateDatePickerPosition = () => {
|
|
137
129
|
if (inline || !(textInputRef !== null && textInputRef !== void 0 && textInputRef.current)) return;
|
|
138
130
|
const {
|
|
@@ -146,7 +138,7 @@ const DatePicker = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
|
146
138
|
left: inputLeft
|
|
147
139
|
});
|
|
148
140
|
};
|
|
149
|
-
const throttledUpdate =
|
|
141
|
+
const throttledUpdate = throttle(updateDatePickerPosition, 100, {
|
|
150
142
|
leading: false
|
|
151
143
|
});
|
|
152
144
|
|
|
@@ -165,33 +157,33 @@ const DatePicker = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
|
165
157
|
});
|
|
166
158
|
};
|
|
167
159
|
}, []);
|
|
168
|
-
const [isFocused, setIsFocused] =
|
|
169
|
-
const [isClickedInside, setIsClickedInside] =
|
|
170
|
-
const getCopy =
|
|
171
|
-
dictionary
|
|
160
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
161
|
+
const [isClickedInside, setIsClickedInside] = React.useState(false);
|
|
162
|
+
const getCopy = useCopy({
|
|
163
|
+
dictionary,
|
|
172
164
|
copy
|
|
173
165
|
});
|
|
174
|
-
|
|
166
|
+
React.useEffect(() => {
|
|
175
167
|
/**
|
|
176
168
|
* `date` could be passed as `null` to reset the value so explicitly
|
|
177
169
|
* checking for not being `undefined`
|
|
178
170
|
*/
|
|
179
|
-
if (!
|
|
171
|
+
if (!isUndefined(date) && !moment(date).isSame(inputDate)) {
|
|
180
172
|
setInputDate(date);
|
|
181
|
-
setInputText(date instanceof
|
|
173
|
+
setInputText(date instanceof moment ? date.format(dateFormat) : '');
|
|
182
174
|
}
|
|
183
175
|
}, [date, inputDate]);
|
|
184
|
-
|
|
176
|
+
React.useEffect(() => {
|
|
185
177
|
let timeoutId;
|
|
186
178
|
if (prevButtonRef.current && isFocused) {
|
|
187
179
|
timeoutId = setTimeout(() => prevButtonRef.current.focus(), 100);
|
|
188
180
|
}
|
|
189
181
|
return () => clearTimeout(timeoutId);
|
|
190
182
|
}, [isFocused]);
|
|
191
|
-
|
|
183
|
+
React.useEffect(() => {
|
|
192
184
|
if (inputText !== '' && inputDate !== undefined) {
|
|
193
185
|
var _textInputRef$current;
|
|
194
|
-
textInputRef === null || textInputRef === void 0
|
|
186
|
+
textInputRef === null || textInputRef === void 0 || (_textInputRef$current = textInputRef.current) === null || _textInputRef$current === void 0 || _textInputRef$current.focus();
|
|
195
187
|
}
|
|
196
188
|
}, [inputDate, inputText]);
|
|
197
189
|
const onFocusChange = _ref4 => {
|
|
@@ -229,15 +221,15 @@ const DatePicker = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
|
229
221
|
if (onDateChange) onDateChange(value);
|
|
230
222
|
};
|
|
231
223
|
const onChangeInput = value => {
|
|
232
|
-
if (value === '' || (
|
|
224
|
+
if (value === '' || moment(value.replace(/\s/g, ''), dateFormatWithoutSpaces, true).isValid()) {
|
|
233
225
|
if (value === '') {
|
|
234
226
|
setInputDate(undefined); // Set inputDate to undefined if input is empty
|
|
235
|
-
onDateChange === null || onDateChange === void 0
|
|
227
|
+
onDateChange === null || onDateChange === void 0 || onDateChange(undefined);
|
|
236
228
|
} else {
|
|
237
|
-
setInputDate((
|
|
238
|
-
onDateChange === null || onDateChange === void 0
|
|
229
|
+
setInputDate(moment(value, dateFormat));
|
|
230
|
+
onDateChange === null || onDateChange === void 0 || onDateChange(moment(value, dateFormat));
|
|
239
231
|
}
|
|
240
|
-
setInputText(value === '' ? '' : (
|
|
232
|
+
setInputText(value === '' ? '' : moment(value, dateFormatWithoutSpaces).format(dateFormat));
|
|
241
233
|
} else {
|
|
242
234
|
setInputText(value);
|
|
243
235
|
}
|
|
@@ -245,7 +237,7 @@ const DatePicker = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
|
245
237
|
const handleOnKeyPress = event => {
|
|
246
238
|
if (event.key === 'Backspace' && inputText === '') {
|
|
247
239
|
setInputDate(undefined);
|
|
248
|
-
onDateChange === null || onDateChange === void 0
|
|
240
|
+
onDateChange === null || onDateChange === void 0 || onDateChange(undefined);
|
|
249
241
|
}
|
|
250
242
|
};
|
|
251
243
|
const handleValidation = inputValidation => {
|
|
@@ -257,10 +249,10 @@ const DatePicker = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
|
257
249
|
}
|
|
258
250
|
return inputValidation;
|
|
259
251
|
};
|
|
260
|
-
const viewport =
|
|
252
|
+
const viewport = useViewport();
|
|
261
253
|
const daySize = getResponsiveDaySize(inline, viewport);
|
|
262
254
|
const circleSize = getResponsiveCircleSize(inline, viewport);
|
|
263
|
-
const HiddenInputFieldContainer = /*#__PURE__*/
|
|
255
|
+
const HiddenInputFieldContainer = /*#__PURE__*/styled.div.withConfig({
|
|
264
256
|
displayName: "DatePicker__HiddenInputFieldContainer",
|
|
265
257
|
componentId: "components-web__sc-mz8fi3-3"
|
|
266
258
|
})(["height:", ";width:", ";overflow:hidden;"], props => props.height, props => props.width);
|
|
@@ -270,21 +262,21 @@ const DatePicker = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
|
270
262
|
previousIcon,
|
|
271
263
|
nextIcon,
|
|
272
264
|
...remainingTokens
|
|
273
|
-
} =
|
|
265
|
+
} = useThemeTokens('DatePicker', tokens, {
|
|
274
266
|
...variant,
|
|
275
267
|
inline
|
|
276
268
|
}, {
|
|
277
269
|
viewport
|
|
278
270
|
});
|
|
279
|
-
const defaultFontTokens =
|
|
271
|
+
const defaultFontTokens = applyTextStyles({
|
|
280
272
|
fontName: remainingTokens.calendarDayDefaultFontName,
|
|
281
273
|
fontWeight: remainingTokens.calendarDayDefaultFontWeight
|
|
282
274
|
});
|
|
283
|
-
const calendarMonthFontTokens =
|
|
275
|
+
const calendarMonthFontTokens = applyTextStyles({
|
|
284
276
|
fontName: remainingTokens.calendarMonthCaptionFontName,
|
|
285
277
|
fontWeight: remainingTokens.calendarMonthCaptionFontWeight
|
|
286
278
|
});
|
|
287
|
-
const calendarWeekFontTokens =
|
|
279
|
+
const calendarWeekFontTokens = applyTextStyles({
|
|
288
280
|
fontName: remainingTokens.dayPickerWeekHeaderFontName,
|
|
289
281
|
fontWeight: remainingTokens.dayPickerWeekHeaderFontWeight
|
|
290
282
|
});
|
|
@@ -292,7 +284,7 @@ const DatePicker = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
|
292
284
|
let {
|
|
293
285
|
onClick
|
|
294
286
|
} = _ref5;
|
|
295
|
-
return /*#__PURE__*/(
|
|
287
|
+
return /*#__PURE__*/_jsx(IconButton, {
|
|
296
288
|
onPress: () => {
|
|
297
289
|
onClick();
|
|
298
290
|
},
|
|
@@ -308,7 +300,7 @@ const DatePicker = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
|
308
300
|
let {
|
|
309
301
|
onClick
|
|
310
302
|
} = _ref6;
|
|
311
|
-
return /*#__PURE__*/(
|
|
303
|
+
return /*#__PURE__*/_jsx(IconButton, {
|
|
312
304
|
onPress: () => {
|
|
313
305
|
onClick();
|
|
314
306
|
},
|
|
@@ -319,19 +311,19 @@ const DatePicker = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
|
319
311
|
testID: nextTestID
|
|
320
312
|
});
|
|
321
313
|
};
|
|
322
|
-
return /*#__PURE__*/(
|
|
323
|
-
children: inline ? /*#__PURE__*/(
|
|
324
|
-
children: [/*#__PURE__*/(
|
|
314
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
315
|
+
children: inline ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
316
|
+
children: [/*#__PURE__*/_jsx(HiddenInputFieldContainer, {
|
|
325
317
|
height: hiddenInputFieldContainerHeight,
|
|
326
318
|
width: hiddenInputFieldContainerWidth,
|
|
327
|
-
children: /*#__PURE__*/(
|
|
319
|
+
children: /*#__PURE__*/_jsx("input", {
|
|
328
320
|
ref: ref,
|
|
329
321
|
id: id,
|
|
330
322
|
type: "text",
|
|
331
323
|
value: inputText,
|
|
332
324
|
readOnly: true
|
|
333
325
|
})
|
|
334
|
-
}), /*#__PURE__*/(
|
|
326
|
+
}), /*#__PURE__*/_jsx(CalendarContainer, {
|
|
335
327
|
...selectProps(rest),
|
|
336
328
|
daySize: daySize,
|
|
337
329
|
validation: validation,
|
|
@@ -341,7 +333,7 @@ const DatePicker = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
|
341
333
|
calendarMonthFontTokens: calendarMonthFontTokens,
|
|
342
334
|
calendarWeekFontTokens: calendarWeekFontTokens,
|
|
343
335
|
defaultFontTokens: defaultFontTokens,
|
|
344
|
-
children: /*#__PURE__*/(
|
|
336
|
+
children: /*#__PURE__*/_jsx(DayPickerSingleDateController, {
|
|
345
337
|
date: inputDate,
|
|
346
338
|
onDateChange: onChange,
|
|
347
339
|
focused: (inputDate ?? isFocused) || initialVisibleMonth !== '',
|
|
@@ -359,21 +351,21 @@ const DatePicker = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
|
359
351
|
let {
|
|
360
352
|
month
|
|
361
353
|
} = _ref7;
|
|
362
|
-
return /*#__PURE__*/(
|
|
363
|
-
children: /*#__PURE__*/(
|
|
364
|
-
children: [
|
|
354
|
+
return /*#__PURE__*/_jsx(MonthCenterContainer, {
|
|
355
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
356
|
+
children: [dictionary[copy] ? dictionary[copy].months[month.month()] : month.format('MMMM'), ' ', month.year()]
|
|
365
357
|
})
|
|
366
358
|
});
|
|
367
359
|
},
|
|
368
|
-
renderWeekHeaderElement: day => /*#__PURE__*/(
|
|
369
|
-
children:
|
|
360
|
+
renderWeekHeaderElement: day => /*#__PURE__*/_jsx("div", {
|
|
361
|
+
children: dictionary[copy] ? dictionary[copy].weekDays[day] : day
|
|
370
362
|
})
|
|
371
363
|
})
|
|
372
364
|
})]
|
|
373
|
-
}) : /*#__PURE__*/(
|
|
365
|
+
}) : /*#__PURE__*/_jsx(DateInputWrapper, {
|
|
374
366
|
onMouseDown: handleMouseDown,
|
|
375
367
|
onFocus: handleFocus,
|
|
376
|
-
children: /*#__PURE__*/(
|
|
368
|
+
children: /*#__PURE__*/_jsx(TextInput, {
|
|
377
369
|
copy: copy,
|
|
378
370
|
feedback: feedback,
|
|
379
371
|
hint: hint,
|
|
@@ -382,17 +374,17 @@ const DatePicker = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
|
382
374
|
onKeyPress: handleOnKeyPress,
|
|
383
375
|
tooltip: tooltip,
|
|
384
376
|
hintPosition: hintPosition,
|
|
385
|
-
label: label ?? ((_dictionary$copy =
|
|
377
|
+
label: label ?? ((_dictionary$copy = dictionary[copy]) === null || _dictionary$copy === void 0 ? void 0 : _dictionary$copy.roleDescription),
|
|
386
378
|
value: inputText,
|
|
387
379
|
validation: handleValidation(validation),
|
|
388
380
|
inactive: disabled,
|
|
389
381
|
ref: textInputRef,
|
|
390
|
-
children: /*#__PURE__*/(
|
|
391
|
-
children: /*#__PURE__*/(
|
|
382
|
+
children: /*#__PURE__*/_jsx(Portal, {
|
|
383
|
+
children: /*#__PURE__*/_jsx(PortalPositionedContainer, {
|
|
392
384
|
top: datePickerPosition.top,
|
|
393
385
|
left: datePickerPosition.left,
|
|
394
386
|
ref: datePickerRef,
|
|
395
|
-
children: /*#__PURE__*/(
|
|
387
|
+
children: /*#__PURE__*/_jsx(CalendarContainer, {
|
|
396
388
|
...selectProps(rest),
|
|
397
389
|
daySize: daySize,
|
|
398
390
|
validation: validation,
|
|
@@ -402,7 +394,7 @@ const DatePicker = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
|
402
394
|
calendarMonthFontTokens: calendarMonthFontTokens,
|
|
403
395
|
calendarWeekFontTokens: calendarWeekFontTokens,
|
|
404
396
|
defaultFontTokens: defaultFontTokens,
|
|
405
|
-
children: /*#__PURE__*/(
|
|
397
|
+
children: /*#__PURE__*/_jsx(SingleDatePicker, {
|
|
406
398
|
date: inputDate,
|
|
407
399
|
disabled: disabled,
|
|
408
400
|
onDateChange: onChange,
|
|
@@ -423,14 +415,14 @@ const DatePicker = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
|
423
415
|
let {
|
|
424
416
|
month
|
|
425
417
|
} = _ref8;
|
|
426
|
-
return /*#__PURE__*/(
|
|
427
|
-
children: /*#__PURE__*/(
|
|
428
|
-
children: [
|
|
418
|
+
return /*#__PURE__*/_jsx(MonthCenterContainer, {
|
|
419
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
420
|
+
children: [dictionary[copy] ? dictionary[copy].months[month.month()] : month.format('MMMM'), ' ', month.year()]
|
|
429
421
|
})
|
|
430
422
|
});
|
|
431
423
|
},
|
|
432
|
-
renderWeekHeaderElement: day => /*#__PURE__*/(
|
|
433
|
-
children:
|
|
424
|
+
renderWeekHeaderElement: day => /*#__PURE__*/_jsx("div", {
|
|
425
|
+
children: dictionary[copy] ? dictionary[copy].weekDays[day] : day
|
|
434
426
|
})
|
|
435
427
|
})
|
|
436
428
|
})
|
|
@@ -443,83 +435,82 @@ const DatePicker = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
|
443
435
|
DatePicker.displayName = 'DatePicker';
|
|
444
436
|
DatePicker.propTypes = {
|
|
445
437
|
...selectedSystemPropTypes,
|
|
446
|
-
tokens:
|
|
438
|
+
tokens: getTokensPropType('DatePicker'),
|
|
447
439
|
/**
|
|
448
440
|
* A unique identifier.
|
|
449
441
|
*/
|
|
450
|
-
id:
|
|
442
|
+
id: PropTypes.string.isRequired,
|
|
451
443
|
/**
|
|
452
444
|
* Whether the English or French copy will be used (e.g. for accessibility labels).
|
|
453
445
|
*/
|
|
454
|
-
copy:
|
|
446
|
+
copy: PropTypes.oneOf(['en', 'fr']),
|
|
455
447
|
/**
|
|
456
448
|
* A Moment instance representing the currently selected date, i.e. `moment()`
|
|
457
449
|
*/
|
|
458
|
-
date:
|
|
450
|
+
date: momentPropTypes.momentObj,
|
|
459
451
|
/**
|
|
460
452
|
* A detailed description of validation error/success or additional instructions.
|
|
461
453
|
* Visual variant is determined based on the `validation` prop.
|
|
462
454
|
*/
|
|
463
|
-
feedback:
|
|
455
|
+
feedback: PropTypes.string,
|
|
464
456
|
/**
|
|
465
457
|
* Event triggered every time a new date is clicked on
|
|
466
458
|
* @param {Moment} date The new date that was selected
|
|
467
459
|
*/
|
|
468
|
-
onDateChange:
|
|
460
|
+
onDateChange: PropTypes.func,
|
|
469
461
|
/**
|
|
470
462
|
* A function determining whether a given date should be disabled
|
|
471
463
|
* @param {Moment} date The date to optionally disable
|
|
472
464
|
* @returns {bool}
|
|
473
465
|
*/
|
|
474
|
-
isDayDisabled:
|
|
466
|
+
isDayDisabled: PropTypes.func,
|
|
475
467
|
/**
|
|
476
468
|
* The field label to be displayed above the calendar
|
|
477
469
|
*/
|
|
478
|
-
label:
|
|
470
|
+
label: PropTypes.string,
|
|
479
471
|
/**
|
|
480
472
|
* A flag determining if the calendar picker is standalone or an input with overlay
|
|
481
473
|
*/
|
|
482
|
-
inline:
|
|
474
|
+
inline: PropTypes.bool,
|
|
483
475
|
/**
|
|
484
476
|
* A short description of the expected input.
|
|
485
477
|
*/
|
|
486
|
-
hint:
|
|
478
|
+
hint: PropTypes.string,
|
|
487
479
|
/**
|
|
488
480
|
* Position of the hint relative to label. Use `below` to display a larger hint below the label.
|
|
489
481
|
*/
|
|
490
|
-
hintPosition:
|
|
482
|
+
hintPosition: PropTypes.oneOf(['inline', 'below']),
|
|
491
483
|
/**
|
|
492
484
|
* Content of an optional `Tooltip`. If set, a tooltip button will be shown next to the label.
|
|
493
485
|
*/
|
|
494
|
-
tooltip:
|
|
486
|
+
tooltip: PropTypes.string,
|
|
495
487
|
/**
|
|
496
488
|
* Use to visually mark an input as valid or invalid.
|
|
497
489
|
*/
|
|
498
|
-
validation:
|
|
490
|
+
validation: PropTypes.oneOf(['error', 'success']),
|
|
499
491
|
/**
|
|
500
492
|
* Disable the input which will not open the calendar picker
|
|
501
493
|
*/
|
|
502
|
-
disabled:
|
|
494
|
+
disabled: PropTypes.bool,
|
|
503
495
|
/**
|
|
504
496
|
* A unique identifier for the previous icon button located on the datepicker.
|
|
505
497
|
* This is for automation testing purposes.
|
|
506
498
|
* Will be added as a `data-testid-prev` attribute for example.
|
|
507
499
|
*/
|
|
508
|
-
prevTestID:
|
|
500
|
+
prevTestID: PropTypes.string,
|
|
509
501
|
/**
|
|
510
502
|
* A unique identifier for the next icon button located on the datepicker.
|
|
511
503
|
* This is for automation testing purposes.
|
|
512
504
|
* Will be added as a `data-testid-next` attribute for example.
|
|
513
505
|
*/
|
|
514
|
-
nextTestID:
|
|
506
|
+
nextTestID: PropTypes.string,
|
|
515
507
|
/**
|
|
516
508
|
* Optional placeholder for the date input. If not set the default value will be `DD / MM / YYYY`
|
|
517
509
|
*/
|
|
518
|
-
placeholder:
|
|
510
|
+
placeholder: PropTypes.string,
|
|
519
511
|
/**
|
|
520
512
|
* The initial month to display when the calendar is opened. Expects a string in the format `YYYY-MM`
|
|
521
513
|
*/
|
|
522
|
-
initialVisibleMonth:
|
|
514
|
+
initialVisibleMonth: PropTypes.string
|
|
523
515
|
};
|
|
524
|
-
|
|
525
|
-
exports.default = _default;
|
|
516
|
+
export default DatePicker;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
1
|
// from https://github.com/airbnb/react-dates/blob/master/src/defaultPhrases.js
|
|
8
2
|
const calendarLabel = 'Calendrier';
|
|
9
3
|
const roleDescription = 'Sélecteur de date';
|
|
@@ -122,5 +116,4 @@ const dictionary = {
|
|
|
122
116
|
keyboardBackwardNavigationInstructions
|
|
123
117
|
}
|
|
124
118
|
};
|
|
125
|
-
|
|
126
|
-
exports.default = _default;
|
|
119
|
+
export default dictionary;
|
package/lib/DatePicker/index.js
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _DatePicker = _interopRequireDefault(require("./DatePicker"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
var _default = _DatePicker.default;
|
|
10
|
-
exports.default = _default;
|
|
1
|
+
import DatePicker from './DatePicker';
|
|
2
|
+
export default DatePicker;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _styledComponents = require("styled-components");
|
|
8
|
-
const defaultReactDatesCss = /*#__PURE__*/(0, _styledComponents.css)([".PresetDateRangePicker_panel{padding:0 22px 11px;}.PresetDateRangePicker_button{position:relative;height:100%;text-align:center;background:0 0;border:2px solid #00a699;color:#00a699;padding:4px 12px;margin-right:8px;font:inherit;font-weight:700;line-height:normal;overflow:visible;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;}.PresetDateRangePicker_button:active{outline:0;}.PresetDateRangePicker_button__selected{color:#fff;background:#00a699;}.SingleDatePickerInput{display:inline-block;background-color:#fff;position:absolute;top:-55px;}.SingleDatePickerInput__disabled{background-color:#f2f2f2;}.SingleDatePickerInput__block{display:block;}.SingleDatePickerInput__showClearDate{padding-right:30px;}.SingleDatePickerInput_clearDate{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;padding:10px;margin:0 10px 0 5px;position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}.SingleDatePickerInput_clearDate__default:focus,.SingleDatePickerInput_clearDate__default:hover{background:#dbdbdb;border-radius:50%;}.SingleDatePickerInput_clearDate__small{padding:6px;}.SingleDatePickerInput_clearDate__hide{visibility:hidden;}.SingleDatePickerInput_clearDate_svg{fill:#82888a;height:12px;width:15px;vertical-align:middle;}.SingleDatePickerInput_clearDate_svg__small{height:9px;}.SingleDatePickerInput_calendarIcon{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;display:inline-block;vertical-align:middle;padding:10px;margin:0 5px 0 10px;}.SingleDatePickerInput_calendarIcon_svg{fill:#82888a;height:15px;width:14px;vertical-align:middle;}.SingleDatePicker{position:relative;display:inline-block;}.SingleDatePicker__block{display:block;}.SingleDatePicker_picker{z-index:1;background-color:#fff;position:absolute;}.SingleDatePicker_picker__rtl{direction:rtl;}.SingleDatePicker_picker__directionLeft{left:0;}.SingleDatePicker_picker__directionRight{right:0;}.SingleDatePicker_picker__portal{background-color:rgba(0,0,0,0.3);position:fixed;top:0;left:0;height:100%;width:100%;}.SingleDatePicker_picker__fullScreenPortal{background-color:#fff;}.SingleDatePicker_closeButton{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;position:absolute;top:0;right:0;padding:15px;z-index:2;}.SingleDatePicker_closeButton:focus,.SingleDatePicker_closeButton:hover{color:darken(#cacccd,10%);text-decoration:none;}.SingleDatePicker_closeButton_svg{height:15px;width:15px;fill:#cacccd;}.DayPickerKeyboardShortcuts_buttonReset{background:0 0;border:0;border-radius:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;cursor:pointer;font-size:14px;}.DayPickerKeyboardShortcuts_buttonReset:active{outline:0;}.DayPickerKeyboardShortcuts_show{width:33px;height:26px;position:absolute;z-index:2;}.DayPickerKeyboardShortcuts_show::before{content:'';display:block;position:absolute;}.DayPickerKeyboardShortcuts_show__bottomRight{bottom:0;right:0;}.DayPickerKeyboardShortcuts_show__bottomRight::before{border-top:26px solid transparent;border-right:33px solid #00a699;bottom:0;right:0;}.DayPickerKeyboardShortcuts_show__bottomRight:hover::before{border-right:33px solid #008489;}.DayPickerKeyboardShortcuts_show__topRight{top:0;right:0;}.DayPickerKeyboardShortcuts_show__topRight::before{border-bottom:26px solid transparent;border-right:33px solid #00a699;top:0;right:0;}.DayPickerKeyboardShortcuts_show__topRight:hover::before{border-right:33px solid #008489;}.DayPickerKeyboardShortcuts_show__topLeft{top:0;left:0;}.DayPickerKeyboardShortcuts_show__topLeft::before{border-bottom:26px solid transparent;border-left:33px solid #00a699;top:0;left:0;}.DayPickerKeyboardShortcuts_show__topLeft:hover::before{border-left:33px solid #008489;}.DayPickerKeyboardShortcuts_showSpan{color:#fff;position:absolute;}.DayPickerKeyboardShortcuts_showSpan__bottomRight{bottom:0;right:5px;}.DayPickerKeyboardShortcuts_showSpan__topRight{top:1px;right:5px;}.DayPickerKeyboardShortcuts_showSpan__topLeft{top:1px;left:5px;}.DayPickerKeyboardShortcuts_panel{overflow:auto;background:#fff;border:1px solid #dbdbdb;border-radius:2px;position:absolute;top:0;bottom:0;right:0;left:0;z-index:2;padding:22px;margin:33px;text-align:left;}.DayPickerKeyboardShortcuts_title{font-size:16px;font-weight:700;margin:0;}.DayPickerKeyboardShortcuts_list{list-style:none;padding:0;font-size:14px;}.DayPickerKeyboardShortcuts_close{position:absolute;right:22px;top:22px;z-index:2;}.DayPickerKeyboardShortcuts_close:active{outline:0;}.DayPickerKeyboardShortcuts_closeSvg{height:15px;width:15px;fill:#cacccd;}.DayPickerKeyboardShortcuts_closeSvg:focus,.DayPickerKeyboardShortcuts_closeSvg:hover{fill:#82888a;}.CalendarDay{-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;font-size:14px;text-align:center;}.CalendarDay:active{outline:0;}.CalendarDay__defaultCursor{cursor:default;}.CalendarDay__default{border:1px solid #e4e7e7;color:#484848;background:#fff;}.CalendarDay__default:hover{background:#e4e7e7;border:1px solid #e4e7e7;color:inherit;}.CalendarDay__hovered_offset{background:#f4f5f5;border:1px double #e4e7e7;color:inherit;}.CalendarDay__outside{border:0;background:#fff;color:#484848;}.CalendarDay__outside:hover{border:0;}.CalendarDay__blocked_minimum_nights{background:#fff;border:1px solid #eceeee;color:#cacccd;}.CalendarDay__blocked_minimum_nights:active,.CalendarDay__blocked_minimum_nights:hover{background:#fff;color:#cacccd;}.CalendarDay__highlighted_calendar{background:#ffe8bc;color:#484848;}.CalendarDay__highlighted_calendar:active,.CalendarDay__highlighted_calendar:hover{background:#ffce71;color:#484848;}.CalendarDay__selected_span{background:#66e2da;border:1px double #33dacd;color:#fff;}.CalendarDay__selected_span:active,.CalendarDay__selected_span:hover{background:#33dacd;border:1px double #33dacd;color:#fff;}.CalendarDay__selected,.CalendarDay__selected:active,.CalendarDay__selected:hover{background:#00a699;border:1px double #00a699;color:#fff;}.CalendarDay__hovered_span,.CalendarDay__hovered_span:hover{background:#b2f1ec;border:1px double #80e8e0;color:#007a87;}.CalendarDay__hovered_span:active{background:#80e8e0;border:1px double #80e8e0;color:#007a87;}.CalendarDay__blocked_calendar,.CalendarDay__blocked_calendar:active,.CalendarDay__blocked_calendar:hover{background:#cacccd;border:1px solid #cacccd;color:#82888a;}.CalendarDay__blocked_out_of_range,.CalendarDay__blocked_out_of_range:active,.CalendarDay__blocked_out_of_range:hover{background:#fff;border:1px solid #e4e7e7;color:#cacccd;}.CalendarDay__hovered_start_first_possible_end{background:#eceeee;border:1px double #eceeee;}.CalendarDay__hovered_start_blocked_min_nights{background:#eceeee;border:1px double #e4e7e7;}.CalendarMonth{background:#fff;text-align:center;vertical-align:top;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.CalendarMonth_table{border-collapse:collapse;border-spacing:0;}.CalendarMonth_verticalSpacing{border-collapse:separate;}.CalendarMonth_caption{color:#484848;font-size:18px;text-align:center;padding-top:22px;padding-bottom:37px;caption-side:initial;}.CalendarMonth_caption__verticalScrollable{padding-top:12px;padding-bottom:7px;}.CalendarMonthGrid{background:#fff;text-align:left;z-index:0;}.CalendarMonthGrid__animating{z-index:1;}.CalendarMonthGrid__horizontal{position:absolute;left:9px;}.CalendarMonthGrid__vertical,.CalendarMonthGrid__vertical_scrollable{margin:0 auto;}.CalendarMonthGrid_month__horizontal{display:inline-block;vertical-align:top;min-height:100%;}.CalendarMonthGrid_month__hideForAnimation{position:absolute;z-index:-1;opacity:0;pointer-events:none;}.CalendarMonthGrid_month__hidden{visibility:hidden;}.DayPickerNavigation{position:relative;z-index:2;}.DayPickerNavigation__horizontal{height:0;}.DayPickerNavigation__verticalScrollable_prevNav{z-index:1;}.DayPickerNavigation__verticalDefault{position:absolute;width:100%;height:52px;bottom:0;left:0;}.DayPickerNavigation__verticalScrollableDefault{position:relative;}.DayPickerNavigation__bottom{height:auto;}.DayPickerNavigation__bottomDefault{-webkit-box-pack:justify;-ms-flex-pack:justify;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;}.DayPickerNavigation_button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:0;padding:0;margin:0;}.DayPickerNavigation_button__default{border:1px solid #e4e7e7;background-color:#fff;color:#757575;}.DayPickerNavigation_button__default:focus,.DayPickerNavigation_button__default:hover{border:1px solid #c4c4c4;}.DayPickerNavigation_button__default:active{background:#f2f2f2;}.DayPickerNavigation_button__disabled{cursor:default;border:1px solid #f2f2f2;}.DayPickerNavigation_button__disabled:focus,.DayPickerNavigation_button__disabled:hover{border:1px solid #f2f2f2;}.DayPickerNavigation_button__disabled:active{background:0 0;}.DayPickerNavigation_button__horizontalDefault{position:absolute;top:18px;line-height:0.78;border-radius:3px;padding:6px 9px;}.DayPickerNavigation_bottomButton__horizontalDefault{position:static;margin:-10px 22px 30px;}.DayPickerNavigation_leftButton__horizontalDefault{left:22px;}.DayPickerNavigation_rightButton__horizontalDefault{right:22px;}.DayPickerNavigation_button__verticalDefault{padding:5px;background:#fff;box-shadow:0 0 5px 2px rgba(0,0,0,0.1);position:relative;display:inline-block;text-align:center;height:100%;width:50%;}.DayPickerNavigation_nextButton__verticalDefault{border-left:0;}.DayPickerNavigation_nextButton__verticalScrollableDefault,.DayPickerNavigation_prevButton__verticalScrollableDefault{width:100%;}.DayPickerNavigation_svg__horizontal{height:19px;width:19px;fill:#82888a;display:block;}.DayPickerNavigation_svg__vertical{height:42px;width:42px;fill:#484848;}.DayPickerNavigation_svg__disabled{fill:#f2f2f2;}.DayPicker{background:#fff;position:relative;text-align:left;}.DayPicker__horizontal{background:#fff;}.DayPicker__verticalScrollable{height:100%;}.DayPicker__hidden{visibility:hidden;}.DayPicker__withBorder{box-shadow:0 2px 6px rgba(0,0,0,0.05),0 0 0 1px rgba(0,0,0,0.07);border-radius:3px;}.DayPicker_portal__horizontal{box-shadow:none;position:absolute;left:50%;top:50%;}.DayPicker_portal__vertical{position:initial;}.DayPicker_focusRegion{outline:0;}.DayPicker_calendarInfo__horizontal,.DayPicker_wrapper__horizontal{display:inline-block;vertical-align:top;}.DayPicker_weekHeaders{position:relative;}.DayPicker_weekHeaders__horizontal{margin-left:9px;}.DayPicker_weekHeader{color:#757575;position:absolute;top:62px;z-index:2;text-align:left;}.DayPicker_weekHeader__vertical{left:50%;}.DayPicker_weekHeader__verticalScrollable{top:0;display:table-row;border-bottom:1px solid #dbdbdb;background:#fff;margin-left:0;left:0;width:100%;text-align:center;}.DayPicker_weekHeader_ul{list-style:none;margin:1px 0;padding-left:0;padding-right:0;font-size:14px;}.DayPicker_weekHeader_li{display:inline-block;text-align:center;}.DayPicker_transitionContainer{position:relative;overflow:hidden;border-radius:3px;}.DayPicker_transitionContainer__horizontal{-webkit-transition:height 0.2s ease-in-out;-moz-transition:height 0.2s ease-in-out;transition:height 0.2s ease-in-out;}.DayPicker_transitionContainer__vertical{width:100%;}.DayPicker_transitionContainer__verticalScrollable{padding-top:20px;height:100%;position:absolute;top:0;bottom:0;right:0;left:0;overflow-y:scroll;}.DateInput_input{display:none;}.DateInput_screenReaderMessage{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;}.DateInput_fang{position:absolute;top:55px;width:20px;height:10px;left:22px;z-index:2;}.DateInput_fangShape{fill:#fff;}.DateInput_fangStroke{stroke:#dbdbdb;fill:transparent;}.DateRangePickerInput{background-color:#fff;display:inline-block;}.DateRangePickerInput__disabled{background:#f2f2f2;}.DateRangePickerInput__withBorder{border-radius:2px;border:1px solid #dbdbdb;}.DateRangePickerInput__rtl{direction:rtl;}.DateRangePickerInput__block{display:block;}.DateRangePickerInput__showClearDates{padding-right:30px;}.DateRangePickerInput_arrow{display:inline-block;vertical-align:middle;color:#484848;}.DateRangePickerInput_arrow_svg{vertical-align:middle;fill:#484848;height:24px;width:24px;}.DateRangePickerInput_clearDates{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;padding:10px;margin:0 10px 0 5px;position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}.DateRangePickerInput_clearDates__small{padding:6px;}.DateRangePickerInput_clearDates_default:focus,.DateRangePickerInput_clearDates_default:hover{background:#dbdbdb;border-radius:50%;}.DateRangePickerInput_clearDates__hide{visibility:hidden;}.DateRangePickerInput_clearDates_svg{fill:#82888a;height:12px;width:15px;vertical-align:middle;}.DateRangePickerInput_clearDates_svg__small{height:9px;}.DateRangePickerInput_calendarIcon{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;display:inline-block;vertical-align:middle;padding:10px;margin:0 5px 0 10px;}.DateRangePickerInput_calendarIcon_svg{fill:#82888a;height:15px;width:14px;vertical-align:middle;}.DateRangePicker{position:relative;display:inline-block;}.DateRangePicker__block{display:block;}.DateRangePicker_picker{z-index:1;background-color:#fff;position:absolute;}.DateRangePicker_picker__rtl{direction:rtl;}.DateRangePicker_picker__directionLeft{left:0;}.DateRangePicker_picker__directionRight{right:0;}.DateRangePicker_picker__portal{background-color:rgba(0,0,0,0.3);position:fixed;top:0;left:0;height:100%;width:100%;}.DateRangePicker_picker__fullScreenPortal{background-color:#fff;}.DateRangePicker_closeButton{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;position:absolute;top:0;right:0;padding:15px;z-index:2;}.DateRangePicker_closeButton:focus,.DateRangePicker_closeButton:hover{color:darken(#cacccd,10%);text-decoration:none;}.DateRangePicker_closeButton_svg{height:15px;width:15px;fill:#cacccd;}"]);
|
|
9
|
-
var _default = defaultReactDatesCss;
|
|
10
|
-
exports.default = _default;
|
|
1
|
+
import { css } from 'styled-components';
|
|
2
|
+
const defaultReactDatesCss = /*#__PURE__*/css([".PresetDateRangePicker_panel{padding:0 22px 11px;}.PresetDateRangePicker_button{position:relative;height:100%;text-align:center;background:0 0;border:2px solid #00a699;color:#00a699;padding:4px 12px;margin-right:8px;font:inherit;font-weight:700;line-height:normal;overflow:visible;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;}.PresetDateRangePicker_button:active{outline:0;}.PresetDateRangePicker_button__selected{color:#fff;background:#00a699;}.SingleDatePickerInput{display:inline-block;background-color:#fff;position:absolute;top:-55px;}.SingleDatePickerInput__disabled{background-color:#f2f2f2;}.SingleDatePickerInput__block{display:block;}.SingleDatePickerInput__showClearDate{padding-right:30px;}.SingleDatePickerInput_clearDate{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;padding:10px;margin:0 10px 0 5px;position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}.SingleDatePickerInput_clearDate__default:focus,.SingleDatePickerInput_clearDate__default:hover{background:#dbdbdb;border-radius:50%;}.SingleDatePickerInput_clearDate__small{padding:6px;}.SingleDatePickerInput_clearDate__hide{visibility:hidden;}.SingleDatePickerInput_clearDate_svg{fill:#82888a;height:12px;width:15px;vertical-align:middle;}.SingleDatePickerInput_clearDate_svg__small{height:9px;}.SingleDatePickerInput_calendarIcon{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;display:inline-block;vertical-align:middle;padding:10px;margin:0 5px 0 10px;}.SingleDatePickerInput_calendarIcon_svg{fill:#82888a;height:15px;width:14px;vertical-align:middle;}.SingleDatePicker{position:relative;display:inline-block;}.SingleDatePicker__block{display:block;}.SingleDatePicker_picker{z-index:1;background-color:#fff;position:absolute;}.SingleDatePicker_picker__rtl{direction:rtl;}.SingleDatePicker_picker__directionLeft{left:0;}.SingleDatePicker_picker__directionRight{right:0;}.SingleDatePicker_picker__portal{background-color:rgba(0,0,0,0.3);position:fixed;top:0;left:0;height:100%;width:100%;}.SingleDatePicker_picker__fullScreenPortal{background-color:#fff;}.SingleDatePicker_closeButton{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;position:absolute;top:0;right:0;padding:15px;z-index:2;}.SingleDatePicker_closeButton:focus,.SingleDatePicker_closeButton:hover{color:darken(#cacccd,10%);text-decoration:none;}.SingleDatePicker_closeButton_svg{height:15px;width:15px;fill:#cacccd;}.DayPickerKeyboardShortcuts_buttonReset{background:0 0;border:0;border-radius:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;cursor:pointer;font-size:14px;}.DayPickerKeyboardShortcuts_buttonReset:active{outline:0;}.DayPickerKeyboardShortcuts_show{width:33px;height:26px;position:absolute;z-index:2;}.DayPickerKeyboardShortcuts_show::before{content:'';display:block;position:absolute;}.DayPickerKeyboardShortcuts_show__bottomRight{bottom:0;right:0;}.DayPickerKeyboardShortcuts_show__bottomRight::before{border-top:26px solid transparent;border-right:33px solid #00a699;bottom:0;right:0;}.DayPickerKeyboardShortcuts_show__bottomRight:hover::before{border-right:33px solid #008489;}.DayPickerKeyboardShortcuts_show__topRight{top:0;right:0;}.DayPickerKeyboardShortcuts_show__topRight::before{border-bottom:26px solid transparent;border-right:33px solid #00a699;top:0;right:0;}.DayPickerKeyboardShortcuts_show__topRight:hover::before{border-right:33px solid #008489;}.DayPickerKeyboardShortcuts_show__topLeft{top:0;left:0;}.DayPickerKeyboardShortcuts_show__topLeft::before{border-bottom:26px solid transparent;border-left:33px solid #00a699;top:0;left:0;}.DayPickerKeyboardShortcuts_show__topLeft:hover::before{border-left:33px solid #008489;}.DayPickerKeyboardShortcuts_showSpan{color:#fff;position:absolute;}.DayPickerKeyboardShortcuts_showSpan__bottomRight{bottom:0;right:5px;}.DayPickerKeyboardShortcuts_showSpan__topRight{top:1px;right:5px;}.DayPickerKeyboardShortcuts_showSpan__topLeft{top:1px;left:5px;}.DayPickerKeyboardShortcuts_panel{overflow:auto;background:#fff;border:1px solid #dbdbdb;border-radius:2px;position:absolute;top:0;bottom:0;right:0;left:0;z-index:2;padding:22px;margin:33px;text-align:left;}.DayPickerKeyboardShortcuts_title{font-size:16px;font-weight:700;margin:0;}.DayPickerKeyboardShortcuts_list{list-style:none;padding:0;font-size:14px;}.DayPickerKeyboardShortcuts_close{position:absolute;right:22px;top:22px;z-index:2;}.DayPickerKeyboardShortcuts_close:active{outline:0;}.DayPickerKeyboardShortcuts_closeSvg{height:15px;width:15px;fill:#cacccd;}.DayPickerKeyboardShortcuts_closeSvg:focus,.DayPickerKeyboardShortcuts_closeSvg:hover{fill:#82888a;}.CalendarDay{-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;font-size:14px;text-align:center;}.CalendarDay:active{outline:0;}.CalendarDay__defaultCursor{cursor:default;}.CalendarDay__default{border:1px solid #e4e7e7;color:#484848;background:#fff;}.CalendarDay__default:hover{background:#e4e7e7;border:1px solid #e4e7e7;color:inherit;}.CalendarDay__hovered_offset{background:#f4f5f5;border:1px double #e4e7e7;color:inherit;}.CalendarDay__outside{border:0;background:#fff;color:#484848;}.CalendarDay__outside:hover{border:0;}.CalendarDay__blocked_minimum_nights{background:#fff;border:1px solid #eceeee;color:#cacccd;}.CalendarDay__blocked_minimum_nights:active,.CalendarDay__blocked_minimum_nights:hover{background:#fff;color:#cacccd;}.CalendarDay__highlighted_calendar{background:#ffe8bc;color:#484848;}.CalendarDay__highlighted_calendar:active,.CalendarDay__highlighted_calendar:hover{background:#ffce71;color:#484848;}.CalendarDay__selected_span{background:#66e2da;border:1px double #33dacd;color:#fff;}.CalendarDay__selected_span:active,.CalendarDay__selected_span:hover{background:#33dacd;border:1px double #33dacd;color:#fff;}.CalendarDay__selected,.CalendarDay__selected:active,.CalendarDay__selected:hover{background:#00a699;border:1px double #00a699;color:#fff;}.CalendarDay__hovered_span,.CalendarDay__hovered_span:hover{background:#b2f1ec;border:1px double #80e8e0;color:#007a87;}.CalendarDay__hovered_span:active{background:#80e8e0;border:1px double #80e8e0;color:#007a87;}.CalendarDay__blocked_calendar,.CalendarDay__blocked_calendar:active,.CalendarDay__blocked_calendar:hover{background:#cacccd;border:1px solid #cacccd;color:#82888a;}.CalendarDay__blocked_out_of_range,.CalendarDay__blocked_out_of_range:active,.CalendarDay__blocked_out_of_range:hover{background:#fff;border:1px solid #e4e7e7;color:#cacccd;}.CalendarDay__hovered_start_first_possible_end{background:#eceeee;border:1px double #eceeee;}.CalendarDay__hovered_start_blocked_min_nights{background:#eceeee;border:1px double #e4e7e7;}.CalendarMonth{background:#fff;text-align:center;vertical-align:top;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.CalendarMonth_table{border-collapse:collapse;border-spacing:0;}.CalendarMonth_verticalSpacing{border-collapse:separate;}.CalendarMonth_caption{color:#484848;font-size:18px;text-align:center;padding-top:22px;padding-bottom:37px;caption-side:initial;}.CalendarMonth_caption__verticalScrollable{padding-top:12px;padding-bottom:7px;}.CalendarMonthGrid{background:#fff;text-align:left;z-index:0;}.CalendarMonthGrid__animating{z-index:1;}.CalendarMonthGrid__horizontal{position:absolute;left:9px;}.CalendarMonthGrid__vertical,.CalendarMonthGrid__vertical_scrollable{margin:0 auto;}.CalendarMonthGrid_month__horizontal{display:inline-block;vertical-align:top;min-height:100%;}.CalendarMonthGrid_month__hideForAnimation{position:absolute;z-index:-1;opacity:0;pointer-events:none;}.CalendarMonthGrid_month__hidden{visibility:hidden;}.DayPickerNavigation{position:relative;z-index:2;}.DayPickerNavigation__horizontal{height:0;}.DayPickerNavigation__verticalScrollable_prevNav{z-index:1;}.DayPickerNavigation__verticalDefault{position:absolute;width:100%;height:52px;bottom:0;left:0;}.DayPickerNavigation__verticalScrollableDefault{position:relative;}.DayPickerNavigation__bottom{height:auto;}.DayPickerNavigation__bottomDefault{-webkit-box-pack:justify;-ms-flex-pack:justify;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;}.DayPickerNavigation_button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:0;padding:0;margin:0;}.DayPickerNavigation_button__default{border:1px solid #e4e7e7;background-color:#fff;color:#757575;}.DayPickerNavigation_button__default:focus,.DayPickerNavigation_button__default:hover{border:1px solid #c4c4c4;}.DayPickerNavigation_button__default:active{background:#f2f2f2;}.DayPickerNavigation_button__disabled{cursor:default;border:1px solid #f2f2f2;}.DayPickerNavigation_button__disabled:focus,.DayPickerNavigation_button__disabled:hover{border:1px solid #f2f2f2;}.DayPickerNavigation_button__disabled:active{background:0 0;}.DayPickerNavigation_button__horizontalDefault{position:absolute;top:18px;line-height:0.78;border-radius:3px;padding:6px 9px;}.DayPickerNavigation_bottomButton__horizontalDefault{position:static;margin:-10px 22px 30px;}.DayPickerNavigation_leftButton__horizontalDefault{left:22px;}.DayPickerNavigation_rightButton__horizontalDefault{right:22px;}.DayPickerNavigation_button__verticalDefault{padding:5px;background:#fff;box-shadow:0 0 5px 2px rgba(0,0,0,0.1);position:relative;display:inline-block;text-align:center;height:100%;width:50%;}.DayPickerNavigation_nextButton__verticalDefault{border-left:0;}.DayPickerNavigation_nextButton__verticalScrollableDefault,.DayPickerNavigation_prevButton__verticalScrollableDefault{width:100%;}.DayPickerNavigation_svg__horizontal{height:19px;width:19px;fill:#82888a;display:block;}.DayPickerNavigation_svg__vertical{height:42px;width:42px;fill:#484848;}.DayPickerNavigation_svg__disabled{fill:#f2f2f2;}.DayPicker{background:#fff;position:relative;text-align:left;}.DayPicker__horizontal{background:#fff;}.DayPicker__verticalScrollable{height:100%;}.DayPicker__hidden{visibility:hidden;}.DayPicker__withBorder{box-shadow:0 2px 6px rgba(0,0,0,0.05),0 0 0 1px rgba(0,0,0,0.07);border-radius:3px;}.DayPicker_portal__horizontal{box-shadow:none;position:absolute;left:50%;top:50%;}.DayPicker_portal__vertical{position:initial;}.DayPicker_focusRegion{outline:0;}.DayPicker_calendarInfo__horizontal,.DayPicker_wrapper__horizontal{display:inline-block;vertical-align:top;}.DayPicker_weekHeaders{position:relative;}.DayPicker_weekHeaders__horizontal{margin-left:9px;}.DayPicker_weekHeader{color:#757575;position:absolute;top:62px;z-index:2;text-align:left;}.DayPicker_weekHeader__vertical{left:50%;}.DayPicker_weekHeader__verticalScrollable{top:0;display:table-row;border-bottom:1px solid #dbdbdb;background:#fff;margin-left:0;left:0;width:100%;text-align:center;}.DayPicker_weekHeader_ul{list-style:none;margin:1px 0;padding-left:0;padding-right:0;font-size:14px;}.DayPicker_weekHeader_li{display:inline-block;text-align:center;}.DayPicker_transitionContainer{position:relative;overflow:hidden;border-radius:3px;}.DayPicker_transitionContainer__horizontal{-webkit-transition:height 0.2s ease-in-out;-moz-transition:height 0.2s ease-in-out;transition:height 0.2s ease-in-out;}.DayPicker_transitionContainer__vertical{width:100%;}.DayPicker_transitionContainer__verticalScrollable{padding-top:20px;height:100%;position:absolute;top:0;bottom:0;right:0;left:0;overflow-y:scroll;}.DateInput_input{display:none;}.DateInput_screenReaderMessage{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;}.DateInput_fang{position:absolute;top:55px;width:20px;height:10px;left:22px;z-index:2;}.DateInput_fangShape{fill:#fff;}.DateInput_fangStroke{stroke:#dbdbdb;fill:transparent;}.DateRangePickerInput{background-color:#fff;display:inline-block;}.DateRangePickerInput__disabled{background:#f2f2f2;}.DateRangePickerInput__withBorder{border-radius:2px;border:1px solid #dbdbdb;}.DateRangePickerInput__rtl{direction:rtl;}.DateRangePickerInput__block{display:block;}.DateRangePickerInput__showClearDates{padding-right:30px;}.DateRangePickerInput_arrow{display:inline-block;vertical-align:middle;color:#484848;}.DateRangePickerInput_arrow_svg{vertical-align:middle;fill:#484848;height:24px;width:24px;}.DateRangePickerInput_clearDates{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;padding:10px;margin:0 10px 0 5px;position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}.DateRangePickerInput_clearDates__small{padding:6px;}.DateRangePickerInput_clearDates_default:focus,.DateRangePickerInput_clearDates_default:hover{background:#dbdbdb;border-radius:50%;}.DateRangePickerInput_clearDates__hide{visibility:hidden;}.DateRangePickerInput_clearDates_svg{fill:#82888a;height:12px;width:15px;vertical-align:middle;}.DateRangePickerInput_clearDates_svg__small{height:9px;}.DateRangePickerInput_calendarIcon{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;display:inline-block;vertical-align:middle;padding:10px;margin:0 5px 0 10px;}.DateRangePickerInput_calendarIcon_svg{fill:#82888a;height:15px;width:14px;vertical-align:middle;}.DateRangePicker{position:relative;display:inline-block;}.DateRangePicker__block{display:block;}.DateRangePicker_picker{z-index:1;background-color:#fff;position:absolute;}.DateRangePicker_picker__rtl{direction:rtl;}.DateRangePicker_picker__directionLeft{left:0;}.DateRangePicker_picker__directionRight{right:0;}.DateRangePicker_picker__portal{background-color:rgba(0,0,0,0.3);position:fixed;top:0;left:0;height:100%;width:100%;}.DateRangePicker_picker__fullScreenPortal{background-color:#fff;}.DateRangePicker_closeButton{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;position:absolute;top:0;right:0;padding:15px;z-index:2;}.DateRangePicker_closeButton:focus,.DateRangePicker_closeButton:hover{color:darken(#cacccd,10%);text-decoration:none;}.DateRangePicker_closeButton_svg{height:15px;width:15px;fill:#cacccd;}"]);
|
|
3
|
+
export default defaultReactDatesCss;
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
-
var _componentsBase = require("@telus-uds/components-base");
|
|
11
|
-
var _utils = require("../utils");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
15
|
-
const StyledDisclaimer = /*#__PURE__*/_styledComponents.default.p.withConfig({
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { applyTextStyles, selectSystemProps, useThemeTokens, getTokensPropType } from '@telus-uds/components-base';
|
|
5
|
+
import { htmlAttrs } from '../utils';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
8
|
+
const StyledDisclaimer = /*#__PURE__*/styled.p.withConfig({
|
|
16
9
|
displayName: "Disclaimer__StyledDisclaimer",
|
|
17
10
|
componentId: "components-web__sc-1l4xf7u-0"
|
|
18
11
|
})(_ref => {
|
|
@@ -24,7 +17,7 @@ const StyledDisclaimer = /*#__PURE__*/_styledComponents.default.p.withConfig({
|
|
|
24
17
|
} = _ref;
|
|
25
18
|
const {
|
|
26
19
|
fontFamily
|
|
27
|
-
} =
|
|
20
|
+
} = applyTextStyles({
|
|
28
21
|
fontName,
|
|
29
22
|
fontWeight
|
|
30
23
|
});
|
|
@@ -39,13 +32,13 @@ const StyledDisclaimer = /*#__PURE__*/_styledComponents.default.p.withConfig({
|
|
|
39
32
|
* Use Disclaimer to display singular legal statement and must be displayed
|
|
40
33
|
* immediately adjacent to the related, originating content.
|
|
41
34
|
*/
|
|
42
|
-
const Disclaimer = /*#__PURE__*/
|
|
35
|
+
const Disclaimer = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
43
36
|
let {
|
|
44
37
|
children,
|
|
45
38
|
...rest
|
|
46
39
|
} = _ref2;
|
|
47
|
-
const themeTokens =
|
|
48
|
-
return /*#__PURE__*/(
|
|
40
|
+
const themeTokens = useThemeTokens('Disclaimer');
|
|
41
|
+
return /*#__PURE__*/_jsx(StyledDisclaimer, {
|
|
49
42
|
ref: ref,
|
|
50
43
|
...selectProps(rest),
|
|
51
44
|
...themeTokens,
|
|
@@ -55,8 +48,7 @@ const Disclaimer = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
|
|
|
55
48
|
Disclaimer.displayName = 'Disclaimer';
|
|
56
49
|
Disclaimer.propTypes = {
|
|
57
50
|
...selectedSystemPropTypes,
|
|
58
|
-
tokens:
|
|
59
|
-
children:
|
|
51
|
+
tokens: getTokensPropType('Disclaimer'),
|
|
52
|
+
children: PropTypes.node.isRequired
|
|
60
53
|
};
|
|
61
|
-
|
|
62
|
-
exports.default = _default;
|
|
54
|
+
export default Disclaimer;
|