@kystverket/styrbord 1.3.33 → 1.3.35

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.
@@ -8,9 +8,11 @@ export interface DateTimePickerProps {
8
8
  onBlur?: () => void;
9
9
  value: Date | undefined;
10
10
  timeInputLabel?: string;
11
+ showMonthDropdown?: boolean;
12
+ showYearDropdown?: boolean;
11
13
  onChange?: (date: Date | undefined) => void;
12
14
  showCalendarIcon?: boolean;
13
15
  minDate?: Date;
14
16
  maxDate?: Date;
15
17
  }
16
- export declare const DateTimePicker: ({ value, onChange, dateTimeFormat, timeInputLabel, showCalendarIcon, minDate, maxDate, ...props }: DateTimePickerProps) => React.JSX.Element;
18
+ export declare const DateTimePicker: ({ value, onChange, dateTimeFormat, timeInputLabel, showCalendarIcon, minDate, maxDate, showMonthDropdown, showYearDropdown, ...props }: DateTimePickerProps) => React.JSX.Element;
@@ -13,6 +13,8 @@ declare const meta: {
13
13
  onBlur?: (() => void) | undefined;
14
14
  value: Date | undefined;
15
15
  timeInputLabel?: string | undefined;
16
+ showMonthDropdown?: boolean | undefined;
17
+ showYearDropdown?: boolean | undefined;
16
18
  onChange?: ((date: Date | undefined) => void) | undefined;
17
19
  showCalendarIcon?: boolean | undefined;
18
20
  minDate?: Date | undefined;
@@ -34,3 +36,4 @@ export declare const WithError: Story;
34
36
  export declare const WithMinDate: Story;
35
37
  export declare const WithMaxDate: Story;
36
38
  export declare const WithMinAndMaxDate: Story;
39
+ export declare const WithYearAndMonthDropdown: Story;
@@ -8,10 +8,12 @@ export interface DatepickerProps {
8
8
  onBlur?: () => void;
9
9
  value: Date | undefined;
10
10
  onChange?: (date: Date | undefined) => void;
11
+ showYearDropdown?: boolean;
12
+ showMonthDropdown?: boolean;
11
13
  showCalendarIcon?: boolean;
12
14
  minDate?: Date;
13
15
  maxDate?: Date;
14
16
  popperPlacement?: 'top' | 'bottom' | 'left' | 'right';
15
17
  withPortal?: boolean;
16
18
  }
17
- export declare const Datepicker: ({ value, onChange, dateFormat, showCalendarIcon, minDate, maxDate, popperPlacement, withPortal, ...props }: DatepickerProps) => React.JSX.Element;
19
+ export declare const Datepicker: ({ value, onChange, dateFormat, showCalendarIcon, minDate, maxDate, popperPlacement, withPortal, showMonthDropdown, showYearDropdown, ...props }: DatepickerProps) => React.JSX.Element;
@@ -13,6 +13,8 @@ declare const meta: {
13
13
  onBlur?: (() => void) | undefined;
14
14
  value: Date | undefined;
15
15
  onChange?: ((date: Date | undefined) => void) | undefined;
16
+ showYearDropdown?: boolean | undefined;
17
+ showMonthDropdown?: boolean | undefined;
16
18
  showCalendarIcon?: boolean | undefined;
17
19
  minDate?: Date | undefined;
18
20
  maxDate?: Date | undefined;
@@ -37,3 +39,4 @@ export declare const WithMaxDate: Story;
37
39
  export declare const WithMinAndMaxDate: Story;
38
40
  export declare const PopperPlacement: Story;
39
41
  export declare const InDialogNearEdge: Story;
42
+ export declare const WithYearAndMonthDropdown: Story;
@@ -61,6 +61,7 @@ export type { LinkProps } from './components/designsystemet/Link/Link';
61
61
  export { default as Table } from './components/designsystemet/Table/Table';
62
62
  export { Avatar } from './components/designsystemet/Avatar/Avatar';
63
63
  export type { AvatarProps } from './components/designsystemet/Avatar/Avatar';
64
+ export { IdProvider, useIdProvider } from './utils/idContext';
64
65
  export { EXPERIMENTAL_Suggestion as Suggestion } from '@digdir/designsystemet-react';
65
66
  export { RovingFocusItem, RovingFocusRoot, omit, useCheckboxGroup, useDebounceCallback, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useRadioGroup, useSynchronizedAnimation, } from '@digdir/designsystemet-react';
66
67
  export type { Size, UseRadioGroupProps, UseCheckboxGroupProps, UsePaginationProps, MergeRight, LabelRequired, } from '@digdir/designsystemet-react';
@@ -0,0 +1,7 @@
1
+ export declare function IdProvider({ id, children }: {
2
+ id: string;
3
+ children: React.ReactNode;
4
+ }): React.JSX.Element;
5
+ export declare const useIdProvider: () => {
6
+ getId: (...segments: unknown[]) => string;
7
+ };