@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.
Files changed (70) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/index.d.ts +22 -19
  3. package/dist/punkt-react.es.js +1179 -1174
  4. package/dist/punkt-react.umd.js +83 -83
  5. package/package.json +8 -2
  6. package/src/components/accordion/Accordion.test.tsx +4 -2
  7. package/src/components/accordion/Accordion.tsx +1 -1
  8. package/src/components/accordion/AccordionItem.tsx +3 -3
  9. package/src/components/alert/Alert.test.tsx +4 -5
  10. package/src/components/alert/Alert.tsx +5 -4
  11. package/src/components/backlink/BackLink.tsx +3 -3
  12. package/src/components/breadcrumbs/Breadcrumbs.test.tsx +4 -1
  13. package/src/components/breadcrumbs/Breadcrumbs.tsx +50 -38
  14. package/src/components/button/Button.test.tsx +5 -3
  15. package/src/components/button/Button.tsx +1 -2
  16. package/src/components/card/Card.tsx +6 -3
  17. package/src/components/checkbox/Checkbox.test.tsx +1 -1
  18. package/src/components/checkbox/Checkbox.tsx +10 -2
  19. package/src/components/combobox/Combobox.tsx +9 -8
  20. package/src/components/consent/Consent.tsx +3 -3
  21. package/src/components/datepicker/Datepicker.test.tsx +3 -1
  22. package/src/components/datepicker/Datepicker.tsx +11 -8
  23. package/src/components/footer/Footer.test.tsx +1 -1
  24. package/src/components/footer/Footer.tsx +3 -3
  25. package/src/components/footerSimple/FooterSimple.test.tsx +1 -1
  26. package/src/components/footerSimple/FooterSimple.tsx +3 -3
  27. package/src/components/header/Header.test.tsx +0 -1
  28. package/src/components/header/Header.tsx +1 -0
  29. package/src/components/header/HeaderService.test.tsx +2 -2
  30. package/src/components/header/HeaderService.tsx +34 -15
  31. package/src/components/header/types.ts +8 -8
  32. package/src/components/headerUserMenu/UserMenu.test.tsx +3 -3
  33. package/src/components/headerUserMenu/UserMenu.tsx +6 -2
  34. package/src/components/heading/Heading.test.tsx +4 -2
  35. package/src/components/heading/Heading.tsx +6 -5
  36. package/src/components/helptext/Helptext.tsx +3 -2
  37. package/src/components/icon/Icon.test.tsx +0 -1
  38. package/src/components/icon/Icon.tsx +4 -5
  39. package/src/components/input/Input.tsx +4 -5
  40. package/src/components/inputwrapper/InputWrapper.tsx +2 -1
  41. package/src/components/interfaces.ts +1 -1
  42. package/src/components/loader/Loader.test.tsx +0 -1
  43. package/src/components/loader/Loader.tsx +6 -4
  44. package/src/components/messagebox/Messagebox.tsx +1 -1
  45. package/src/components/modal/Modal.test.tsx +5 -6
  46. package/src/components/modal/Modal.tsx +4 -2
  47. package/src/components/progressbar/Progressbar.test.tsx +5 -3
  48. package/src/components/progressbar/Progressbar.tsx +6 -4
  49. package/src/components/radio/RadioButton.tsx +9 -3
  50. package/src/components/searchinput/SearchInput.test.tsx +3 -3
  51. package/src/components/searchinput/SearchInput.tsx +5 -1
  52. package/src/components/select/Select.test.tsx +0 -1
  53. package/src/components/select/Select.tsx +2 -0
  54. package/src/components/stepper/Step.tsx +2 -1
  55. package/src/components/stepper/Stepper.test.tsx +5 -3
  56. package/src/components/stepper/Stepper.tsx +5 -3
  57. package/src/components/table/Table.test.tsx +6 -6
  58. package/src/components/table/Table.tsx +2 -3
  59. package/src/components/table/TableBody.tsx +2 -3
  60. package/src/components/table/TableData.tsx +2 -3
  61. package/src/components/table/TableDataCell.tsx +2 -3
  62. package/src/components/table/TableHeader.tsx +2 -3
  63. package/src/components/table/TableHeaderCell.tsx +2 -3
  64. package/src/components/table/TableRow.tsx +2 -3
  65. package/src/components/tabs/TabItem.tsx +4 -4
  66. package/src/components/tabs/Tabs.test.tsx +5 -4
  67. package/src/components/tabs/Tabs.tsx +8 -5
  68. package/src/components/textarea/Textarea.test.tsx +0 -1
  69. package/src/components/textarea/Textarea.tsx +9 -4
  70. 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?: React.ReactNode;
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: React.MouseEvent) => void;
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: React.MouseEvent) => void;
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?: default_2.ReactNode | default_2.ReactNode[];
366
- ref?: default_2.LegacyRef<HTMLElement>;
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?: React.ReactNode;
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: React_2.ReactNode;
694
+ children: ReactNode;
692
695
  }
693
696
 
694
697
  declare interface ITableDataCellProps extends HTMLAttributes<HTMLTableCellElement> {
695
698
  className?: string;
696
- children?: React_2.ReactNode;
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: React_2.ReactNode;
705
+ children: ReactNode;
703
706
  }
704
707
 
705
708
  declare interface ITableHeaderProps extends HTMLAttributes<HTMLTableSectionElement> {
706
709
  className?: string;
707
- children: React_2.ReactNode;
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: React_2.ReactNode;
718
+ children: ReactNode;
716
719
  }
717
720
 
718
721
  declare interface ITableRowProps extends HTMLAttributes<HTMLTableRowElement> {
719
722
  className?: string;
720
- children: React_2.ReactNode;
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 {React.InputHTMLAttributes<HTMLInputElement>} props - Other props to pass to the input
792
- * @returns {React.ReactElement} - React element
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: default_2.ForwardRefExoticComponent<IPktTextarea & default_2.RefAttributes<HTMLTextAreaElement>>;
848
+ export declare const PktTextarea: ForwardRefExoticComponent<IPktTextarea & RefAttributes<HTMLTextAreaElement>>;
846
849
 
847
- export declare const PktTextinput: default_2.ForwardRefExoticComponent<IPktTextinput & default_2.RefAttributes<HTMLInputElement>>;
850
+ export declare const PktTextinput: ForwardRefExoticComponent<IPktTextinput & RefAttributes<HTMLInputElement>>;
848
851
 
849
852
  /** Representing object for header components */
850
853
  declare interface Representing {