@televet/kibble-ui 3.0.13-franklin-1 → 3.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{alert.component-08e02a01.js → alert.component-4d48d218.js} +2 -2
- package/build/{alert.component-08e02a01.js.map → alert.component-4d48d218.js.map} +1 -1
- package/build/{avatar.component-92acde54.js → avatar.component-dd61be1f.js} +2 -2
- package/build/{avatar.component-92acde54.js.map → avatar.component-dd61be1f.js.map} +1 -1
- package/build/avatarGroup.component-50a37594.js +2 -0
- package/build/{avatarGroup.component-2e4d7707.js.map → avatarGroup.component-50a37594.js.map} +1 -1
- package/build/button.component-15b49687.js +2 -0
- package/build/{button.component-c427cfcc.js.map → button.component-15b49687.js.map} +1 -1
- package/build/chakra/index.js +1 -1
- package/build/{chakra-ui-modal.esm-8092955a.js → chakra-ui-modal.esm-2c76cb7b.js} +2 -2
- package/build/{chakra-ui-modal.esm-8092955a.js.map → chakra-ui-modal.esm-2c76cb7b.js.map} +1 -1
- package/build/{chakra-ui-skeleton.esm-521bb4b7.js → chakra-ui-skeleton.esm-93e41d9f.js} +2 -2
- package/build/{chakra-ui-skeleton.esm-521bb4b7.js.map → chakra-ui-skeleton.esm-93e41d9f.js.map} +1 -1
- package/build/{checkbox.component-ff4a4003.js → checkbox.component-ca33f17c.js} +2 -2
- package/build/{checkbox.component-ff4a4003.js.map → checkbox.component-ca33f17c.js.map} +1 -1
- package/build/checkboxGroup.component-7a918704.js +2 -0
- package/build/{checkboxGroup.component-1d74ce5c.js.map → checkboxGroup.component-7a918704.js.map} +1 -1
- package/build/{color.record-cc264e0d.js → color.record-f5dba322.js} +2 -2
- package/build/{color.record-cc264e0d.js.map → color.record-f5dba322.js.map} +1 -1
- package/build/components/Alert/index.js +1 -1
- package/build/components/Avatar/index.js +1 -1
- package/build/components/AvatarGroup/index.js +1 -1
- package/build/components/Button/index.js +1 -1
- package/build/components/Checkbox/index.js +1 -1
- package/build/components/CheckboxGroup/index.js +1 -1
- package/build/components/DatePicker/index.js +1 -1
- package/build/components/Icon/index.js +1 -1
- package/build/components/Link/index.js +1 -1
- package/build/components/Menu/components/MenuButton/index.js +1 -1
- package/build/components/Menu/components/MenuItem/index.js +1 -1
- package/build/components/Menu/components/MenuList/index.js +1 -1
- package/build/components/Menu/index.js +1 -1
- package/build/components/Modal/components/ModalBody/index.js +1 -1
- package/build/components/Modal/components/ModalCloseButton/index.js +1 -1
- package/build/components/Modal/components/ModalExpandButton/index.js +1 -1
- package/build/components/Modal/components/ModalFooter/index.js +1 -1
- package/build/components/Modal/components/ModalFooterButtons/index.js +1 -1
- package/build/components/Modal/components/ModalHeader/index.js +1 -1
- package/build/components/Modal/index.js +1 -1
- package/build/components/Popover/components/PopoverFooter/index.js +1 -1
- package/build/components/Popover/components/PopoverHeader/index.js +1 -1
- package/build/components/Popover/index.js +1 -1
- package/build/components/RadioButtonGroup/index.js +1 -1
- package/build/components/RadioGroup/index.js +1 -1
- package/build/components/Select/index.js +1 -1
- package/build/components/SortableList/components/DragHandle/index.js +1 -1
- package/build/components/SortableList/index.js +1 -1
- package/build/components/Switch/index.js +1 -1
- package/build/components/Tabs/components/Tab/index.js +1 -1
- package/build/components/Tabs/index.js +1 -1
- package/build/components/TabsLayout/index.js +1 -1
- package/build/components/TextInput/index.js +1 -1
- package/build/components/Textarea/index.js +1 -1
- package/build/components/TimePicker/index.js +1 -1
- package/build/components/TimeRange/index.js +1 -1
- package/build/components/Toast/index.js +1 -1
- package/build/components/index.js +1 -1
- package/build/{conversationCard.component-461817c2.js → conversationCard.component-8cf3cb66.js} +2 -2
- package/build/{conversationCard.component-461817c2.js.map → conversationCard.component-8cf3cb66.js.map} +1 -1
- package/build/{datepicker.component-99f9007e.js → datepicker.component-c38c1102.js} +2 -2
- package/build/{datepicker.component-99f9007e.js.map → datepicker.component-c38c1102.js.map} +1 -1
- package/build/dragHandle.component-87559e3a.js +2 -0
- package/build/{dragHandle.component-4180e134.js.map → dragHandle.component-87559e3a.js.map} +1 -1
- package/build/{icon.component-8fca09a3.js → icon.component-8d0ca544.js} +1 -1
- package/build/{icon.component-8fca09a3.js.map → icon.component-8d0ca544.js.map} +1 -1
- package/build/icons/index.d.ts +1 -1
- package/build/icons/index.js +1 -1
- package/build/icons/index.js.map +1 -1
- package/build/{index-c47ce06b.js → index-8fecff45.js} +1 -1
- package/build/{index-c47ce06b.js.map → index-8fecff45.js.map} +1 -1
- package/build/index.js +1 -1
- package/build/{link.component-a60b8009.js → link.component-a45bd0f4.js} +2 -2
- package/build/{link.component-a60b8009.js.map → link.component-a45bd0f4.js.map} +1 -1
- package/build/{menu.component-76107342.js → menu.component-6addfd4a.js} +2 -2
- package/build/{menu.component-76107342.js.map → menu.component-6addfd4a.js.map} +1 -1
- package/build/{menuButton.component-12b5fa03.js → menuButton.component-4552e39b.js} +2 -2
- package/build/{menuButton.component-12b5fa03.js.map → menuButton.component-4552e39b.js.map} +1 -1
- package/build/{menuItem.component-d31b4803.js → menuItem.component-5d94368e.js} +2 -2
- package/build/{menuItem.component-d31b4803.js.map → menuItem.component-5d94368e.js.map} +1 -1
- package/build/{menuList.component-d7f4a7ff.js → menuList.component-1f658cfe.js} +2 -2
- package/build/{menuList.component-d7f4a7ff.js.map → menuList.component-1f658cfe.js.map} +1 -1
- package/build/{modalBody.component-bbf482ce.js → modalBody.component-64a6b636.js} +2 -2
- package/build/{modalBody.component-bbf482ce.js.map → modalBody.component-64a6b636.js.map} +1 -1
- package/build/modalCloseButton.component-b8750057.js +2 -0
- package/build/{modalCloseButton.component-3e2893c2.js.map → modalCloseButton.component-b8750057.js.map} +1 -1
- package/build/{modalExpandButton.component-b2298efc.js → modalExpandButton.component-e82f4fca.js} +2 -2
- package/build/{modalExpandButton.component-b2298efc.js.map → modalExpandButton.component-e82f4fca.js.map} +1 -1
- package/build/{modalFooter.component-15697294.js → modalFooter.component-87129be4.js} +2 -2
- package/build/{modalFooter.component-15697294.js.map → modalFooter.component-87129be4.js.map} +1 -1
- package/build/{modalFooterButtons.component-ff5a744a.js → modalFooterButtons.component-43364bf5.js} +2 -2
- package/build/{modalFooterButtons.component-ff5a744a.js.map → modalFooterButtons.component-43364bf5.js.map} +1 -1
- package/build/{modalHeader.component-cd4f489b.js → modalHeader.component-5876efa7.js} +2 -2
- package/build/{modalHeader.component-cd4f489b.js.map → modalHeader.component-5876efa7.js.map} +1 -1
- package/build/patterns/ConversationCard/index.js +1 -1
- package/build/patterns/StyledAvatar/index.js +1 -1
- package/build/patterns/TagBlock/index.js +1 -1
- package/build/patterns/index.js +1 -1
- package/build/{popover.component-1f2af454.js → popover.component-902fefb6.js} +2 -2
- package/build/{popover.component-1f2af454.js.map → popover.component-902fefb6.js.map} +1 -1
- package/build/{popoverFooter.component-ce63a294.js → popoverFooter.component-c68647aa.js} +2 -2
- package/build/{popoverFooter.component-ce63a294.js.map → popoverFooter.component-c68647aa.js.map} +1 -1
- package/build/{popoverHeader.component-d397c037.js → popoverHeader.component-8d58bacd.js} +2 -2
- package/build/{popoverHeader.component-d397c037.js.map → popoverHeader.component-8d58bacd.js.map} +1 -1
- package/build/{radioGroup.component-f070a4be.js → radioGroup.component-32f61d36.js} +2 -2
- package/build/{radioGroup.component-f070a4be.js.map → radioGroup.component-32f61d36.js.map} +1 -1
- package/build/{select.component-180e4c49.js → select.component-455fdcbd.js} +2 -2
- package/build/{select.component-180e4c49.js.map → select.component-455fdcbd.js.map} +1 -1
- package/build/{styledAvatar.types-ce7a7adb.js → styledAvatar.types-2540b39f.js} +2 -2
- package/build/{styledAvatar.types-ce7a7adb.js.map → styledAvatar.types-2540b39f.js.map} +1 -1
- package/build/{switch.component-502828b6.js → switch.component-b10c0f86.js} +2 -2
- package/build/{switch.component-502828b6.js.map → switch.component-b10c0f86.js.map} +1 -1
- package/build/{tab.component-f8d9cbe2.js → tab.component-bf82a8a4.js} +2 -2
- package/build/{tab.component-f8d9cbe2.js.map → tab.component-bf82a8a4.js.map} +1 -1
- package/build/{tabs.component-4cc8d121.js → tabs.component-7130dcff.js} +2 -2
- package/build/{tabs.component-4cc8d121.js.map → tabs.component-7130dcff.js.map} +1 -1
- package/build/{tabsLayout.component-ce3d001f.js → tabsLayout.component-87f867f4.js} +2 -2
- package/build/{tabsLayout.component-ce3d001f.js.map → tabsLayout.component-87f867f4.js.map} +1 -1
- package/build/{tagBlock.component-b656f24e.js → tagBlock.component-995091dd.js} +2 -2
- package/build/{tagBlock.component-b656f24e.js.map → tagBlock.component-995091dd.js.map} +1 -1
- package/build/{textInput.component-03cdf2a9.js → textInput.component-daebc8ef.js} +2 -2
- package/build/{textInput.component-03cdf2a9.js.map → textInput.component-daebc8ef.js.map} +1 -1
- package/build/{textarea.component-e62b5ac2.js → textarea.component-4975fe4e.js} +2 -2
- package/build/{textarea.component-e62b5ac2.js.map → textarea.component-4975fe4e.js.map} +1 -1
- package/build/theme/index.js +1 -1
- package/build/theme/tokens/colors/index.js +1 -1
- package/build/theme/tokens/index.js +1 -1
- package/build/{theme.provider-774244a4.js → theme.provider-6802032a.js} +2 -2
- package/build/{theme.provider-774244a4.js.map → theme.provider-6802032a.js.map} +1 -1
- package/build/{timePicker.component-c5df3bfb.js → timePicker.component-6265ee22.js} +2 -2
- package/build/{timePicker.component-c5df3bfb.js.map → timePicker.component-6265ee22.js.map} +1 -1
- package/build/{timeRange.component-78df9aac.js → timeRange.component-a5b363c7.js} +2 -2
- package/build/{timeRange.component-78df9aac.js.map → timeRange.component-a5b363c7.js.map} +1 -1
- package/build/{useExpandButton-9cffadc3.js → useExpandButton-478244d5.js} +2 -2
- package/build/{useExpandButton-9cffadc3.js.map → useExpandButton-478244d5.js.map} +1 -1
- package/build/{useToast-567c9d25.js → useToast-6a6f0bf3.js} +2 -2
- package/build/{useToast-567c9d25.js.map → useToast-6a6f0bf3.js.map} +1 -1
- package/build/{withFormControl-7a1e24fb.js → withFormControl-a4a73b4d.js} +2 -2
- package/build/{withFormControl-7a1e24fb.js.map → withFormControl-a4a73b4d.js.map} +1 -1
- package/package.json +1 -1
- package/build/avatarGroup.component-2e4d7707.js +0 -2
- package/build/button.component-c427cfcc.js +0 -2
- package/build/checkboxGroup.component-1d74ce5c.js +0 -2
- package/build/dragHandle.component-4180e134.js +0 -2
- package/build/icons/FormsFilled.d.ts +0 -10
- package/build/modalCloseButton.component-3e2893c2.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datepicker.component-99f9007e.js","sources":["../node_modules/date-fns/esm/addDays/index.js","../node_modules/date-fns/esm/addMonths/index.js","../node_modules/date-fns/esm/add/index.js","../node_modules/date-fns/esm/isAfter/index.js","../src/components/DatePicker/context/datepicker.provider.tsx","../node_modules/date-fns/esm/endOfDay/index.js","../node_modules/lodash/_baseRange.js","../node_modules/lodash/eq.js","../node_modules/lodash/isObject.js","../node_modules/lodash/isFunction.js","../node_modules/lodash/isLength.js","../node_modules/lodash/isArrayLike.js","../node_modules/lodash/_isIndex.js","../node_modules/lodash/_isIterateeCall.js","../node_modules/lodash/_trimmedEndIndex.js","../node_modules/lodash/_baseTrim.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/isSymbol.js","../node_modules/lodash/toNumber.js","../node_modules/lodash/toFinite.js","../node_modules/lodash/_createRange.js","../node_modules/lodash/range.js","../src/components/DatePicker/datepicker.records.ts","../node_modules/date-fns/esm/getDaysInMonth/index.js","../node_modules/date-fns/esm/setMonth/index.js","../node_modules/date-fns/esm/set/index.js","../src/components/DatePicker/components/Header/header.component.tsx","../src/components/DatePicker/datepicker.utils.ts","../node_modules/date-fns/esm/isBefore/index.js","../src/components/DatePicker/components/Input/input.component.tsx","../src/components/DatePicker/components/Calendar/Day/day.config.tsx","../src/components/DatePicker/components/Calendar/Day/day.component.tsx","../src/components/DatePicker/components/Calendar/Month/month.component.tsx","../src/components/DatePicker/components/Calendar/calendar.component.tsx","../src/components/DatePicker/components/Footer/footer.component.tsx","../src/components/DatePicker/datepicker.component.tsx"],"sourcesContent":["import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\n\nexport default function addDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n date.setDate(date.getDate() + amount);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\n\nexport default function addMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n\n var endOfDesiredMonth = new Date(date.getTime());\n endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n var daysInMonth = endOfDesiredMonth.getDate();\n\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n return date;\n }\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport addDays from \"../addDays/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n\n/**\n * @name add\n * @category Common Helpers\n * @summary Add the specified years, months, weeks, days, hours, minutes and seconds to the given date.\n *\n * @description\n * Add the specified years, months, weeks, days, hours, minutes and seconds to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Duration} duration - the object with years, months, weeks, days, hours, minutes and seconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n *\n * | Key | Description |\n * |----------------|------------------------------------|\n * | years | Amount of years to be added |\n * | months | Amount of months to be added |\n * | weeks | Amount of weeks to be added |\n * | days | Amount of days to be added |\n * | hours | Amount of hours to be added |\n * | minutes | Amount of minutes to be added |\n * | seconds | Amount of seconds to be added |\n *\n * All values default to 0\n *\n * @returns {Date} the new date with the seconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add the following duration to 1 September 2014, 10:19:50\n * const result = add(new Date(2014, 8, 1, 10, 19, 50), {\n * years: 2,\n * months: 9,\n * weeks: 1,\n * days: 7,\n * hours: 5,\n * minutes: 9,\n * seconds: 30,\n * })\n * //=> Thu Jun 15 2017 15:29:20\n */\nexport default function add(dirtyDate, duration) {\n requiredArgs(2, arguments);\n if (!duration || _typeof(duration) !== 'object') return new Date(NaN);\n var years = duration.years ? toInteger(duration.years) : 0;\n var months = duration.months ? toInteger(duration.months) : 0;\n var weeks = duration.weeks ? toInteger(duration.weeks) : 0;\n var days = duration.days ? toInteger(duration.days) : 0;\n var hours = duration.hours ? toInteger(duration.hours) : 0;\n var minutes = duration.minutes ? toInteger(duration.minutes) : 0;\n var seconds = duration.seconds ? toInteger(duration.seconds) : 0; // Add years and months\n\n var date = toDate(dirtyDate);\n var dateWithMonths = months || years ? addMonths(date, months + years * 12) : date; // Add weeks and days\n\n var dateWithDays = days || weeks ? addDays(dateWithMonths, days + weeks * 7) : dateWithMonths; // Add days, hours, minutes and seconds\n\n var minutesToAdd = minutes + hours * 60;\n var secondsToAdd = seconds + minutesToAdd * 60;\n var msToAdd = secondsToAdd * 1000;\n var finalDate = new Date(dateWithDays.getTime() + msToAdd);\n return finalDate;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param {Date|Number} date - the date that should be after the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is after the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\n\nexport default function isAfter(dirtyDate, dirtyDateToCompare) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dateToCompare = toDate(dirtyDateToCompare);\n return date.getTime() > dateToCompare.getTime();\n}","import React, { RefObject, useCallback, useEffect, useMemo, useState } from 'react';\nimport { Popover, useDisclosure } from '@chakra-ui/react';\nimport { DatePickerProps } from '../datepicker.component';\nimport { useDatepicker } from '@datepicker-react/hooks';\nimport {\n DatePickerContext,\n defaultDateFormat,\n defaultFocusedDate,\n defaultMaxYear,\n defaultMinYear,\n FocusedInput,\n today,\n} from './datepicker.context';\nimport startOfDay from 'date-fns/startOfDay';\nimport endOfDay from 'date-fns/endOfDay';\nimport add from 'date-fns/add';\nimport isAfter from 'date-fns/isAfter';\n\ntype DatePickerProviderProps = DatePickerProps & {\n children: React.ReactNode;\n calendarRef: RefObject<HTMLDivElement>;\n};\n\ninterface DatePickerInternalState {\n startDate: Date | null;\n endDate: Date | null;\n focusedInput: FocusedInput | null;\n}\n\nexport const DatePickerProvider = ({\n children,\n dateFormat = defaultDateFormat,\n endDate,\n inputProps,\n isDateRange,\n maxDate,\n maxYear,\n maxDaysInRange,\n minDate,\n minYear,\n onDateChange,\n placement,\n startDate,\n}: DatePickerProviderProps): JSX.Element => {\n const { onOpen, onClose, isOpen } = useDisclosure();\n const [state, setState] = useState<DatePickerInternalState>({\n startDate,\n endDate: endDate || startDate,\n focusedInput: null,\n });\n\n /**\n * Calculates the max booking date based on the following criteria:\n * _maxDaysInRange_\n * * should only ever be used by date ranges\n * * should take precedence over the maxDate value\n * * should use it's value plus the start date of the range to calculate the max date\n * _maxDate_\n * * can be passed to either a single date input or a date range\n * * if provided it will be ignored if maxDaysInRange is passed\n * If neither of these values is specified return undefined\n */\n const getMaxBookingDate = useCallback(\n (startDate) => {\n if (maxDaysInRange && startDate) {\n return add(startDate, { days: maxDaysInRange });\n } else if (maxDate) {\n return maxDate;\n }\n\n return;\n },\n [maxDate, maxDaysInRange],\n );\n\n const onDatesChange = (data: DatePickerInternalState): void => {\n if (!data) {\n return;\n }\n\n // Default the end date to the start date if no value is provided\n if (!data.endDate) {\n data.endDate = data.startDate;\n }\n\n // If end date exceeds new max booking date, reset the end date value\n const _maxBookingDate = getMaxBookingDate(data.startDate);\n if (data.endDate && _maxBookingDate && isAfter(data.endDate, _maxBookingDate)) {\n data.endDate = null;\n }\n\n // Set the start date to start of day and end date to end of day to create a range\n data.startDate = data.startDate ? startOfDay(data.startDate) : data.startDate;\n data.endDate = data.endDate ? endOfDay(data.endDate) : data.endDate;\n\n setState({ ...data, focusedInput: data.focusedInput || FocusedInput.StartDate });\n if (!isDateRange && onDateChange) {\n onDateChange(data);\n }\n };\n\n const clearDates = useCallback(() => {\n setState({ startDate: null, endDate: null, focusedInput: isOpen ? FocusedInput.StartDate : null });\n }, [isOpen]);\n\n const {\n activeMonths,\n firstDayOfWeek,\n focusedDate,\n goToDate,\n goToNextMonths,\n goToPreviousMonths,\n isDateBlocked,\n isDateFocused,\n isDateHovered,\n isDateSelected,\n isFirstOrLastSelectedDate,\n onDateFocus,\n onDateHover,\n onDateSelect,\n } = useDatepicker({\n endDate: state.endDate,\n focusedInput: state.focusedInput,\n initialVisibleMonth: state.startDate || today,\n // Only show max disabled dates for date range when focused on end date input\n maxBookingDate:\n isDateRange && state.focusedInput === FocusedInput.StartDate ? undefined : getMaxBookingDate(state.startDate),\n minBookingDate: minDate,\n minBookingDays: 1,\n numberOfMonths: 1,\n onDatesChange,\n startDate: state.startDate,\n ...(!isDateRange && { exactMinBookingDays: true }),\n });\n\n const navigateToFocusedInputDate = useCallback(\n (focusedInput: FocusedInput | null) => {\n if (focusedInput === FocusedInput.EndDate && state.endDate) {\n goToDate(state.endDate);\n } else if (state.startDate) {\n goToDate(state.startDate);\n }\n },\n [goToDate, state.endDate, state.startDate],\n );\n\n const setFocusedInput = useCallback(\n (focusedInput: FocusedInput | null): void => {\n setState((prevState) => ({ ...prevState, focusedInput }));\n navigateToFocusedInputDate(focusedInput);\n },\n [navigateToFocusedInputDate],\n );\n\n const handleOpen = (): void => {\n if (inputProps?.isDisabled) return;\n\n onOpen();\n\n // Default to start date input on open if no start date value has been set\n if (!state.startDate || !isDateRange) {\n setFocusedInput(FocusedInput.StartDate);\n }\n };\n\n const handleClose = useCallback((): void => {\n setFocusedInput(null);\n onClose();\n\n if (isDateRange && onDateChange) {\n setTimeout(() => {\n onDateChange({ startDate: state.startDate, endDate: state.endDate });\n }, 200);\n }\n }, [isDateRange, onClose, onDateChange, setFocusedInput, state.endDate, state.startDate]);\n\n const activeMonth = useMemo(() => activeMonths[0], [activeMonths]);\n\n // Listen for external changes to start and end dates and update internal state\n useEffect(() => {\n setState((prevState) => ({ ...prevState, startDate, endDate: endDate || startDate }));\n }, [startDate, endDate]);\n\n return (\n <DatePickerContext.Provider\n value={{\n activeMonth,\n activeMonths,\n dateFormat: dateFormat || defaultDateFormat,\n endDate: state.endDate || null,\n firstDayOfWeek,\n focusedDate: focusedDate || defaultFocusedDate,\n focusedInput: state.focusedInput,\n goToDate,\n goToNextMonths,\n goToPreviousMonths,\n setFocusedInput,\n isDateBlocked,\n isDateFocused,\n isDateHovered,\n isDateRange: isDateRange || false,\n isDateSelected,\n isFirstOrLastSelectedDate,\n maxDate,\n maxYear: maxYear || defaultMaxYear,\n minDate,\n minYear: minYear || defaultMinYear,\n onDateChange,\n onDateFocus,\n onDateHover,\n onDateSelect,\n startDate: state.startDate,\n isOpen,\n onOpen,\n onClose: handleClose,\n clearDates,\n }}\n >\n <Popover isOpen={isOpen} onClose={handleClose} onOpen={handleOpen} placement={placement}>\n {children}\n </Popover>\n </DatePickerContext.Provider>\n );\n};\n","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\n\nexport default function endOfDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setHours(23, 59, 59, 999);\n return date;\n}","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nfunction baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n}\n\nmodule.exports = baseRange;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","var baseRange = require('./_baseRange'),\n isIterateeCall = require('./_isIterateeCall'),\n toFinite = require('./toFinite');\n\n/**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\nfunction createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n}\n\nmodule.exports = createRange;\n","var createRange = require('./_createRange');\n\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\nvar range = createRange();\n\nmodule.exports = range;\n","import { IconSize } from '../Icon/icon.types';\nimport { FormControlSize } from 'shared/types/formControl';\n\nexport const IconSizeMap: Record<FormControlSize, IconSize> = {\n sm: 'sm',\n md: 'md',\n lg: 'lg',\n};\n\nexport const monthNames = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n];\n","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the number of days in a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\n\nexport default function getDaysInMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var monthIndex = date.getMonth();\n var lastDayOfMonth = new Date(0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport getDaysInMonth from \"../getDaysInMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} month - the month of the new date\n * @returns {Date} the new date with the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\n\nexport default function setMonth(dirtyDate, dirtyMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var month = toInteger(dirtyMonth);\n var year = date.getFullYear();\n var day = date.getDate();\n var dateWithDesiredMonth = new Date(0);\n dateWithDesiredMonth.setFullYear(year, month, 15);\n dateWithDesiredMonth.setHours(0, 0, 0, 0);\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth); // Set the last day of the new month\n // if the original date was the last day of the longer month\n\n date.setMonth(month, Math.min(day, daysInMonth));\n return date;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport toDate from \"../toDate/index.js\";\nimport setMonth from \"../setMonth/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n\n/**\n * @name set\n * @category Common Helpers\n * @summary Set date values to a given date.\n *\n * @description\n * Set date values to a given date.\n *\n * Sets time values to date from object `values`.\n * A value is not set if it is undefined or null or doesn't exist in `values`.\n *\n * Note about bundle size: `set` does not internally use `setX` functions from date-fns but instead opts\n * to use native `Date#setX` methods. If you use this function, you may not want to include the\n * other `setX` functions that date-fns provides if you are concerned about the bundle size.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Object} values - an object with options\n * @param {Number} [values.year] - the number of years to be set\n * @param {Number} [values.month] - the number of months to be set\n * @param {Number} [values.date] - the number of days to be set\n * @param {Number} [values.hours] - the number of hours to be set\n * @param {Number} [values.minutes] - the number of minutes to be set\n * @param {Number} [values.seconds] - the number of seconds to be set\n * @param {Number} [values.milliseconds] - the number of milliseconds to be set\n * @returns {Date} the new date with options set\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `values` must be an object\n *\n * @example\n * // Transform 1 September 2014 into 20 October 2015 in a single line:\n * const result = set(new Date(2014, 8, 20), { year: 2015, month: 9, date: 20 })\n * //=> Tue Oct 20 2015 00:00:00\n *\n * @example\n * // Set 12 PM to 1 September 2014 01:23:45 to 1 September 2014 12:00:00:\n * const result = set(new Date(2014, 8, 1, 1, 23, 45), { hours: 12 })\n * //=> Mon Sep 01 2014 12:23:45\n */\nexport default function set(dirtyDate, values) {\n requiredArgs(2, arguments);\n\n if (_typeof(values) !== 'object' || values === null) {\n throw new RangeError('values parameter must be an object');\n }\n\n var date = toDate(dirtyDate); // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n\n if (isNaN(date.getTime())) {\n return new Date(NaN);\n }\n\n if (values.year != null) {\n date.setFullYear(values.year);\n }\n\n if (values.month != null) {\n date = setMonth(date, values.month);\n }\n\n if (values.date != null) {\n date.setDate(toInteger(values.date));\n }\n\n if (values.hours != null) {\n date.setHours(toInteger(values.hours));\n }\n\n if (values.minutes != null) {\n date.setMinutes(toInteger(values.minutes));\n }\n\n if (values.seconds != null) {\n date.setSeconds(toInteger(values.seconds));\n }\n\n if (values.milliseconds != null) {\n date.setMilliseconds(toInteger(values.milliseconds));\n }\n\n return date;\n}","import { Menu } from 'components/Menu/menu.component';\nimport { MenuItemProps } from 'components/Menu/components/MenuItem/menuItem.component';\nimport range from 'lodash/range';\nimport { Button } from 'components/Button/button.component';\nimport { monthNames } from 'components/DatePicker/datepicker.records';\nimport { set } from 'date-fns';\nimport React, { useMemo } from 'react';\nimport { PopoverHeader, HStack, Center } from '@chakra-ui/react';\nimport { today, useDatePickerContext } from 'components/DatePicker/context/datepicker.context';\n\ninterface DatePickerHeaderProps {\n scrollToYear: () => void;\n}\n\nexport function DatePickerHeader({ scrollToYear }: DatePickerHeaderProps): JSX.Element {\n const { focusedDate, activeMonth, minYear, maxYear, goToDate, goToNextMonths, goToPreviousMonths } =\n useDatePickerContext();\n\n const monthMenuItems = useMemo(\n () =>\n monthNames.map((month, index) => ({\n label: month,\n value: String(index),\n isSelected: index === activeMonth?.month,\n })),\n [activeMonth?.month],\n );\n\n const yearMenuItems = useMemo(\n () =>\n range(minYear, maxYear + 1).map((year) => {\n const stringYear = String(year);\n\n return {\n label: stringYear,\n value: stringYear,\n isSelected: year === activeMonth?.year,\n };\n }),\n [maxYear, minYear, activeMonth?.year],\n );\n\n const handleMonthChange = (selectedItem: MenuItemProps): void =>\n goToDate(set(focusedDate || today, { month: Number(selectedItem.value), year: activeMonth?.year }));\n\n const handleYearChange = (selectedItem: MenuItemProps): void =>\n goToDate(set(focusedDate || today, { month: activeMonth?.month, year: Number(selectedItem.value) }));\n\n return (\n <PopoverHeader justifyItems=\"space-between\">\n <HStack w=\"100%\" justify=\"space-between\">\n <Button iconName=\"chevronLeft\" onClick={goToPreviousMonths} variant=\"ghostNeutral\" size=\"sm\" />\n <Center gap={2} h=\"100%\">\n <Menu\n buttonProps={{\n variant: 'tertiary',\n text: monthNames[activeMonth?.month || 0],\n size: 'sm',\n }}\n listProps={{\n menuItems: monthMenuItems,\n onSelect: handleMonthChange,\n maxH: 400,\n shouldRetainSelection: true,\n }}\n />\n <Menu\n buttonProps={{\n variant: 'tertiary',\n text: String(activeMonth?.year),\n size: 'sm',\n }}\n listProps={{\n menuItems: yearMenuItems,\n onSelect: handleYearChange,\n maxH: 200,\n shouldRetainSelection: true,\n }}\n onOpen={scrollToYear}\n />\n </Center>\n <Button iconName=\"chevronRight\" onClick={goToNextMonths} variant=\"ghostNeutral\" size=\"sm\" />\n </HStack>\n </PopoverHeader>\n );\n}\n","import isAfter from 'date-fns/isAfter';\nimport isBefore from 'date-fns/isBefore';\n\nexport const isDateAfterMin = (date: Date, minDate?: Date): boolean => (minDate ? isAfter(date, minDate) : true);\nexport const isDateBeforeMax = (date: Date, maxDate?: Date): boolean => (maxDate ? isBefore(date, maxDate) : true);\n","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param {Date|Number} date - the date that should be before the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is before the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\n\nexport default function isBefore(dirtyDate, dirtyDateToCompare) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dateToCompare = toDate(dirtyDateToCompare);\n return date.getTime() < dateToCompare.getTime();\n}","import React, { ChangeEvent, RefObject } from 'react';\nimport { PopoverTrigger, Flex, HStack } from '@chakra-ui/react';\nimport { TextInput, TextInputProps } from 'components/TextInput/textInput.component';\nimport { Icon } from 'components/Icon/icon.component';\nimport { Text } from 'components/Text/text.component';\nimport isDate from 'date-fns/isDate';\nimport { getInputValue, parseDate } from '@datepicker-react/hooks';\nimport { IconSizeMap } from '../../datepicker.records';\nimport { isDateAfterMin, isDateBeforeMax } from '../../datepicker.utils';\nimport { FocusedInput, today, useDatePickerContext } from 'components/DatePicker/context/datepicker.context';\nimport format from 'date-fns/format';\n\ninterface DatePickerInputProps {\n inputProps?: Omit<TextInputProps, 'onChange' | 'value' | 'isClearable' | 'onClear'>;\n startDateInputRef: RefObject<HTMLInputElement>;\n}\n\nconst focusedInputStyles = {\n borderColor: 'var(--chakra-colors-border-info) !important',\n borderWidth: '2px !important',\n};\n\nconst hoverInputStyles = {\n _hover: {\n borderWidth: '1px',\n borderColor: 'border.strong',\n },\n};\n\nexport function DatePickerInput({ inputProps, startDateInputRef }: DatePickerInputProps): JSX.Element {\n const {\n setFocusedInput,\n startDate,\n endDate,\n focusedInput,\n dateFormat,\n isDateRange,\n minDate,\n maxDate,\n onDateChange,\n onDateSelect,\n isOpen,\n onClose,\n } = useDatePickerContext();\n const iconSize = inputProps?.size ? IconSizeMap[inputProps.size] : 'md';\n\n const onKeyDown = (e: React.KeyboardEvent): void => {\n if (e.key === 'Enter' && isOpen) {\n onClose();\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n const onInputChange = (e: ChangeEvent<HTMLInputElement>): void => {\n const dateValue = e.target.value;\n const parsedDate = parseDate(dateValue, dateFormat, today);\n\n if (\n dateValue.length === dateFormat.length &&\n isDate(parsedDate) &&\n isDateAfterMin(parsedDate, minDate) &&\n isDateBeforeMax(parsedDate, maxDate)\n ) {\n onDateSelect(parsedDate);\n }\n\n // Trigger change when input is empty\n if (!dateValue.length && onDateChange) {\n onDateChange({ startDate: null, endDate: null });\n }\n };\n\n return (\n <PopoverTrigger>\n <HStack w=\"100%\">\n <TextInput\n data-testid=\"date-picker-text-input\"\n rightElement={\n <Flex\n {...(!inputProps?.isDisabled && {\n onClick: (): void => setFocusedInput(FocusedInput.StartDate),\n })}\n h=\"100%\"\n align=\"center\"\n >\n <Icon name=\"calendarDate\" size={iconSize} />\n </Flex>\n }\n value={getInputValue(startDate, dateFormat, '')}\n onChange={onInputChange}\n inputRef={startDateInputRef}\n onKeyDown={onKeyDown}\n {...(!inputProps?.isDisabled && {\n onFocus: (): void => setFocusedInput(FocusedInput.StartDate),\n })}\n placeholder={format(today, dateFormat).toString()}\n {...(focusedInput === FocusedInput.StartDate && focusedInputStyles)}\n {...hoverInputStyles}\n {...inputProps}\n />\n {isDateRange && (\n <>\n <Text> - </Text>\n <TextInput\n data-testid=\"date-picker-text-input\"\n rightElement={\n <Flex\n {...(!inputProps?.isDisabled && {\n onClick: (): void => setFocusedInput(FocusedInput.StartDate),\n })}\n h=\"100%\"\n align=\"center\"\n >\n <Icon name=\"calendarDate\" size={iconSize} />\n </Flex>\n }\n value={getInputValue(endDate, dateFormat, '')}\n onChange={onInputChange}\n {...(!inputProps?.isDisabled && {\n onFocus: (): void => setFocusedInput(FocusedInput.EndDate),\n })}\n onKeyDown={onKeyDown}\n placeholder={format(today, dateFormat).toString()}\n {...(focusedInput === FocusedInput.EndDate && focusedInputStyles)}\n {...hoverInputStyles}\n {...inputProps}\n />\n </>\n )}\n </HStack>\n </PopoverTrigger>\n );\n}\n","import { ButtonProps } from '../../../../Button/button.component';\n\nexport type DayVariant = 'default' | 'selectedStart' | 'disabled' | 'inRange' | 'selectedEnd';\nexport type CustomizableProperty = 'color' | 'background' | 'borderColor';\n\nexport const dayStyles: Record<DayVariant, Partial<ButtonProps>> = {\n default: {\n variant: 'ghostNeutral',\n },\n selectedStart: {\n variant: 'primary',\n },\n disabled: {\n isDisabled: true,\n variant: 'ghostNeutral',\n },\n inRange: {\n variant: 'ghost',\n borderRadius: '0',\n isActive: true,\n },\n selectedEnd: {\n variant: 'ghost',\n borderWidth: '2px',\n borderColor: 'border.info',\n },\n};\n","import React, { useRef, useMemo } from 'react';\nimport { useDay } from '@datepicker-react/hooks';\nimport { useDatePickerContext } from '../../../context/datepicker.context';\nimport { Button } from '../../../../Button/button.component';\nimport { DayVariant, dayStyles } from './day.config';\nimport format from 'date-fns/format';\nimport { Box } from '@chakra-ui/react';\n\ninterface DayProps {\n dayLabel: string;\n date: Date;\n onDaySelected: () => void;\n}\n\nexport const Day = ({ dayLabel, date, onDaySelected }: DayProps): JSX.Element => {\n const today = new Date();\n const dayRef = useRef(null);\n const { startDate, endDate, dateFormat } = useDatePickerContext();\n const formattedDates = useMemo(\n () => ({\n currentDay: format(date, dateFormat),\n startDate: startDate && format(startDate, dateFormat),\n endDate: endDate && format(endDate, dateFormat),\n }),\n [date, dateFormat, endDate, startDate],\n );\n const isRangeStart = formattedDates.currentDay === formattedDates.startDate;\n const isRangeEnd = formattedDates.currentDay === formattedDates.endDate;\n const isToday = formattedDates.currentDay === format(today, dateFormat);\n\n const {\n focusedDate,\n isDateFocused,\n isDateSelected,\n isDateHovered,\n isDateBlocked,\n isFirstOrLastSelectedDate,\n onDateSelect,\n onDateFocus,\n onDateHover,\n } = useDatePickerContext();\n\n const { disabledDate, isSelected, onClick, onKeyDown, onMouseEnter, tabIndex } = useDay({\n date,\n focusedDate,\n isDateFocused,\n isDateSelected,\n isDateHovered,\n isDateBlocked,\n isFirstOrLastSelectedDate,\n onDateFocus,\n onDateSelect,\n onDateHover,\n dayRef,\n });\n\n const buttonVariant = useMemo((): DayVariant => {\n switch (true) {\n case disabledDate:\n return 'disabled';\n case isRangeStart:\n return 'selectedStart';\n case isRangeEnd:\n return 'selectedEnd';\n case isSelected && !isRangeStart && !isRangeEnd:\n return 'inRange';\n default:\n return 'default';\n }\n }, [disabledDate, isRangeEnd, isRangeStart, isSelected]);\n\n if (!dayLabel) {\n return <></>;\n }\n\n const onSelectDay = (): void => {\n onClick();\n onDaySelected();\n };\n\n return (\n <Button\n onClick={onSelectDay}\n onKeyDown={onKeyDown}\n onMouseEnter={onMouseEnter}\n tabIndex={tabIndex}\n type=\"button\"\n ref={dayRef}\n size=\"sm\"\n fontWeight=\"normal\"\n isDisabled={disabledDate}\n overflow=\"hidden\"\n pos=\"relative\"\n data-testid={formattedDates.currentDay}\n {...dayStyles[buttonVariant]}\n >\n {isToday && (\n <Box\n pos=\"absolute\"\n w=\"6\"\n h=\"6\"\n top=\"-4\"\n right=\"-4\"\n transform=\"rotate(45deg)\"\n bg={isRangeStart ? 'background.default' : 'background.primary'}\n />\n )}\n {dayLabel}\n </Button>\n );\n};\n","import React, { useRef } from 'react';\nimport { useMonth } from '@datepicker-react/hooks';\nimport { Text } from '../../../../Text/text.component';\nimport { Box, Center, Grid, GridItem } from '@chakra-ui/react';\nimport { Day } from '../Day/day.component';\nimport { currentMonth, currentYear, useDatePickerContext } from 'components/DatePicker/context/datepicker.context';\n\nexport interface MonthProps {\n onDaySelected: () => void;\n}\n\nexport const Month = ({ onDaySelected }: MonthProps): JSX.Element => {\n const ref = useRef<HTMLDivElement | null>(null);\n const { firstDayOfWeek, activeMonth } = useDatePickerContext();\n\n const { days, weekdayLabels } = useMonth({\n year: activeMonth?.year || currentYear,\n month: activeMonth?.month !== undefined ? activeMonth.month : currentMonth,\n firstDayOfWeek,\n });\n\n return (\n <Box ref={ref}>\n <Grid templateColumns=\"repeat(7, 1fr)\" my={2}>\n {weekdayLabels.map((weekdayLabel: string) => (\n <GridItem key={weekdayLabel}>\n <Center>\n <Text size=\"xs\" variant=\"subtle\">\n {weekdayLabel}\n </Text>\n </Center>\n </GridItem>\n ))}\n </Grid>\n <Grid templateColumns=\"repeat(7, 1fr)\">\n {days.map((day, index) =>\n typeof day === 'object' ? (\n <Day key={day.date.toString()} date={day.date} dayLabel={day.dayLabel} onDaySelected={onDaySelected} />\n ) : (\n <div key={index} />\n ),\n )}\n </Grid>\n </Box>\n );\n};\n","import { Grid, PopoverBody } from '@chakra-ui/react';\nimport { useDatePickerContext } from 'components/DatePicker/context/datepicker.context';\nimport React from 'react';\nimport { Month } from './Month/month.component';\n\nexport function DatePickerCalendar(): JSX.Element {\n const { isDateRange, activeMonths, onClose } = useDatePickerContext();\n\n const handleDaySelected = (): void => {\n if (!isDateRange) {\n onClose();\n }\n };\n\n return (\n <PopoverBody>\n <Grid gap=\"0 64px\">\n {activeMonths.map((month) => (\n <Month key={`${month.year}-${month.month}`} onDaySelected={handleDaySelected} />\n ))}\n </Grid>\n </PopoverBody>\n );\n}\n","import React, { useCallback } from 'react';\nimport { Button } from 'components/Button/button.component';\nimport { PopoverFooter, HStack } from '@chakra-ui/react';\nimport { useDatePickerContext } from 'components/DatePicker/context/datepicker.context';\nimport { DateRange } from 'components/DatePicker/datepicker.component';\n\nexport interface DatePickerFooterProps {\n buttonText?: string;\n onSubmit?: ({ startDate, endDate }: DateRange) => void;\n hideResetButton?: boolean;\n}\n\nexport function DatePickerFooter({\n buttonText = 'Apply',\n onSubmit,\n hideResetButton,\n}: DatePickerFooterProps): JSX.Element {\n const { startDate, endDate, onClose, clearDates } = useDatePickerContext();\n\n const handleSubmit = useCallback((): void => {\n onClose();\n\n if (onSubmit) {\n onSubmit({ startDate, endDate });\n }\n }, [onClose, onSubmit, startDate, endDate]);\n\n return (\n <PopoverFooter>\n <HStack w=\"100%\" justify={hideResetButton ? 'end' : 'space-between'} align=\"center\">\n {!hideResetButton && (\n <Button size=\"sm\" variant=\"ghostNeutral\" onClick={clearDates}>\n Clear Dates\n </Button>\n )}\n <Button size=\"sm\" onClick={handleSubmit}>\n {buttonText}\n </Button>\n </HStack>\n </PopoverFooter>\n );\n}\n","import React, { useRef } from 'react';\nimport { PopoverContent, PlacementWithLogical } from '@chakra-ui/react';\nimport { TextInputProps } from '../TextInput/textInput.component';\nimport { DatePickerProvider } from './context/datepicker.provider';\nimport { DateFormats } from './datepicker.types';\nimport { DatePickerHeader } from './components/Header/header.component';\nimport { DatePickerInput } from './components/Input/input.component';\nimport { DatePickerCalendar } from './components/Calendar/calendar.component';\nimport { DatePickerFooterProps, DatePickerFooter } from './components/Footer/footer.component';\n\n/**\n *\n * Note: Be careful with dateFormat and allowing search (inputProps.IsReadOnly = false) as changing the format\n * can cause exceptions to be thrown.\n *\n * More dateFormat info: https://github.com/date-fns/date-fns/blob/main/docs/unicodeTokens.md\n */\n\nexport interface DateRange {\n startDate: Date | null;\n endDate?: Date | null;\n}\n\nexport interface DatePickerProps {\n dateFormat?: string | DateFormats;\n endDate?: Date | null;\n footerProps?: DatePickerFooterProps;\n hideFooter?: boolean;\n inputProps?: Omit<TextInputProps, 'onChange' | 'value' | 'isClearable' | 'onClear'>;\n isDateRange?: boolean;\n maxDate?: Date;\n maxYear?: number;\n maxDaysInRange?: number;\n minDate?: Date;\n minYear?: number;\n onDateChange?: ({ startDate, endDate }: DateRange) => void;\n placement?: PlacementWithLogical;\n startDate: Date | null;\n}\n\nexport const DatePicker = (props: DatePickerProps): JSX.Element => {\n const { isDateRange = false, hideFooter = false, footerProps, inputProps } = props;\n const calendarRef = useRef<HTMLDivElement>(null);\n const startDateInputRef = useRef<HTMLInputElement>(null);\n\n const scrollToYear = (): void => {\n setTimeout(() => {\n const currentYearNode = calendarRef?.current?.querySelector('.MenuList__Item.current');\n if (currentYearNode) {\n currentYearNode.scrollIntoView({ block: 'center' });\n }\n });\n };\n\n return (\n <DatePickerProvider calendarRef={calendarRef} {...props}>\n <DatePickerInput inputProps={inputProps} startDateInputRef={startDateInputRef} />\n <PopoverContent ref={calendarRef} shadow=\"md\" data-testid=\"calendar-popover\">\n <DatePickerHeader scrollToYear={scrollToYear} />\n <DatePickerCalendar />\n {isDateRange && !hideFooter && <DatePickerFooter {...footerProps} />}\n </PopoverContent>\n </DatePickerProvider>\n );\n};\n"],"names":["addDays","dirtyDate","dirtyAmount","requiredArgs","arguments","date","toDate","amount","toInteger","isNaN","Date","NaN","setDate","getDate","addMonths","dayOfMonth","endOfDesiredMonth","getTime","setMonth","getMonth","daysInMonth","setFullYear","getFullYear","_typeof","obj","Symbol","iterator","constructor","prototype","isAfter","dirtyDateToCompare","dateToCompare","DatePickerProvider","children","dateFormat","defaultDateFormat","endDate","inputProps","isDateRange","maxDate","maxYear","maxDaysInRange","minDate","minYear","onDateChange","placement","startDate","onOpen","onClose","isOpen","useDisclosure","state","setState","useState","focusedInput","getMaxBookingDate","useCallback","duration","years","months","weeks","days","hours","minutes","seconds","dateWithMonths","dateWithDays","msToAdd","add","clearDates","FocusedInput","StartDate","activeMonths","firstDayOfWeek","focusedDate","goToDate","goToNextMonths","goToPreviousMonths","isDateBlocked","isDateFocused","isDateHovered","isDateSelected","isFirstOrLastSelectedDate","onDateFocus","onDateHover","onDateSelect","useDatepicker","Ye","initialVisibleMonth","today","maxBookingDate","undefined","minBookingDate","minBookingDays","numberOfMonths","onDatesChange","data","_maxBookingDate","startOfDay","setHours","endOfDay","Object","assign","exactMinBookingDays","navigateToFocusedInputDate","EndDate","setFocusedInput","prevState","handleClose","setTimeout","activeMonth","useMemo","useEffect","React","createElement","DatePickerContext","Provider","value","defaultFocusedDate","defaultMaxYear","defaultMinYear","Popover","isDisabled","nativeCeil","Math","ceil","nativeMax","max","_baseRange","start","end","step","fromRight","index","length","result","Array","eq_1","other","isObject_1","type","baseGetTag","require$$0","_baseGetTag","isObject","require$$1","isFunction","tag","isLength","reIsUint","eq","isArrayLike","isIndex","test","require$$3","_isIterateeCall","object","reWhitespace","_trimmedEndIndex","string","charAt","trimmedEndIndex","reTrimStart","_baseTrim","slice","replace","isObjectLike_1","isObjectLike","baseTrim","isSymbol","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","toNumber","valueOf","isBinary","baseRange","isIterateeCall","toFinite","range_1","createRange","IconSizeMap","sm","md","lg","monthNames","getDaysInMonth","year","monthIndex","lastDayOfMonth","dirtyMonth","month","day","dateWithDesiredMonth","min","set","values","RangeError","setMinutes","setSeconds","milliseconds","setMilliseconds","DatePickerHeader","scrollToYear","useDatePickerContext","monthMenuItems","map","label","String","isSelected","yearMenuItems","range","stringYear","PopoverHeader","justifyItems","HStack","w","justify","Button","iconName","onClick","variant","size","Center","gap","h","Menu","buttonProps","text","listProps","menuItems","onSelect","selectedItem","Number","maxH","shouldRetainSelection","isDateBeforeMax","isBefore","focusedInputStyles","borderColor","borderWidth","hoverInputStyles","_hover","DatePickerInput","startDateInputRef","iconSize","onKeyDown","e","key","preventDefault","stopPropagation","onInputChange","dateValue","target","parsedDate","parseDate","xt","isDate","isDateAfterMin","PopoverTrigger","TextInput","rightElement","Flex","align","Icon","name","getInputValue","onChange","inputRef","onFocus","placeholder","format","toString","Fragment","Text","dayStyles","default","selectedStart","disabled","inRange","borderRadius","isActive","selectedEnd","Day","dayLabel","onDaySelected","dayRef","useRef","formattedDates","currentDay","isRangeStart","isRangeEnd","isToday","disabledDate","onMouseEnter","tabIndex","useDay","buttonVariant","ref","fontWeight","overflow","pos","Box","top","right","transform","bg","Month","weekdayLabels","useMonth","currentYear","currentMonth","Grid","templateColumns","my","weekdayLabel","GridItem","DatePickerCalendar","handleDaySelected","PopoverBody","DatePickerFooter","buttonText","onSubmit","hideResetButton","handleSubmit","PopoverFooter","props","hideFooter","footerProps","calendarRef","PopoverContent","shadow","currentYearNode","_a","current","querySelector","scrollIntoView","block"],"mappings":"ykBAsBe,SAASA,EAAQC,EAAWC,GACzCC,eAAa,EAAGC,WAChB,IAAIC,EAAOC,SAAOL,GACdM,EAASC,YAAUN,GAEvB,OAAIO,MAAMF,GACD,IAAIG,KAAKC,KAGbJ,GAKLF,EAAKO,QAAQP,EAAKQ,UAAYN,GACvBF,GAJEA,ECXI,SAASS,EAAUb,EAAWC,GAC3CC,eAAa,EAAGC,WAChB,IAAIC,EAAOC,SAAOL,GACdM,EAASC,YAAUN,GAEvB,GAAIO,MAAMF,GACR,OAAO,IAAIG,KAAKC,KAGlB,IAAKJ,EAEH,OAAOF,EAGT,IAAIU,EAAaV,EAAKQ,UASlBG,EAAoB,IAAIN,KAAKL,EAAKY,WACtCD,EAAkBE,SAASb,EAAKc,WAAaZ,EAAS,EAAG,GACzD,IAAIa,EAAcJ,EAAkBH,UAEpC,OAAIE,GAAcK,EAGTJ,GASPX,EAAKgB,YAAYL,EAAkBM,cAAeN,EAAkBG,WAAYJ,GACzEV,GC9DX,SAASkB,EAAQC,GAAmV,OAAtOD,EAArD,mBAAXE,QAAoD,iBAApBA,OAAOC,SAAmC,SAAiBF,GAAO,cAAcA,GAA2B,SAAiBA,GAAO,OAAOA,GAAyB,mBAAXC,QAAyBD,EAAIG,cAAgBF,QAAUD,IAAQC,OAAOG,UAAY,gBAAkBJ,GAAiBD,EAAQC,GCqBpW,SAASK,EAAQ5B,EAAW6B,GACzC3B,eAAa,E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AWV,IAElC,OACE6E,wBAACsN,EAAAA,cAAa,KACZtN,EAAAA,QAACC,cAAAuG,UAAOC,EAAE,OAAOC,QAAS0G,EAAkB,MAAQ,gBAAiB5D,MAAM,WACvE4D,GACApN,wBAAC2G,EAAAA,OAAM,CAACI,KAAK,KAAKD,QAAQ,eAAeD,QAASzJ,kBAIpD4C,EAAAA,QAAAC,cAAC0G,SAAM,CAACI,KAAK,KAAKF,QAASwG,GACxBH,wBCIgBK,IACzB,MAAMlS,YAAEA,GAAc,EAAKmS,WAAEA,GAAa,EAAKC,YAAEA,EAAWrS,WAAEA,GAAemS,EACvEG,EAAc1C,SAAuB,MACrC3C,EAAoB2C,SAAyB,MAWnD,OACEhL,wBAACjF,EAAkBqE,OAAAC,OAAA,CAACqO,YAAaA,GAAiBH,GAChDvN,EAAC,QAAAC,cAAAmI,IAAgBhN,WAAYA,EAAYiN,kBAAmBA,IAC5DrI,UAACC,cAAA0N,EAAcA,eAAC,CAAAhC,IAAK+B,EAAaE,OAAO,KAAI,cAAa,oBACxD5N,EAAAA,QAAAC,cAAC0F,GAAgB,CAACC,aAbH,KACnBhG,YAAW,WACT,MAAMiO,EAAwC,QAAtBC,EAAAJ,MAAAA,OAAW,EAAXA,EAAaK,eAAS,IAAAD,OAAA,EAAAA,EAAAE,cAAc,2BACxDH,GACFA,EAAgBI,eAAe,CAAEC,MAAO,iBAUxClO,UAAAC,cAAC6M,GAAqB,MACrBzR,IAAgBmS,GAAcxN,EAAC,QAAAC,cAAAgN,GAAqB7N,OAAAC,OAAA,GAAAoO"}
|
|
1
|
+
{"version":3,"file":"datepicker.component-c38c1102.js","sources":["../node_modules/date-fns/esm/addDays/index.js","../node_modules/date-fns/esm/addMonths/index.js","../node_modules/date-fns/esm/add/index.js","../node_modules/date-fns/esm/isAfter/index.js","../src/components/DatePicker/context/datepicker.provider.tsx","../node_modules/date-fns/esm/endOfDay/index.js","../node_modules/lodash/_baseRange.js","../node_modules/lodash/eq.js","../node_modules/lodash/isObject.js","../node_modules/lodash/isFunction.js","../node_modules/lodash/isLength.js","../node_modules/lodash/isArrayLike.js","../node_modules/lodash/_isIndex.js","../node_modules/lodash/_isIterateeCall.js","../node_modules/lodash/_trimmedEndIndex.js","../node_modules/lodash/_baseTrim.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/isSymbol.js","../node_modules/lodash/toNumber.js","../node_modules/lodash/toFinite.js","../node_modules/lodash/_createRange.js","../node_modules/lodash/range.js","../src/components/DatePicker/datepicker.records.ts","../node_modules/date-fns/esm/getDaysInMonth/index.js","../node_modules/date-fns/esm/setMonth/index.js","../node_modules/date-fns/esm/set/index.js","../src/components/DatePicker/components/Header/header.component.tsx","../src/components/DatePicker/datepicker.utils.ts","../node_modules/date-fns/esm/isBefore/index.js","../src/components/DatePicker/components/Input/input.component.tsx","../src/components/DatePicker/components/Calendar/Day/day.config.tsx","../src/components/DatePicker/components/Calendar/Day/day.component.tsx","../src/components/DatePicker/components/Calendar/Month/month.component.tsx","../src/components/DatePicker/components/Calendar/calendar.component.tsx","../src/components/DatePicker/components/Footer/footer.component.tsx","../src/components/DatePicker/datepicker.component.tsx"],"sourcesContent":["import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\n\nexport default function addDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n date.setDate(date.getDate() + amount);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\n\nexport default function addMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n\n var endOfDesiredMonth = new Date(date.getTime());\n endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n var daysInMonth = endOfDesiredMonth.getDate();\n\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n return date;\n }\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport addDays from \"../addDays/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n\n/**\n * @name add\n * @category Common Helpers\n * @summary Add the specified years, months, weeks, days, hours, minutes and seconds to the given date.\n *\n * @description\n * Add the specified years, months, weeks, days, hours, minutes and seconds to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Duration} duration - the object with years, months, weeks, days, hours, minutes and seconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n *\n * | Key | Description |\n * |----------------|------------------------------------|\n * | years | Amount of years to be added |\n * | months | Amount of months to be added |\n * | weeks | Amount of weeks to be added |\n * | days | Amount of days to be added |\n * | hours | Amount of hours to be added |\n * | minutes | Amount of minutes to be added |\n * | seconds | Amount of seconds to be added |\n *\n * All values default to 0\n *\n * @returns {Date} the new date with the seconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add the following duration to 1 September 2014, 10:19:50\n * const result = add(new Date(2014, 8, 1, 10, 19, 50), {\n * years: 2,\n * months: 9,\n * weeks: 1,\n * days: 7,\n * hours: 5,\n * minutes: 9,\n * seconds: 30,\n * })\n * //=> Thu Jun 15 2017 15:29:20\n */\nexport default function add(dirtyDate, duration) {\n requiredArgs(2, arguments);\n if (!duration || _typeof(duration) !== 'object') return new Date(NaN);\n var years = duration.years ? toInteger(duration.years) : 0;\n var months = duration.months ? toInteger(duration.months) : 0;\n var weeks = duration.weeks ? toInteger(duration.weeks) : 0;\n var days = duration.days ? toInteger(duration.days) : 0;\n var hours = duration.hours ? toInteger(duration.hours) : 0;\n var minutes = duration.minutes ? toInteger(duration.minutes) : 0;\n var seconds = duration.seconds ? toInteger(duration.seconds) : 0; // Add years and months\n\n var date = toDate(dirtyDate);\n var dateWithMonths = months || years ? addMonths(date, months + years * 12) : date; // Add weeks and days\n\n var dateWithDays = days || weeks ? addDays(dateWithMonths, days + weeks * 7) : dateWithMonths; // Add days, hours, minutes and seconds\n\n var minutesToAdd = minutes + hours * 60;\n var secondsToAdd = seconds + minutesToAdd * 60;\n var msToAdd = secondsToAdd * 1000;\n var finalDate = new Date(dateWithDays.getTime() + msToAdd);\n return finalDate;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param {Date|Number} date - the date that should be after the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is after the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\n\nexport default function isAfter(dirtyDate, dirtyDateToCompare) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dateToCompare = toDate(dirtyDateToCompare);\n return date.getTime() > dateToCompare.getTime();\n}","import React, { RefObject, useCallback, useEffect, useMemo, useState } from 'react';\nimport { Popover, useDisclosure } from '@chakra-ui/react';\nimport { DatePickerProps } from '../datepicker.component';\nimport { useDatepicker } from '@datepicker-react/hooks';\nimport {\n DatePickerContext,\n defaultDateFormat,\n defaultFocusedDate,\n defaultMaxYear,\n defaultMinYear,\n FocusedInput,\n today,\n} from './datepicker.context';\nimport startOfDay from 'date-fns/startOfDay';\nimport endOfDay from 'date-fns/endOfDay';\nimport add from 'date-fns/add';\nimport isAfter from 'date-fns/isAfter';\n\ntype DatePickerProviderProps = DatePickerProps & {\n children: React.ReactNode;\n calendarRef: RefObject<HTMLDivElement>;\n};\n\ninterface DatePickerInternalState {\n startDate: Date | null;\n endDate: Date | null;\n focusedInput: FocusedInput | null;\n}\n\nexport const DatePickerProvider = ({\n children,\n dateFormat = defaultDateFormat,\n endDate,\n inputProps,\n isDateRange,\n maxDate,\n maxYear,\n maxDaysInRange,\n minDate,\n minYear,\n onDateChange,\n placement,\n startDate,\n}: DatePickerProviderProps): JSX.Element => {\n const { onOpen, onClose, isOpen } = useDisclosure();\n const [state, setState] = useState<DatePickerInternalState>({\n startDate,\n endDate: endDate || startDate,\n focusedInput: null,\n });\n\n /**\n * Calculates the max booking date based on the following criteria:\n * _maxDaysInRange_\n * * should only ever be used by date ranges\n * * should take precedence over the maxDate value\n * * should use it's value plus the start date of the range to calculate the max date\n * _maxDate_\n * * can be passed to either a single date input or a date range\n * * if provided it will be ignored if maxDaysInRange is passed\n * If neither of these values is specified return undefined\n */\n const getMaxBookingDate = useCallback(\n (startDate) => {\n if (maxDaysInRange && startDate) {\n return add(startDate, { days: maxDaysInRange });\n } else if (maxDate) {\n return maxDate;\n }\n\n return;\n },\n [maxDate, maxDaysInRange],\n );\n\n const onDatesChange = (data: DatePickerInternalState): void => {\n if (!data) {\n return;\n }\n\n // Default the end date to the start date if no value is provided\n if (!data.endDate) {\n data.endDate = data.startDate;\n }\n\n // If end date exceeds new max booking date, reset the end date value\n const _maxBookingDate = getMaxBookingDate(data.startDate);\n if (data.endDate && _maxBookingDate && isAfter(data.endDate, _maxBookingDate)) {\n data.endDate = null;\n }\n\n // Set the start date to start of day and end date to end of day to create a range\n data.startDate = data.startDate ? startOfDay(data.startDate) : data.startDate;\n data.endDate = data.endDate ? endOfDay(data.endDate) : data.endDate;\n\n setState({ ...data, focusedInput: data.focusedInput || FocusedInput.StartDate });\n if (!isDateRange && onDateChange) {\n onDateChange(data);\n }\n };\n\n const clearDates = useCallback(() => {\n setState({ startDate: null, endDate: null, focusedInput: isOpen ? FocusedInput.StartDate : null });\n }, [isOpen]);\n\n const {\n activeMonths,\n firstDayOfWeek,\n focusedDate,\n goToDate,\n goToNextMonths,\n goToPreviousMonths,\n isDateBlocked,\n isDateFocused,\n isDateHovered,\n isDateSelected,\n isFirstOrLastSelectedDate,\n onDateFocus,\n onDateHover,\n onDateSelect,\n } = useDatepicker({\n endDate: state.endDate,\n focusedInput: state.focusedInput,\n initialVisibleMonth: state.startDate || today,\n // Only show max disabled dates for date range when focused on end date input\n maxBookingDate:\n isDateRange && state.focusedInput === FocusedInput.StartDate ? undefined : getMaxBookingDate(state.startDate),\n minBookingDate: minDate,\n minBookingDays: 1,\n numberOfMonths: 1,\n onDatesChange,\n startDate: state.startDate,\n ...(!isDateRange && { exactMinBookingDays: true }),\n });\n\n const navigateToFocusedInputDate = useCallback(\n (focusedInput: FocusedInput | null) => {\n if (focusedInput === FocusedInput.EndDate && state.endDate) {\n goToDate(state.endDate);\n } else if (state.startDate) {\n goToDate(state.startDate);\n }\n },\n [goToDate, state.endDate, state.startDate],\n );\n\n const setFocusedInput = useCallback(\n (focusedInput: FocusedInput | null): void => {\n setState((prevState) => ({ ...prevState, focusedInput }));\n navigateToFocusedInputDate(focusedInput);\n },\n [navigateToFocusedInputDate],\n );\n\n const handleOpen = (): void => {\n if (inputProps?.isDisabled) return;\n\n onOpen();\n\n // Default to start date input on open if no start date value has been set\n if (!state.startDate || !isDateRange) {\n setFocusedInput(FocusedInput.StartDate);\n }\n };\n\n const handleClose = useCallback((): void => {\n setFocusedInput(null);\n onClose();\n\n if (isDateRange && onDateChange) {\n setTimeout(() => {\n onDateChange({ startDate: state.startDate, endDate: state.endDate });\n }, 200);\n }\n }, [isDateRange, onClose, onDateChange, setFocusedInput, state.endDate, state.startDate]);\n\n const activeMonth = useMemo(() => activeMonths[0], [activeMonths]);\n\n // Listen for external changes to start and end dates and update internal state\n useEffect(() => {\n setState((prevState) => ({ ...prevState, startDate, endDate: endDate || startDate }));\n }, [startDate, endDate]);\n\n return (\n <DatePickerContext.Provider\n value={{\n activeMonth,\n activeMonths,\n dateFormat: dateFormat || defaultDateFormat,\n endDate: state.endDate || null,\n firstDayOfWeek,\n focusedDate: focusedDate || defaultFocusedDate,\n focusedInput: state.focusedInput,\n goToDate,\n goToNextMonths,\n goToPreviousMonths,\n setFocusedInput,\n isDateBlocked,\n isDateFocused,\n isDateHovered,\n isDateRange: isDateRange || false,\n isDateSelected,\n isFirstOrLastSelectedDate,\n maxDate,\n maxYear: maxYear || defaultMaxYear,\n minDate,\n minYear: minYear || defaultMinYear,\n onDateChange,\n onDateFocus,\n onDateHover,\n onDateSelect,\n startDate: state.startDate,\n isOpen,\n onOpen,\n onClose: handleClose,\n clearDates,\n }}\n >\n <Popover isOpen={isOpen} onClose={handleClose} onOpen={handleOpen} placement={placement}>\n {children}\n </Popover>\n </DatePickerContext.Provider>\n );\n};\n","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\n\nexport default function endOfDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setHours(23, 59, 59, 999);\n return date;\n}","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nfunction baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n}\n\nmodule.exports = baseRange;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","var baseRange = require('./_baseRange'),\n isIterateeCall = require('./_isIterateeCall'),\n toFinite = require('./toFinite');\n\n/**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\nfunction createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n}\n\nmodule.exports = createRange;\n","var createRange = require('./_createRange');\n\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\nvar range = createRange();\n\nmodule.exports = range;\n","import { IconSize } from '../Icon/icon.types';\nimport { FormControlSize } from 'shared/types/formControl';\n\nexport const IconSizeMap: Record<FormControlSize, IconSize> = {\n sm: 'sm',\n md: 'md',\n lg: 'lg',\n};\n\nexport const monthNames = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n];\n","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the number of days in a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\n\nexport default function getDaysInMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var monthIndex = date.getMonth();\n var lastDayOfMonth = new Date(0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport getDaysInMonth from \"../getDaysInMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} month - the month of the new date\n * @returns {Date} the new date with the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\n\nexport default function setMonth(dirtyDate, dirtyMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var month = toInteger(dirtyMonth);\n var year = date.getFullYear();\n var day = date.getDate();\n var dateWithDesiredMonth = new Date(0);\n dateWithDesiredMonth.setFullYear(year, month, 15);\n dateWithDesiredMonth.setHours(0, 0, 0, 0);\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth); // Set the last day of the new month\n // if the original date was the last day of the longer month\n\n date.setMonth(month, Math.min(day, daysInMonth));\n return date;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport toDate from \"../toDate/index.js\";\nimport setMonth from \"../setMonth/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n\n/**\n * @name set\n * @category Common Helpers\n * @summary Set date values to a given date.\n *\n * @description\n * Set date values to a given date.\n *\n * Sets time values to date from object `values`.\n * A value is not set if it is undefined or null or doesn't exist in `values`.\n *\n * Note about bundle size: `set` does not internally use `setX` functions from date-fns but instead opts\n * to use native `Date#setX` methods. If you use this function, you may not want to include the\n * other `setX` functions that date-fns provides if you are concerned about the bundle size.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Object} values - an object with options\n * @param {Number} [values.year] - the number of years to be set\n * @param {Number} [values.month] - the number of months to be set\n * @param {Number} [values.date] - the number of days to be set\n * @param {Number} [values.hours] - the number of hours to be set\n * @param {Number} [values.minutes] - the number of minutes to be set\n * @param {Number} [values.seconds] - the number of seconds to be set\n * @param {Number} [values.milliseconds] - the number of milliseconds to be set\n * @returns {Date} the new date with options set\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `values` must be an object\n *\n * @example\n * // Transform 1 September 2014 into 20 October 2015 in a single line:\n * const result = set(new Date(2014, 8, 20), { year: 2015, month: 9, date: 20 })\n * //=> Tue Oct 20 2015 00:00:00\n *\n * @example\n * // Set 12 PM to 1 September 2014 01:23:45 to 1 September 2014 12:00:00:\n * const result = set(new Date(2014, 8, 1, 1, 23, 45), { hours: 12 })\n * //=> Mon Sep 01 2014 12:23:45\n */\nexport default function set(dirtyDate, values) {\n requiredArgs(2, arguments);\n\n if (_typeof(values) !== 'object' || values === null) {\n throw new RangeError('values parameter must be an object');\n }\n\n var date = toDate(dirtyDate); // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n\n if (isNaN(date.getTime())) {\n return new Date(NaN);\n }\n\n if (values.year != null) {\n date.setFullYear(values.year);\n }\n\n if (values.month != null) {\n date = setMonth(date, values.month);\n }\n\n if (values.date != null) {\n date.setDate(toInteger(values.date));\n }\n\n if (values.hours != null) {\n date.setHours(toInteger(values.hours));\n }\n\n if (values.minutes != null) {\n date.setMinutes(toInteger(values.minutes));\n }\n\n if (values.seconds != null) {\n date.setSeconds(toInteger(values.seconds));\n }\n\n if (values.milliseconds != null) {\n date.setMilliseconds(toInteger(values.milliseconds));\n }\n\n return date;\n}","import { Menu } from 'components/Menu/menu.component';\nimport { MenuItemProps } from 'components/Menu/components/MenuItem/menuItem.component';\nimport range from 'lodash/range';\nimport { Button } from 'components/Button/button.component';\nimport { monthNames } from 'components/DatePicker/datepicker.records';\nimport { set } from 'date-fns';\nimport React, { useMemo } from 'react';\nimport { PopoverHeader, HStack, Center } from '@chakra-ui/react';\nimport { today, useDatePickerContext } from 'components/DatePicker/context/datepicker.context';\n\ninterface DatePickerHeaderProps {\n scrollToYear: () => void;\n}\n\nexport function DatePickerHeader({ scrollToYear }: DatePickerHeaderProps): JSX.Element {\n const { focusedDate, activeMonth, minYear, maxYear, goToDate, goToNextMonths, goToPreviousMonths } =\n useDatePickerContext();\n\n const monthMenuItems = useMemo(\n () =>\n monthNames.map((month, index) => ({\n label: month,\n value: String(index),\n isSelected: index === activeMonth?.month,\n })),\n [activeMonth?.month],\n );\n\n const yearMenuItems = useMemo(\n () =>\n range(minYear, maxYear + 1).map((year) => {\n const stringYear = String(year);\n\n return {\n label: stringYear,\n value: stringYear,\n isSelected: year === activeMonth?.year,\n };\n }),\n [maxYear, minYear, activeMonth?.year],\n );\n\n const handleMonthChange = (selectedItem: MenuItemProps): void =>\n goToDate(set(focusedDate || today, { month: Number(selectedItem.value), year: activeMonth?.year }));\n\n const handleYearChange = (selectedItem: MenuItemProps): void =>\n goToDate(set(focusedDate || today, { month: activeMonth?.month, year: Number(selectedItem.value) }));\n\n return (\n <PopoverHeader justifyItems=\"space-between\">\n <HStack w=\"100%\" justify=\"space-between\">\n <Button iconName=\"chevronLeft\" onClick={goToPreviousMonths} variant=\"ghostNeutral\" size=\"sm\" />\n <Center gap={2} h=\"100%\">\n <Menu\n buttonProps={{\n variant: 'tertiary',\n text: monthNames[activeMonth?.month || 0],\n size: 'sm',\n }}\n listProps={{\n menuItems: monthMenuItems,\n onSelect: handleMonthChange,\n maxH: 400,\n shouldRetainSelection: true,\n }}\n />\n <Menu\n buttonProps={{\n variant: 'tertiary',\n text: String(activeMonth?.year),\n size: 'sm',\n }}\n listProps={{\n menuItems: yearMenuItems,\n onSelect: handleYearChange,\n maxH: 200,\n shouldRetainSelection: true,\n }}\n onOpen={scrollToYear}\n />\n </Center>\n <Button iconName=\"chevronRight\" onClick={goToNextMonths} variant=\"ghostNeutral\" size=\"sm\" />\n </HStack>\n </PopoverHeader>\n );\n}\n","import isAfter from 'date-fns/isAfter';\nimport isBefore from 'date-fns/isBefore';\n\nexport const isDateAfterMin = (date: Date, minDate?: Date): boolean => (minDate ? isAfter(date, minDate) : true);\nexport const isDateBeforeMax = (date: Date, maxDate?: Date): boolean => (maxDate ? isBefore(date, maxDate) : true);\n","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param {Date|Number} date - the date that should be before the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is before the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\n\nexport default function isBefore(dirtyDate, dirtyDateToCompare) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dateToCompare = toDate(dirtyDateToCompare);\n return date.getTime() < dateToCompare.getTime();\n}","import React, { ChangeEvent, RefObject } from 'react';\nimport { PopoverTrigger, Flex, HStack } from '@chakra-ui/react';\nimport { TextInput, TextInputProps } from 'components/TextInput/textInput.component';\nimport { Icon } from 'components/Icon/icon.component';\nimport { Text } from 'components/Text/text.component';\nimport isDate from 'date-fns/isDate';\nimport { getInputValue, parseDate } from '@datepicker-react/hooks';\nimport { IconSizeMap } from '../../datepicker.records';\nimport { isDateAfterMin, isDateBeforeMax } from '../../datepicker.utils';\nimport { FocusedInput, today, useDatePickerContext } from 'components/DatePicker/context/datepicker.context';\nimport format from 'date-fns/format';\n\ninterface DatePickerInputProps {\n inputProps?: Omit<TextInputProps, 'onChange' | 'value' | 'isClearable' | 'onClear'>;\n startDateInputRef: RefObject<HTMLInputElement>;\n}\n\nconst focusedInputStyles = {\n borderColor: 'var(--chakra-colors-border-info) !important',\n borderWidth: '2px !important',\n};\n\nconst hoverInputStyles = {\n _hover: {\n borderWidth: '1px',\n borderColor: 'border.strong',\n },\n};\n\nexport function DatePickerInput({ inputProps, startDateInputRef }: DatePickerInputProps): JSX.Element {\n const {\n setFocusedInput,\n startDate,\n endDate,\n focusedInput,\n dateFormat,\n isDateRange,\n minDate,\n maxDate,\n onDateChange,\n onDateSelect,\n isOpen,\n onClose,\n } = useDatePickerContext();\n const iconSize = inputProps?.size ? IconSizeMap[inputProps.size] : 'md';\n\n const onKeyDown = (e: React.KeyboardEvent): void => {\n if (e.key === 'Enter' && isOpen) {\n onClose();\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n const onInputChange = (e: ChangeEvent<HTMLInputElement>): void => {\n const dateValue = e.target.value;\n const parsedDate = parseDate(dateValue, dateFormat, today);\n\n if (\n dateValue.length === dateFormat.length &&\n isDate(parsedDate) &&\n isDateAfterMin(parsedDate, minDate) &&\n isDateBeforeMax(parsedDate, maxDate)\n ) {\n onDateSelect(parsedDate);\n }\n\n // Trigger change when input is empty\n if (!dateValue.length && onDateChange) {\n onDateChange({ startDate: null, endDate: null });\n }\n };\n\n return (\n <PopoverTrigger>\n <HStack w=\"100%\">\n <TextInput\n data-testid=\"date-picker-text-input\"\n rightElement={\n <Flex\n {...(!inputProps?.isDisabled && {\n onClick: (): void => setFocusedInput(FocusedInput.StartDate),\n })}\n h=\"100%\"\n align=\"center\"\n >\n <Icon name=\"calendarDate\" size={iconSize} />\n </Flex>\n }\n value={getInputValue(startDate, dateFormat, '')}\n onChange={onInputChange}\n inputRef={startDateInputRef}\n onKeyDown={onKeyDown}\n {...(!inputProps?.isDisabled && {\n onFocus: (): void => setFocusedInput(FocusedInput.StartDate),\n })}\n placeholder={format(today, dateFormat).toString()}\n {...(focusedInput === FocusedInput.StartDate && focusedInputStyles)}\n {...hoverInputStyles}\n {...inputProps}\n />\n {isDateRange && (\n <>\n <Text> - </Text>\n <TextInput\n data-testid=\"date-picker-text-input\"\n rightElement={\n <Flex\n {...(!inputProps?.isDisabled && {\n onClick: (): void => setFocusedInput(FocusedInput.StartDate),\n })}\n h=\"100%\"\n align=\"center\"\n >\n <Icon name=\"calendarDate\" size={iconSize} />\n </Flex>\n }\n value={getInputValue(endDate, dateFormat, '')}\n onChange={onInputChange}\n {...(!inputProps?.isDisabled && {\n onFocus: (): void => setFocusedInput(FocusedInput.EndDate),\n })}\n onKeyDown={onKeyDown}\n placeholder={format(today, dateFormat).toString()}\n {...(focusedInput === FocusedInput.EndDate && focusedInputStyles)}\n {...hoverInputStyles}\n {...inputProps}\n />\n </>\n )}\n </HStack>\n </PopoverTrigger>\n );\n}\n","import { ButtonProps } from '../../../../Button/button.component';\n\nexport type DayVariant = 'default' | 'selectedStart' | 'disabled' | 'inRange' | 'selectedEnd';\nexport type CustomizableProperty = 'color' | 'background' | 'borderColor';\n\nexport const dayStyles: Record<DayVariant, Partial<ButtonProps>> = {\n default: {\n variant: 'ghostNeutral',\n },\n selectedStart: {\n variant: 'primary',\n },\n disabled: {\n isDisabled: true,\n variant: 'ghostNeutral',\n },\n inRange: {\n variant: 'ghost',\n borderRadius: '0',\n isActive: true,\n },\n selectedEnd: {\n variant: 'ghost',\n borderWidth: '2px',\n borderColor: 'border.info',\n },\n};\n","import React, { useRef, useMemo } from 'react';\nimport { useDay } from '@datepicker-react/hooks';\nimport { useDatePickerContext } from '../../../context/datepicker.context';\nimport { Button } from '../../../../Button/button.component';\nimport { DayVariant, dayStyles } from './day.config';\nimport format from 'date-fns/format';\nimport { Box } from '@chakra-ui/react';\n\ninterface DayProps {\n dayLabel: string;\n date: Date;\n onDaySelected: () => void;\n}\n\nexport const Day = ({ dayLabel, date, onDaySelected }: DayProps): JSX.Element => {\n const today = new Date();\n const dayRef = useRef(null);\n const { startDate, endDate, dateFormat } = useDatePickerContext();\n const formattedDates = useMemo(\n () => ({\n currentDay: format(date, dateFormat),\n startDate: startDate && format(startDate, dateFormat),\n endDate: endDate && format(endDate, dateFormat),\n }),\n [date, dateFormat, endDate, startDate],\n );\n const isRangeStart = formattedDates.currentDay === formattedDates.startDate;\n const isRangeEnd = formattedDates.currentDay === formattedDates.endDate;\n const isToday = formattedDates.currentDay === format(today, dateFormat);\n\n const {\n focusedDate,\n isDateFocused,\n isDateSelected,\n isDateHovered,\n isDateBlocked,\n isFirstOrLastSelectedDate,\n onDateSelect,\n onDateFocus,\n onDateHover,\n } = useDatePickerContext();\n\n const { disabledDate, isSelected, onClick, onKeyDown, onMouseEnter, tabIndex } = useDay({\n date,\n focusedDate,\n isDateFocused,\n isDateSelected,\n isDateHovered,\n isDateBlocked,\n isFirstOrLastSelectedDate,\n onDateFocus,\n onDateSelect,\n onDateHover,\n dayRef,\n });\n\n const buttonVariant = useMemo((): DayVariant => {\n switch (true) {\n case disabledDate:\n return 'disabled';\n case isRangeStart:\n return 'selectedStart';\n case isRangeEnd:\n return 'selectedEnd';\n case isSelected && !isRangeStart && !isRangeEnd:\n return 'inRange';\n default:\n return 'default';\n }\n }, [disabledDate, isRangeEnd, isRangeStart, isSelected]);\n\n if (!dayLabel) {\n return <></>;\n }\n\n const onSelectDay = (): void => {\n onClick();\n onDaySelected();\n };\n\n return (\n <Button\n onClick={onSelectDay}\n onKeyDown={onKeyDown}\n onMouseEnter={onMouseEnter}\n tabIndex={tabIndex}\n type=\"button\"\n ref={dayRef}\n size=\"sm\"\n fontWeight=\"normal\"\n isDisabled={disabledDate}\n overflow=\"hidden\"\n pos=\"relative\"\n data-testid={formattedDates.currentDay}\n {...dayStyles[buttonVariant]}\n >\n {isToday && (\n <Box\n pos=\"absolute\"\n w=\"6\"\n h=\"6\"\n top=\"-4\"\n right=\"-4\"\n transform=\"rotate(45deg)\"\n bg={isRangeStart ? 'background.default' : 'background.primary'}\n />\n )}\n {dayLabel}\n </Button>\n );\n};\n","import React, { useRef } from 'react';\nimport { useMonth } from '@datepicker-react/hooks';\nimport { Text } from '../../../../Text/text.component';\nimport { Box, Center, Grid, GridItem } from '@chakra-ui/react';\nimport { Day } from '../Day/day.component';\nimport { currentMonth, currentYear, useDatePickerContext } from 'components/DatePicker/context/datepicker.context';\n\nexport interface MonthProps {\n onDaySelected: () => void;\n}\n\nexport const Month = ({ onDaySelected }: MonthProps): JSX.Element => {\n const ref = useRef<HTMLDivElement | null>(null);\n const { firstDayOfWeek, activeMonth } = useDatePickerContext();\n\n const { days, weekdayLabels } = useMonth({\n year: activeMonth?.year || currentYear,\n month: activeMonth?.month !== undefined ? activeMonth.month : currentMonth,\n firstDayOfWeek,\n });\n\n return (\n <Box ref={ref}>\n <Grid templateColumns=\"repeat(7, 1fr)\" my={2}>\n {weekdayLabels.map((weekdayLabel: string) => (\n <GridItem key={weekdayLabel}>\n <Center>\n <Text size=\"xs\" variant=\"subtle\">\n {weekdayLabel}\n </Text>\n </Center>\n </GridItem>\n ))}\n </Grid>\n <Grid templateColumns=\"repeat(7, 1fr)\">\n {days.map((day, index) =>\n typeof day === 'object' ? (\n <Day key={day.date.toString()} date={day.date} dayLabel={day.dayLabel} onDaySelected={onDaySelected} />\n ) : (\n <div key={index} />\n ),\n )}\n </Grid>\n </Box>\n );\n};\n","import { Grid, PopoverBody } from '@chakra-ui/react';\nimport { useDatePickerContext } from 'components/DatePicker/context/datepicker.context';\nimport React from 'react';\nimport { Month } from './Month/month.component';\n\nexport function DatePickerCalendar(): JSX.Element {\n const { isDateRange, activeMonths, onClose } = useDatePickerContext();\n\n const handleDaySelected = (): void => {\n if (!isDateRange) {\n onClose();\n }\n };\n\n return (\n <PopoverBody>\n <Grid gap=\"0 64px\">\n {activeMonths.map((month) => (\n <Month key={`${month.year}-${month.month}`} onDaySelected={handleDaySelected} />\n ))}\n </Grid>\n </PopoverBody>\n );\n}\n","import React, { useCallback } from 'react';\nimport { Button } from 'components/Button/button.component';\nimport { PopoverFooter, HStack } from '@chakra-ui/react';\nimport { useDatePickerContext } from 'components/DatePicker/context/datepicker.context';\nimport { DateRange } from 'components/DatePicker/datepicker.component';\n\nexport interface DatePickerFooterProps {\n buttonText?: string;\n onSubmit?: ({ startDate, endDate }: DateRange) => void;\n hideResetButton?: boolean;\n}\n\nexport function DatePickerFooter({\n buttonText = 'Apply',\n onSubmit,\n hideResetButton,\n}: DatePickerFooterProps): JSX.Element {\n const { startDate, endDate, onClose, clearDates } = useDatePickerContext();\n\n const handleSubmit = useCallback((): void => {\n onClose();\n\n if (onSubmit) {\n onSubmit({ startDate, endDate });\n }\n }, [onClose, onSubmit, startDate, endDate]);\n\n return (\n <PopoverFooter>\n <HStack w=\"100%\" justify={hideResetButton ? 'end' : 'space-between'} align=\"center\">\n {!hideResetButton && (\n <Button size=\"sm\" variant=\"ghostNeutral\" onClick={clearDates}>\n Clear Dates\n </Button>\n )}\n <Button size=\"sm\" onClick={handleSubmit}>\n {buttonText}\n </Button>\n </HStack>\n </PopoverFooter>\n );\n}\n","import React, { useRef } from 'react';\nimport { PopoverContent, PlacementWithLogical } from '@chakra-ui/react';\nimport { TextInputProps } from '../TextInput/textInput.component';\nimport { DatePickerProvider } from './context/datepicker.provider';\nimport { DateFormats } from './datepicker.types';\nimport { DatePickerHeader } from './components/Header/header.component';\nimport { DatePickerInput } from './components/Input/input.component';\nimport { DatePickerCalendar } from './components/Calendar/calendar.component';\nimport { DatePickerFooterProps, DatePickerFooter } from './components/Footer/footer.component';\n\n/**\n *\n * Note: Be careful with dateFormat and allowing search (inputProps.IsReadOnly = false) as changing the format\n * can cause exceptions to be thrown.\n *\n * More dateFormat info: https://github.com/date-fns/date-fns/blob/main/docs/unicodeTokens.md\n */\n\nexport interface DateRange {\n startDate: Date | null;\n endDate?: Date | null;\n}\n\nexport interface DatePickerProps {\n dateFormat?: string | DateFormats;\n endDate?: Date | null;\n footerProps?: DatePickerFooterProps;\n hideFooter?: boolean;\n inputProps?: Omit<TextInputProps, 'onChange' | 'value' | 'isClearable' | 'onClear'>;\n isDateRange?: boolean;\n maxDate?: Date;\n maxYear?: number;\n maxDaysInRange?: number;\n minDate?: Date;\n minYear?: number;\n onDateChange?: ({ startDate, endDate }: DateRange) => void;\n placement?: PlacementWithLogical;\n startDate: Date | null;\n}\n\nexport const DatePicker = (props: DatePickerProps): JSX.Element => {\n const { isDateRange = false, hideFooter = false, footerProps, inputProps } = props;\n const calendarRef = useRef<HTMLDivElement>(null);\n const startDateInputRef = useRef<HTMLInputElement>(null);\n\n const scrollToYear = (): void => {\n setTimeout(() => {\n const currentYearNode = calendarRef?.current?.querySelector('.MenuList__Item.current');\n if (currentYearNode) {\n currentYearNode.scrollIntoView({ block: 'center' });\n }\n });\n };\n\n return (\n <DatePickerProvider calendarRef={calendarRef} {...props}>\n <DatePickerInput inputProps={inputProps} startDateInputRef={startDateInputRef} />\n <PopoverContent ref={calendarRef} shadow=\"md\" data-testid=\"calendar-popover\">\n <DatePickerHeader scrollToYear={scrollToYear} />\n <DatePickerCalendar />\n {isDateRange && !hideFooter && <DatePickerFooter {...footerProps} />}\n </PopoverContent>\n </DatePickerProvider>\n );\n};\n"],"names":["addDays","dirtyDate","dirtyAmount","requiredArgs","arguments","date","toDate","amount","toInteger","isNaN","Date","NaN","setDate","getDate","addMonths","dayOfMonth","endOfDesiredMonth","getTime","setMonth","getMonth","daysInMonth","setFullYear","getFullYear","_typeof","obj","Symbol","iterator","constructor","prototype","isAfter","dirtyDateToCompare","dateToCompare","DatePickerProvider","children","dateFormat","defaultDateFormat","endDate","inputProps","isDateRange","maxDate","maxYear","maxDaysInRange","minDate","minYear","onDateChange","placement","startDate","onOpen","onClose","isOpen","useDisclosure","state","setState","useState","focusedInput","getMaxBookingDate","useCallback","duration","years","months","weeks","days","hours","minutes","seconds","dateWithMonths","dateWithDays","msToAdd","add","clearDates","FocusedInput","StartDate","activeMonths","firstDayOfWeek","focusedDate","goToDate","goToNextMonths","goToPreviousMonths","isDateBlocked","isDateFocused","isDateHovered","isDateSelected","isFirstOrLastSelectedDate","onDateFocus","onDateHover","onDateSelect","useDatepicker","Ye","initialVisibleMonth","today","maxBookingDate","undefined","minBookingDate","minBookingDays","numberOfMonths","onDatesChange","data","_maxBookingDate","startOfDay","setHours","endOfDay","Object","assign","exactMinBookingDays","navigateToFocusedInputDate","EndDate","setFocusedInput","prevState","handleClose","setTimeout","activeMonth","useMemo","useEffect","React","createElement","DatePickerContext","Provider","value","defaultFocusedDate","defaultMaxYear","defaultMinYear","Popover","isDisabled","nativeCeil","Math","ceil","nativeMax","max","_baseRange","start","end","step","fromRight","index","length","result","Array","eq_1","other","isObject_1","type","baseGetTag","require$$0","_baseGetTag","isObject","require$$1","isFunction","tag","isLength","reIsUint","eq","isArrayLike","isIndex","test","require$$3","_isIterateeCall","object","reWhitespace","_trimmedEndIndex","string","charAt","trimmedEndIndex","reTrimStart","_baseTrim","slice","replace","isObjectLike_1","isObjectLike","baseTrim","isSymbol","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","toNumber","valueOf","isBinary","baseRange","isIterateeCall","toFinite","range_1","createRange","IconSizeMap","sm","md","lg","monthNames","getDaysInMonth","year","monthIndex","lastDayOfMonth","dirtyMonth","month","day","dateWithDesiredMonth","min","set","values","RangeError","setMinutes","setSeconds","milliseconds","setMilliseconds","DatePickerHeader","scrollToYear","useDatePickerContext","monthMenuItems","map","label","String","isSelected","yearMenuItems","range","stringYear","PopoverHeader","justifyItems","HStack","w","justify","Button","iconName","onClick","variant","size","Center","gap","h","Menu","buttonProps","text","listProps","menuItems","onSelect","selectedItem","Number","maxH","shouldRetainSelection","isDateBeforeMax","isBefore","focusedInputStyles","borderColor","borderWidth","hoverInputStyles","_hover","DatePickerInput","startDateInputRef","iconSize","onKeyDown","e","key","preventDefault","stopPropagation","onInputChange","dateValue","target","parsedDate","parseDate","xt","isDate","isDateAfterMin","PopoverTrigger","TextInput","rightElement","Flex","align","Icon","name","getInputValue","onChange","inputRef","onFocus","placeholder","format","toString","Fragment","Text","dayStyles","default","selectedStart","disabled","inRange","borderRadius","isActive","selectedEnd","Day","dayLabel","onDaySelected","dayRef","useRef","formattedDates","currentDay","isRangeStart","isRangeEnd","isToday","disabledDate","onMouseEnter","tabIndex","useDay","buttonVariant","ref","fontWeight","overflow","pos","Box","top","right","transform","bg","Month","weekdayLabels","useMonth","currentYear","currentMonth","Grid","templateColumns","my","weekdayLabel","GridItem","DatePickerCalendar","handleDaySelected","PopoverBody","DatePickerFooter","buttonText","onSubmit","hideResetButton","handleSubmit","PopoverFooter","props","hideFooter","footerProps","calendarRef","PopoverContent","shadow","currentYearNode","_a","current","querySelector","scrollIntoView","block"],"mappings":"ykBAsBe,SAASA,EAAQC,EAAWC,GACzCC,eAAa,EAAGC,WAChB,IAAIC,EAAOC,SAAOL,GACdM,EAASC,YAAUN,GAEvB,OAAIO,MAAMF,GACD,IAAIG,KAAKC,KAG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GAChDvN,EAAC,QAAAC,cAAAmI,IAAgBhN,WAAYA,EAAYiN,kBAAmBA,IAC5DrI,UAACC,cAAA0N,EAAcA,eAAC,CAAAhC,IAAK+B,EAAaE,OAAO,KAAI,cAAa,oBACxD5N,EAAAA,QAAAC,cAAC0F,GAAgB,CAACC,aAbH,KACnBhG,YAAW,WACT,MAAMiO,EAAwC,QAAtBC,EAAAJ,MAAAA,OAAW,EAAXA,EAAaK,eAAS,IAAAD,OAAA,EAAAA,EAAAE,cAAc,2BACxDH,GACFA,EAAgBI,eAAe,CAAEC,MAAO,iBAUxClO,UAAAC,cAAC6M,GAAqB,MACrBzR,IAAgBmS,GAAcxN,EAAC,QAAAC,cAAAgN,GAAqB7N,OAAAC,OAAA,GAAAoO"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("./tslib.es6-d6f17add.js"),t=require("react"),r=require("./sortableItem.context-5bba7c97.js"),a=require("./core.esm-3a85aed4.js"),s=require("./button.component-15b49687.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(t);exports.DragHandle=n=>{var u=e.__rest(n,[]);const{attributes:i,listeners:c,ref:b}=t.useContext(r.SortableItemContext),l=a.useDndContext();return o.default.createElement(s.Button,Object.assign({cursor:l.activatorEvent?"grabbing":"grab",iconName:"grid",size:"sm",variant:"ghostNeutral",className:"DragHandle"},i,c,{ref:b},u))};
|
|
2
|
+
//# sourceMappingURL=dragHandle.component-87559e3a.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dragHandle.component-
|
|
1
|
+
{"version":3,"file":"dragHandle.component-87559e3a.js","sources":["../src/components/SortableList/components/DragHandle/dragHandle.component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { SortableItemContext } from '../SortableItem/sortableItem.context';\nimport { useDndContext } from '@dnd-kit/core';\nimport { Button, ButtonProps } from '../../../Button/button.component';\n\nexport interface DragHandleProps extends ButtonProps {}\n\nexport const DragHandle = ({ ...rest }: DragHandleProps): JSX.Element => {\n const { attributes, listeners, ref } = useContext(SortableItemContext);\n const dndContext = useDndContext();\n\n return (\n <Button\n cursor={dndContext.activatorEvent ? 'grabbing' : 'grab'}\n iconName=\"grid\"\n size=\"sm\"\n variant=\"ghostNeutral\"\n className=\"DragHandle\"\n {...attributes}\n {...listeners}\n ref={ref}\n {...rest}\n />\n );\n};\n"],"names":["_a","rest","__rest","attributes","listeners","ref","useContext","SortableItemContext","dndContext","useDndContext","React","Button","Object","assign","cursor","activatorEvent","iconName","size","variant","className"],"mappings":"+SAO2BA,QAAKC,EAAIC,EAAAA,OAAAF,EAAT,IACzB,MAAMG,WAAEA,EAAUC,UAAEA,EAASC,IAAEA,GAAQC,EAAAA,WAAWC,EAAAA,qBAC5CC,EAAaC,EAAAA,gBAEnB,OACEC,wBAACC,SAAMC,OAAAC,OAAA,CACLC,OAAQN,EAAWO,eAAiB,WAAa,OACjDC,SAAS,OACTC,KAAK,KACLC,QAAQ,eACRC,UAAU,cACNhB,EACAC,GACJC,IAAKA,GACDJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";var e=require("./tslib.es6-d6f17add.js"),r=require("react"),a=require("./icons/index.js"),t=require("./chakra-ui-layout.esm-0601b9a5.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(r);const c={xs:14,sm:16,md:20,lg:24,xl:32,"2xl":38},l=r.forwardRef(((o,l)=>{var{name:n,size:i="lg",color:u,variant:d}=o,m=e.__rest(o,["name","size","color","variant"]);const x=a.IconMap[n],p=c[i]+"px",f=r.useMemo((()=>d?`text.${d}`:u),[d,u]);return s.default.createElement(t.Box,Object.assign({className:"Icon__Wrapper",color:f,display:"inline-block"},m),s.default.createElement(x,{className:"Icon",ref:l,width:p,height:p,color:"currentColor"}))}));l.displayName="Icon",exports.Icon=l,exports.IconSizeMap=c,exports.iconSizes=["xs","sm","md","lg","xl","2xl"];
|
|
2
|
-
//# sourceMappingURL=icon.component-
|
|
2
|
+
//# sourceMappingURL=icon.component-8d0ca544.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.component-
|
|
1
|
+
{"version":3,"file":"icon.component-8d0ca544.js","sources":["../src/components/Icon/icon.types.ts","../src/components/Icon/icon.component.tsx"],"sourcesContent":["export { IconName } from '../../icons/index';\n\nexport const iconSizes = ['xs', 'sm', 'md', 'lg', 'xl', '2xl'] as const;\nexport type IconSize = (typeof iconSizes)[number];\n\nexport const IconSizeMap: Record<IconSize, number> = {\n xs: 14,\n sm: 16,\n md: 20,\n lg: 24,\n xl: 32,\n '2xl': 38,\n};\n","import React, { ForwardedRef, forwardRef, useMemo } from 'react';\nimport { IconSize, IconSizeMap } from './icon.types';\nimport { IconMap, IconName } from '../../icons';\nimport { Box, BoxProps } from '@chakra-ui/react';\nimport { TypographyVariant } from '../../shared/types/typography';\nimport { SemanticTypographyToken } from '../../theme/tokens';\n\nexport interface BaseIconProps {\n name: IconName;\n size?: IconSize;\n variant?: TypographyVariant;\n color?: string | SemanticTypographyToken;\n}\n\nexport type IconProps = BaseIconProps & BoxProps;\n\nexport const Icon = forwardRef(\n ({ name, size = 'lg', color, variant, ...rest }: IconProps, ref: ForwardedRef<any>): JSX.Element => {\n const MappedIcon = IconMap[name];\n const d = IconSizeMap[size] + 'px';\n\n const iconColor = useMemo(() => {\n return variant ? `text.${variant}` : color;\n }, [variant, color]);\n\n return (\n <Box className=\"Icon__Wrapper\" color={iconColor} display=\"inline-block\" {...rest}>\n <MappedIcon className=\"Icon\" ref={ref} width={d} height={d} color=\"currentColor\" />\n </Box>\n );\n },\n);\n\nIcon.displayName = 'Icon';\n"],"names":["IconSizeMap","xs","sm","md","lg","xl","Icon","forwardRef","_a","ref","name","size","color","variant","rest","__rest","MappedIcon","IconMap","d","iconColor","useMemo","React","createElement","Box","Object","assign","className","display","width","height","displayName"],"mappings":"0OAEa,MAGAA,EAAwC,CACnDC,GAAI,GACJC,GAAI,GACJC,GAAI,GACJC,GAAI,GACJC,GAAI,GACJ,MAAO,ICKIC,EAAOC,EAAUA,YAC5B,CAACC,EAA2DC,KAA3D,IAAAC,KAAEA,EAAIC,KAAEA,EAAO,KAAIC,MAAEA,EAAKC,QAAEA,GAA6BL,EAAjBM,EAAIC,EAAAA,OAAAP,EAA5C,mCACC,MAAMQ,EAAaC,UAAQP,GACrBQ,EAAIlB,EAAYW,GAAQ,KAExBQ,EAAYC,EAAAA,SAAQ,IACjBP,EAAU,QAAQA,IAAYD,GACpC,CAACC,EAASD,IAEb,OACES,EAAC,QAAAC,cAAAC,EAAGA,IAACC,OAAAC,OAAA,CAAAC,UAAU,gBAAgBd,MAAOO,EAAWQ,QAAQ,gBAAmBb,GAC1EO,EAAC,QAAAC,cAAAN,EAAW,CAAAU,UAAU,OAAOjB,IAAKA,EAAKmB,MAAOV,EAAGW,OAAQX,EAAGN,MAAM,qBAM1EN,EAAKwB,YAAc,8DD/BM,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM"}
|
package/build/icons/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type IconName = 'alertCircle' | 'animalBird' | 'animalCat' | 'animalCow' | 'animalDog' | 'animalHorse' | 'animalMouse' | 'animalPig' | 'animalSnake' | 'archive' | 'arrowCircle' | 'arrowDownRight' | 'arrowDown' | 'arrowLeft' | 'arrowRight' | 'arrowUp' | 'arrowsIn' | 'arrowsOut' | 'article' | 'award' | 'bank' | 'bellCancel' | 'bell' | 'bone' | 'bookmark' | 'bulkSelect' | 'buttons' | 'calendarCheck' | 'calendarDate' | 'calendarInfo' | 'calendarPen' | 'calendarPlus' | 'cameraOff' | 'camera' | 'cancel' | 'caretDown' | 'caretUp' | 'cellphoneCancel' | 'cellphone' | 'chainLink' | 'chatBubble' | 'checkmarkBox' | 'checkmarkCircle' | 'checkmark' | 'chevronDown' | 'chevronLeft' | 'chevronRight' | 'chevronUp' | 'clinic' | 'clock' | 'closeCircleSolid' | 'closeCircle' | 'close' | 'code' | 'creditCardLogoAmex' | 'creditCardLogoDiners' | 'creditCardLogoDiscover' | 'creditCardLogoGeneric' | 'creditCardLogoJcb' | 'creditCardLogoMastercard' | 'creditCardLogoUnionpay' | 'creditCardLogoVisa' | 'creditCard' | 'cut' | 'dollarCircle' | 'dollar' | 'dotsHorizontal' | 'dotsVertical' | 'doubleArrowCircle' | 'download' | 'emailSend' | 'envelopeCancel' | 'envelope' | 'externalLink' | 'eyeOpen' | 'eyeSlash' | 'eyedropper' | 'fileHealth' | 'filter' | 'form' | '
|
|
1
|
+
export type IconName = 'alertCircle' | 'animalBird' | 'animalCat' | 'animalCow' | 'animalDog' | 'animalHorse' | 'animalMouse' | 'animalPig' | 'animalSnake' | 'archive' | 'arrowCircle' | 'arrowDownRight' | 'arrowDown' | 'arrowLeft' | 'arrowRight' | 'arrowUp' | 'arrowsIn' | 'arrowsOut' | 'article' | 'award' | 'bank' | 'bellCancel' | 'bell' | 'bone' | 'bookmark' | 'bulkSelect' | 'buttons' | 'calendarCheck' | 'calendarDate' | 'calendarInfo' | 'calendarPen' | 'calendarPlus' | 'cameraOff' | 'camera' | 'cancel' | 'caretDown' | 'caretUp' | 'cellphoneCancel' | 'cellphone' | 'chainLink' | 'chatBubble' | 'checkmarkBox' | 'checkmarkCircle' | 'checkmark' | 'chevronDown' | 'chevronLeft' | 'chevronRight' | 'chevronUp' | 'clinic' | 'clock' | 'closeCircleSolid' | 'closeCircle' | 'close' | 'code' | 'creditCardLogoAmex' | 'creditCardLogoDiners' | 'creditCardLogoDiscover' | 'creditCardLogoGeneric' | 'creditCardLogoJcb' | 'creditCardLogoMastercard' | 'creditCardLogoUnionpay' | 'creditCardLogoVisa' | 'creditCard' | 'cut' | 'dollarCircle' | 'dollar' | 'dotsHorizontal' | 'dotsVertical' | 'doubleArrowCircle' | 'download' | 'emailSend' | 'envelopeCancel' | 'envelope' | 'externalLink' | 'eyeOpen' | 'eyeSlash' | 'eyedropper' | 'fileHealth' | 'filter' | 'form' | 'gear' | 'gif' | 'grid' | 'hashtag' | 'health' | 'heartSolid' | 'heart' | 'house' | 'image' | 'infoCircle' | 'input' | 'invoice' | 'kanbanBoard' | 'list' | 'loader' | 'locationMarker' | 'lock' | 'logo' | 'loudspeaker' | 'magic' | 'magnifyingGlass' | 'mailbox' | 'menu' | 'messageDetail' | 'messageWarning' | 'message' | 'messages' | 'microphoneMute' | 'microphone' | 'minus' | 'moveDown' | 'moveLeft' | 'moveRight' | 'moveUp' | 'notification' | 'package' | 'paperclip' | 'pause' | 'paw' | 'penSquare' | 'pen' | 'personAdd' | 'personCircle' | 'person' | 'phoneButtons' | 'phoneCancel' | 'phone' | 'pill' | 'pinCancel' | 'pin' | 'play' | 'plus' | 'popup' | 'printer' | 'questionMarkCircleSolid' | 'questionMarkCircle' | 'questionMark' | 'record' | 'report' | 'ribbon' | 'robot' | 'send' | 'sliders' | 'smileyFace' | 'sort' | 'starCircle' | 'starSolid' | 'star' | 'stopRecording' | 'stop' | 'support' | 'table' | 'tag' | 'targetSolid' | 'target' | 'taskList' | 'team' | 'thumbsDown' | 'thumbsUp' | 'transfer' | 'trashcan' | 'twoSquares' | 'upload' | 'videoCamera' | 'warningSign' | 'website' | 'wrench';
|
|
2
2
|
export declare const IconMap: Record<IconName, any>;
|