@oslokommune/punkt-react 16.1.0 → 16.2.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 +18 -0
- package/dist/index.d.ts +23 -11
- package/dist/punkt-react.es.js +2833 -2758
- package/dist/punkt-react.umd.js +186 -186
- package/package.json +4 -4
- package/src/components/card/Card.test.tsx +373 -0
- package/src/components/card/Card.tsx +159 -24
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [16.2.0](https://github.com/oslokommune/punkt/compare/16.1.0...16.2.0) (2026-03-24)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
* PktCard i React (#3389).
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
Ingen
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
8
26
|
## [16.1.0](https://github.com/oslokommune/punkt/compare/16.0.5...16.1.0) (2026-03-18)
|
|
9
27
|
|
|
10
28
|
### ⚠ 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
|
}
|
|
@@ -912,7 +920,7 @@ declare interface PktCalendarHandle {
|
|
|
912
920
|
close: () => void;
|
|
913
921
|
}
|
|
914
922
|
|
|
915
|
-
export declare const PktCard:
|
|
923
|
+
export declare const PktCard: ForwardRefExoticComponent<Omit<IPktCard, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
916
924
|
|
|
917
925
|
export declare const PktCheckbox: ForwardRefExoticComponent<IPktCheckbox & RefAttributes<HTMLInputElement>>;
|
|
918
926
|
|
|
@@ -952,7 +960,7 @@ export declare const PktHeader: ForwardRefExoticComponent<IPktHeader & RefAttrib
|
|
|
952
960
|
|
|
953
961
|
export declare const PktHeaderService: ForwardRefExoticComponent<IPktHeader & RefAttributes<HTMLDivElement>>;
|
|
954
962
|
|
|
955
|
-
export declare const PktHeading: FC<
|
|
963
|
+
export declare const PktHeading: FC<IPktHeading>;
|
|
956
964
|
|
|
957
965
|
export declare const PktHelptext: FC<IPktHelptextProps>;
|
|
958
966
|
|
|
@@ -1085,6 +1093,8 @@ export declare type TFileTransfer = {
|
|
|
1085
1093
|
lastProgress?: number;
|
|
1086
1094
|
};
|
|
1087
1095
|
|
|
1096
|
+
declare type THeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
1097
|
+
|
|
1088
1098
|
/**
|
|
1089
1099
|
* Custom renderer for how a queue item is displayed (e.g. filename vs thumbnail grid).
|
|
1090
1100
|
*
|
|
@@ -1129,6 +1139,8 @@ declare type TSkin_2 = IPktTag['skin'];
|
|
|
1129
1139
|
|
|
1130
1140
|
declare type TStepStatus = 'completed' | 'incomplete' | 'current';
|
|
1131
1141
|
|
|
1142
|
+
declare type TTagSkin = 'blue' | 'blue-light' | 'blue-dark' | 'green' | 'red' | 'beige' | 'yellow' | 'grey' | 'gray';
|
|
1143
|
+
|
|
1132
1144
|
export declare type TTransferItemInProgress = TFileAndTransfer & {
|
|
1133
1145
|
progress: number;
|
|
1134
1146
|
};
|