@oslokommune/punkt-react 14.1.1 → 14.3.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.
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
+ ## [14.3.0](https://github.com/oslokommune/punkt/compare/14.2.0...14.3.0) (2026-02-04)
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+ Ingen
12
+
13
+ ### Features
14
+ * Header nye props slotMenuVariant og slotMenuText (#3226). Pluss flyttet en del typer til shared-types
15
+
16
+
17
+ ### Bug Fixes
18
+ Ingen
19
+
20
+ ### Chores
21
+ Ingen
22
+
23
+ ---
24
+
25
+
26
+ ## [14.2.0](https://github.com/oslokommune/punkt/compare/14.1.1...14.2.0) (2026-02-04)
27
+
28
+ ### ⚠ BREAKING CHANGES
29
+ Ingen
30
+
31
+ ### Features
32
+ * Ny mappe `shared-types` for å samle alle TS-definisjoner som deles mellom komponenter (#3225).
33
+
34
+
35
+ ### Bug Fixes
36
+ Ingen
37
+
38
+ ### Chores
39
+ Ingen
40
+
41
+ ---
42
+
43
+
8
44
  ## [14.0.0](https://github.com/oslokommune/punkt/compare/13.22.0...14.0.0) (2026-02-02)
9
45
 
10
46
  ### ⚠ BREAKING CHANGES
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
 
3
3
  import { AnchorHTMLAttributes } from 'react';
4
+ import { Booleanish } from '../../../../../shared-types';
4
5
  import { ButtonHTMLAttributes } from 'react';
5
6
  import { ChangeEvent } from 'react';
6
7
  import { ChangeEventHandler } from 'react';
@@ -30,9 +31,19 @@ import { RefAttributes } from 'react';
30
31
  import { RefObject } from 'react';
31
32
  import { SelectHTMLAttributes } from 'react';
32
33
  import { SyntheticEvent } from 'react';
33
- import { TAlertRole } from '../../types/aria';
34
- import { TAriaLive } from '../../types/aria';
34
+ import { TAccordionSkin } from '../../../../../shared-types';
35
+ import { TAlertRole } from '../../../../../shared-types';
36
+ import { TAlertSkin } from '../../../../../shared-types';
37
+ import { TAriaLive } from '../../../../../shared-types';
38
+ import { TCardSkin } from '../../../../../shared-types';
35
39
  import { TextareaHTMLAttributes } from 'react';
40
+ import { THeaderMenu } from '../../../../../shared-types';
41
+ import { THeaderPosition } from '../../../../../shared-types';
42
+ import { THeaderScrollBehavior } from '../../../../../shared-types';
43
+ import { TLayout } from '../../../../../shared-types';
44
+ import { TLogOutButtonPlacement } from '../../../../../shared-types';
45
+ import { TMessageboxSkin } from '../../../../../shared-types';
46
+ import { TSlotMenuVariant } from '../../../../../shared-types';
36
47
 
37
48
  declare interface BasePktTagProps {
38
49
  skin?: 'blue' | 'blue-light' | 'blue-dark' | 'green' | 'red' | 'beige' | 'yellow' | 'grey' | 'gray';
@@ -45,8 +56,6 @@ declare interface BasePktTagProps {
45
56
  children?: ReactNode;
46
57
  }
47
58
 
48
- declare type Booleanish = boolean | 'true' | 'false';
49
-
50
59
  declare interface ButtonPktTagProps extends BasePktTagProps, HTMLAttributes<HTMLButtonElement> {
51
60
  closeTag: true;
52
61
  type?: 'button' | 'submit' | 'reset';
@@ -108,7 +117,7 @@ export declare interface IPktAccordionItem {
108
117
  }
109
118
 
110
119
  export declare interface IPktAlert extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
111
- skin?: 'error' | 'success' | 'warning' | 'info';
120
+ skin?: TAlertSkin;
112
121
  closeAlert?: boolean;
113
122
  title?: ReactNode;
114
123
  date?: string;
@@ -319,7 +328,7 @@ export declare interface IPktHeader {
319
328
  /** @deprecated userOptions is no longer available. Use userMenu instead. */
320
329
  userOptions?: UserMenuItem[];
321
330
  /** Where to show the logout button: 'userMenu', 'header', 'both', or 'none' */
322
- logOutButtonPlacement?: 'userMenu' | 'header' | 'both' | 'none';
331
+ logOutButtonPlacement?: TLogOutButtonPlacement;
323
332
  /** Callback when user clicks logout */
324
333
  logOut?: () => void;
325
334
  /** Show search input in the header */
@@ -337,11 +346,15 @@ export declare interface IPktHeader {
337
346
  /** Custom breakpoint for tablet responsive behavior (interaction pattern) in pixels. Default: 1280 */
338
347
  tabletBreakpoint?: number;
339
348
  /** Which menu is initially open */
340
- openedMenu?: TPktHeaderServiceMenu;
349
+ openedMenu?: THeaderMenu;
341
350
  /** Header position. 'fixed' fixes to top of viewport, 'relative' follows document flow. Default: 'fixed' */
342
- position?: 'fixed' | 'relative';
351
+ position?: THeaderPosition;
343
352
  /** Scroll behavior. 'hide' hides header on scroll down, 'none' keeps it visible. Default: 'hide' */
344
- scrollBehavior?: 'hide' | 'none';
353
+ scrollBehavior?: THeaderScrollBehavior;
354
+ /** Variant for the slot menu button in tablet/mobile mode. Default: 'icon-only' */
355
+ slotMenuVariant?: TSlotMenuVariant;
356
+ /** Text for the slot menu button in tablet/mobile mode. Default: 'Meny' */
357
+ slotMenuText?: string;
345
358
  }
346
359
 
347
360
  export declare type IPktHeaderService = IPktHeader;
@@ -863,19 +876,11 @@ declare type TCardImageShape = 'square' | 'round';
863
876
 
864
877
  declare type TCardPadding = 'none' | 'default';
865
878
 
866
- declare type TCardSkin = 'outlined' | 'outlined-beige' | 'gray' | 'beige' | 'green' | 'blue';
867
-
868
879
  declare type TCardTagPosition = 'top' | 'bottom';
869
880
 
870
- declare type TLayout = 'vertical' | 'horizontal';
871
-
872
- declare type TMessageboxSkin = 'beige' | 'blue' | 'red' | 'green';
873
-
874
- declare type TPktAccordionSkin = 'borderless' | 'outlined' | 'beige' | 'blue';
875
-
876
- declare type TPktAccordionSkin_2 = 'borderless' | 'outlined' | 'beige' | 'blue';
881
+ declare type TPktAccordionSkin = TAccordionSkin;
877
882
 
878
- declare type TPktHeaderServiceMenu = 'none' | 'slot' | 'search' | 'user';
883
+ declare type TPktAccordionSkin_2 = TAccordionSkin;
879
884
 
880
885
  declare type TSkin = 'blue' | 'green' | 'red' | 'beige' | 'yellow' | 'grey' | 'gray' | 'blue-light';
881
886