@oslokommune/punkt-react 12.40.10 → 12.41.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.
- package/CHANGELOG.md +49 -0
- package/dist/index.d.ts +14 -14
- package/dist/punkt-react.es.js +3314 -3277
- package/dist/punkt-react.umd.js +212 -205
- package/package.json +4 -4
- package/src/components/button/Button.test.tsx +2 -9
- package/src/components/button/Button.tsx +84 -40
- package/src/components/combobox/Combobox.tsx +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,55 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [12.41.1](https://github.com/oslokommune/punkt/compare/12.41.0...12.41.1) (2025-06-11)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
* Combobox må støtte defaultOptions og click/onClick (#2622).
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [12.41.0](https://github.com/oslokommune/punkt/compare/12.40.10...12.41.0) (2025-06-10)
|
|
27
|
+
|
|
28
|
+
### ⚠ BREAKING CHANGES
|
|
29
|
+
Ingen
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
* Tilbakestill React-button til ren React + bruk native button i custom element (#2596). - Fjern pkt-button fra testing-utils
|
|
33
|
+
- Oppdater tester til å ikke vente på pkt-button
|
|
34
|
+
- Legg til prop `loadingPath` og støtte for global loading-path
|
|
35
|
+
- Legg til `aria-busy` ved isLoading, `aria-disabled` ved disabled
|
|
36
|
+
- Default `aria-busy`/`aria-disabled` til undefined for å unngå unødvendige aria-attributter
|
|
37
|
+
- Skriv om custom element-versjon til å bruke native `<button>`:
|
|
38
|
+
- Fjern element-internals og event listeners fordi vi har native button og ikke bruker shadow DOM
|
|
39
|
+
- Bruk `classMap` og fjern `role=button` på host
|
|
40
|
+
- Legg til `formId`-prop for å sette `form`-attributt på `<button>`
|
|
41
|
+
- CSS-oppdateringer:
|
|
42
|
+
- Legg til fokusstyling på active og loading
|
|
43
|
+
- Behold knappen uendret ved loading-animasjon
|
|
44
|
+
- Støtt brukerdefinerte + interne`pkt-button--state`-klasser
|
|
45
|
+
- Sett `pointer-events: none` når isLoading
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Bug Fixes
|
|
49
|
+
Ingen
|
|
50
|
+
|
|
51
|
+
### Chores
|
|
52
|
+
Ingen
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
|
|
8
57
|
## [12.40.6](https://github.com/oslokommune/punkt/compare/12.40.5...12.40.6) (2025-05-26)
|
|
9
58
|
|
|
10
59
|
### ⚠ BREAKING CHANGES
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
|
|
3
3
|
import { AnchorHTMLAttributes } from 'react';
|
|
4
|
-
import { ButtonHTMLAttributes } from 'react';
|
|
5
4
|
import { ChangeEventHandler } from 'react';
|
|
6
5
|
import { default as default_2 } from 'react';
|
|
7
6
|
import { FC } from 'react';
|
|
@@ -12,14 +11,12 @@ import { HTMLAttributes } from 'react';
|
|
|
12
11
|
import { HTMLProps } from 'react';
|
|
13
12
|
import { InputHTMLAttributes } from 'react';
|
|
14
13
|
import { IPktBackLink as IPktBackLink_2 } from '@oslokommune/punkt-elements';
|
|
15
|
-
import { IPktButton as IPktButton_2 } from '@oslokommune/punkt-elements';
|
|
16
14
|
import { IPktCombobox as IPktCombobox_2 } from '@oslokommune/punkt-elements';
|
|
17
15
|
import { IPktConsent as IPktConsent_2 } from '@oslokommune/punkt-elements';
|
|
18
16
|
import { IPktHeading } from '@oslokommune/punkt-elements';
|
|
19
17
|
import { IPktLoader as IPktLoader_2 } from '@oslokommune/punkt-elements';
|
|
20
18
|
import { IPktProgressbar as IPktProgressbar_2 } from '@oslokommune/punkt-elements';
|
|
21
19
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
22
|
-
import { KeyboardEventHandler } from 'react';
|
|
23
20
|
import { LegacyRef } from 'react';
|
|
24
21
|
import { LinkHTMLAttributes } from 'react';
|
|
25
22
|
import { MouseEventHandler } from 'react';
|
|
@@ -42,8 +39,6 @@ declare interface Column {
|
|
|
42
39
|
|
|
43
40
|
declare type ExtendedBackLink = Omit<IPktBackLink_2, 'text'> & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
44
41
|
|
|
45
|
-
declare type ExtendedButton = IPktButton_2 & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
46
|
-
|
|
47
42
|
declare type ExtendedCombobox = Omit<IPktCombobox_2, 'helptext'> & SelectHTMLAttributes<HTMLSelectElement>;
|
|
48
43
|
|
|
49
44
|
declare type ExtendedLoader = IPktLoader_2 & PktElType;
|
|
@@ -111,14 +106,18 @@ export declare interface IPktBreadcrumbs extends default_2.AnchorHTMLAttributes<
|
|
|
111
106
|
navigationType?: 'router' | 'anchor';
|
|
112
107
|
}
|
|
113
108
|
|
|
114
|
-
export declare interface IPktButton extends
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
109
|
+
export declare interface IPktButton extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
110
|
+
iconName?: string;
|
|
111
|
+
secondIconName?: string;
|
|
112
|
+
mode?: 'light' | 'dark';
|
|
113
|
+
size?: 'small' | 'medium' | 'large';
|
|
114
|
+
color?: 'blue' | 'blue-outline' | 'green' | 'green-outline' | 'green-dark' | 'green-dark-outline' | 'beige-light' | 'beige-dark-outline' | 'yellow' | 'yellow-outline' | 'red' | 'red-outline';
|
|
115
|
+
skin?: 'primary' | 'secondary' | 'tertiary';
|
|
116
|
+
variant?: 'label-only' | 'icon-left' | 'icon-right' | 'icon-only' | 'icons-right-and-left';
|
|
117
|
+
state?: 'normal' | 'focus' | 'hover' | 'active';
|
|
118
|
+
type?: 'button' | 'submit' | 'reset';
|
|
119
|
+
isLoading?: boolean;
|
|
120
|
+
loadingAnimationPath?: string;
|
|
122
121
|
}
|
|
123
122
|
|
|
124
123
|
export declare interface IPktCard extends PktElType {
|
|
@@ -170,6 +169,7 @@ export declare interface IPktCheckbox extends InputHTMLAttributes<HTMLInputEleme
|
|
|
170
169
|
export declare interface IPktCombobox extends ExtendedCombobox {
|
|
171
170
|
helptext?: string | ReactNode | ReactNode[];
|
|
172
171
|
ref?: LegacyRef<HTMLSelectElement>;
|
|
172
|
+
onClick?: MouseEventHandler<HTMLSelectElement>;
|
|
173
173
|
onChange?: ChangeEventHandler<HTMLSelectElement>;
|
|
174
174
|
onInput?: ChangeEventHandler<HTMLSelectElement>;
|
|
175
175
|
onBlur?: FocusEventHandler<HTMLSelectElement>;
|
|
@@ -625,7 +625,7 @@ export declare const PktBackLink: default_2.ForwardRefExoticComponent<IPktBackLi
|
|
|
625
625
|
|
|
626
626
|
export declare const PktBreadcrumbs: default_2.ForwardRefExoticComponent<IPktBreadcrumbs & default_2.RefAttributes<HTMLAnchorElement>>;
|
|
627
627
|
|
|
628
|
-
export declare const PktButton:
|
|
628
|
+
export declare const PktButton: default_2.ForwardRefExoticComponent<IPktButton & default_2.RefAttributes<HTMLButtonElement>>;
|
|
629
629
|
|
|
630
630
|
export declare const PktCard: FC<IPktCard>;
|
|
631
631
|
|