@oslokommune/punkt-react 16.2.0 → 16.4.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 +36 -0
- package/dist/index.d.ts +16 -10
- package/dist/punkt-react.es.js +2071 -1989
- package/dist/punkt-react.umd.js +188 -188
- package/package.json +4 -4
- package/src/components/accordion/AccordionItem.tsx +3 -0
- package/src/components/backlink/BackLink.test.tsx +52 -18
- package/src/components/backlink/BackLink.tsx +40 -14
- package/src/components/card/Card.tsx +2 -8
- package/src/components/modal/Modal.test.tsx +12 -7
- package/src/components/modal/Modal.tsx +155 -19
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.4.0](https://github.com/oslokommune/punkt/compare/16.3.0...16.4.0) (2026-03-26)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
* PktBacklink i React, med støtte for innsendt lenkefunksjon (#3390).
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
Ingen
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [16.3.0](https://github.com/oslokommune/punkt/compare/16.2.0...16.3.0) (2026-03-24)
|
|
27
|
+
|
|
28
|
+
### ⚠ BREAKING CHANGES
|
|
29
|
+
Ingen
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
* Deklarativ PktModal + Ren React-Modal (#3387).
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
Ingen
|
|
37
|
+
|
|
38
|
+
### Chores
|
|
39
|
+
Ingen
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
|
|
8
44
|
## [16.2.0](https://github.com/oslokommune/punkt/compare/16.1.0...16.2.0) (2026-03-24)
|
|
9
45
|
|
|
10
46
|
### ⚠ BREAKING CHANGES
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ import { HTMLAttributes } from 'react';
|
|
|
11
11
|
import { HTMLProps } from 'react';
|
|
12
12
|
import { IDatepickerStrings } from '../../../../../shared-types/datepicker';
|
|
13
13
|
import { InputHTMLAttributes } from 'react';
|
|
14
|
-
import { IPktBackLink as IPktBackLink_2 } from '@oslokommune/punkt-elements';
|
|
15
14
|
import { IPktComboboxOption } from '../../../../../shared-types/combobox';
|
|
16
15
|
import { IPktConsent as IPktConsent_2 } from '@oslokommune/punkt-elements';
|
|
17
16
|
import { IPktHeading as IPktHeading_2 } from '@oslokommune/punkt-elements';
|
|
@@ -21,7 +20,6 @@ import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
|
21
20
|
import { LegacyRef } from 'react';
|
|
22
21
|
import { LinkHTMLAttributes } from 'react';
|
|
23
22
|
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
24
|
-
import { MouseEventHandler } from 'react';
|
|
25
23
|
import { ReactElement } from 'react';
|
|
26
24
|
import { ReactNode } from 'react';
|
|
27
25
|
import { Ref } from 'react';
|
|
@@ -67,8 +65,6 @@ declare interface Column {
|
|
|
67
65
|
text?: string;
|
|
68
66
|
}
|
|
69
67
|
|
|
70
|
-
declare type ExtendedBackLink = Omit<IPktBackLink_2, 'text'> & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
71
|
-
|
|
72
68
|
declare type ExtendedLoader = IPktLoader_2 & PktElType;
|
|
73
69
|
|
|
74
70
|
declare type ExtendedProgressbar = IPktProgressbar_2 & PktElType;
|
|
@@ -232,11 +228,17 @@ export declare interface IPktAlert extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
232
228
|
onClose?: (e: CustomEvent) => void;
|
|
233
229
|
}
|
|
234
230
|
|
|
235
|
-
export declare interface IPktBackLink extends
|
|
231
|
+
export declare interface IPktBackLink extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {
|
|
232
|
+
href?: string;
|
|
236
233
|
text?: string;
|
|
237
|
-
ref?: LegacyRef<HTMLAnchorElement>;
|
|
238
234
|
ariaLabel?: string;
|
|
239
|
-
|
|
235
|
+
renderLink?: (args: {
|
|
236
|
+
href: string;
|
|
237
|
+
className: string;
|
|
238
|
+
children: ReactNode;
|
|
239
|
+
props: AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
240
|
+
}) => ReactNode;
|
|
241
|
+
ref?: Ref<HTMLElement>;
|
|
240
242
|
}
|
|
241
243
|
|
|
242
244
|
export declare interface IPktBreadcrumbs extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
@@ -606,7 +608,8 @@ export declare interface IPktMessagebox extends Omit<HTMLAttributes<HTMLDivEleme
|
|
|
606
608
|
onClose?: () => void;
|
|
607
609
|
}
|
|
608
610
|
|
|
609
|
-
export declare interface IPktModal extends
|
|
611
|
+
export declare interface IPktModal extends Omit<HTMLAttributes<HTMLDialogElement>, 'onClose' | 'open'> {
|
|
612
|
+
open?: boolean;
|
|
610
613
|
headingText?: string;
|
|
611
614
|
hideCloseButton?: boolean;
|
|
612
615
|
closeOnBackdropClick?: boolean;
|
|
@@ -616,6 +619,9 @@ export declare interface IPktModal extends PktElType {
|
|
|
616
619
|
variant?: 'dialog' | 'drawer';
|
|
617
620
|
drawerPosition?: 'left' | 'right';
|
|
618
621
|
transparentBackdrop?: boolean;
|
|
622
|
+
onClose?: () => void;
|
|
623
|
+
children?: ReactNode;
|
|
624
|
+
ref?: Ref<HTMLDialogElement>;
|
|
619
625
|
}
|
|
620
626
|
|
|
621
627
|
export declare interface IPktProgressbar extends ExtendedProgressbar {
|
|
@@ -903,7 +909,7 @@ export declare const PktAccordionItem: ForwardRefExoticComponent<IPktAccordionIt
|
|
|
903
909
|
|
|
904
910
|
export declare const PktAlert: FC<IPktAlert>;
|
|
905
911
|
|
|
906
|
-
export declare const PktBackLink: ForwardRefExoticComponent<IPktBackLink
|
|
912
|
+
export declare const PktBackLink: ForwardRefExoticComponent<Omit<IPktBackLink, "ref"> & RefAttributes<HTMLElement>>;
|
|
907
913
|
|
|
908
914
|
export declare const PktBreadcrumbs: ForwardRefExoticComponent<IPktBreadcrumbs & RefAttributes<HTMLAnchorElement>>;
|
|
909
915
|
|
|
@@ -993,7 +999,7 @@ export declare const PktLoader: FC<IPktLoader>;
|
|
|
993
999
|
|
|
994
1000
|
export declare const PktMessagebox: FC<IPktMessagebox>;
|
|
995
1001
|
|
|
996
|
-
export declare const PktModal:
|
|
1002
|
+
export declare const PktModal: ForwardRefExoticComponent<Omit<IPktModal, "ref"> & RefAttributes<HTMLDialogElement>>;
|
|
997
1003
|
|
|
998
1004
|
export declare const PktProgressbar: default_2.ForwardRefExoticComponent<Omit<IPktProgressbar, "ref"> & default_2.RefAttributes<HTMLElement>>;
|
|
999
1005
|
|