@oslokommune/punkt-react 14.4.0 → 14.5.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 +36 -0
- package/dist/index.d.ts +22 -19
- package/dist/punkt-react.es.js +1179 -1174
- package/dist/punkt-react.umd.js +83 -83
- package/package.json +8 -2
- package/src/components/accordion/Accordion.test.tsx +4 -2
- package/src/components/accordion/Accordion.tsx +1 -1
- package/src/components/accordion/AccordionItem.tsx +3 -3
- package/src/components/alert/Alert.test.tsx +4 -5
- package/src/components/alert/Alert.tsx +5 -4
- package/src/components/backlink/BackLink.tsx +3 -3
- package/src/components/breadcrumbs/Breadcrumbs.test.tsx +4 -1
- package/src/components/breadcrumbs/Breadcrumbs.tsx +50 -38
- package/src/components/button/Button.test.tsx +5 -3
- package/src/components/button/Button.tsx +1 -2
- package/src/components/card/Card.tsx +6 -3
- package/src/components/checkbox/Checkbox.test.tsx +1 -1
- package/src/components/checkbox/Checkbox.tsx +10 -2
- package/src/components/combobox/Combobox.tsx +9 -8
- package/src/components/consent/Consent.tsx +3 -3
- package/src/components/datepicker/Datepicker.test.tsx +3 -1
- package/src/components/datepicker/Datepicker.tsx +11 -8
- package/src/components/footer/Footer.test.tsx +1 -1
- package/src/components/footer/Footer.tsx +3 -3
- package/src/components/footerSimple/FooterSimple.test.tsx +1 -1
- package/src/components/footerSimple/FooterSimple.tsx +3 -3
- package/src/components/header/Header.test.tsx +0 -1
- package/src/components/header/Header.tsx +1 -0
- package/src/components/header/HeaderService.test.tsx +2 -2
- package/src/components/header/HeaderService.tsx +34 -15
- package/src/components/header/types.ts +8 -8
- package/src/components/headerUserMenu/UserMenu.test.tsx +3 -3
- package/src/components/headerUserMenu/UserMenu.tsx +6 -2
- package/src/components/heading/Heading.test.tsx +4 -2
- package/src/components/heading/Heading.tsx +6 -5
- package/src/components/helptext/Helptext.tsx +3 -2
- package/src/components/icon/Icon.test.tsx +0 -1
- package/src/components/icon/Icon.tsx +4 -5
- package/src/components/input/Input.tsx +4 -5
- package/src/components/inputwrapper/InputWrapper.tsx +2 -1
- package/src/components/interfaces.ts +1 -1
- package/src/components/loader/Loader.test.tsx +0 -1
- package/src/components/loader/Loader.tsx +6 -4
- package/src/components/messagebox/Messagebox.tsx +1 -1
- package/src/components/modal/Modal.test.tsx +5 -6
- package/src/components/modal/Modal.tsx +4 -2
- package/src/components/progressbar/Progressbar.test.tsx +5 -3
- package/src/components/progressbar/Progressbar.tsx +6 -4
- package/src/components/radio/RadioButton.tsx +9 -3
- package/src/components/searchinput/SearchInput.test.tsx +3 -3
- package/src/components/searchinput/SearchInput.tsx +5 -1
- package/src/components/select/Select.test.tsx +0 -1
- package/src/components/select/Select.tsx +2 -0
- package/src/components/stepper/Step.tsx +2 -1
- package/src/components/stepper/Stepper.test.tsx +5 -3
- package/src/components/stepper/Stepper.tsx +5 -3
- package/src/components/table/Table.test.tsx +6 -6
- package/src/components/table/Table.tsx +2 -3
- package/src/components/table/TableBody.tsx +2 -3
- package/src/components/table/TableData.tsx +2 -3
- package/src/components/table/TableDataCell.tsx +2 -3
- package/src/components/table/TableHeader.tsx +2 -3
- package/src/components/table/TableHeaderCell.tsx +2 -3
- package/src/components/table/TableRow.tsx +2 -3
- package/src/components/tabs/TabItem.tsx +4 -4
- package/src/components/tabs/Tabs.test.tsx +5 -4
- package/src/components/tabs/Tabs.tsx +8 -5
- package/src/components/textarea/Textarea.test.tsx +0 -1
- package/src/components/textarea/Textarea.tsx +9 -4
- package/src/components/textinput/Textinput.tsx +11 -6
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
|
+
## [14.5.1](https://github.com/oslokommune/punkt/compare/14.5.0...14.5.1) (2026-02-06)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
* Reaktiver ESLint og fiks opp i lintefeil (#3231).
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [14.5.0](https://github.com/oslokommune/punkt/compare/14.4.0...14.5.0) (2026-02-05)
|
|
27
|
+
|
|
28
|
+
### ⚠ BREAKING CHANGES
|
|
29
|
+
Ingen
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
* PktBreadcrumbs bør kunne ta custom link-komponent (#3230).
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
Ingen
|
|
37
|
+
|
|
38
|
+
### Chores
|
|
39
|
+
Ingen
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
|
|
8
44
|
## [14.3.1](https://github.com/oslokommune/punkt/compare/14.3.0...14.3.1) (2026-02-05)
|
|
9
45
|
|
|
10
46
|
### ⚠ BREAKING CHANGES
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
|
|
3
1
|
import { AnchorHTMLAttributes } from 'react';
|
|
4
2
|
import { Booleanish } from '../../../../../shared-types';
|
|
5
3
|
import { ButtonHTMLAttributes } from 'react';
|
|
@@ -24,7 +22,6 @@ import { LegacyRef } from 'react';
|
|
|
24
22
|
import { LinkHTMLAttributes } from 'react';
|
|
25
23
|
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
26
24
|
import { MouseEventHandler } from 'react';
|
|
27
|
-
import * as React_2 from 'react';
|
|
28
25
|
import { ReactElement } from 'react';
|
|
29
26
|
import { ReactNode } from 'react';
|
|
30
27
|
import { RefAttributes } from 'react';
|
|
@@ -137,6 +134,12 @@ export declare interface IPktBackLink extends ExtendedBackLink {
|
|
|
137
134
|
export declare interface IPktBreadcrumbs extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
138
135
|
breadcrumbs: IBreadcrumbs[];
|
|
139
136
|
navigationType?: 'router' | 'anchor';
|
|
137
|
+
renderLink?: (args: {
|
|
138
|
+
href: string;
|
|
139
|
+
className: string;
|
|
140
|
+
children: ReactNode;
|
|
141
|
+
props: AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
142
|
+
}) => ReactNode;
|
|
140
143
|
}
|
|
141
144
|
|
|
142
145
|
export declare interface IPktButton extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
@@ -296,7 +299,7 @@ export declare interface IPktFooterSimple extends HTMLAttributes<HTMLDivElement>
|
|
|
296
299
|
}
|
|
297
300
|
|
|
298
301
|
export declare interface IPktHeader {
|
|
299
|
-
children?:
|
|
302
|
+
children?: ReactNode;
|
|
300
303
|
/** Additional CSS class name(s) to apply to the header */
|
|
301
304
|
className?: string;
|
|
302
305
|
/** Set dark mode on the header */
|
|
@@ -306,13 +309,13 @@ export declare interface IPktHeader {
|
|
|
306
309
|
/** Link URL for the logo */
|
|
307
310
|
logoLink?: string;
|
|
308
311
|
/** Callback when logo is clicked */
|
|
309
|
-
logoClick?: (event:
|
|
312
|
+
logoClick?: (event: MouseEvent_2) => void;
|
|
310
313
|
/** Name of the service displayed in the header */
|
|
311
314
|
serviceName?: string;
|
|
312
315
|
/** Link URL for the service name */
|
|
313
316
|
serviceLink?: string;
|
|
314
317
|
/** Callback when service name is clicked */
|
|
315
|
-
serviceClick?: (event:
|
|
318
|
+
serviceClick?: (event: MouseEvent_2) => void;
|
|
316
319
|
/** Use compact header height */
|
|
317
320
|
compact?: boolean;
|
|
318
321
|
/** User object with name, shortname, and lastLoggedIn */
|
|
@@ -362,8 +365,8 @@ export declare interface IPktHeader {
|
|
|
362
365
|
export declare type IPktHeaderService = IPktHeader;
|
|
363
366
|
|
|
364
367
|
declare interface IPktHeading_2 extends IPktHeading {
|
|
365
|
-
children?:
|
|
366
|
-
ref?:
|
|
368
|
+
children?: ReactNode | ReactNode[];
|
|
369
|
+
ref?: LegacyRef<HTMLElement>;
|
|
367
370
|
}
|
|
368
371
|
|
|
369
372
|
declare interface IPktHelptextProps extends HTMLAttributes<HTMLDivElement> {
|
|
@@ -503,7 +506,7 @@ export declare interface IPktStep {
|
|
|
503
506
|
/**
|
|
504
507
|
* Step content. Can be a string, a React component or an element.
|
|
505
508
|
*/
|
|
506
|
-
children?:
|
|
509
|
+
children?: ReactNode;
|
|
507
510
|
/**
|
|
508
511
|
* Additional class names
|
|
509
512
|
*/
|
|
@@ -688,23 +691,23 @@ declare interface ISearchInput extends ISearch {
|
|
|
688
691
|
|
|
689
692
|
declare interface ITableBodyProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
690
693
|
className?: string;
|
|
691
|
-
children:
|
|
694
|
+
children: ReactNode;
|
|
692
695
|
}
|
|
693
696
|
|
|
694
697
|
declare interface ITableDataCellProps extends HTMLAttributes<HTMLTableCellElement> {
|
|
695
698
|
className?: string;
|
|
696
|
-
children?:
|
|
699
|
+
children?: ReactNode;
|
|
697
700
|
dataLabel?: string;
|
|
698
701
|
}
|
|
699
702
|
|
|
700
703
|
declare interface ITableHeaderCellProps extends HTMLAttributes<HTMLTableCellElement> {
|
|
701
704
|
className?: string;
|
|
702
|
-
children:
|
|
705
|
+
children: ReactNode;
|
|
703
706
|
}
|
|
704
707
|
|
|
705
708
|
declare interface ITableHeaderProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
706
709
|
className?: string;
|
|
707
|
-
children:
|
|
710
|
+
children: ReactNode;
|
|
708
711
|
}
|
|
709
712
|
|
|
710
713
|
declare interface ITableProps extends HTMLAttributes<HTMLTableElement> {
|
|
@@ -712,12 +715,12 @@ declare interface ITableProps extends HTMLAttributes<HTMLTableElement> {
|
|
|
712
715
|
skin?: 'basic' | 'zebra-blue';
|
|
713
716
|
responsiveView?: boolean;
|
|
714
717
|
className?: string;
|
|
715
|
-
children:
|
|
718
|
+
children: ReactNode;
|
|
716
719
|
}
|
|
717
720
|
|
|
718
721
|
declare interface ITableRowProps extends HTMLAttributes<HTMLTableRowElement> {
|
|
719
722
|
className?: string;
|
|
720
|
-
children:
|
|
723
|
+
children: ReactNode;
|
|
721
724
|
}
|
|
722
725
|
|
|
723
726
|
declare interface Link {
|
|
@@ -788,8 +791,8 @@ export declare const PktIcon: FC<IPktIcon>;
|
|
|
788
791
|
* @param {string} label - Label for the input
|
|
789
792
|
* @param {string} id - Id for the input
|
|
790
793
|
* @param {string} validationMessage - Validation message for the input
|
|
791
|
-
* @param {
|
|
792
|
-
* @returns {
|
|
794
|
+
* @param {InputHTMLAttributes<HTMLInputElement>} props - Other props to pass to the input
|
|
795
|
+
* @returns {ReactElement} - React element
|
|
793
796
|
*
|
|
794
797
|
* @example
|
|
795
798
|
* <Input label="First name" id="firstName" validationMessage="First name is required" />
|
|
@@ -842,9 +845,9 @@ export declare const PktTabs: ForwardRefExoticComponent<IPktTabs & RefAttributes
|
|
|
842
845
|
|
|
843
846
|
export declare const PktTag: ForwardRefExoticComponent<(ButtonPktTagProps | SpanPktTagProps) & RefAttributes<HTMLButtonElement | HTMLSpanElement>>;
|
|
844
847
|
|
|
845
|
-
export declare const PktTextarea:
|
|
848
|
+
export declare const PktTextarea: ForwardRefExoticComponent<IPktTextarea & RefAttributes<HTMLTextAreaElement>>;
|
|
846
849
|
|
|
847
|
-
export declare const PktTextinput:
|
|
850
|
+
export declare const PktTextinput: ForwardRefExoticComponent<IPktTextinput & RefAttributes<HTMLInputElement>>;
|
|
848
851
|
|
|
849
852
|
/** Representing object for header components */
|
|
850
853
|
declare interface Representing {
|