@norges-domstoler/dds-components 9.4.0 → 9.5.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/dist/assets/svg/openExternal.svg.js +4 -0
- package/dist/cjs/components/Grid/Grid.d.ts +1 -5
- package/dist/cjs/components/Grid/Grid.utils.d.ts +4 -0
- package/dist/cjs/components/Grid/GridChild.d.ts +2 -7
- package/dist/cjs/components/InlineEdit/InlineEdit.stories.d.ts +1 -1
- package/dist/cjs/components/InlineEdit/InlineEdit.styles.d.ts +11 -1
- package/dist/cjs/components/InlineEdit/InlineEdit.tokens.d.ts +3 -1
- package/dist/cjs/components/InlineEdit/InlineEdit.types.d.ts +3 -1
- package/dist/cjs/components/InlineEdit/InlineEditInput.d.ts +1 -1
- package/dist/cjs/components/InlineEdit/InlineEditInput.stories.d.ts +1 -1
- package/dist/cjs/components/InlineEdit/InlineEditTextArea.d.ts +1 -1
- package/dist/cjs/components/InlineEdit/InlineEditTextArea.stories.d.ts +1 -1
- package/dist/cjs/components/Search/AutocompleteSearch.context.d.ts +12 -0
- package/dist/cjs/components/Search/Search.stories.d.ts +15 -2
- package/dist/cjs/components/Search/Search.tokens.d.ts +8 -0
- package/dist/cjs/components/Search/SearchAutocompleteWrapper.d.ts +31 -0
- package/dist/cjs/components/Search/SearchSuggestions.d.ts +29 -0
- package/dist/cjs/components/Search/index.d.ts +10 -1
- package/dist/cjs/components/Select/Select.d.ts +0 -3
- package/dist/cjs/components/Select/Select.tokens.d.ts +2 -9
- package/dist/cjs/components/Typography/Typography.tokens.d.ts +4 -1
- package/dist/cjs/icons/tsx/barChart.d.ts +2 -0
- package/dist/cjs/icons/tsx/barChartBoxed.d.ts +2 -0
- package/dist/cjs/icons/tsx/index.d.ts +6 -0
- package/dist/cjs/icons/tsx/libraryAdd.d.ts +2 -0
- package/dist/cjs/icons/tsx/lineChart.d.ts +2 -0
- package/dist/cjs/icons/tsx/trendingDown.d.ts +2 -0
- package/dist/cjs/icons/tsx/trendingUp.d.ts +2 -0
- package/dist/cjs/icons/utils/StyledSvg.d.ts +4 -1
- package/dist/cjs/icons/utils/SvgWrapper.d.ts +2 -0
- package/dist/cjs/index.js +3345 -4423
- package/dist/cjs/utils/index.d.ts +1 -0
- package/dist/cjs/utils/searchFilter.d.ts +2 -0
- package/dist/components/GlobalMessage/GlobalMessage.tokens.js +1 -1
- package/dist/components/Grid/Grid.d.ts +1 -5
- package/dist/components/Grid/Grid.utils.d.ts +4 -0
- package/dist/components/Grid/GridChild.d.ts +2 -7
- package/dist/components/Icon/Icon.js +0 -1
- package/dist/components/InlineEdit/InlineEdit.stories.d.ts +1 -1
- package/dist/components/InlineEdit/InlineEdit.styles.d.ts +11 -1
- package/dist/components/InlineEdit/InlineEdit.styles.js +27 -6
- package/dist/components/InlineEdit/InlineEdit.tokens.d.ts +3 -1
- package/dist/components/InlineEdit/InlineEdit.tokens.js +3 -1
- package/dist/components/InlineEdit/InlineEdit.types.d.ts +3 -1
- package/dist/components/InlineEdit/InlineEditInput.d.ts +1 -1
- package/dist/components/InlineEdit/InlineEditInput.stories.d.ts +1 -1
- package/dist/components/InlineEdit/InlineEditTextArea.d.ts +1 -1
- package/dist/components/InlineEdit/InlineEditTextArea.stories.d.ts +1 -1
- package/dist/components/InlineEdit/InlineInput.js +19 -15
- package/dist/components/InlineEdit/InlineTextArea.js +19 -18
- package/dist/components/LocalMessage/LocalMessage.tokens.js +1 -1
- package/dist/components/Search/AutocompleteSearch.context.d.ts +12 -0
- package/dist/components/Search/AutocompleteSearch.context.js +8 -0
- package/dist/components/Search/Search.js +46 -7
- package/dist/components/Search/Search.stories.d.ts +15 -2
- package/dist/components/Search/Search.tokens.d.ts +8 -0
- package/dist/components/Search/Search.tokens.js +13 -2
- package/dist/components/Search/SearchAutocompleteWrapper.d.ts +31 -0
- package/dist/components/Search/SearchAutocompleteWrapper.js +113 -0
- package/dist/components/Search/SearchSuggestions.d.ts +29 -0
- package/dist/components/Search/SearchSuggestions.js +116 -0
- package/dist/components/Search/index.d.ts +10 -1
- package/dist/components/Search/index.js +9 -0
- package/dist/components/Select/Select.d.ts +0 -3
- package/dist/components/Select/Select.js +4 -10
- package/dist/components/Select/Select.styles.js +3 -3
- package/dist/components/Select/Select.tokens.d.ts +2 -9
- package/dist/components/Select/Select.tokens.js +2 -9
- package/dist/components/Typography/Link/Link.js +3 -9
- package/dist/components/Typography/Typography/Typography.js +3 -12
- package/dist/components/Typography/Typography.tokens.d.ts +4 -1
- package/dist/components/Typography/Typography.tokens.js +5 -2
- package/dist/components/Typography/Typography.utils.js +2 -1
- package/dist/hooks/useRoveFocus.js +10 -10
- package/dist/icons/tsx/apps.js +5 -17
- package/dist/icons/tsx/archive.js +3 -15
- package/dist/icons/tsx/arrowDown.js +5 -17
- package/dist/icons/tsx/arrowLeft.js +5 -17
- package/dist/icons/tsx/arrowRight.js +5 -17
- package/dist/icons/tsx/arrowUp.js +5 -17
- package/dist/icons/tsx/attachment.js +5 -17
- package/dist/icons/tsx/barChart.d.ts +2 -0
- package/dist/icons/tsx/barChart.js +12 -0
- package/dist/icons/tsx/barChartBoxed.d.ts +2 -0
- package/dist/icons/tsx/barChartBoxed.js +12 -0
- package/dist/icons/tsx/block.js +5 -17
- package/dist/icons/tsx/book.js +3 -15
- package/dist/icons/tsx/build.js +5 -17
- package/dist/icons/tsx/buildCircled.js +3 -15
- package/dist/icons/tsx/calendar.js +5 -17
- package/dist/icons/tsx/calendarMonth.js +5 -17
- package/dist/icons/tsx/calendarViewDay.js +5 -17
- package/dist/icons/tsx/calendarViewMonth.js +5 -17
- package/dist/icons/tsx/calendarViewWeek.js +5 -17
- package/dist/icons/tsx/call.js +5 -17
- package/dist/icons/tsx/chat.js +5 -17
- package/dist/icons/tsx/check.js +5 -17
- package/dist/icons/tsx/checkCircled.js +5 -17
- package/dist/icons/tsx/checklist.js +5 -17
- package/dist/icons/tsx/chevronDown.js +5 -17
- package/dist/icons/tsx/chevronFirst.js +5 -17
- package/dist/icons/tsx/chevronLargeLeft.js +5 -17
- package/dist/icons/tsx/chevronLargeRight.js +5 -17
- package/dist/icons/tsx/chevronLast.js +5 -17
- package/dist/icons/tsx/chevronLeft.js +5 -17
- package/dist/icons/tsx/chevronRight.js +5 -17
- package/dist/icons/tsx/chevronUp.js +5 -17
- package/dist/icons/tsx/close.js +5 -17
- package/dist/icons/tsx/closeCircled.js +5 -17
- package/dist/icons/tsx/closeSmall.js +5 -17
- package/dist/icons/tsx/cloud.js +5 -17
- package/dist/icons/tsx/collapse.js +5 -17
- package/dist/icons/tsx/comment.js +5 -17
- package/dist/icons/tsx/copy.js +5 -17
- package/dist/icons/tsx/court.js +5 -17
- package/dist/icons/tsx/dateRange.js +5 -17
- package/dist/icons/tsx/deaths.js +5 -17
- package/dist/icons/tsx/download.js +5 -17
- package/dist/icons/tsx/downloadDone.js +5 -17
- package/dist/icons/tsx/dragHandle.js +5 -17
- package/dist/icons/tsx/edit.js +5 -17
- package/dist/icons/tsx/error.js +5 -17
- package/dist/icons/tsx/exclaim.js +5 -17
- package/dist/icons/tsx/expand.js +5 -17
- package/dist/icons/tsx/facebook.js +5 -17
- package/dist/icons/tsx/family.js +5 -17
- package/dist/icons/tsx/feedback.js +5 -17
- package/dist/icons/tsx/file.js +5 -17
- package/dist/icons/tsx/fileAdd.js +5 -17
- package/dist/icons/tsx/fileText.js +5 -17
- package/dist/icons/tsx/filter.js +5 -17
- package/dist/icons/tsx/filterList.js +5 -17
- package/dist/icons/tsx/filterListOff.js +5 -17
- package/dist/icons/tsx/filterOff.js +5 -17
- package/dist/icons/tsx/findInPage.js +5 -17
- package/dist/icons/tsx/folder.js +5 -17
- package/dist/icons/tsx/folderAdd.js +5 -17
- package/dist/icons/tsx/fullsceenExit.js +5 -17
- package/dist/icons/tsx/fullscreen.js +5 -17
- package/dist/icons/tsx/gavel.js +3 -15
- package/dist/icons/tsx/help.js +5 -17
- package/dist/icons/tsx/helpFilled.js +5 -17
- package/dist/icons/tsx/home.js +5 -17
- package/dist/icons/tsx/image.js +5 -17
- package/dist/icons/tsx/index.d.ts +6 -0
- package/dist/icons/tsx/info.js +5 -17
- package/dist/icons/tsx/instagram.js +5 -17
- package/dist/icons/tsx/jordskifterett.js +2 -2
- package/dist/icons/tsx/key.js +5 -17
- package/dist/icons/tsx/lagmannsrett.js +5 -17
- package/dist/icons/tsx/language.js +5 -15
- package/dist/icons/tsx/libraryAdd.d.ts +2 -0
- package/dist/icons/tsx/libraryAdd.js +12 -0
- package/dist/icons/tsx/lineChart.d.ts +2 -0
- package/dist/icons/tsx/lineChart.js +12 -0
- package/dist/icons/tsx/link.js +5 -17
- package/dist/icons/tsx/linkOff.js +5 -17
- package/dist/icons/tsx/linkedIn.js +5 -17
- package/dist/icons/tsx/list.js +5 -17
- package/dist/icons/tsx/listAlt.js +5 -17
- package/dist/icons/tsx/location.js +5 -17
- package/dist/icons/tsx/lock.js +5 -17
- package/dist/icons/tsx/lockOpen.js +5 -17
- package/dist/icons/tsx/login.js +5 -17
- package/dist/icons/tsx/logout.js +5 -17
- package/dist/icons/tsx/mail.js +5 -17
- package/dist/icons/tsx/mailOpen.js +5 -17
- package/dist/icons/tsx/menu.js +5 -17
- package/dist/icons/tsx/minus.js +5 -17
- package/dist/icons/tsx/minusCircled.js +5 -17
- package/dist/icons/tsx/moreHorizontal.js +5 -17
- package/dist/icons/tsx/moreVertical.js +5 -17
- package/dist/icons/tsx/notarial.js +5 -17
- package/dist/icons/tsx/notifications.js +5 -17
- package/dist/icons/tsx/notificationsOff.js +5 -17
- package/dist/icons/tsx/onlineMeeting.js +5 -17
- package/dist/icons/tsx/openExternal.js +5 -17
- package/dist/icons/tsx/pdf.js +5 -17
- package/dist/icons/tsx/person.js +5 -17
- package/dist/icons/tsx/personAdd.js +5 -17
- package/dist/icons/tsx/pin.js +5 -17
- package/dist/icons/tsx/plus.js +5 -17
- package/dist/icons/tsx/plusCircled.js +5 -17
- package/dist/icons/tsx/print.js +3 -15
- package/dist/icons/tsx/property.js +3 -15
- package/dist/icons/tsx/publish.js +5 -17
- package/dist/icons/tsx/questionAnswer.js +5 -17
- package/dist/icons/tsx/receipt.js +5 -17
- package/dist/icons/tsx/redo.js +5 -17
- package/dist/icons/tsx/refresh.js +5 -17
- package/dist/icons/tsx/replay.js +5 -17
- package/dist/icons/tsx/search.js +5 -17
- package/dist/icons/tsx/settings.js +5 -17
- package/dist/icons/tsx/sms.js +5 -17
- package/dist/icons/tsx/star.js +5 -17
- package/dist/icons/tsx/starFilled.js +5 -17
- package/dist/icons/tsx/sync.js +5 -17
- package/dist/icons/tsx/time.js +5 -17
- package/dist/icons/tsx/tingrett.js +5 -17
- package/dist/icons/tsx/tip.js +5 -17
- package/dist/icons/tsx/trash.js +5 -17
- package/dist/icons/tsx/trendingDown.d.ts +2 -0
- package/dist/icons/tsx/trendingDown.js +12 -0
- package/dist/icons/tsx/trendingUp.d.ts +2 -0
- package/dist/icons/tsx/trendingUp.js +12 -0
- package/dist/icons/tsx/twitter.js +5 -17
- package/dist/icons/tsx/undo.js +5 -17
- package/dist/icons/tsx/unfoldLess.js +5 -17
- package/dist/icons/tsx/unfoldMore.js +5 -17
- package/dist/icons/tsx/upload.js +5 -17
- package/dist/icons/tsx/visibilityOff.js +5 -17
- package/dist/icons/tsx/visibilityOn.js +5 -17
- package/dist/icons/tsx/warning.js +3 -15
- package/dist/icons/tsx/zoomIn.js +5 -17
- package/dist/icons/tsx/zoomOut.js +5 -17
- package/dist/icons/utils/StyledSvg.d.ts +4 -1
- package/dist/icons/utils/StyledSvg.js +14 -1
- package/dist/icons/utils/SvgWrapper.d.ts +2 -0
- package/dist/icons/utils/SvgWrapper.js +16 -0
- package/dist/index.js +8 -2
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/searchFilter.d.ts +2 -0
- package/dist/utils/searchFilter.js +10 -0
- package/package.json +2 -2
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var img = "data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M19 19H5V5H12V3H5C4.46957 3 3.96086 3.21071 3.58579 3.58579C3.21071 3.96086 3 4.46957 3 5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H19C20.1 21 21 20.1 21 19V12H19V19ZM14 3V5H17.59L7.76 14.83L9.17 16.24L19 6.41V10H21V3H14Z' fill='%230B0D0E'/%3e%3c/svg%3e";
|
|
2
|
+
var OpenExternalIcon = img;
|
|
3
|
+
|
|
4
|
+
export { OpenExternalIcon as default };
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
2
|
-
import {
|
|
3
|
-
import { ScreenSizeLiteral } from './Grid.utils';
|
|
2
|
+
import { BreakpointBasedProps } from './Grid.utils';
|
|
4
3
|
import { HTMLAttributes } from 'react';
|
|
5
|
-
declare type BreakpointBasedProps<T extends keyof StandardProperties> = {
|
|
6
|
-
[k in ScreenSizeLiteral]?: StandardProperties[T];
|
|
7
|
-
};
|
|
8
4
|
declare type RowGapGrid = BreakpointBasedProps<'rowGap'>;
|
|
9
5
|
declare type MaxWidthGrid = BreakpointBasedProps<'maxWidth'>;
|
|
10
6
|
declare type BaseGridProps = {
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { ScreenSize } from '../../hooks';
|
|
2
|
+
import { StandardProperties } from 'csstype';
|
|
2
3
|
export declare type ScreenSizeLiteral = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
4
|
export declare const getLiteralScreenSize: (screenSize: ScreenSize) => ScreenSizeLiteral;
|
|
5
|
+
export declare type BreakpointBasedProps<T extends keyof StandardProperties> = {
|
|
6
|
+
[k in ScreenSizeLiteral]?: StandardProperties[T];
|
|
7
|
+
};
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
2
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
3
|
+
import { BreakpointBasedProps } from './Grid.utils';
|
|
3
4
|
import { HTMLAttributes } from 'react';
|
|
4
5
|
export declare const isRelativeGridColumn: (type: ColumnsOccupied | undefined) => type is RelativeColumnsOccupied;
|
|
5
6
|
export declare const isGridColumn: (type: ColumnsOccupied | undefined) => type is GridColumnPerScreenSize;
|
|
6
7
|
declare type RelativeColumnsOccupied = 'all' | 'firstHalf' | 'secondHalf';
|
|
7
|
-
declare type GridColumnPerScreenSize =
|
|
8
|
-
xs: Property.GridColumn;
|
|
9
|
-
sm: Property.GridColumn;
|
|
10
|
-
md: Property.GridColumn;
|
|
11
|
-
lg: Property.GridColumn;
|
|
12
|
-
xl: Property.GridColumn;
|
|
13
|
-
};
|
|
8
|
+
declare type GridColumnPerScreenSize = BreakpointBasedProps<'gridColumn'>;
|
|
14
9
|
export declare type ColumnsOccupied = RelativeColumnsOccupied | GridColumnPerScreenSize;
|
|
15
10
|
export declare type GridChildProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
16
11
|
/**hvilke kolonner innholdet skal okkupere. Tar inn enten en string med relativ definisjon eller et objekt med egentilpassede `grid-column` CSS verdi definert for hver brekkepunkt. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
title: string;
|
|
3
|
-
component: import("react").ForwardRefExoticComponent<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "onFocus" | "onBlur" | "onChange" | "width"> & Pick<import("./InlineEdit.types").InlineEditProps, "onFocus" | "onBlur" | "onChange" | "onSetValue" | "emptiable"> & Pick<import("./InlineEdit.types").BaseInlineInputProps, "width" | "error" | "errorMessage"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
3
|
+
component: import("react").ForwardRefExoticComponent<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "onFocus" | "onBlur" | "onChange" | "width"> & Pick<import("./InlineEdit.types").InlineEditProps, "onFocus" | "onBlur" | "onChange" | "onSetValue" | "emptiable"> & Pick<import("./InlineEdit.types").BaseInlineInputProps, "width" | "error" | "errorMessage" | "hideIcon"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
4
4
|
argTypes: {
|
|
5
5
|
emptiable: {
|
|
6
6
|
control: {
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
2
|
export declare const defaultWidth: Property.Width;
|
|
3
|
-
|
|
3
|
+
declare type StyledInlineInputProps = {
|
|
4
|
+
isEditing?: boolean;
|
|
5
|
+
hideIcon?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const StyledInlineInput: import("styled-components").StyledComponent<"input", any, Pick<import("../../helpers").InputProps, "disabled" | "readOnly"> & {
|
|
8
|
+
hasErrorMessage: boolean;
|
|
9
|
+
} & Pick<import("../../helpers").InputProps, "componentSize"> & StyledInlineInputProps, never>;
|
|
10
|
+
export declare const StyledInlineTextArea: import("styled-components").StyledComponent<"input", any, Pick<import("../../helpers").InputProps, "disabled" | "readOnly"> & {
|
|
11
|
+
hasErrorMessage: boolean;
|
|
12
|
+
} & Pick<import("../../helpers").InputProps, "componentSize"> & StyledInlineInputProps, never>;
|
|
4
13
|
export declare const IconWrapper: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
14
|
+
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export declare const inlineEditTokens: {
|
|
2
2
|
inlineEdit: {
|
|
3
3
|
padding: string;
|
|
4
|
-
paddingLeft: string;
|
|
5
4
|
font: {
|
|
6
5
|
lineHeight: any;
|
|
7
6
|
fontSize: string;
|
|
@@ -11,6 +10,9 @@ export declare const inlineEditTokens: {
|
|
|
11
10
|
fontStyle: any;
|
|
12
11
|
};
|
|
13
12
|
backgroundColor: string;
|
|
13
|
+
withIcon: {
|
|
14
|
+
paddingLeft: string;
|
|
15
|
+
};
|
|
14
16
|
hover: {
|
|
15
17
|
backgroundColor: string;
|
|
16
18
|
};
|
|
@@ -7,6 +7,8 @@ export declare type BaseInlineInputProps = {
|
|
|
7
7
|
errorMessage?: string;
|
|
8
8
|
/** Bredde på komponenten. */
|
|
9
9
|
width?: Property.Width;
|
|
10
|
+
/**Om redigeringsikonet skal vises. */
|
|
11
|
+
hideIcon?: boolean;
|
|
10
12
|
/** **OBS!** settes automatisk av forelder. Spesifiserer om brukeren kan tømme inputfeltet. */
|
|
11
13
|
emptiable?: boolean;
|
|
12
14
|
/** **OBS!** settes automatisk av forelder. Spesifiserer om komponenten er i redigeringsmodus. */
|
|
@@ -28,6 +30,6 @@ export declare type InlineEditProps = {
|
|
|
28
30
|
/**Ekstra callback ved `onBlur`-event. */
|
|
29
31
|
onBlur?: () => void;
|
|
30
32
|
} & Pick<InputHTMLAttributes<HTMLInputElement>, 'value'>;
|
|
31
|
-
export declare type CommonInlineEditWrapperProps = Pick<InlineEditProps, 'onSetValue' | 'emptiable' | 'onBlur' | 'onFocus' | 'onChange'> & Pick<BaseInlineInputProps, 'error' | 'errorMessage' | 'width'>;
|
|
33
|
+
export declare type CommonInlineEditWrapperProps = Pick<InlineEditProps, 'onSetValue' | 'emptiable' | 'onBlur' | 'onFocus' | 'onChange'> & Pick<BaseInlineInputProps, 'error' | 'errorMessage' | 'width' | 'hideIcon'>;
|
|
32
34
|
export declare type InlineEditTextAreaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange' | 'onFocus' | 'onBlur'> & CommonInlineEditWrapperProps;
|
|
33
35
|
export declare type InlineEditInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'width' | 'onChange' | 'onFocus' | 'onBlur'> & CommonInlineEditWrapperProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const InlineEditInput: import("react").ForwardRefExoticComponent<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "width" | "onChange" | "onFocus" | "onBlur"> & Pick<import("./InlineEdit.types").InlineEditProps, "onChange" | "onFocus" | "onBlur" | "onSetValue" | "emptiable"> & Pick<import("./InlineEdit.types").BaseInlineInputProps, "width" | "error" | "errorMessage"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
1
|
+
export declare const InlineEditInput: import("react").ForwardRefExoticComponent<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "width" | "onChange" | "onFocus" | "onBlur"> & Pick<import("./InlineEdit.types").InlineEditProps, "onChange" | "onFocus" | "onBlur" | "onSetValue" | "emptiable"> & Pick<import("./InlineEdit.types").BaseInlineInputProps, "width" | "error" | "errorMessage" | "hideIcon"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InlineEditInputProps } from './InlineEdit.types';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "onFocus" | "onBlur" | "onChange" | "width"> & Pick<import("./InlineEdit.types").InlineEditProps, "onFocus" | "onBlur" | "onChange" | "onSetValue" | "emptiable"> & Pick<import("./InlineEdit.types").BaseInlineInputProps, "width" | "error" | "errorMessage"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "onFocus" | "onBlur" | "onChange" | "width"> & Pick<import("./InlineEdit.types").InlineEditProps, "onFocus" | "onBlur" | "onChange" | "onSetValue" | "emptiable"> & Pick<import("./InlineEdit.types").BaseInlineInputProps, "width" | "error" | "errorMessage" | "hideIcon"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
5
5
|
argTypes: {
|
|
6
6
|
emptiable: {
|
|
7
7
|
control: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const InlineEditTextArea: import("react").ForwardRefExoticComponent<Omit<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange" | "onFocus" | "onBlur"> & Pick<import("./InlineEdit.types").InlineEditProps, "onChange" | "onFocus" | "onBlur" | "onSetValue" | "emptiable"> & Pick<import("./InlineEdit.types").BaseInlineInputProps, "error" | "errorMessage" | "width"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
1
|
+
export declare const InlineEditTextArea: import("react").ForwardRefExoticComponent<Omit<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange" | "onFocus" | "onBlur"> & Pick<import("./InlineEdit.types").InlineEditProps, "onChange" | "onFocus" | "onBlur" | "onSetValue" | "emptiable"> & Pick<import("./InlineEdit.types").BaseInlineInputProps, "error" | "errorMessage" | "width" | "hideIcon"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InlineEditTextAreaProps } from './InlineEdit.types';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<Omit<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, "onFocus" | "onBlur" | "onChange"> & Pick<import("./InlineEdit.types").InlineEditProps, "onFocus" | "onBlur" | "onChange" | "onSetValue" | "emptiable"> & Pick<import("./InlineEdit.types").BaseInlineInputProps, "width" | "error" | "errorMessage"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Omit<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, "onFocus" | "onBlur" | "onChange"> & Pick<import("./InlineEdit.types").InlineEditProps, "onFocus" | "onBlur" | "onChange" | "onSetValue" | "emptiable"> & Pick<import("./InlineEdit.types").BaseInlineInputProps, "width" | "error" | "errorMessage" | "hideIcon"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
5
5
|
argTypes: {
|
|
6
6
|
emptiable: {
|
|
7
7
|
control: {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ChangeEvent, MouseEvent, RefObject } from 'react';
|
|
2
|
+
export declare type AutocompleteSearchContextType = {
|
|
3
|
+
onValueChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
4
|
+
onSugggestionClick?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
5
|
+
suggestions?: string[];
|
|
6
|
+
showSuggestions?: boolean;
|
|
7
|
+
inputValue?: string;
|
|
8
|
+
inputRef?: RefObject<HTMLInputElement> | null;
|
|
9
|
+
suggestionsRef?: RefObject<HTMLDivElement> | null;
|
|
10
|
+
};
|
|
11
|
+
export declare const AutocompleteSearchContext: import("react").Context<AutocompleteSearchContextType>;
|
|
12
|
+
export declare const useAutocompleteSearch: () => AutocompleteSearchContextType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SearchProps } from '
|
|
1
|
+
import { SearchProps } from '.';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: import("react").ForwardRefExoticComponent<Pick<import("../../helpers").InputProps, "label" | "tip"> & {
|
|
@@ -8,7 +8,18 @@ declare const _default: {
|
|
|
8
8
|
label?: string | undefined;
|
|
9
9
|
loading?: boolean | undefined;
|
|
10
10
|
} & import("react").ButtonHTMLAttributes<HTMLButtonElement>) | undefined;
|
|
11
|
-
} & import("react").InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement
|
|
11
|
+
} & import("react").InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>> & {
|
|
12
|
+
AutocompleteWrapper: (props: import("./SearchAutocompleteWrapper").SearchAutocompleteWrapperProps) => JSX.Element;
|
|
13
|
+
Suggestions: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & Pick<SearchProps, "componentSize"> & {
|
|
14
|
+
suggestions?: string[] | undefined;
|
|
15
|
+
showSuggestions?: boolean | undefined;
|
|
16
|
+
onSuggestionClick?: ((e: import("react").MouseEvent<HTMLButtonElement, MouseEvent>) => void) | undefined;
|
|
17
|
+
maxSuggestions?: number | undefined;
|
|
18
|
+
searchId: string;
|
|
19
|
+
} & {
|
|
20
|
+
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
21
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
+
};
|
|
12
23
|
argTypes: {
|
|
13
24
|
tip: {
|
|
14
25
|
control: {
|
|
@@ -30,5 +41,7 @@ declare const _default: {
|
|
|
30
41
|
export default _default;
|
|
31
42
|
export declare const Overview: (args: SearchProps) => JSX.Element;
|
|
32
43
|
export declare const OverviewSizes: (args: SearchProps) => JSX.Element;
|
|
44
|
+
export declare const OverviewWithSuggestions: (args: SearchProps) => JSX.Element;
|
|
33
45
|
export declare const Default: (args: SearchProps) => JSX.Element;
|
|
34
46
|
export declare const WithButton: (args: SearchProps) => JSX.Element;
|
|
47
|
+
export declare const WithSuggestions: (args: SearchProps) => JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ChangeEvent, ReactNode } from 'react';
|
|
2
|
+
declare type WeightedValue = {
|
|
3
|
+
text: string;
|
|
4
|
+
relevance: number;
|
|
5
|
+
};
|
|
6
|
+
export declare type WeightedSearchData = {
|
|
7
|
+
array: WeightedValue[];
|
|
8
|
+
sortFunction?: (a: WeightedValue, b: WeightedValue) => number;
|
|
9
|
+
};
|
|
10
|
+
export declare type SearchData = {
|
|
11
|
+
array: string[];
|
|
12
|
+
sortFunction?: (a: string, b: string) => number;
|
|
13
|
+
};
|
|
14
|
+
export declare type SearchAutocompleteWrapperProps = {
|
|
15
|
+
/**Array med data som kan søkes på og eventuelt tilhørende sorteringsfunksjon. Array kan bestå av elementer av typen `string` eller objekter med vekt og tekst.*/
|
|
16
|
+
data?: SearchData | WeightedSearchData;
|
|
17
|
+
/** Ekstra callback ved `onChange` i `<Search>`. */
|
|
18
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
19
|
+
/**Callback når et forslag blir valgt, inkludert søkefunksjon. */
|
|
20
|
+
onSuggestionSelection?: () => void;
|
|
21
|
+
/** Custom filter for forslag. */
|
|
22
|
+
filter?: (sugestion: string, query: string) => boolean;
|
|
23
|
+
/**Minst lengde på query når forslag skal vises. */
|
|
24
|
+
queryLength?: number;
|
|
25
|
+
/** Barnet til komponenten (`<Search />`). */
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
/**Initielle `value` i `<Search>`. */
|
|
28
|
+
value?: string;
|
|
29
|
+
};
|
|
30
|
+
export declare const SearchAutocompleteWrapper: (props: SearchAutocompleteWrapperProps) => JSX.Element;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SearchProps } from './Search';
|
|
2
|
+
import { BaseComponentProps } from '../../types';
|
|
3
|
+
import { MouseEvent } from 'react';
|
|
4
|
+
export declare type SearchSuggestionsProps = BaseComponentProps<HTMLDivElement, Pick<SearchProps, 'componentSize'> & {
|
|
5
|
+
/**Forslag som vises i listen. */
|
|
6
|
+
suggestions?: string[];
|
|
7
|
+
/** Om listen skal vises. */
|
|
8
|
+
showSuggestions?: boolean;
|
|
9
|
+
/**Callback når et forslag blir valgt, inkludert søkefunksjon. */
|
|
10
|
+
onSuggestionClick?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
11
|
+
/** Maks antall forslag vist i listen. */
|
|
12
|
+
maxSuggestions?: number;
|
|
13
|
+
/**Id til `<Search>`. */
|
|
14
|
+
searchId: string;
|
|
15
|
+
}>;
|
|
16
|
+
export declare const SearchSuggestions: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & Pick<SearchProps, "componentSize"> & {
|
|
17
|
+
/**Forslag som vises i listen. */
|
|
18
|
+
suggestions?: string[] | undefined;
|
|
19
|
+
/** Om listen skal vises. */
|
|
20
|
+
showSuggestions?: boolean | undefined;
|
|
21
|
+
/**Callback når et forslag blir valgt, inkludert søkefunksjon. */
|
|
22
|
+
onSuggestionClick?: ((e: MouseEvent<HTMLButtonElement>) => void) | undefined;
|
|
23
|
+
/** Maks antall forslag vist i listen. */
|
|
24
|
+
maxSuggestions?: number | undefined;
|
|
25
|
+
/**Id til `<Search>`. */
|
|
26
|
+
searchId: string;
|
|
27
|
+
} & {
|
|
28
|
+
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
29
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { Search as BaseSearch, SearchProps, SearchSize } from './Search';
|
|
2
|
+
import { SearchAutocompleteWrapper, SearchAutocompleteWrapperProps, SearchData, WeightedSearchData } from './SearchAutocompleteWrapper';
|
|
3
|
+
import { SearchSuggestions, SearchSuggestionsProps } from './SearchSuggestions';
|
|
4
|
+
declare type SearchCompoundProps = typeof BaseSearch & {
|
|
5
|
+
AutocompleteWrapper: typeof SearchAutocompleteWrapper;
|
|
6
|
+
Suggestions: typeof SearchSuggestions;
|
|
7
|
+
};
|
|
8
|
+
declare const Search: SearchCompoundProps;
|
|
9
|
+
export { Search };
|
|
10
|
+
export type { SearchProps, SearchSize, SearchData, WeightedSearchData, SearchAutocompleteWrapperProps, SearchSuggestionsProps, };
|
|
@@ -9,13 +9,10 @@ export declare type SelectOption<TValue = unknown> = {
|
|
|
9
9
|
value: TValue;
|
|
10
10
|
};
|
|
11
11
|
export declare const createSelectOptions: <TValue extends string | number>(...args: TValue[]) => SelectOption<TValue>[];
|
|
12
|
-
export declare function searchFilter(text: string, search: string): boolean;
|
|
13
12
|
declare type WrappedReactSelectProps<TOption extends Record<string, unknown>, IsMulti extends boolean, Group extends GroupBase<TOption>> = WithRequiredIf<TOption extends SelectOption ? false : true, ReactSelectProps<TOption, IsMulti, Group>, 'getOptionLabel' | 'getOptionValue'>;
|
|
14
13
|
export declare type SelectProps<TOption extends Record<string, unknown>, IsMulti extends boolean> = {
|
|
15
14
|
/**Ledetekst for nedtrekkslisten. */
|
|
16
15
|
label?: string;
|
|
17
|
-
/**Gir required styling. **OBS!** støtter ikke DOM `required` attributt. */
|
|
18
|
-
required?: boolean;
|
|
19
16
|
/**Størrelsen på komponenten. */
|
|
20
17
|
componentSize?: InputSize;
|
|
21
18
|
/**Ikonet som vises i komponenten. */
|
|
@@ -104,15 +104,8 @@ export declare const selectTokens: {
|
|
|
104
104
|
};
|
|
105
105
|
};
|
|
106
106
|
multiValue: {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
};
|
|
110
|
-
enabled: {
|
|
111
|
-
backgroundColor: string;
|
|
112
|
-
};
|
|
113
|
-
disabled: {
|
|
114
|
-
backgroundColor: string;
|
|
115
|
-
};
|
|
107
|
+
borderRadius: string;
|
|
108
|
+
backgroundColor: string;
|
|
116
109
|
};
|
|
117
110
|
multiValueLabel: {
|
|
118
111
|
padding: string;
|
|
@@ -3,7 +3,6 @@ export declare const typographyTokens: {
|
|
|
3
3
|
a: {
|
|
4
4
|
base: {
|
|
5
5
|
color: string;
|
|
6
|
-
gap: string;
|
|
7
6
|
};
|
|
8
7
|
margins: {
|
|
9
8
|
marginTop: number;
|
|
@@ -12,6 +11,10 @@ export declare const typographyTokens: {
|
|
|
12
11
|
hover: {
|
|
13
12
|
color: string;
|
|
14
13
|
};
|
|
14
|
+
icon: {
|
|
15
|
+
marginTop: string;
|
|
16
|
+
marginLeft: string;
|
|
17
|
+
};
|
|
15
18
|
};
|
|
16
19
|
headingSans01: {
|
|
17
20
|
base: {
|
|
@@ -126,3 +126,9 @@ export * from './visibilityOn';
|
|
|
126
126
|
export * from './warning';
|
|
127
127
|
export * from './zoomIn';
|
|
128
128
|
export * from './zoomOut';
|
|
129
|
+
export * from './barChart';
|
|
130
|
+
export * from './barChartBoxed';
|
|
131
|
+
export * from './lineChart';
|
|
132
|
+
export * from './trendingUp';
|
|
133
|
+
export * from './trendingDown';
|
|
134
|
+
export * from './libraryAdd';
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { SVGAttributes } from 'react';
|
|
2
|
+
declare type StyledSvgProps = SVGAttributes<SVGSVGElement>;
|
|
3
|
+
export declare const StyledSvg: import("styled-components").StyledComponent<"svg", any, StyledSvgProps, never>;
|
|
4
|
+
export {};
|