@oslokommune/punkt-react 16.1.0 → 16.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 +36 -0
- package/dist/index.d.ts +29 -13
- package/dist/punkt-react.es.js +3671 -3511
- package/dist/punkt-react.umd.js +277 -277
- package/package.json +4 -4
- package/src/components/accordion/AccordionItem.tsx +3 -0
- package/src/components/card/Card.test.tsx +373 -0
- package/src/components/card/Card.tsx +159 -24
- 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.3.0](https://github.com/oslokommune/punkt/compare/16.2.0...16.3.0) (2026-03-24)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
* Deklarativ PktModal + Ren React-Modal (#3387).
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
Ingen
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [16.2.0](https://github.com/oslokommune/punkt/compare/16.1.0...16.2.0) (2026-03-24)
|
|
27
|
+
|
|
28
|
+
### ⚠ BREAKING CHANGES
|
|
29
|
+
Ingen
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
* PktCard i React (#3389).
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
Ingen
|
|
37
|
+
|
|
38
|
+
### Chores
|
|
39
|
+
Ingen
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
|
|
8
44
|
## [16.1.0](https://github.com/oslokommune/punkt/compare/16.0.5...16.1.0) (2026-03-18)
|
|
9
45
|
|
|
10
46
|
### ⚠ BREAKING CHANGES
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { InputHTMLAttributes } from 'react';
|
|
|
14
14
|
import { IPktBackLink as IPktBackLink_2 } from '@oslokommune/punkt-elements';
|
|
15
15
|
import { IPktComboboxOption } from '../../../../../shared-types/combobox';
|
|
16
16
|
import { IPktConsent as IPktConsent_2 } from '@oslokommune/punkt-elements';
|
|
17
|
-
import { IPktHeading } from '@oslokommune/punkt-elements';
|
|
17
|
+
import { IPktHeading as IPktHeading_2 } from '@oslokommune/punkt-elements';
|
|
18
18
|
import { IPktLoader as IPktLoader_2 } from '@oslokommune/punkt-elements';
|
|
19
19
|
import { IPktProgressbar as IPktProgressbar_2 } from '@oslokommune/punkt-elements';
|
|
20
20
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
@@ -24,6 +24,7 @@ import { MouseEvent as MouseEvent_2 } from 'react';
|
|
|
24
24
|
import { MouseEventHandler } from 'react';
|
|
25
25
|
import { ReactElement } from 'react';
|
|
26
26
|
import { ReactNode } from 'react';
|
|
27
|
+
import { Ref } from 'react';
|
|
27
28
|
import { RefAttributes } from 'react';
|
|
28
29
|
import { RefObject } from 'react';
|
|
29
30
|
import { SelectHTMLAttributes } from 'react';
|
|
@@ -156,6 +157,13 @@ declare interface IBreadcrumbs {
|
|
|
156
157
|
href: string;
|
|
157
158
|
}
|
|
158
159
|
|
|
160
|
+
declare interface ICardTag {
|
|
161
|
+
skin?: TTagSkin;
|
|
162
|
+
iconName?: string;
|
|
163
|
+
ariaLabel?: string;
|
|
164
|
+
text: string;
|
|
165
|
+
}
|
|
166
|
+
|
|
159
167
|
/** Props for `uploadStrategy="form"` (native file input submission). */
|
|
160
168
|
declare interface IFileInputFileUploadProps extends IBaseFileUploadProps, Omit<HTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'defaultValue'> {
|
|
161
169
|
uploadStrategy?: 'form';
|
|
@@ -291,14 +299,14 @@ declare interface IPktCalendarStrings {
|
|
|
291
299
|
nextMonth?: string;
|
|
292
300
|
}
|
|
293
301
|
|
|
294
|
-
export declare interface IPktCard extends
|
|
302
|
+
export declare interface IPktCard extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
295
303
|
ariaLabel?: string;
|
|
296
304
|
metaLead?: string | null;
|
|
297
|
-
borderOnHover?: boolean
|
|
305
|
+
borderOnHover?: boolean;
|
|
298
306
|
metaTrail?: string | null;
|
|
299
307
|
layout?: TLayout;
|
|
300
308
|
heading?: string;
|
|
301
|
-
headingLevel?:
|
|
309
|
+
headingLevel?: THeadingLevel;
|
|
302
310
|
image?: {
|
|
303
311
|
src: string;
|
|
304
312
|
alt: string;
|
|
@@ -306,13 +314,13 @@ export declare interface IPktCard extends PktElType {
|
|
|
306
314
|
imageShape?: TCardImageShape;
|
|
307
315
|
clickCardLink?: string | null;
|
|
308
316
|
padding?: TCardPadding;
|
|
309
|
-
openLinkInNewTab?: boolean
|
|
317
|
+
openLinkInNewTab?: boolean;
|
|
310
318
|
skin?: TCardSkin;
|
|
311
319
|
subheading?: string;
|
|
312
320
|
tagPosition?: TCardTagPosition;
|
|
313
|
-
tags?:
|
|
314
|
-
|
|
315
|
-
|
|
321
|
+
tags?: ICardTag[];
|
|
322
|
+
children?: ReactNode;
|
|
323
|
+
ref?: Ref<HTMLDivElement>;
|
|
316
324
|
}
|
|
317
325
|
|
|
318
326
|
export declare interface IPktCheckbox extends InputHTMLAttributes<HTMLInputElement> {
|
|
@@ -521,7 +529,7 @@ export declare interface IPktHeader {
|
|
|
521
529
|
|
|
522
530
|
export declare type IPktHeaderService = IPktHeader;
|
|
523
531
|
|
|
524
|
-
declare interface
|
|
532
|
+
declare interface IPktHeading extends IPktHeading_2 {
|
|
525
533
|
children?: ReactNode | ReactNode[];
|
|
526
534
|
ref?: LegacyRef<HTMLElement>;
|
|
527
535
|
}
|
|
@@ -598,7 +606,8 @@ export declare interface IPktMessagebox extends Omit<HTMLAttributes<HTMLDivEleme
|
|
|
598
606
|
onClose?: () => void;
|
|
599
607
|
}
|
|
600
608
|
|
|
601
|
-
export declare interface IPktModal extends
|
|
609
|
+
export declare interface IPktModal extends Omit<HTMLAttributes<HTMLDialogElement>, 'onClose' | 'open'> {
|
|
610
|
+
open?: boolean;
|
|
602
611
|
headingText?: string;
|
|
603
612
|
hideCloseButton?: boolean;
|
|
604
613
|
closeOnBackdropClick?: boolean;
|
|
@@ -608,6 +617,9 @@ export declare interface IPktModal extends PktElType {
|
|
|
608
617
|
variant?: 'dialog' | 'drawer';
|
|
609
618
|
drawerPosition?: 'left' | 'right';
|
|
610
619
|
transparentBackdrop?: boolean;
|
|
620
|
+
onClose?: () => void;
|
|
621
|
+
children?: ReactNode;
|
|
622
|
+
ref?: Ref<HTMLDialogElement>;
|
|
611
623
|
}
|
|
612
624
|
|
|
613
625
|
export declare interface IPktProgressbar extends ExtendedProgressbar {
|
|
@@ -912,7 +924,7 @@ declare interface PktCalendarHandle {
|
|
|
912
924
|
close: () => void;
|
|
913
925
|
}
|
|
914
926
|
|
|
915
|
-
export declare const PktCard:
|
|
927
|
+
export declare const PktCard: ForwardRefExoticComponent<Omit<IPktCard, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
916
928
|
|
|
917
929
|
export declare const PktCheckbox: ForwardRefExoticComponent<IPktCheckbox & RefAttributes<HTMLInputElement>>;
|
|
918
930
|
|
|
@@ -952,7 +964,7 @@ export declare const PktHeader: ForwardRefExoticComponent<IPktHeader & RefAttrib
|
|
|
952
964
|
|
|
953
965
|
export declare const PktHeaderService: ForwardRefExoticComponent<IPktHeader & RefAttributes<HTMLDivElement>>;
|
|
954
966
|
|
|
955
|
-
export declare const PktHeading: FC<
|
|
967
|
+
export declare const PktHeading: FC<IPktHeading>;
|
|
956
968
|
|
|
957
969
|
export declare const PktHelptext: FC<IPktHelptextProps>;
|
|
958
970
|
|
|
@@ -985,7 +997,7 @@ export declare const PktLoader: FC<IPktLoader>;
|
|
|
985
997
|
|
|
986
998
|
export declare const PktMessagebox: FC<IPktMessagebox>;
|
|
987
999
|
|
|
988
|
-
export declare const PktModal:
|
|
1000
|
+
export declare const PktModal: ForwardRefExoticComponent<Omit<IPktModal, "ref"> & RefAttributes<HTMLDialogElement>>;
|
|
989
1001
|
|
|
990
1002
|
export declare const PktProgressbar: default_2.ForwardRefExoticComponent<Omit<IPktProgressbar, "ref"> & default_2.RefAttributes<HTMLElement>>;
|
|
991
1003
|
|
|
@@ -1085,6 +1097,8 @@ export declare type TFileTransfer = {
|
|
|
1085
1097
|
lastProgress?: number;
|
|
1086
1098
|
};
|
|
1087
1099
|
|
|
1100
|
+
declare type THeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
1101
|
+
|
|
1088
1102
|
/**
|
|
1089
1103
|
* Custom renderer for how a queue item is displayed (e.g. filename vs thumbnail grid).
|
|
1090
1104
|
*
|
|
@@ -1129,6 +1143,8 @@ declare type TSkin_2 = IPktTag['skin'];
|
|
|
1129
1143
|
|
|
1130
1144
|
declare type TStepStatus = 'completed' | 'incomplete' | 'current';
|
|
1131
1145
|
|
|
1146
|
+
declare type TTagSkin = 'blue' | 'blue-light' | 'blue-dark' | 'green' | 'red' | 'beige' | 'yellow' | 'grey' | 'gray';
|
|
1147
|
+
|
|
1132
1148
|
export declare type TTransferItemInProgress = TFileAndTransfer & {
|
|
1133
1149
|
progress: number;
|
|
1134
1150
|
};
|