@kystverket/styrbord 1.6.8 → 1.7.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/README.md CHANGED
@@ -41,6 +41,10 @@ Styrbords design tokens hentes fra [@Kystverket/styrbord-tokens](https://github.
41
41
 
42
42
  ## Endringslogg
43
43
 
44
+ ### 2026-05-19 -- v1.7.0
45
+
46
+ Etter mange problemer med implementasjon og styling av en DatePicker har vi gått til en native datepicker. Noen attributter på datepicker er ikke lenger nødvendige eller tilgjengelige.
47
+
44
48
  ### 2026-04-14 -- v1.5.0
45
49
 
46
50
  - Oppdatert Header til å støtte 'applikasjoner'. For å overstyre LinkComponent som brukes (for å slippe full reload i f.eks. NextJS) kan man wrapper Header med HeaderContext.
@@ -0,0 +1,8 @@
1
+ import { Meta } from '@storybook/react-vite';
2
+ declare const _default: Meta;
3
+ export default _default;
4
+ export declare const Preview: () => React.JSX.Element;
5
+ export declare const Multiple: () => React.JSX.Element;
6
+ export declare const Filter: () => React.JSX.Element;
7
+ export declare const ControlledMultiple: () => React.JSX.Element;
8
+ export declare const Creatable: () => React.JSX.Element;
@@ -1,20 +1,18 @@
1
+ import { InputSize } from '~/utils/input/input';
1
2
  export interface DateTimePickerProps {
3
+ className?: string;
2
4
  optional?: boolean | string | undefined;
3
5
  required?: boolean | string | undefined;
4
6
  label: string;
5
- dateTimeFormat?: string;
6
7
  description?: string;
7
8
  error?: string;
9
+ loading?: boolean;
8
10
  onBlur?: () => void;
9
11
  value: Date | undefined;
10
- timeInputLabel?: string;
11
- showMonthDropdown?: boolean;
12
- showYearDropdown?: boolean;
13
12
  onChange?: (date: Date | undefined) => void;
14
- showCalendarIcon?: boolean;
15
13
  minDate?: Date;
16
14
  maxDate?: Date;
15
+ size?: InputSize;
17
16
  disabled?: boolean;
18
- withPortal?: boolean;
19
17
  }
20
- export declare const DateTimePicker: ({ value, onChange, dateTimeFormat, timeInputLabel, showCalendarIcon, minDate, maxDate, withPortal, showMonthDropdown, showYearDropdown, ...props }: DateTimePickerProps) => React.JSX.Element;
18
+ export declare const DateTimePicker: ({ size, className, label, loading, required, optional, onChange, value, minDate, maxDate, ...props }: DateTimePickerProps) => React.JSX.Element;
@@ -4,23 +4,20 @@ declare const meta: {
4
4
  title: string;
5
5
  component: (props: DateTimePickerProps) => React.JSX.Element;
6
6
  decorators: (((Story: import("storybook/internal/csf").PartialStoryFn, context: import("storybook/internal/csf").StoryContext) => React.JSX.Element) | ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
7
+ className?: string | undefined;
7
8
  optional?: boolean | string | undefined | undefined;
8
9
  required?: boolean | string | undefined | undefined;
9
10
  label: string;
10
- dateTimeFormat?: string | undefined;
11
11
  description?: string | undefined;
12
12
  error?: string | undefined;
13
+ loading?: boolean | undefined;
13
14
  onBlur?: (() => void) | undefined;
14
15
  value: Date | undefined;
15
- timeInputLabel?: string | undefined;
16
- showMonthDropdown?: boolean | undefined;
17
- showYearDropdown?: boolean | undefined;
18
16
  onChange?: ((date: Date | undefined) => void) | undefined;
19
- showCalendarIcon?: boolean | undefined;
20
17
  minDate?: Date | undefined;
21
18
  maxDate?: Date | undefined;
19
+ size?: import("../../../main").InputSize | undefined;
22
20
  disabled?: boolean | undefined;
23
- withPortal?: boolean | undefined;
24
21
  }>) => React.JSX.Element))[];
25
22
  tags: string[];
26
23
  argTypes: {};
@@ -28,7 +25,6 @@ declare const meta: {
28
25
  export default meta;
29
26
  type Story = StoryObj<typeof meta>;
30
27
  export declare const Default: Story;
31
- export declare const WithoutCalendarIcon: Story;
32
28
  export declare const Optional: Story;
33
29
  export declare const OptionalText: Story;
34
30
  export declare const Required: Story;
@@ -38,5 +34,4 @@ export declare const WithError: Story;
38
34
  export declare const WithMinDate: Story;
39
35
  export declare const WithMaxDate: Story;
40
36
  export declare const WithMinAndMaxDate: Story;
41
- export declare const WithPortal: Story;
42
- export declare const WithYearAndMonthDropdown: Story;
37
+ export declare const Disabled: Story;
@@ -1,20 +1,18 @@
1
+ import { InputSize } from '~/main';
1
2
  export interface DatepickerProps {
3
+ className?: string;
4
+ loading?: boolean;
5
+ size?: InputSize;
2
6
  optional?: boolean | string | undefined;
3
7
  required?: boolean | string | undefined;
4
8
  label: string;
5
- dateFormat?: string;
6
9
  description?: string;
7
10
  error?: string;
8
11
  onBlur?: () => void;
9
12
  value: Date | undefined;
10
13
  onChange?: (date: Date | undefined) => void;
11
- showYearDropdown?: boolean;
12
- showMonthDropdown?: boolean;
13
- showCalendarIcon?: boolean;
14
14
  minDate?: Date;
15
15
  maxDate?: Date;
16
- popperPlacement?: 'top' | 'bottom' | 'left' | 'right';
17
- withPortal?: boolean;
18
16
  disabled?: boolean;
19
17
  }
20
- export declare const Datepicker: ({ value, onChange, dateFormat, showCalendarIcon, minDate, maxDate, popperPlacement, withPortal, showMonthDropdown, showYearDropdown, ...props }: DatepickerProps) => React.JSX.Element;
18
+ export declare const Datepicker: ({ size, className, label, loading, required, optional, onChange, value, minDate, maxDate, ...props }: DatepickerProps) => React.JSX.Element;
@@ -4,22 +4,19 @@ declare const meta: {
4
4
  title: string;
5
5
  component: (props: DatepickerProps) => React.JSX.Element;
6
6
  decorators: (((Story: import("storybook/internal/csf").PartialStoryFn, context: import("storybook/internal/csf").StoryContext) => React.JSX.Element) | ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
7
+ className?: string | undefined;
8
+ loading?: boolean | undefined;
9
+ size?: import("../../../main").InputSize | undefined;
7
10
  optional?: boolean | string | undefined | undefined;
8
11
  required?: boolean | string | undefined | undefined;
9
12
  label: string;
10
- dateFormat?: string | undefined;
11
13
  description?: string | undefined;
12
14
  error?: string | undefined;
13
15
  onBlur?: (() => void) | undefined;
14
16
  value: Date | undefined;
15
17
  onChange?: ((date: Date | undefined) => void) | undefined;
16
- showYearDropdown?: boolean | undefined;
17
- showMonthDropdown?: boolean | undefined;
18
- showCalendarIcon?: boolean | undefined;
19
18
  minDate?: Date | undefined;
20
19
  maxDate?: Date | undefined;
21
- popperPlacement?: "top" | "bottom" | "left" | "right" | undefined;
22
- withPortal?: boolean | undefined;
23
20
  disabled?: boolean | undefined;
24
21
  }>) => React.JSX.Element))[];
25
22
  tags: string[];
@@ -28,7 +25,6 @@ declare const meta: {
28
25
  export default meta;
29
26
  type Story = StoryObj<typeof meta>;
30
27
  export declare const Default: Story;
31
- export declare const WithoutCalendarIcon: Story;
32
28
  export declare const WithoutDescription: Story;
33
29
  export declare const WithValue: Story;
34
30
  export declare const Optional: Story;
@@ -38,6 +34,4 @@ export declare const WithError: Story;
38
34
  export declare const WithMinDate: Story;
39
35
  export declare const WithMaxDate: Story;
40
36
  export declare const WithMinAndMaxDate: Story;
41
- export declare const PopperPlacement: Story;
42
- export declare const InDialogNearEdge: Story;
43
- export declare const WithYearAndMonthDropdown: Story;
37
+ export declare const Disabled: Story;