@oslokommune/punkt-react 12.17.0 → 12.17.2
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 +22 -33
- package/dist/punkt-react.es.js +4106 -4081
- package/dist/punkt-react.umd.js +202 -196
- package/package.json +4 -4
- package/src/components/datepicker/Datepicker.tsx +18 -14
- package/src/components/textarea/Textarea.tsx +18 -12
- package/src/components/textinput/Textinput.tsx +18 -13
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
|
+
## [12.17.2](https://github.com/oslokommune/punkt/compare/12.17.1...12.17.2) (2025-01-16)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
* Videresende `data-testid` til skjemaelementer (#2128).
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [12.17.1](https://github.com/oslokommune/punkt/compare/12.17.0...12.17.1) (2025-01-15)
|
|
27
|
+
|
|
28
|
+
### ⚠ BREAKING CHANGES
|
|
29
|
+
Ingen
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
Ingen
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
* Div bugfikser (typer i React og månedsnavigasjon i Datepicker) (#2127).
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Chores
|
|
39
|
+
Ingen
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
|
|
8
44
|
## [12.17.0](https://github.com/oslokommune/punkt/compare/12.16.0...12.17.0) (2025-01-13)
|
|
9
45
|
|
|
10
46
|
### ⚠ BREAKING CHANGES
|
package/dist/index.d.ts
CHANGED
|
@@ -7,17 +7,16 @@ import { FocusEventHandler } from 'react';
|
|
|
7
7
|
import { ForwardRefExoticComponent } from 'react';
|
|
8
8
|
import { HTMLAttributes } from 'react';
|
|
9
9
|
import { HTMLProps } from 'react';
|
|
10
|
+
import { InputHTMLAttributes } from 'react';
|
|
10
11
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
11
12
|
import { LegacyRef } from 'react';
|
|
12
|
-
import { PktDatepicker as PktDatepicker_2 } from '@oslokommune/punkt-elements';
|
|
13
13
|
import { PktInputWrapper as PktInputWrapper_2 } from '@oslokommune/punkt-elements';
|
|
14
|
-
import { PktTextarea as PktTextarea_2 } from '@oslokommune/punkt-elements';
|
|
15
|
-
import { PktTextinput as PktTextinput_2 } from '@oslokommune/punkt-elements';
|
|
16
14
|
import * as React_2 from 'react';
|
|
17
15
|
import { ReactElement } from 'react';
|
|
18
16
|
import { ReactNode } from 'react';
|
|
19
17
|
import { RefAttributes } from 'react';
|
|
20
18
|
import { SelectHTMLAttributes } from 'react';
|
|
19
|
+
import { TextareaHTMLAttributes } from 'react';
|
|
21
20
|
|
|
22
21
|
declare type Booleanish = boolean | 'true' | 'false';
|
|
23
22
|
|
|
@@ -135,43 +134,40 @@ declare interface IPktCheckbox extends default_2.InputHTMLAttributes<HTMLInputEl
|
|
|
135
134
|
value?: string;
|
|
136
135
|
}
|
|
137
136
|
|
|
138
|
-
declare interface IPktDatepicker extends
|
|
137
|
+
declare interface IPktDatepicker extends InputHTMLAttributes<HTMLInputElement> {
|
|
139
138
|
value?: string | string[];
|
|
140
139
|
label?: string;
|
|
141
|
-
name?: string;
|
|
142
140
|
dateformat?: string;
|
|
143
141
|
multiple?: boolean;
|
|
144
142
|
maxlength?: number;
|
|
145
|
-
disabled?: boolean;
|
|
146
143
|
range?: boolean;
|
|
147
144
|
weeknumbers?: boolean;
|
|
148
145
|
withcontrols?: boolean;
|
|
149
146
|
fullwidth?: boolean;
|
|
150
|
-
min?: string | number | undefined;
|
|
151
|
-
max?: string | number | undefined;
|
|
152
147
|
excludedates?: string[];
|
|
153
148
|
excludeweekdays?: string[];
|
|
154
149
|
currentmonth?: string;
|
|
155
150
|
calendarOpen?: boolean;
|
|
156
|
-
required?: boolean;
|
|
157
151
|
requiredTag?: boolean;
|
|
158
152
|
requiredText?: string;
|
|
159
153
|
optionalTag?: boolean;
|
|
160
154
|
optionalText?: string;
|
|
161
155
|
useWrapper?: boolean;
|
|
162
|
-
helptext?: string;
|
|
163
|
-
helptextDropdown?: string;
|
|
156
|
+
helptext?: string | ReactNode | ReactNode[];
|
|
157
|
+
helptextDropdown?: string | ReactNode | ReactNode[];
|
|
164
158
|
helptextDropdownButton?: string;
|
|
165
159
|
hasError?: boolean;
|
|
166
|
-
errorMessage?: string;
|
|
160
|
+
errorMessage?: string | ReactNode | ReactNode[];
|
|
167
161
|
strings?: any;
|
|
168
|
-
ref?: LegacyRef<
|
|
162
|
+
ref?: LegacyRef<HTMLInputElement>;
|
|
169
163
|
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
170
164
|
onInput?: ChangeEventHandler<HTMLInputElement>;
|
|
171
165
|
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
172
166
|
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
173
167
|
onValueChange?: (e: CustomEvent) => void;
|
|
174
168
|
onToggleHelpText?: (e: CustomEvent) => void;
|
|
169
|
+
dataTestid?: string;
|
|
170
|
+
skipForwardTestid?: boolean;
|
|
175
171
|
}
|
|
176
172
|
|
|
177
173
|
declare interface IPktFooter extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
@@ -398,13 +394,11 @@ declare interface IPktTag extends PktElType {
|
|
|
398
394
|
onClose?: (e: CustomEvent) => void;
|
|
399
395
|
}
|
|
400
396
|
|
|
401
|
-
declare interface IPktTextarea extends
|
|
402
|
-
id: string;
|
|
397
|
+
declare interface IPktTextarea extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
403
398
|
ariaDescribedby?: string;
|
|
404
399
|
ariaLabelledby?: string;
|
|
405
400
|
counter?: boolean;
|
|
406
401
|
counterMaxLength?: number;
|
|
407
|
-
disabled?: boolean;
|
|
408
402
|
errorMessage?: string | ReactNode | ReactNode[];
|
|
409
403
|
hasError?: boolean;
|
|
410
404
|
helptext?: string | ReactNode | ReactNode[];
|
|
@@ -412,32 +406,28 @@ declare interface IPktTextarea extends Omit<PktElType, 'ref'> {
|
|
|
412
406
|
helptextDropdownButton?: string;
|
|
413
407
|
inline?: boolean;
|
|
414
408
|
fullwidth?: boolean;
|
|
415
|
-
label
|
|
416
|
-
name?: string;
|
|
409
|
+
label?: string;
|
|
417
410
|
optionalTag?: boolean;
|
|
418
411
|
optionalText?: string;
|
|
419
412
|
requiredTag?: boolean;
|
|
420
413
|
requiredText?: string;
|
|
421
|
-
placeholder?: string;
|
|
422
|
-
rows?: number;
|
|
423
414
|
useWrapper?: boolean;
|
|
424
415
|
value?: string;
|
|
425
|
-
ref?: LegacyRef<
|
|
416
|
+
ref?: LegacyRef<HTMLTextAreaElement>;
|
|
426
417
|
onChange?: ChangeEventHandler<HTMLTextAreaElement>;
|
|
427
418
|
onInput?: ChangeEventHandler<HTMLTextAreaElement>;
|
|
428
419
|
onBlur?: FocusEventHandler<HTMLTextAreaElement>;
|
|
429
420
|
onFocus?: FocusEventHandler<HTMLTextAreaElement>;
|
|
430
421
|
onValueChange?: (e: CustomEvent) => void;
|
|
431
422
|
onToggleHelpText?: (e: CustomEvent) => void;
|
|
423
|
+
dataTestid?: string;
|
|
424
|
+
skipForwardTestid?: boolean;
|
|
432
425
|
}
|
|
433
426
|
|
|
434
|
-
declare interface IPktTextinput extends
|
|
435
|
-
id: string;
|
|
427
|
+
declare interface IPktTextinput extends InputHTMLAttributes<HTMLInputElement> {
|
|
436
428
|
ariaLabelledby?: string;
|
|
437
|
-
autocomplete?: string;
|
|
438
429
|
counter?: boolean;
|
|
439
430
|
counterMaxLength?: number;
|
|
440
|
-
disabled?: boolean;
|
|
441
431
|
errorMessage?: string | ReactNode | ReactNode[];
|
|
442
432
|
hasError?: boolean;
|
|
443
433
|
helptext?: string | ReactNode | ReactNode[];
|
|
@@ -446,26 +436,25 @@ declare interface IPktTextinput extends Omit<PktElType, 'ref'> {
|
|
|
446
436
|
iconNameRight?: string;
|
|
447
437
|
inline?: boolean;
|
|
448
438
|
fullwidth?: boolean;
|
|
449
|
-
label
|
|
450
|
-
name?: string;
|
|
439
|
+
label?: string;
|
|
451
440
|
optionalTag?: boolean;
|
|
452
441
|
optionalText?: string;
|
|
453
442
|
requiredTag?: boolean;
|
|
454
443
|
requiredText?: string;
|
|
455
|
-
placeholder?: string;
|
|
456
444
|
prefix?: string;
|
|
457
445
|
suffix?: string;
|
|
458
|
-
type?: string;
|
|
459
446
|
useWrapper?: boolean;
|
|
460
447
|
value?: string;
|
|
461
448
|
omitSearchIcon?: boolean;
|
|
462
|
-
ref?: LegacyRef<
|
|
449
|
+
ref?: LegacyRef<HTMLInputElement>;
|
|
463
450
|
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
464
451
|
onInput?: ChangeEventHandler<HTMLInputElement>;
|
|
465
452
|
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
466
453
|
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
467
454
|
onValueChange?: (e: CustomEvent) => void;
|
|
468
455
|
onToggleHelpText?: (e: CustomEvent) => void;
|
|
456
|
+
dataTestid?: string;
|
|
457
|
+
skipForwardTestid?: boolean;
|
|
469
458
|
}
|
|
470
459
|
|
|
471
460
|
declare interface IRadio extends default_2.InputHTMLAttributes<HTMLInputElement> {
|
|
@@ -579,7 +568,7 @@ export declare const PktCard: FC<IPktCard>;
|
|
|
579
568
|
|
|
580
569
|
export declare const PktCheckbox: default_2.ForwardRefExoticComponent<IPktCheckbox & default_2.RefAttributes<HTMLInputElement>>;
|
|
581
570
|
|
|
582
|
-
export declare const PktDatepicker: ForwardRefExoticComponent<IPktDatepicker>;
|
|
571
|
+
export declare const PktDatepicker: default_2.ForwardRefExoticComponent<IPktDatepicker>;
|
|
583
572
|
|
|
584
573
|
declare interface PktElType extends default_2.HTMLAttributes<HTMLElement> {
|
|
585
574
|
className?: string;
|
|
@@ -653,9 +642,9 @@ export declare const PktTabs: default_2.ForwardRefExoticComponent<ITabs & defaul
|
|
|
653
642
|
|
|
654
643
|
export declare const PktTag: FC<IPktTag>;
|
|
655
644
|
|
|
656
|
-
export declare const PktTextarea: ForwardRefExoticComponent<IPktTextarea>;
|
|
645
|
+
export declare const PktTextarea: default_2.ForwardRefExoticComponent<IPktTextarea>;
|
|
657
646
|
|
|
658
|
-
export declare const PktTextinput: ForwardRefExoticComponent<IPktTextinput>;
|
|
647
|
+
export declare const PktTextinput: default_2.ForwardRefExoticComponent<IPktTextinput>;
|
|
659
648
|
|
|
660
649
|
declare interface PreviewProps {
|
|
661
650
|
children?: ReactNode;
|