@oslokommune/punkt-react 14.2.0 → 14.3.1
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 +36 -0
- package/dist/index.d.ts +15 -6
- package/dist/punkt-react.es.js +2563 -2545
- package/dist/punkt-react.umd.js +275 -273
- package/package.json +3 -3
- package/src/components/header/HeaderService.tsx +10 -6
- package/src/components/header/types.ts +25 -6
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.1](https://github.com/oslokommune/punkt/compare/14.3.0...14.3.1) (2026-02-05)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
* Støtte for className i PktHeader (#3228).
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [14.3.0](https://github.com/oslokommune/punkt/compare/14.2.0...14.3.0) (2026-02-04)
|
|
27
|
+
|
|
28
|
+
### ⚠ BREAKING CHANGES
|
|
29
|
+
Ingen
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
* Header nye props slotMenuVariant og slotMenuText (#3226). Pluss flyttet en del typer til shared-types
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
Ingen
|
|
37
|
+
|
|
38
|
+
### Chores
|
|
39
|
+
Ingen
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
|
|
8
44
|
## [14.2.0](https://github.com/oslokommune/punkt/compare/14.1.1...14.2.0) (2026-02-04)
|
|
9
45
|
|
|
10
46
|
### ⚠ BREAKING CHANGES
|
package/dist/index.d.ts
CHANGED
|
@@ -37,8 +37,13 @@ import { TAlertSkin } from '../../../../../shared-types';
|
|
|
37
37
|
import { TAriaLive } from '../../../../../shared-types';
|
|
38
38
|
import { TCardSkin } from '../../../../../shared-types';
|
|
39
39
|
import { TextareaHTMLAttributes } from 'react';
|
|
40
|
+
import { THeaderMenu } from '../../../../../shared-types';
|
|
41
|
+
import { THeaderPosition } from '../../../../../shared-types';
|
|
42
|
+
import { THeaderScrollBehavior } from '../../../../../shared-types';
|
|
40
43
|
import { TLayout } from '../../../../../shared-types';
|
|
44
|
+
import { TLogOutButtonPlacement } from '../../../../../shared-types';
|
|
41
45
|
import { TMessageboxSkin } from '../../../../../shared-types';
|
|
46
|
+
import { TSlotMenuVariant } from '../../../../../shared-types';
|
|
42
47
|
|
|
43
48
|
declare interface BasePktTagProps {
|
|
44
49
|
skin?: 'blue' | 'blue-light' | 'blue-dark' | 'green' | 'red' | 'beige' | 'yellow' | 'grey' | 'gray';
|
|
@@ -292,6 +297,8 @@ export declare interface IPktFooterSimple extends HTMLAttributes<HTMLDivElement>
|
|
|
292
297
|
|
|
293
298
|
export declare interface IPktHeader {
|
|
294
299
|
children?: React.ReactNode;
|
|
300
|
+
/** Additional CSS class name(s) to apply to the header */
|
|
301
|
+
className?: string;
|
|
295
302
|
/** Set dark mode on the header */
|
|
296
303
|
'data-mode'?: 'dark';
|
|
297
304
|
/** Hide the Oslo logo. Default: false (logo is shown) */
|
|
@@ -323,7 +330,7 @@ export declare interface IPktHeader {
|
|
|
323
330
|
/** @deprecated userOptions is no longer available. Use userMenu instead. */
|
|
324
331
|
userOptions?: UserMenuItem[];
|
|
325
332
|
/** Where to show the logout button: 'userMenu', 'header', 'both', or 'none' */
|
|
326
|
-
logOutButtonPlacement?:
|
|
333
|
+
logOutButtonPlacement?: TLogOutButtonPlacement;
|
|
327
334
|
/** Callback when user clicks logout */
|
|
328
335
|
logOut?: () => void;
|
|
329
336
|
/** Show search input in the header */
|
|
@@ -341,11 +348,15 @@ export declare interface IPktHeader {
|
|
|
341
348
|
/** Custom breakpoint for tablet responsive behavior (interaction pattern) in pixels. Default: 1280 */
|
|
342
349
|
tabletBreakpoint?: number;
|
|
343
350
|
/** Which menu is initially open */
|
|
344
|
-
openedMenu?:
|
|
351
|
+
openedMenu?: THeaderMenu;
|
|
345
352
|
/** Header position. 'fixed' fixes to top of viewport, 'relative' follows document flow. Default: 'fixed' */
|
|
346
|
-
position?:
|
|
353
|
+
position?: THeaderPosition;
|
|
347
354
|
/** Scroll behavior. 'hide' hides header on scroll down, 'none' keeps it visible. Default: 'hide' */
|
|
348
|
-
scrollBehavior?:
|
|
355
|
+
scrollBehavior?: THeaderScrollBehavior;
|
|
356
|
+
/** Variant for the slot menu button in tablet/mobile mode. Default: 'icon-only' */
|
|
357
|
+
slotMenuVariant?: TSlotMenuVariant;
|
|
358
|
+
/** Text for the slot menu button in tablet/mobile mode. Default: 'Meny' */
|
|
359
|
+
slotMenuText?: string;
|
|
349
360
|
}
|
|
350
361
|
|
|
351
362
|
export declare type IPktHeaderService = IPktHeader;
|
|
@@ -873,8 +884,6 @@ declare type TPktAccordionSkin = TAccordionSkin;
|
|
|
873
884
|
|
|
874
885
|
declare type TPktAccordionSkin_2 = TAccordionSkin;
|
|
875
886
|
|
|
876
|
-
declare type TPktHeaderServiceMenu = 'none' | 'slot' | 'search' | 'user';
|
|
877
|
-
|
|
878
887
|
declare type TSkin = 'blue' | 'green' | 'red' | 'beige' | 'yellow' | 'grey' | 'gray' | 'blue-light';
|
|
879
888
|
|
|
880
889
|
declare type TSkin_2 = IPktTag['skin'];
|