@oslokommune/punkt-react 16.20.0 → 16.21.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/index.d.ts +51 -20
- package/dist/punkt-react.es.js +2794 -14965
- package/dist/punkt-react.umd.js +1 -2387
- package/package.json +3 -3
- package/src/components/consent/Consent.test.tsx +217 -0
- package/src/components/consent/Consent.tsx +277 -18
- package/src/components/consent/strings.ts +125 -0
- package/src/components/loader/Loader.test.tsx +54 -17
- package/src/components/loader/Loader.tsx +113 -23
- package/dist/dialog-polyfill.esm-0dVT8G1o-Cf1Ux-Z9.js +0 -315
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.21.1](https://github.com/oslokommune/punkt/compare/16.21.0...16.21.1) (2026-05-29)
|
|
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.21.0](https://github.com/oslokommune/punkt/compare/16.20.0...16.21.0) (2026-05-29)
|
|
26
|
+
|
|
27
|
+
### ⚠ BREAKING CHANGES
|
|
28
|
+
Ingen
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
* PktLoader i React (#3502).
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
Ingen
|
|
36
|
+
|
|
37
|
+
### Chores
|
|
38
|
+
Ingen
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
|
|
8
43
|
## [16.20.0](https://github.com/oslokommune/punkt/compare/16.19.0...16.20.0) (2026-05-28)
|
|
9
44
|
|
|
10
45
|
### ⚠ BREAKING CHANGES
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { Booleanish } from './shared-types';
|
|
|
3
3
|
import { ButtonHTMLAttributes } from 'react';
|
|
4
4
|
import { ChangeEvent } from 'react';
|
|
5
5
|
import { ChangeEventHandler } from 'react';
|
|
6
|
-
import { CSSProperties } from 'react';
|
|
7
6
|
import { FC } from 'react';
|
|
8
7
|
import { FocusEvent as FocusEvent_2 } from 'react';
|
|
9
8
|
import { ForwardRefExoticComponent } from 'react';
|
|
@@ -15,20 +14,16 @@ import { IFileTransfer } from './shared-types';
|
|
|
15
14
|
import { IFileValidateDetail } from './shared-types';
|
|
16
15
|
import { InputHTMLAttributes } from 'react';
|
|
17
16
|
import { IPktComboboxOption } from './shared-types/combobox';
|
|
18
|
-
import { IPktConsent as IPktConsent_2 } from '@oslokommune/punkt-elements';
|
|
19
17
|
import { IPktHeaderMenu as IPktHeaderMenu_2 } from './shared-types';
|
|
20
|
-
import { IPktLoader as IPktLoader_2 } from '@oslokommune/punkt-elements';
|
|
21
18
|
import { IPktSearchInputSuggestion } from './shared-types/searchinput';
|
|
22
19
|
import { ITimepickerStrings } from './shared-types/timepicker';
|
|
23
20
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
24
|
-
import { LegacyRef } from 'react';
|
|
25
21
|
import { LinkHTMLAttributes } from 'react';
|
|
26
22
|
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
27
23
|
import { ReactElement } from 'react';
|
|
28
24
|
import { ReactNode } from 'react';
|
|
29
25
|
import { Ref } from 'react';
|
|
30
26
|
import { RefAttributes } from 'react';
|
|
31
|
-
import { RefObject } from 'react';
|
|
32
27
|
import { SelectHTMLAttributes } from 'react';
|
|
33
28
|
import { SyntheticEvent } from 'react';
|
|
34
29
|
import { TAccordionSkin } from './shared-types';
|
|
@@ -80,7 +75,7 @@ declare interface Column {
|
|
|
80
75
|
text?: string;
|
|
81
76
|
}
|
|
82
77
|
|
|
83
|
-
declare type
|
|
78
|
+
declare type ConsentDetailsMap = Record<string, boolean>;
|
|
84
79
|
|
|
85
80
|
/**
|
|
86
81
|
* A selected file plus metadata used by the FileUpload UI.
|
|
@@ -396,9 +391,17 @@ export declare interface IPktCombobox {
|
|
|
396
391
|
children?: ReactNode;
|
|
397
392
|
}
|
|
398
393
|
|
|
399
|
-
declare interface IPktConsent extends
|
|
400
|
-
|
|
401
|
-
|
|
394
|
+
declare interface IPktConsent extends HTMLAttributes<HTMLElement> {
|
|
395
|
+
devMode?: boolean;
|
|
396
|
+
cookieDomain?: string | null;
|
|
397
|
+
cookieSecure?: string | null;
|
|
398
|
+
cookieExpiryDays?: string | null;
|
|
399
|
+
hotjarId?: string | null;
|
|
400
|
+
googleAnalyticsId?: string | null;
|
|
401
|
+
i18nLanguage?: string;
|
|
402
|
+
triggerType?: TPktConsentTriggerType | null;
|
|
403
|
+
triggerText?: string | null;
|
|
404
|
+
onToggleConsent?: (e: CustomEvent<ConsentDetailsMap>) => void;
|
|
402
405
|
}
|
|
403
406
|
|
|
404
407
|
export declare interface IPktDatepicker extends Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'> {
|
|
@@ -624,7 +627,37 @@ export declare interface IPktLinkCard extends Omit<HTMLAttributes<HTMLAnchorElem
|
|
|
624
627
|
children?: ReactNode;
|
|
625
628
|
}
|
|
626
629
|
|
|
627
|
-
export declare interface IPktLoader extends
|
|
630
|
+
export declare interface IPktLoader extends HTMLAttributes<HTMLDivElement> {
|
|
631
|
+
/**
|
|
632
|
+
* Tid i millisekunder før loader vises. Nyttig når lastetiden kan være
|
|
633
|
+
* så kort at loader ikke trengs.
|
|
634
|
+
*/
|
|
635
|
+
delay?: number;
|
|
636
|
+
/**
|
|
637
|
+
* Vises loader inline eller som blokk.
|
|
638
|
+
*/
|
|
639
|
+
inline?: boolean;
|
|
640
|
+
/**
|
|
641
|
+
* Styrer om loader eller barnenoder vises. Når `false` vises barnenoder.
|
|
642
|
+
*/
|
|
643
|
+
isLoading?: boolean;
|
|
644
|
+
/**
|
|
645
|
+
* Meldingstekst som vises sammen med loader.
|
|
646
|
+
*/
|
|
647
|
+
message?: string | null;
|
|
648
|
+
/**
|
|
649
|
+
* Størrelse på loader. Standard er "medium".
|
|
650
|
+
*/
|
|
651
|
+
size?: TPktLoaderSize;
|
|
652
|
+
/**
|
|
653
|
+
* Loader-variant. Standard er "shapes" (Oslo-bølger). Andre er "blue" og "rainbow" (spinner-varianter).
|
|
654
|
+
*/
|
|
655
|
+
variant?: TPktLoaderVariant;
|
|
656
|
+
/**
|
|
657
|
+
* Overstyrer stien til loader-animasjoner.
|
|
658
|
+
*/
|
|
659
|
+
loadingAnimationPath?: string;
|
|
660
|
+
children?: ReactNode;
|
|
628
661
|
}
|
|
629
662
|
|
|
630
663
|
export declare interface IPktMessagebox extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
@@ -1060,18 +1093,10 @@ export declare const PktCheckbox: ForwardRefExoticComponent<IPktCheckbox & RefAt
|
|
|
1060
1093
|
|
|
1061
1094
|
export declare const PktCombobox: ForwardRefExoticComponent<IPktCombobox & RefAttributes<HTMLDivElement>>;
|
|
1062
1095
|
|
|
1063
|
-
export declare const PktConsent: ForwardRefExoticComponent<IPktConsent
|
|
1096
|
+
export declare const PktConsent: ForwardRefExoticComponent<IPktConsent & RefAttributes<HTMLElement>>;
|
|
1064
1097
|
|
|
1065
1098
|
export declare const PktDatepicker: ForwardRefExoticComponent<IPktDatepicker & RefAttributes<HTMLDivElement>>;
|
|
1066
1099
|
|
|
1067
|
-
declare interface PktElType extends HTMLAttributes<HTMLElement> {
|
|
1068
|
-
className?: string;
|
|
1069
|
-
style?: CSSProperties;
|
|
1070
|
-
children?: string | ReactNode | ReactNode[];
|
|
1071
|
-
ref?: RefObject<HTMLElement> | LegacyRef<HTMLElement>;
|
|
1072
|
-
id?: string;
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
1100
|
export declare const PktFileUpload: FC<IPktFileUpload>;
|
|
1076
1101
|
|
|
1077
1102
|
export declare const PktFooter: FC<IPktFooter>;
|
|
@@ -1137,7 +1162,7 @@ export declare const PktLinkCard: {
|
|
|
1137
1162
|
displayName: string;
|
|
1138
1163
|
};
|
|
1139
1164
|
|
|
1140
|
-
export declare const PktLoader:
|
|
1165
|
+
export declare const PktLoader: ForwardRefExoticComponent<IPktLoader & RefAttributes<HTMLDivElement>>;
|
|
1141
1166
|
|
|
1142
1167
|
export declare const PktMessagebox: FC<IPktMessagebox>;
|
|
1143
1168
|
|
|
@@ -1254,12 +1279,18 @@ declare type TPktAccordionSkin = TAccordionSkin;
|
|
|
1254
1279
|
|
|
1255
1280
|
declare type TPktAccordionSkin_2 = TAccordionSkin;
|
|
1256
1281
|
|
|
1282
|
+
declare type TPktConsentTriggerType = 'button' | 'link' | 'footerlink' | 'icon';
|
|
1283
|
+
|
|
1257
1284
|
declare type TPktHeadingLevel = THeadingLevel_2;
|
|
1258
1285
|
|
|
1259
1286
|
declare type TPktHeadingSize = THeadingSize;
|
|
1260
1287
|
|
|
1261
1288
|
declare type TPktHeadingWeight = THeadingWeight;
|
|
1262
1289
|
|
|
1290
|
+
declare type TPktLoaderSize = 'small' | 'medium' | 'large';
|
|
1291
|
+
|
|
1292
|
+
declare type TPktLoaderVariant = 'blue' | 'rainbow' | 'shapes';
|
|
1293
|
+
|
|
1263
1294
|
/**
|
|
1264
1295
|
* An operation that can be attached to a queue item (rename, comment, remove, etc).
|
|
1265
1296
|
*
|