@oslokommune/punkt-react 11.12.3 → 11.12.4

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 (53) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/components/accordion/Accordion.d.ts +1 -1
  3. package/dist/components/accordion/AccordionItem.d.ts +1 -1
  4. package/dist/components/alert/Alert.d.ts +1 -1
  5. package/dist/components/backlink/BackLink.d.ts +1 -1
  6. package/dist/components/breadcrumbs/Breadcrumbs.d.ts +1 -1
  7. package/dist/components/button/Button.d.ts +1 -1
  8. package/dist/components/checkbox/Checkbox.d.ts +1 -1
  9. package/dist/components/footer/Footer.d.ts +1 -1
  10. package/dist/components/footerSimple/FooterSimple.d.ts +1 -1
  11. package/dist/components/header/Header.d.ts +2 -2
  12. package/dist/components/icon/Icon.d.ts +1 -1
  13. package/dist/components/icon/IconContext.d.ts +1 -1
  14. package/dist/components/input/Input.d.ts +1 -1
  15. package/dist/components/inputwrapper/InputWrapper.d.ts +2 -2
  16. package/dist/components/linkcard/LinkCard.d.ts +1 -1
  17. package/dist/components/loader/Loader.d.ts +1 -1
  18. package/dist/components/messagebox/Messagebox.d.ts +1 -1
  19. package/dist/components/radio/RadioButton.d.ts +1 -1
  20. package/dist/components/searchinput/SearchInput.d.ts +1 -1
  21. package/dist/components/select/Select.d.ts +2 -2
  22. package/dist/components/table/Table.d.ts +1 -1
  23. package/dist/components/table/TableData.d.ts +1 -1
  24. package/dist/components/table/TableHeader.d.ts +1 -1
  25. package/dist/components/tabs/Tabs.d.ts +1 -1
  26. package/dist/components/tag/Tag.d.ts +1 -1
  27. package/dist/components/textarea/Textarea.d.ts +2 -2
  28. package/dist/components/textinput/Textinput.d.ts +1 -1
  29. package/dist/punkt-react.es.js +1280 -1321
  30. package/dist/punkt-react.umd.js +22 -17
  31. package/package.json +13 -13
  32. package/src/components/accordion/Accordion.test.tsx +1 -1
  33. package/src/components/accordion/Accordion.tsx +0 -1
  34. package/src/components/checkbox/Checkbox.test.tsx +4 -10
  35. package/src/components/footer/Footer.test.tsx +11 -14
  36. package/src/components/footerSimple/FooterSimple.test.tsx +27 -30
  37. package/src/components/header/Header.test.tsx +4 -10
  38. package/src/components/header/Header.tsx +1 -1
  39. package/src/components/icon/Icon.test.tsx +3 -7
  40. package/src/components/inputwrapper/InputWrapper.tsx +7 -27
  41. package/src/components/linkcard/LinkCard.test.tsx +4 -10
  42. package/src/components/loader/Loader.test.tsx +2 -4
  43. package/src/components/radio/RadioButton.test.tsx +45 -44
  44. package/src/components/searchinput/SearchInput.test.tsx +3 -5
  45. package/src/components/searchinput/SearchInput.tsx +9 -28
  46. package/src/components/select/Select.test.tsx +4 -13
  47. package/src/components/select/Select.tsx +1 -1
  48. package/src/components/table/Table.tsx +1 -1
  49. package/src/components/table/TableData.tsx +1 -1
  50. package/src/components/table/TableHeader.tsx +1 -1
  51. package/src/components/tag/Tag.test.tsx +1 -1
  52. package/src/components/textarea/Textarea.test.tsx +4 -13
  53. package/src/components/textinput/Textinput.test.tsx +4 -13
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
+ ## [11.12.4](https://github.com/oslokommune/punkt/compare/11.12.3...11.12.4) (2024-05-08)
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+ Ingen
12
+
13
+ ### Features
14
+ Ingen
15
+
16
+ ### Bug Fixes
17
+ * Fiks typefeil i React (Alle komponenter klaget på typefeil) (#1664).
18
+
19
+
20
+ ### Chores
21
+ Ingen
22
+
23
+ ---
24
+
25
+
8
26
  ## [11.12.1](https://github.com/oslokommune/punkt/compare/11.12.0...11.12.1) (2024-05-06)
9
27
 
10
28
  ### ⚠ BREAKING CHANGES
@@ -1,4 +1,4 @@
1
- import { default as React, ReactNode } from 'react';
1
+ import { default as React, ReactNode } from '../../../node_modules/@types/react';
2
2
 
3
3
  export interface IPktAccordion {
4
4
  ariaLabelledById?: string;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/@types/react';
2
2
 
3
3
  /**
4
4
  * @param toggleProps
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/@types/react';
2
2
 
3
3
  export interface IPktAlert extends React.HTMLAttributes<HTMLDivElement> {
4
4
  skin?: 'error' | 'success' | 'warning' | 'info';
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/@types/react';
2
2
 
3
3
  export interface IPktBackLink extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
4
4
  href?: string;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/@types/react';
2
2
 
3
3
  export interface IBreadcrumbs {
4
4
  text: string;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/@types/react';
2
2
 
3
3
  export interface IPktButton extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
4
  iconName?: string;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/@types/react';
2
2
 
3
3
  export interface IPktCheckbox extends React.InputHTMLAttributes<HTMLInputElement> {
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/@types/react';
2
2
 
3
3
  interface Link {
4
4
  href: string;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/@types/react';
2
2
 
3
3
  export interface IPktFooterSimple extends React.HTMLAttributes<HTMLDivElement> {
4
4
  links?: Array<{
@@ -1,4 +1,4 @@
1
- import { default as React, HTMLAttributes } from 'react';
1
+ import { default as React, HTMLAttributes } from '../../../node_modules/@types/react';
2
2
 
3
3
  export interface User {
4
4
  name?: string;
@@ -35,6 +35,6 @@ export interface IPktHeader extends HTMLAttributes<HTMLDivElement> {
35
35
  openMenu?: () => void;
36
36
  logOut?: () => void;
37
37
  changeRepresentation?: () => void;
38
- children?: React.ReactNode;
38
+ children?: React.ReactNode | React.ReactNode[];
39
39
  }
40
40
  export declare const PktHeader: React.ForwardRefExoticComponent<IPktHeader & React.RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/@types/react';
2
2
 
3
3
  interface PktIconProps extends React.HTMLAttributes<HTMLSpanElement> {
4
4
  name?: string;
@@ -2,4 +2,4 @@
2
2
  export type IconFetcher = {
3
3
  fetchIcon: (name: string, path: string | undefined) => Promise<string | null>;
4
4
  };
5
- export declare const PktIconContext: import('react').Context<IconFetcher>;
5
+ export declare const PktIconContext: import('../../../node_modules/@types/react').Context<IconFetcher>;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/@types/react';
2
2
 
3
3
  interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
4
4
  /** The input's label */
@@ -1,4 +1,4 @@
1
- import { default as React, ReactNode, RefAttributes } from 'react';
1
+ import { default as React, ReactNode, RefAttributes } from '../../../node_modules/@types/react';
2
2
 
3
3
  export interface IPktInputWrapper extends RefAttributes<HTMLElement> {
4
4
  forId: string;
@@ -16,7 +16,7 @@ export interface IPktInputWrapper extends RefAttributes<HTMLElement> {
16
16
  inline?: boolean;
17
17
  ariaDescribedby?: string;
18
18
  useWrapper?: boolean;
19
- children?: ReactNode;
19
+ children?: ReactNode | ReactNode[];
20
20
  className?: string;
21
21
  hasFieldset?: boolean;
22
22
  }
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/@types/react';
2
2
 
3
3
  export interface IPktLinkCard extends React.HTMLAttributes<HTMLAnchorElement> {
4
4
  skin?: 'normal' | 'blue' | 'beige' | 'beige-outline' | 'grey-outline';
@@ -1,4 +1,4 @@
1
- import { default as React, HTMLAttributes } from 'react';
1
+ import { default as React, HTMLAttributes } from '../../../node_modules/@types/react';
2
2
 
3
3
  export interface IPktLoader extends HTMLAttributes<HTMLDivElement> {
4
4
  message?: string;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/@types/react';
2
2
 
3
3
  export interface IPktMessagebox extends React.HTMLAttributes<HTMLDivElement> {
4
4
  skin?: 'beige' | 'red' | 'green' | 'blue';
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/@types/react';
2
2
 
3
3
  export interface IRadio extends React.InputHTMLAttributes<HTMLInputElement> {
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import { default as React, HTMLProps } from 'react';
1
+ import { default as React, HTMLProps } from '../../../node_modules/@types/react';
2
2
 
3
3
  interface SearchSuggestion {
4
4
  title?: string;
@@ -1,9 +1,9 @@
1
- import { default as React, ReactNode, SelectHTMLAttributes } from 'react';
1
+ import { default as React, ReactNode, SelectHTMLAttributes } from '../../../node_modules/@types/react';
2
2
 
3
3
  export interface IPktSelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
4
4
  ariaDescribedby?: string;
5
5
  ariaLabelledby?: string;
6
- children?: ReactNode;
6
+ children?: ReactNode | ReactNode[];
7
7
  disabled?: boolean;
8
8
  errorMessage?: string;
9
9
  hasError?: boolean;
@@ -5,7 +5,7 @@ interface TableProps {
5
5
  modifiers?: {
6
6
  [key in ModifierName]?: boolean;
7
7
  };
8
- children: React.ReactNode;
8
+ children: React.ReactNode | React.ReactNode[];
9
9
  }
10
10
  export declare const PktTable: ({ isResponsive, modifiers: { info, success, strong, shadow }, children, }: TableProps) => import("react/jsx-runtime").JSX.Element;
11
11
  export {};
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  interface TableDataProps {
3
- children: React.ReactNode;
3
+ children: React.ReactNode | React.ReactNode[];
4
4
  }
5
5
  export declare const PktTableData: ({ children }: TableDataProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  interface TableHeaderProps {
3
- children: React.ReactNode;
3
+ children: React.ReactNode | React.ReactNode[];
4
4
  }
5
5
  export declare const PktTableHeader: ({ children }: TableHeaderProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/@types/react';
2
2
 
3
3
  export type TSkin = 'blue' | 'green' | 'red' | 'beige' | 'yellow' | 'grey' | 'blue-light';
4
4
  export interface Tab {
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/@types/react';
2
2
 
3
3
  export interface IPktTag extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
4
  skin?: 'blue' | 'green' | 'red' | 'beige' | 'yellow' | 'grey' | 'blue-light';
@@ -1,4 +1,4 @@
1
- import { TextareaHTMLAttributes } from 'react';
1
+ import { TextareaHTMLAttributes } from '../../../node_modules/@types/react';
2
2
 
3
3
  export interface IPktTextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
4
4
  id: string;
@@ -24,4 +24,4 @@ export interface IPktTextareaProps extends TextareaHTMLAttributes<HTMLTextAreaEl
24
24
  rows?: number;
25
25
  useWrapper?: boolean;
26
26
  }
27
- export declare const PktTextarea: import('react').ForwardRefExoticComponent<IPktTextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
27
+ export declare const PktTextarea: import('../../../node_modules/@types/react').ForwardRefExoticComponent<IPktTextareaProps & import('../../../node_modules/@types/react').RefAttributes<HTMLTextAreaElement>>;
@@ -1,4 +1,4 @@
1
- import { default as React, InputHTMLAttributes } from 'react';
1
+ import { default as React, InputHTMLAttributes } from '../../../node_modules/@types/react';
2
2
 
3
3
  export interface IPktTextinput extends InputHTMLAttributes<HTMLInputElement> {
4
4
  id: string;