@oslokommune/punkt-react 20.0.3 → 20.0.5

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 (206) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.156.0}/helpers/esm/defineProperty.js +1 -2
  3. package/dist/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.156.0}/helpers/esm/toPrimitive.js +1 -2
  4. package/dist/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.156.0}/helpers/esm/toPropertyKey.js +1 -2
  5. package/dist/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.156.0}/helpers/esm/typeof.js +1 -2
  6. package/dist/_virtual/_rolldown/runtime.js +1 -2
  7. package/dist/components/accordion/Accordion.js +1 -2
  8. package/dist/components/accordion/AccordionItem.js +9 -10
  9. package/dist/components/alert/Alert.js +7 -8
  10. package/dist/components/backlink/BackLink.js +1 -2
  11. package/dist/components/breadcrumbs/Breadcrumbs.js +1 -2
  12. package/dist/components/button/Button.js +1 -2
  13. package/dist/components/calendar/Calendar.js +1 -2
  14. package/dist/components/calendar/CalendarGrid.js +1 -2
  15. package/dist/components/calendar/CalendarNav.js +5 -6
  16. package/dist/components/calendar/calendar-utils.js +1 -2
  17. package/dist/components/calendar/useCalendarState.js +90 -91
  18. package/dist/components/card/Card.js +14 -15
  19. package/dist/components/checkbox/Checkbox.js +3 -8
  20. package/dist/components/checkboxgroup/CheckboxGroup.js +10 -11
  21. package/dist/components/checkboxgroup/CheckboxGroupContext.js +1 -2
  22. package/dist/components/combobox/Combobox.js +5 -6
  23. package/dist/components/combobox/ComboboxInput.js +6 -7
  24. package/dist/components/combobox/ComboboxTags.js +11 -12
  25. package/dist/components/combobox/Listbox.js +25 -26
  26. package/dist/components/combobox/useComboboxState.js +38 -39
  27. package/dist/components/consent/Consent.js +6 -7
  28. package/dist/components/datepicker/DateTags.js +14 -15
  29. package/dist/components/datepicker/Datepicker.js +1 -2
  30. package/dist/components/datepicker/DatepickerInputs.js +1 -2
  31. package/dist/components/datepicker/DatepickerPopup.js +5 -6
  32. package/dist/components/datepicker/useDatepickerState.js +20 -21
  33. package/dist/components/fileupload/DropZone.js +6 -7
  34. package/dist/components/fileupload/FileUpload.js +36 -37
  35. package/dist/components/fileupload/FileUploadContext.js +1 -2
  36. package/dist/components/fileupload/QueueDisplay.js +12 -13
  37. package/dist/components/fileupload/QueueItemContent.js +14 -15
  38. package/dist/components/fileupload/Subcomponents.js +70 -71
  39. package/dist/components/fileupload/Truncate.js +1 -2
  40. package/dist/components/fileupload/extensions/Comments.js +21 -22
  41. package/dist/components/fileupload/extensions/Remove.js +1 -2
  42. package/dist/components/fileupload/extensions/Rename.js +8 -9
  43. package/dist/components/fileupload/hooks/useFileAttributes.js +1 -2
  44. package/dist/components/fileupload/hooks/useImageObjectUrl.js +1 -2
  45. package/dist/components/fileupload/hooks/useImagePreview.js +1 -2
  46. package/dist/components/fileupload/hooks/useOperationState.js +1 -2
  47. package/dist/components/fileupload/hooks/useRequiredFormValidation.js +1 -2
  48. package/dist/components/fileupload/types.js +4 -5
  49. package/dist/components/footer/Footer.js +23 -24
  50. package/dist/components/footer/FooterGlobal.js +24 -25
  51. package/dist/components/footerSimple/FooterSimple.js +5 -6
  52. package/dist/components/header/Header.js +1 -2
  53. package/dist/components/header/HeaderGlobal.js +127 -128
  54. package/dist/components/header/HeaderService.js +84 -85
  55. package/dist/components/header-menu/HeaderMenu.js +34 -35
  56. package/dist/components/headerUserMenu/UserMenu.js +14 -15
  57. package/dist/components/heading/Heading.js +1 -2
  58. package/dist/components/helptext/Helptext.js +5 -6
  59. package/dist/components/icon/Icon.js +2 -3
  60. package/dist/components/input/Input.js +1 -2
  61. package/dist/components/inputwrapper/InputWrapper.js +12 -17
  62. package/dist/components/link/Link.js +1 -2
  63. package/dist/components/linkcard/LinkCard.js +2 -3
  64. package/dist/components/loader/Loader.js +2 -3
  65. package/dist/components/messagebox/Messagebox.js +6 -7
  66. package/dist/components/modal/Modal.js +13 -14
  67. package/dist/components/progressbar/Progressbar.js +5 -6
  68. package/dist/components/radio/RadioButton.js +3 -8
  69. package/dist/components/radiogroup/RadioGroup.js +1 -2
  70. package/dist/components/radiogroup/RadioGroupContext.js +1 -2
  71. package/dist/components/searchinput/SearchInput.js +11 -12
  72. package/dist/components/select/Select.js +6 -7
  73. package/dist/components/stepper/Step.js +1 -2
  74. package/dist/components/stepper/Stepper.js +1 -2
  75. package/dist/components/strings/PktStringsProvider.js +1 -2
  76. package/dist/components/table/Table.js +2 -3
  77. package/dist/components/table/TableBody.js +1 -2
  78. package/dist/components/table/TableDataCell.js +1 -2
  79. package/dist/components/table/TableHeader.js +1 -2
  80. package/dist/components/table/TableHeaderCell.js +1 -2
  81. package/dist/components/table/TableRow.js +1 -2
  82. package/dist/components/tabs/TabItem.js +1 -2
  83. package/dist/components/tabs/Tabs.js +5 -6
  84. package/dist/components/tag/Tag.js +6 -7
  85. package/dist/components/textarea/Textarea.js +5 -6
  86. package/dist/components/textinput/Textinput.js +6 -7
  87. package/dist/components/timepicker/Timepicker.js +6 -7
  88. package/dist/components/timepicker/useTimepickerState.js +27 -28
  89. package/dist/hooks/useElementWidth.js +1 -2
  90. package/dist/hooks/useFocusModality.js +1 -2
  91. package/dist/hooks/useGeneratedId.js +1 -2
  92. package/dist/hooks/useHeaderChrome.js +1 -2
  93. package/dist/hooks/useOptionGroupField.js +1 -2
  94. package/dist/hooks/useOwnerForm.js +1 -2
  95. package/dist/hooks/usePktStrings.js +1 -2
  96. package/dist/hooks/useScrollLock.js +1 -2
  97. package/dist/node_modules/@date-fns/tz/date/index.js +1 -2
  98. package/dist/node_modules/@date-fns/tz/date/mini.js +1 -2
  99. package/dist/node_modules/@date-fns/tz/index.js +3 -3
  100. package/dist/node_modules/@date-fns/tz/tzName/index.js +1 -2
  101. package/dist/node_modules/@date-fns/tz/tzOffset/index.js +1 -2
  102. package/dist/node_modules/classnames/index.js +1 -2
  103. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +1 -2
  104. package/dist/node_modules/date-fns/_lib/defaultOptions.js +1 -2
  105. package/dist/node_modules/date-fns/_lib/format/formatters.js +18 -19
  106. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +1 -2
  107. package/dist/node_modules/date-fns/_lib/format/longFormatters.js +1 -2
  108. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +1 -2
  109. package/dist/node_modules/date-fns/_lib/normalizeDates.js +1 -2
  110. package/dist/node_modules/date-fns/_lib/normalizeInterval.js +1 -2
  111. package/dist/node_modules/date-fns/_lib/protectedTokens.js +1 -2
  112. package/dist/node_modules/date-fns/addDays.js +1 -2
  113. package/dist/node_modules/date-fns/constants.js +1 -2
  114. package/dist/node_modules/date-fns/constructFrom.js +1 -2
  115. package/dist/node_modules/date-fns/differenceInCalendarDays.js +6 -7
  116. package/dist/node_modules/date-fns/eachDayOfInterval.js +5 -6
  117. package/dist/node_modules/date-fns/endOfDay.js +1 -2
  118. package/dist/node_modules/date-fns/format.js +15 -16
  119. package/dist/node_modules/date-fns/getDayOfYear.js +6 -7
  120. package/dist/node_modules/date-fns/getISODay.js +1 -2
  121. package/dist/node_modules/date-fns/getISOWeek.js +5 -6
  122. package/dist/node_modules/date-fns/getISOWeekYear.js +6 -7
  123. package/dist/node_modules/date-fns/getWeek.js +5 -6
  124. package/dist/node_modules/date-fns/getWeekYear.js +8 -9
  125. package/dist/node_modules/date-fns/isDate.js +1 -2
  126. package/dist/node_modules/date-fns/isValid.js +4 -5
  127. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +1 -2
  128. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +1 -2
  129. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +1 -2
  130. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +1 -2
  131. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +1 -2
  132. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -1
  133. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +1 -2
  134. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -1
  135. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +0 -1
  136. package/dist/node_modules/date-fns/locale/en-US.js +1 -2
  137. package/dist/node_modules/date-fns/startOfDay.js +1 -2
  138. package/dist/node_modules/date-fns/startOfISOWeek.js +1 -2
  139. package/dist/node_modules/date-fns/startOfISOWeekYear.js +5 -6
  140. package/dist/node_modules/date-fns/startOfWeek.js +4 -5
  141. package/dist/node_modules/date-fns/startOfWeekYear.js +7 -8
  142. package/dist/node_modules/date-fns/startOfYear.js +1 -2
  143. package/dist/node_modules/date-fns/toDate.js +1 -2
  144. package/dist/punkt-react.cjs +1 -1
  145. package/dist/shared-strings/consent.js +1 -2
  146. package/dist/shared-strings/format.js +1 -2
  147. package/dist/shared-strings/nb.js +1 -2
  148. package/dist/shared-strings/resolve.js +1 -2
  149. package/dist/shared-strings/store.js +1 -2
  150. package/dist/shared-types/accordion.js +1 -2
  151. package/dist/shared-types/calendar.js +1 -2
  152. package/dist/shared-types/card.js +1 -2
  153. package/dist/shared-types/checkbox.js +1 -2
  154. package/dist/shared-types/combobox.js +1 -2
  155. package/dist/shared-types/consent.js +1 -2
  156. package/dist/shared-types/footer.js +1 -2
  157. package/dist/shared-types/header-footer.js +1 -2
  158. package/dist/shared-types/icon.js +1 -2
  159. package/dist/shared-types/input-wrapper.js +1 -2
  160. package/dist/shared-types/linkcard.js +1 -2
  161. package/dist/shared-types/loader.js +1 -2
  162. package/dist/shared-types/messagebox.js +1 -2
  163. package/dist/shared-types/option-group.js +1 -2
  164. package/dist/shared-types/progressbar.js +1 -2
  165. package/dist/shared-types/radiobutton.js +1 -2
  166. package/dist/shared-types/select.js +1 -2
  167. package/dist/shared-types/size.js +1 -2
  168. package/dist/shared-types/table.js +1 -2
  169. package/dist/shared-types/tag.js +1 -2
  170. package/dist/shared-types/textarea.js +1 -2
  171. package/dist/shared-types/textinput.js +1 -2
  172. package/dist/shared-utils/calendar/calendar-grid.js +4 -5
  173. package/dist/shared-utils/calendar/date-validation.js +1 -2
  174. package/dist/shared-utils/calendar/keyboard-navigation.js +1 -2
  175. package/dist/shared-utils/calendar/selection-manager.js +31 -32
  176. package/dist/shared-utils/combobox/input-utils.js +1 -2
  177. package/dist/shared-utils/combobox/keyboard-navigation.js +1 -2
  178. package/dist/shared-utils/combobox/option-utils.js +1 -2
  179. package/dist/shared-utils/date-utils.js +10 -11
  180. package/dist/shared-utils/datepicker-utils.js +4 -5
  181. package/dist/shared-utils/device-utils.js +1 -2
  182. package/dist/shared-utils/fileupload/announcements.js +1 -2
  183. package/dist/shared-utils/fileupload/filename.js +1 -2
  184. package/dist/shared-utils/fileupload/formats.js +1 -2
  185. package/dist/shared-utils/fileupload/navigation.js +1 -2
  186. package/dist/shared-utils/fileupload/size.js +1 -2
  187. package/dist/shared-utils/fileupload/transfers.js +1 -2
  188. package/dist/shared-utils/fileupload/truncate.js +1 -2
  189. package/dist/shared-utils/fileupload/validation.js +8 -9
  190. package/dist/shared-utils/focus-trap/index.js +13 -31
  191. package/dist/shared-utils/forms/described-by.js +1 -2
  192. package/dist/shared-utils/header-footer/external-domain.js +1 -2
  193. package/dist/shared-utils/header-footer/fetch-header-footer-data.js +1 -2
  194. package/dist/shared-utils/header-footer/icon-map.js +1 -2
  195. package/dist/shared-utils/header-footer/select-megamenu.js +1 -2
  196. package/dist/shared-utils/scroll-lock/index.js +1 -2
  197. package/dist/shared-utils/timepicker/options.js +1 -2
  198. package/dist/shared-utils/timepicker/stepper.js +1 -2
  199. package/dist/shared-utils/timepicker/time-utils.js +1 -2
  200. package/dist/shared-utils/value-utils.js +1 -2
  201. package/dist/utils/nativeInputValue.js +1 -2
  202. package/dist/utils/stableKeys.js +1 -2
  203. package/dist/utils/stringutils.js +1 -2
  204. package/package.json +20 -21
  205. package/src/components/accordion/Accordion.test.tsx +2 -4
  206. package/src/components/tag/Tag.tsx +0 -1
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { PktIcon as e } from "../icon/Icon.js";
3
- import { withStableKeys as t } from "../../utils/stableKeys.js";
4
- import { PktTabItem as n } from "./TabItem.js";
3
+ import { PktTabItem as t } from "./TabItem.js";
4
+ import { withStableKeys as n } from "../../utils/stableKeys.js";
5
5
  import { Children as r, createContext as i, forwardRef as a, useContext as o, useEffect as s, useRef as c } from "react";
6
6
  import { jsx as l } from "react/jsx-runtime";
7
- //#region src/components/tabs/Tabs.tsx
7
+ // src/components/tabs/Tabs.tsx
8
8
  var u = i(null), d = () => {
9
9
  let e = o(u);
10
10
  if (!e) throw Error("TabItem must be used within a Tabs component");
@@ -56,7 +56,7 @@ var u = i(null), d = () => {
56
56
  name: o,
57
57
  className: "pkt-tabs__separator-icon"
58
58
  }) : null
59
- }, t), k = (e) => !S || e.length <= 1 ? e : e.flatMap((t, n) => n < e.length - 1 ? [t, O(`separator-${n}`)] : [t]), A = t(f ?? [], (e) => `${e.href ?? ""}|${e.text}`).map(({ item: e, key: t }, r) => /* @__PURE__ */ l(n, {
59
+ }, t), k = (e) => !S || e.length <= 1 ? e : e.flatMap((t, n) => n < e.length - 1 ? [t, O(`separator-${n}`)] : [t]), A = n(f ?? [], (e) => `${e.href ?? ""}|${e.text}`).map(({ item: e, key: n }, r) => /* @__PURE__ */ l(t, {
60
60
  active: !e.disabled && e.active,
61
61
  disabled: e.disabled,
62
62
  href: e.href,
@@ -66,7 +66,7 @@ var u = i(null), d = () => {
66
66
  tagSkin: e.tag?.skin,
67
67
  index: r,
68
68
  children: e.text
69
- }, t)), j = ["pkt-tabs", S && "pkt-tabs--with-separator"].filter(Boolean).join(" "), M = k(b ? y : A || []);
69
+ }, n)), j = ["pkt-tabs", S && "pkt-tabs--with-separator"].filter(Boolean).join(" "), M = k(b ? y : A || []);
70
70
  return /* @__PURE__ */ l(u.Provider, {
71
71
  value: {
72
72
  arrowNav: v,
@@ -86,5 +86,4 @@ var u = i(null), d = () => {
86
86
  });
87
87
  });
88
88
  f.displayName = "PktTabs";
89
- //#endregion
90
89
  export { f as PktTabs, d as useTabsContext };
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import { __toESM as e } from "../../_virtual/_rolldown/runtime.js";
3
3
  import { TAG_DEFAULTS as t } from "../../shared-types/tag.js";
4
- import "../../shared-types/index.js";
5
4
  import { require_classnames as n } from "../../node_modules/classnames/index.js";
5
+ import "../../shared-types/index.js";
6
6
  import { PktIcon as r } from "../icon/Icon.js";
7
- import { formatString as i } from "../../shared-strings/format.js";
8
- import { usePktStrings as a } from "../../hooks/usePktStrings.js";
7
+ import { usePktStrings as i } from "../../hooks/usePktStrings.js";
8
+ import { formatString as a } from "../../shared-strings/format.js";
9
9
  import { forwardRef as o, useCallback as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
10
10
  import { jsx as f, jsxs as p } from "react/jsx-runtime";
11
- //#region src/components/tag/Tag.tsx
11
+ // src/components/tag/Tag.tsx
12
12
  var m = /* @__PURE__ */ e(n(), 1), h = o(({ children: e, skin: n = t.skin, state: o, textStyle: h = t.textStyle, size: g = t.size, closeTag: _ = t.closeTag, className: v, iconName: y, ariaLabel: b, onClose: x, type: S = t.type, "aria-description": C, strings: w, ...T }, E) => {
13
13
  let [D, O] = d(!1), k = s(() => {
14
14
  O(!0), x && x();
@@ -16,8 +16,8 @@ var m = /* @__PURE__ */ e(n(), 1), h = o(({ children: e, skin: n = t.skin, state
16
16
  c(() => {
17
17
  M(A.current?.textContent?.trim() ?? "");
18
18
  }, [e]);
19
- let N = a(["tag"], w), P = l(() => {
20
- if (_ && !b) return j && i(N.tag.remove, { label: j }) || C;
19
+ let N = i(["tag"], w), P = l(() => {
20
+ if (_ && !b) return j && a(N.tag.remove, { label: j }) || C;
21
21
  }, [
22
22
  _,
23
23
  b,
@@ -76,5 +76,4 @@ var m = /* @__PURE__ */ e(n(), 1), h = o(({ children: e, skin: n = t.skin, state
76
76
  });
77
77
  });
78
78
  h.displayName = "PktTag";
79
- //#endregion
80
79
  export { h as PktTag };
@@ -1,23 +1,23 @@
1
1
  "use client";
2
2
  import { TEXTAREA_DEFAULTS as e } from "../../shared-types/textarea.js";
3
+ import { PktInputWrapper as t } from "../inputwrapper/InputWrapper.js";
3
4
  import "../../shared-types/index.js";
4
- import { useGeneratedId as t } from "../../hooks/useGeneratedId.js";
5
5
  import { describedByIds as n } from "../../shared-utils/forms/described-by.js";
6
- import { PktInputWrapper as r } from "../inputwrapper/InputWrapper.js";
6
+ import { useGeneratedId as r } from "../../hooks/useGeneratedId.js";
7
7
  import { forwardRef as i, useState as a } from "react";
8
8
  import { jsx as o } from "react/jsx-runtime";
9
- //#region src/components/textarea/Textarea.tsx
9
+ // src/components/textarea/Textarea.tsx
10
10
  var s = i(({ id: i, ariaDescribedby: s, ariaLabelledby: c, counter: l, hasFieldset: u, counterMaxLength: d, className: f, disabled: p, errorMessage: m, hasError: h = e.hasError, helptext: g, helptextDropdown: _, helptextDropdownButton: v, inline: y, fullwidth: b = e.fullwidth, label: x, name: S, optionalTag: C = e.optionalTag, optionalText: w, requiredTag: T = e.requiredTag, requiredText: E, tagText: D = null, placeholder: O, rows: k, useWrapper: A = e.useWrapper, onChange: j, value: M, autoComplete: N, autocomplete: P, minLength: F, maxLength: I, readOnly: L, skipForwardTestid: R = !1, inputSize: z = e.inputSize, strings: B, ...V }, H) => {
11
11
  let U = l ?? (d ?? 0) > 0, W = [
12
12
  f,
13
13
  "pkt-textinput",
14
14
  "pkt-textarea"
15
- ].filter(Boolean).join(" "), G = t(i), K = `${G}-input`, q = `${K}-label`, J = c || q, [Y, X] = a(0), Z = M === void 0 ? Y : M?.length || 0, Q = (e) => {
15
+ ].filter(Boolean).join(" "), G = r(i), K = `${G}-input`, q = `${K}-label`, J = c || q, [Y, X] = a(0), Z = M === void 0 ? Y : M?.length || 0, Q = (e) => {
16
16
  U && X(e.currentTarget?.value?.length || 0), j && j(e);
17
17
  };
18
18
  return /* @__PURE__ */ o("div", {
19
19
  className: W,
20
- children: /* @__PURE__ */ o(r, {
20
+ children: /* @__PURE__ */ o(t, {
21
21
  strings: B,
22
22
  ariaDescribedby: s,
23
23
  disabled: p,
@@ -72,5 +72,4 @@ var s = i(({ id: i, ariaDescribedby: s, ariaLabelledby: c, counter: l, hasFields
72
72
  });
73
73
  });
74
74
  s.displayName = "PktTextarea";
75
- //#endregion
76
75
  export { s as PktTextarea };
@@ -1,20 +1,20 @@
1
1
  "use client";
2
2
  import { TEXTINPUT_DEFAULTS as e } from "../../shared-types/textinput.js";
3
- import "../../shared-types/index.js";
4
3
  import { PktIcon as t } from "../icon/Icon.js";
5
- import { useGeneratedId as n } from "../../hooks/useGeneratedId.js";
4
+ import { PktInputWrapper as n } from "../inputwrapper/InputWrapper.js";
5
+ import "../../shared-types/index.js";
6
6
  import { describedByIds as ee } from "../../shared-utils/forms/described-by.js";
7
- import { PktInputWrapper as te } from "../inputwrapper/InputWrapper.js";
7
+ import { useGeneratedId as te } from "../../hooks/useGeneratedId.js";
8
8
  import { forwardRef as r, useState as i } from "react";
9
9
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
10
- //#region src/components/textinput/Textinput.tsx
10
+ // src/components/textinput/Textinput.tsx
11
11
  var s = r(({ id: r, ariaDescribedby: s, ariaLabelledby: c, autoComplete: l, autocomplete: u, counter: d, hasFieldset: ne, counterMaxLength: f, className: p, disabled: m = e.disabled, errorMessage: h, hasError: g = e.hasError, helptext: _, helptextDropdown: re, helptextDropdownButton: ie, iconNameRight: v, inline: y = e.inline, fullwidth: b = e.fullwidth, label: x, name: S, optionalTag: C = e.optionalTag, optionalText: w, requiredTag: T = e.requiredTag, requiredText: E, tagText: D = null, placeholder: O, prefix: k, suffix: A, type: j = e.type, useWrapper: M = e.useWrapper, omitSearchIcon: N = e.omitSearchIcon, value: P, minLength: F, maxLength: I, min: L, max: ae, step: R, size: z, readOnly: B, readonly: V, required: H = e.required, dataTestid: U, onChange: W, skipForwardTestid: G = !1, inputSize: K = e.inputSize, strings: q, ...J }, oe) => {
12
- let Y = d ?? (f ?? 0) > 0, se = [p, "pkt-textinput"].filter(Boolean).join(" "), X = j === "search" && !v && !N, ce = j === "date" && P ? P.slice(0, 10) : P, [le, ue] = i(0), Z = P === void 0 ? le : P?.length || 0, Q = n(r), $ = `${Q}`, de = `${$}-label`, fe = c || de, pe = (e) => {
12
+ let Y = d ?? (f ?? 0) > 0, se = [p, "pkt-textinput"].filter(Boolean).join(" "), X = j === "search" && !v && !N, ce = j === "date" && P ? P.slice(0, 10) : P, [le, ue] = i(0), Z = P === void 0 ? le : P?.length || 0, Q = te(r), $ = `${Q}`, de = `${$}-label`, fe = c || de, pe = (e) => {
13
13
  Y && ue(e.currentTarget?.value?.length || 0), W && W(e);
14
14
  };
15
15
  return /* @__PURE__ */ a("div", {
16
16
  className: se,
17
- children: /* @__PURE__ */ a(te, {
17
+ children: /* @__PURE__ */ a(n, {
18
18
  strings: q,
19
19
  ariaDescribedby: s,
20
20
  disabled: m,
@@ -104,5 +104,4 @@ var s = r(({ id: r, ariaDescribedby: s, ariaLabelledby: c, autoComplete: l, auto
104
104
  });
105
105
  });
106
106
  s.displayName = "PktTextinput";
107
- //#endregion
108
107
  export { s as PktTextinput };
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import { PktIcon as e } from "../icon/Icon.js";
3
- import { describedByIds as t } from "../../shared-utils/forms/described-by.js";
4
- import { PktInputWrapper as n } from "../inputwrapper/InputWrapper.js";
5
- import { useTimepickerState as r } from "./useTimepickerState.js";
3
+ import { PktInputWrapper as t } from "../inputwrapper/InputWrapper.js";
4
+ import { useTimepickerState as n } from "./useTimepickerState.js";
5
+ import { describedByIds as r } from "../../shared-utils/forms/described-by.js";
6
6
  import { forwardRef as i } from "react";
7
7
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
8
- //#region src/components/timepicker/Timepicker.tsx
8
+ // src/components/timepicker/Timepicker.tsx
9
9
  var s = i((i, s) => {
10
- let { onChange: c, inputSize: l = "medium" } = i, u = r(i, s), d = u.strings.hours, f = u.strings.minutes, p = u.label ? `${d}, ${u.label}` : d, m = u.label ? `${f}, ${u.label}` : f, h = t({
10
+ let { onChange: c, inputSize: l = "medium" } = i, u = n(i, s), d = u.strings.hours, f = u.strings.minutes, p = u.label ? `${d}, ${u.label}` : d, m = u.label ? `${f}, ${u.label}` : f, h = r({
11
11
  id: u.hoursId,
12
12
  hasHelptext: !!u.helptext,
13
13
  ariaDescribedby: u.ariaDescribedby
@@ -192,7 +192,7 @@ var s = i((i, s) => {
192
192
  id: u.id || void 0,
193
193
  onFocus: u.handleFocusIn,
194
194
  onBlur: u.handleFocusOut,
195
- children: /* @__PURE__ */ a(n, {
195
+ children: /* @__PURE__ */ a(t, {
196
196
  strings: u.stringsOverride,
197
197
  forId: u.hoursId,
198
198
  label: u.label,
@@ -220,5 +220,4 @@ var s = i((i, s) => {
220
220
  });
221
221
  });
222
222
  s.displayName = "PktTimepicker";
223
- //#endregion
224
223
  export { s as PktTimepicker };
@@ -1,14 +1,14 @@
1
- import { formatString as e } from "../../shared-strings/format.js";
2
- import { usePktStrings as t } from "../../hooks/usePktStrings.js";
3
- import { useOwnerForm as n } from "../../hooks/useOwnerForm.js";
4
- import { setNativeInputValue as r } from "../../utils/nativeInputValue.js";
5
- import { getHourOptions as i, getMinuteOptions as a, getMinuteStep as ee } from "../../shared-utils/timepicker/options.js";
6
- import { stepTime as o } from "../../shared-utils/timepicker/stepper.js";
7
- import { isValidTimeString as s, timeToMinutes as c } from "../../shared-utils/timepicker/time-utils.js";
1
+ import { getHourOptions as e, getMinuteOptions as t, getMinuteStep as n } from "../../shared-utils/timepicker/options.js";
2
+ import { stepTime as r } from "../../shared-utils/timepicker/stepper.js";
3
+ import { isValidTimeString as i, timeToMinutes as a } from "../../shared-utils/timepicker/time-utils.js";
4
+ import { usePktStrings as ee } from "../../hooks/usePktStrings.js";
5
+ import { useOwnerForm as o } from "../../hooks/useOwnerForm.js";
6
+ import { setNativeInputValue as s } from "../../utils/nativeInputValue.js";
7
+ import { formatString as c } from "../../shared-strings/format.js";
8
8
  import { useCallback as l, useEffect as u, useImperativeHandle as d, useLayoutEffect as te, useMemo as f, useRef as p, useState as m } from "react";
9
- //#region src/components/timepicker/useTimepickerState.ts
9
+ // src/components/timepicker/useTimepickerState.ts
10
10
  function h(e) {
11
- if (e && s(e)) {
11
+ if (e && i(e)) {
12
12
  let [t, n] = e.split(":");
13
13
  return [t, n];
14
14
  }
@@ -17,34 +17,34 @@ function h(e) {
17
17
  function ne(e, t) {
18
18
  return `${String(parseInt(e, 10)).padStart(2, "0")}:${String(parseInt(t, 10)).padStart(2, "0")}`;
19
19
  }
20
- function re(t, n, r) {
21
- let { required: i, min: a, max: o, step: l } = n;
22
- if (i && !t) return {
20
+ function re(e, t, r) {
21
+ let { required: ee, min: o, max: s, step: l } = t;
22
+ if (ee && !e) return {
23
23
  valid: !1,
24
24
  message: r.valueMissing
25
25
  };
26
- if (!t) return { valid: !0 };
27
- if (!s(t)) return {
26
+ if (!e) return { valid: !0 };
27
+ if (!i(e)) return {
28
28
  valid: !1,
29
29
  message: r.typeMismatch
30
30
  };
31
- let u = c(t), d = ee(l);
32
- return a && u < c(String(a)) ? {
31
+ let u = a(e), d = n(l);
32
+ return o && u < a(String(o)) ? {
33
33
  valid: !1,
34
- message: e(r.rangeUnderflowMin, { min: String(a) })
35
- } : o && u > c(String(o)) ? {
34
+ message: c(r.rangeUnderflowMin, { min: String(o) })
35
+ } : s && u > a(String(s)) ? {
36
36
  valid: !1,
37
- message: e(r.rangeOverflowMax, { max: String(o) })
37
+ message: c(r.rangeOverflowMax, { max: String(s) })
38
38
  } : l && u % d !== 0 ? {
39
39
  valid: !1,
40
- message: d === 60 ? r.timeStepMismatchHour : d === 30 ? r.timeStepMismatchHalfHour : e(r.timeStepMismatch, { step: `${d}, ${d * 2}, ${d * 3}` })
40
+ message: d === 60 ? r.timeStepMismatchHour : d === 30 ? r.timeStepMismatchHalfHour : c(r.timeStepMismatch, { step: `${d}, ${d * 2}, ${d * 3}` })
41
41
  } : { valid: !0 };
42
42
  }
43
43
  function ie(e) {
44
44
  return e === 3600 || e < 3600 && 3600 % e == 0 && e % 60 == 0;
45
45
  }
46
- function ae(e, s) {
47
- let { id: c, label: ae, value: g, defaultValue: _, min: v, max: y, step: b = 60, hidePicker: oe = !1, stepArrows: se = !1, fullwidth: ce = !1, name: le, form: ue, disabled: x = !1, required: S = !1, helptext: de, helptextDropdown: fe, helptextDropdownButton: pe, hasError: me = !1, errorMessage: he, optionalTag: ge = !1, optionalText: _e, requiredTag: ve = !1, requiredText: ye, tagText: be, inline: xe = !1, useWrapper: Se = !0, ariaDescribedby: Ce, strings: we, className: Te, inputSize: Ee = "medium", onValueChange: C, onFocus: De, onBlur: Oe } = e, w = t(["timepicker", "validation"], we), ke = w.timepicker, Ae = we, T = g !== void 0, je = g === void 0 ? _ ?? "" : g ?? "", Me = p(je), [Ne, E] = m(() => je), D = T ? g ?? "" : Ne, [Pe, Fe] = m(() => h(g === void 0 ? _ : g)[0]), [Ie, Le] = m(() => h(g === void 0 ? _ : g)[1]), O = p(Pe), k = p(Ie), A = l((e) => {
46
+ function ae(i, a) {
47
+ let { id: c, label: ae, value: g, defaultValue: _, min: v, max: y, step: b = 60, hidePicker: oe = !1, stepArrows: se = !1, fullwidth: ce = !1, name: le, form: ue, disabled: x = !1, required: S = !1, helptext: de, helptextDropdown: fe, helptextDropdownButton: pe, hasError: me = !1, errorMessage: he, optionalTag: ge = !1, optionalText: _e, requiredTag: ve = !1, requiredText: ye, tagText: be, inline: xe = !1, useWrapper: Se = !0, ariaDescribedby: Ce, strings: we, className: Te, inputSize: Ee = "medium", onValueChange: C, onFocus: De, onBlur: Oe } = i, w = ee(["timepicker", "validation"], we), ke = w.timepicker, Ae = we, T = g !== void 0, je = g === void 0 ? _ ?? "" : g ?? "", Me = p(je), [Ne, E] = m(() => je), D = T ? g ?? "" : Ne, [Pe, Fe] = m(() => h(g === void 0 ? _ : g)[0]), [Ie, Le] = m(() => h(g === void 0 ? _ : g)[1]), O = p(Pe), k = p(Ie), A = l((e) => {
48
48
  O.current = e, Fe(e);
49
49
  }, []), j = l((e) => {
50
50
  k.current = e, Le(e);
@@ -57,7 +57,7 @@ function ae(e, s) {
57
57
  u(() => {
58
58
  b != null && !ie(b) && console.warn(`PktTimepicker: step="${b}" er ikke en gyldig verdi. Step må være et multiplum av 60 (hele minutter) eller nøyaktig 3600 (hel time).`);
59
59
  }, [b]);
60
- let P = p(null), F = p(null), I = p(null), L = p(null), R = p(null), z = p(null), B = n(R, ue), V = p(0), H = p(-1), U = p(0), W = p(-1), [Be, G] = m(!1), K = f(() => ee(b), [b]), Ve = f(() => i(v, y), [v, y]), He = f(() => a(b), [b]), Ue = `${c}-hours`, We = `${c}-minutes`, Ge = `${c}-popup`, Ke = `${c}-input`, q = f(() => re(D, {
60
+ let P = p(null), F = p(null), I = p(null), L = p(null), R = p(null), z = p(null), B = o(R, ue), V = p(0), H = p(-1), U = p(0), W = p(-1), [Be, G] = m(!1), K = f(() => n(b), [b]), Ve = f(() => e(v, y), [v, y]), He = f(() => t(b), [b]), Ue = `${c}-hours`, We = `${c}-minutes`, Ge = `${c}-popup`, Ke = `${c}-input`, q = f(() => re(D, {
61
61
  required: S,
62
62
  min: v,
63
63
  max: y,
@@ -76,7 +76,7 @@ function ae(e, s) {
76
76
  let J = l((e) => {
77
77
  T || E(e);
78
78
  let t = z.current;
79
- t && (r(t, e), t.dispatchEvent(new Event("input", { bubbles: !0 })), C?.(e));
79
+ t && (s(t, e), t.dispatchEvent(new Event("input", { bubbles: !0 })), C?.(e));
80
80
  }, [T, C]), Y = l(() => {
81
81
  let e = O.current, t = k.current;
82
82
  if (e !== "" && t !== "") {
@@ -166,7 +166,7 @@ function ae(e, s) {
166
166
  A,
167
167
  j
168
168
  ]), Ye = l((e) => {
169
- let t = o(O.current, k.current, e, K);
169
+ let t = r(O.current, k.current, e, K);
170
170
  A(t.hours), j(t.minutes), `${t.hours}:${t.minutes}` !== D && J(`${t.hours}:${t.minutes}`);
171
171
  }, [
172
172
  K,
@@ -359,7 +359,7 @@ function ae(e, s) {
359
359
  let t = L.current;
360
360
  if (!t) return;
361
361
  let n = e.relatedTarget;
362
- (!n || !t.contains(n)) && Q();
362
+ n && t.contains(n) || Q();
363
363
  }, [Q]), nt = l((e) => {
364
364
  let t = R.current;
365
365
  if (!t) return;
@@ -377,7 +377,7 @@ function ae(e, s) {
377
377
  M,
378
378
  Q
379
379
  ]);
380
- return d(s, () => ({
380
+ return d(a, () => ({
381
381
  get value() {
382
382
  return z.current?.value ?? "";
383
383
  },
@@ -479,5 +479,4 @@ function ae(e, s) {
479
479
  effectiveValue: D
480
480
  };
481
481
  }
482
- //#endregion
483
482
  export { ae as useTimepickerState };
@@ -1,5 +1,5 @@
1
1
  import { useEffect as e, useState as t, useSyncExternalStore as n } from "react";
2
- //#region src/hooks/useElementWidth.ts
2
+ // src/hooks/useElementWidth.ts
3
3
  var r = () => () => {}, i = (i, a) => {
4
4
  let o = a ?? Infinity, s = n(r, () => !1, () => !0), [c, l] = t(() => typeof window > "u" ? o : a ?? window.innerWidth);
5
5
  return e(() => {
@@ -19,5 +19,4 @@ var r = () => () => {}, i = (i, a) => {
19
19
  };
20
20
  }, [i]), s ? o : c;
21
21
  };
22
- //#endregion
23
22
  export { i as useElementWidth };
@@ -1,5 +1,5 @@
1
1
  import { useEffect as e, useRef as t } from "react";
2
- //#region src/hooks/useFocusModality.ts
2
+ // src/hooks/useFocusModality.ts
3
3
  function n(n) {
4
4
  let r = t(null), i = t(!1), a = t(void 0), o = (e) => {
5
5
  let t = r.current;
@@ -24,5 +24,4 @@ function n(n) {
24
24
  }
25
25
  };
26
26
  }
27
- //#endregion
28
27
  export { n as useFocusModality };
@@ -1,8 +1,7 @@
1
1
  import { useId as e } from "react";
2
- //#region src/hooks/useGeneratedId.ts
2
+ // src/hooks/useGeneratedId.ts
3
3
  function t(t) {
4
4
  let n = e().replace(/[^\w-]/g, "");
5
5
  return t || n;
6
6
  }
7
- //#endregion
8
7
  export { t as useGeneratedId };
@@ -1,6 +1,6 @@
1
1
  import { useElementWidth as e } from "./useElementWidth.js";
2
2
  import { useCallback as t, useEffect as n, useRef as r, useState as i } from "react";
3
- //#region src/hooks/useHeaderChrome.ts
3
+ // src/hooks/useHeaderChrome.ts
4
4
  function a({ forwardedRef: a, mobileBreakpoint: o, tabletBreakpoint: s, position: c, scrollBehavior: l, pauseScrollHide: u = !1 }) {
5
5
  let d = r(null), f = t((e) => {
6
6
  d.current = e, typeof a == "function" ? a(e) : a && (a.current = e);
@@ -32,5 +32,4 @@ function a({ forwardedRef: a, mobileBreakpoint: o, tabletBreakpoint: s, position
32
32
  }, [])
33
33
  };
34
34
  }
35
- //#endregion
36
35
  export { a as useHeaderChrome };
@@ -1,5 +1,5 @@
1
1
  import { useCallback as e, useEffect as t, useRef as n } from "react";
2
- //#region src/hooks/useOptionGroupField.ts
2
+ // src/hooks/useOptionGroupField.ts
3
3
  var r = (e) => !e.matches(":disabled");
4
4
  function i({ type: i, name: a, forwardedRef: o, onChange: s, onValueChange: c, onFocus: l, onBlur: u, onValueSet: d }) {
5
5
  let f = n(null), p = n({
@@ -66,5 +66,4 @@ function i({ type: i, name: a, forwardedRef: o, onChange: s, onValueChange: c, o
66
66
  }
67
67
  };
68
68
  }
69
- //#endregion
70
69
  export { r as isActiveOption, i as useOptionGroupField };
@@ -1,5 +1,5 @@
1
1
  import { useEffect as e, useState as t } from "react";
2
- //#region src/hooks/useOwnerForm.ts
2
+ // src/hooks/useOwnerForm.ts
3
3
  var n = (e, t) => {
4
4
  if (!e) return null;
5
5
  if (t === void 0) return e.closest("form");
@@ -11,5 +11,4 @@ var n = (e, t) => {
11
11
  o(n(r.current, i));
12
12
  }, [r, i]), a;
13
13
  };
14
- //#endregion
15
14
  export { r as useOwnerForm };
@@ -2,7 +2,7 @@ import { getPktStrings as e, subscribePktStrings as t } from "../shared-strings/
2
2
  import { resolveStrings as n } from "../shared-strings/resolve.js";
3
3
  import { PktStringsContext as r } from "../components/strings/PktStringsProvider.js";
4
4
  import { useContext as i, useMemo as a, useSyncExternalStore as o } from "react";
5
- //#region src/hooks/usePktStrings.ts
5
+ // src/hooks/usePktStrings.ts
6
6
  function s(s, c) {
7
7
  let l = o(t, e, e), u = i(r), d = s.join("|");
8
8
  return a(() => n(s, u, c), [
@@ -12,5 +12,4 @@ function s(s, c) {
12
12
  c
13
13
  ]);
14
14
  }
15
- //#endregion
16
15
  export { s as usePktStrings };
@@ -1,6 +1,6 @@
1
1
  import { createScrollLockToken as e, setScrollLock as t } from "../shared-utils/scroll-lock/index.js";
2
2
  import { useEffect as n, useRef as r } from "react";
3
- //#region src/hooks/useScrollLock.ts
3
+ // src/hooks/useScrollLock.ts
4
4
  function i(i) {
5
5
  let a = r(e());
6
6
  n(() => {
@@ -8,5 +8,4 @@ function i(i) {
8
8
  return t(e, i), () => t(e, !1);
9
9
  }, [i]);
10
10
  }
11
- //#endregion
12
11
  export { i as useScrollLock };
@@ -1,6 +1,6 @@
1
1
  import { tzName as e } from "../tzName/index.js";
2
2
  import { TZDateMini as t } from "./mini.js";
3
- //#region ../../node_modules/@date-fns/tz/date/index.js
3
+ // ../../node_modules/@date-fns/tz/date/index.js
4
4
  var n = class n extends t {
5
5
  static tz(e, ...t) {
6
6
  return t.length ? new n(...t, e) : new n(Date.now(), e);
@@ -53,5 +53,4 @@ var n = class n extends t {
53
53
  return new n(+new Date(e), this.timeZone);
54
54
  }
55
55
  };
56
- //#endregion
57
56
  export { n as TZDate };
@@ -1,5 +1,5 @@
1
1
  import { tzOffset as e } from "../tzOffset/index.js";
2
- //#region ../../node_modules/@date-fns/tz/date/mini.js
2
+ // ../../node_modules/@date-fns/tz/date/mini.js
3
3
  var t = class t extends Date {
4
4
  constructor(...t) {
5
5
  super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(e(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)), a(this, t)) : this.setTime(Date.now());
@@ -71,5 +71,4 @@ function s(t, n) {
71
71
  let r = new Date(n ?? +t);
72
72
  return r.setUTCSeconds(r.getUTCSeconds() - Math.round(-e(t.timeZone, r) * 60)), +r;
73
73
  }
74
- //#endregion
75
74
  export { t as TZDateMini };
@@ -1,6 +1,6 @@
1
1
  import { tzName as e } from "./tzName/index.js";
2
2
  import { tzOffset as t } from "./tzOffset/index.js";
3
- import { TZDateMini as n } from "./date/mini.js";
4
- import { TZDate as r } from "./date/index.js";
3
+ import { TZDate as n } from "./date/index.js";
4
+ import { TZDateMini as r } from "./date/mini.js";
5
5
  import "./tz/index.js";
6
- export { r as TZDate, n as TZDateMini, e as tzName, t as tzOffset };
6
+ export { n as TZDate, r as TZDateMini, e as tzName, t as tzOffset };
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/@date-fns/tz/tzName/index.js
1
+ // ../../node_modules/@date-fns/tz/tzName/index.js
2
2
  function e(e, t, n = "long") {
3
3
  return new Intl.DateTimeFormat("en-US", {
4
4
  hour: "numeric",
@@ -6,5 +6,4 @@ function e(e, t, n = "long") {
6
6
  timeZoneName: n
7
7
  }).format(t).split(/\s/g).slice(2).join(" ");
8
8
  }
9
- //#endregion
10
9
  export { e as tzName };
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/@date-fns/tz/tzOffset/index.js
1
+ // ../../node_modules/@date-fns/tz/tzOffset/index.js
2
2
  var e = {}, t = {};
3
3
  function n(n, a) {
4
4
  try {
@@ -18,5 +18,4 @@ function i(e, n) {
18
18
  let r = +(n[0] || 0), i = +(n[1] || 0), a = (n[2] || 0) / 60;
19
19
  return t[e] = r * 60 + i > 0 ? r * 60 + i + a : r * 60 - i - a;
20
20
  }
21
- //#endregion
22
21
  export { n as tzOffset };
@@ -1,5 +1,5 @@
1
1
  import { __commonJSMin as e } from "../../_virtual/_rolldown/runtime.js";
2
- //#region ../../node_modules/classnames/index.js
2
+ // ../../node_modules/classnames/index.js
3
3
  var t = /* @__PURE__ */ e(((e, t) => {
4
4
  (function() {
5
5
  var e = {}.hasOwnProperty;
@@ -27,6 +27,5 @@ var t = /* @__PURE__ */ e(((e, t) => {
27
27
  }) : window.classNames = n;
28
28
  })();
29
29
  }));
30
- //#endregion
31
30
  export default t();
32
31
  export { t as require_classnames };
@@ -1,6 +1,5 @@
1
- //#region ../../node_modules/date-fns/_lib/addLeadingZeros.js
1
+ // ../../node_modules/date-fns/_lib/addLeadingZeros.js
2
2
  function e(e, t) {
3
3
  return (e < 0 ? "-" : "") + Math.abs(e).toString().padStart(t, "0");
4
4
  }
5
- //#endregion
6
5
  export { e as addLeadingZeros };
@@ -1,7 +1,6 @@
1
- //#region ../../node_modules/date-fns/_lib/defaultOptions.js
1
+ // ../../node_modules/date-fns/_lib/defaultOptions.js
2
2
  var e = {};
3
3
  function t() {
4
4
  return e;
5
5
  }
6
- //#endregion
7
6
  export { t as getDefaultOptions };
@@ -1,11 +1,11 @@
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";
1
+ import e from "../../getDayOfYear.js";
2
+ import t from "../../getISOWeek.js";
3
+ import n from "../../getISOWeekYear.js";
4
+ import r from "../../getWeek.js";
5
+ import i from "../../getWeekYear.js";
6
6
  import { addLeadingZeros as a } from "../addLeadingZeros.js";
7
7
  import { lightFormatters as o } from "./lightFormatters.js";
8
- //#region ../../node_modules/date-fns/_lib/format/formatters.js
8
+ // ../../node_modules/date-fns/_lib/format/formatters.js
9
9
  var s = {
10
10
  am: "am",
11
11
  pm: "pm",
@@ -33,17 +33,17 @@ var s = {
33
33
  }
34
34
  return o.y(e, t);
35
35
  },
36
- Y: function(e, t, n, i) {
37
- let o = r(e, i), s = o > 0 ? o : 1 - o;
36
+ Y: function(e, t, n, r) {
37
+ let o = i(e, r), s = o > 0 ? o : 1 - o;
38
38
  if (t === "YY") {
39
39
  let e = s % 100;
40
40
  return a(e, 2);
41
41
  }
42
42
  return t === "Yo" ? n.ordinalNumber(s, { unit: "year" }) : a(s, t.length);
43
43
  },
44
- R: function(t, n) {
45
- let r = e(t);
46
- return a(r, n.length);
44
+ R: function(e, t) {
45
+ let r = n(e);
46
+ return a(r, t.length);
47
47
  },
48
48
  u: function(e, t) {
49
49
  let n = e.getFullYear();
@@ -129,19 +129,19 @@ var s = {
129
129
  });
130
130
  }
131
131
  },
132
- w: function(e, t, n, r) {
133
- let o = i(e, r);
132
+ w: function(e, t, n, i) {
133
+ let o = r(e, i);
134
134
  return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) : a(o, t.length);
135
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);
136
+ I: function(e, n, r) {
137
+ let i = t(e);
138
+ return n === "Io" ? r.ordinalNumber(i, { unit: "week" }) : a(i, n.length);
139
139
  },
140
140
  d: function(e, t, n) {
141
141
  return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : o.d(e, t);
142
142
  },
143
- D: function(e, n, r) {
144
- let i = t(e);
143
+ D: function(t, n, r) {
144
+ let i = e(t);
145
145
  return n === "Do" ? r.ordinalNumber(i, { unit: "dayOfYear" }) : a(i, n.length);
146
146
  },
147
147
  E: function(e, t, n) {
@@ -385,5 +385,4 @@ function d(e, t = "") {
385
385
  let n = e > 0 ? "-" : "+", r = Math.abs(e), i = a(Math.trunc(r / 60), 2), o = a(r % 60, 2);
386
386
  return n + i + t + o;
387
387
  }
388
- //#endregion
389
388
  export { c as formatters };
@@ -1,5 +1,5 @@
1
1
  import { addLeadingZeros as e } from "../addLeadingZeros.js";
2
- //#region ../../node_modules/date-fns/_lib/format/lightFormatters.js
2
+ // ../../node_modules/date-fns/_lib/format/lightFormatters.js
3
3
  var t = {
4
4
  y(t, n) {
5
5
  let r = t.getFullYear(), i = r > 0 ? r : 1 - r;
@@ -39,5 +39,4 @@ var t = {
39
39
  return e(a, n.length);
40
40
  }
41
41
  };
42
- //#endregion
43
42
  export { t as lightFormatters };
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/date-fns/_lib/format/longFormatters.js
1
+ // ../../node_modules/date-fns/_lib/format/longFormatters.js
2
2
  var e = (e, t) => {
3
3
  switch (e) {
4
4
  case "P": return t.date({ width: "short" });
@@ -34,5 +34,4 @@ var e = (e, t) => {
34
34
  return s.replace("{{date}}", e(a, r)).replace("{{time}}", t(o, r));
35
35
  }
36
36
  };
37
- //#endregion
38
37
  export { n as longFormatters };
@@ -1,8 +1,7 @@
1
1
  import e from "../toDate.js";
2
- //#region ../../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
2
+ // ../../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
3
3
  function t(t) {
4
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
5
  return r.setUTCFullYear(n.getFullYear()), +t - r;
6
6
  }
7
- //#endregion
8
7
  export { t as getTimezoneOffsetInMilliseconds };
@@ -1,8 +1,7 @@
1
1
  import { constructFrom as e } from "../constructFrom.js";
2
- //#region ../../node_modules/date-fns/_lib/normalizeDates.js
2
+ // ../../node_modules/date-fns/_lib/normalizeDates.js
3
3
  function t(t, ...n) {
4
4
  let r = e.bind(null, t || n.find((e) => typeof e == "object"));
5
5
  return n.map(r);
6
6
  }
7
- //#endregion
8
7
  export { t as normalizeDates };