@oslokommune/punkt-react 16.16.2 → 16.17.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 +35 -0
- package/dist/{dialog-polyfill.esm-BmVHGRTX-CuhXqEqJ.js → dialog-polyfill.esm-DrODM08x-C8rdFsL8.js} +1 -1
- package/dist/index.d.ts +27 -0
- package/dist/punkt-react.es.js +1742 -1160
- package/dist/punkt-react.umd.js +226 -88
- package/dist/shared-types/header-menu.d.ts +108 -0
- package/dist/shared-types/index.d.ts +2 -0
- package/dist/shared-types/skin.d.ts +1 -1
- package/dist/shared-utils/header-menu/example-data.d.ts +11 -0
- package/dist/shared-utils/header-menu/fetch-header-footer-data.d.ts +12 -0
- package/dist/shared-utils/header-menu/icon-map.d.ts +34 -0
- package/dist/shared-utils/header-menu/index.d.ts +11 -0
- package/dist/shared-utils/header-menu/select-megamenu.d.ts +16 -0
- package/package.json +4 -4
- package/src/components/accordion/AccordionItem.tsx +20 -1
- package/src/components/header-menu/HeaderMenu.test.tsx +199 -0
- package/src/components/header-menu/HeaderMenu.tsx +305 -0
- package/src/components/index.ts +1 -0
- package/src/components/interfaces.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,41 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [16.17.1](https://github.com/oslokommune/punkt/compare/16.17.0...16.17.1) (2026-05-19)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
Ingen
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
Ingen
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [16.17.0](https://github.com/oslokommune/punkt/compare/16.16.2...16.17.0) (2026-05-15)
|
|
26
|
+
|
|
27
|
+
### ⚠ BREAKING CHANGES
|
|
28
|
+
Ingen
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
* Global headermeny (#3446).
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
Ingen
|
|
36
|
+
|
|
37
|
+
### Chores
|
|
38
|
+
Ingen
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
|
|
8
43
|
## [16.16.2](https://github.com/oslokommune/punkt/compare/16.16.1...16.16.2) (2026-05-15)
|
|
9
44
|
|
|
10
45
|
### ⚠ BREAKING CHANGES
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { IFileValidateDetail } from './shared-types';
|
|
|
16
16
|
import { InputHTMLAttributes } from 'react';
|
|
17
17
|
import { IPktComboboxOption } from './shared-types/combobox';
|
|
18
18
|
import { IPktConsent as IPktConsent_2 } from '@oslokommune/punkt-elements';
|
|
19
|
+
import { IPktHeaderMenu as IPktHeaderMenu_2 } from './shared-types';
|
|
19
20
|
import { IPktHeading as IPktHeading_2 } from '@oslokommune/punkt-elements';
|
|
20
21
|
import { IPktLoader as IPktLoader_2 } from '@oslokommune/punkt-elements';
|
|
21
22
|
import { ITimepickerStrings } from './shared-types/timepicker';
|
|
@@ -37,6 +38,7 @@ import { TAriaLive } from './shared-types';
|
|
|
37
38
|
import { TCardSkin } from './shared-types';
|
|
38
39
|
import { TextareaHTMLAttributes } from 'react';
|
|
39
40
|
import { TFileUploadStrategy } from './shared-types';
|
|
41
|
+
import { THeaderFooterApi } from './shared-types';
|
|
40
42
|
import { THeaderMenu } from './shared-types';
|
|
41
43
|
import { THeaderPosition } from './shared-types';
|
|
42
44
|
import { THeaderScrollBehavior } from './shared-types';
|
|
@@ -535,6 +537,17 @@ export declare interface IPktHeader {
|
|
|
535
537
|
slotMenuText?: string;
|
|
536
538
|
}
|
|
537
539
|
|
|
540
|
+
export declare interface IPktHeaderMenu extends Omit<HTMLAttributes<HTMLElement>, 'onError'>, IPktHeaderMenu_2 {
|
|
541
|
+
/** Forwarded to the host element. */
|
|
542
|
+
ref?: Ref<HTMLElement>;
|
|
543
|
+
/** Fired when the payload has been fetched (or `data` was supplied). */
|
|
544
|
+
onDataLoaded?: (data: THeaderFooterApi) => void;
|
|
545
|
+
/** Fired when the fetch fails. */
|
|
546
|
+
onDataError?: (error: Error) => void;
|
|
547
|
+
/** Optional id of the toggle button that controls this menu. */
|
|
548
|
+
ariaLabelledBy?: string;
|
|
549
|
+
}
|
|
550
|
+
|
|
538
551
|
export declare type IPktHeaderService = IPktHeader;
|
|
539
552
|
|
|
540
553
|
declare interface IPktHeading extends IPktHeading_2 {
|
|
@@ -1071,6 +1084,20 @@ export declare const PktFooterSimple: FC<IPktFooterSimple>;
|
|
|
1071
1084
|
*/
|
|
1072
1085
|
export declare const PktHeader: ForwardRefExoticComponent<IPktHeader & RefAttributes<HTMLDivElement>>;
|
|
1073
1086
|
|
|
1087
|
+
/**
|
|
1088
|
+
* `<PktHeaderMenu>` — global mega menu for Oslo kommune.
|
|
1089
|
+
*
|
|
1090
|
+
* Fetches the live header/footer payload on mount and renders the
|
|
1091
|
+
* `megamenu` slice for the current locale. Mirrors `pkt-header-menu`
|
|
1092
|
+
* (Punkt Elements) — both implementations share types and data
|
|
1093
|
+
* helpers from `shared-utils/header-menu`.
|
|
1094
|
+
*
|
|
1095
|
+
* This component is purely presentational with respect to focus/scroll-lock;
|
|
1096
|
+
* the parent header is expected to control `open` and own focus
|
|
1097
|
+
* management.
|
|
1098
|
+
*/
|
|
1099
|
+
export declare const PktHeaderMenu: ({ dataUrl, data, locale, open, mobileBreakpoint, ariaLabelledBy, className, onDataLoaded, onDataError, ref, ...rest }: IPktHeaderMenu) => JSX_2.Element;
|
|
1100
|
+
|
|
1074
1101
|
export declare const PktHeaderService: ForwardRefExoticComponent<IPktHeader & RefAttributes<HTMLDivElement>>;
|
|
1075
1102
|
|
|
1076
1103
|
export declare const PktHeading: FC<IPktHeading>;
|