@oslokommune/punkt-react 16.19.0 → 16.21.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 +40 -20
- package/dist/punkt-react.es.js +2900 -2865
- package/dist/punkt-react.umd.js +146 -146
- package/package.json +3 -3
- package/src/components/helptext/Helptext.test.tsx +98 -0
- package/src/components/helptext/Helptext.tsx +84 -26
- package/src/components/inputwrapper/InputWrapper.tsx +10 -41
- package/src/components/loader/Loader.test.tsx +54 -17
- package/src/components/loader/Loader.tsx +113 -23
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.21.0](https://github.com/oslokommune/punkt/compare/16.20.0...16.21.0) (2026-05-29)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
* PktLoader i React (#3502).
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
Ingen
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [16.20.0](https://github.com/oslokommune/punkt/compare/16.19.0...16.20.0) (2026-05-28)
|
|
27
|
+
|
|
28
|
+
### ⚠ BREAKING CHANGES
|
|
29
|
+
Ingen
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
* Helptext i React, og faktisk ta den i bruk i InputWrapper (#3500).
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
Ingen
|
|
37
|
+
|
|
38
|
+
### Chores
|
|
39
|
+
Ingen
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
|
|
8
44
|
## [16.19.0](https://github.com/oslokommune/punkt/compare/16.18.0...16.19.0) (2026-05-28)
|
|
9
45
|
|
|
10
46
|
### ⚠ 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';
|
|
@@ -17,7 +16,6 @@ import { InputHTMLAttributes } from 'react';
|
|
|
17
16
|
import { IPktComboboxOption } from './shared-types/combobox';
|
|
18
17
|
import { IPktConsent as IPktConsent_2 } from '@oslokommune/punkt-elements';
|
|
19
18
|
import { IPktHeaderMenu as IPktHeaderMenu_2 } from './shared-types';
|
|
20
|
-
import { IPktLoader as IPktLoader_2 } from '@oslokommune/punkt-elements';
|
|
21
19
|
import { IPktSearchInputSuggestion } from './shared-types/searchinput';
|
|
22
20
|
import { ITimepickerStrings } from './shared-types/timepicker';
|
|
23
21
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
@@ -28,7 +26,6 @@ import { ReactElement } from 'react';
|
|
|
28
26
|
import { ReactNode } from 'react';
|
|
29
27
|
import { Ref } from 'react';
|
|
30
28
|
import { RefAttributes } from 'react';
|
|
31
|
-
import { RefObject } from 'react';
|
|
32
29
|
import { SelectHTMLAttributes } from 'react';
|
|
33
30
|
import { SyntheticEvent } from 'react';
|
|
34
31
|
import { TAccordionSkin } from './shared-types';
|
|
@@ -80,8 +77,6 @@ declare interface Column {
|
|
|
80
77
|
text?: string;
|
|
81
78
|
}
|
|
82
79
|
|
|
83
|
-
declare type ExtendedLoader = IPktLoader_2 & PktElType;
|
|
84
|
-
|
|
85
80
|
/**
|
|
86
81
|
* A selected file plus metadata used by the FileUpload UI.
|
|
87
82
|
*
|
|
@@ -564,12 +559,11 @@ declare interface IPktHeading extends HTMLAttributes<HTMLHeadingElement> {
|
|
|
564
559
|
}
|
|
565
560
|
|
|
566
561
|
declare interface IPktHelptextProps extends HTMLAttributes<HTMLDivElement> {
|
|
567
|
-
helptext?: string | ReactNode
|
|
568
|
-
helptextDropdown?: string | ReactNode
|
|
562
|
+
helptext?: string | ReactNode;
|
|
563
|
+
helptextDropdown?: string | ReactNode;
|
|
569
564
|
helptextDropdownButton?: string;
|
|
570
565
|
forId?: string;
|
|
571
|
-
|
|
572
|
-
onToggleHelpText?: (e: CustomEvent) => void;
|
|
566
|
+
onToggleHelpText?: (isOpen: boolean) => void;
|
|
573
567
|
}
|
|
574
568
|
|
|
575
569
|
declare interface IPktIcon extends HTMLAttributes<HTMLElement> {
|
|
@@ -625,7 +619,37 @@ export declare interface IPktLinkCard extends Omit<HTMLAttributes<HTMLAnchorElem
|
|
|
625
619
|
children?: ReactNode;
|
|
626
620
|
}
|
|
627
621
|
|
|
628
|
-
export declare interface IPktLoader extends
|
|
622
|
+
export declare interface IPktLoader extends HTMLAttributes<HTMLDivElement> {
|
|
623
|
+
/**
|
|
624
|
+
* Tid i millisekunder før loader vises. Nyttig når lastetiden kan være
|
|
625
|
+
* så kort at loader ikke trengs.
|
|
626
|
+
*/
|
|
627
|
+
delay?: number;
|
|
628
|
+
/**
|
|
629
|
+
* Vises loader inline eller som blokk.
|
|
630
|
+
*/
|
|
631
|
+
inline?: boolean;
|
|
632
|
+
/**
|
|
633
|
+
* Styrer om loader eller barnenoder vises. Når `false` vises barnenoder.
|
|
634
|
+
*/
|
|
635
|
+
isLoading?: boolean;
|
|
636
|
+
/**
|
|
637
|
+
* Meldingstekst som vises sammen med loader.
|
|
638
|
+
*/
|
|
639
|
+
message?: string | null;
|
|
640
|
+
/**
|
|
641
|
+
* Størrelse på loader. Standard er "medium".
|
|
642
|
+
*/
|
|
643
|
+
size?: TPktLoaderSize;
|
|
644
|
+
/**
|
|
645
|
+
* Loader-variant. Standard er "shapes" (Oslo-bølger). Andre er "blue" og "rainbow" (spinner-varianter).
|
|
646
|
+
*/
|
|
647
|
+
variant?: TPktLoaderVariant;
|
|
648
|
+
/**
|
|
649
|
+
* Overstyrer stien til loader-animasjoner.
|
|
650
|
+
*/
|
|
651
|
+
loadingAnimationPath?: string;
|
|
652
|
+
children?: ReactNode;
|
|
629
653
|
}
|
|
630
654
|
|
|
631
655
|
export declare interface IPktMessagebox extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
@@ -1065,14 +1089,6 @@ export declare const PktConsent: ForwardRefExoticComponent<IPktConsent>;
|
|
|
1065
1089
|
|
|
1066
1090
|
export declare const PktDatepicker: ForwardRefExoticComponent<IPktDatepicker & RefAttributes<HTMLDivElement>>;
|
|
1067
1091
|
|
|
1068
|
-
declare interface PktElType extends HTMLAttributes<HTMLElement> {
|
|
1069
|
-
className?: string;
|
|
1070
|
-
style?: CSSProperties;
|
|
1071
|
-
children?: string | ReactNode | ReactNode[];
|
|
1072
|
-
ref?: RefObject<HTMLElement> | LegacyRef<HTMLElement>;
|
|
1073
|
-
id?: string;
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
1092
|
export declare const PktFileUpload: FC<IPktFileUpload>;
|
|
1077
1093
|
|
|
1078
1094
|
export declare const PktFooter: FC<IPktFooter>;
|
|
@@ -1111,7 +1127,7 @@ export declare const PktHeaderService: ForwardRefExoticComponent<IPktHeader & Re
|
|
|
1111
1127
|
|
|
1112
1128
|
export declare const PktHeading: ForwardRefExoticComponent<IPktHeading & RefAttributes<HTMLHeadingElement>>;
|
|
1113
1129
|
|
|
1114
|
-
export declare const PktHelptext:
|
|
1130
|
+
export declare const PktHelptext: ForwardRefExoticComponent<IPktHelptextProps & RefAttributes<HTMLDivElement>>;
|
|
1115
1131
|
|
|
1116
1132
|
export declare const PktIcon: ForwardRefExoticComponent<IPktIcon & RefAttributes<HTMLSpanElement>>;
|
|
1117
1133
|
|
|
@@ -1138,7 +1154,7 @@ export declare const PktLinkCard: {
|
|
|
1138
1154
|
displayName: string;
|
|
1139
1155
|
};
|
|
1140
1156
|
|
|
1141
|
-
export declare const PktLoader:
|
|
1157
|
+
export declare const PktLoader: ForwardRefExoticComponent<IPktLoader & RefAttributes<HTMLDivElement>>;
|
|
1142
1158
|
|
|
1143
1159
|
export declare const PktMessagebox: FC<IPktMessagebox>;
|
|
1144
1160
|
|
|
@@ -1261,6 +1277,10 @@ declare type TPktHeadingSize = THeadingSize;
|
|
|
1261
1277
|
|
|
1262
1278
|
declare type TPktHeadingWeight = THeadingWeight;
|
|
1263
1279
|
|
|
1280
|
+
declare type TPktLoaderSize = 'small' | 'medium' | 'large';
|
|
1281
|
+
|
|
1282
|
+
declare type TPktLoaderVariant = 'blue' | 'rainbow' | 'shapes';
|
|
1283
|
+
|
|
1264
1284
|
/**
|
|
1265
1285
|
* An operation that can be attached to a queue item (rename, comment, remove, etc).
|
|
1266
1286
|
*
|