@oslokommune/punkt-react 20.0.4 → 20.1.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 (211) hide show
  1. package/CHANGELOG.md +13 -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 +35 -35
  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/button.d.ts +13 -0
  152. package/dist/shared-types/button.js +14 -0
  153. package/dist/shared-types/calendar.js +1 -2
  154. package/dist/shared-types/card.js +1 -2
  155. package/dist/shared-types/checkbox.js +1 -2
  156. package/dist/shared-types/combobox.js +1 -2
  157. package/dist/shared-types/consent.js +1 -2
  158. package/dist/shared-types/footer.js +1 -2
  159. package/dist/shared-types/header-footer.js +1 -2
  160. package/dist/shared-types/icon.js +1 -2
  161. package/dist/shared-types/index.d.ts +1 -1
  162. package/dist/shared-types/index.js +11 -10
  163. package/dist/shared-types/input-wrapper.js +1 -2
  164. package/dist/shared-types/linkcard.js +1 -2
  165. package/dist/shared-types/loader.js +1 -2
  166. package/dist/shared-types/messagebox.js +1 -2
  167. package/dist/shared-types/option-group.js +1 -2
  168. package/dist/shared-types/progressbar.js +1 -2
  169. package/dist/shared-types/radiobutton.js +1 -2
  170. package/dist/shared-types/select.js +1 -2
  171. package/dist/shared-types/size.js +1 -2
  172. package/dist/shared-types/table.js +1 -2
  173. package/dist/shared-types/tag.js +1 -2
  174. package/dist/shared-types/textarea.js +1 -2
  175. package/dist/shared-types/textinput.js +1 -2
  176. package/dist/shared-utils/calendar/calendar-grid.js +4 -5
  177. package/dist/shared-utils/calendar/date-validation.js +1 -2
  178. package/dist/shared-utils/calendar/keyboard-navigation.js +1 -2
  179. package/dist/shared-utils/calendar/selection-manager.js +31 -32
  180. package/dist/shared-utils/combobox/input-utils.js +1 -2
  181. package/dist/shared-utils/combobox/keyboard-navigation.js +1 -2
  182. package/dist/shared-utils/combobox/option-utils.js +1 -2
  183. package/dist/shared-utils/date-utils.js +10 -11
  184. package/dist/shared-utils/datepicker-utils.js +4 -5
  185. package/dist/shared-utils/device-utils.js +1 -2
  186. package/dist/shared-utils/fileupload/announcements.js +1 -2
  187. package/dist/shared-utils/fileupload/filename.js +1 -2
  188. package/dist/shared-utils/fileupload/formats.js +1 -2
  189. package/dist/shared-utils/fileupload/navigation.js +1 -2
  190. package/dist/shared-utils/fileupload/size.js +1 -2
  191. package/dist/shared-utils/fileupload/transfers.js +1 -2
  192. package/dist/shared-utils/fileupload/truncate.js +1 -2
  193. package/dist/shared-utils/fileupload/validation.js +8 -9
  194. package/dist/shared-utils/focus-trap/index.js +13 -31
  195. package/dist/shared-utils/forms/described-by.js +1 -2
  196. package/dist/shared-utils/header-footer/external-domain.js +1 -2
  197. package/dist/shared-utils/header-footer/fetch-header-footer-data.js +1 -2
  198. package/dist/shared-utils/header-footer/icon-map.js +1 -2
  199. package/dist/shared-utils/header-footer/select-megamenu.js +1 -2
  200. package/dist/shared-utils/scroll-lock/index.js +1 -2
  201. package/dist/shared-utils/timepicker/options.js +1 -2
  202. package/dist/shared-utils/timepicker/stepper.js +1 -2
  203. package/dist/shared-utils/timepicker/time-utils.js +1 -2
  204. package/dist/shared-utils/value-utils.js +1 -2
  205. package/dist/utils/nativeInputValue.js +1 -2
  206. package/dist/utils/stableKeys.js +1 -2
  207. package/dist/utils/stringutils.js +1 -2
  208. package/package.json +20 -21
  209. package/src/components/accordion/Accordion.test.tsx +2 -4
  210. package/src/components/button/Button.tsx +11 -11
  211. package/src/components/tag/Tag.tsx +0 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,19 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
5
5
 
6
6
  ---
7
7
 
8
+ ## [20.1.0](https://github.com/oslokommune/punkt/compare/20.0.5...20.1.0) (2026-11-09)
9
+
10
+ ### Features
11
+ * Button - bruk felles standardverdier (#3820).
12
+
13
+ ---
14
+
15
+
16
+ ## [20.0.5](https://github.com/oslokommune/punkt/compare/20.0.4...20.0.5) (2026-11-09)
17
+
18
+ ---
19
+
20
+
8
21
  ## [20.1.0](https://github.com/oslokommune/punkt/compare/20.0.2...20.1.0) (2026-11-06)
9
22
 
10
23
  ### Bug Fixes
@@ -1,5 +1,5 @@
1
1
  import e from "./toPropertyKey.js";
2
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/defineProperty.js
2
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/defineProperty.js
3
3
  function t(t, n, r) {
4
4
  return (n = e(n)) in t ? Object.defineProperty(t, n, {
5
5
  value: r,
@@ -8,5 +8,4 @@ function t(t, n, r) {
8
8
  writable: !0
9
9
  }) : t[n] = r, t;
10
10
  }
11
- //#endregion
12
11
  export { t as default };
@@ -1,5 +1,5 @@
1
1
  import e from "./typeof.js";
2
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPrimitive.js
2
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/toPrimitive.js
3
3
  function t(t, n) {
4
4
  if (e(t) != "object" || !t) return t;
5
5
  var r = t[Symbol.toPrimitive];
@@ -10,5 +10,4 @@ function t(t, n) {
10
10
  }
11
11
  return (n === "string" ? String : Number)(t);
12
12
  }
13
- //#endregion
14
13
  export { t as default };
@@ -1,9 +1,8 @@
1
1
  import e from "./typeof.js";
2
2
  import t from "./toPrimitive.js";
3
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPropertyKey.js
3
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/toPropertyKey.js
4
4
  function n(n) {
5
5
  var r = t(n, "string");
6
6
  return e(r) == "symbol" ? r : r + "";
7
7
  }
8
- //#endregion
9
8
  export { n as default };
@@ -1,4 +1,4 @@
1
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/typeof.js
1
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/typeof.js
2
2
  function e(t) {
3
3
  "@babel/helpers - typeof";
4
4
  return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
@@ -7,5 +7,4 @@ function e(t) {
7
7
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
8
8
  }, e(t);
9
9
  }
10
- //#endregion
11
10
  export { e as default };
@@ -1,4 +1,4 @@
1
- //#region \0rolldown/runtime.js
1
+ // \0rolldown/runtime.js
2
2
  var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), s = (e, i, o, s) => {
3
3
  if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
4
4
  get: ((e) => i[e]).bind(null, d),
@@ -9,5 +9,4 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
9
9
  value: n,
10
10
  enumerable: !0
11
11
  }) : o, n));
12
- //#endregion
13
12
  export { o as __commonJSMin, c as __toESM };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { createContext as e, forwardRef as t, useContext as n } from "react";
3
3
  import { jsx as r } from "react/jsx-runtime";
4
- //#region src/components/accordion/Accordion.tsx
4
+ // src/components/accordion/Accordion.tsx
5
5
  var i = e({}), a = () => n(i), o = t(({ compact: e = !1, skin: t = "borderless", ariaLabelledBy: n, children: a, name: o, className: s }, c) => {
6
6
  let l = [
7
7
  "pkt-accordion",
@@ -24,5 +24,4 @@ var i = e({}), a = () => n(i), o = t(({ compact: e = !1, skin: t = "borderless",
24
24
  });
25
25
  });
26
26
  o.displayName = "PktAccordion";
27
- //#endregion
28
27
  export { o as PktAccordion, a as useAccordionContext };
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import { useAccordionContext as e } from "./Accordion.js";
3
- import { ACCORDION_LIGHT_ONLY_SKINS as t } from "../../shared-types/accordion.js";
4
2
  import "../../shared-types/index.js";
5
- import { PktIcon as n } from "../icon/Icon.js";
3
+ import { ACCORDION_LIGHT_ONLY_SKINS as e } from "../../shared-types/accordion.js";
4
+ import { PktIcon as t } from "../icon/Icon.js";
5
+ import { useAccordionContext as n } from "./Accordion.js";
6
6
  import { forwardRef as r, useState as i } from "react";
7
7
  import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
8
- //#region src/components/accordion/AccordionItem.tsx
8
+ // src/components/accordion/AccordionItem.tsx
9
9
  var c = r(({ defaultOpen: r = !1, id: c, title: l, skin: u, compact: d = !1, isOpen: f, children: p, name: m, className: h, onClick: g, onToggle: _ }, v) => {
10
- let [y, b] = i(r), { name: x, skin: S } = e(), C = m || x, w = u || S, T = f === void 0 ? y : f, E = (e) => {
10
+ let [y, b] = i(r), { name: x, skin: S } = n(), C = m || x, w = u || S, T = f === void 0 ? y : f, E = (e) => {
11
11
  let t = e.currentTarget.open;
12
12
  t !== T && (f === void 0 && b(t), _?.(e));
13
13
  }, D = (e) => {
@@ -28,19 +28,19 @@ var c = r(({ defaultOpen: r = !1, id: c, title: l, skin: u, compact: d = !1, isO
28
28
  onClick: D,
29
29
  name: C,
30
30
  onToggle: E,
31
- "data-mode": w && t.includes(w) ? "light" : void 0,
31
+ "data-mode": w && e.includes(w) ? "light" : void 0,
32
32
  children: [/* @__PURE__ */ s("summary", {
33
33
  className: "pkt-accordion-item__title",
34
34
  id: `pkt-accordion-item-summary-${c}`,
35
- children: [l, w === "plus-minus" ? /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(n, {
35
+ children: [l, w === "plus-minus" ? /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(t, {
36
36
  name: "plus-sign",
37
37
  className: "pkt-accordion-item__icon pkt-accordion-item__icon--plus",
38
38
  "aria-hidden": "true"
39
- }), /* @__PURE__ */ o(n, {
39
+ }), /* @__PURE__ */ o(t, {
40
40
  name: "minus-sign",
41
41
  className: "pkt-accordion-item__icon pkt-accordion-item__icon--minus",
42
42
  "aria-hidden": "true"
43
- })] }) : /* @__PURE__ */ o(n, {
43
+ })] }) : /* @__PURE__ */ o(t, {
44
44
  name: "chevron-thin-down",
45
45
  className: "pkt-accordion-item__icon",
46
46
  "aria-hidden": "true"
@@ -57,5 +57,4 @@ var c = r(({ defaultOpen: r = !1, id: c, title: l, skin: u, compact: d = !1, isO
57
57
  });
58
58
  });
59
59
  c.displayName = "PktAccordionItem";
60
- //#endregion
61
60
  export { c as PktAccordionItem };
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import { __toESM as e } from "../../_virtual/_rolldown/runtime.js";
3
3
  import { require_classnames as t } from "../../node_modules/classnames/index.js";
4
- import { PktIcon as n } from "../icon/Icon.js";
5
- import { formatString as r } from "../../shared-strings/format.js";
6
- import { PktButton as i } from "../button/Button.js";
4
+ import { formatString as n } from "../../shared-strings/format.js";
5
+ import { PktButton as r } from "../button/Button.js";
6
+ import { PktIcon as i } from "../icon/Icon.js";
7
7
  import { usePktStrings as a } from "../../hooks/usePktStrings.js";
8
8
  import { useCallback as o, useState as s } from "react";
9
9
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
10
- //#region src/components/alert/Alert.tsx
10
+ // src/components/alert/Alert.tsx
11
11
  var u = /* @__PURE__ */ e(t(), 1), d = ({ children: e, closeAlert: t, compact: d, size: f = d ? "small" : "medium", title: p, date: m, ariaLive: h, "aria-live": g = "polite", role: _ = "status", skin: v = "info", className: y, strings: b, ...x }) => {
12
12
  let [S, C] = s(!1), w = a(["generic", "alert"], b), T = {
13
13
  "pkt-alert": !0,
@@ -33,14 +33,14 @@ var u = /* @__PURE__ */ e(t(), 1), d = ({ children: e, closeAlert: t, compact: d
33
33
  children: /* @__PURE__ */ l("div", {
34
34
  className: (0, u.default)(E),
35
35
  children: [
36
- /* @__PURE__ */ c(n, {
36
+ /* @__PURE__ */ c(i, {
37
37
  className: "pkt-alert__icon",
38
38
  "aria-hidden": "true",
39
39
  name: v === "info" ? "alert-information" : `alert-${v}`
40
40
  }),
41
41
  t && /* @__PURE__ */ c("div", {
42
42
  className: "pkt-alert__close",
43
- children: /* @__PURE__ */ c(i, {
43
+ children: /* @__PURE__ */ c(r, {
44
44
  tabIndex: 0,
45
45
  "aria-label": w.generic.close,
46
46
  size: f,
@@ -65,12 +65,11 @@ var u = /* @__PURE__ */ e(t(), 1), d = ({ children: e, closeAlert: t, compact: d
65
65
  }),
66
66
  m && /* @__PURE__ */ c("div", {
67
67
  className: "pkt-alert__date",
68
- children: r(w.alert.lastUpdated, { date: m })
68
+ children: n(w.alert.lastUpdated, { date: m })
69
69
  })
70
70
  ]
71
71
  })
72
72
  });
73
73
  };
74
74
  d.displayName = "PktAlert";
75
- //#endregion
76
75
  export { d as PktAlert };
@@ -3,7 +3,7 @@ import { PktIcon as e } from "../icon/Icon.js";
3
3
  import { usePktStrings as t } from "../../hooks/usePktStrings.js";
4
4
  import { forwardRef as n } from "react";
5
5
  import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
6
- //#region src/components/backlink/BackLink.tsx
6
+ // src/components/backlink/BackLink.tsx
7
7
  var o = n(({ href: n = "/", text: o = "Forsiden", ariaLabel: s, renderLink: c, className: l, strings: u, ...d }, f) => {
8
8
  let p = /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(e, {
9
9
  className: "pkt-back-link__icon pkt-icon pkt-link__icon",
@@ -31,5 +31,4 @@ var o = n(({ href: n = "/", text: o = "Forsiden", ariaLabel: s, renderLink: c, c
31
31
  });
32
32
  });
33
33
  o.displayName = "PktBackLink";
34
- //#endregion
35
34
  export { o as PktBackLink };
@@ -5,7 +5,7 @@ import { withStableKeys as n } from "../../utils/stableKeys.js";
5
5
  import { forwardRef as r } from "react";
6
6
  import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
7
7
  import { Link as s } from "react-router-dom";
8
- //#region src/components/breadcrumbs/Breadcrumbs.tsx
8
+ // src/components/breadcrumbs/Breadcrumbs.tsx
9
9
  var c = r(({ breadcrumbs: r, navigationType: c, renderLink: l, className: u, strings: d, ...f }, p) => {
10
10
  let m = r, h = m[m.length - 2], g = t(["breadcrumbs"], d), _ = [u, "pkt-breadcrumbs"].filter(Boolean).join(" "), v = l || (c === "router" ? ({ href: e, className: t, children: n, props: r }) => /* @__PURE__ */ a(s, {
11
11
  to: e,
@@ -63,5 +63,4 @@ var c = r(({ breadcrumbs: r, navigationType: c, renderLink: l, className: u, str
63
63
  });
64
64
  });
65
65
  c.displayName = "PktBreadcrumbs";
66
- //#endregion
67
66
  export { c as PktBreadcrumbs };
@@ -1,55 +1,55 @@
1
1
  "use client";
2
2
  import { ANIMATION_DEFAULT_PATH as e } from "../../shared-types/icon.js";
3
+ import { BUTTON_DEFAULTS as t } from "../../shared-types/button.js";
3
4
  import "../../shared-types/index.js";
4
- import { PktIcon as t } from "../icon/Icon.js";
5
- import { forwardRef as n } from "react";
6
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
7
- //#region src/components/button/Button.tsx
5
+ import { PktIcon as n } from "../icon/Icon.js";
6
+ import { forwardRef as r } from "react";
7
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
8
+ // src/components/button/Button.tsx
8
9
  typeof window < "u" && (window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/latest/animations/");
9
- var a = n(({ children: n, className: a, iconName: o = "user", secondIconName: s = "user", iconPath: c, secondIconPath: l, size: u = "medium", fullWidth: d = !1, fullWidthOnMobile: f = !1, skin: p = "primary", type: m = "button", variant: h = "label-only", state: g, color: _, isLoading: v = void 0, disabled: y = void 0, loadingAnimationPath: b = typeof window < "u" ? window.pktAnimationPath : e, ...x }, S) => {
10
- let C = [
11
- a,
10
+ var o = r(({ children: r, className: o, iconName: s = t.iconName, secondIconName: c = t.secondIconName, iconPath: l, secondIconPath: u, size: d = t.size, fullWidth: f = t.fullWidth, fullWidthOnMobile: p = t.fullWidthOnMobile, skin: m = t.skin, type: h = t.type, variant: g = t.variant, state: _, color: v, isLoading: y = t.isLoading, disabled: b = t.disabled, loadingAnimationPath: x = typeof window < "u" ? window.pktAnimationPath : e, ...S }, C) => {
11
+ let w = [
12
+ o,
12
13
  "pkt-btn",
13
- u && `pkt-btn--${u}`,
14
- d && "pkt-btn--full",
15
- f && "pkt-btn--full-small",
16
- p && `pkt-btn--${p}`,
17
- h && `pkt-btn--${h}`,
18
- _ && `pkt-btn--${_}`,
14
+ d && `pkt-btn--${d}`,
15
+ f && "pkt-btn--full",
16
+ p && "pkt-btn--full-small",
17
+ m && `pkt-btn--${m}`,
19
18
  g && `pkt-btn--${g}`,
20
- v && "pkt-btn--isLoading"
19
+ v && `pkt-btn--${v}`,
20
+ _ && `pkt-btn--${_}`,
21
+ y && "pkt-btn--isLoading"
21
22
  ].filter(Boolean).join(" ");
22
- return /* @__PURE__ */ i("button", {
23
- ...x,
24
- "aria-busy": v || void 0,
25
- "aria-disabled": y || void 0,
26
- disabled: y,
27
- className: C,
28
- type: m,
29
- ref: S,
23
+ return /* @__PURE__ */ a("button", {
24
+ ...S,
25
+ "aria-busy": y || void 0,
26
+ "aria-disabled": b || void 0,
27
+ disabled: b,
28
+ className: w,
29
+ type: h,
30
+ ref: C,
30
31
  children: [
31
- v && /* @__PURE__ */ r(t, {
32
+ y && /* @__PURE__ */ i(n, {
32
33
  className: "pkt-btn__icon pkt-btn__spinner",
33
34
  name: "spinner-blue",
34
- path: b
35
+ path: x
35
36
  }),
36
- h !== "label-only" && /* @__PURE__ */ r(t, {
37
+ g !== "label-only" && /* @__PURE__ */ i(n, {
37
38
  className: "pkt-btn__icon",
38
- name: o,
39
- ...c && { path: c }
39
+ name: s,
40
+ ...l && { path: l }
40
41
  }),
41
- /* @__PURE__ */ r("span", {
42
+ /* @__PURE__ */ i("span", {
42
43
  className: "pkt-btn__text",
43
- children: n
44
+ children: r
44
45
  }),
45
- h === "icons-right-and-left" && /* @__PURE__ */ r(t, {
46
+ g === "icons-right-and-left" && /* @__PURE__ */ i(n, {
46
47
  className: "pkt-btn__icon",
47
- name: s,
48
- ...l && { path: l }
48
+ name: c,
49
+ ...u && { path: u }
49
50
  })
50
51
  ]
51
52
  });
52
53
  });
53
- a.displayName = "PktButton";
54
- //#endregion
55
- export { a as PktButton };
54
+ o.displayName = "PktButton";
55
+ export { o as PktButton };
@@ -4,7 +4,7 @@ import { CalendarNav as t } from "./CalendarNav.js";
4
4
  import { CalendarGrid as n } from "./CalendarGrid.js";
5
5
  import { forwardRef as r, useImperativeHandle as i } from "react";
6
6
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
- //#region src/components/calendar/Calendar.tsx
7
+ // src/components/calendar/Calendar.tsx
8
8
  var s = r((r, s) => {
9
9
  let c = e(r);
10
10
  return i(s, () => ({
@@ -45,5 +45,4 @@ var s = r((r, s) => {
45
45
  });
46
46
  });
47
47
  s.displayName = "PktCalendar";
48
- //#endregion
49
48
  export { s as PktCalendar };
@@ -1,7 +1,7 @@
1
1
  import { calculateCalendarDimensions as e, getCellType as t } from "../../shared-utils/calendar/calendar-grid.js";
2
2
  import { getDayButtonClasses as n, getDayCellClasses as r, getDayViewData as i } from "./calendar-utils.js";
3
3
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
4
- //#region src/components/calendar/CalendarGrid.tsx
4
+ // src/components/calendar/CalendarGrid.tsx
5
5
  var s = ({ state: s }) => {
6
6
  let { strings: c, year: l, month: u, activeSelected: d, focusedDate: f, inRange: p, rangeHovered: m, range: h, multiple: g, weeknumbers: _, selectableDatesRef: v, tabIndexSetRef: y, handleDateSelect: b, handleRangeHover: x, isExcluded: S, isDayDisabled: C, setFocusedDate: w, todayDate: T } = s, E = {
7
7
  year: l,
@@ -95,5 +95,4 @@ var s = ({ state: s }) => {
95
95
  })() })]
96
96
  });
97
97
  };
98
- //#endregion
99
98
  export { s as CalendarGrid };
@@ -1,10 +1,10 @@
1
- import { PktIcon as e } from "../icon/Icon.js";
2
- import { isNextMonthAllowed as t, isPrevMonthAllowed as n } from "../../shared-utils/calendar/date-validation.js";
1
+ import { isNextMonthAllowed as e, isPrevMonthAllowed as t } from "../../shared-utils/calendar/date-validation.js";
2
+ import { PktIcon as n } from "../icon/Icon.js";
3
3
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
- //#region src/components/calendar/CalendarNav.tsx
4
+ // src/components/calendar/CalendarNav.tsx
5
5
  var a = ({ componentId: a, strings: o, year: s, month: c, earliest: l, latest: u, withcontrols: d, prevMonth: f, nextMonth: p, changeMonth: m }) => {
6
6
  let h = (a) => {
7
- let d = a === "prev", m = d ? n(s, c, l) : t(s, c, u), h = d ? o.prevMonth : o.nextMonth, g = d ? "chevron-thin-left" : "chevron-thin-right", _ = d ? "pkt-calendar__prev-month" : "pkt-calendar__next-month", v = d ? f : p;
7
+ let d = a === "prev", m = d ? t(s, c, l) : e(s, c, u), h = d ? o.prevMonth : o.nextMonth, g = d ? "chevron-thin-left" : "chevron-thin-right", _ = d ? "pkt-calendar__prev-month" : "pkt-calendar__next-month", v = d ? f : p;
8
8
  return /* @__PURE__ */ r("div", { children: /* @__PURE__ */ i("button", {
9
9
  type: "button",
10
10
  "aria-label": h,
@@ -20,7 +20,7 @@ var a = ({ componentId: a, strings: o, year: s, month: c, earliest: l, latest: u
20
20
  "data-disabled": m ? void 0 : "disabled",
21
21
  "aria-disabled": !m || void 0,
22
22
  tabIndex: m ? 0 : -1,
23
- children: [/* @__PURE__ */ r(e, {
23
+ children: [/* @__PURE__ */ r(n, {
24
24
  className: "pkt-btn__icon",
25
25
  name: g
26
26
  }), /* @__PURE__ */ r("span", {
@@ -85,5 +85,4 @@ var a = ({ componentId: a, strings: o, year: s, month: c, earliest: l, latest: u
85
85
  ]
86
86
  });
87
87
  };
88
- //#endregion
89
88
  export { a as CalendarNav };
@@ -1,7 +1,7 @@
1
1
  import { __toESM as e } from "../../_virtual/_rolldown/runtime.js";
2
2
  import { require_classnames as t } from "../../node_modules/classnames/index.js";
3
3
  import { formatISODate as n, formatReadableDate as r, newDateYMD as i } from "../../shared-utils/date-utils.js";
4
- //#region src/components/calendar/calendar-utils.ts
4
+ // src/components/calendar/calendar-utils.ts
5
5
  var a = /* @__PURE__ */ e(t(), 1);
6
6
  function o(e, t, a) {
7
7
  let o = i(a.year, a.month, e), s = n(o), c = s === n(t), l = a.activeSelected.includes(s), u = a.isDayDisabled(o, l), d;
@@ -40,5 +40,4 @@ function c(e, t) {
40
40
  "pkt-calendar__date--range-end": l
41
41
  });
42
42
  }
43
- //#endregion
44
43
  export { c as getDayButtonClasses, s as getDayCellClasses, o as getDayViewData };