@oslokommune/punkt-react 13.1.2 → 13.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 +22 -21
- package/dist/punkt-react.es.js +6628 -6549
- package/dist/punkt-react.umd.js +304 -303
- package/package.json +4 -4
- package/src/components/accordion/Accordion.test.tsx +126 -39
- package/src/components/accordion/Accordion.tsx +38 -26
- package/src/components/accordion/AccordionItem.tsx +90 -26
- package/src/components/checkbox/Checkbox.tsx +2 -2
- package/src/components/radio/RadioButton.tsx +2 -2
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
|
+
## [13.2.0](https://github.com/oslokommune/punkt/compare/13.1.2...13.2.0) (2025-08-19)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
* Accordion => React + Checkbox helptext ReactNode (#2869).
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
Ingen
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
8
26
|
## [13.1.1](https://github.com/oslokommune/punkt/compare/13.1.0...13.1.1) (2025-07-09)
|
|
9
27
|
|
|
10
28
|
### ⚠ BREAKING CHANGES
|
package/dist/index.d.ts
CHANGED
|
@@ -25,7 +25,6 @@ import { ReactNode } from 'react';
|
|
|
25
25
|
import { RefAttributes } from 'react';
|
|
26
26
|
import { SelectHTMLAttributes } from 'react';
|
|
27
27
|
import { TextareaHTMLAttributes } from 'react';
|
|
28
|
-
import { TPktAccordionSkin } from '@oslokommune/punkt-elements';
|
|
29
28
|
|
|
30
29
|
declare type Booleanish = boolean | 'true' | 'false';
|
|
31
30
|
|
|
@@ -55,7 +54,7 @@ declare interface InputProps extends default_2.InputHTMLAttributes<HTMLInputElem
|
|
|
55
54
|
id: string;
|
|
56
55
|
}
|
|
57
56
|
|
|
58
|
-
export declare interface IPktAccordion
|
|
57
|
+
export declare interface IPktAccordion {
|
|
59
58
|
compact?: boolean;
|
|
60
59
|
/**
|
|
61
60
|
* @default skin: "borderless"
|
|
@@ -65,21 +64,23 @@ export declare interface IPktAccordion extends PktElType {
|
|
|
65
64
|
* @description A unique identifier to connect the accordion with a heading
|
|
66
65
|
*/
|
|
67
66
|
ariaLabelledBy?: string;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
ref?: LegacyRef<HTMLElement>;
|
|
67
|
+
children?: ReactNode;
|
|
68
|
+
name?: string;
|
|
69
|
+
className?: string;
|
|
72
70
|
}
|
|
73
71
|
|
|
74
|
-
export declare interface IPktAccordionItem
|
|
75
|
-
compact?: boolean;
|
|
76
|
-
skin?: TPktAccordionSkin;
|
|
77
|
-
title?: string;
|
|
72
|
+
export declare interface IPktAccordionItem {
|
|
78
73
|
defaultOpen?: boolean;
|
|
74
|
+
id: string;
|
|
75
|
+
title: string | ReactNode;
|
|
76
|
+
skin?: TPktAccordionSkin_2;
|
|
77
|
+
compact?: boolean;
|
|
79
78
|
isOpen?: boolean;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
children?: ReactNode;
|
|
80
|
+
name?: string;
|
|
81
|
+
className?: string;
|
|
82
|
+
onClick?: (e: default_2.MouseEvent<HTMLDetailsElement>) => void;
|
|
83
|
+
onToggle?: (e: default_2.SyntheticEvent<HTMLDetailsElement>) => void;
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
export declare interface IPktAlert extends PktElType {
|
|
@@ -148,7 +149,7 @@ export declare interface IPktCheckbox extends default_2.InputHTMLAttributes<HTML
|
|
|
148
149
|
hasTile?: boolean;
|
|
149
150
|
disabled?: boolean;
|
|
150
151
|
label?: string;
|
|
151
|
-
checkHelptext?: string;
|
|
152
|
+
checkHelptext?: ReactNode | ReactNode[] | string;
|
|
152
153
|
hasError?: boolean;
|
|
153
154
|
defaultChecked?: boolean;
|
|
154
155
|
checked?: boolean;
|
|
@@ -366,7 +367,7 @@ export declare interface IPktRadioButton extends default_2.InputHTMLAttributes<H
|
|
|
366
367
|
label: string;
|
|
367
368
|
hasTile?: boolean;
|
|
368
369
|
disabled?: boolean;
|
|
369
|
-
checkHelptext?:
|
|
370
|
+
checkHelptext?: ReactNode | ReactNode[] | string;
|
|
370
371
|
defaultChecked?: boolean;
|
|
371
372
|
checked?: boolean;
|
|
372
373
|
hasError?: boolean;
|
|
@@ -639,9 +640,9 @@ declare interface Link {
|
|
|
639
640
|
openInNewTab?: boolean;
|
|
640
641
|
}
|
|
641
642
|
|
|
642
|
-
export declare const PktAccordion:
|
|
643
|
+
export declare const PktAccordion: default_2.ForwardRefExoticComponent<IPktAccordion & default_2.RefAttributes<HTMLDivElement>>;
|
|
643
644
|
|
|
644
|
-
export declare const PktAccordionItem:
|
|
645
|
+
export declare const PktAccordionItem: default_2.ForwardRefExoticComponent<IPktAccordionItem & default_2.RefAttributes<HTMLDetailsElement>>;
|
|
645
646
|
|
|
646
647
|
export declare const PktAlert: FC<IPktAlert>;
|
|
647
648
|
|
|
@@ -669,10 +670,6 @@ declare interface PktElType extends default_2.HTMLAttributes<HTMLElement> {
|
|
|
669
670
|
id?: string;
|
|
670
671
|
}
|
|
671
672
|
|
|
672
|
-
declare interface PktEventWithTarget extends Event {
|
|
673
|
-
target: EventTarget & HTMLInputElement;
|
|
674
|
-
}
|
|
675
|
-
|
|
676
673
|
export declare const PktFooter: default_2.FC<IPktFooter>;
|
|
677
674
|
|
|
678
675
|
export declare const PktFooterSimple: default_2.FC<IPktFooterSimple>;
|
|
@@ -791,6 +788,10 @@ declare type TCardTagPosition = 'top' | 'bottom';
|
|
|
791
788
|
|
|
792
789
|
declare type TLayout = 'vertical' | 'horizontal';
|
|
793
790
|
|
|
791
|
+
declare type TPktAccordionSkin = 'borderless' | 'outlined' | 'beige' | 'blue';
|
|
792
|
+
|
|
793
|
+
declare type TPktAccordionSkin_2 = 'borderless' | 'outlined' | 'beige' | 'blue';
|
|
794
|
+
|
|
794
795
|
declare type TSkin = 'blue' | 'green' | 'red' | 'beige' | 'yellow' | 'grey' | 'gray' | 'blue-light';
|
|
795
796
|
|
|
796
797
|
declare type TStepStatus = 'completed' | 'incomplete' | 'current';
|