@oslokommune/punkt-react 11.12.3 → 11.12.8
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 +35 -0
- package/dist/components/accordion/Accordion.d.ts +1 -1
- package/dist/components/accordion/AccordionItem.d.ts +1 -1
- package/dist/components/alert/Alert.d.ts +1 -1
- package/dist/components/backlink/BackLink.d.ts +1 -1
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/components/button/Button.d.ts +1 -1
- package/dist/components/checkbox/Checkbox.d.ts +1 -1
- package/dist/components/footer/Footer.d.ts +1 -1
- package/dist/components/footerSimple/FooterSimple.d.ts +1 -1
- package/dist/components/header/Header.d.ts +2 -2
- package/dist/components/icon/Icon.d.ts +1 -1
- package/dist/components/icon/IconContext.d.ts +1 -1
- package/dist/components/index.d.ts +4 -1
- package/dist/components/input/Input.d.ts +1 -1
- package/dist/components/inputwrapper/InputWrapper.d.ts +2 -2
- package/dist/components/linkcard/LinkCard.d.ts +1 -1
- package/dist/components/loader/Loader.d.ts +1 -1
- package/dist/components/messagebox/Messagebox.d.ts +1 -1
- package/dist/components/radio/RadioButton.d.ts +1 -1
- package/dist/components/searchinput/SearchInput.d.ts +1 -1
- package/dist/components/select/Select.d.ts +2 -2
- package/dist/components/table/Table.d.ts +7 -7
- package/dist/components/table/Table.test.d.ts +1 -1
- package/dist/components/table/TableBody.d.ts +7 -0
- package/dist/components/table/TableData.d.ts +1 -1
- package/dist/components/table/TableDataCell.d.ts +8 -0
- package/dist/components/table/TableHeader.d.ts +3 -2
- package/dist/components/table/TableHeaderCell.d.ts +7 -0
- package/dist/components/table/TableRow.d.ts +7 -0
- package/dist/components/tabs/Tabs.d.ts +1 -1
- package/dist/components/tag/Tag.d.ts +1 -1
- package/dist/components/textarea/Textarea.d.ts +2 -2
- package/dist/components/textinput/Textinput.d.ts +1 -1
- package/dist/punkt-react.es.js +1414 -1438
- package/dist/punkt-react.umd.js +22 -17
- package/package.json +14 -14
- package/src/components/accordion/Accordion.test.tsx +1 -1
- package/src/components/accordion/Accordion.tsx +0 -1
- package/src/components/checkbox/Checkbox.test.tsx +4 -10
- package/src/components/footer/Footer.test.tsx +11 -14
- package/src/components/footerSimple/FooterSimple.test.tsx +27 -30
- package/src/components/header/Header.test.tsx +4 -10
- package/src/components/header/Header.tsx +1 -1
- package/src/components/icon/Icon.test.tsx +3 -7
- package/src/components/index.ts +4 -1
- package/src/components/inputwrapper/InputWrapper.tsx +7 -27
- package/src/components/linkcard/LinkCard.test.tsx +4 -10
- package/src/components/loader/Loader.test.tsx +2 -4
- package/src/components/radio/RadioButton.test.tsx +45 -44
- package/src/components/searchinput/SearchInput.test.tsx +3 -5
- package/src/components/searchinput/SearchInput.tsx +9 -28
- package/src/components/select/Select.test.tsx +4 -13
- package/src/components/select/Select.tsx +1 -1
- package/src/components/table/Table.test.tsx +48 -89
- package/src/components/table/Table.tsx +24 -23
- package/src/components/table/TableBody.tsx +13 -0
- package/src/components/table/TableData.tsx +1 -1
- package/src/components/table/TableDataCell.tsx +19 -0
- package/src/components/table/TableHeader.tsx +8 -2
- package/src/components/table/TableHeaderCell.tsx +13 -0
- package/src/components/table/TableRow.tsx +13 -0
- package/src/components/tag/Tag.test.tsx +1 -1
- package/src/components/textarea/Textarea.test.tsx +4 -13
- package/src/components/textinput/Textinput.test.tsx +4 -13
- package/src/components/table/__snapshots__/Table.test.tsx.snap +0 -137
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,41 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [11.13.0](https://github.com/oslokommune/punkt/compare/11.12.7...11.13.0) (2024-05-14)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
Ingen
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
Ingen
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [11.12.4](https://github.com/oslokommune/punkt/compare/11.12.3...11.12.4) (2024-05-08)
|
|
26
|
+
|
|
27
|
+
### ⚠ BREAKING CHANGES
|
|
28
|
+
Ingen
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
Ingen
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
* Fiks typefeil i React (Alle komponenter klaget på typefeil) (#1664).
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Chores
|
|
38
|
+
Ingen
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
|
|
8
43
|
## [11.12.1](https://github.com/oslokommune/punkt/compare/11.12.0...11.12.1) (2024-05-06)
|
|
9
44
|
|
|
10
45
|
### ⚠ BREAKING CHANGES
|
|
@@ -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>>;
|
|
@@ -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>;
|
|
@@ -17,8 +17,11 @@ export { PktRadioButton } from './radio/RadioButton';
|
|
|
17
17
|
export { PktSearchInput } from './searchinput/SearchInput';
|
|
18
18
|
export { PktSelect } from './select/Select';
|
|
19
19
|
export { PktTable } from './table/Table';
|
|
20
|
-
export {
|
|
20
|
+
export { PktTableDataCell } from './table/TableDataCell';
|
|
21
|
+
export { PktTableHeaderCell } from './table/TableHeaderCell';
|
|
21
22
|
export { PktTableHeader } from './table/TableHeader';
|
|
23
|
+
export { PktTableRow } from './table/TableRow';
|
|
24
|
+
export { PktTableBody } from './table/TableBody';
|
|
22
25
|
export { PktTabs } from './tabs/Tabs';
|
|
23
26
|
export { PktTag } from './tag/Tag';
|
|
24
27
|
export { PktTextarea } from './textarea/Textarea';
|
|
@@ -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,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;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export type
|
|
3
|
-
interface
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
export type TTableSkin = 'basic' | 'zebra-grey' | 'zebra-blue';
|
|
3
|
+
interface ITableProps {
|
|
4
|
+
compact?: boolean;
|
|
5
|
+
skin?: 'basic' | 'zebra-grey' | 'zebra-blue';
|
|
6
|
+
responsiveView?: boolean;
|
|
7
|
+
className?: string;
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
}
|
|
10
|
-
export declare const PktTable: ({
|
|
10
|
+
export declare const PktTable: ({ className, compact, skin, responsiveView, children, }: ITableProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface ITableDataCellProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
dataLabel?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const PktTableDataCell: ({ children, className, dataLabel }: ITableDataCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
interface
|
|
2
|
+
interface ITableHeaderProps {
|
|
3
|
+
className?: string;
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
}
|
|
5
|
-
export declare const PktTableHeader: ({ children }:
|
|
6
|
+
export declare const PktTableHeader: ({ className, children }: ITableHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface ITableHeaderCellProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const PktTableHeaderCell: ({ className, children }: ITableHeaderCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
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 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(
|
|
27
|
+
export declare const PktTextarea: import('../../../node_modules/@types/react').ForwardRefExoticComponent<IPktTextareaProps & import('../../../node_modules/@types/react').RefAttributes<HTMLTextAreaElement>>;
|