@telus-uds/components-web 2.44.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/.eslintrc.cjs +26 -0
  2. package/CHANGELOG.md +22 -2
  3. package/babel.config.cjs +4 -0
  4. package/jest.config.cjs +29 -0
  5. package/lib/Badge/Badge.js +21 -29
  6. package/lib/Badge/index.js +2 -10
  7. package/lib/BlockQuote/BlockQuote.js +31 -39
  8. package/lib/BlockQuote/index.js +2 -10
  9. package/lib/Breadcrumbs/Breadcrumbs.js +39 -49
  10. package/lib/Breadcrumbs/Item/Item.js +26 -34
  11. package/lib/Breadcrumbs/index.js +1 -13
  12. package/lib/Callout/Callout.js +19 -27
  13. package/lib/Callout/index.js +2 -10
  14. package/lib/Card/Card.js +44 -54
  15. package/lib/Card/CardContent.js +17 -25
  16. package/lib/Card/CardFooter.js +16 -24
  17. package/lib/Card/index.js +2 -10
  18. package/lib/Countdown/Countdown.js +34 -42
  19. package/lib/Countdown/Segment.js +26 -34
  20. package/lib/Countdown/constants.js +4 -14
  21. package/lib/Countdown/dictionary.js +2 -9
  22. package/lib/Countdown/index.js +2 -10
  23. package/lib/Countdown/types.js +18 -28
  24. package/lib/Countdown/useCountdown.js +4 -11
  25. package/lib/DatePicker/CalendarContainer.js +6 -12
  26. package/lib/DatePicker/DatePicker.js +94 -103
  27. package/lib/DatePicker/dictionary.js +1 -8
  28. package/lib/DatePicker/index.js +2 -10
  29. package/lib/DatePicker/reactDatesCss.js +3 -10
  30. package/lib/Disclaimer/Disclaimer.js +15 -23
  31. package/lib/Disclaimer/index.js +1 -13
  32. package/lib/ExpandCollapseMini/ExpandCollapseMini.js +16 -24
  33. package/lib/ExpandCollapseMini/ExpandCollapseMiniControl.js +17 -26
  34. package/lib/ExpandCollapseMini/index.js +2 -10
  35. package/lib/Footnote/Footnote.js +85 -95
  36. package/lib/Footnote/FootnoteLink.js +25 -33
  37. package/lib/Footnote/dictionary.js +2 -9
  38. package/lib/Footnote/index.js +4 -12
  39. package/lib/IconButton/IconButton.js +12 -20
  40. package/lib/IconButton/index.js +2 -10
  41. package/lib/Image/Image.js +17 -25
  42. package/lib/Image/index.js +6 -18
  43. package/lib/Image/server.js +4 -12
  44. package/lib/List/List.js +2 -9
  45. package/lib/List/ListItem.js +10 -18
  46. package/lib/List/index.js +4 -12
  47. package/lib/NavigationBar/NavigationBar.js +51 -59
  48. package/lib/NavigationBar/NavigationItem.js +19 -27
  49. package/lib/NavigationBar/NavigationSubMenu.js +34 -40
  50. package/lib/NavigationBar/collapseItems.js +1 -11
  51. package/lib/NavigationBar/index.js +4 -12
  52. package/lib/NavigationBar/resolveItemSelection.js +1 -8
  53. package/lib/OptimizeImage/OptimizeImage.js +26 -34
  54. package/lib/OptimizeImage/index.js +2 -10
  55. package/lib/OptimizeImage/utils/getFallbackUrl.js +3 -10
  56. package/lib/OptimizeImage/utils/getImageUrls.js +9 -16
  57. package/lib/OptimizeImage/utils/getOptimizedUrl.js +3 -10
  58. package/lib/OptimizeImage/utils/hasWebpSupport.js +1 -7
  59. package/lib/OptimizeImage/utils/index.js +5 -34
  60. package/lib/OptimizeImage/utils/isSvgUrl.js +1 -7
  61. package/lib/OrderedList/Item.js +28 -36
  62. package/lib/OrderedList/ItemBase.js +8 -16
  63. package/lib/OrderedList/OrderedList.js +22 -30
  64. package/lib/OrderedList/OrderedListBase.js +12 -20
  65. package/lib/OrderedList/constants.js +1 -8
  66. package/lib/OrderedList/index.js +4 -12
  67. package/lib/Paragraph/Paragraph.js +22 -30
  68. package/lib/Paragraph/index.js +2 -10
  69. package/lib/PreviewCard/AuthorDate.js +17 -21
  70. package/lib/PreviewCard/PreviewCard.js +40 -49
  71. package/lib/PreviewCard/index.js +2 -10
  72. package/lib/PriceLockup/PriceLockup.js +56 -64
  73. package/lib/PriceLockup/index.js +2 -10
  74. package/lib/PriceLockup/tokens.js +2 -9
  75. package/lib/Progress/ProgressBar.js +17 -24
  76. package/lib/Progress/index.js +4 -12
  77. package/lib/QuantitySelector/QuantitySelector.js +55 -63
  78. package/lib/QuantitySelector/SideButton.js +15 -23
  79. package/lib/QuantitySelector/dictionary.js +2 -9
  80. package/lib/QuantitySelector/index.js +2 -10
  81. package/lib/QuantitySelector/styles.js +4 -13
  82. package/lib/ResponsiveImage/ResponsiveImage.js +29 -37
  83. package/lib/ResponsiveImage/index.js +2 -10
  84. package/lib/Ribbon/Ribbon.js +22 -30
  85. package/lib/Ribbon/index.js +2 -10
  86. package/lib/SkeletonProvider/SkeletonImage.js +14 -22
  87. package/lib/SkeletonProvider/SkeletonProvider.js +17 -25
  88. package/lib/SkeletonProvider/SkeletonTypography.js +14 -22
  89. package/lib/SkeletonProvider/index.js +2 -10
  90. package/lib/Span/Span.js +23 -31
  91. package/lib/Span/index.js +2 -10
  92. package/lib/Spinner/Spinner.js +43 -51
  93. package/lib/Spinner/SpinnerContent.js +21 -29
  94. package/lib/Spinner/constants.js +4 -14
  95. package/lib/Spinner/index.js +2 -10
  96. package/lib/StoryCard/StoryCard.js +40 -49
  97. package/lib/StoryCard/index.js +2 -10
  98. package/lib/Table/Body.js +7 -15
  99. package/lib/Table/Cell.js +28 -38
  100. package/lib/Table/Header.js +11 -19
  101. package/lib/Table/Row.js +8 -16
  102. package/lib/Table/SubHeading.js +10 -18
  103. package/lib/Table/Table.js +26 -35
  104. package/lib/Table/index.js +12 -20
  105. package/lib/TermsAndConditions/ExpandCollapse.js +22 -30
  106. package/lib/TermsAndConditions/TermsAndConditions.js +52 -60
  107. package/lib/TermsAndConditions/dictionary.js +2 -9
  108. package/lib/TermsAndConditions/index.js +1 -13
  109. package/lib/Testimonial/Testimonial.js +37 -45
  110. package/lib/Testimonial/index.js +2 -10
  111. package/lib/Toast/Toast.js +32 -42
  112. package/lib/Toast/index.js +2 -10
  113. package/lib/Video/ControlBar/ControlBar.js +73 -81
  114. package/lib/Video/ControlBar/Controls/VideoButton/VideoButton.js +16 -24
  115. package/lib/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +27 -35
  116. package/lib/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +27 -36
  117. package/lib/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +30 -38
  118. package/lib/Video/MiddleControlButton/MiddleControlButton.js +16 -24
  119. package/lib/Video/Video.js +74 -83
  120. package/lib/Video/index.js +2 -10
  121. package/lib/Video/videoText.js +1 -8
  122. package/lib/VideoPicker/VideoPicker.js +43 -53
  123. package/lib/VideoPicker/VideoPickerPlayer.js +17 -25
  124. package/lib/VideoPicker/VideoPickerThumbnail.js +38 -46
  125. package/lib/VideoPicker/VideoSlider.js +17 -26
  126. package/lib/VideoPicker/index.js +2 -10
  127. package/lib/VideoPicker/videoPropType.js +9 -18
  128. package/lib/WaffleGrid/WaffleGrid.js +33 -43
  129. package/lib/WaffleGrid/index.js +2 -10
  130. package/lib/WebVideo/WebVideo.js +42 -52
  131. package/lib/WebVideo/index.js +2 -10
  132. package/lib/WebVideo/utils/index.js +3 -11
  133. package/lib/baseExports.js +18 -431
  134. package/lib/index.js +38 -323
  135. package/lib/server.js +4 -12
  136. package/lib/shared/ConditionalWrapper/ConditionalWrapper.js +9 -17
  137. package/lib/shared/ConditionalWrapper/index.js +2 -10
  138. package/lib/shared/FullBleedContent/FullBleedContent.js +21 -29
  139. package/lib/shared/FullBleedContent/getFullBleedBorderRadius.js +1 -8
  140. package/lib/shared/FullBleedContent/index.js +4 -24
  141. package/lib/shared/FullBleedContent/useFullBleedContentProps.js +4 -11
  142. package/lib/shared/VideoSplash/SplashButton/SplashButton.js +19 -27
  143. package/lib/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +27 -35
  144. package/lib/shared/VideoSplash/VideoSplash.js +24 -32
  145. package/lib/shared/VideoSplash/helpers.js +5 -14
  146. package/lib/utils/index.js +10 -75
  147. package/lib/utils/isElementFocusable.js +1 -8
  148. package/lib/utils/logger.js +6 -15
  149. package/lib/utils/media.js +5 -11
  150. package/lib/utils/renderStructuredContent.js +8 -15
  151. package/lib/utils/ssr.js +5 -12
  152. package/lib/utils/theming/get-theme-from-server.js +2 -10
  153. package/lib/utils/theming/with-client-theme.js +9 -17
  154. package/lib/utils/theming/with-server-theme.js +11 -19
  155. package/lib/utils/transforms.js +3 -11
  156. package/lib/utils/useOverlaidPosition.js +15 -23
  157. package/lib/utils/useTypographyTheme.js +6 -13
  158. package/package.json +18 -20
  159. package/src/Card/Card.jsx +2 -2
  160. package/src/DatePicker/DatePicker.jsx +1 -2
  161. package/src/PreviewCard/AuthorDate.jsx +5 -3
  162. package/src/utils/logger.js +2 -2
  163. package/lib-module/Badge/Badge.js +0 -121
  164. package/lib-module/Badge/index.js +0 -2
  165. package/lib-module/BlockQuote/BlockQuote.js +0 -204
  166. package/lib-module/BlockQuote/index.js +0 -2
  167. package/lib-module/Breadcrumbs/Breadcrumbs.js +0 -250
  168. package/lib-module/Breadcrumbs/Item/Item.js +0 -175
  169. package/lib-module/Breadcrumbs/index.js +0 -1
  170. package/lib-module/Callout/Callout.js +0 -135
  171. package/lib-module/Callout/index.js +0 -2
  172. package/lib-module/Card/Card.js +0 -251
  173. package/lib-module/Card/CardContent.js +0 -90
  174. package/lib-module/Card/CardFooter.js +0 -78
  175. package/lib-module/Card/index.js +0 -2
  176. package/lib-module/Countdown/Countdown.js +0 -169
  177. package/lib-module/Countdown/Segment.js +0 -96
  178. package/lib-module/Countdown/constants.js +0 -4
  179. package/lib-module/Countdown/dictionary.js +0 -22
  180. package/lib-module/Countdown/index.js +0 -2
  181. package/lib-module/Countdown/types.js +0 -24
  182. package/lib-module/Countdown/useCountdown.js +0 -26
  183. package/lib-module/DatePicker/CalendarContainer.js +0 -208
  184. package/lib-module/DatePicker/DatePicker.js +0 -519
  185. package/lib-module/DatePicker/dictionary.js +0 -119
  186. package/lib-module/DatePicker/index.js +0 -2
  187. package/lib-module/DatePicker/reactDatesCss.js +0 -3
  188. package/lib-module/Disclaimer/Disclaimer.js +0 -54
  189. package/lib-module/Disclaimer/index.js +0 -1
  190. package/lib-module/ExpandCollapseMini/ExpandCollapseMini.js +0 -73
  191. package/lib-module/ExpandCollapseMini/ExpandCollapseMiniControl.js +0 -117
  192. package/lib-module/ExpandCollapseMini/index.js +0 -2
  193. package/lib-module/Footnote/Footnote.js +0 -632
  194. package/lib-module/Footnote/FootnoteLink.js +0 -118
  195. package/lib-module/Footnote/dictionary.js +0 -12
  196. package/lib-module/Footnote/index.js +0 -4
  197. package/lib-module/IconButton/IconButton.js +0 -55
  198. package/lib-module/IconButton/index.js +0 -2
  199. package/lib-module/Image/Image.js +0 -83
  200. package/lib-module/Image/index.js +0 -9
  201. package/lib-module/Image/server.js +0 -4
  202. package/lib-module/List/List.js +0 -2
  203. package/lib-module/List/ListItem.js +0 -28
  204. package/lib-module/List/index.js +0 -4
  205. package/lib-module/NavigationBar/NavigationBar.js +0 -224
  206. package/lib-module/NavigationBar/NavigationItem.js +0 -87
  207. package/lib-module/NavigationBar/NavigationSubMenu.js +0 -162
  208. package/lib-module/NavigationBar/collapseItems.js +0 -41
  209. package/lib-module/NavigationBar/index.js +0 -4
  210. package/lib-module/NavigationBar/resolveItemSelection.js +0 -16
  211. package/lib-module/OptimizeImage/OptimizeImage.js +0 -92
  212. package/lib-module/OptimizeImage/index.js +0 -2
  213. package/lib-module/OptimizeImage/utils/getFallbackUrl.js +0 -7
  214. package/lib-module/OptimizeImage/utils/getImageUrls.js +0 -12
  215. package/lib-module/OptimizeImage/utils/getOptimizedUrl.js +0 -17
  216. package/lib-module/OptimizeImage/utils/hasWebpSupport.js +0 -28
  217. package/lib-module/OptimizeImage/utils/index.js +0 -5
  218. package/lib-module/OptimizeImage/utils/isSvgUrl.js +0 -3
  219. package/lib-module/OrderedList/Item.js +0 -145
  220. package/lib-module/OrderedList/ItemBase.js +0 -27
  221. package/lib-module/OrderedList/OrderedList.js +0 -86
  222. package/lib-module/OrderedList/OrderedListBase.js +0 -45
  223. package/lib-module/OrderedList/constants.js +0 -2
  224. package/lib-module/OrderedList/index.js +0 -4
  225. package/lib-module/Paragraph/Paragraph.js +0 -90
  226. package/lib-module/Paragraph/index.js +0 -2
  227. package/lib-module/PreviewCard/AuthorDate.js +0 -57
  228. package/lib-module/PreviewCard/PreviewCard.js +0 -209
  229. package/lib-module/PreviewCard/index.js +0 -2
  230. package/lib-module/PriceLockup/PriceLockup.js +0 -335
  231. package/lib-module/PriceLockup/index.js +0 -2
  232. package/lib-module/PriceLockup/tokens.js +0 -55
  233. package/lib-module/Progress/ProgressBar.js +0 -83
  234. package/lib-module/Progress/index.js +0 -4
  235. package/lib-module/QuantitySelector/QuantitySelector.js +0 -261
  236. package/lib-module/QuantitySelector/SideButton.js +0 -70
  237. package/lib-module/QuantitySelector/dictionary.js +0 -26
  238. package/lib-module/QuantitySelector/index.js +0 -2
  239. package/lib-module/QuantitySelector/styles.js +0 -9
  240. package/lib-module/ResponsiveImage/ResponsiveImage.js +0 -95
  241. package/lib-module/ResponsiveImage/index.js +0 -2
  242. package/lib-module/Ribbon/Ribbon.js +0 -216
  243. package/lib-module/Ribbon/index.js +0 -2
  244. package/lib-module/SkeletonProvider/SkeletonImage.js +0 -39
  245. package/lib-module/SkeletonProvider/SkeletonProvider.js +0 -57
  246. package/lib-module/SkeletonProvider/SkeletonTypography.js +0 -38
  247. package/lib-module/SkeletonProvider/index.js +0 -2
  248. package/lib-module/Span/Span.js +0 -72
  249. package/lib-module/Span/index.js +0 -2
  250. package/lib-module/Spinner/Spinner.js +0 -215
  251. package/lib-module/Spinner/SpinnerContent.js +0 -94
  252. package/lib-module/Spinner/constants.js +0 -4
  253. package/lib-module/Spinner/index.js +0 -2
  254. package/lib-module/StoryCard/StoryCard.js +0 -212
  255. package/lib-module/StoryCard/index.js +0 -2
  256. package/lib-module/Table/Body.js +0 -17
  257. package/lib-module/Table/Cell.js +0 -176
  258. package/lib-module/Table/Header.js +0 -25
  259. package/lib-module/Table/Row.js +0 -19
  260. package/lib-module/Table/SubHeading.js +0 -23
  261. package/lib-module/Table/Table.js +0 -114
  262. package/lib-module/Table/index.js +0 -12
  263. package/lib-module/TermsAndConditions/ExpandCollapse.js +0 -153
  264. package/lib-module/TermsAndConditions/TermsAndConditions.js +0 -277
  265. package/lib-module/TermsAndConditions/dictionary.js +0 -16
  266. package/lib-module/TermsAndConditions/index.js +0 -1
  267. package/lib-module/Testimonial/Testimonial.js +0 -234
  268. package/lib-module/Testimonial/index.js +0 -2
  269. package/lib-module/Toast/Toast.js +0 -158
  270. package/lib-module/Toast/index.js +0 -2
  271. package/lib-module/Video/ControlBar/ControlBar.js +0 -288
  272. package/lib-module/Video/ControlBar/Controls/VideoButton/VideoButton.js +0 -70
  273. package/lib-module/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +0 -163
  274. package/lib-module/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +0 -203
  275. package/lib-module/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +0 -191
  276. package/lib-module/Video/MiddleControlButton/MiddleControlButton.js +0 -71
  277. package/lib-module/Video/Video.js +0 -959
  278. package/lib-module/Video/index.js +0 -2
  279. package/lib-module/Video/videoText.js +0 -55
  280. package/lib-module/VideoPicker/VideoPicker.js +0 -190
  281. package/lib-module/VideoPicker/VideoPickerPlayer.js +0 -48
  282. package/lib-module/VideoPicker/VideoPickerThumbnail.js +0 -218
  283. package/lib-module/VideoPicker/VideoSlider.js +0 -82
  284. package/lib-module/VideoPicker/index.js +0 -2
  285. package/lib-module/VideoPicker/videoPropType.js +0 -10
  286. package/lib-module/WaffleGrid/WaffleGrid.js +0 -157
  287. package/lib-module/WaffleGrid/index.js +0 -2
  288. package/lib-module/WebVideo/WebVideo.js +0 -191
  289. package/lib-module/WebVideo/index.js +0 -2
  290. package/lib-module/WebVideo/utils/index.js +0 -50
  291. package/lib-module/baseExports.js +0 -19
  292. package/lib-module/index.js +0 -40
  293. package/lib-module/server.js +0 -5
  294. package/lib-module/shared/ConditionalWrapper/ConditionalWrapper.js +0 -22
  295. package/lib-module/shared/ConditionalWrapper/index.js +0 -2
  296. package/lib-module/shared/FullBleedContent/FullBleedContent.js +0 -101
  297. package/lib-module/shared/FullBleedContent/getFullBleedBorderRadius.js +0 -55
  298. package/lib-module/shared/FullBleedContent/index.js +0 -4
  299. package/lib-module/shared/FullBleedContent/useFullBleedContentProps.js +0 -55
  300. package/lib-module/shared/VideoSplash/SplashButton/SplashButton.js +0 -84
  301. package/lib-module/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +0 -223
  302. package/lib-module/shared/VideoSplash/VideoSplash.js +0 -65
  303. package/lib-module/shared/VideoSplash/helpers.js +0 -23
  304. package/lib-module/utils/index.js +0 -10
  305. package/lib-module/utils/isElementFocusable.js +0 -8
  306. package/lib-module/utils/logger.js +0 -18
  307. package/lib-module/utils/media.js +0 -39
  308. package/lib-module/utils/renderStructuredContent.js +0 -66
  309. package/lib-module/utils/ssr.js +0 -37
  310. package/lib-module/utils/theming/get-theme-from-server.js +0 -16
  311. package/lib-module/utils/theming/with-client-theme.js +0 -24
  312. package/lib-module/utils/theming/with-server-theme.js +0 -26
  313. package/lib-module/utils/transforms.js +0 -4
  314. package/lib-module/utils/useOverlaidPosition.js +0 -216
  315. package/lib-module/utils/useTypographyTheme.js +0 -24
@@ -1,519 +0,0 @@
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 from 'react-dates/lib/components/SingleDatePicker';
7
- import DayPickerSingleDateController from 'react-dates/lib/components/DayPickerSingleDateController';
8
- import { IconButton, TextInput, Portal, selectSystemProps, useCopy, useViewport, useThemeTokens, applyTextStyles, getTokensPropType, useSafeLayoutEffect } from '@telus-uds/components-base';
9
- import moment from 'moment';
10
- import { isUndefined, throttle } from 'lodash';
11
- import CalendarContainer from './CalendarContainer';
12
- import dictionary from './dictionary';
13
- import { htmlAttrs } from '../utils';
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- import { jsxs as _jsxs } from "react/jsx-runtime";
16
- import { Fragment as _Fragment } from "react/jsx-runtime";
17
- const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
18
- const dateFormat = 'DD / MM / YYYY';
19
- const dateFormatWithoutSpaces = 'DD/MM/YYYY';
20
- const getResponsiveDaySize = function () {
21
- let inline = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
22
- let viewport = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'md';
23
- if (viewport === 'xs') {
24
- return inline ? undefined : 36;
25
- }
26
- return inline ? 60 : 44;
27
- };
28
- const getResponsiveCircleSize = function () {
29
- let inline = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
30
- let viewport = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'md';
31
- if (viewport === 'xs') {
32
- return 26;
33
- }
34
- return inline ? 44 : 26;
35
- };
36
- const MonthCenterContainer = /*#__PURE__*/styled.div.withConfig({
37
- displayName: "DatePicker__MonthCenterContainer",
38
- componentId: "components-web__sc-mz8fi3-0"
39
- })({
40
- display: 'flex',
41
- justifyContent: 'center'
42
- });
43
- const DateInputWrapper = /*#__PURE__*/styled.div.withConfig({
44
- displayName: "DatePicker__DateInputWrapper",
45
- componentId: "components-web__sc-mz8fi3-1"
46
- })({
47
- display: 'flex',
48
- flexDirection: 'column'
49
- });
50
- const PortalPositionedContainer = /*#__PURE__*/styled.div.withConfig({
51
- displayName: "DatePicker__PortalPositionedContainer",
52
- componentId: "components-web__sc-mz8fi3-2"
53
- })({
54
- position: 'absolute',
55
- left: _ref => {
56
- let {
57
- left
58
- } = _ref;
59
- return `${left}px`;
60
- },
61
- top: _ref2 => {
62
- let {
63
- top
64
- } = _ref2;
65
- return `${top}px`;
66
- }
67
- });
68
- const validDatePattern = /^([0-2][0-9]|3[0-1])(\/)(0[1-9]|1[0-2])\2(\d{4})$/;
69
- const getInitialVisibleMonth = (initialVisibleMonth, inputDate) => {
70
- if (initialVisibleMonth === '' || inputDate instanceof moment) {
71
- return null;
72
- }
73
- return () => moment(initialVisibleMonth);
74
- };
75
-
76
- /**
77
- * Use DatePicker to select a date on a calendar.
78
- *
79
- * ## Usage Criteria
80
- *
81
- * - Use DatePicker to select a date on a calendar
82
- * - Available in 2 formats: Overlay and Inline
83
- *
84
- * ### Overlay DatePicker
85
- * - Use Overlay to display in a modal container
86
- * - Use Overlay whenever possible as it is the most accessible solution; the input form field is type-accessible and optimized for mobile customers
87
- * - Includes an input form field to allow manual key-in of dates
88
- * - Opens the modal when the input form field receives focus
89
- * - Width expands 100% until max-width of 340px
90
- *
91
- * ### Inline DatePicker
92
- * - Use Inline to display the DatePicker in a larger vieweable area; allows the customer to quickly and easily date availability
93
- * - Does not include an input form field
94
- * - Optimized for keyboard interaction and tablet touch
95
- * - Recommended for viewports greater than or equal to 576px
96
- */
97
- const DatePicker = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
98
- var _dictionary$copy;
99
- let {
100
- copy = 'en',
101
- id,
102
- date,
103
- feedback,
104
- inline = false,
105
- isDayDisabled,
106
- label,
107
- onDateChange = () => {},
108
- hint,
109
- hintPosition = 'inline',
110
- tooltip,
111
- tokens,
112
- variant = {},
113
- validation,
114
- disabled = false,
115
- prevTestID = '',
116
- nextTestID = '',
117
- placeholder = 'DD / MM / YYYY',
118
- initialVisibleMonth = '',
119
- ...rest
120
- } = _ref3;
121
- const [inputDate, setInputDate] = React.useState(date instanceof moment ? date : undefined);
122
- const [inputText, setInputText] = React.useState(date instanceof moment ? date.format(dateFormat) : '');
123
- const textInputRef = React.useRef();
124
- const prevButtonRef = React.useRef();
125
- const [datePickerPosition, setDatePickerPosition] = React.useState({
126
- left: 0,
127
- top: 0
128
- });
129
- const datePickerRef = React.useRef(null);
130
- useSafeLayoutEffect(() => {
131
- const updateDatePickerPosition = () => {
132
- if (inline || !(textInputRef !== null && textInputRef !== void 0 && textInputRef.current)) return;
133
- const {
134
- left,
135
- top
136
- } = textInputRef.current.getBoundingClientRect();
137
- const inputTop = top + window.scrollY;
138
- const inputLeft = left + window.scrollX;
139
- setDatePickerPosition({
140
- top: inputTop + textInputRef.current.offsetHeight,
141
- left: inputLeft
142
- });
143
- };
144
- const throttledUpdate = throttle(updateDatePickerPosition, 100, {
145
- leading: false
146
- });
147
-
148
- // Initial call to set the position
149
- updateDatePickerPosition();
150
-
151
- // Register event listeners
152
- window.addEventListener('resize', throttledUpdate);
153
- window.addEventListener('scroll', updateDatePickerPosition, {
154
- capture: true
155
- });
156
- return () => {
157
- window.removeEventListener('resize', throttledUpdate);
158
- window.removeEventListener('scroll', updateDatePickerPosition, {
159
- capture: true
160
- });
161
- };
162
- }, []);
163
- const [isFocused, setIsFocused] = React.useState(false);
164
- const [isClickedInside, setIsClickedInside] = React.useState(false);
165
- const getCopy = useCopy({
166
- dictionary,
167
- copy
168
- });
169
- React.useEffect(() => {
170
- /**
171
- * `date` could be passed as `null` to reset the value so explicitly
172
- * checking for not being `undefined`
173
- */
174
- if (!isUndefined(date) && !moment(date).isSame(inputDate)) {
175
- setInputDate(date);
176
- setInputText(date instanceof moment ? date.format(dateFormat) : '');
177
- }
178
- }, [date, inputDate]);
179
- React.useEffect(() => {
180
- let timeoutId;
181
- if (prevButtonRef.current && isFocused) {
182
- timeoutId = setTimeout(() => prevButtonRef.current.focus(), 100);
183
- }
184
- return () => clearTimeout(timeoutId);
185
- }, [isFocused]);
186
- React.useEffect(() => {
187
- if (inputText !== '' && inputDate !== undefined) {
188
- var _textInputRef$current;
189
- textInputRef === null || textInputRef === void 0 ? void 0 : (_textInputRef$current = textInputRef.current) === null || _textInputRef$current === void 0 ? void 0 : _textInputRef$current.focus();
190
- }
191
- }, [inputDate, inputText]);
192
- const onFocusChange = _ref4 => {
193
- let {
194
- focused
195
- } = _ref4;
196
- if (!isClickedInside) {
197
- setIsFocused(focused);
198
- }
199
- setIsClickedInside(false);
200
- };
201
- const handleFocus = event => {
202
- if (event.target.tagName === 'INPUT' && !disabled && inputDate === undefined && inputText === '') {
203
- setIsFocused(true);
204
- }
205
- };
206
- const handleMouseDown = event => {
207
- if (!disabled) {
208
- if (event.target.tagName === 'INPUT') {
209
- setIsClickedInside(true);
210
- setIsFocused(true);
211
- } else if (event.target.tagName === 'path') {
212
- // needed to handle the case where the user clicks on the tooltip icon
213
- setIsClickedInside(true);
214
- event.stopPropagation();
215
- } else {
216
- event.stopPropagation();
217
- }
218
- }
219
- };
220
- const onChange = value => {
221
- setInputDate(value);
222
- setInputText(value.format(dateFormat));
223
- setIsFocused(false);
224
- if (onDateChange) onDateChange(value);
225
- };
226
- const onChangeInput = value => {
227
- if (value === '' || moment(value.replace(/\s/g, ''), dateFormatWithoutSpaces, true).isValid()) {
228
- if (value === '') {
229
- setInputDate(undefined); // Set inputDate to undefined if input is empty
230
- onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange(undefined);
231
- } else {
232
- setInputDate(moment(value, dateFormat));
233
- onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange(moment(value, dateFormat));
234
- }
235
- setInputText(value === '' ? '' : moment(value, dateFormatWithoutSpaces).format(dateFormat));
236
- } else {
237
- setInputText(value);
238
- }
239
- };
240
- const handleOnKeyPress = event => {
241
- if (event.key === 'Backspace' && inputText === '') {
242
- setInputDate(undefined);
243
- onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange(undefined);
244
- }
245
- };
246
- const handleValidation = inputValidation => {
247
- if (validDatePattern.test(inputText.replace(/\s+/g, '')) === false && inputText !== '') {
248
- return 'error';
249
- }
250
- if (inputValidation === 'error' || inputValidation === 'success') {
251
- return inputValidation;
252
- }
253
- return inputValidation;
254
- };
255
- const viewport = useViewport();
256
- const daySize = getResponsiveDaySize(inline, viewport);
257
- const circleSize = getResponsiveCircleSize(inline, viewport);
258
- const HiddenInputFieldContainer = /*#__PURE__*/styled.div.withConfig({
259
- displayName: "DatePicker__HiddenInputFieldContainer",
260
- componentId: "components-web__sc-mz8fi3-3"
261
- })(["height:", ";width:", ";overflow:hidden;"], props => props.height, props => props.width);
262
- const {
263
- hiddenInputFieldContainerHeight,
264
- hiddenInputFieldContainerWidth,
265
- previousIcon,
266
- nextIcon,
267
- ...remainingTokens
268
- } = useThemeTokens('DatePicker', tokens, {
269
- ...variant,
270
- inline
271
- }, {
272
- viewport
273
- });
274
- const defaultFontTokens = applyTextStyles({
275
- fontName: remainingTokens.calendarDayDefaultFontName,
276
- fontWeight: remainingTokens.calendarDayDefaultFontWeight
277
- });
278
- const calendarMonthFontTokens = applyTextStyles({
279
- fontName: remainingTokens.calendarMonthCaptionFontName,
280
- fontWeight: remainingTokens.calendarMonthCaptionFontWeight
281
- });
282
- const calendarWeekFontTokens = applyTextStyles({
283
- fontName: remainingTokens.dayPickerWeekHeaderFontName,
284
- fontWeight: remainingTokens.dayPickerWeekHeaderFontWeight
285
- });
286
- const renderPrevButton = _ref5 => {
287
- let {
288
- onClick
289
- } = _ref5;
290
- return /*#__PURE__*/_jsx(IconButton, {
291
- onPress: () => {
292
- onClick();
293
- },
294
- icon: previousIcon,
295
- variant: {
296
- size: 'small'
297
- },
298
- testID: prevTestID,
299
- ref: prevButtonRef
300
- });
301
- };
302
- const renderNextButton = _ref6 => {
303
- let {
304
- onClick
305
- } = _ref6;
306
- return /*#__PURE__*/_jsx(IconButton, {
307
- onPress: () => {
308
- onClick();
309
- },
310
- icon: nextIcon,
311
- variant: {
312
- size: 'small'
313
- },
314
- testID: nextTestID
315
- });
316
- };
317
- return /*#__PURE__*/_jsx(_Fragment, {
318
- children: inline ? /*#__PURE__*/_jsxs(_Fragment, {
319
- children: [/*#__PURE__*/_jsx(HiddenInputFieldContainer, {
320
- height: hiddenInputFieldContainerHeight,
321
- width: hiddenInputFieldContainerWidth,
322
- children: /*#__PURE__*/_jsx("input", {
323
- ref: ref,
324
- id: id,
325
- type: "text",
326
- value: inputText,
327
- readOnly: true
328
- })
329
- }), /*#__PURE__*/_jsx(CalendarContainer, {
330
- ...selectProps(rest),
331
- daySize: daySize,
332
- validation: validation,
333
- remainingTokens: remainingTokens,
334
- calendarDayDefaultHeight: circleSize,
335
- calendarDayDefaultWidth: circleSize,
336
- calendarMonthFontTokens: calendarMonthFontTokens,
337
- calendarWeekFontTokens: calendarWeekFontTokens,
338
- defaultFontTokens: defaultFontTokens,
339
- children: /*#__PURE__*/_jsx(DayPickerSingleDateController, {
340
- date: inputDate,
341
- onDateChange: onChange,
342
- focused: (inputDate ?? isFocused) || initialVisibleMonth !== '',
343
- onFocusChange: onFocusChange,
344
- numberOfMonths: 1,
345
- hideKeyboardShortcutsPanel: true,
346
- keepOpenOnDateSelect: false,
347
- daySize: daySize,
348
- renderNavPrevButton: renderPrevButton,
349
- renderNavNextButton: renderNextButton,
350
- isOutsideRange: isDayDisabled,
351
- phrases: getCopy(),
352
- initialVisibleMonth: getInitialVisibleMonth(initialVisibleMonth, inputDate),
353
- renderMonthElement: _ref7 => {
354
- let {
355
- month
356
- } = _ref7;
357
- return /*#__PURE__*/_jsx(MonthCenterContainer, {
358
- children: /*#__PURE__*/_jsxs("div", {
359
- children: [dictionary[copy] ? dictionary[copy].months[month.month()] : month.format('MMMM'), ' ', month.year()]
360
- })
361
- });
362
- },
363
- renderWeekHeaderElement: day => /*#__PURE__*/_jsx("div", {
364
- children: dictionary[copy] ? dictionary[copy].weekDays[day] : day
365
- })
366
- })
367
- })]
368
- }) : /*#__PURE__*/_jsx(DateInputWrapper, {
369
- onMouseDown: handleMouseDown,
370
- onFocus: handleFocus,
371
- children: /*#__PURE__*/_jsx(TextInput, {
372
- copy: copy,
373
- feedback: feedback,
374
- hint: hint,
375
- placeholder: placeholder,
376
- onChange: onChangeInput,
377
- onKeyPress: handleOnKeyPress,
378
- tooltip: tooltip,
379
- hintPosition: hintPosition,
380
- label: label ?? ((_dictionary$copy = dictionary[copy]) === null || _dictionary$copy === void 0 ? void 0 : _dictionary$copy.roleDescription),
381
- value: inputText,
382
- validation: handleValidation(validation),
383
- inactive: disabled,
384
- ref: textInputRef,
385
- children: /*#__PURE__*/_jsx(Portal, {
386
- children: /*#__PURE__*/_jsx(PortalPositionedContainer, {
387
- top: datePickerPosition.top,
388
- left: datePickerPosition.left,
389
- ref: datePickerRef,
390
- children: /*#__PURE__*/_jsx(CalendarContainer, {
391
- ...selectProps(rest),
392
- daySize: daySize,
393
- validation: validation,
394
- remainingTokens: remainingTokens,
395
- calendarDayDefaultHeight: circleSize,
396
- calendarDayDefaultWidth: circleSize,
397
- calendarMonthFontTokens: calendarMonthFontTokens,
398
- calendarWeekFontTokens: calendarWeekFontTokens,
399
- defaultFontTokens: defaultFontTokens,
400
- children: /*#__PURE__*/_jsx(SingleDatePicker, {
401
- date: inputDate,
402
- disabled: disabled,
403
- onDateChange: onChange,
404
- focused: isFocused,
405
- onFocusChange: onFocusChange,
406
- numberOfMonths: 1,
407
- hideKeyboardShortcutsPanel: true,
408
- keepOpenOnDateSelect: true,
409
- daySize: daySize,
410
- ref: ref,
411
- renderNavPrevButton: renderPrevButton,
412
- isOutsideRange: isDayDisabled,
413
- phrases: getCopy(),
414
- id: id,
415
- renderNavNextButton: renderNextButton,
416
- initialVisibleMonth: getInitialVisibleMonth(initialVisibleMonth, inputDate),
417
- renderMonthElement: _ref8 => {
418
- let {
419
- month
420
- } = _ref8;
421
- return /*#__PURE__*/_jsx(MonthCenterContainer, {
422
- children: /*#__PURE__*/_jsxs("div", {
423
- children: [dictionary[copy] ? dictionary[copy].months[month.month()] : month.format('MMMM'), ' ', month.year()]
424
- })
425
- });
426
- },
427
- renderWeekHeaderElement: day => /*#__PURE__*/_jsx("div", {
428
- children: dictionary[copy] ? dictionary[copy].weekDays[day] : day
429
- })
430
- })
431
- })
432
- })
433
- })
434
- })
435
- })
436
- });
437
- });
438
- DatePicker.displayName = 'DatePicker';
439
- DatePicker.propTypes = {
440
- ...selectedSystemPropTypes,
441
- tokens: getTokensPropType('DatePicker'),
442
- /**
443
- * A unique identifier.
444
- */
445
- id: PropTypes.string.isRequired,
446
- /**
447
- * Whether the English or French copy will be used (e.g. for accessibility labels).
448
- */
449
- copy: PropTypes.oneOf(['en', 'fr']),
450
- /**
451
- * A Moment instance representing the currently selected date, i.e. `moment()`
452
- */
453
- date: momentPropTypes.momentObj,
454
- /**
455
- * A detailed description of validation error/success or additional instructions.
456
- * Visual variant is determined based on the `validation` prop.
457
- */
458
- feedback: PropTypes.string,
459
- /**
460
- * Event triggered every time a new date is clicked on
461
- * @param {Moment} date The new date that was selected
462
- */
463
- onDateChange: PropTypes.func,
464
- /**
465
- * A function determining whether a given date should be disabled
466
- * @param {Moment} date The date to optionally disable
467
- * @returns {bool}
468
- */
469
- isDayDisabled: PropTypes.func,
470
- /**
471
- * The field label to be displayed above the calendar
472
- */
473
- label: PropTypes.string,
474
- /**
475
- * A flag determining if the calendar picker is standalone or an input with overlay
476
- */
477
- inline: PropTypes.bool,
478
- /**
479
- * A short description of the expected input.
480
- */
481
- hint: PropTypes.string,
482
- /**
483
- * Position of the hint relative to label. Use `below` to display a larger hint below the label.
484
- */
485
- hintPosition: PropTypes.oneOf(['inline', 'below']),
486
- /**
487
- * Content of an optional `Tooltip`. If set, a tooltip button will be shown next to the label.
488
- */
489
- tooltip: PropTypes.string,
490
- /**
491
- * Use to visually mark an input as valid or invalid.
492
- */
493
- validation: PropTypes.oneOf(['error', 'success']),
494
- /**
495
- * Disable the input which will not open the calendar picker
496
- */
497
- disabled: PropTypes.bool,
498
- /**
499
- * A unique identifier for the previous icon button located on the datepicker.
500
- * This is for automation testing purposes.
501
- * Will be added as a `data-testid-prev` attribute for example.
502
- */
503
- prevTestID: PropTypes.string,
504
- /**
505
- * A unique identifier for the next icon button located on the datepicker.
506
- * This is for automation testing purposes.
507
- * Will be added as a `data-testid-next` attribute for example.
508
- */
509
- nextTestID: PropTypes.string,
510
- /**
511
- * Optional placeholder for the date input. If not set the default value will be `DD / MM / YYYY`
512
- */
513
- placeholder: PropTypes.string,
514
- /**
515
- * The initial month to display when the calendar is opened. Expects a string in the format `YYYY-MM`
516
- */
517
- initialVisibleMonth: PropTypes.string
518
- };
519
- export default DatePicker;
@@ -1,119 +0,0 @@
1
- // from https://github.com/airbnb/react-dates/blob/master/src/defaultPhrases.js
2
- const calendarLabel = 'Calendrier';
3
- const roleDescription = 'Sélecteur de date';
4
- const closeDatePicker = 'Fermer ';
5
- const clearDate = 'Supprimer la date';
6
- const jumpToPrevMonth = 'Reculer pour passer au mois précédent.';
7
- const jumpToNextMonth = 'Avancer pour passer au mois suivant.';
8
- const keyboardShortcuts = 'Raccourcis clavier ';
9
- const showKeyboardShortcutsPanel = 'Ouvrir le panneau de raccourcis clavier.';
10
- const hideKeyboardShortcutsPanel = 'Fermez le panneau de raccourcis.';
11
- const openThisPanel = 'Ouvrir le panneau. ';
12
- const enterKey = 'Touche Entrée ';
13
- const leftArrowRightArrow = 'Touches de direction droite et gauche';
14
- const upArrowDownArrow = 'Touches de direction haut et bas';
15
- const pageUpPageDown = 'Touches Page précédente et Page suivante';
16
- const homeEnd = 'Touches Accueil et Fin';
17
- const escape = 'Touche Échap.';
18
- const questionMark = `Point d'interrogation`;
19
- const selectFocusedDate = 'Sélectionner la date mise au point.';
20
- const moveFocusByOneDay = `Reculer (à gauche) et avancer (à droite) d'un jour.`;
21
- const moveFocusByOneWeek = `Reculer (vers le haut) et avancer (vers le bas) d'une semaine.`;
22
- const moveFocusByOneMonth = 'Changer de mois.';
23
- const moveFocustoStartAndEndOfWeek = 'Aller au premier ou au dernier jour de la semaine.';
24
- const returnFocusToInput = 'Revenir au champ de saisie de la date.';
25
- const keyboardForwardNavigationInstructions = `Naviguer vers l'avant pour interagir avec le calendrier et sélectionner une date. Appuyer sur la touche Point d'interrogation pour obtenir les raccourcis clavier permettant de modifier les dates.`;
26
- const keyboardBackwardNavigationInstructions = `Naviguer en arrière pour interagir avec le calendrier et sélectionner une date. Appuyer sur la touche Point d'interrogation pour obtenir les raccourcis clavier permettant de modifier les dates.`;
27
- const months = ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Julliet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'];
28
- const weekDays = {
29
- Su: 'Dim',
30
- Mo: 'Lun',
31
- Tu: 'Mar',
32
- We: 'Mer',
33
- Th: 'Jeu',
34
- Fr: 'Ven',
35
- Sa: 'Sam'
36
- };
37
- const chooseAvailableStartDate = _ref => {
38
- let {
39
- date
40
- } = _ref;
41
- return `Choisir ${date}. Disponible.`;
42
- };
43
- const chooseAvailableEndDate = _ref2 => {
44
- let {
45
- date
46
- } = _ref2;
47
- return `Non disponible. ${date}`;
48
- };
49
- const chooseAvailableDate = _ref3 => {
50
- let {
51
- date
52
- } = _ref3;
53
- return date;
54
- };
55
- const dateIsUnavailable = _ref4 => {
56
- let {
57
- date
58
- } = _ref4;
59
- return `Not available. ${date}`;
60
- };
61
- const dateIsSelected = _ref5 => {
62
- let {
63
- date
64
- } = _ref5;
65
- return `Choisie. ${date}`;
66
- };
67
- const dateIsSelectedAsStartDate = _ref6 => {
68
- let {
69
- date
70
- } = _ref6;
71
- return `Choisie comme date de début. ${date}`;
72
- };
73
- const dateIsSelectedAsEndDate = _ref7 => {
74
- let {
75
- date
76
- } = _ref7;
77
- return `Choisie comme date de fin. ${date}`;
78
- };
79
- const dictionary = {
80
- en: undefined,
81
- // uses react-dates defaults
82
- fr: {
83
- calendarLabel,
84
- roleDescription,
85
- jumpToPrevMonth,
86
- jumpToNextMonth,
87
- keyboardShortcuts,
88
- showKeyboardShortcutsPanel,
89
- hideKeyboardShortcutsPanel,
90
- openThisPanel,
91
- enterKey,
92
- leftArrowRightArrow,
93
- upArrowDownArrow,
94
- pageUpPageDown,
95
- homeEnd,
96
- escape,
97
- questionMark,
98
- selectFocusedDate,
99
- moveFocusByOneDay,
100
- moveFocusByOneWeek,
101
- moveFocusByOneMonth,
102
- moveFocustoStartAndEndOfWeek,
103
- returnFocusToInput,
104
- months,
105
- weekDays,
106
- chooseAvailableStartDate,
107
- chooseAvailableEndDate,
108
- chooseAvailableDate,
109
- dateIsUnavailable,
110
- dateIsSelected,
111
- dateIsSelectedAsStartDate,
112
- dateIsSelectedAsEndDate,
113
- closeDatePicker,
114
- clearDate,
115
- keyboardForwardNavigationInstructions,
116
- keyboardBackwardNavigationInstructions
117
- }
118
- };
119
- export default dictionary;
@@ -1,2 +0,0 @@
1
- import DatePicker from './DatePicker';
2
- export default DatePicker;
@@ -1,3 +0,0 @@
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;