@oslokommune/punkt-react 16.9.0 → 16.10.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 (40) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/index.d.ts +24 -24
  3. package/dist/punkt-react.es.js +14 -14
  4. package/dist/punkt-react.umd.js +8 -9
  5. package/dist/shared-types/aria.d.ts +65 -0
  6. package/dist/shared-types/booleanish.d.ts +13 -0
  7. package/dist/shared-types/calendar.d.ts +41 -0
  8. package/dist/shared-types/combobox.d.ts +34 -0
  9. package/dist/shared-types/datepicker.d.ts +46 -0
  10. package/dist/shared-types/form.d.ts +16 -0
  11. package/dist/shared-types/header.d.ts +88 -0
  12. package/dist/shared-types/heading.d.ts +9 -0
  13. package/dist/shared-types/index.d.ts +17 -0
  14. package/dist/shared-types/layout.d.ts +26 -0
  15. package/dist/shared-types/progressbar.d.ts +5 -0
  16. package/dist/shared-types/size.d.ts +18 -0
  17. package/dist/shared-types/skin.d.ts +24 -0
  18. package/dist/shared-types/timepicker.d.ts +20 -0
  19. package/dist/shared-utils/calendar/calendar-grid.d.ts +16 -0
  20. package/dist/shared-utils/calendar/date-validation.d.ts +22 -0
  21. package/dist/shared-utils/calendar/index.d.ts +10 -0
  22. package/dist/shared-utils/calendar/keyboard-navigation.d.ts +16 -0
  23. package/dist/shared-utils/calendar/selection-manager.d.ts +30 -0
  24. package/dist/shared-utils/combobox/index.d.ts +10 -0
  25. package/dist/shared-utils/combobox/input-utils.d.ts +38 -0
  26. package/dist/shared-utils/combobox/keyboard-navigation.d.ts +39 -0
  27. package/dist/shared-utils/combobox/option-utils.d.ts +50 -0
  28. package/dist/shared-utils/combobox/selection-manager.d.ts +71 -0
  29. package/dist/shared-utils/combobox/typeahead.d.ts +24 -0
  30. package/dist/shared-utils/date-utils.d.ts +138 -0
  31. package/dist/shared-utils/datepicker-utils.d.ts +73 -0
  32. package/dist/shared-utils/device-utils.d.ts +10 -0
  33. package/dist/shared-utils/timepicker/index.d.ts +6 -0
  34. package/dist/shared-utils/timepicker/options.d.ts +19 -0
  35. package/dist/shared-utils/timepicker/stepper.d.ts +20 -0
  36. package/dist/shared-utils/timepicker/time-utils.d.ts +19 -0
  37. package/dist/shared-utils/utils.d.ts +16 -0
  38. package/dist/shared-utils/value-utils.d.ts +17 -0
  39. package/package.json +5 -5
  40. package/src/components/modal/Modal.tsx +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,42 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
5
5
 
6
6
  ---
7
7
 
8
+ ## [16.10.0](https://github.com/oslokommune/punkt/compare/16.9.1...16.10.0) (2026-04-22)
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+ Ingen
12
+
13
+ ### Features
14
+ * Legger til støtte for "fit-content" som størrelse på modal (#3433).
15
+
16
+
17
+ ### Bug Fixes
18
+ Ingen
19
+
20
+ ### Chores
21
+ Ingen
22
+
23
+ ---
24
+
25
+
26
+ ## [16.9.1](https://github.com/oslokommune/punkt/compare/16.9.0...16.9.1) (2026-04-22)
27
+
28
+ ### ⚠ BREAKING CHANGES
29
+ Ingen
30
+
31
+ ### Features
32
+ Ingen
33
+
34
+ ### Bug Fixes
35
+ * Fikser opp i bygging og DTS-generering (#3434).
36
+
37
+
38
+ ### Chores
39
+ Ingen
40
+
41
+ ---
42
+
43
+
8
44
  ## [16.9.0](https://github.com/oslokommune/punkt/compare/16.8.3...16.9.0) (2026-04-21)
9
45
 
10
46
  ### ⚠ BREAKING CHANGES
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AnchorHTMLAttributes } from 'react';
2
- import { Booleanish } from '../../../../../shared-types';
2
+ import { Booleanish } from './shared-types';
3
3
  import { ButtonHTMLAttributes } from 'react';
4
4
  import { ChangeEvent } from 'react';
5
5
  import { ChangeEventHandler } from 'react';
@@ -9,13 +9,13 @@ import { FocusEvent as FocusEvent_2 } from 'react';
9
9
  import { ForwardRefExoticComponent } from 'react';
10
10
  import { HTMLAttributes } from 'react';
11
11
  import { HTMLProps } from 'react';
12
- import { IDatepickerStrings } from '../../../../../shared-types/datepicker';
12
+ import { IDatepickerStrings } from './shared-types/datepicker';
13
13
  import { InputHTMLAttributes } from 'react';
14
- import { IPktComboboxOption } from '../../../../../shared-types/combobox';
14
+ import { IPktComboboxOption } from './shared-types/combobox';
15
15
  import { IPktConsent as IPktConsent_2 } from '@oslokommune/punkt-elements';
16
16
  import { IPktHeading as IPktHeading_2 } from '@oslokommune/punkt-elements';
17
17
  import { IPktLoader as IPktLoader_2 } from '@oslokommune/punkt-elements';
18
- import { ITimepickerStrings } from '../../../../../shared-types/timepicker';
18
+ import { ITimepickerStrings } from './shared-types/timepicker';
19
19
  import { JSX as JSX_2 } from 'react/jsx-runtime';
20
20
  import { LegacyRef } from 'react';
21
21
  import { LinkHTMLAttributes } from 'react';
@@ -27,26 +27,26 @@ import { RefAttributes } from 'react';
27
27
  import { RefObject } from 'react';
28
28
  import { SelectHTMLAttributes } from 'react';
29
29
  import { SyntheticEvent } from 'react';
30
- import { TAccordionSkin } from '../../../../../shared-types';
31
- import { TAlertRole } from '../../../../../shared-types';
32
- import { TAlertSkin } from '../../../../../shared-types';
33
- import { TAriaLive } from '../../../../../shared-types';
34
- import { TCardSkin } from '../../../../../shared-types';
30
+ import { TAccordionSkin } from './shared-types';
31
+ import { TAlertRole } from './shared-types';
32
+ import { TAlertSkin } from './shared-types';
33
+ import { TAriaLive } from './shared-types';
34
+ import { TCardSkin } from './shared-types';
35
35
  import { TextareaHTMLAttributes } from 'react';
36
- import { THeaderMenu } from '../../../../../shared-types';
37
- import { THeaderPosition } from '../../../../../shared-types';
38
- import { THeaderScrollBehavior } from '../../../../../shared-types';
39
- import { TLayout } from '../../../../../shared-types';
40
- import { TLogOutButtonPlacement } from '../../../../../shared-types';
41
- import { TMessageboxSkin } from '../../../../../shared-types';
42
- import { TPktComboboxDisplayValue } from '../../../../../shared-types/combobox';
43
- import { TPktComboboxTagPlacement } from '../../../../../shared-types/combobox';
44
- import { TProgressbarRole } from '../../../../../shared-types';
45
- import { TProgressbarSkin } from '../../../../../shared-types';
46
- import { TProgressbarStatusPlacement } from '../../../../../shared-types';
47
- import { TProgressbarStatusType } from '../../../../../shared-types';
48
- import { TProgressbarTitlePosition } from '../../../../../shared-types';
49
- import { TSlotMenuVariant } from '../../../../../shared-types';
36
+ import { THeaderMenu } from './shared-types';
37
+ import { THeaderPosition } from './shared-types';
38
+ import { THeaderScrollBehavior } from './shared-types';
39
+ import { TLayout } from './shared-types';
40
+ import { TLogOutButtonPlacement } from './shared-types';
41
+ import { TMessageboxSkin } from './shared-types';
42
+ import { TPktComboboxDisplayValue } from './shared-types/combobox';
43
+ import { TPktComboboxTagPlacement } from './shared-types/combobox';
44
+ import { TProgressbarRole } from './shared-types';
45
+ import { TProgressbarSkin } from './shared-types';
46
+ import { TProgressbarStatusPlacement } from './shared-types';
47
+ import { TProgressbarStatusType } from './shared-types';
48
+ import { TProgressbarTitlePosition } from './shared-types';
49
+ import { TSlotMenuVariant } from './shared-types';
50
50
 
51
51
  declare interface BasePktTagProps {
52
52
  skin?: 'blue' | 'blue-light' | 'blue-dark' | 'green' | 'red' | 'beige' | 'yellow' | 'grey' | 'gray';
@@ -618,7 +618,7 @@ export declare interface IPktModal extends Omit<HTMLAttributes<HTMLDialogElement
618
618
  headingText?: string;
619
619
  hideCloseButton?: boolean;
620
620
  closeOnBackdropClick?: boolean;
621
- size?: 'small' | 'medium' | 'large';
621
+ size?: 'small' | 'medium' | 'large' | 'fit-content';
622
622
  removePadding?: boolean;
623
623
  closeButtonSkin?: 'blue' | 'yellow-filled';
624
624
  variant?: 'dialog' | 'drawer';
@@ -1084,7 +1084,7 @@ var Ut = class extends ft {
1084
1084
  Ut.directiveName = "unsafeHTML", Ut.resultType = 1;
1085
1085
  var Wt = dt(Ut), Gt = class extends Ut {};
1086
1086
  Gt.directiveName = "unsafeSVG", Gt.resultType = 2;
1087
- var Kt = dt(Gt), qt = "https://punkt-cdn.oslo.kommune.no/16.9/icons/";
1087
+ var Kt = dt(Gt), qt = "https://punkt-cdn.oslo.kommune.no/16.10/icons/";
1088
1088
  typeof window < "u" && (window.pktFetch = window.pktFetch === void 0 ? fetch : window.pktFetch, window.pktIconPath = window.pktIconPath || qt);
1089
1089
  var Jt = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\"></svg>", Yt = {}, Xt = 2, Zt = 1500, Qt = typeof Storage < "u" && typeof sessionStorage < "u", $t = (e) => window.pktFetch(e).then((t) => {
1090
1090
  if (!t.ok) throw Error("Missing icon: " + e);
@@ -1146,7 +1146,7 @@ try {
1146
1146
  var X = (e) => e ?? V;
1147
1147
  //#endregion
1148
1148
  //#region ../elements/dist/button-BIpd1xJh.js
1149
- window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/16.9/animations/";
1149
+ window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/16.10/animations/";
1150
1150
  var rn = class extends Vt {
1151
1151
  constructor(...e) {
1152
1152
  super(...e), this.iconName = "user", this.secondIconName = "user", this.mode = "light", this.size = "medium", this.fullWidth = !1, this.fullWidthOnMobile = !1, this.skin = "primary", this.variant = "label-only", this.state = "normal", this.type = "button", this.form = void 0, this.isLoading = !1, this.disabled = !1, this.loadingAnimationPath = window.pktAnimationPath;
@@ -6918,7 +6918,7 @@ try {
6918
6918
  } catch {
6919
6919
  console.warn("Forsøker å definere <pkt-header-user-menu>, men den er allerede definert");
6920
6920
  }
6921
- var Oa = "https://punkt-cdn.oslo.kommune.no/16.9/logos/", ka = class extends Vt {
6921
+ var Oa = "https://punkt-cdn.oslo.kommune.no/16.10/logos/", ka = class extends Vt {
6922
6922
  constructor(...e) {
6923
6923
  super(...e), this.searchPlaceholder = "Søk", this.searchValue = "", this.mobileBreakpoint = 768, this.tabletBreakpoint = 1280, this.openedMenu = "none", this.logOutButtonPlacement = "none", this.position = "fixed", this.scrollBehavior = "hide", this.slotMenuVariant = "icon-only", this.slotMenuText = "Meny", this.hideLogo = !1, this.compact = !1, this.showSearch = !1, this.canChangeRepresentation = !1, this.hasLogOut = !1, this.isMobile = !1, this.isTablet = !1, this.openMenu = "none", this.isHidden = !1, this.componentWidth = typeof window < "u" ? window.innerWidth : 0, this.alignSlotRight = !1, this.alignSearchRight = !1, this.headerRef = sn(), this.userContainerRef = sn(), this.slotContainerRef = sn(), this.searchContainerRef = sn(), this.slotContentRef = sn(), this.searchMenuRef = sn(), this.lastScrollPosition = 0, this.savedScrollY = 0, this.lastFocusedElement = null, this.shouldRestoreFocus = !1, this.handleScroll = () => {
6924
6924
  if (!this.shouldHideOnScroll) return;
@@ -8958,7 +8958,7 @@ try {
8958
8958
  }
8959
8959
  //#endregion
8960
8960
  //#region ../elements/dist/loader-6kFZUErT.js
8961
- window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/16.9/animations/";
8961
+ window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/16.10/animations/";
8962
8962
  var po = class extends Vt {
8963
8963
  constructor(...e) {
8964
8964
  super(...e), this.delay = 0, this.inline = !1, this.isLoading = !0, this.message = null, this.size = "medium", this.variant = "shapes", this.loadingAnimationPath = window.pktAnimationPath, this._shouldDisplayLoader = !1;
@@ -9117,7 +9117,7 @@ try {
9117
9117
  console.warn("Forsøker å definere <pkt-messagebox>, men den er allerede definert");
9118
9118
  }
9119
9119
  //#endregion
9120
- //#region ../elements/dist/modal-C_wtsh9m.js
9120
+ //#region ../elements/dist/modal-pPp8nia6.js
9121
9121
  var go = {
9122
9122
  name: "pkt-modal",
9123
9123
  react: "PktModal",
@@ -9169,7 +9169,8 @@ var go = {
9169
9169
  type: [
9170
9170
  "small",
9171
9171
  "medium",
9172
- "large"
9172
+ "large",
9173
+ "fit-content"
9173
9174
  ],
9174
9175
  category: "ui",
9175
9176
  default: "medium"
@@ -9298,10 +9299,9 @@ var go = {
9298
9299
  </div>`}
9299
9300
  </div>` : V}
9300
9301
  <div class="pkt-modal__container">
9301
- <div
9302
- id="pkt-modal__content"
9303
- class=${Y(n)}
9304
- >${Bt(this)}</div>
9302
+ <div id="pkt-modal__content" class=${Y(n)}>
9303
+ ${Bt(this)}
9304
+ </div>
9305
9305
  </div>
9306
9306
  </div>
9307
9307
  </dialog>
@@ -10807,7 +10807,7 @@ var Jo = s(({ breadcrumbs: e, navigationType: t, renderLink: n, className: r, ..
10807
10807
  });
10808
10808
  //#endregion
10809
10809
  //#region src/components/button/Button.tsx
10810
- Jo.displayName = "PktBreadcrumbs", window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/16.9/animations/";
10810
+ Jo.displayName = "PktBreadcrumbs", window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/16.10/animations/";
10811
10811
  var Yo = s(({ children: e, className: t, iconName: n = "user", secondIconName: r = "user", iconPath: i, secondIconPath: a, size: o = "medium", fullWidth: s = !1, fullWidthOnMobile: c = !1, skin: l = "primary", type: u = "button", variant: d = "label-only", state: f, color: p, isLoading: m = void 0, disabled: h = void 0, loadingAnimationPath: g = window.pktAnimationPath, ..._ }, v) => {
10812
10812
  let x = [
10813
10813
  t,
@@ -16450,7 +16450,7 @@ var _d = s(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
16450
16450
  children: /* @__PURE__ */ y(Q, {
16451
16451
  name: "oslologo",
16452
16452
  "aria-hidden": "true",
16453
- path: "https://punkt-cdn.oslo.kommune.no/16.9/logos/"
16453
+ path: "https://punkt-cdn.oslo.kommune.no/16.10/logos/"
16454
16454
  })
16455
16455
  }) : re ? /* @__PURE__ */ y("button", {
16456
16456
  "aria-label": "Tilbake til forside",
@@ -16459,12 +16459,12 @@ var _d = s(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
16459
16459
  children: /* @__PURE__ */ y(Q, {
16460
16460
  name: "oslologo",
16461
16461
  "aria-hidden": "true",
16462
- path: "https://punkt-cdn.oslo.kommune.no/16.9/logos/"
16462
+ path: "https://punkt-cdn.oslo.kommune.no/16.10/logos/"
16463
16463
  })
16464
16464
  }) : /* @__PURE__ */ y(Q, {
16465
16465
  name: "oslologo",
16466
16466
  "aria-hidden": "true",
16467
- path: "https://punkt-cdn.oslo.kommune.no/16.9/logos/"
16467
+ path: "https://punkt-cdn.oslo.kommune.no/16.10/logos/"
16468
16468
  })
16469
16469
  }), T && /* @__PURE__ */ y("span", {
16470
16470
  className: "pkt-header-service__service-name",