@coopdigital/react 0.49.1 → 0.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/dist/components/Button/Button.js +2 -2
  2. package/dist/components/Button/index.js +5 -0
  3. package/dist/components/Card/Card.js +4 -4
  4. package/dist/components/Checkbox/Checkbox.d.ts +7 -1
  5. package/dist/components/Checkbox/Checkbox.js +4 -0
  6. package/dist/components/DatePicker/DatePicker.d.ts +61 -0
  7. package/dist/components/DatePicker/DatePicker.js +135 -0
  8. package/dist/components/DatePicker/datepicker-utils.d.ts +68 -0
  9. package/dist/components/DatePicker/datepicker-utils.js +215 -0
  10. package/dist/components/DatePicker/index.d.ts +4 -0
  11. package/dist/components/Field/Field.js +29 -26
  12. package/dist/components/Field/index.js +6 -0
  13. package/dist/components/Pill/Pill.js +2 -2
  14. package/dist/components/Popover/Popover.d.ts +74 -0
  15. package/dist/components/Popover/Popover.js +75 -0
  16. package/dist/components/Popover/index.d.ts +4 -0
  17. package/dist/components/Popover/index.js +5 -0
  18. package/dist/components/Radio/Radio.d.ts +7 -1
  19. package/dist/components/Radio/Radio.js +4 -0
  20. package/dist/components/Searchbox/Searchbox.js +4 -3
  21. package/dist/components/Select/Select.d.ts +3 -0
  22. package/dist/components/Select/Select.js +4 -1
  23. package/dist/components/Signpost/Signpost.js +2 -2
  24. package/dist/components/Tag/Tag.js +2 -2
  25. package/dist/components/TextInput/TextInput.d.ts +6 -1
  26. package/dist/components/TextInput/TextInput.js +3 -0
  27. package/dist/components/Textarea/Textarea.d.ts +8 -5
  28. package/dist/components/Textarea/Textarea.js +5 -4
  29. package/dist/hooks/useSlots.js +3 -3
  30. package/dist/index.d.ts +2 -0
  31. package/dist/index.js +2 -0
  32. package/dist/node_modules/@date-fns/tz/date/index.js +83 -0
  33. package/dist/node_modules/@date-fns/tz/date/mini.js +235 -0
  34. package/dist/node_modules/@date-fns/tz/tzName/index.js +39 -0
  35. package/dist/node_modules/@date-fns/tz/tzOffset/index.js +44 -0
  36. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +814 -0
  37. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +751 -0
  38. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +350 -0
  39. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +161 -0
  40. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +137 -0
  41. package/dist/node_modules/@radix-ui/primitive/dist/index.js +11 -0
  42. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +25 -0
  43. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +39 -0
  44. package/dist/node_modules/@radix-ui/react-context/dist/index.js +63 -0
  45. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +213 -0
  46. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +31 -0
  47. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +209 -0
  48. package/dist/node_modules/@radix-ui/react-id/dist/index.js +15 -0
  49. package/dist/node_modules/@radix-ui/react-popover/dist/index.js +303 -0
  50. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +285 -0
  51. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +19 -0
  52. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +132 -0
  53. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +43 -0
  54. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +89 -0
  55. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +12 -0
  56. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +70 -0
  57. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +18 -0
  58. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
  59. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +40 -0
  60. package/dist/node_modules/aria-hidden/dist/es2015/index.js +137 -0
  61. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +7 -0
  62. package/dist/node_modules/date-fns/_lib/defaultOptions.js +7 -0
  63. package/dist/node_modules/date-fns/_lib/format/formatters.js +775 -0
  64. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +94 -0
  65. package/dist/node_modules/date-fns/_lib/format/longFormatters.js +66 -0
  66. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +31 -0
  67. package/dist/node_modules/date-fns/_lib/normalizeDates.js +11 -0
  68. package/dist/node_modules/date-fns/_lib/normalizeInterval.js +8 -0
  69. package/dist/node_modules/date-fns/_lib/protectedTokens.js +25 -0
  70. package/dist/node_modules/date-fns/addDays.js +41 -0
  71. package/dist/node_modules/date-fns/addMonths.js +75 -0
  72. package/dist/node_modules/date-fns/addWeeks.js +33 -0
  73. package/dist/node_modules/date-fns/addYears.js +33 -0
  74. package/dist/node_modules/date-fns/constants.js +67 -0
  75. package/dist/node_modules/date-fns/constructFrom.js +49 -0
  76. package/dist/node_modules/date-fns/differenceInCalendarDays.js +62 -0
  77. package/dist/node_modules/date-fns/differenceInCalendarMonths.js +42 -0
  78. package/dist/node_modules/date-fns/eachMonthOfInterval.js +65 -0
  79. package/dist/node_modules/date-fns/eachYearOfInterval.js +65 -0
  80. package/dist/node_modules/date-fns/endOfISOWeek.js +35 -0
  81. package/dist/node_modules/date-fns/endOfMonth.js +37 -0
  82. package/dist/node_modules/date-fns/endOfWeek.js +53 -0
  83. package/dist/node_modules/date-fns/endOfYear.js +37 -0
  84. package/dist/node_modules/date-fns/format.js +423 -0
  85. package/dist/node_modules/date-fns/getDayOfYear.js +34 -0
  86. package/dist/node_modules/date-fns/getDaysInMonth.js +36 -0
  87. package/dist/node_modules/date-fns/getDefaultOptions.js +31 -0
  88. package/dist/node_modules/date-fns/getISODay.js +33 -0
  89. package/dist/node_modules/date-fns/getISOWeek.js +40 -0
  90. package/dist/node_modules/date-fns/getISOWeekYear.js +52 -0
  91. package/dist/node_modules/date-fns/getMonth.js +29 -0
  92. package/dist/node_modules/date-fns/getWeek.js +54 -0
  93. package/dist/node_modules/date-fns/getWeekYear.js +75 -0
  94. package/dist/node_modules/date-fns/getYear.js +29 -0
  95. package/dist/node_modules/date-fns/isAfter.js +25 -0
  96. package/dist/node_modules/date-fns/isBefore.js +25 -0
  97. package/dist/node_modules/date-fns/isDate.js +41 -0
  98. package/dist/node_modules/date-fns/isSameDay.js +46 -0
  99. package/dist/node_modules/date-fns/isSameMonth.js +43 -0
  100. package/dist/node_modules/date-fns/isSameYear.js +35 -0
  101. package/dist/node_modules/date-fns/isValid.js +39 -0
  102. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +10 -0
  103. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +64 -0
  104. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +59 -0
  105. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +22 -0
  106. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +103 -0
  107. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +41 -0
  108. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +13 -0
  109. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +189 -0
  110. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +134 -0
  111. package/dist/node_modules/date-fns/locale/en-US.js +28 -0
  112. package/dist/node_modules/date-fns/max.js +49 -0
  113. package/dist/node_modules/date-fns/min.js +49 -0
  114. package/dist/node_modules/date-fns/parse/_lib/Parser.js +27 -0
  115. package/dist/node_modules/date-fns/parse/_lib/Setter.js +59 -0
  116. package/dist/node_modules/date-fns/parse/_lib/constants.js +33 -0
  117. package/dist/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +55 -0
  118. package/dist/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js +55 -0
  119. package/dist/node_modules/date-fns/parse/_lib/parsers/DateParser.js +59 -0
  120. package/dist/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js +57 -0
  121. package/dist/node_modules/date-fns/parse/_lib/parsers/DayParser.js +64 -0
  122. package/dist/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js +56 -0
  123. package/dist/node_modules/date-fns/parse/_lib/parsers/EraParser.js +41 -0
  124. package/dist/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js +24 -0
  125. package/dist/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +21 -0
  126. package/dist/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js +36 -0
  127. package/dist/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js +31 -0
  128. package/dist/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js +32 -0
  129. package/dist/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js +38 -0
  130. package/dist/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js +118 -0
  131. package/dist/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +47 -0
  132. package/dist/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +47 -0
  133. package/dist/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js +48 -0
  134. package/dist/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +44 -0
  135. package/dist/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js +96 -0
  136. package/dist/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js +47 -0
  137. package/dist/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +76 -0
  138. package/dist/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js +31 -0
  139. package/dist/node_modules/date-fns/parse/_lib/parsers/MonthParser.js +86 -0
  140. package/dist/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js +83 -0
  141. package/dist/node_modules/date-fns/parse/_lib/parsers/SecondParser.js +31 -0
  142. package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +97 -0
  143. package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +86 -0
  144. package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +83 -0
  145. package/dist/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +19 -0
  146. package/dist/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +19 -0
  147. package/dist/node_modules/date-fns/parse/_lib/parsers/YearParser.js +62 -0
  148. package/dist/node_modules/date-fns/parse/_lib/parsers.js +110 -0
  149. package/dist/node_modules/date-fns/parse/_lib/utils.js +135 -0
  150. package/dist/node_modules/date-fns/parse.js +497 -0
  151. package/dist/node_modules/date-fns/setDay.js +59 -0
  152. package/dist/node_modules/date-fns/setISODay.js +40 -0
  153. package/dist/node_modules/date-fns/setISOWeek.js +39 -0
  154. package/dist/node_modules/date-fns/setMonth.js +46 -0
  155. package/dist/node_modules/date-fns/setWeek.js +53 -0
  156. package/dist/node_modules/date-fns/setYear.js +40 -0
  157. package/dist/node_modules/date-fns/startOfDay.js +35 -0
  158. package/dist/node_modules/date-fns/startOfISOWeek.js +35 -0
  159. package/dist/node_modules/date-fns/startOfISOWeekYear.js +42 -0
  160. package/dist/node_modules/date-fns/startOfMonth.js +37 -0
  161. package/dist/node_modules/date-fns/startOfWeek.js +53 -0
  162. package/dist/node_modules/date-fns/startOfWeekYear.js +64 -0
  163. package/dist/node_modules/date-fns/startOfYear.js +36 -0
  164. package/dist/node_modules/date-fns/toDate.js +46 -0
  165. package/dist/node_modules/date-fns/transpose.js +52 -0
  166. package/dist/node_modules/get-nonce/dist/es2015/index.js +8 -0
  167. package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +320 -0
  168. package/dist/node_modules/react-day-picker/dist/esm/UI.js +122 -0
  169. package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js +33 -0
  170. package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js +14 -0
  171. package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js +13 -0
  172. package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +604 -0
  173. package/dist/node_modules/react-day-picker/dist/esm/components/Button.js +13 -0
  174. package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js +13 -0
  175. package/dist/node_modules/react-day-picker/dist/esm/components/Chevron.js +20 -0
  176. package/dist/node_modules/react-day-picker/dist/esm/components/Day.js +18 -0
  177. package/dist/node_modules/react-day-picker/dist/esm/components/DayButton.js +19 -0
  178. package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown.js +21 -0
  179. package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav.js +13 -0
  180. package/dist/node_modules/react-day-picker/dist/esm/components/Footer.js +13 -0
  181. package/dist/node_modules/react-day-picker/dist/esm/components/Month.js +15 -0
  182. package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption.js +14 -0
  183. package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid.js +13 -0
  184. package/dist/node_modules/react-day-picker/dist/esm/components/Months.js +13 -0
  185. package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js +15 -0
  186. package/dist/node_modules/react-day-picker/dist/esm/components/Nav.js +31 -0
  187. package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js +15 -0
  188. package/dist/node_modules/react-day-picker/dist/esm/components/Option.js +13 -0
  189. package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js +15 -0
  190. package/dist/node_modules/react-day-picker/dist/esm/components/Root.js +14 -0
  191. package/dist/node_modules/react-day-picker/dist/esm/components/Select.js +13 -0
  192. package/dist/node_modules/react-day-picker/dist/esm/components/Week.js +14 -0
  193. package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber.js +14 -0
  194. package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js +13 -0
  195. package/dist/node_modules/react-day-picker/dist/esm/components/Weekday.js +13 -0
  196. package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays.js +14 -0
  197. package/dist/node_modules/react-day-picker/dist/esm/components/Weeks.js +13 -0
  198. package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js +15 -0
  199. package/dist/node_modules/react-day-picker/dist/esm/components/custom-components.js +26 -0
  200. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +26 -0
  201. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay.js +19 -0
  202. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js +18 -0
  203. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js +21 -0
  204. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js +13 -0
  205. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js +19 -0
  206. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js +23 -0
  207. package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +7 -0
  208. package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js +73 -0
  209. package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +95 -0
  210. package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js +22 -0
  211. package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +28 -0
  212. package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js +33 -0
  213. package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents.js +20 -0
  214. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js +27 -0
  215. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates.js +59 -0
  216. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +19 -0
  217. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js +33 -0
  218. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js +24 -0
  219. package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js +46 -0
  220. package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js +24 -0
  221. package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +27 -0
  222. package/dist/node_modules/react-day-picker/dist/esm/helpers/getLabels.js +53 -0
  223. package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js +33 -0
  224. package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths.js +69 -0
  225. package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js +51 -0
  226. package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js +40 -0
  227. package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js +36 -0
  228. package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js +37 -0
  229. package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js +27 -0
  230. package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js +26 -0
  231. package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +14 -0
  232. package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +36 -0
  233. package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +27 -0
  234. package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js +31 -0
  235. package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +11 -0
  236. package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js +32 -0
  237. package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +25 -0
  238. package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js +22 -0
  239. package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +14 -0
  240. package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav.js +13 -0
  241. package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext.js +16 -0
  242. package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +15 -0
  243. package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +15 -0
  244. package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +14 -0
  245. package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js +18 -0
  246. package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +14 -0
  247. package/dist/node_modules/react-day-picker/dist/esm/locale/en-US.js +67 -0
  248. package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti.js +57 -0
  249. package/dist/node_modules/react-day-picker/dist/esm/selection/useRange.js +45 -0
  250. package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle.js +44 -0
  251. package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +174 -0
  252. package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +113 -0
  253. package/dist/node_modules/react-day-picker/dist/esm/useDayPicker.js +25 -0
  254. package/dist/node_modules/react-day-picker/dist/esm/useFocus.js +56 -0
  255. package/dist/node_modules/react-day-picker/dist/esm/useSelection.js +31 -0
  256. package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +95 -0
  257. package/dist/node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.js +57 -0
  258. package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js +62 -0
  259. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js +30 -0
  260. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js +74 -0
  261. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js +35 -0
  262. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js +21 -0
  263. package/dist/node_modules/react-day-picker/dist/esm/utils/toTimeZone.js +16 -0
  264. package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards.js +66 -0
  265. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +9 -0
  266. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +167 -0
  267. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +38 -0
  268. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +21 -0
  269. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +110 -0
  270. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
  271. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
  272. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +56 -0
  273. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +10 -0
  274. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +31 -0
  275. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +19 -0
  276. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +25 -0
  277. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +51 -0
  278. package/dist/node_modules/tslib/tslib.es6.js +56 -0
  279. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +24 -0
  280. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +48 -0
  281. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +42 -0
  282. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +21 -0
  283. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +77 -0
  284. package/dist/types/index.d.ts +10 -0
  285. package/package.json +10 -6
  286. package/src/components/Checkbox/Checkbox.tsx +6 -1
  287. package/src/components/DatePicker/DatePicker.tsx +372 -0
  288. package/src/components/DatePicker/datepicker-utils.ts +269 -0
  289. package/src/components/DatePicker/index.ts +5 -0
  290. package/src/components/Field/Field.tsx +30 -28
  291. package/src/components/Popover/Popover.tsx +198 -0
  292. package/src/components/Popover/index.ts +5 -0
  293. package/src/components/Radio/Radio.tsx +6 -1
  294. package/src/components/Searchbox/Searchbox.tsx +4 -1
  295. package/src/components/Select/Select.tsx +7 -2
  296. package/src/components/TextInput/TextInput.tsx +5 -1
  297. package/src/components/Textarea/Textarea.tsx +9 -13
  298. package/src/index.ts +2 -0
  299. package/src/types/index.ts +15 -0
@@ -0,0 +1,118 @@
1
+ import { setISODay } from '../../../setISODay.js';
2
+ import { Parser } from '../Parser.js';
3
+ import { mapValue, parseNDigits } from '../utils.js';
4
+
5
+ // ISO day of week
6
+ class ISODayParser extends Parser {
7
+ priority = 90;
8
+
9
+ parse(dateString, token, match) {
10
+ const valueCallback = (value) => {
11
+ if (value === 0) {
12
+ return 7;
13
+ }
14
+ return value;
15
+ };
16
+
17
+ switch (token) {
18
+ // 2
19
+ case "i":
20
+ case "ii": // 02
21
+ return parseNDigits(token.length, dateString);
22
+ // 2nd
23
+ case "io":
24
+ return match.ordinalNumber(dateString, { unit: "day" });
25
+ // Tue
26
+ case "iii":
27
+ return mapValue(
28
+ match.day(dateString, {
29
+ width: "abbreviated",
30
+ context: "formatting",
31
+ }) ||
32
+ match.day(dateString, {
33
+ width: "short",
34
+ context: "formatting",
35
+ }) ||
36
+ match.day(dateString, {
37
+ width: "narrow",
38
+ context: "formatting",
39
+ }),
40
+ valueCallback,
41
+ );
42
+ // T
43
+ case "iiiii":
44
+ return mapValue(
45
+ match.day(dateString, {
46
+ width: "narrow",
47
+ context: "formatting",
48
+ }),
49
+ valueCallback,
50
+ );
51
+ // Tu
52
+ case "iiiiii":
53
+ return mapValue(
54
+ match.day(dateString, {
55
+ width: "short",
56
+ context: "formatting",
57
+ }) ||
58
+ match.day(dateString, {
59
+ width: "narrow",
60
+ context: "formatting",
61
+ }),
62
+ valueCallback,
63
+ );
64
+ // Tuesday
65
+ case "iiii":
66
+ default:
67
+ return mapValue(
68
+ match.day(dateString, {
69
+ width: "wide",
70
+ context: "formatting",
71
+ }) ||
72
+ match.day(dateString, {
73
+ width: "abbreviated",
74
+ context: "formatting",
75
+ }) ||
76
+ match.day(dateString, {
77
+ width: "short",
78
+ context: "formatting",
79
+ }) ||
80
+ match.day(dateString, {
81
+ width: "narrow",
82
+ context: "formatting",
83
+ }),
84
+ valueCallback,
85
+ );
86
+ }
87
+ }
88
+
89
+ validate(_date, value) {
90
+ return value >= 1 && value <= 7;
91
+ }
92
+
93
+ set(date, _flags, value) {
94
+ date = setISODay(date, value);
95
+ date.setHours(0, 0, 0, 0);
96
+ return date;
97
+ }
98
+
99
+ incompatibleTokens = [
100
+ "y",
101
+ "Y",
102
+ "u",
103
+ "q",
104
+ "Q",
105
+ "M",
106
+ "L",
107
+ "w",
108
+ "d",
109
+ "D",
110
+ "E",
111
+ "e",
112
+ "c",
113
+ "t",
114
+ "T",
115
+ ];
116
+ }
117
+
118
+ export { ISODayParser };
@@ -0,0 +1,47 @@
1
+ import { constructFrom } from '../../../constructFrom.js';
2
+ import { getTimezoneOffsetInMilliseconds } from '../../../_lib/getTimezoneOffsetInMilliseconds.js';
3
+ import { timezonePatterns } from '../constants.js';
4
+ import { Parser } from '../Parser.js';
5
+ import { parseTimezonePattern } from '../utils.js';
6
+
7
+ // Timezone (ISO-8601)
8
+ class ISOTimezoneParser extends Parser {
9
+ priority = 10;
10
+
11
+ parse(dateString, token) {
12
+ switch (token) {
13
+ case "x":
14
+ return parseTimezonePattern(
15
+ timezonePatterns.basicOptionalMinutes,
16
+ dateString,
17
+ );
18
+ case "xx":
19
+ return parseTimezonePattern(timezonePatterns.basic, dateString);
20
+ case "xxxx":
21
+ return parseTimezonePattern(
22
+ timezonePatterns.basicOptionalSeconds,
23
+ dateString,
24
+ );
25
+ case "xxxxx":
26
+ return parseTimezonePattern(
27
+ timezonePatterns.extendedOptionalSeconds,
28
+ dateString,
29
+ );
30
+ case "xxx":
31
+ default:
32
+ return parseTimezonePattern(timezonePatterns.extended, dateString);
33
+ }
34
+ }
35
+
36
+ set(date, flags, value) {
37
+ if (flags.timestampIsSet) return date;
38
+ return constructFrom(
39
+ date,
40
+ date.getTime() - getTimezoneOffsetInMilliseconds(date) - value,
41
+ );
42
+ }
43
+
44
+ incompatibleTokens = ["t", "T", "X"];
45
+ }
46
+
47
+ export { ISOTimezoneParser };
@@ -0,0 +1,47 @@
1
+ import { constructFrom } from '../../../constructFrom.js';
2
+ import { getTimezoneOffsetInMilliseconds } from '../../../_lib/getTimezoneOffsetInMilliseconds.js';
3
+ import { timezonePatterns } from '../constants.js';
4
+ import { Parser } from '../Parser.js';
5
+ import { parseTimezonePattern } from '../utils.js';
6
+
7
+ // Timezone (ISO-8601. +00:00 is `'Z'`)
8
+ class ISOTimezoneWithZParser extends Parser {
9
+ priority = 10;
10
+
11
+ parse(dateString, token) {
12
+ switch (token) {
13
+ case "X":
14
+ return parseTimezonePattern(
15
+ timezonePatterns.basicOptionalMinutes,
16
+ dateString,
17
+ );
18
+ case "XX":
19
+ return parseTimezonePattern(timezonePatterns.basic, dateString);
20
+ case "XXXX":
21
+ return parseTimezonePattern(
22
+ timezonePatterns.basicOptionalSeconds,
23
+ dateString,
24
+ );
25
+ case "XXXXX":
26
+ return parseTimezonePattern(
27
+ timezonePatterns.extendedOptionalSeconds,
28
+ dateString,
29
+ );
30
+ case "XXX":
31
+ default:
32
+ return parseTimezonePattern(timezonePatterns.extended, dateString);
33
+ }
34
+ }
35
+
36
+ set(date, flags, value) {
37
+ if (flags.timestampIsSet) return date;
38
+ return constructFrom(
39
+ date,
40
+ date.getTime() - getTimezoneOffsetInMilliseconds(date) - value,
41
+ );
42
+ }
43
+
44
+ incompatibleTokens = ["t", "T", "x"];
45
+ }
46
+
47
+ export { ISOTimezoneWithZParser };
@@ -0,0 +1,48 @@
1
+ import { setISOWeek } from '../../../setISOWeek.js';
2
+ import { startOfISOWeek } from '../../../startOfISOWeek.js';
3
+ import { numericPatterns } from '../constants.js';
4
+ import { Parser } from '../Parser.js';
5
+ import { parseNDigits, parseNumericPattern } from '../utils.js';
6
+
7
+ // ISO week of year
8
+ class ISOWeekParser extends Parser {
9
+ priority = 100;
10
+
11
+ parse(dateString, token, match) {
12
+ switch (token) {
13
+ case "I":
14
+ return parseNumericPattern(numericPatterns.week, dateString);
15
+ case "Io":
16
+ return match.ordinalNumber(dateString, { unit: "week" });
17
+ default:
18
+ return parseNDigits(token.length, dateString);
19
+ }
20
+ }
21
+
22
+ validate(_date, value) {
23
+ return value >= 1 && value <= 53;
24
+ }
25
+
26
+ set(date, _flags, value) {
27
+ return startOfISOWeek(setISOWeek(date, value));
28
+ }
29
+
30
+ incompatibleTokens = [
31
+ "y",
32
+ "Y",
33
+ "u",
34
+ "q",
35
+ "Q",
36
+ "M",
37
+ "L",
38
+ "w",
39
+ "d",
40
+ "D",
41
+ "e",
42
+ "c",
43
+ "t",
44
+ "T",
45
+ ];
46
+ }
47
+
48
+ export { ISOWeekParser };
@@ -0,0 +1,44 @@
1
+ import { startOfISOWeek } from '../../../startOfISOWeek.js';
2
+ import { constructFrom } from '../../../constructFrom.js';
3
+ import { Parser } from '../Parser.js';
4
+ import { parseNDigitsSigned } from '../utils.js';
5
+
6
+ // ISO week-numbering year
7
+ class ISOWeekYearParser extends Parser {
8
+ priority = 130;
9
+
10
+ parse(dateString, token) {
11
+ if (token === "R") {
12
+ return parseNDigitsSigned(4, dateString);
13
+ }
14
+
15
+ return parseNDigitsSigned(token.length, dateString);
16
+ }
17
+
18
+ set(date, _flags, value) {
19
+ const firstWeekOfYear = constructFrom(date, 0);
20
+ firstWeekOfYear.setFullYear(value, 0, 4);
21
+ firstWeekOfYear.setHours(0, 0, 0, 0);
22
+ return startOfISOWeek(firstWeekOfYear);
23
+ }
24
+
25
+ incompatibleTokens = [
26
+ "G",
27
+ "y",
28
+ "Y",
29
+ "u",
30
+ "Q",
31
+ "q",
32
+ "M",
33
+ "L",
34
+ "w",
35
+ "d",
36
+ "D",
37
+ "e",
38
+ "c",
39
+ "t",
40
+ "T",
41
+ ];
42
+ }
43
+
44
+ export { ISOWeekYearParser };
@@ -0,0 +1,96 @@
1
+ import { setDay } from '../../../setDay.js';
2
+ import { Parser } from '../Parser.js';
3
+ import { mapValue, parseNDigits } from '../utils.js';
4
+
5
+ // Local day of week
6
+ class LocalDayParser extends Parser {
7
+ priority = 90;
8
+ parse(dateString, token, match, options) {
9
+ const valueCallback = (value) => {
10
+ // We want here floor instead of trunc, so we get -7 for value 0 instead of 0
11
+ const wholeWeekDays = Math.floor((value - 1) / 7) * 7;
12
+ return ((value + options.weekStartsOn + 6) % 7) + wholeWeekDays;
13
+ };
14
+
15
+ switch (token) {
16
+ // 3
17
+ case "e":
18
+ case "ee": // 03
19
+ return mapValue(parseNDigits(token.length, dateString), valueCallback);
20
+ // 3rd
21
+ case "eo":
22
+ return mapValue(
23
+ match.ordinalNumber(dateString, {
24
+ unit: "day",
25
+ }),
26
+ valueCallback,
27
+ );
28
+ // Tue
29
+ case "eee":
30
+ return (
31
+ match.day(dateString, {
32
+ width: "abbreviated",
33
+ context: "formatting",
34
+ }) ||
35
+ match.day(dateString, { width: "short", context: "formatting" }) ||
36
+ match.day(dateString, { width: "narrow", context: "formatting" })
37
+ );
38
+
39
+ // T
40
+ case "eeeee":
41
+ return match.day(dateString, {
42
+ width: "narrow",
43
+ context: "formatting",
44
+ });
45
+ // Tu
46
+ case "eeeeee":
47
+ return (
48
+ match.day(dateString, { width: "short", context: "formatting" }) ||
49
+ match.day(dateString, { width: "narrow", context: "formatting" })
50
+ );
51
+
52
+ // Tuesday
53
+ case "eeee":
54
+ default:
55
+ return (
56
+ match.day(dateString, { width: "wide", context: "formatting" }) ||
57
+ match.day(dateString, {
58
+ width: "abbreviated",
59
+ context: "formatting",
60
+ }) ||
61
+ match.day(dateString, { width: "short", context: "formatting" }) ||
62
+ match.day(dateString, { width: "narrow", context: "formatting" })
63
+ );
64
+ }
65
+ }
66
+
67
+ validate(_date, value) {
68
+ return value >= 0 && value <= 6;
69
+ }
70
+
71
+ set(date, _flags, value, options) {
72
+ date = setDay(date, value, options);
73
+ date.setHours(0, 0, 0, 0);
74
+ return date;
75
+ }
76
+
77
+ incompatibleTokens = [
78
+ "y",
79
+ "R",
80
+ "u",
81
+ "q",
82
+ "Q",
83
+ "M",
84
+ "L",
85
+ "I",
86
+ "d",
87
+ "D",
88
+ "E",
89
+ "i",
90
+ "c",
91
+ "t",
92
+ "T",
93
+ ];
94
+ }
95
+
96
+ export { LocalDayParser };
@@ -0,0 +1,47 @@
1
+ import { setWeek } from '../../../setWeek.js';
2
+ import { startOfWeek } from '../../../startOfWeek.js';
3
+ import { numericPatterns } from '../constants.js';
4
+ import { Parser } from '../Parser.js';
5
+ import { parseNDigits, parseNumericPattern } from '../utils.js';
6
+
7
+ // Local week of year
8
+ class LocalWeekParser extends Parser {
9
+ priority = 100;
10
+
11
+ parse(dateString, token, match) {
12
+ switch (token) {
13
+ case "w":
14
+ return parseNumericPattern(numericPatterns.week, dateString);
15
+ case "wo":
16
+ return match.ordinalNumber(dateString, { unit: "week" });
17
+ default:
18
+ return parseNDigits(token.length, dateString);
19
+ }
20
+ }
21
+
22
+ validate(_date, value) {
23
+ return value >= 1 && value <= 53;
24
+ }
25
+
26
+ set(date, _flags, value, options) {
27
+ return startOfWeek(setWeek(date, value, options), options);
28
+ }
29
+
30
+ incompatibleTokens = [
31
+ "y",
32
+ "R",
33
+ "u",
34
+ "q",
35
+ "Q",
36
+ "M",
37
+ "L",
38
+ "I",
39
+ "d",
40
+ "D",
41
+ "i",
42
+ "t",
43
+ "T",
44
+ ];
45
+ }
46
+
47
+ export { LocalWeekParser };
@@ -0,0 +1,76 @@
1
+ import { getWeekYear } from '../../../getWeekYear.js';
2
+ import { startOfWeek } from '../../../startOfWeek.js';
3
+ import { Parser } from '../Parser.js';
4
+ import { mapValue, parseNDigits, normalizeTwoDigitYear } from '../utils.js';
5
+
6
+ // Local week-numbering year
7
+ class LocalWeekYearParser extends Parser {
8
+ priority = 130;
9
+
10
+ parse(dateString, token, match) {
11
+ const valueCallback = (year) => ({
12
+ year,
13
+ isTwoDigitYear: token === "YY",
14
+ });
15
+
16
+ switch (token) {
17
+ case "Y":
18
+ return mapValue(parseNDigits(4, dateString), valueCallback);
19
+ case "Yo":
20
+ return mapValue(
21
+ match.ordinalNumber(dateString, {
22
+ unit: "year",
23
+ }),
24
+ valueCallback,
25
+ );
26
+ default:
27
+ return mapValue(parseNDigits(token.length, dateString), valueCallback);
28
+ }
29
+ }
30
+
31
+ validate(_date, value) {
32
+ return value.isTwoDigitYear || value.year > 0;
33
+ }
34
+
35
+ set(date, flags, value, options) {
36
+ const currentYear = getWeekYear(date, options);
37
+
38
+ if (value.isTwoDigitYear) {
39
+ const normalizedTwoDigitYear = normalizeTwoDigitYear(
40
+ value.year,
41
+ currentYear,
42
+ );
43
+ date.setFullYear(
44
+ normalizedTwoDigitYear,
45
+ 0,
46
+ options.firstWeekContainsDate,
47
+ );
48
+ date.setHours(0, 0, 0, 0);
49
+ return startOfWeek(date, options);
50
+ }
51
+
52
+ const year =
53
+ !("era" in flags) || flags.era === 1 ? value.year : 1 - value.year;
54
+ date.setFullYear(year, 0, options.firstWeekContainsDate);
55
+ date.setHours(0, 0, 0, 0);
56
+ return startOfWeek(date, options);
57
+ }
58
+
59
+ incompatibleTokens = [
60
+ "y",
61
+ "R",
62
+ "u",
63
+ "Q",
64
+ "q",
65
+ "M",
66
+ "L",
67
+ "I",
68
+ "d",
69
+ "D",
70
+ "i",
71
+ "t",
72
+ "T",
73
+ ];
74
+ }
75
+
76
+ export { LocalWeekYearParser };
@@ -0,0 +1,31 @@
1
+ import { numericPatterns } from '../constants.js';
2
+ import { Parser } from '../Parser.js';
3
+ import { parseNDigits, parseNumericPattern } from '../utils.js';
4
+
5
+ class MinuteParser extends Parser {
6
+ priority = 60;
7
+
8
+ parse(dateString, token, match) {
9
+ switch (token) {
10
+ case "m":
11
+ return parseNumericPattern(numericPatterns.minute, dateString);
12
+ case "mo":
13
+ return match.ordinalNumber(dateString, { unit: "minute" });
14
+ default:
15
+ return parseNDigits(token.length, dateString);
16
+ }
17
+ }
18
+
19
+ validate(_date, value) {
20
+ return value >= 0 && value <= 59;
21
+ }
22
+
23
+ set(date, _flags, value) {
24
+ date.setMinutes(value, 0, 0);
25
+ return date;
26
+ }
27
+
28
+ incompatibleTokens = ["t", "T"];
29
+ }
30
+
31
+ export { MinuteParser };
@@ -0,0 +1,86 @@
1
+ import { numericPatterns } from '../constants.js';
2
+ import { Parser } from '../Parser.js';
3
+ import { mapValue, parseNDigits, parseNumericPattern } from '../utils.js';
4
+
5
+ class MonthParser extends Parser {
6
+ incompatibleTokens = [
7
+ "Y",
8
+ "R",
9
+ "q",
10
+ "Q",
11
+ "L",
12
+ "w",
13
+ "I",
14
+ "D",
15
+ "i",
16
+ "e",
17
+ "c",
18
+ "t",
19
+ "T",
20
+ ];
21
+
22
+ priority = 110;
23
+
24
+ parse(dateString, token, match) {
25
+ const valueCallback = (value) => value - 1;
26
+
27
+ switch (token) {
28
+ // 1, 2, ..., 12
29
+ case "M":
30
+ return mapValue(
31
+ parseNumericPattern(numericPatterns.month, dateString),
32
+ valueCallback,
33
+ );
34
+ // 01, 02, ..., 12
35
+ case "MM":
36
+ return mapValue(parseNDigits(2, dateString), valueCallback);
37
+ // 1st, 2nd, ..., 12th
38
+ case "Mo":
39
+ return mapValue(
40
+ match.ordinalNumber(dateString, {
41
+ unit: "month",
42
+ }),
43
+ valueCallback,
44
+ );
45
+ // Jan, Feb, ..., Dec
46
+ case "MMM":
47
+ return (
48
+ match.month(dateString, {
49
+ width: "abbreviated",
50
+ context: "formatting",
51
+ }) ||
52
+ match.month(dateString, { width: "narrow", context: "formatting" })
53
+ );
54
+
55
+ // J, F, ..., D
56
+ case "MMMMM":
57
+ return match.month(dateString, {
58
+ width: "narrow",
59
+ context: "formatting",
60
+ });
61
+ // January, February, ..., December
62
+ case "MMMM":
63
+ default:
64
+ return (
65
+ match.month(dateString, { width: "wide", context: "formatting" }) ||
66
+ match.month(dateString, {
67
+ width: "abbreviated",
68
+ context: "formatting",
69
+ }) ||
70
+ match.month(dateString, { width: "narrow", context: "formatting" })
71
+ );
72
+ }
73
+ }
74
+
75
+ validate(_date, value) {
76
+ return value >= 0 && value <= 11;
77
+ }
78
+
79
+ set(date, _flags, value) {
80
+ date.setMonth(value, 1);
81
+ date.setHours(0, 0, 0, 0);
82
+ return date;
83
+ }
84
+ }
85
+
86
+ export { MonthParser };