@oslokommune/punkt-react 19.15.6 → 19.16.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 (291) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/_virtual/_rolldown/runtime.js +13 -0
  3. package/dist/components/accordion/Accordion.js +28 -0
  4. package/dist/components/accordion/AccordionItem.js +60 -0
  5. package/dist/components/alert/Alert.js +76 -0
  6. package/dist/components/backlink/BackLink.js +35 -0
  7. package/dist/components/breadcrumbs/Breadcrumbs.js +67 -0
  8. package/dist/components/button/Button.js +54 -0
  9. package/dist/components/calendar/Calendar.js +49 -0
  10. package/dist/components/calendar/CalendarGrid.js +99 -0
  11. package/dist/components/calendar/CalendarNav.js +89 -0
  12. package/dist/components/calendar/calendar-utils.js +44 -0
  13. package/dist/components/calendar/useCalendarState.js +214 -0
  14. package/dist/components/card/Card.js +99 -0
  15. package/dist/components/checkbox/Checkbox.js +101 -0
  16. package/dist/components/checkboxgroup/CheckboxGroup.js +88 -0
  17. package/dist/components/checkboxgroup/CheckboxGroupContext.js +5 -0
  18. package/dist/components/combobox/Combobox.js +65 -0
  19. package/dist/components/combobox/ComboboxInput.js +87 -0
  20. package/dist/components/combobox/ComboboxTags.js +82 -0
  21. package/dist/components/combobox/Listbox.js +136 -0
  22. package/dist/components/combobox/useComboboxState.js +577 -0
  23. package/dist/components/consent/Consent.js +110 -0
  24. package/dist/components/datepicker/DateTags.js +28 -0
  25. package/dist/components/datepicker/Datepicker.js +79 -0
  26. package/dist/components/datepicker/DatepickerInputs.js +149 -0
  27. package/dist/components/datepicker/DatepickerPopup.js +41 -0
  28. package/dist/components/datepicker/useDatepickerState.js +243 -0
  29. package/dist/components/fileupload/DropZone.js +131 -0
  30. package/dist/components/fileupload/FileUpload.js +223 -0
  31. package/dist/components/fileupload/FileUploadContext.d.ts +2 -0
  32. package/dist/components/fileupload/FileUploadContext.js +6 -0
  33. package/dist/components/fileupload/QueueDisplay.js +67 -0
  34. package/dist/components/fileupload/QueueItemContent.js +88 -0
  35. package/dist/components/fileupload/Subcomponents.js +265 -0
  36. package/dist/components/fileupload/Truncate.js +22 -0
  37. package/dist/components/fileupload/extensions/Comments.js +128 -0
  38. package/dist/components/fileupload/extensions/Remove.js +9 -0
  39. package/dist/components/fileupload/extensions/Rename.js +66 -0
  40. package/dist/components/fileupload/hooks/useFileAttributes.js +25 -0
  41. package/dist/components/fileupload/hooks/useImageObjectUrl.js +15 -0
  42. package/dist/components/fileupload/hooks/useImagePreview.js +24 -0
  43. package/dist/components/fileupload/hooks/useOperationState.js +31 -0
  44. package/dist/components/fileupload/hooks/useRequiredFormValidation.js +23 -0
  45. package/dist/components/fileupload/types.d.ts +0 -1
  46. package/dist/components/fileupload/types.js +12 -0
  47. package/dist/components/footer/Footer.js +134 -0
  48. package/dist/components/footer/FooterGlobal.js +105 -0
  49. package/dist/components/footerSimple/FooterSimple.js +87 -0
  50. package/dist/components/header/Header.js +15 -0
  51. package/dist/components/header/HeaderGlobal.js +286 -0
  52. package/dist/components/header/HeaderService.js +281 -0
  53. package/dist/components/header-menu/HeaderMenu.js +197 -0
  54. package/dist/components/headerUserMenu/UserMenu.js +134 -0
  55. package/dist/components/heading/Heading.js +37 -0
  56. package/dist/components/helptext/Helptext.js +50 -0
  57. package/dist/components/icon/Icon.d.ts +6 -0
  58. package/dist/components/icon/Icon.js +69 -0
  59. package/dist/components/input/Input.js +23 -0
  60. package/dist/components/inputwrapper/InputWrapper.js +128 -0
  61. package/dist/components/link/Link.js +34 -0
  62. package/dist/components/linkcard/LinkCard.js +38 -0
  63. package/dist/components/loader/Loader.js +47 -0
  64. package/dist/components/messagebox/Messagebox.js +50 -0
  65. package/dist/components/modal/Modal.js +89 -0
  66. package/dist/components/progressbar/Progressbar.js +62 -0
  67. package/dist/components/radio/RadioButton.js +85 -0
  68. package/dist/components/radiogroup/RadioGroup.js +70 -0
  69. package/dist/components/radiogroup/RadioGroupContext.js +5 -0
  70. package/dist/components/searchinput/SearchInput.js +102 -0
  71. package/dist/components/select/Select.js +56 -0
  72. package/dist/components/stepper/Step.js +78 -0
  73. package/dist/components/stepper/Stepper.js +21 -0
  74. package/dist/components/strings/PktStringsProvider.js +21 -0
  75. package/dist/components/table/Table.js +19 -0
  76. package/dist/components/table/TableBody.js +13 -0
  77. package/dist/components/table/TableDataCell.js +14 -0
  78. package/dist/components/table/TableHeader.js +12 -0
  79. package/dist/components/table/TableHeaderCell.js +12 -0
  80. package/dist/components/table/TableRow.js +12 -0
  81. package/dist/components/tabs/TabItem.js +60 -0
  82. package/dist/components/tabs/Tabs.js +90 -0
  83. package/dist/components/tag/Tag.js +76 -0
  84. package/dist/components/textarea/Textarea.js +74 -0
  85. package/dist/components/textinput/Textinput.js +106 -0
  86. package/dist/components/timepicker/Timepicker.js +224 -0
  87. package/dist/components/timepicker/useTimepickerState.js +483 -0
  88. package/dist/hooks/useElementWidth.js +23 -0
  89. package/dist/hooks/useFocusModality.js +28 -0
  90. package/dist/hooks/useGeneratedId.js +8 -0
  91. package/dist/hooks/useHeaderChrome.js +36 -0
  92. package/dist/hooks/useOptionGroupField.js +70 -0
  93. package/dist/hooks/useOwnerForm.js +15 -0
  94. package/dist/hooks/usePktStrings.js +16 -0
  95. package/dist/hooks/useScrollLock.js +12 -0
  96. package/dist/node_modules/@date-fns/tz/date/index.js +57 -0
  97. package/dist/node_modules/@date-fns/tz/date/mini.js +75 -0
  98. package/dist/node_modules/@date-fns/tz/index.js +6 -0
  99. package/dist/node_modules/@date-fns/tz/tz/index.js +1 -0
  100. package/dist/node_modules/@date-fns/tz/tzName/index.js +10 -0
  101. package/dist/node_modules/@date-fns/tz/tzOffset/index.js +22 -0
  102. package/dist/node_modules/classnames/index.js +32 -0
  103. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +6 -0
  104. package/dist/node_modules/date-fns/_lib/defaultOptions.js +7 -0
  105. package/dist/node_modules/date-fns/_lib/format/formatters.js +389 -0
  106. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +43 -0
  107. package/dist/node_modules/date-fns/_lib/format/longFormatters.js +38 -0
  108. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +8 -0
  109. package/dist/node_modules/date-fns/_lib/normalizeDates.js +8 -0
  110. package/dist/node_modules/date-fns/_lib/normalizeInterval.js +11 -0
  111. package/dist/node_modules/date-fns/_lib/protectedTokens.js +23 -0
  112. package/dist/node_modules/date-fns/addDays.js +9 -0
  113. package/dist/node_modules/date-fns/constants.js +10 -0
  114. package/dist/node_modules/date-fns/constructFrom.js +7 -0
  115. package/dist/node_modules/date-fns/differenceInCalendarDays.js +11 -0
  116. package/dist/node_modules/date-fns/eachDayOfInterval.js +15 -0
  117. package/dist/node_modules/date-fns/endOfDay.js +8 -0
  118. package/dist/node_modules/date-fns/format.js +59 -0
  119. package/dist/node_modules/date-fns/getDayOfYear.js +10 -0
  120. package/dist/node_modules/date-fns/getISODay.js +8 -0
  121. package/dist/node_modules/date-fns/getISOWeek.js +11 -0
  122. package/dist/node_modules/date-fns/getISOWeekYear.js +14 -0
  123. package/dist/node_modules/date-fns/getWeek.js +11 -0
  124. package/dist/node_modules/date-fns/getWeekYear.js +15 -0
  125. package/dist/node_modules/date-fns/isDate.js +6 -0
  126. package/dist/node_modules/date-fns/isValid.js +8 -0
  127. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
  128. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +17 -0
  129. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +22 -0
  130. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +18 -0
  131. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +69 -0
  132. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +32 -0
  133. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
  134. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +202 -0
  135. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +124 -0
  136. package/dist/node_modules/date-fns/locale/en-US.js +20 -0
  137. package/dist/node_modules/date-fns/startOfDay.js +8 -0
  138. package/dist/node_modules/date-fns/startOfISOWeek.js +10 -0
  139. package/dist/node_modules/date-fns/startOfISOWeekYear.js +10 -0
  140. package/dist/node_modules/date-fns/startOfWeek.js +9 -0
  141. package/dist/node_modules/date-fns/startOfWeekYear.js +11 -0
  142. package/dist/node_modules/date-fns/startOfYear.js +8 -0
  143. package/dist/node_modules/date-fns/toDate.js +7 -0
  144. package/dist/punkt-react.cjs +1 -1
  145. package/dist/punkt-react.js +55 -9388
  146. package/dist/shared-strings/consent.js +113 -0
  147. package/dist/shared-strings/format.js +18 -0
  148. package/dist/shared-strings/nb.js +201 -0
  149. package/dist/shared-strings/resolve.js +40 -0
  150. package/dist/shared-strings/store.js +35 -0
  151. package/dist/shared-types/accordion.js +4 -0
  152. package/dist/shared-types/calendar.js +12 -0
  153. package/dist/shared-types/card.js +15 -0
  154. package/dist/shared-types/checkbox.js +15 -0
  155. package/dist/shared-types/combobox.js +19 -0
  156. package/dist/shared-types/consent.js +8 -0
  157. package/dist/shared-types/footer.js +4 -0
  158. package/dist/shared-types/header-footer.js +4 -0
  159. package/dist/shared-types/icon.js +7 -0
  160. package/dist/shared-types/messagebox.js +8 -0
  161. package/dist/shared-types/option-group.js +14 -0
  162. package/dist/shared-types/radiobutton.js +11 -0
  163. package/dist/shared-types/select.js +14 -0
  164. package/dist/shared-types/table.js +8 -0
  165. package/dist/shared-utils/calendar/calendar-grid.js +19 -0
  166. package/dist/shared-utils/calendar/date-validation.js +19 -0
  167. package/dist/shared-utils/calendar/keyboard-navigation.js +26 -0
  168. package/dist/shared-utils/calendar/selection-manager.js +52 -0
  169. package/dist/shared-utils/combobox/input-utils.js +39 -0
  170. package/dist/shared-utils/combobox/keyboard-navigation.js +41 -0
  171. package/dist/shared-utils/combobox/option-utils.js +48 -0
  172. package/dist/shared-utils/date-utils.js +71 -0
  173. package/dist/shared-utils/datepicker-utils.js +32 -0
  174. package/dist/shared-utils/device-utils.js +7 -0
  175. package/dist/shared-utils/fileupload/announcements.js +21 -0
  176. package/dist/shared-utils/fileupload/filename.js +8 -0
  177. package/dist/shared-utils/fileupload/focus-trap.js +2 -0
  178. package/dist/shared-utils/fileupload/formats.js +29 -0
  179. package/dist/shared-utils/fileupload/index.js +11 -0
  180. package/dist/shared-utils/fileupload/navigation.js +6 -0
  181. package/dist/shared-utils/fileupload/size.js +25 -0
  182. package/dist/shared-utils/fileupload/transfers.js +23 -0
  183. package/dist/shared-utils/fileupload/truncate.js +9 -0
  184. package/dist/shared-utils/fileupload/validation.js +32 -0
  185. package/dist/shared-utils/focus-trap/index.js +60 -0
  186. package/dist/shared-utils/forms/described-by.js +7 -0
  187. package/dist/shared-utils/header-footer/external-domain.js +30 -0
  188. package/dist/shared-utils/header-footer/fetch-header-footer-data.js +29 -0
  189. package/dist/shared-utils/header-footer/icon-map.js +55 -0
  190. package/dist/shared-utils/header-footer/select-megamenu.js +7 -0
  191. package/dist/shared-utils/scroll-lock/index.js +21 -0
  192. package/dist/shared-utils/timepicker/options.js +10 -0
  193. package/dist/shared-utils/timepicker/stepper.js +10 -0
  194. package/dist/shared-utils/timepicker/time-utils.js +7 -0
  195. package/dist/shared-utils/value-utils.js +12 -0
  196. package/dist/utils/nativeInputValue.js +6 -0
  197. package/dist/utils/stableKeys.js +13 -0
  198. package/dist/utils/stringutils.js +7 -0
  199. package/package.json +3 -2
  200. package/src/components/checkbox/Checkbox.tsx +2 -0
  201. package/src/components/combobox/types.ts +0 -2
  202. package/src/components/fileupload/FileUpload.tsx +3 -1
  203. package/src/components/fileupload/FileUploadContext.ts +7 -0
  204. package/src/components/fileupload/QueueDisplay.tsx +3 -3
  205. package/src/components/fileupload/Subcomponents.tsx +2 -7
  206. package/src/components/fileupload/extensions/Comments.tsx +2 -1
  207. package/src/components/fileupload/extensions/Rename.tsx +2 -1
  208. package/src/components/fileupload/types.ts +1 -2
  209. package/src/components/header/Header.test.tsx +0 -7
  210. package/src/components/header/Header.tsx +0 -2
  211. package/src/components/heading/Heading.tsx +0 -2
  212. package/src/components/icon/Icon.test.tsx +0 -7
  213. package/src/components/icon/Icon.tsx +7 -0
  214. package/src/components/input/Input.tsx +0 -2
  215. package/src/components/link/Link.tsx +0 -2
  216. package/src/components/radio/RadioButton.tsx +2 -0
  217. package/src/components/server-components.test.ts +69 -0
  218. package/src/components/stepper/Step.tsx +0 -2
  219. package/src/components/stepper/Stepper.tsx +0 -2
  220. package/src/components/strings/PktStringsProvider.tsx +2 -0
  221. package/src/components/table/Table.tsx +0 -2
  222. package/src/components/table/TableBody.tsx +1 -3
  223. package/src/components/table/TableDataCell.tsx +0 -2
  224. package/src/components/table/TableHeader.tsx +0 -2
  225. package/src/components/table/TableHeaderCell.tsx +0 -2
  226. package/src/components/table/TableRow.tsx +0 -2
  227. package/dist/components/accordion/Accordion.test.d.ts +0 -0
  228. package/dist/components/alert/Alert.test.d.ts +0 -0
  229. package/dist/components/backlink/BackLink.test.d.ts +0 -0
  230. package/dist/components/breadcrumbs/Breadcrumbs.test.d.ts +0 -1
  231. package/dist/components/button/Button.test.d.ts +0 -0
  232. package/dist/components/calendar/Calendar.accessibility.test.d.ts +0 -0
  233. package/dist/components/calendar/Calendar.constraints.test.d.ts +0 -0
  234. package/dist/components/calendar/Calendar.core.test.d.ts +0 -0
  235. package/dist/components/calendar/Calendar.interaction.test.d.ts +0 -0
  236. package/dist/components/calendar/Calendar.selection.test.d.ts +0 -0
  237. package/dist/components/card/Card.test.d.ts +0 -0
  238. package/dist/components/checkbox/Checkbox.test.d.ts +0 -0
  239. package/dist/components/checkboxgroup/CheckboxGroup.forms.test.d.ts +0 -0
  240. package/dist/components/checkboxgroup/CheckboxGroup.test.d.ts +0 -0
  241. package/dist/components/combobox/Combobox.accessibility.test.d.ts +0 -0
  242. package/dist/components/combobox/Combobox.core.test.d.ts +0 -0
  243. package/dist/components/combobox/Combobox.interaction.test.d.ts +0 -0
  244. package/dist/components/combobox/Combobox.preselection.test.d.ts +0 -0
  245. package/dist/components/combobox/Combobox.selection.test.d.ts +0 -0
  246. package/dist/components/consent/Consent.test.d.ts +0 -0
  247. package/dist/components/datepicker/Datepicker.accessibility.test.d.ts +0 -0
  248. package/dist/components/datepicker/Datepicker.core.test.d.ts +0 -0
  249. package/dist/components/datepicker/Datepicker.input.test.d.ts +0 -0
  250. package/dist/components/datepicker/Datepicker.selection.test.d.ts +0 -0
  251. package/dist/components/datepicker/Datepicker.validation.test.d.ts +0 -0
  252. package/dist/components/fileupload/FileUpload.test.d.ts +0 -0
  253. package/dist/components/fileupload/QueueDisplay.test.d.ts +0 -0
  254. package/dist/components/fileupload/Truncate.test.d.ts +0 -0
  255. package/dist/components/footer/Footer.accessibility.test.d.ts +0 -0
  256. package/dist/components/footer/Footer.test.d.ts +0 -1
  257. package/dist/components/footerSimple/FooterSimple.test.d.ts +0 -1
  258. package/dist/components/formAttribute.test.d.ts +0 -1
  259. package/dist/components/header/Header.test.d.ts +0 -0
  260. package/dist/components/header/HeaderGlobal.accessibility.test.d.ts +0 -0
  261. package/dist/components/header/HeaderGlobal.test.d.ts +0 -0
  262. package/dist/components/header/HeaderService.accessibility.test.d.ts +0 -0
  263. package/dist/components/header/HeaderService.test.d.ts +0 -0
  264. package/dist/components/header-menu/HeaderMenu.test.d.ts +0 -0
  265. package/dist/components/headerUserMenu/UserMenu.test.d.ts +0 -0
  266. package/dist/components/heading/Heading.test.d.ts +0 -0
  267. package/dist/components/helptext/Helptext.test.d.ts +0 -0
  268. package/dist/components/helptext/helptextAssociation.test.d.ts +0 -1
  269. package/dist/components/hydration.test.d.ts +0 -1
  270. package/dist/components/icon/Icon.test.d.ts +0 -9
  271. package/dist/components/inputwrapper/InputWrapper.test.d.ts +0 -0
  272. package/dist/components/link/Link.test.d.ts +0 -1
  273. package/dist/components/linkcard/LinkCard.test.d.ts +0 -0
  274. package/dist/components/loader/Loader.test.d.ts +0 -0
  275. package/dist/components/messagebox/Messagebox.test.d.ts +0 -1
  276. package/dist/components/modal/Modal.test.d.ts +0 -0
  277. package/dist/components/progressbar/Progressbar.test.d.ts +0 -0
  278. package/dist/components/radio/RadioButton.test.d.ts +0 -0
  279. package/dist/components/radiogroup/RadioGroup.forms.test.d.ts +0 -0
  280. package/dist/components/radiogroup/RadioGroup.test.d.ts +0 -0
  281. package/dist/components/searchinput/SearchInput.test.d.ts +0 -0
  282. package/dist/components/select/Select.test.d.ts +0 -0
  283. package/dist/components/ssr.test.d.ts +0 -1
  284. package/dist/components/stepper/Stepper.test.d.ts +0 -0
  285. package/dist/components/strings/strings-override.test.d.ts +0 -1
  286. package/dist/components/table/Table.test.d.ts +0 -0
  287. package/dist/components/tabs/Tabs.test.d.ts +0 -0
  288. package/dist/components/tag/Tag.test.d.ts +0 -0
  289. package/dist/components/textarea/Textarea.test.d.ts +0 -0
  290. package/dist/components/textinput/Textinput.test.d.ts +0 -0
  291. package/dist/components/timepicker/Timepicker.test.d.ts +0 -0
@@ -0,0 +1,389 @@
1
+ import e from "../../getISOWeekYear.js";
2
+ import t from "../../getDayOfYear.js";
3
+ import n from "../../getISOWeek.js";
4
+ import r from "../../getWeekYear.js";
5
+ import i from "../../getWeek.js";
6
+ import { addLeadingZeros as a } from "../addLeadingZeros.js";
7
+ import { lightFormatters as o } from "./lightFormatters.js";
8
+ //#region ../../node_modules/date-fns/_lib/format/formatters.js
9
+ var s = {
10
+ am: "am",
11
+ pm: "pm",
12
+ midnight: "midnight",
13
+ noon: "noon",
14
+ morning: "morning",
15
+ afternoon: "afternoon",
16
+ evening: "evening",
17
+ night: "night"
18
+ }, c = {
19
+ G: function(e, t, n) {
20
+ let r = +(e.getFullYear() > 0);
21
+ switch (t) {
22
+ case "G":
23
+ case "GG":
24
+ case "GGG": return n.era(r, { width: "abbreviated" });
25
+ case "GGGGG": return n.era(r, { width: "narrow" });
26
+ default: return n.era(r, { width: "wide" });
27
+ }
28
+ },
29
+ y: function(e, t, n) {
30
+ if (t === "yo") {
31
+ let t = e.getFullYear(), r = t > 0 ? t : 1 - t;
32
+ return n.ordinalNumber(r, { unit: "year" });
33
+ }
34
+ return o.y(e, t);
35
+ },
36
+ Y: function(e, t, n, i) {
37
+ let o = r(e, i), s = o > 0 ? o : 1 - o;
38
+ if (t === "YY") {
39
+ let e = s % 100;
40
+ return a(e, 2);
41
+ }
42
+ return t === "Yo" ? n.ordinalNumber(s, { unit: "year" }) : a(s, t.length);
43
+ },
44
+ R: function(t, n) {
45
+ let r = e(t);
46
+ return a(r, n.length);
47
+ },
48
+ u: function(e, t) {
49
+ let n = e.getFullYear();
50
+ return a(n, t.length);
51
+ },
52
+ Q: function(e, t, n) {
53
+ let r = Math.ceil((e.getMonth() + 1) / 3);
54
+ switch (t) {
55
+ case "Q": return String(r);
56
+ case "QQ": return a(r, 2);
57
+ case "Qo": return n.ordinalNumber(r, { unit: "quarter" });
58
+ case "QQQ": return n.quarter(r, {
59
+ width: "abbreviated",
60
+ context: "formatting"
61
+ });
62
+ case "QQQQQ": return n.quarter(r, {
63
+ width: "narrow",
64
+ context: "formatting"
65
+ });
66
+ default: return n.quarter(r, {
67
+ width: "wide",
68
+ context: "formatting"
69
+ });
70
+ }
71
+ },
72
+ q: function(e, t, n) {
73
+ let r = Math.ceil((e.getMonth() + 1) / 3);
74
+ switch (t) {
75
+ case "q": return String(r);
76
+ case "qq": return a(r, 2);
77
+ case "qo": return n.ordinalNumber(r, { unit: "quarter" });
78
+ case "qqq": return n.quarter(r, {
79
+ width: "abbreviated",
80
+ context: "standalone"
81
+ });
82
+ case "qqqqq": return n.quarter(r, {
83
+ width: "narrow",
84
+ context: "standalone"
85
+ });
86
+ default: return n.quarter(r, {
87
+ width: "wide",
88
+ context: "standalone"
89
+ });
90
+ }
91
+ },
92
+ M: function(e, t, n) {
93
+ let r = e.getMonth();
94
+ switch (t) {
95
+ case "M":
96
+ case "MM": return o.M(e, t);
97
+ case "Mo": return n.ordinalNumber(r + 1, { unit: "month" });
98
+ case "MMM": return n.month(r, {
99
+ width: "abbreviated",
100
+ context: "formatting"
101
+ });
102
+ case "MMMMM": return n.month(r, {
103
+ width: "narrow",
104
+ context: "formatting"
105
+ });
106
+ default: return n.month(r, {
107
+ width: "wide",
108
+ context: "formatting"
109
+ });
110
+ }
111
+ },
112
+ L: function(e, t, n) {
113
+ let r = e.getMonth();
114
+ switch (t) {
115
+ case "L": return String(r + 1);
116
+ case "LL": return a(r + 1, 2);
117
+ case "Lo": return n.ordinalNumber(r + 1, { unit: "month" });
118
+ case "LLL": return n.month(r, {
119
+ width: "abbreviated",
120
+ context: "standalone"
121
+ });
122
+ case "LLLLL": return n.month(r, {
123
+ width: "narrow",
124
+ context: "standalone"
125
+ });
126
+ default: return n.month(r, {
127
+ width: "wide",
128
+ context: "standalone"
129
+ });
130
+ }
131
+ },
132
+ w: function(e, t, n, r) {
133
+ let o = i(e, r);
134
+ return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) : a(o, t.length);
135
+ },
136
+ I: function(e, t, r) {
137
+ let i = n(e);
138
+ return t === "Io" ? r.ordinalNumber(i, { unit: "week" }) : a(i, t.length);
139
+ },
140
+ d: function(e, t, n) {
141
+ return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : o.d(e, t);
142
+ },
143
+ D: function(e, n, r) {
144
+ let i = t(e);
145
+ return n === "Do" ? r.ordinalNumber(i, { unit: "dayOfYear" }) : a(i, n.length);
146
+ },
147
+ E: function(e, t, n) {
148
+ let r = e.getDay();
149
+ switch (t) {
150
+ case "E":
151
+ case "EE":
152
+ case "EEE": return n.day(r, {
153
+ width: "abbreviated",
154
+ context: "formatting"
155
+ });
156
+ case "EEEEE": return n.day(r, {
157
+ width: "narrow",
158
+ context: "formatting"
159
+ });
160
+ case "EEEEEE": return n.day(r, {
161
+ width: "short",
162
+ context: "formatting"
163
+ });
164
+ default: return n.day(r, {
165
+ width: "wide",
166
+ context: "formatting"
167
+ });
168
+ }
169
+ },
170
+ e: function(e, t, n, r) {
171
+ let i = e.getDay(), o = (i - r.weekStartsOn + 8) % 7 || 7;
172
+ switch (t) {
173
+ case "e": return String(o);
174
+ case "ee": return a(o, 2);
175
+ case "eo": return n.ordinalNumber(o, { unit: "day" });
176
+ case "eee": return n.day(i, {
177
+ width: "abbreviated",
178
+ context: "formatting"
179
+ });
180
+ case "eeeee": return n.day(i, {
181
+ width: "narrow",
182
+ context: "formatting"
183
+ });
184
+ case "eeeeee": return n.day(i, {
185
+ width: "short",
186
+ context: "formatting"
187
+ });
188
+ default: return n.day(i, {
189
+ width: "wide",
190
+ context: "formatting"
191
+ });
192
+ }
193
+ },
194
+ c: function(e, t, n, r) {
195
+ let i = e.getDay(), o = (i - r.weekStartsOn + 8) % 7 || 7;
196
+ switch (t) {
197
+ case "c": return String(o);
198
+ case "cc": return a(o, t.length);
199
+ case "co": return n.ordinalNumber(o, { unit: "day" });
200
+ case "ccc": return n.day(i, {
201
+ width: "abbreviated",
202
+ context: "standalone"
203
+ });
204
+ case "ccccc": return n.day(i, {
205
+ width: "narrow",
206
+ context: "standalone"
207
+ });
208
+ case "cccccc": return n.day(i, {
209
+ width: "short",
210
+ context: "standalone"
211
+ });
212
+ default: return n.day(i, {
213
+ width: "wide",
214
+ context: "standalone"
215
+ });
216
+ }
217
+ },
218
+ i: function(e, t, n) {
219
+ let r = e.getDay(), i = r === 0 ? 7 : r;
220
+ switch (t) {
221
+ case "i": return String(i);
222
+ case "ii": return a(i, t.length);
223
+ case "io": return n.ordinalNumber(i, { unit: "day" });
224
+ case "iii": return n.day(r, {
225
+ width: "abbreviated",
226
+ context: "formatting"
227
+ });
228
+ case "iiiii": return n.day(r, {
229
+ width: "narrow",
230
+ context: "formatting"
231
+ });
232
+ case "iiiiii": return n.day(r, {
233
+ width: "short",
234
+ context: "formatting"
235
+ });
236
+ default: return n.day(r, {
237
+ width: "wide",
238
+ context: "formatting"
239
+ });
240
+ }
241
+ },
242
+ a: function(e, t, n) {
243
+ let r = e.getHours() / 12 >= 1 ? "pm" : "am";
244
+ switch (t) {
245
+ case "a":
246
+ case "aa": return n.dayPeriod(r, {
247
+ width: "abbreviated",
248
+ context: "formatting"
249
+ });
250
+ case "aaa": return n.dayPeriod(r, {
251
+ width: "abbreviated",
252
+ context: "formatting"
253
+ }).toLowerCase();
254
+ case "aaaaa": return n.dayPeriod(r, {
255
+ width: "narrow",
256
+ context: "formatting"
257
+ });
258
+ default: return n.dayPeriod(r, {
259
+ width: "wide",
260
+ context: "formatting"
261
+ });
262
+ }
263
+ },
264
+ b: function(e, t, n) {
265
+ let r = e.getHours(), i;
266
+ switch (i = r === 12 ? s.noon : r === 0 ? s.midnight : r / 12 >= 1 ? "pm" : "am", t) {
267
+ case "b":
268
+ case "bb": return n.dayPeriod(i, {
269
+ width: "abbreviated",
270
+ context: "formatting"
271
+ });
272
+ case "bbb": return n.dayPeriod(i, {
273
+ width: "abbreviated",
274
+ context: "formatting"
275
+ }).toLowerCase();
276
+ case "bbbbb": return n.dayPeriod(i, {
277
+ width: "narrow",
278
+ context: "formatting"
279
+ });
280
+ default: return n.dayPeriod(i, {
281
+ width: "wide",
282
+ context: "formatting"
283
+ });
284
+ }
285
+ },
286
+ B: function(e, t, n) {
287
+ let r = e.getHours(), i;
288
+ switch (i = r >= 17 ? s.evening : r >= 12 ? s.afternoon : r >= 4 ? s.morning : s.night, t) {
289
+ case "B":
290
+ case "BB":
291
+ case "BBB": return n.dayPeriod(i, {
292
+ width: "abbreviated",
293
+ context: "formatting"
294
+ });
295
+ case "BBBBB": return n.dayPeriod(i, {
296
+ width: "narrow",
297
+ context: "formatting"
298
+ });
299
+ default: return n.dayPeriod(i, {
300
+ width: "wide",
301
+ context: "formatting"
302
+ });
303
+ }
304
+ },
305
+ h: function(e, t, n) {
306
+ if (t === "ho") {
307
+ let t = e.getHours() % 12;
308
+ return t === 0 && (t = 12), n.ordinalNumber(t, { unit: "hour" });
309
+ }
310
+ return o.h(e, t);
311
+ },
312
+ H: function(e, t, n) {
313
+ return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : o.H(e, t);
314
+ },
315
+ K: function(e, t, n) {
316
+ let r = e.getHours() % 12;
317
+ return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : a(r, t.length);
318
+ },
319
+ k: function(e, t, n) {
320
+ let r = e.getHours();
321
+ return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : a(r, t.length);
322
+ },
323
+ m: function(e, t, n) {
324
+ return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : o.m(e, t);
325
+ },
326
+ s: function(e, t, n) {
327
+ return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : o.s(e, t);
328
+ },
329
+ S: function(e, t) {
330
+ return o.S(e, t);
331
+ },
332
+ X: function(e, t, n) {
333
+ let r = e.getTimezoneOffset();
334
+ if (r === 0) return "Z";
335
+ switch (t) {
336
+ case "X": return u(r);
337
+ case "XXXX":
338
+ case "XX": return d(r);
339
+ default: return d(r, ":");
340
+ }
341
+ },
342
+ x: function(e, t, n) {
343
+ let r = e.getTimezoneOffset();
344
+ switch (t) {
345
+ case "x": return u(r);
346
+ case "xxxx":
347
+ case "xx": return d(r);
348
+ default: return d(r, ":");
349
+ }
350
+ },
351
+ O: function(e, t, n) {
352
+ let r = e.getTimezoneOffset();
353
+ switch (t) {
354
+ case "O":
355
+ case "OO":
356
+ case "OOO": return "GMT" + l(r, ":");
357
+ default: return "GMT" + d(r, ":");
358
+ }
359
+ },
360
+ z: function(e, t, n) {
361
+ let r = e.getTimezoneOffset();
362
+ switch (t) {
363
+ case "z":
364
+ case "zz":
365
+ case "zzz": return "GMT" + l(r, ":");
366
+ default: return "GMT" + d(r, ":");
367
+ }
368
+ },
369
+ t: function(e, t, n) {
370
+ let r = Math.trunc(e / 1e3);
371
+ return a(r, t.length);
372
+ },
373
+ T: function(e, t, n) {
374
+ return a(+e, t.length);
375
+ }
376
+ };
377
+ function l(e, t = "") {
378
+ let n = e > 0 ? "-" : "+", r = Math.abs(e), i = Math.trunc(r / 60), o = r % 60;
379
+ return o === 0 ? n + String(i) : n + String(i) + t + a(o, 2);
380
+ }
381
+ function u(e, t) {
382
+ return e % 60 == 0 ? (e > 0 ? "-" : "+") + a(Math.abs(e) / 60, 2) : d(e, t);
383
+ }
384
+ function d(e, t = "") {
385
+ let n = e > 0 ? "-" : "+", r = Math.abs(e), i = a(Math.trunc(r / 60), 2), o = a(r % 60, 2);
386
+ return n + i + t + o;
387
+ }
388
+ //#endregion
389
+ export { c as formatters };
@@ -0,0 +1,43 @@
1
+ import { addLeadingZeros as e } from "../addLeadingZeros.js";
2
+ //#region ../../node_modules/date-fns/_lib/format/lightFormatters.js
3
+ var t = {
4
+ y(t, n) {
5
+ let r = t.getFullYear(), i = r > 0 ? r : 1 - r;
6
+ return e(n === "yy" ? i % 100 : i, n.length);
7
+ },
8
+ M(t, n) {
9
+ let r = t.getMonth();
10
+ return n === "M" ? String(r + 1) : e(r + 1, 2);
11
+ },
12
+ d(t, n) {
13
+ return e(t.getDate(), n.length);
14
+ },
15
+ a(e, t) {
16
+ let n = e.getHours() / 12 >= 1 ? "pm" : "am";
17
+ switch (t) {
18
+ case "a":
19
+ case "aa": return n.toUpperCase();
20
+ case "aaa": return n;
21
+ case "aaaaa": return n[0];
22
+ default: return n === "am" ? "a.m." : "p.m.";
23
+ }
24
+ },
25
+ h(t, n) {
26
+ return e(t.getHours() % 12 || 12, n.length);
27
+ },
28
+ H(t, n) {
29
+ return e(t.getHours(), n.length);
30
+ },
31
+ m(t, n) {
32
+ return e(t.getMinutes(), n.length);
33
+ },
34
+ s(t, n) {
35
+ return e(t.getSeconds(), n.length);
36
+ },
37
+ S(t, n) {
38
+ let r = n.length, i = t.getMilliseconds(), a = Math.trunc(i * 10 ** (r - 3));
39
+ return e(a, n.length);
40
+ }
41
+ };
42
+ //#endregion
43
+ export { t as lightFormatters };
@@ -0,0 +1,38 @@
1
+ //#region ../../node_modules/date-fns/_lib/format/longFormatters.js
2
+ var e = (e, t) => {
3
+ switch (e) {
4
+ case "P": return t.date({ width: "short" });
5
+ case "PP": return t.date({ width: "medium" });
6
+ case "PPP": return t.date({ width: "long" });
7
+ default: return t.date({ width: "full" });
8
+ }
9
+ }, t = (e, t) => {
10
+ switch (e) {
11
+ case "p": return t.time({ width: "short" });
12
+ case "pp": return t.time({ width: "medium" });
13
+ case "ppp": return t.time({ width: "long" });
14
+ default: return t.time({ width: "full" });
15
+ }
16
+ }, n = {
17
+ p: t,
18
+ P: (n, r) => {
19
+ let i = n.match(/(P+)(p+)?/) || [], a = i[1], o = i[2];
20
+ if (!o) return e(n, r);
21
+ let s;
22
+ switch (a) {
23
+ case "P":
24
+ s = r.dateTime({ width: "short" });
25
+ break;
26
+ case "PP":
27
+ s = r.dateTime({ width: "medium" });
28
+ break;
29
+ case "PPP":
30
+ s = r.dateTime({ width: "long" });
31
+ break;
32
+ default: s = r.dateTime({ width: "full" });
33
+ }
34
+ return s.replace("{{date}}", e(a, r)).replace("{{time}}", t(o, r));
35
+ }
36
+ };
37
+ //#endregion
38
+ export { n as longFormatters };
@@ -0,0 +1,8 @@
1
+ import e from "../toDate.js";
2
+ //#region ../../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
3
+ function t(t) {
4
+ let n = e(t), r = new Date(Date.UTC(n.getFullYear(), n.getMonth(), n.getDate(), n.getHours(), n.getMinutes(), n.getSeconds(), n.getMilliseconds()));
5
+ return r.setUTCFullYear(n.getFullYear()), t - +r;
6
+ }
7
+ //#endregion
8
+ export { t as getTimezoneOffsetInMilliseconds };
@@ -0,0 +1,8 @@
1
+ import { constructFrom as e } from "../constructFrom.js";
2
+ //#region ../../node_modules/date-fns/_lib/normalizeDates.js
3
+ function t(t, ...n) {
4
+ let r = e.bind(null, t || n.find((e) => typeof e == "object"));
5
+ return n.map(r);
6
+ }
7
+ //#endregion
8
+ export { t as normalizeDates };
@@ -0,0 +1,11 @@
1
+ import { normalizeDates as e } from "./normalizeDates.js";
2
+ //#region ../../node_modules/date-fns/_lib/normalizeInterval.js
3
+ function t(t, n) {
4
+ let [r, i] = e(t, n.start, n.end);
5
+ return {
6
+ start: r,
7
+ end: i
8
+ };
9
+ }
10
+ //#endregion
11
+ export { t as normalizeInterval };
@@ -0,0 +1,23 @@
1
+ //#region ../../node_modules/date-fns/_lib/protectedTokens.js
2
+ var e = /^D+$/, t = /^Y+$/, n = [
3
+ "D",
4
+ "DD",
5
+ "YY",
6
+ "YYYY"
7
+ ];
8
+ function r(t) {
9
+ return e.test(t);
10
+ }
11
+ function i(e) {
12
+ return t.test(e);
13
+ }
14
+ function a(e, t, r) {
15
+ let i = o(e, t, r);
16
+ if (console.warn(i), n.includes(e)) throw RangeError(i);
17
+ }
18
+ function o(e, t, n) {
19
+ let r = e[0] === "Y" ? "years" : "days of the month";
20
+ return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
21
+ }
22
+ //#endregion
23
+ export { r as isProtectedDayOfYearToken, i as isProtectedWeekYearToken, a as warnOrThrowProtectedError };
@@ -0,0 +1,9 @@
1
+ import { constructFrom as e } from "./constructFrom.js";
2
+ import t from "./toDate.js";
3
+ //#region ../../node_modules/date-fns/addDays.js
4
+ function n(n, r, i) {
5
+ let a = t(n, i?.in);
6
+ return isNaN(r) ? e(i?.in || n, NaN) : (r && a.setDate(a.getDate() + r), a);
7
+ }
8
+ //#endregion
9
+ export { n as addDays, n as default };
@@ -0,0 +1,10 @@
1
+ //#region ../../node_modules/date-fns/constants.js
2
+ var e = 365.2425, t = 10 ** 8 * 24 * 60 * 60 * 1e3;
3
+ -t;
4
+ var n = 6048e5, r = 864e5, i = 3600, a = i * 24;
5
+ a * 7;
6
+ var o = a * e, s = o / 12;
7
+ s * 3;
8
+ var c = Symbol.for("constructDateFrom");
9
+ //#endregion
10
+ export { c as constructFromSymbol, e as daysInYear, t as maxTime, r as millisecondsInDay, n as millisecondsInWeek, a as secondsInDay, i as secondsInHour, s as secondsInMonth, o as secondsInYear };
@@ -0,0 +1,7 @@
1
+ import { constructFromSymbol as e } from "./constants.js";
2
+ //#region ../../node_modules/date-fns/constructFrom.js
3
+ function t(t, n) {
4
+ return typeof t == "function" ? t(n) : t && typeof t == "object" && e in t ? t[e](n) : t instanceof Date ? new t.constructor(n) : new Date(n);
5
+ }
6
+ //#endregion
7
+ export { t as constructFrom, t as default };
@@ -0,0 +1,11 @@
1
+ import { millisecondsInDay as e } from "./constants.js";
2
+ import { getTimezoneOffsetInMilliseconds as t } from "./_lib/getTimezoneOffsetInMilliseconds.js";
3
+ import { normalizeDates as n } from "./_lib/normalizeDates.js";
4
+ import r from "./startOfDay.js";
5
+ //#region ../../node_modules/date-fns/differenceInCalendarDays.js
6
+ function i(i, a, o) {
7
+ let [s, c] = n(o?.in, i, a), l = r(s), u = r(c), d = +l - t(l), f = +u - t(u);
8
+ return Math.round((d - f) / e);
9
+ }
10
+ //#endregion
11
+ export { i as default, i as differenceInCalendarDays };
@@ -0,0 +1,15 @@
1
+ import { constructFrom as e } from "./constructFrom.js";
2
+ import { normalizeInterval as t } from "./_lib/normalizeInterval.js";
3
+ //#region ../../node_modules/date-fns/eachDayOfInterval.js
4
+ function n(n, r) {
5
+ let { start: i, end: a } = t(r?.in, n), o = +i > +a, s = o ? +i : +a, c = o ? a : i;
6
+ c.setHours(0, 0, 0, 0);
7
+ let l = r?.step ?? 1;
8
+ if (!l) return [];
9
+ l < 0 && (l = -l, o = !o);
10
+ let u = [];
11
+ for (; +c <= s;) u.push(e(i, c)), c.setDate(c.getDate() + l), c.setHours(0, 0, 0, 0);
12
+ return o ? u.reverse() : u;
13
+ }
14
+ //#endregion
15
+ export { n as default, n as eachDayOfInterval };
@@ -0,0 +1,8 @@
1
+ import e from "./toDate.js";
2
+ //#region ../../node_modules/date-fns/endOfDay.js
3
+ function t(t, n) {
4
+ let r = e(t, n?.in);
5
+ return r.setHours(23, 59, 59, 999), r;
6
+ }
7
+ //#endregion
8
+ export { t as default, t as endOfDay };
@@ -0,0 +1,59 @@
1
+ import e from "./toDate.js";
2
+ import { getDefaultOptions as t } from "./_lib/defaultOptions.js";
3
+ import n from "./isValid.js";
4
+ import r from "./locale/en-US.js";
5
+ import { formatters as i } from "./_lib/format/formatters.js";
6
+ import { longFormatters as a } from "./_lib/format/longFormatters.js";
7
+ import { isProtectedDayOfYearToken as o, isProtectedWeekYearToken as s, warnOrThrowProtectedError as c } from "./_lib/protectedTokens.js";
8
+ //#region ../../node_modules/date-fns/format.js
9
+ var l = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, u = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, d = /^'([^]*?)'?$/, f = /''/g, p = /[a-zA-Z]/;
10
+ function m(d, f, m) {
11
+ let g = t(), _ = m?.locale ?? g.locale ?? r, v = m?.firstWeekContainsDate ?? m?.locale?.options?.firstWeekContainsDate ?? g.firstWeekContainsDate ?? g.locale?.options?.firstWeekContainsDate ?? 1, y = m?.weekStartsOn ?? m?.locale?.options?.weekStartsOn ?? g.weekStartsOn ?? g.locale?.options?.weekStartsOn ?? 0, b = e(d, m?.in);
12
+ if (!n(b)) throw RangeError("Invalid time value");
13
+ let x = f.match(u).map((e) => {
14
+ let t = e[0];
15
+ if (t === "p" || t === "P") {
16
+ let n = a[t];
17
+ return n(e, _.formatLong);
18
+ }
19
+ return e;
20
+ }).join("").match(l).map((e) => {
21
+ if (e === "''") return {
22
+ isToken: !1,
23
+ value: "'"
24
+ };
25
+ let t = e[0];
26
+ if (t === "'") return {
27
+ isToken: !1,
28
+ value: h(e)
29
+ };
30
+ if (i[t]) return {
31
+ isToken: !0,
32
+ value: e
33
+ };
34
+ if (t.match(p)) throw RangeError("Format string contains an unescaped latin alphabet character `" + t + "`");
35
+ return {
36
+ isToken: !1,
37
+ value: e
38
+ };
39
+ });
40
+ _.localize.preprocessor && (x = _.localize.preprocessor(b, x));
41
+ let S = {
42
+ firstWeekContainsDate: v,
43
+ weekStartsOn: y,
44
+ locale: _
45
+ };
46
+ return x.map((e) => {
47
+ if (!e.isToken) return e.value;
48
+ let t = e.value;
49
+ (!m?.useAdditionalWeekYearTokens && s(t) || !m?.useAdditionalDayOfYearTokens && o(t)) && c(t, f, String(d));
50
+ let n = i[t[0]];
51
+ return n(b, t, _.localize, S);
52
+ }).join("");
53
+ }
54
+ function h(e) {
55
+ let t = e.match(d);
56
+ return t ? t[1].replace(f, "'") : e;
57
+ }
58
+ //#endregion
59
+ export { m as default, m as format, m as formatDate, i as formatters, a as longFormatters };
@@ -0,0 +1,10 @@
1
+ import e from "./toDate.js";
2
+ import t from "./differenceInCalendarDays.js";
3
+ import n from "./startOfYear.js";
4
+ //#region ../../node_modules/date-fns/getDayOfYear.js
5
+ function r(r, i) {
6
+ let a = e(r, i?.in);
7
+ return t(a, n(a)) + 1;
8
+ }
9
+ //#endregion
10
+ export { r as default, r as getDayOfYear };
@@ -0,0 +1,8 @@
1
+ import e from "./toDate.js";
2
+ //#region ../../node_modules/date-fns/getISODay.js
3
+ function t(t, n) {
4
+ let r = e(t, n?.in).getDay();
5
+ return r === 0 ? 7 : r;
6
+ }
7
+ //#endregion
8
+ export { t as default, t as getISODay };
@@ -0,0 +1,11 @@
1
+ import { millisecondsInWeek as e } from "./constants.js";
2
+ import t from "./toDate.js";
3
+ import n from "./startOfISOWeek.js";
4
+ import r from "./startOfISOWeekYear.js";
5
+ //#region ../../node_modules/date-fns/getISOWeek.js
6
+ function i(i, a) {
7
+ let o = t(i, a?.in), s = n(o) - +r(o);
8
+ return Math.round(s / e) + 1;
9
+ }
10
+ //#endregion
11
+ export { i as default, i as getISOWeek };