@oslokommune/punkt-react 18.3.2 → 18.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 +42 -0
- package/dist/components/button/Button.d.ts +2 -15
- package/dist/components/card/Card.d.ts +6 -2
- package/dist/components/loader/Loader.d.ts +1 -1
- package/dist/punkt-react.cjs +1 -1
- package/dist/punkt-react.js +1713 -1701
- package/dist/shared-types/button.d.ts +45 -0
- package/dist/shared-types/index.d.ts +2 -0
- package/package.json +3 -3
- package/src/components/breadcrumbs/Breadcrumbs.tsx +2 -2
- package/src/components/button/Button.tsx +5 -27
- package/src/components/card/Card.test.tsx +3 -2
- package/src/components/card/Card.tsx +37 -22
- package/src/components/checkbox/Checkbox.tsx +3 -8
- package/src/components/heading/Heading.tsx +1 -1
- package/src/components/helptext/Helptext.test.tsx +2 -2
- package/src/components/helptext/Helptext.tsx +11 -10
- package/src/components/inputwrapper/InputWrapper.tsx +6 -2
- package/src/components/loader/Loader.tsx +2 -2
- package/src/components/searchinput/SearchInput.tsx +6 -2
- package/src/components/select/Select.tsx +4 -2
- package/src/components/tag/Tag.tsx +4 -4
- package/src/components/textarea/Textarea.tsx +4 -2
- package/src/components/textinput/Textinput.tsx +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,48 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [18.5.0](https://github.com/oslokommune/punkt/compare/18.4.0...18.5.0) (2026-09-07)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
* Conformance-testing for HTML mellom rammeverkene (#3618). Et nytt testsett som kjører gjennom alle komponenter, rendrer de ut, og sjekker at HTML er likt mellom komponentene. Les README for ny pakke for detaljert info.
|
|
15
|
+
|
|
16
|
+
- Endringer i CSS og komponentene for å få HTML-output helt identisk
|
|
17
|
+
- Bruker i større grad Astro-komponenter for å lage testsider i CSS-pakken (enklere å vedlikeholde)
|
|
18
|
+
- Flere bugfikser som er avdekket gjennom konformitetstestingen
|
|
19
|
+
- La til noen nye udokumenterte metoder i card for å støtte potensiell ny bruker bedre
|
|
20
|
+
|
|
21
|
+
OBS! Endret default på `loader`-komponentene, fordi `shapes` var aldri ment å være default, og dokumentasjonen og specs sier at `rainbow` skal være default.
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
Ingen
|
|
26
|
+
|
|
27
|
+
### Chores
|
|
28
|
+
Ingen
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [18.4.0](https://github.com/oslokommune/punkt/compare/18.3.2...18.4.0) (2026-09-03)
|
|
34
|
+
|
|
35
|
+
### ⚠ BREAKING CHANGES
|
|
36
|
+
Ingen
|
|
37
|
+
|
|
38
|
+
### Features
|
|
39
|
+
Ingen
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
Ingen
|
|
43
|
+
|
|
44
|
+
### Chores
|
|
45
|
+
Ingen
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
|
|
8
50
|
## [18.3.1](https://github.com/oslokommune/punkt/compare/18.3.0...18.3.1) (2026-09-02)
|
|
9
51
|
|
|
10
52
|
### ⚠ BREAKING CHANGES
|
|
@@ -1,24 +1,11 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { IPktButtonBase } from '../../shared-types';
|
|
2
3
|
declare global {
|
|
3
4
|
interface Window {
|
|
4
5
|
pktAnimationPath?: string;
|
|
5
6
|
}
|
|
6
7
|
}
|
|
7
|
-
export interface IPktButton extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
8
|
-
iconName?: string;
|
|
9
|
-
secondIconName?: string;
|
|
10
|
-
iconPath?: string;
|
|
11
|
-
secondIconPath?: string;
|
|
12
|
-
mode?: 'light' | 'dark';
|
|
13
|
-
size?: 'xsmall' | 'small' | 'medium' | 'large';
|
|
14
|
-
fullWidth?: boolean;
|
|
15
|
-
fullWidthOnMobile?: boolean;
|
|
16
|
-
color?: 'blue' | 'blue-outline' | 'green' | 'green-outline' | 'green-dark' | 'green-dark-outline' | 'beige-light' | 'beige-dark-outline' | 'yellow' | 'yellow-outline' | 'red' | 'red-outline';
|
|
17
|
-
skin?: 'primary' | 'secondary' | 'tertiary';
|
|
18
|
-
variant?: 'label-only' | 'icon-left' | 'icon-right' | 'icon-only' | 'icons-right-and-left';
|
|
19
|
-
state?: 'normal' | 'focus' | 'hover' | 'active';
|
|
20
|
-
type?: 'button' | 'submit' | 'reset';
|
|
21
|
-
isLoading?: boolean;
|
|
8
|
+
export interface IPktButton extends IPktButtonBase, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type' | 'disabled' | 'color'> {
|
|
22
9
|
loadingAnimationPath?: string;
|
|
23
10
|
}
|
|
24
11
|
export declare const PktButton: import('react').ForwardRefExoticComponent<IPktButton & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -3,6 +3,7 @@ import { TCardSkin, TLayout, TTagSkin } from '../../shared-types';
|
|
|
3
3
|
export type { TCardSkin, TLayout };
|
|
4
4
|
type TCardPadding = 'none' | 'default';
|
|
5
5
|
type TCardImageShape = 'square' | 'round';
|
|
6
|
+
type TCardImageAspect = 'auto' | '1-1' | '4-3' | '3-2' | '16-9' | '19-10';
|
|
6
7
|
type TCardTagPosition = 'top' | 'bottom';
|
|
7
8
|
type THeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
8
9
|
interface ICardTag {
|
|
@@ -15,6 +16,7 @@ export interface IPktCard extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
|
15
16
|
ariaLabel?: string;
|
|
16
17
|
metaLead?: string | null;
|
|
17
18
|
borderOnHover?: boolean;
|
|
19
|
+
zoom?: boolean;
|
|
18
20
|
metaTrail?: string | null;
|
|
19
21
|
layout?: TLayout;
|
|
20
22
|
heading?: string;
|
|
@@ -24,6 +26,8 @@ export interface IPktCard extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
|
24
26
|
alt: string;
|
|
25
27
|
};
|
|
26
28
|
imageShape?: TCardImageShape;
|
|
29
|
+
imageAspect?: TCardImageAspect;
|
|
30
|
+
restrictImageHeight?: boolean;
|
|
27
31
|
clickCardLink?: string | null;
|
|
28
32
|
padding?: TCardPadding;
|
|
29
33
|
openLinkInNewTab?: boolean;
|
|
@@ -32,6 +36,6 @@ export interface IPktCard extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
|
32
36
|
tagPosition?: TCardTagPosition;
|
|
33
37
|
tags?: ICardTag[];
|
|
34
38
|
children?: ReactNode;
|
|
35
|
-
ref?: Ref<
|
|
39
|
+
ref?: Ref<HTMLElement>;
|
|
36
40
|
}
|
|
37
|
-
export declare const PktCard: import('react').ForwardRefExoticComponent<Omit<IPktCard, "ref"> & import('react').RefAttributes<
|
|
41
|
+
export declare const PktCard: import('react').ForwardRefExoticComponent<Omit<IPktCard, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
@@ -29,7 +29,7 @@ export interface IPktLoader extends HTMLAttributes<HTMLDivElement> {
|
|
|
29
29
|
*/
|
|
30
30
|
size?: TPktLoaderSize;
|
|
31
31
|
/**
|
|
32
|
-
* Loader-variant. Standard er "shapes"
|
|
32
|
+
* Loader-variant. Standard er "rainbow". "shapes" er Oslo-bølgene, "blue" en blå spinner.
|
|
33
33
|
*/
|
|
34
34
|
variant?: TPktLoaderVariant;
|
|
35
35
|
/**
|