@oslokommune/punkt-react 12.28.0 → 12.29.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 CHANGED
@@ -5,6 +5,24 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
5
5
 
6
6
  ---
7
7
 
8
+ ## [12.29.0](https://github.com/oslokommune/punkt/compare/12.28.0...12.29.0) (2025-03-18)
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+ Ingen
12
+
13
+ ### Features
14
+ * Migrere button (#2312).
15
+
16
+
17
+ ### Bug Fixes
18
+ Ingen
19
+
20
+ ### Chores
21
+ Ingen
22
+
23
+ ---
24
+
25
+
8
26
  ## [12.28.0](https://github.com/oslokommune/punkt/compare/12.27.10...12.28.0) (2025-03-13)
9
27
 
10
28
  ### ⚠ BREAKING CHANGES
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
 
3
+ import { ButtonHTMLAttributes } from 'react';
3
4
  import { ChangeEventHandler } from 'react';
4
5
  import { default as default_2 } from 'react';
5
6
  import { FC } from 'react';
@@ -9,9 +10,12 @@ import { ForwardRefExoticComponent } from 'react';
9
10
  import { HTMLAttributes } from 'react';
10
11
  import { HTMLProps } from 'react';
11
12
  import { InputHTMLAttributes } from 'react';
13
+ import { IPktButton as IPktButton_2 } from '@oslokommune/punkt-elements';
12
14
  import { IPktProgressbar as IPktProgressbar_2 } from '@oslokommune/punkt-elements';
13
15
  import { JSX as JSX_2 } from 'react/jsx-runtime';
16
+ import { KeyboardEventHandler } from 'react';
14
17
  import { LegacyRef } from 'react';
18
+ import { MouseEventHandler } from 'react';
15
19
  import { PktInputWrapper as PktInputWrapper_2 } from '@oslokommune/punkt-elements';
16
20
  import * as React_2 from 'react';
17
21
  import { ReactElement } from 'react';
@@ -29,6 +33,8 @@ declare interface Column {
29
33
  text?: string;
30
34
  }
31
35
 
36
+ declare type ExtendedButton = IPktButton_2 & ButtonHTMLAttributes<HTMLButtonElement>;
37
+
32
38
  declare type ExtendedProgressbar = IPktProgressbar_2 & PktElType;
33
39
 
34
40
  declare interface IBreadcrumbs {
@@ -97,18 +103,14 @@ export declare interface IPktBreadcrumbs extends default_2.AnchorHTMLAttributes<
97
103
  navigationType?: 'router' | 'anchor';
98
104
  }
99
105
 
100
- export declare interface IPktButton extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
101
- iconName?: string;
102
- secondIconName?: string;
103
- mode?: 'light' | 'dark';
104
- size?: 'small' | 'medium' | 'large';
105
- color?: 'blue' | 'blue-outline' | 'green' | 'green-outline' | 'green-dark' | 'green-dark-outline' | 'beige-light' | 'beige-dark-outline' | 'yellow' | 'yellow-outline' | 'red' | 'red-outline';
106
- skin?: 'primary' | 'secondary' | 'tertiary';
107
- variant?: 'label-only' | 'icon-left' | 'icon-right' | 'icon-only' | 'icons-right-and-left';
108
- state?: 'normal' | 'focus' | 'hover' | 'active';
109
- type?: 'button' | 'submit' | 'reset';
110
- isLoading?: boolean;
111
- onClick?: (event: default_2.MouseEvent<HTMLButtonElement>) => void;
106
+ export declare interface IPktButton extends ExtendedButton {
107
+ ref?: LegacyRef<HTMLButtonElement>;
108
+ onClick?: MouseEventHandler<HTMLButtonElement>;
109
+ onChange?: ChangeEventHandler<HTMLButtonElement>;
110
+ onBlur?: FocusEventHandler<HTMLButtonElement>;
111
+ onFocus?: FocusEventHandler<HTMLButtonElement>;
112
+ onKeydown?: KeyboardEventHandler<HTMLButtonElement>;
113
+ onKeyup?: KeyboardEventHandler<HTMLButtonElement>;
112
114
  }
113
115
 
114
116
  declare interface IPktCard extends PktElType {
@@ -601,7 +603,7 @@ export declare const PktBackLink: default_2.ForwardRefExoticComponent<IPktBackLi
601
603
 
602
604
  export declare const PktBreadcrumbs: default_2.ForwardRefExoticComponent<IPktBreadcrumbs & default_2.RefAttributes<HTMLAnchorElement>>;
603
605
 
604
- export declare const PktButton: default_2.ForwardRefExoticComponent<IPktButton & default_2.RefAttributes<HTMLButtonElement>>;
606
+ export declare const PktButton: FC<IPktButton>;
605
607
 
606
608
  export declare const PktCard: FC<IPktCard>;
607
609