@oslokommune/punkt-react 12.4.3 → 12.5.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 +21 -14
- package/dist/punkt-react.es.js +3246 -3252
- package/dist/punkt-react.umd.js +113 -112
- package/package.json +13 -4
- package/src/components/accordion/Accordion.test.tsx +9 -4
- package/src/components/breadcrumbs/Breadcrumbs.test.tsx +60 -56
- package/src/components/breadcrumbs/Breadcrumbs.tsx +1 -1
- package/src/components/footer/Footer.test.tsx +2 -9
- package/src/components/footerSimple/FooterSimple.test.tsx +1 -8
- package/src/components/header/Header.test.tsx +0 -14
- package/src/components/icon/Icon.test.tsx +24 -48
- package/src/components/icon/Icon.tsx +15 -19
- package/src/components/index.ts +0 -1
- package/src/components/linkcard/LinkCard.test.tsx +0 -11
- package/src/components/loader/Loader.tsx +0 -1
- package/src/components/preview/Preview.tsx +3 -1
- package/src/components/searchinput/SearchInput.test.tsx +13 -6
- package/src/components/tag/Tag.test.tsx +0 -11
- package/src/components/footer/__snapshots__/Footer.test.tsx.snap +0 -156
- package/src/components/footerSimple/__snapshots__/FooterSimple.test.tsx.snap +0 -72
- package/src/components/header/__snapshots__/Header.test.tsx.snap +0 -161
- package/src/components/icon/DefaultIconFetcher.tsx +0 -54
- package/src/components/icon/IconContext.tsx +0 -9
- package/src/components/linkcard/__snapshots__/LinkCard.test.tsx.snap +0 -22
- package/src/components/tag/__snapshots__/Tag.test.tsx.snap +0 -23
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
|
+
## [12.5.0](https://github.com/oslokommune/punkt/compare/12.4.3...12.5.0) (2024-10-23)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
* Ny PktIcon og endelig dokumentasjon på komponenten (#1980).
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
Ingen
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
8
26
|
## [12.3.15](https://github.com/oslokommune/punkt/compare/12.3.14...12.3.15) (2024-10-18)
|
|
9
27
|
|
|
10
28
|
### ⚠ BREAKING CHANGES
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
|
|
3
|
-
import { Context } from 'react';
|
|
4
3
|
import { default as default_2 } from 'react';
|
|
5
4
|
import { FC } from 'react';
|
|
6
5
|
import { ForwardRefExoticComponent } from 'react';
|
|
@@ -16,6 +15,8 @@ import { RefAttributes } from 'react';
|
|
|
16
15
|
import { SelectHTMLAttributes } from 'react';
|
|
17
16
|
import { TextareaHTMLAttributes } from 'react';
|
|
18
17
|
|
|
18
|
+
declare type Booleanish = boolean | 'true' | 'false';
|
|
19
|
+
|
|
19
20
|
declare interface Column {
|
|
20
21
|
title: string;
|
|
21
22
|
links?: Link[];
|
|
@@ -27,10 +28,6 @@ declare interface IBreadcrumbs {
|
|
|
27
28
|
href: string;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
declare type IconFetcher = {
|
|
31
|
-
fetchIcon: (name: string, path: string | undefined) => Promise<string | null>;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
31
|
declare interface InputProps extends default_2.InputHTMLAttributes<HTMLInputElement> {
|
|
35
32
|
/** The input's label */
|
|
36
33
|
label?: string;
|
|
@@ -212,6 +209,12 @@ declare interface IPktHeader extends HTMLAttributes<HTMLDivElement> {
|
|
|
212
209
|
children?: default_2.ReactNode | default_2.ReactNode[];
|
|
213
210
|
}
|
|
214
211
|
|
|
212
|
+
declare interface IPktIcon extends PktElType {
|
|
213
|
+
name?: string;
|
|
214
|
+
path?: string;
|
|
215
|
+
'aria-hidden'?: Booleanish | undefined;
|
|
216
|
+
}
|
|
217
|
+
|
|
215
218
|
declare interface IPktInputWrapper extends RefAttributes<HTMLElement> {
|
|
216
219
|
forId: string;
|
|
217
220
|
label: string;
|
|
@@ -550,7 +553,7 @@ export declare const PktDatepicker: FC<IPktDatepicker>;
|
|
|
550
553
|
declare interface PktElType {
|
|
551
554
|
className?: string;
|
|
552
555
|
children?: default_2.ReactNode | default_2.ReactNode[];
|
|
553
|
-
ref?: default_2.
|
|
556
|
+
ref?: default_2.LegacyRef<HTMLElement>;
|
|
554
557
|
}
|
|
555
558
|
|
|
556
559
|
declare interface PktEventWithTarget extends Event {
|
|
@@ -563,14 +566,7 @@ export declare const PktFooterSimple: default_2.FC<IPktFooterSimple>;
|
|
|
563
566
|
|
|
564
567
|
export declare const PktHeader: default_2.ForwardRefExoticComponent<IPktHeader & default_2.RefAttributes<HTMLDivElement>>;
|
|
565
568
|
|
|
566
|
-
export declare const PktIcon:
|
|
567
|
-
|
|
568
|
-
export declare const PktIconContext: Context<IconFetcher>;
|
|
569
|
-
|
|
570
|
-
declare interface PktIconProps extends default_2.HTMLAttributes<HTMLSpanElement> {
|
|
571
|
-
name?: string;
|
|
572
|
-
path?: string;
|
|
573
|
-
}
|
|
569
|
+
export declare const PktIcon: FC<IPktIcon>;
|
|
574
570
|
|
|
575
571
|
/**
|
|
576
572
|
* Input component
|
|
@@ -702,3 +698,14 @@ declare interface UserMenuItem {
|
|
|
702
698
|
}
|
|
703
699
|
|
|
704
700
|
export { }
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
declare global {
|
|
704
|
+
interface Window {
|
|
705
|
+
pktFetch: () => Promise<{
|
|
706
|
+
ok: boolean;
|
|
707
|
+
text: () => Promise<string>;
|
|
708
|
+
}>;
|
|
709
|
+
pktIconPath: string;
|
|
710
|
+
}
|
|
711
|
+
}
|