@oslokommune/punkt-react 12.20.0 → 12.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 +18 -0
- package/dist/index.d.ts +20 -12
- package/dist/punkt-react.es.js +9373 -9326
- package/dist/punkt-react.umd.js +328 -308
- package/package.json +3 -3
- package/src/components/radio/RadioButton.test.tsx +40 -22
- package/src/components/radio/RadioButton.tsx +34 -48
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
|
+
## [12.21.0](https://github.com/oslokommune/punkt/compare/12.20.0...12.21.0) (2025-02-11)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
* PktRadiobutton i Punkt Elements (#2184). Co-authored-by: Jan Schjetne <jan.schjetne@origo.oslo.kommune.no>
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
Ingen
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
8
26
|
## [12.20.0](https://github.com/oslokommune/punkt/compare/12.19.0...12.20.0) (2025-02-11)
|
|
9
27
|
|
|
10
28
|
### ⚠ BREAKING CHANGES
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ChangeEventHandler } from 'react';
|
|
|
4
4
|
import { default as default_2 } from 'react';
|
|
5
5
|
import { FC } from 'react';
|
|
6
6
|
import { FocusEventHandler } from 'react';
|
|
7
|
+
import { ForwardedRef } from 'react';
|
|
7
8
|
import { ForwardRefExoticComponent } from 'react';
|
|
8
9
|
import { HTMLAttributes } from 'react';
|
|
9
10
|
import { HTMLProps } from 'react';
|
|
@@ -304,6 +305,24 @@ declare interface IPktModal extends PktElType {
|
|
|
304
305
|
declare interface IPktProgressbar extends ExtendedProgressbar {
|
|
305
306
|
}
|
|
306
307
|
|
|
308
|
+
declare interface IPktRadioButton extends InputHTMLAttributes<HTMLInputElement> {
|
|
309
|
+
id: string;
|
|
310
|
+
name: string;
|
|
311
|
+
label: string;
|
|
312
|
+
hasTile?: boolean;
|
|
313
|
+
hasError?: boolean;
|
|
314
|
+
defaultChecked?: boolean;
|
|
315
|
+
disabled?: boolean;
|
|
316
|
+
value?: string;
|
|
317
|
+
checkHelptext?: string | default_2.ReactNode | default_2.ReactNode[];
|
|
318
|
+
ref?: ForwardedRef<HTMLInputElement>;
|
|
319
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
320
|
+
onInput?: ChangeEventHandler<HTMLInputElement>;
|
|
321
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
322
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
323
|
+
onValueChange?: (e: CustomEvent) => void;
|
|
324
|
+
}
|
|
325
|
+
|
|
307
326
|
declare interface IPktSelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
|
|
308
327
|
ariaDescribedby?: string;
|
|
309
328
|
ariaLabelledby?: string;
|
|
@@ -455,17 +474,6 @@ declare interface IPktTextinput extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
455
474
|
skipForwardTestid?: boolean;
|
|
456
475
|
}
|
|
457
476
|
|
|
458
|
-
declare interface IRadio extends default_2.InputHTMLAttributes<HTMLInputElement> {
|
|
459
|
-
id: string;
|
|
460
|
-
name: string;
|
|
461
|
-
label: string;
|
|
462
|
-
hasTile?: boolean;
|
|
463
|
-
disabled?: boolean;
|
|
464
|
-
checkHelptext?: string | default_2.ReactNode | default_2.ReactNode[];
|
|
465
|
-
hasError?: boolean;
|
|
466
|
-
value?: string;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
477
|
declare interface ISearch extends HTMLProps<HTMLInputElement> {
|
|
470
478
|
appearance?: 'local' | 'local-with-button' | 'global';
|
|
471
479
|
disabled?: boolean;
|
|
@@ -614,7 +622,7 @@ export declare const PktPreview: default_2.FC<PreviewProps>;
|
|
|
614
622
|
|
|
615
623
|
export declare const PktProgressbar: default_2.ForwardRefExoticComponent<Omit<IPktProgressbar, "ref"> & default_2.RefAttributes<HTMLElement>>;
|
|
616
624
|
|
|
617
|
-
export declare const PktRadioButton: default_2.ForwardRefExoticComponent<
|
|
625
|
+
export declare const PktRadioButton: default_2.ForwardRefExoticComponent<IPktRadioButton>;
|
|
618
626
|
|
|
619
627
|
export declare const PktSearchInput: default_2.ForwardRefExoticComponent<(Omit<ISearchForm, "ref"> | Omit<ISearchInput, "ref">) & default_2.RefAttributes<HTMLInputElement>>;
|
|
620
628
|
|