@elliemae/ds-date-picker 2.2.0-next.4 → 2.3.0-alpha.2

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 (76) hide show
  1. package/cjs/DSDatePicker.js +219 -221
  2. package/cjs/DSDatePicker.js.map +7 -0
  3. package/cjs/components/DSDatePickerImpl.js +128 -208
  4. package/cjs/components/DSDatePickerImpl.js.map +7 -0
  5. package/cjs/components/DatePickerController/DatePickerController.js +204 -242
  6. package/cjs/components/DatePickerController/DatePickerController.js.map +7 -0
  7. package/cjs/components/DatePickerDay/DatePickerDay.js +48 -23
  8. package/cjs/components/DatePickerDay/DatePickerDay.js.map +7 -0
  9. package/cjs/components/DatePickerDropdown.js +74 -54
  10. package/cjs/components/DatePickerDropdown.js.map +7 -0
  11. package/cjs/components/DatePickerHeader/DatePickerHeader.js +62 -44
  12. package/cjs/components/DatePickerHeader/DatePickerHeader.js.map +7 -0
  13. package/cjs/components/DatePickerNavigation/DatePickerNavigation.js +62 -31
  14. package/cjs/components/DatePickerNavigation/DatePickerNavigation.js.map +7 -0
  15. package/cjs/components/DatePickerPicker/DatePickerPicker.js +82 -71
  16. package/cjs/components/DatePickerPicker/DatePickerPicker.js.map +7 -0
  17. package/cjs/components/DatePickerRange/DatePickerRange.js +84 -93
  18. package/cjs/components/DatePickerRange/DatePickerRange.js.map +7 -0
  19. package/cjs/components/DatePickerRangeHeader/DatePickerRangeHeader.js +91 -97
  20. package/cjs/components/DatePickerRangeHeader/DatePickerRangeHeader.js.map +7 -0
  21. package/cjs/components/DatePickerRenderMonth/DatePickerRenderMonth.js +60 -45
  22. package/cjs/components/DatePickerRenderMonth/DatePickerRenderMonth.js.map +7 -0
  23. package/cjs/components/DatePickerSingleDate/DatePickerSingleDate.js +88 -77
  24. package/cjs/components/DatePickerSingleDate/DatePickerSingleDate.js.map +7 -0
  25. package/cjs/components/SingleRangeDateSwitcher/SingleRangeDateSwitcher.js +69 -48
  26. package/cjs/components/SingleRangeDateSwitcher/SingleRangeDateSwitcher.js.map +7 -0
  27. package/cjs/components/index.js +53 -27
  28. package/cjs/components/index.js.map +7 -0
  29. package/cjs/defaultPhrases.js +77 -92
  30. package/cjs/defaultPhrases.js.map +7 -0
  31. package/cjs/index.js +38 -35
  32. package/cjs/index.js.map +7 -0
  33. package/esm/DSDatePicker.js +171 -169
  34. package/esm/DSDatePicker.js.map +7 -0
  35. package/esm/components/DSDatePickerImpl.js +88 -189
  36. package/esm/components/DSDatePickerImpl.js.map +7 -0
  37. package/esm/components/DatePickerController/DatePickerController.js +141 -198
  38. package/esm/components/DatePickerController/DatePickerController.js.map +7 -0
  39. package/esm/components/DatePickerDay/DatePickerDay.js +19 -17
  40. package/esm/components/DatePickerDay/DatePickerDay.js.map +7 -0
  41. package/esm/components/DatePickerDropdown.js +45 -46
  42. package/esm/components/DatePickerDropdown.js.map +7 -0
  43. package/esm/components/DatePickerHeader/DatePickerHeader.js +31 -35
  44. package/esm/components/DatePickerHeader/DatePickerHeader.js.map +7 -0
  45. package/esm/components/DatePickerNavigation/DatePickerNavigation.js +36 -24
  46. package/esm/components/DatePickerNavigation/DatePickerNavigation.js.map +7 -0
  47. package/esm/components/DatePickerPicker/DatePickerPicker.js +44 -48
  48. package/esm/components/DatePickerPicker/DatePickerPicker.js.map +7 -0
  49. package/esm/components/DatePickerRange/DatePickerRange.js +49 -79
  50. package/esm/components/DatePickerRange/DatePickerRange.js.map +7 -0
  51. package/esm/components/DatePickerRangeHeader/DatePickerRangeHeader.js +50 -78
  52. package/esm/components/DatePickerRangeHeader/DatePickerRangeHeader.js.map +7 -0
  53. package/esm/components/DatePickerRenderMonth/DatePickerRenderMonth.js +31 -37
  54. package/esm/components/DatePickerRenderMonth/DatePickerRenderMonth.js.map +7 -0
  55. package/esm/components/DatePickerSingleDate/DatePickerSingleDate.js +56 -66
  56. package/esm/components/DatePickerSingleDate/DatePickerSingleDate.js.map +7 -0
  57. package/esm/components/SingleRangeDateSwitcher/SingleRangeDateSwitcher.js +40 -42
  58. package/esm/components/SingleRangeDateSwitcher/SingleRangeDateSwitcher.js.map +7 -0
  59. package/esm/components/index.js +24 -10
  60. package/esm/components/index.js.map +7 -0
  61. package/esm/defaultPhrases.js +48 -80
  62. package/esm/defaultPhrases.js.map +7 -0
  63. package/esm/index.js +9 -13
  64. package/esm/index.js.map +7 -0
  65. package/package.json +10 -10
  66. package/types/components/DSDatePickerImpl.d.ts +2 -1
  67. package/types/components/DatePickerController/DatePickerController.d.ts +1 -1
  68. package/types/components/DatePickerDay/DatePickerDay.d.ts +1 -0
  69. package/types/components/DatePickerDropdown.d.ts +1 -0
  70. package/types/components/DatePickerHeader/DatePickerHeader.d.ts +1 -0
  71. package/types/components/DatePickerNavigation/DatePickerNavigation.d.ts +4 -3
  72. package/types/components/DatePickerPicker/DatePickerPicker.d.ts +2 -1
  73. package/types/components/DatePickerRange/DatePickerRange.d.ts +1 -0
  74. package/types/components/DatePickerRangeHeader/DatePickerRangeHeader.d.ts +1 -0
  75. package/types/components/DatePickerSingleDate/DatePickerSingleDate.d.ts +1 -0
  76. package/types/components/SingleRangeDateSwitcher/SingleRangeDateSwitcher.d.ts +1 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/defaultPhrases.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["const calendarLabel = 'Calendar';\nconst roleDescription = 'datepicker';\nconst closeDatePicker = 'Close';\nconst focusStartDate =\n 'Interact with the calendar and add the check-in date for your trip.';\nconst clearDate = 'Clear Date';\nconst clearDates = 'Clear Dates';\nconst jumpToPrevMonth = 'Move backward to switch to the previous month.';\nconst jumpToNextMonth = 'Move forward to switch to the next month.';\nconst keyboardShortcuts = 'Keyboard Shortcuts';\nconst showKeyboardShortcutsPanel = 'Open the keyboard shortcuts panel.';\nconst hideKeyboardShortcutsPanel = 'Close the shortcuts panel.';\nconst openThisPanel = 'Open this panel.';\nconst enterKey = 'Enter key';\nconst leftArrowRightArrow = 'Right and left arrow keys';\nconst upArrowDownArrow = 'up and down arrow keys';\nconst pageUpPageDown = 'page up and page down keys';\nconst homeEnd = 'Home and end keys';\nconst escape = 'Escape key';\nconst questionMark = 'Question mark';\nconst selectFocusedDate = 'Select the date in focus.';\nconst moveFocusByOneDay =\n 'Move backward (left) and forward (right) by one day.';\nconst moveFocusByOneWeek = 'Move backward (up) and forward (down) by one week.';\nconst moveFocusByOneMonth = 'Switch months.';\nconst moveFocustoStartAndEndOfWeek = 'Go to the first or last day of a week.';\nconst returnFocusToInput = 'Return to the date input field.';\nconst keyboardForwardNavigationInstructions =\n 'Navigate forward to interact with the calendar and select a date. Press the question mark key to get the keyboard shortcuts for changing dates.';\nconst keyboardBackwardNavigationInstructions =\n 'Navigate backward to interact with the calendar and select a date. Press the question mark key to get the keyboard shortcuts for changing dates.';\n\nconst chooseAvailableStartDate = ({ date }) =>\n `Choose ${date} as your check-in date. It\u2019s available.`;\nconst chooseAvailableEndDate = ({ date }) =>\n `Choose ${date} as your check-out date. It\u2019s available.`;\nconst chooseAvailableDate = ({ date }) => date;\nconst dateIsUnavailable = ({ date }) => `Not available. ${date}`;\nconst dateIsSelected = ({ date }) => `Selected. ${date}`;\nconst dateIsSelectedAsStartDate = ({ date }) =>\n `Selected as start date. ${date}`;\nconst dateIsSelectedAsEndDate = ({ date }) => `Selected as end date. ${date}`;\n\nexport default {\n calendarLabel,\n roleDescription,\n closeDatePicker,\n focusStartDate,\n clearDate,\n clearDates,\n jumpToPrevMonth,\n jumpToNextMonth,\n keyboardShortcuts,\n showKeyboardShortcutsPanel,\n hideKeyboardShortcutsPanel,\n openThisPanel,\n enterKey,\n leftArrowRightArrow,\n upArrowDownArrow,\n pageUpPageDown,\n homeEnd,\n escape,\n questionMark,\n selectFocusedDate,\n moveFocusByOneDay,\n moveFocusByOneWeek,\n moveFocusByOneMonth,\n moveFocustoStartAndEndOfWeek,\n returnFocusToInput,\n keyboardForwardNavigationInstructions,\n keyboardBackwardNavigationInstructions,\n\n chooseAvailableStartDate,\n chooseAvailableEndDate,\n dateIsUnavailable,\n dateIsSelected,\n dateIsSelectedAsStartDate,\n dateIsSelectedAsEndDate,\n};\n\nexport const DateRangePickerPhrases = {\n calendarLabel,\n roleDescription,\n closeDatePicker,\n clearDates,\n focusStartDate,\n jumpToPrevMonth,\n jumpToNextMonth,\n keyboardShortcuts,\n showKeyboardShortcutsPanel,\n hideKeyboardShortcutsPanel,\n openThisPanel,\n enterKey,\n leftArrowRightArrow,\n upArrowDownArrow,\n pageUpPageDown,\n homeEnd,\n escape,\n questionMark,\n selectFocusedDate,\n moveFocusByOneDay,\n moveFocusByOneWeek,\n moveFocusByOneMonth,\n moveFocustoStartAndEndOfWeek,\n returnFocusToInput,\n keyboardForwardNavigationInstructions,\n keyboardBackwardNavigationInstructions,\n chooseAvailableStartDate,\n chooseAvailableEndDate,\n dateIsUnavailable,\n dateIsSelected,\n dateIsSelectedAsStartDate,\n dateIsSelectedAsEndDate,\n};\n\nexport const DateRangePickerInputPhrases = {\n focusStartDate,\n clearDates,\n keyboardForwardNavigationInstructions,\n keyboardBackwardNavigationInstructions,\n};\n\nexport const SingleDatePickerPhrases = {\n calendarLabel,\n roleDescription,\n closeDatePicker,\n clearDate,\n jumpToPrevMonth,\n jumpToNextMonth,\n keyboardShortcuts,\n showKeyboardShortcutsPanel,\n hideKeyboardShortcutsPanel,\n openThisPanel,\n enterKey,\n leftArrowRightArrow,\n upArrowDownArrow,\n pageUpPageDown,\n homeEnd,\n escape,\n questionMark,\n selectFocusedDate,\n moveFocusByOneDay,\n moveFocusByOneWeek,\n moveFocusByOneMonth,\n moveFocustoStartAndEndOfWeek,\n returnFocusToInput,\n keyboardForwardNavigationInstructions,\n keyboardBackwardNavigationInstructions,\n chooseAvailableDate,\n dateIsUnavailable,\n dateIsSelected,\n};\n\nexport const SingleDatePickerInputPhrases = {\n clearDate,\n keyboardForwardNavigationInstructions,\n keyboardBackwardNavigationInstructions,\n};\n\nexport const DayPickerPhrases = {\n calendarLabel,\n roleDescription,\n jumpToPrevMonth,\n jumpToNextMonth,\n keyboardShortcuts,\n showKeyboardShortcutsPanel,\n hideKeyboardShortcutsPanel,\n openThisPanel,\n enterKey,\n leftArrowRightArrow,\n upArrowDownArrow,\n pageUpPageDown,\n homeEnd,\n escape,\n questionMark,\n selectFocusedDate,\n moveFocusByOneDay,\n moveFocusByOneWeek,\n moveFocusByOneMonth,\n moveFocustoStartAndEndOfWeek,\n returnFocusToInput,\n chooseAvailableStartDate,\n chooseAvailableEndDate,\n chooseAvailableDate,\n dateIsUnavailable,\n dateIsSelected,\n dateIsSelectedAsStartDate,\n dateIsSelectedAsEndDate,\n};\n\nexport const DayPickerKeyboardShortcutsPhrases = {\n keyboardShortcuts,\n showKeyboardShortcutsPanel,\n hideKeyboardShortcutsPanel,\n openThisPanel,\n enterKey,\n leftArrowRightArrow,\n upArrowDownArrow,\n pageUpPageDown,\n homeEnd,\n escape,\n questionMark,\n selectFocusedDate,\n moveFocusByOneDay,\n moveFocusByOneWeek,\n moveFocusByOneMonth,\n moveFocustoStartAndEndOfWeek,\n returnFocusToInput,\n};\n\nexport const DayPickerNavigationPhrases = {\n jumpToPrevMonth,\n jumpToNextMonth,\n};\n\nexport const CalendarDayPhrases = {\n chooseAvailableDate,\n dateIsUnavailable,\n dateIsSelected,\n dateIsSelectedAsStartDate,\n dateIsSelectedAsEndDate,\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,MAAM,gBAAgB;AACtB,MAAM,kBAAkB;AACxB,MAAM,kBAAkB;AACxB,MAAM,iBACJ;AACF,MAAM,YAAY;AAClB,MAAM,aAAa;AACnB,MAAM,kBAAkB;AACxB,MAAM,kBAAkB;AACxB,MAAM,oBAAoB;AAC1B,MAA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;AAAA,EACA;AAAA;AAGK,MAAM,qBAAqB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;",
6
+ "names": []
7
+ }
package/cjs/index.js CHANGED
@@ -1,35 +1,38 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var DSDatePicker = require('./DSDatePicker.js');
6
- var defaultPhrases = require('./defaultPhrases.js');
7
- var DatePickerNavigation = require('./components/DatePickerNavigation/DatePickerNavigation.js');
8
- var DatePickerDay = require('./components/DatePickerDay/DatePickerDay.js');
9
- var DatePickerPicker = require('./components/DatePickerPicker/DatePickerPicker.js');
10
- var DatePickerController = require('./components/DatePickerController/DatePickerController.js');
11
- var DatePickerDropdown = require('./components/DatePickerDropdown.js');
12
- var DatePickerSingleDate = require('./components/DatePickerSingleDate/DatePickerSingleDate.js');
13
- var DatePickerHeader = require('./components/DatePickerHeader/DatePickerHeader.js');
14
- var DatePickerRange = require('./components/DatePickerRange/DatePickerRange.js');
15
- var DatePickerRangeHeader = require('./components/DatePickerRangeHeader/DatePickerRangeHeader.js');
16
- var SingleRangeDateSwitcher = require('./components/SingleRangeDateSwitcher/SingleRangeDateSwitcher.js');
17
- var DatePickerRenderMonth = require('./components/DatePickerRenderMonth/DatePickerRenderMonth.js');
18
-
19
-
20
-
21
- exports.DatePickerWithSchema = DSDatePicker.DatePickerWithSchema;
22
- exports["default"] = DSDatePicker["default"];
23
- exports.SingleDatePickerPhrases = defaultPhrases.SingleDatePickerPhrases;
24
- exports.DatePickerNavigation = DatePickerNavigation;
25
- exports.DatePickerDay = DatePickerDay;
26
- exports.DatePickerPicker = DatePickerPicker.Picker;
27
- exports.Picker = DatePickerPicker.Picker;
28
- exports.DSDatePickerController = DatePickerController;
29
- exports.DatePickerDropdown = DatePickerDropdown;
30
- exports.DatePickerSingleDate = DatePickerSingleDate;
31
- exports.DatePickerHeader = DatePickerHeader;
32
- exports.DatePickerRange = DatePickerRange;
33
- exports.DatePickerRangeHeader = DatePickerRangeHeader;
34
- exports.SingleRangeDateSwitcher = SingleRangeDateSwitcher;
35
- exports.renderMonthElement = DatePickerRenderMonth.renderMonthElement;
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var src_exports = {};
29
+ __export(src_exports, {
30
+ SingleDatePickerPhrases: () => import_defaultPhrases.SingleDatePickerPhrases,
31
+ default: () => import_DSDatePicker.default
32
+ });
33
+ var React = __toESM(require("react"));
34
+ var import_DSDatePicker = __toESM(require("./DSDatePicker"));
35
+ __reExport(src_exports, require("./DSDatePicker"));
36
+ var import_defaultPhrases = require("./defaultPhrases");
37
+ module.exports = __toCommonJS(src_exports);
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export { default } from './DSDatePicker';\nexport * from './DSDatePicker';\nexport { SingleDatePickerPhrases } from './defaultPhrases';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAwB;AACxB,wBAAc;AACd,4BAAwC;",
6
+ "names": []
7
+ }
@@ -1,163 +1,149 @@
1
- import 'core-js/modules/esnext.async-iterator.filter.js';
2
- import 'core-js/modules/esnext.iterator.constructor.js';
3
- import 'core-js/modules/esnext.iterator.filter.js';
4
- import 'core-js/modules/esnext.async-iterator.for-each.js';
5
- import 'core-js/modules/esnext.iterator.for-each.js';
6
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
- import _jsx from '@babel/runtime/helpers/esm/jsx';
8
- import 'core-js/modules/web.dom-collections.iterator.js';
9
- import 'react';
10
- import { PropTypes, describe } from 'react-desc';
11
- import 'react-dates/initialize';
12
- import { convertPropToCssClassName } from '@elliemae/ds-classnames';
13
- import moment from 'moment';
14
- import { SingleDatePickerPhrases } from './defaultPhrases.js';
15
- export { default as DatePickerNavigation } from './components/DatePickerNavigation/DatePickerNavigation.js';
16
- export { default as DatePickerDay } from './components/DatePickerDay/DatePickerDay.js';
17
- import { PickerPropsTypes } from './components/DatePickerPicker/DatePickerPicker.js';
18
- export { Picker as DatePickerPicker, Picker } from './components/DatePickerPicker/DatePickerPicker.js';
19
- export { default as DatePickerDropdown } from './components/DatePickerDropdown.js';
20
- export { default as DatePickerSingleDate } from './components/DatePickerSingleDate/DatePickerSingleDate.js';
21
- export { default as DatePickerHeader } from './components/DatePickerHeader/DatePickerHeader.js';
22
- export { default as DatePickerRange } from './components/DatePickerRange/DatePickerRange.js';
23
- export { default as DatePickerRangeHeader } from './components/DatePickerRangeHeader/DatePickerRangeHeader.js';
24
- export { default as SingleRangeDateSwitcher } from './components/SingleRangeDateSwitcher/SingleRangeDateSwitcher.js';
25
- export { renderMonthElement } from './components/DatePickerRenderMonth/DatePickerRenderMonth.js';
26
- import DSdatePickerImpl from './components/DSDatePickerImpl.js';
27
- export { default as DSDatePickerController } from './components/DatePickerController/DatePickerController.js';
28
- import { jsx } from 'react/jsx-runtime';
29
-
30
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
31
-
32
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
33
-
34
- const DSDatePicker = _ref => {
35
- let {
36
- containerProps = {},
37
- id = '',
38
- appendToBody = true,
39
- className = '',
40
- date,
41
- value,
42
- placeholder = '',
43
- disabled = false,
44
- required = false,
45
- readOnly = false,
46
- hasError = false,
47
- screenReaderInputMessage = 'Select date',
48
- enableOutsideDays = true,
49
- initialVisibleMonth = moment(),
50
- firstDayOfWeek = 0,
51
- keepOpenOnDateSelect = false,
52
- hideKeyboardShortcutsPanel = true,
53
- onChange = () => null,
54
- onDateChange = undefined,
55
- onPrevMonthClick = () => null,
56
- onNextMonthClick = () => null,
57
- onClose = () => null,
58
- onFocus = () => null,
59
- onBlur = () => null,
60
- phrases = SingleDatePickerPhrases,
61
- displayFormat = 'L',
62
- displayFormatDay = 'D',
63
- transitionDuration = 0,
64
- verticalSpacing = 0,
65
- isDayBlocked = () => false,
66
- isOutsideRange = () => false,
67
- isDayHighlighted = () => false,
68
- numberOfMonths = 1,
69
- openDirection = 'down',
70
- tabIndex = '',
71
- zIndex = 1,
72
- pickerProps = {},
73
- calendarProps = {},
74
- autoClear = false,
75
- focusCurrentDate = false
76
- } = _ref;
77
- const {
78
- cssClassName
79
- } = convertPropToCssClassName('datepicker', className, {
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import { PropTypes, describe } from "react-desc";
4
+ import "react-dates/initialize";
5
+ import { convertPropToCssClassName } from "@elliemae/ds-classnames";
6
+ import moment from "moment";
7
+ import { SingleDatePickerPhrases } from "./defaultPhrases";
8
+ import {
9
+ DatePickerNavigation,
10
+ DatePickerDay,
11
+ DatePickerPicker,
12
+ DatePickerDropdown,
13
+ DatePickerSingleDate,
14
+ DatePickerHeader,
15
+ DatePickerRange,
16
+ DatePickerRangeHeader,
17
+ SingleRangeDateSwitcher,
18
+ renderMonthElement
19
+ } from "./components";
20
+ import { DSDatePickerImpl } from "./components/DSDatePickerImpl";
21
+ import { DSDatePickerController } from "./components/DatePickerController/DatePickerController";
22
+ import { PickerPropsTypes, Picker } from "./components/DatePickerPicker/DatePickerPicker";
23
+ const DSDatePicker = ({
24
+ containerProps = {},
25
+ id = "",
26
+ appendToBody = true,
27
+ className = "",
28
+ date,
29
+ value,
30
+ placeholder = "",
31
+ disabled = false,
32
+ required = false,
33
+ readOnly = false,
34
+ hasError = false,
35
+ screenReaderInputMessage = "Select date",
36
+ enableOutsideDays = true,
37
+ initialVisibleMonth = moment(),
38
+ firstDayOfWeek = 0,
39
+ keepOpenOnDateSelect = false,
40
+ hideKeyboardShortcutsPanel = true,
41
+ onChange = () => null,
42
+ onDateChange = void 0,
43
+ onPrevMonthClick = () => null,
44
+ onNextMonthClick = () => null,
45
+ onClose = () => null,
46
+ onFocus = () => null,
47
+ onBlur = () => null,
48
+ phrases = SingleDatePickerPhrases,
49
+ displayFormat = "L",
50
+ displayFormatDay = "D",
51
+ transitionDuration = 0,
52
+ verticalSpacing = 0,
53
+ isDayBlocked = () => false,
54
+ isOutsideRange = () => false,
55
+ isDayHighlighted = () => false,
56
+ numberOfMonths = 1,
57
+ openDirection = "down",
58
+ tabIndex = "",
59
+ zIndex = 1,
60
+ pickerProps = {},
61
+ calendarProps = {},
62
+ autoClear = false,
63
+ focusCurrentDate = false
64
+ }) => {
65
+ const { cssClassName } = convertPropToCssClassName("datepicker", className, {
80
66
  hasError,
81
67
  readOnly,
82
68
  disabled,
83
69
  id
84
70
  });
85
71
  const safeDate = date || value;
86
- return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
87
- className: cssClassName
88
- }, containerProps), {}, {
89
- style: {
90
- minWidth: '140px'
72
+ return /* @__PURE__ */ React2.createElement("div", {
73
+ className: cssClassName,
74
+ ...containerProps,
75
+ style: { minWidth: "140px" }
76
+ }, /* @__PURE__ */ React2.createElement(DSDatePickerImpl, {
77
+ appendToBody,
78
+ autoClear,
79
+ date: safeDate,
80
+ disabled,
81
+ displayFormat,
82
+ displayFormatDay,
83
+ enableOutsideDays,
84
+ firstDayOfWeek,
85
+ hideKeyboardShortcutsPanel,
86
+ initialVisibleMonth: () => initialVisibleMonth ? moment(initialVisibleMonth) : moment(safeDate),
87
+ isDayBlocked,
88
+ isDayHighlighted,
89
+ isOutsideRange: isOutsideRange === true || isOutsideRange === false ? () => isOutsideRange : isOutsideRange,
90
+ keepOpenOnDateSelect,
91
+ numberOfMonths,
92
+ onBlur,
93
+ onClose,
94
+ onChange,
95
+ onDateChange: (...args) => {
96
+ if (onDateChange)
97
+ onDateChange(...args);
91
98
  },
92
- children: /*#__PURE__*/_jsx(DSdatePickerImpl, {
93
- appendToBody: appendToBody,
94
- autoClear: autoClear,
95
- date: safeDate,
96
- disabled: disabled,
97
- displayFormat: displayFormat,
98
- displayFormatDay: displayFormatDay,
99
- enableOutsideDays: enableOutsideDays,
100
- firstDayOfWeek: firstDayOfWeek,
101
- hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel,
102
- initialVisibleMonth: () => initialVisibleMonth ? moment(initialVisibleMonth) : moment(safeDate),
103
- isDayBlocked: isDayBlocked,
104
- isDayHighlighted: isDayHighlighted,
105
- isOutsideRange: isOutsideRange === true || isOutsideRange === false ? () => isOutsideRange : isOutsideRange,
106
- keepOpenOnDateSelect: keepOpenOnDateSelect,
107
- numberOfMonths: numberOfMonths,
108
- onBlur: onBlur,
109
- onClose: onClose,
110
- onChange: onChange,
111
- onDateChange: function () {
112
- if (onDateChange) onDateChange(...arguments);
113
- },
114
- onFocus: onFocus,
115
- onNextMonthClick: onNextMonthClick,
116
- onPrevMonthClick: onPrevMonthClick,
117
- openDirection: openDirection,
118
- phrases: phrases,
119
- placeholder: placeholder,
120
- readOnly: readOnly,
121
- required: required,
122
- screenReaderInputMessage: screenReaderInputMessage,
123
- transitionDuration: transitionDuration,
124
- value: safeDate,
125
- verticalSpacing: verticalSpacing,
126
- tabIndex: tabIndex,
127
- zIndex: zIndex,
128
- pickerProps: pickerProps,
129
- calendarProps: calendarProps,
130
- focusCurrentDate: focusCurrentDate
131
- })
99
+ onFocus,
100
+ onNextMonthClick,
101
+ onPrevMonthClick,
102
+ openDirection,
103
+ phrases,
104
+ placeholder,
105
+ readOnly,
106
+ required,
107
+ screenReaderInputMessage,
108
+ transitionDuration,
109
+ value: safeDate,
110
+ verticalSpacing,
111
+ tabIndex,
112
+ zIndex,
113
+ pickerProps,
114
+ calendarProps,
115
+ focusCurrentDate
132
116
  }));
133
117
  };
134
-
135
118
  const datePickerProps = {
136
- containerProps: PropTypes.shape({}).description('Set of Properties attached to the main container'),
137
- id: PropTypes.string.description('components id'),
138
- appendToBody: PropTypes.bool.description('append component to body or not').defaultValue(true),
139
- className: PropTypes.string.description('html class attribute'),
140
- date: PropTypes.instanceOf(Date, moment).description('selected date').defaultValue(undefined),
141
- value: PropTypes.instanceOf(Date, moment).description('value'),
142
- placeholder: PropTypes.string.description('input placeholder value'),
143
- autoClear: PropTypes.bool.description('autoclears the input onblur if the date is not completely set').defaultValue(false),
144
- disabled: PropTypes.bool.description('disable component or not').defaultValue(false),
145
- required: PropTypes.bool.description('value is required or not').defaultValue(false),
146
- readOnly: PropTypes.bool.description('is read only or not').defaultValue(false),
147
- hasError: PropTypes.bool.description('set error state').defaultValue(false),
148
- screenReaderInputMessage: PropTypes.string.description('message to anounce by screen reader').defaultValue('select date'),
149
- enableOutsideDays: PropTypes.bool.description('enable days oustide month or not').defaultValue(true),
150
- initialVisibleMonth: PropTypes.instanceOf(Date, moment).description('initial month to display'),
151
- firstDayOfWeek: PropTypes.number.description('first day of week').defaultValue(0),
152
- keepOpenOnDateSelect: PropTypes.bool.description('keep picker open when a date is selected').defaultValue(false),
153
- hideKeyboardShortcutsPanel: PropTypes.bool.description('hide keyabord shortcut panel or not').defaultValue(true),
154
- onChange: PropTypes.func.description("\n function executed when input changes. This could trigger with invalid dates. It returns a string and a moment\n if the date is valid.\n "),
155
- onDateChange: PropTypes.func.description('function executed when date changes. This doesnt trigger with invalid dates. It returns a moment object'),
156
- onPrevMonthClick: PropTypes.func.description('function executed when clicking on prev month button'),
157
- onNextMonthClick: PropTypes.func.description('function executed when clicking on next month button'),
158
- onBlur: PropTypes.func.description('function executed when component loses focus'),
159
- onClose: PropTypes.func.description('function executed when component closes'),
160
- onFocus: PropTypes.func.description('function executed when component gains focus'),
119
+ containerProps: PropTypes.shape({}).description("Set of Properties attached to the main container"),
120
+ id: PropTypes.string.description("components id"),
121
+ appendToBody: PropTypes.bool.description("append component to body or not").defaultValue(true),
122
+ className: PropTypes.string.description("html class attribute"),
123
+ date: PropTypes.instanceOf(Date, moment).description("selected date").defaultValue(void 0),
124
+ value: PropTypes.instanceOf(Date, moment).description("value"),
125
+ placeholder: PropTypes.string.description("input placeholder value"),
126
+ autoClear: PropTypes.bool.description("autoclears the input onblur if the date is not completely set").defaultValue(false),
127
+ disabled: PropTypes.bool.description("disable component or not").defaultValue(false),
128
+ required: PropTypes.bool.description("value is required or not").defaultValue(false),
129
+ readOnly: PropTypes.bool.description("is read only or not").defaultValue(false),
130
+ hasError: PropTypes.bool.description("set error state").defaultValue(false),
131
+ screenReaderInputMessage: PropTypes.string.description("message to anounce by screen reader").defaultValue("select date"),
132
+ enableOutsideDays: PropTypes.bool.description("enable days oustide month or not").defaultValue(true),
133
+ initialVisibleMonth: PropTypes.instanceOf(Date, moment).description("initial month to display"),
134
+ firstDayOfWeek: PropTypes.number.description("first day of week").defaultValue(0),
135
+ keepOpenOnDateSelect: PropTypes.bool.description("keep picker open when a date is selected").defaultValue(false),
136
+ hideKeyboardShortcutsPanel: PropTypes.bool.description("hide keyabord shortcut panel or not").defaultValue(true),
137
+ onChange: PropTypes.func.description(`
138
+ function executed when input changes. This could trigger with invalid dates. It returns a string and a moment
139
+ if the date is valid.
140
+ `),
141
+ onDateChange: PropTypes.func.description("function executed when date changes. This doesnt trigger with invalid dates. It returns a moment object"),
142
+ onPrevMonthClick: PropTypes.func.description("function executed when clicking on prev month button"),
143
+ onNextMonthClick: PropTypes.func.description("function executed when clicking on next month button"),
144
+ onBlur: PropTypes.func.description("function executed when component loses focus"),
145
+ onClose: PropTypes.func.description("function executed when component closes"),
146
+ onFocus: PropTypes.func.description("function executed when component gains focus"),
161
147
  phrases: PropTypes.shape({
162
148
  calendarLabel: PropTypes.string,
163
149
  closeDatePicker: PropTypes.string,
@@ -187,25 +173,41 @@ const datePickerProps = {
187
173
  chooseAvailableEndDate: PropTypes.func,
188
174
  dateIsUnavailable: PropTypes.func,
189
175
  dateIsSelected: PropTypes.func
190
- }).description('react-dates phrases').defaultValue(SingleDatePickerPhrases),
191
- displayFormat: PropTypes.string.description('display format').defaultValue('L'),
192
- displayFormatDay: PropTypes.string.description('display format day').defaultValue('D'),
193
- transitionDuration: PropTypes.number.description('transition duration').defaultValue(0),
194
- verticalSpacing: PropTypes.number.description('vertical spacing'),
195
- isDayBlocked: PropTypes.func.description('function that returns each day and disables desired dates'),
196
- isOutsideRange: PropTypes.func.description('function that returns each day and disables outisde range dates'),
197
- isDayHighlighted: PropTypes.func.description('function that returns each day and higlights desired dates'),
198
- numberOfMonths: PropTypes.number.description('amount of months'),
199
- openDirection: PropTypes.string.description('open direction of the popup').defaultValue('down'),
200
- tabIndex: PropTypes.number.description('overrides tab index of the element'),
201
- zIndex: PropTypes.string.description('overrides z-index of the element'),
202
- pickerProps: PropTypes.shape(PickerPropsTypes).description('props to be passed to the picker container'),
203
- calendarProps: PropTypes.shape({
204
- tabIndex: PropTypes.number
205
- }).description('props to be passes to the calendar container'),
206
- focusCurrentDate: PropTypes.bool.description('Wheter to focus current date on calendar').defaultValue(false)
176
+ }).description("react-dates phrases").defaultValue(SingleDatePickerPhrases),
177
+ displayFormat: PropTypes.string.description("display format").defaultValue("L"),
178
+ displayFormatDay: PropTypes.string.description("display format day").defaultValue("D"),
179
+ transitionDuration: PropTypes.number.description("transition duration").defaultValue(0),
180
+ verticalSpacing: PropTypes.number.description("vertical spacing"),
181
+ isDayBlocked: PropTypes.func.description("function that returns each day and disables desired dates"),
182
+ isOutsideRange: PropTypes.func.description("function that returns each day and disables outisde range dates"),
183
+ isDayHighlighted: PropTypes.func.description("function that returns each day and higlights desired dates"),
184
+ numberOfMonths: PropTypes.number.description("amount of months"),
185
+ openDirection: PropTypes.string.description("open direction of the popup").defaultValue("down"),
186
+ tabIndex: PropTypes.number.description("overrides tab index of the element"),
187
+ zIndex: PropTypes.string.description("overrides z-index of the element"),
188
+ pickerProps: PropTypes.shape(PickerPropsTypes).description("props to be passed to the picker container"),
189
+ calendarProps: PropTypes.shape({ tabIndex: PropTypes.number }).description("props to be passes to the calendar container"),
190
+ focusCurrentDate: PropTypes.bool.description("Wheter to focus current date on calendar").defaultValue(false)
207
191
  };
192
+ DSDatePicker.propTypes = datePickerProps;
208
193
  const DatePickerWithSchema = describe(DSDatePicker);
209
194
  DatePickerWithSchema.propTypes = datePickerProps;
210
-
211
- export { DatePickerWithSchema, DSDatePicker as default };
195
+ var DSDatePicker_default = DSDatePicker;
196
+ export {
197
+ DSDatePicker,
198
+ DSDatePickerController,
199
+ DatePickerDay,
200
+ DatePickerDropdown,
201
+ DatePickerHeader,
202
+ DatePickerNavigation,
203
+ DatePickerPicker,
204
+ DatePickerRange,
205
+ DatePickerRangeHeader,
206
+ DatePickerSingleDate,
207
+ DatePickerWithSchema,
208
+ Picker,
209
+ SingleRangeDateSwitcher,
210
+ DSDatePicker_default as default,
211
+ renderMonthElement
212
+ };
213
+ //# sourceMappingURL=DSDatePicker.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSDatePicker.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport 'react-dates/initialize';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport moment from 'moment';\nimport { SingleDatePickerPhrases } from './defaultPhrases';\nimport {\n DatePickerNavigation,\n DatePickerDay,\n DatePickerPicker,\n DatePickerDropdown,\n DatePickerSingleDate,\n DatePickerHeader,\n DatePickerRange,\n DatePickerRangeHeader,\n SingleRangeDateSwitcher,\n renderMonthElement,\n} from './components';\nimport { DSDatePickerImpl } from './components/DSDatePickerImpl';\nimport { DSDatePickerController } from './components/DatePickerController/DatePickerController';\nimport { PickerPropsTypes, Picker } from './components/DatePickerPicker/DatePickerPicker';\n\ninterface DSDatePickerPropsType {\n containerProps: {};\n id: string;\n appendToBody: boolean;\n className: string;\n date: any;\n value: any;\n placeholder: string;\n disabled: boolean;\n required: boolean;\n readOnly: boolean;\n hasError: boolean;\n screenReaderInputMessage: boolean;\n enableOutsideDays: boolean;\n initialVisibleMonth: moment.Moment;\n firstDayOfWeek: number;\n keepOpenOnDateSelect: boolean;\n hideKeyboardShortcutsPanel: boolean;\n onChange: () => void;\n onDateChange: undefined | (() => void);\n onPrevMonthClick: () => void;\n onNextMonthClick: () => void;\n onClose: () => void;\n onFocus: () => void;\n onBlur: () => void;\n phrases: SingleDatePickerPhrases;\n displayFormat: boolean;\n displayFormatDay: boolean;\n transitionDuration: number;\n verticalSpacing: number;\n isDayBlocked: () => boolean;\n isOutsideRange: () => boolean;\n isDayHighlighted: () => boolean;\n numberOfMonths: number;\n openDirection: boolean;\n tabIndex: boolean;\n zIndex: boolean;\n pickerProps: {};\n calendarProps: {};\n autoClear: boolean;\n focusCurrentDate: boolean;\n}\ntype DSDatePickerType = React.ComponentType<DSDatePickerPropsType>;\n\nconst DSDatePicker: DSDatePickerType = ({\n containerProps = {},\n id = '',\n appendToBody = true,\n className = '',\n date,\n value,\n placeholder = '',\n disabled = false,\n required = false,\n readOnly = false,\n hasError = false,\n screenReaderInputMessage = 'Select date',\n enableOutsideDays = true,\n initialVisibleMonth = moment(),\n firstDayOfWeek = 0,\n keepOpenOnDateSelect = false,\n hideKeyboardShortcutsPanel = true,\n onChange = () => null,\n onDateChange = undefined,\n onPrevMonthClick = () => null,\n onNextMonthClick = () => null,\n onClose = () => null,\n onFocus = () => null,\n onBlur = () => null,\n phrases = SingleDatePickerPhrases,\n displayFormat = 'L',\n displayFormatDay = 'D',\n transitionDuration = 0,\n verticalSpacing = 0,\n isDayBlocked = () => false,\n isOutsideRange = () => false,\n isDayHighlighted = () => false,\n numberOfMonths = 1,\n openDirection = 'down',\n tabIndex = '',\n zIndex = 1,\n pickerProps = {},\n calendarProps = {},\n autoClear = false,\n focusCurrentDate = false,\n}) => {\n const { cssClassName } = convertPropToCssClassName('datepicker', className, {\n hasError,\n readOnly,\n disabled,\n id,\n });\n const safeDate = date || value;\n return (\n <div className={cssClassName} {...containerProps} style={{ minWidth: '140px' }}>\n <DSDatePickerImpl\n appendToBody={appendToBody}\n autoClear={autoClear}\n date={safeDate}\n disabled={disabled}\n displayFormat={displayFormat}\n displayFormatDay={displayFormatDay}\n enableOutsideDays={enableOutsideDays}\n firstDayOfWeek={firstDayOfWeek}\n hideKeyboardShortcutsPanel={hideKeyboardShortcutsPanel}\n initialVisibleMonth={() => (initialVisibleMonth ? moment(initialVisibleMonth) : moment(safeDate))}\n isDayBlocked={isDayBlocked}\n isDayHighlighted={isDayHighlighted}\n isOutsideRange={isOutsideRange === true || isOutsideRange === false ? () => isOutsideRange : isOutsideRange}\n keepOpenOnDateSelect={keepOpenOnDateSelect}\n numberOfMonths={numberOfMonths}\n onBlur={onBlur}\n onClose={onClose}\n onChange={onChange}\n onDateChange={(...args) => {\n if (onDateChange) onDateChange(...args);\n }}\n onFocus={onFocus}\n onNextMonthClick={onNextMonthClick}\n onPrevMonthClick={onPrevMonthClick}\n openDirection={openDirection}\n phrases={phrases}\n placeholder={placeholder}\n readOnly={readOnly}\n required={required}\n screenReaderInputMessage={screenReaderInputMessage}\n transitionDuration={transitionDuration}\n value={safeDate}\n verticalSpacing={verticalSpacing}\n tabIndex={tabIndex}\n zIndex={zIndex}\n pickerProps={pickerProps}\n calendarProps={calendarProps}\n focusCurrentDate={focusCurrentDate}\n />\n </div>\n );\n};\n\nconst datePickerProps = {\n containerProps: PropTypes.shape({}).description('Set of Properties attached to the main container'),\n id: PropTypes.string.description('components id'),\n appendToBody: PropTypes.bool.description('append component to body or not').defaultValue(true),\n className: PropTypes.string.description('html class attribute'),\n date: PropTypes.instanceOf(Date, moment).description('selected date').defaultValue(undefined),\n value: PropTypes.instanceOf(Date, moment).description('value'),\n placeholder: PropTypes.string.description('input placeholder value'),\n autoClear: PropTypes.bool\n .description('autoclears the input onblur if the date is not completely set')\n .defaultValue(false),\n disabled: PropTypes.bool.description('disable component or not').defaultValue(false),\n required: PropTypes.bool.description('value is required or not').defaultValue(false),\n readOnly: PropTypes.bool.description('is read only or not').defaultValue(false),\n hasError: PropTypes.bool.description('set error state').defaultValue(false),\n screenReaderInputMessage: PropTypes.string\n .description('message to anounce by screen reader')\n .defaultValue('select date'),\n enableOutsideDays: PropTypes.bool.description('enable days oustide month or not').defaultValue(true),\n initialVisibleMonth: PropTypes.instanceOf(Date, moment).description('initial month to display'),\n firstDayOfWeek: PropTypes.number.description('first day of week').defaultValue(0),\n keepOpenOnDateSelect: PropTypes.bool.description('keep picker open when a date is selected').defaultValue(false),\n hideKeyboardShortcutsPanel: PropTypes.bool.description('hide keyabord shortcut panel or not').defaultValue(true),\n onChange: PropTypes.func.description(\n `\n function executed when input changes. This could trigger with invalid dates. It returns a string and a moment\n if the date is valid.\n `,\n ),\n onDateChange: PropTypes.func.description(\n 'function executed when date changes. This doesnt trigger with invalid dates. It returns a moment object',\n ),\n onPrevMonthClick: PropTypes.func.description('function executed when clicking on prev month button'),\n onNextMonthClick: PropTypes.func.description('function executed when clicking on next month button'),\n onBlur: PropTypes.func.description('function executed when component loses focus'),\n onClose: PropTypes.func.description('function executed when component closes'),\n onFocus: PropTypes.func.description('function executed when component gains focus'),\n phrases: PropTypes.shape({\n calendarLabel: PropTypes.string,\n closeDatePicker: PropTypes.string,\n clearDates: PropTypes.string,\n focusStartDate: PropTypes.string,\n jumpToPrevMonth: PropTypes.string,\n jumpToNextMonth: PropTypes.string,\n keyboardShortcuts: PropTypes.string,\n showKeyboardShortcutsPanel: PropTypes.string,\n hideKeyboardShortcutsPanel: PropTypes.string,\n openThisPanel: PropTypes.string,\n enterKey: PropTypes.string,\n leftArrowRightArrow: PropTypes.string,\n upArrowDownArrow: PropTypes.string,\n pageUpPageDown: PropTypes.string,\n homeEnd: PropTypes.string,\n escape: PropTypes.string,\n questionMark: PropTypes.string,\n selectFocusedDate: PropTypes.string,\n moveFocusByOneDay: PropTypes.string,\n moveFocusByOneWeek: PropTypes.string,\n moveFocusByOneMonth: PropTypes.string,\n moveFocustoStartAndEndOfWeek: PropTypes.string,\n returnFocusToInput: PropTypes.string,\n keyboardNavigationInstructions: PropTypes.string,\n chooseAvailableStartDate: PropTypes.func,\n chooseAvailableEndDate: PropTypes.func,\n dateIsUnavailable: PropTypes.func,\n dateIsSelected: PropTypes.func,\n })\n .description('react-dates phrases')\n .defaultValue(SingleDatePickerPhrases),\n displayFormat: PropTypes.string.description('display format').defaultValue('L'),\n displayFormatDay: PropTypes.string.description('display format day').defaultValue('D'),\n transitionDuration: PropTypes.number.description('transition duration').defaultValue(0),\n verticalSpacing: PropTypes.number.description('vertical spacing'),\n isDayBlocked: PropTypes.func.description('function that returns each day and disables desired dates'),\n isOutsideRange: PropTypes.func.description('function that returns each day and disables outisde range dates'),\n isDayHighlighted: PropTypes.func.description('function that returns each day and higlights desired dates'),\n numberOfMonths: PropTypes.number.description('amount of months'),\n openDirection: PropTypes.string.description('open direction of the popup').defaultValue('down'),\n tabIndex: PropTypes.number.description('overrides tab index of the element'),\n zIndex: PropTypes.string.description('overrides z-index of the element'),\n pickerProps: PropTypes.shape(PickerPropsTypes).description('props to be passed to the picker container'),\n calendarProps: PropTypes.shape({ tabIndex: PropTypes.number }).description(\n 'props to be passes to the calendar container',\n ),\n focusCurrentDate: PropTypes.bool.description('Wheter to focus current date on calendar').defaultValue(false),\n};\n\nDSDatePicker.propTypes = datePickerProps;\n\nconst DatePickerWithSchema = describe(DSDatePicker);\nDatePickerWithSchema.propTypes = datePickerProps;\n\nexport {\n DatePickerNavigation,\n DatePickerDay,\n DatePickerPicker,\n DSDatePickerController,\n DatePickerDropdown,\n DatePickerSingleDate,\n DatePickerHeader,\n DatePickerRange,\n DatePickerRangeHeader,\n SingleRangeDateSwitcher,\n Picker,\n renderMonthElement,\n DatePickerWithSchema,\n};\n\nexport { DSDatePicker };\nexport default DSDatePicker;\n"],
5
+ "mappings": "AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA;AACA;AACA;AA8CA,MAAM,eAAiC,CAAC;AAAA,EACtC,iBAAiB;AAAA,EACjB,KAAK;AAAA,EACL,eAAe;AAAA,EAC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