@oslokommune/punkt-react 19.5.2 → 19.7.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 CHANGED
@@ -5,6 +5,31 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
5
5
 
6
6
  ---
7
7
 
8
+ ## [19.7.0](https://github.com/oslokommune/punkt/compare/19.6.0...19.7.0) (2026-10-02)
9
+
10
+ ---
11
+
12
+
13
+ ## [19.6.0](https://github.com/oslokommune/punkt/compare/19.5.2...19.6.0) (2026-10-01)
14
+
15
+ ### Features
16
+ * Kompakte størrelser for radio, checkbox og switch (#3687). - Checkbox, radio og switch får tre størrelser: medium, small, xsmall
17
+ - Om elementene er i input-wrapper arver de størrelsen til input-wrapper
18
+ - Selve input-elementet forandrer aldri størrelse, kun alt rundt
19
+ - Tile-varianter får høyde 56, 48 og 40 px
20
+ - Støtte for horisontal layout i input-wrapper
21
+ - I grupper skaleres også mellomrom med størrelsen
22
+ - Oppdatert docs med størrelse-seksjon
23
+ - Oppdatert alle relevante skills
24
+
25
+ Synlige _endringer_ (ikke nye ting) for brukere:
26
+ - Tile i størrelse medium er nå 56px istedenfor 60px
27
+ - Label i tile er nå fontvekt medium istedenfor light, for å stemme med Figma
28
+ - I input-wrapper har nå grupper med inputs noe romsligere mellomrom
29
+
30
+ ---
31
+
32
+
8
33
  ## [19.5.2](https://github.com/oslokommune/punkt/compare/19.5.1...19.5.2) (2026-09-30)
9
34
 
10
35
  ### Bug Fixes
@@ -1,43 +1,10 @@
1
1
  import { IPktStringsProps, TPktStringsOverride } from '../../shared-strings';
2
2
  import { ChangeEvent, ChangeEventHandler, FocusEvent, KeyboardEvent, MouseEvent as ReactMouseEvent, KeyboardEvent as ReactKeyboardEvent, ReactNode, RefObject } from 'react';
3
- import { IPktComboboxOption, TPktComboboxDisplayValue, TPktComboboxTagPlacement } from '../../shared-types/combobox';
4
- export interface IPktCombobox extends IPktStringsProps<'combobox' | 'listbox' | 'forms' | 'validation'> {
5
- value?: string | string[];
6
- defaultValue?: string | string[];
7
- options?: IPktComboboxOption[];
8
- defaultOptions?: IPktComboboxOption[];
9
- multiple?: boolean;
10
- maxlength?: number;
11
- typeahead?: boolean;
12
- includeSearch?: boolean;
13
- allowUserInput?: boolean;
14
- displayValueAs?: TPktComboboxDisplayValue;
15
- tagPlacement?: TPktComboboxTagPlacement;
16
- searchPlaceholder?: string;
17
- name?: string;
18
- form?: string;
19
- ariaDescribedby?: string;
20
- id?: string;
21
- disabled?: boolean;
22
- required?: boolean;
23
- placeholder?: string;
24
- label?: string;
3
+ import { IPktComboboxBase, IPktComboboxOption, TPktComboboxDisplayValue, TPktComboboxTagPlacement } from '../../shared-types/combobox';
4
+ export interface IPktCombobox extends Omit<IPktComboboxBase, 'helptext' | 'helptextDropdown' | 'errorMessage'>, IPktStringsProps<'combobox' | 'listbox' | 'forms' | 'validation'> {
25
5
  helptext?: string | ReactNode;
26
6
  helptextDropdown?: string | ReactNode;
27
- helptextDropdownButton?: string;
28
- hasError?: boolean;
29
7
  errorMessage?: string | ReactNode;
30
- fullwidth?: boolean;
31
- requiredTag?: boolean;
32
- requiredText?: string;
33
- optionalTag?: boolean;
34
- optionalText?: string;
35
- tagText?: string;
36
- useWrapper?: boolean;
37
- inline?: boolean;
38
- counter?: boolean;
39
- hasFieldset?: boolean;
40
- inputSize?: 'small' | 'medium' | 'xsmall';
41
8
  onChange?: ChangeEventHandler<HTMLInputElement>;
42
9
  onValueChange?: (values: string[]) => void;
43
10
  className?: string;
@@ -85,7 +52,7 @@ export interface IComboboxState {
85
52
  optionalText?: string;
86
53
  requiredTag: boolean;
87
54
  requiredText?: string;
88
- tagText?: string;
55
+ tagText?: string | null;
89
56
  useWrapper: boolean;
90
57
  inline: boolean;
91
58
  inputSize: 'small' | 'medium' | 'xsmall';
@@ -1,5 +1,6 @@
1
1
  import { ReactNode, RefAttributes } from 'react';
2
2
  import { IPktStringsProps } from '../../shared-strings';
3
+ import { TLayout } from '../../shared-types';
3
4
  export interface IPktInputWrapper extends RefAttributes<HTMLElement>, IPktStringsProps<'forms' | 'validation'> {
4
5
  forId: string;
5
6
  label: string;
@@ -26,6 +27,7 @@ export interface IPktInputWrapper extends RefAttributes<HTMLElement>, IPktString
26
27
  children?: ReactNode;
27
28
  className?: string;
28
29
  hasFieldset?: boolean;
30
+ layout?: TLayout;
29
31
  role?: string;
30
32
  counterPosition?: 'top' | 'bottom';
31
33
  size?: 'small' | 'medium' | 'xsmall';
@@ -1,10 +1,12 @@
1
1
  import { ChangeEventHandler, InputHTMLAttributes, ReactNode } from 'react';
2
2
  import { IPktStringsProps } from '../../shared-strings';
3
+ import { TPktInputSize } from '../../shared-types';
3
4
  export interface IPktRadioButton extends InputHTMLAttributes<HTMLInputElement>, IPktStringsProps<'forms'> {
4
5
  id: string;
5
6
  name: string;
6
7
  label: string;
7
8
  hasTile?: boolean;
9
+ inputSize?: TPktInputSize;
8
10
  disabled?: boolean;
9
11
  checkHelptext?: ReactNode | ReactNode[] | string;
10
12
  defaultChecked?: boolean;
@@ -1,11 +1,10 @@
1
1
  import { KeyboardEvent } from 'react';
2
2
  import { IPktTimepicker } from './types';
3
- import { TPktInputSize } from '../../shared-types/size';
4
3
  export declare function useTimepickerState(props: IPktTimepicker, ref: React.ForwardedRef<HTMLDivElement>): {
5
4
  id: string;
6
5
  containerRef: import('react').RefObject<HTMLDivElement | null>;
7
6
  outerClasses: string;
8
- inputSize: TPktInputSize;
7
+ inputSize: "medium" | "small" | "xsmall";
9
8
  strings: {
10
9
  hours: string;
11
10
  minutes: string;