@norges-domstoler/dds-components 14.3.0 → 14.3.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/dist/index.d.mts +35 -72
- package/dist/index.d.ts +35 -72
- package/dist/index.js +2394 -2555
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2409 -2577
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -14,7 +14,6 @@ import { DateValue, AriaCalendarProps } from '@react-aria/calendar';
|
|
|
14
14
|
import { DateValue as DateValue$1, CalendarDate, Time } from '@internationalized/date';
|
|
15
15
|
import { AriaDatePickerProps } from '@react-types/datepicker';
|
|
16
16
|
import { AriaDateFieldOptions, useDatePicker, AriaTimeFieldProps } from '@react-aria/datepicker';
|
|
17
|
-
import { InputProps as InputProps$1 } from '@norges-domstoler/dds-components';
|
|
18
17
|
|
|
19
18
|
interface SvgChevronProps {
|
|
20
19
|
isUp?: boolean;
|
|
@@ -190,6 +189,15 @@ declare const focusVisibleLinkOnDark: {
|
|
|
190
189
|
textDecoration: string;
|
|
191
190
|
};
|
|
192
191
|
declare const focusVisibleLinkTransitionValue = "background-color 0.2s, text-decoration 0.2s, color 0.2s";
|
|
192
|
+
declare const getAdditionalFontStyle: (bold?: boolean, italic?: boolean, underline?: boolean) => styled_components.RuleSet<object>;
|
|
193
|
+
declare const getMarginStyling: (typographyType: TypographyType, element: ElementType, withMargins?: boolean) => styled_components.RuleSet<object>;
|
|
194
|
+
declare const getAnchorStyling: (external?: boolean, interactionStyling?: TypographyInteractionStyling, typographyType?: StaticTypographyType, withMargins?: boolean) => styled_components.RuleSet<object>;
|
|
195
|
+
|
|
196
|
+
declare const defaultTypographyType: TypographyBodyType;
|
|
197
|
+
declare const getElementType: (element: string) => ElementType;
|
|
198
|
+
declare const isHeading: (type: TypographyType) => type is TypographyHeadingType;
|
|
199
|
+
declare const inlineElements: Array<ElementType>;
|
|
200
|
+
declare const isInlineElement: (as: ElementType) => as is InlineElement;
|
|
193
201
|
declare const getFontStyling: (type: StaticTypographyType, withColor?: boolean) => {
|
|
194
202
|
lineHeight: string;
|
|
195
203
|
fontSize: string;
|
|
@@ -199,15 +207,6 @@ declare const getFontStyling: (type: StaticTypographyType, withColor?: boolean)
|
|
|
199
207
|
fontStyle: string;
|
|
200
208
|
color: string | undefined;
|
|
201
209
|
};
|
|
202
|
-
declare const getAdditionalFontStyle: (bold?: boolean, italic?: boolean, underline?: boolean) => styled_components.RuleSet<object>;
|
|
203
|
-
declare const getMarginStyling: (typographyType: TypographyType, element: ElementType, withMargins?: boolean) => styled_components.RuleSet<object>;
|
|
204
|
-
declare const getAnchorStyling: (external?: boolean, interactionStyling?: TypographyInteractionStyling, typographyType?: StaticTypographyType, withMargins?: boolean) => styled_components.RuleSet<object>;
|
|
205
|
-
|
|
206
|
-
declare const defaultTypographyType: TypographyBodyType;
|
|
207
|
-
declare const getElementType: (element: string) => ElementType;
|
|
208
|
-
declare const isHeading: (type: TypographyType) => type is TypographyHeadingType;
|
|
209
|
-
declare const inlineElements: ElementType[];
|
|
210
|
-
declare const isInlineElement: (as: ElementType) => as is InlineElement;
|
|
211
210
|
|
|
212
211
|
type CaptionProps = BaseComponentPropsWithChildren<HTMLTableCaptionElement, BaseTypographyProps>;
|
|
213
212
|
declare const Caption: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes<HTMLTableCaptionElement>, "className" | "id"> & {
|
|
@@ -360,7 +359,7 @@ declare const inputTokens: {
|
|
|
360
359
|
};
|
|
361
360
|
};
|
|
362
361
|
|
|
363
|
-
declare function getDefaultText(value?: string | number |
|
|
362
|
+
declare function getDefaultText(value?: string | number | ReadonlyArray<string>, defaultValue?: string | number | ReadonlyArray<string>): string;
|
|
364
363
|
|
|
365
364
|
type Elevation = 1 | 2 | 3 | 4;
|
|
366
365
|
type Border = 'light' | 'dark';
|
|
@@ -390,7 +389,7 @@ declare const RequiredMarker: () => react_jsx_runtime.JSX.Element;
|
|
|
390
389
|
*
|
|
391
390
|
* {@link useCombinedRef}
|
|
392
391
|
*/
|
|
393
|
-
declare function useCombinedRef<T>(...refs: React.Ref<T
|
|
392
|
+
declare function useCombinedRef<T>(...refs: Array<React.Ref<T>>): RefCallback<T>;
|
|
394
393
|
|
|
395
394
|
type Placement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
|
|
396
395
|
interface UseFloatPositionOptions {
|
|
@@ -502,7 +501,7 @@ declare const useMountTransition: (isMounted: boolean, unmountDelay: number) =>
|
|
|
502
501
|
* @param element HTML elementet man klikker utenfor.
|
|
503
502
|
* @param handler funksjonen som kjøres ved klikk utenfor.
|
|
504
503
|
*/
|
|
505
|
-
declare function useOnClickOutside(element: HTMLElement | null |
|
|
504
|
+
declare function useOnClickOutside(element: HTMLElement | null | Array<HTMLElement | null>, handler: (event: MouseEvent | TouchEvent) => void): void;
|
|
506
505
|
|
|
507
506
|
/**
|
|
508
507
|
* Kjører logikk når en spesifisert tast blir trykt ned.
|
|
@@ -517,7 +516,7 @@ declare function useOnClickOutside(element: HTMLElement | null | (HTMLElement |
|
|
|
517
516
|
* @param key tasten som trykkes.
|
|
518
517
|
* @param handler funksjonen som skal kjøres.
|
|
519
518
|
*/
|
|
520
|
-
declare const useOnKeyDown: (key: string | string
|
|
519
|
+
declare const useOnKeyDown: (key: string | Array<string>, handler: (event: KeyboardEvent) => void) => void;
|
|
521
520
|
|
|
522
521
|
/**
|
|
523
522
|
* Returnerer fokus til et element når første eller siste barn i en container mister fokus ved tastaturnavigasjon. Typisk bruk:
|
|
@@ -1173,7 +1172,7 @@ declare namespace index {
|
|
|
1173
1172
|
* Join class names together.
|
|
1174
1173
|
* Will filter out all falsy values.
|
|
1175
1174
|
*/
|
|
1176
|
-
declare function cn(...classNames: unknown
|
|
1175
|
+
declare function cn(...classNames: Array<unknown>): string;
|
|
1177
1176
|
|
|
1178
1177
|
type EmbeteType = 'jordskifterett' | 'tingrett' | 'lagmannsrett' | 'høyesterett';
|
|
1179
1178
|
|
|
@@ -1191,11 +1190,11 @@ type UserProps = {
|
|
|
1191
1190
|
} & (AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>);
|
|
1192
1191
|
type OverflowMenuProps = BaseComponentProps<HTMLDivElement, {
|
|
1193
1192
|
/**Lenker eller knapper som skal vises i menyen. Støtter ikon i tillegg til tekst. */
|
|
1194
|
-
items?: OverflowMenuContextItem
|
|
1193
|
+
items?: Array<OverflowMenuContextItem>;
|
|
1195
1194
|
/**Eget element for brukernavn, kan være interaktivt eller statisk. Ligger alltid på toppen av menyen. */
|
|
1196
1195
|
userProps?: UserProps;
|
|
1197
1196
|
/**Navigasjonslenker, brukes hvis navigasjonen skal ligge i menyen (f.eks. ved liten skjerm o.l.). */
|
|
1198
|
-
navItems?: OverflowMenuNavItem
|
|
1197
|
+
navItems?: Array<OverflowMenuNavItem>;
|
|
1199
1198
|
/**Spesifiserer om menyen skal vises. **OBS!** nødvendig kun hvis `<OverflowMenuGroup />` ikke brukes. */
|
|
1200
1199
|
isOpen?: boolean;
|
|
1201
1200
|
/**Callback for å lukke menyen. **OBS!** nødvendig kun hvis `<OverflowMenuGroup />` ikke brukes. */
|
|
@@ -1291,11 +1290,11 @@ interface AppShellNavigationProps {
|
|
|
1291
1290
|
/**
|
|
1292
1291
|
* Interne lenker i navigasjonen.
|
|
1293
1292
|
*/
|
|
1294
|
-
internal?: ReactElement
|
|
1293
|
+
internal?: Array<ReactElement>;
|
|
1295
1294
|
/**
|
|
1296
1295
|
* Eksterne lenker i navigasjonen.
|
|
1297
1296
|
*/
|
|
1298
|
-
external?: ReactElement
|
|
1297
|
+
external?: Array<ReactElement>;
|
|
1299
1298
|
}
|
|
1300
1299
|
declare const AppShell$1: {
|
|
1301
1300
|
({ children, version, navigation: { internal, external }, user, userMenuItems, environment, title, }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1668,11 +1667,11 @@ interface WeightedValue {
|
|
|
1668
1667
|
relevance: number;
|
|
1669
1668
|
}
|
|
1670
1669
|
interface WeightedSearchData {
|
|
1671
|
-
array: WeightedValue
|
|
1670
|
+
array: Array<WeightedValue>;
|
|
1672
1671
|
sortFunction?: (a: WeightedValue, b: WeightedValue) => number;
|
|
1673
1672
|
}
|
|
1674
1673
|
interface SearchData {
|
|
1675
|
-
array: string
|
|
1674
|
+
array: Array<string>;
|
|
1676
1675
|
sortFunction?: (a: string, b: string) => number;
|
|
1677
1676
|
}
|
|
1678
1677
|
interface SearchAutocompleteWrapperProps {
|
|
@@ -1698,7 +1697,7 @@ declare const SearchAutocompleteWrapper: {
|
|
|
1698
1697
|
|
|
1699
1698
|
type SearchSuggestionsProps = BaseComponentProps<HTMLDivElement, Pick<SearchProps, 'componentSize'> & {
|
|
1700
1699
|
/**Forslag som vises i listen. */
|
|
1701
|
-
suggestions?: string
|
|
1700
|
+
suggestions?: Array<string>;
|
|
1702
1701
|
/** Om listen skal vises. */
|
|
1703
1702
|
showSuggestions?: boolean;
|
|
1704
1703
|
/**Callback når et forslag blir valgt, inkludert søkefunksjon. */
|
|
@@ -1750,6 +1749,12 @@ type TableCellProps = {
|
|
|
1750
1749
|
} & (TdHTMLAttributes<HTMLTableCellElement> | ThHTMLAttributes<HTMLTableCellElement>);
|
|
1751
1750
|
declare const Cell: react.ForwardRefExoticComponent<TableCellProps & react.RefAttributes<HTMLTableCellElement>>;
|
|
1752
1751
|
|
|
1752
|
+
type TableFootProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1753
|
+
declare const Foot: react.ForwardRefExoticComponent<TableFootProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1754
|
+
|
|
1755
|
+
type TableHeadProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1756
|
+
declare const Head: react.ForwardRefExoticComponent<TableHeadProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1757
|
+
|
|
1753
1758
|
type TableDensity = 'normal' | 'compact' | 'extraCompact';
|
|
1754
1759
|
type TableProps = {
|
|
1755
1760
|
/**Spesifiserer hvor romslige cellene i tabellen skal være. */
|
|
@@ -1759,21 +1764,6 @@ type TableProps = {
|
|
|
1759
1764
|
/**Legger skillelinjer mellom radene. */
|
|
1760
1765
|
withDividers?: boolean;
|
|
1761
1766
|
} & HTMLAttributes<HTMLTableElement>;
|
|
1762
|
-
type HeaderValues = {
|
|
1763
|
-
key: string;
|
|
1764
|
-
content: ReactNode;
|
|
1765
|
-
}[];
|
|
1766
|
-
type CollapsibleTableProps = {
|
|
1767
|
-
/**Om tabellen skal kollapse. */
|
|
1768
|
-
isCollapsed?: boolean;
|
|
1769
|
-
/**Innhold i headere (`content`) og deres `key`. `headerValues.content` må være den samme som faktisk innhold i `<Table.Cell type='head'>`. */
|
|
1770
|
-
headerValues: HeaderValues;
|
|
1771
|
-
/**
|
|
1772
|
-
* Indeksen(e) til kolonnen(e) som skal synes når tabellen er kollapset. Rekkefølgen i array avgjør rekkefølgen i render.
|
|
1773
|
-
* @default [0]
|
|
1774
|
-
* */
|
|
1775
|
-
definingColumnIndex?: number[];
|
|
1776
|
-
} & TableProps;
|
|
1777
1767
|
type TableRowType = 'body' | 'head';
|
|
1778
1768
|
type RowMode = 'normal' | 'sum';
|
|
1779
1769
|
type TableRowProps = {
|
|
@@ -1790,29 +1780,6 @@ type TableRowProps = {
|
|
|
1790
1780
|
hoverable?: boolean;
|
|
1791
1781
|
} & HTMLAttributes<HTMLTableRowElement>;
|
|
1792
1782
|
|
|
1793
|
-
declare const CollapsibleRow: react.ForwardRefExoticComponent<{
|
|
1794
|
-
type?: TableRowType | undefined;
|
|
1795
|
-
mode?: RowMode | undefined;
|
|
1796
|
-
selected?: boolean | undefined;
|
|
1797
|
-
hoverable?: boolean | undefined;
|
|
1798
|
-
} & react.HTMLAttributes<HTMLTableRowElement> & react.RefAttributes<HTMLTableRowElement>>;
|
|
1799
|
-
|
|
1800
|
-
declare const CollapsibleTable$1: react.ForwardRefExoticComponent<{
|
|
1801
|
-
isCollapsed?: boolean | undefined;
|
|
1802
|
-
headerValues: HeaderValues;
|
|
1803
|
-
definingColumnIndex?: number[] | undefined;
|
|
1804
|
-
} & {
|
|
1805
|
-
density?: TableDensity | undefined;
|
|
1806
|
-
stickyHeader?: boolean | undefined;
|
|
1807
|
-
withDividers?: boolean | undefined;
|
|
1808
|
-
} & react.HTMLAttributes<HTMLTableElement> & react.RefAttributes<HTMLTableElement>>;
|
|
1809
|
-
|
|
1810
|
-
type TableFootProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1811
|
-
declare const Foot: react.ForwardRefExoticComponent<TableFootProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1812
|
-
|
|
1813
|
-
type TableHeadProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1814
|
-
declare const Head: react.ForwardRefExoticComponent<TableHeadProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1815
|
-
|
|
1816
1783
|
declare const Row: react.ForwardRefExoticComponent<{
|
|
1817
1784
|
type?: TableRowType | undefined;
|
|
1818
1785
|
mode?: RowMode | undefined;
|
|
@@ -1860,10 +1827,6 @@ type TableCompoundProps = typeof Table$1 & {
|
|
|
1860
1827
|
SortCell: typeof SortCell;
|
|
1861
1828
|
};
|
|
1862
1829
|
declare const Table: TableCompoundProps;
|
|
1863
|
-
type CollapsibleTableCompoundProps = typeof CollapsibleTable$1 & {
|
|
1864
|
-
Row: typeof CollapsibleRow;
|
|
1865
|
-
};
|
|
1866
|
-
declare const CollapsibleTable: CollapsibleTableCompoundProps;
|
|
1867
1830
|
|
|
1868
1831
|
type BreadcrumbProps = HTMLAttributes<HTMLSpanElement> | AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
1869
1832
|
declare const Breadcrumb: react.ForwardRefExoticComponent<BreadcrumbProps & react.RefAttributes<HTMLElement>>;
|
|
@@ -1893,7 +1856,7 @@ type PaginationProps = BaseComponentProps<HTMLElement, {
|
|
|
1893
1856
|
/**Spesifiserer om `<Select />` til å velge antall resultater per side skal vises. */
|
|
1894
1857
|
withSelect?: boolean;
|
|
1895
1858
|
/**Custom options for `<Select />`. **OBS!** hvis det settes custom `selectOptions` bør "alle"-alternativet inkluderes der det er relevant, da brukere ofte liker å ha muligheten. */
|
|
1896
|
-
selectOptions?: PaginationOption
|
|
1859
|
+
selectOptions?: Array<PaginationOption>;
|
|
1897
1860
|
/**Brukes til å hente side og eventuelt annen logikk ved endring av side. */
|
|
1898
1861
|
onChange?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, page: number) => void;
|
|
1899
1862
|
/**Brukes til å hente `selectedOption` og eventuelt kjøre annen logikk når `withSelect=true` ved endring av alternativ. */
|
|
@@ -2118,9 +2081,9 @@ type InternalHeaderProps = BaseComponentProps<HTMLDivElement, {
|
|
|
2118
2081
|
/**Info om brukeren. Dukker opp som punkt på toppen av kontekstmenyen med tekst oppgitt i name. Blir en lenke hvis href er oppgitt. */
|
|
2119
2082
|
userProps?: InternaHeaderUserProps;
|
|
2120
2083
|
/**Lenker som skal vises i navigasjonsmenyen. */
|
|
2121
|
-
navigationElements?: NavigationLinkProps
|
|
2084
|
+
navigationElements?: Array<NavigationLinkProps>;
|
|
2122
2085
|
/**Lenker eller knapper som skal vises i kontekstmenyen. Støtter ikon i tillegg til tekst. */
|
|
2123
|
-
contextMenuElements?: ContextMenuElementProps
|
|
2086
|
+
contextMenuElements?: Array<ContextMenuElementProps>;
|
|
2124
2087
|
/**URL til siden i navigasjonen brukeren er på. Gir highlight til navigasjonselementet i navigationElements med samme URL. */
|
|
2125
2088
|
currentPageHref?: string;
|
|
2126
2089
|
/**Ekstra logikk som kjøres når currentPage endres. */
|
|
@@ -2309,7 +2272,7 @@ type DateFieldProps<T extends DateValue$1 = CalendarDate> = AriaDateFieldOptions
|
|
|
2309
2272
|
* For å sette en egendefinert bredde på komponenten.
|
|
2310
2273
|
*/
|
|
2311
2274
|
width?: CSS.Properties['width'];
|
|
2312
|
-
} & Pick<InputProps
|
|
2275
|
+
} & Pick<InputProps, 'componentSize' | 'errorMessage' | 'tip' | 'disabled' | 'style'>;
|
|
2313
2276
|
|
|
2314
2277
|
interface DatePickerProps extends Omit<AriaDatePickerProps<CalendarDate>, 'granularity'>, Pick<DateFieldProps<CalendarDate>, 'componentSize' | 'tip' | 'style'> {
|
|
2315
2278
|
label?: string;
|
|
@@ -2807,7 +2770,7 @@ interface SplitButtonProps {
|
|
|
2807
2770
|
/**Props for primær handling. Samme props som for `<Button />` unntatt `size`, `purpose`, og `appearance`. */
|
|
2808
2771
|
primaryAction: Omit<ButtonProps$1, 'size' | 'apperance' | 'purpose'>;
|
|
2809
2772
|
/**Props for sekunære handlinger. */
|
|
2810
|
-
secondaryActions: OverflowMenuButtonItem
|
|
2773
|
+
secondaryActions: Array<OverflowMenuButtonItem>;
|
|
2811
2774
|
/**Formål med knappen */
|
|
2812
2775
|
purpose?: SplitButtonPurpose;
|
|
2813
2776
|
}
|
|
@@ -2874,7 +2837,7 @@ type AudioMimeType = 'aac' | 'midi' | 'x-midi' | 'mpeg' | 'ogg' | 'opus' | 'wav'
|
|
|
2874
2837
|
type ApplicationMimeType = 'octet-stream' | 'msword' | 'vnd.openxmlformats-officedocument.wordprocessingml.document' | 'epub+zip' | 'gzip' | 'java-archive' | 'json' | 'vnd.oasis.opendocument.presentation' | 'vnd.oasis.opendocument.spreadsheet' | 'vnd.oasis.opendocument.text' | 'pdf' | 'vnd.ms-powerpoint' | 'vnd.openxmlformats-officedocument.presentationml.presentation' | 'rtf' | 'x-sh' | 'x-tar' | 'vnd.visio' | 'xhtml+xml' | 'vnd.ms-excel' | 'vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'xml' | 'vnd.mozilla.xul+xml' | 'zip';
|
|
2875
2838
|
type MimeType = `image/${ImageMimeType | AnyMimeType}` | `video/${VideoMimeType | AnyMimeType}` | `audio/${AudioMimeType | AnyMimeType}` | `application/${ApplicationMimeType}`;
|
|
2876
2839
|
type Accept = MimeType | FileExtensionAccept;
|
|
2877
|
-
type FileList = File
|
|
2840
|
+
type FileList = Array<File>;
|
|
2878
2841
|
|
|
2879
2842
|
interface FileUploaderHookProps {
|
|
2880
2843
|
id: string | undefined;
|
|
@@ -2885,7 +2848,7 @@ interface FileUploaderHookProps {
|
|
|
2885
2848
|
/**Callback for når fil-listen endres. */
|
|
2886
2849
|
onChange: (newFiles: FileList) => void;
|
|
2887
2850
|
/**Hvilke filendelser eller mime-typer som filopplasteren skal akseptere. */
|
|
2888
|
-
accept: Accept
|
|
2851
|
+
accept: Array<Accept> | undefined;
|
|
2889
2852
|
/**Om filopplasteren er avslått eller ikke */
|
|
2890
2853
|
disabled: boolean | undefined;
|
|
2891
2854
|
/**Maks antall filer som tillates. */
|
|
@@ -2967,4 +2930,4 @@ type Layout = 'vertical' | 'horizontal';
|
|
|
2967
2930
|
|
|
2968
2931
|
declare const Feedback: ({ layout, ratingLabel, positiveFeedbackLabel, negativeFeedbackLabel, ratingSubmittedTitle, submittedTitle, ratingValue: ratingProp, feedbackTextValue: feedbackTextProp, thumbUpTooltip, thumbDownTooltip, feedbackTextAreaExcluded, loading, isSubmitted: isSubmittedProp, onRating, onFeedbackTextChange, onSubmit, }: FeedbackProps) => react_jsx_runtime.JSX.Element;
|
|
2969
2932
|
|
|
2970
|
-
export { AddressShieldedIcon, AgreementIcon, type AnchorTypographyType, AnimatedChevronUpDown, AppShell, type AppShellProps, AppsIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, type As, AttachmentIcon, BackLink, type BackLinkProps, BarChartBoxedIcon, BarChartIcon, type BaseComponentProps, type BaseComponentPropsWithChildren, type BaseTypographyProps, BlockIcon, BookIcon, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, type BreakpointBasedProps, BuildCircledIcon, BuildIcon, Button, type ButtonAppearance, type ButtonProps$1 as ButtonProps, type ButtonPurpose, type ButtonSize, Calendar, CalendarIcon, CalendarMonthIcon, type CalendarProps, CalendarViewDayIcon, CalendarViewMonthIcon, CalendarViewWeekIcon, CallIcon, type Callback, Caption, type CaptionProps, Card, CardAccordion, CardAccordionBody, type CardAccordionBodyProps, CardAccordionHeader, type CardAccordionHeaderProps, type CardAccordionProps, type CardColor, type CardProps, type CardType, CaringIcon, ChatIcon, CheckCircledIcon, CheckIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxPickedHTMLAttributes, type CheckboxProps, ChecklistIcon, ChevronDownIcon, ChevronFirstIcon, ChevronLargeLeftIcon, ChevronLargeRightIcon, ChevronLastIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, Chip, ChipGroup, type ChipGroupProps, type ChipProps, CloseCircledIcon, CloseIcon, CloseSmallIcon, CloudIcon, CollapseIcon,
|
|
2933
|
+
export { AddressShieldedIcon, AgreementIcon, type AnchorTypographyType, AnimatedChevronUpDown, AppShell, type AppShellProps, AppsIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, type As, AttachmentIcon, BackLink, type BackLinkProps, BarChartBoxedIcon, BarChartIcon, type BaseComponentProps, type BaseComponentPropsWithChildren, type BaseTypographyProps, BlockIcon, BookIcon, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, type BreakpointBasedProps, BuildCircledIcon, BuildIcon, Button, type ButtonAppearance, type ButtonProps$1 as ButtonProps, type ButtonPurpose, type ButtonSize, Calendar, CalendarIcon, CalendarMonthIcon, type CalendarProps, CalendarViewDayIcon, CalendarViewMonthIcon, CalendarViewWeekIcon, CallIcon, type Callback, Caption, type CaptionProps, Card, CardAccordion, CardAccordionBody, type CardAccordionBodyProps, CardAccordionHeader, type CardAccordionHeaderProps, type CardAccordionProps, type CardColor, type CardProps, type CardType, CaringIcon, ChatIcon, CheckCircledIcon, CheckIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxPickedHTMLAttributes, type CheckboxProps, ChecklistIcon, ChevronDownIcon, ChevronFirstIcon, ChevronLargeLeftIcon, ChevronLargeRightIcon, ChevronLastIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, Chip, ChipGroup, type ChipGroupProps, type ChipProps, CloseCircledIcon, CloseIcon, CloseSmallIcon, CloudIcon, CollapseIcon, type ColumnsOccupied, CommentIcon, type CommonInputProps, Container, CopyIcon, CourtIcon, DatePicker, type DatePickerProps, DateRangeIcon, DeathsIcon, DescriptionList, type DescriptionListAppearance, DescriptionListDesc, type DescriptionListDescProps, DescriptionListGroup, type DescriptionListGroupProps, type DescriptionListProps, DescriptionListTerm, type DescriptionListTermProps, type Direction$1 as Direction, Divider, type DividerColor, type DividerProps, DoubleChevronLeftIcon, DoubleChevronRightIcon, DownloadDoneIcon, DownloadIcon, DragHandleIcon, Drawer, DrawerGroup, type DrawerGroupProps, type DrawerPlacement, type DrawerProps, type DrawerSize, EditIcon, EmptyContent, type EmptyContentProps, ErrorIcon, ExclaimIcon, ExpandIcon, type ExpandableCardProps, type ExtractStrict, FacebookIcon, FamilyIcon, Feedback, FeedbackIcon, type FeedbackProps, FileAddIcon, FileIcon, FileShieldedIcon, FileTextIcon, FileUploader, FilterIcon, FilterListIcon, FilterListOffIcon, FilterOffIcon, FindInPageIcon, FlickrIcon, FolderAddIcon, FolderIcon, FolderShieldedIcon, FullscreenExitIcon, FullscreenIcon, GavelIcon, GlobalMessage, type GlobalMessageProps, type GlobalMessagePurpose, Grid, GridChild, type GridChildProps, type GridProps, HStack, Heading, type HeadingLevel, type HeadingProps, HelpFilledIcon, HelpIcon, HiddenInput, HomeIcon, HourglassBottom, HourglassDisabled, HourglassEmpty, HourglassFull, HourglassTop, Icon, type IconPosition, type IconProps, type IconSize, ImageIcon, type InfoCardProps, InfoIcon, InlineEditInput, type InlineEditInputProps, InlineEditTextArea, type InlineEditTextAreaProps, type InlineElement, Input, InputAffixContainer, InputContainer, InputMessage, type InputMessageProps, type InputMessageType, type InputProps, type InputSize, type InputTypographyTypes, InstagramIcon, InternalHeader, type InternalHeaderProps, JordskifterettIcon, KeyIcon, Label, type LabelProps, type LabelTypographyType, LagmannsrettIcon, LanguageIcon, type Layout, Legend, type LegendProps, LibraryAddIcon, LineChartIcon, Link, LinkIcon, LinkOffIcon, type LinkProps, LinkedInIcon, List, ListAltIcon, ListIcon, ListItem, type ListItemProps, type ListProps, type ListType, type ListTypographyType, LocalMessage, type LocalMessageLayout, type LocalMessageProps, type LocalMessagePurpose, LocationIcon, LockIcon, LockOpenIcon, LoginIcon, LogoutIcon, MailIcon, MailOpenIcon, MenuIcon, MinusCirledIcon, MinusIcon, Modal, ModalActions, type ModalActionsProps, ModalBody, type ModalBodyProps, type ModalProps, MoreHorizontalIcon, MoreVerticalIcon, type NavigationCardProps, NotarialIcon, NotificationsIcon, NotificationsOffIcon, type Nullable, OnlineMeetingIcon, OpenExternalIcon, type OtherTypographyType, OuterInputContainer, OverflowMenu, type OverflowMenuButtonItem, type OverflowMenuContextItem, OverflowMenuGroup, type OverflowMenuGroupProps, type OverflowMenuLinkItem, OverflowMenuList, type OverflowMenuNavItem, type OverflowMenuProps, Pagination, type PaginationOption, type PaginationProps, Paper, type PaperProps, Paragraph, type ParagraphProps, PayoutIcon, PdfIcon, PersonAddIcon, PersonIcon, PersonShieldedIcon, PinIcon, type Placement, PlusCircledIcon, PlusIcon, Popover, PopoverGroup, type PopoverGroupProps, type PopoverProps, type PopoverSizeProps, PrintIcon, ProgressTracker, PropertyIcon, type PropsOf, PublishIcon, QuestionAnswerIcon, RadioButton, RadioButtonGroup, type RadioButtonGroupProps, type RadioButtonProps, type Rating, ReceiptIcon, RedoIcon, RefreshIcon, ReplayIcon, RequiredMarker, ScreenSize, type ScreenSizeLiteral, ScrollableContainer, type ScrollableContainerProps, Scrollbar, type ScrollbarProps, Search, type SearchAutocompleteWrapperProps, type SearchData, SearchIcon, type SearchProps, type SearchSize, type SearchSuggestionsProps, Select, type SelectOption, type SelectProps, SettingsIcon, SkipToContent, type SkipToContentProps, SmsIcon, type SortOrder, Spinner, type SpinnerProps, SplitButton, type SplitButtonProps, type SplitButtonPurpose, type StackProps, type StackStyleProps, StarFilledIcon, StarHalfFilled, StarIcon, StatefulInput, type StaticTypographyType, type StyledCommonInputProps, type StyledInputProps, StyledSvg, StyledTextArea, type SvgIcon, type SvgProps, SyncIcon, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, Table, type TableBodyProps, type TableCellLayout, type TableCellProps, type TableCellType, type TableDensity, type TableFootProps, type TableHeadProps, type TableProps, type TableRowProps, type TableRowType, type TableSortCellProps, Tabs, type TabsProps, Tag, type TagProps, type TagPurpose, type TextAffixProps, TextArea, type TextAreaProps, TextInput, type TextInputProps, TextOverflowEllipsisInner, TextOverflowEllipsisWrapper, Thumbdown, ThumbdownFilled, Thumbup, ThumbupFilled, TimeIcon, TimePicker, type TimePickerProps, TingrettIcon, TipIcon, ToggleBar, type ToggleBarProps, type ToggleBarSize, type ToggleBarValue, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, ToggleRadio, type ToggleRadioProps, Tooltip, type TooltipProps, TrashIcon, TrendingDownIcon, TrendingUpIcon, TwitterIcon, Typography, type TypographyBodyType, type TypographyComponentProps, type TypographyHeadingType, type TypographyInteractionStyling, type TypographyLeadType, type TypographyProps, type TypographyType, UndoIcon, UnfoldLessIcon, UnfoldMoreIcon, UploadIcon, VStack, VisibilityOffIcon, VisibilityOnIcon, VisuallyHidden, type VisuallyHiddenProps, WarningIcon, type WeightedSearchData, type WidthProps, type WithRequiredIf, ZoomInIcon, ZoomOutIcon, calendarDateToNativeDate, cn, createSelectOptions, dangerInputfield, dateValueToNativeDate, defaultTypographyType, focusDangerInputfield, focusInputfield, focusVisible, focusVisibleInset, focusVisibleLink, focusVisibleLinkOnDark, focusVisibleLinkTransitionValue, focusVisibleOnDark, focusVisibleThickWithBorderOnDark, focusVisibleTransitionValue, focusVisibleWithBorder, getAdditionalFontStyle, getAnchorStyling, getBaseHTMLProps, getDefaultText, getElementType, getFontStyling, getLiteralScreenSize, getMarginStyling, hideInput, hoverDangerInputfield, hoverInputfield, hoverWithBorder, index as icons, inlineElements, inputTokens, inputTypographyTypes, isGridColumn, isHeading, isInlineElement, isKeyboardEvent, isRelativeGridColumn, nativeDateToCalendarDate, nativeDateToDateValue, nativeDateToTime, normalizeButton, outlineOffset, removeButtonStyling, removeListStyling, scrollbarStyling, selection, useCombinedRef, useFloatPosition, useFocusTrap, useIsMounted, useMountTransition, useOnClickOutside, useOnKeyDown, useReturnFocusOnBlur, useRoveFocus, useScreenSize, visibilityTransition };
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ import { DateValue, AriaCalendarProps } from '@react-aria/calendar';
|
|
|
14
14
|
import { DateValue as DateValue$1, CalendarDate, Time } from '@internationalized/date';
|
|
15
15
|
import { AriaDatePickerProps } from '@react-types/datepicker';
|
|
16
16
|
import { AriaDateFieldOptions, useDatePicker, AriaTimeFieldProps } from '@react-aria/datepicker';
|
|
17
|
-
import { InputProps as InputProps$1 } from '@norges-domstoler/dds-components';
|
|
18
17
|
|
|
19
18
|
interface SvgChevronProps {
|
|
20
19
|
isUp?: boolean;
|
|
@@ -190,6 +189,15 @@ declare const focusVisibleLinkOnDark: {
|
|
|
190
189
|
textDecoration: string;
|
|
191
190
|
};
|
|
192
191
|
declare const focusVisibleLinkTransitionValue = "background-color 0.2s, text-decoration 0.2s, color 0.2s";
|
|
192
|
+
declare const getAdditionalFontStyle: (bold?: boolean, italic?: boolean, underline?: boolean) => styled_components.RuleSet<object>;
|
|
193
|
+
declare const getMarginStyling: (typographyType: TypographyType, element: ElementType, withMargins?: boolean) => styled_components.RuleSet<object>;
|
|
194
|
+
declare const getAnchorStyling: (external?: boolean, interactionStyling?: TypographyInteractionStyling, typographyType?: StaticTypographyType, withMargins?: boolean) => styled_components.RuleSet<object>;
|
|
195
|
+
|
|
196
|
+
declare const defaultTypographyType: TypographyBodyType;
|
|
197
|
+
declare const getElementType: (element: string) => ElementType;
|
|
198
|
+
declare const isHeading: (type: TypographyType) => type is TypographyHeadingType;
|
|
199
|
+
declare const inlineElements: Array<ElementType>;
|
|
200
|
+
declare const isInlineElement: (as: ElementType) => as is InlineElement;
|
|
193
201
|
declare const getFontStyling: (type: StaticTypographyType, withColor?: boolean) => {
|
|
194
202
|
lineHeight: string;
|
|
195
203
|
fontSize: string;
|
|
@@ -199,15 +207,6 @@ declare const getFontStyling: (type: StaticTypographyType, withColor?: boolean)
|
|
|
199
207
|
fontStyle: string;
|
|
200
208
|
color: string | undefined;
|
|
201
209
|
};
|
|
202
|
-
declare const getAdditionalFontStyle: (bold?: boolean, italic?: boolean, underline?: boolean) => styled_components.RuleSet<object>;
|
|
203
|
-
declare const getMarginStyling: (typographyType: TypographyType, element: ElementType, withMargins?: boolean) => styled_components.RuleSet<object>;
|
|
204
|
-
declare const getAnchorStyling: (external?: boolean, interactionStyling?: TypographyInteractionStyling, typographyType?: StaticTypographyType, withMargins?: boolean) => styled_components.RuleSet<object>;
|
|
205
|
-
|
|
206
|
-
declare const defaultTypographyType: TypographyBodyType;
|
|
207
|
-
declare const getElementType: (element: string) => ElementType;
|
|
208
|
-
declare const isHeading: (type: TypographyType) => type is TypographyHeadingType;
|
|
209
|
-
declare const inlineElements: ElementType[];
|
|
210
|
-
declare const isInlineElement: (as: ElementType) => as is InlineElement;
|
|
211
210
|
|
|
212
211
|
type CaptionProps = BaseComponentPropsWithChildren<HTMLTableCaptionElement, BaseTypographyProps>;
|
|
213
212
|
declare const Caption: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes<HTMLTableCaptionElement>, "className" | "id"> & {
|
|
@@ -360,7 +359,7 @@ declare const inputTokens: {
|
|
|
360
359
|
};
|
|
361
360
|
};
|
|
362
361
|
|
|
363
|
-
declare function getDefaultText(value?: string | number |
|
|
362
|
+
declare function getDefaultText(value?: string | number | ReadonlyArray<string>, defaultValue?: string | number | ReadonlyArray<string>): string;
|
|
364
363
|
|
|
365
364
|
type Elevation = 1 | 2 | 3 | 4;
|
|
366
365
|
type Border = 'light' | 'dark';
|
|
@@ -390,7 +389,7 @@ declare const RequiredMarker: () => react_jsx_runtime.JSX.Element;
|
|
|
390
389
|
*
|
|
391
390
|
* {@link useCombinedRef}
|
|
392
391
|
*/
|
|
393
|
-
declare function useCombinedRef<T>(...refs: React.Ref<T
|
|
392
|
+
declare function useCombinedRef<T>(...refs: Array<React.Ref<T>>): RefCallback<T>;
|
|
394
393
|
|
|
395
394
|
type Placement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
|
|
396
395
|
interface UseFloatPositionOptions {
|
|
@@ -502,7 +501,7 @@ declare const useMountTransition: (isMounted: boolean, unmountDelay: number) =>
|
|
|
502
501
|
* @param element HTML elementet man klikker utenfor.
|
|
503
502
|
* @param handler funksjonen som kjøres ved klikk utenfor.
|
|
504
503
|
*/
|
|
505
|
-
declare function useOnClickOutside(element: HTMLElement | null |
|
|
504
|
+
declare function useOnClickOutside(element: HTMLElement | null | Array<HTMLElement | null>, handler: (event: MouseEvent | TouchEvent) => void): void;
|
|
506
505
|
|
|
507
506
|
/**
|
|
508
507
|
* Kjører logikk når en spesifisert tast blir trykt ned.
|
|
@@ -517,7 +516,7 @@ declare function useOnClickOutside(element: HTMLElement | null | (HTMLElement |
|
|
|
517
516
|
* @param key tasten som trykkes.
|
|
518
517
|
* @param handler funksjonen som skal kjøres.
|
|
519
518
|
*/
|
|
520
|
-
declare const useOnKeyDown: (key: string | string
|
|
519
|
+
declare const useOnKeyDown: (key: string | Array<string>, handler: (event: KeyboardEvent) => void) => void;
|
|
521
520
|
|
|
522
521
|
/**
|
|
523
522
|
* Returnerer fokus til et element når første eller siste barn i en container mister fokus ved tastaturnavigasjon. Typisk bruk:
|
|
@@ -1173,7 +1172,7 @@ declare namespace index {
|
|
|
1173
1172
|
* Join class names together.
|
|
1174
1173
|
* Will filter out all falsy values.
|
|
1175
1174
|
*/
|
|
1176
|
-
declare function cn(...classNames: unknown
|
|
1175
|
+
declare function cn(...classNames: Array<unknown>): string;
|
|
1177
1176
|
|
|
1178
1177
|
type EmbeteType = 'jordskifterett' | 'tingrett' | 'lagmannsrett' | 'høyesterett';
|
|
1179
1178
|
|
|
@@ -1191,11 +1190,11 @@ type UserProps = {
|
|
|
1191
1190
|
} & (AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>);
|
|
1192
1191
|
type OverflowMenuProps = BaseComponentProps<HTMLDivElement, {
|
|
1193
1192
|
/**Lenker eller knapper som skal vises i menyen. Støtter ikon i tillegg til tekst. */
|
|
1194
|
-
items?: OverflowMenuContextItem
|
|
1193
|
+
items?: Array<OverflowMenuContextItem>;
|
|
1195
1194
|
/**Eget element for brukernavn, kan være interaktivt eller statisk. Ligger alltid på toppen av menyen. */
|
|
1196
1195
|
userProps?: UserProps;
|
|
1197
1196
|
/**Navigasjonslenker, brukes hvis navigasjonen skal ligge i menyen (f.eks. ved liten skjerm o.l.). */
|
|
1198
|
-
navItems?: OverflowMenuNavItem
|
|
1197
|
+
navItems?: Array<OverflowMenuNavItem>;
|
|
1199
1198
|
/**Spesifiserer om menyen skal vises. **OBS!** nødvendig kun hvis `<OverflowMenuGroup />` ikke brukes. */
|
|
1200
1199
|
isOpen?: boolean;
|
|
1201
1200
|
/**Callback for å lukke menyen. **OBS!** nødvendig kun hvis `<OverflowMenuGroup />` ikke brukes. */
|
|
@@ -1291,11 +1290,11 @@ interface AppShellNavigationProps {
|
|
|
1291
1290
|
/**
|
|
1292
1291
|
* Interne lenker i navigasjonen.
|
|
1293
1292
|
*/
|
|
1294
|
-
internal?: ReactElement
|
|
1293
|
+
internal?: Array<ReactElement>;
|
|
1295
1294
|
/**
|
|
1296
1295
|
* Eksterne lenker i navigasjonen.
|
|
1297
1296
|
*/
|
|
1298
|
-
external?: ReactElement
|
|
1297
|
+
external?: Array<ReactElement>;
|
|
1299
1298
|
}
|
|
1300
1299
|
declare const AppShell$1: {
|
|
1301
1300
|
({ children, version, navigation: { internal, external }, user, userMenuItems, environment, title, }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1668,11 +1667,11 @@ interface WeightedValue {
|
|
|
1668
1667
|
relevance: number;
|
|
1669
1668
|
}
|
|
1670
1669
|
interface WeightedSearchData {
|
|
1671
|
-
array: WeightedValue
|
|
1670
|
+
array: Array<WeightedValue>;
|
|
1672
1671
|
sortFunction?: (a: WeightedValue, b: WeightedValue) => number;
|
|
1673
1672
|
}
|
|
1674
1673
|
interface SearchData {
|
|
1675
|
-
array: string
|
|
1674
|
+
array: Array<string>;
|
|
1676
1675
|
sortFunction?: (a: string, b: string) => number;
|
|
1677
1676
|
}
|
|
1678
1677
|
interface SearchAutocompleteWrapperProps {
|
|
@@ -1698,7 +1697,7 @@ declare const SearchAutocompleteWrapper: {
|
|
|
1698
1697
|
|
|
1699
1698
|
type SearchSuggestionsProps = BaseComponentProps<HTMLDivElement, Pick<SearchProps, 'componentSize'> & {
|
|
1700
1699
|
/**Forslag som vises i listen. */
|
|
1701
|
-
suggestions?: string
|
|
1700
|
+
suggestions?: Array<string>;
|
|
1702
1701
|
/** Om listen skal vises. */
|
|
1703
1702
|
showSuggestions?: boolean;
|
|
1704
1703
|
/**Callback når et forslag blir valgt, inkludert søkefunksjon. */
|
|
@@ -1750,6 +1749,12 @@ type TableCellProps = {
|
|
|
1750
1749
|
} & (TdHTMLAttributes<HTMLTableCellElement> | ThHTMLAttributes<HTMLTableCellElement>);
|
|
1751
1750
|
declare const Cell: react.ForwardRefExoticComponent<TableCellProps & react.RefAttributes<HTMLTableCellElement>>;
|
|
1752
1751
|
|
|
1752
|
+
type TableFootProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1753
|
+
declare const Foot: react.ForwardRefExoticComponent<TableFootProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1754
|
+
|
|
1755
|
+
type TableHeadProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1756
|
+
declare const Head: react.ForwardRefExoticComponent<TableHeadProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1757
|
+
|
|
1753
1758
|
type TableDensity = 'normal' | 'compact' | 'extraCompact';
|
|
1754
1759
|
type TableProps = {
|
|
1755
1760
|
/**Spesifiserer hvor romslige cellene i tabellen skal være. */
|
|
@@ -1759,21 +1764,6 @@ type TableProps = {
|
|
|
1759
1764
|
/**Legger skillelinjer mellom radene. */
|
|
1760
1765
|
withDividers?: boolean;
|
|
1761
1766
|
} & HTMLAttributes<HTMLTableElement>;
|
|
1762
|
-
type HeaderValues = {
|
|
1763
|
-
key: string;
|
|
1764
|
-
content: ReactNode;
|
|
1765
|
-
}[];
|
|
1766
|
-
type CollapsibleTableProps = {
|
|
1767
|
-
/**Om tabellen skal kollapse. */
|
|
1768
|
-
isCollapsed?: boolean;
|
|
1769
|
-
/**Innhold i headere (`content`) og deres `key`. `headerValues.content` må være den samme som faktisk innhold i `<Table.Cell type='head'>`. */
|
|
1770
|
-
headerValues: HeaderValues;
|
|
1771
|
-
/**
|
|
1772
|
-
* Indeksen(e) til kolonnen(e) som skal synes når tabellen er kollapset. Rekkefølgen i array avgjør rekkefølgen i render.
|
|
1773
|
-
* @default [0]
|
|
1774
|
-
* */
|
|
1775
|
-
definingColumnIndex?: number[];
|
|
1776
|
-
} & TableProps;
|
|
1777
1767
|
type TableRowType = 'body' | 'head';
|
|
1778
1768
|
type RowMode = 'normal' | 'sum';
|
|
1779
1769
|
type TableRowProps = {
|
|
@@ -1790,29 +1780,6 @@ type TableRowProps = {
|
|
|
1790
1780
|
hoverable?: boolean;
|
|
1791
1781
|
} & HTMLAttributes<HTMLTableRowElement>;
|
|
1792
1782
|
|
|
1793
|
-
declare const CollapsibleRow: react.ForwardRefExoticComponent<{
|
|
1794
|
-
type?: TableRowType | undefined;
|
|
1795
|
-
mode?: RowMode | undefined;
|
|
1796
|
-
selected?: boolean | undefined;
|
|
1797
|
-
hoverable?: boolean | undefined;
|
|
1798
|
-
} & react.HTMLAttributes<HTMLTableRowElement> & react.RefAttributes<HTMLTableRowElement>>;
|
|
1799
|
-
|
|
1800
|
-
declare const CollapsibleTable$1: react.ForwardRefExoticComponent<{
|
|
1801
|
-
isCollapsed?: boolean | undefined;
|
|
1802
|
-
headerValues: HeaderValues;
|
|
1803
|
-
definingColumnIndex?: number[] | undefined;
|
|
1804
|
-
} & {
|
|
1805
|
-
density?: TableDensity | undefined;
|
|
1806
|
-
stickyHeader?: boolean | undefined;
|
|
1807
|
-
withDividers?: boolean | undefined;
|
|
1808
|
-
} & react.HTMLAttributes<HTMLTableElement> & react.RefAttributes<HTMLTableElement>>;
|
|
1809
|
-
|
|
1810
|
-
type TableFootProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1811
|
-
declare const Foot: react.ForwardRefExoticComponent<TableFootProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1812
|
-
|
|
1813
|
-
type TableHeadProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1814
|
-
declare const Head: react.ForwardRefExoticComponent<TableHeadProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1815
|
-
|
|
1816
1783
|
declare const Row: react.ForwardRefExoticComponent<{
|
|
1817
1784
|
type?: TableRowType | undefined;
|
|
1818
1785
|
mode?: RowMode | undefined;
|
|
@@ -1860,10 +1827,6 @@ type TableCompoundProps = typeof Table$1 & {
|
|
|
1860
1827
|
SortCell: typeof SortCell;
|
|
1861
1828
|
};
|
|
1862
1829
|
declare const Table: TableCompoundProps;
|
|
1863
|
-
type CollapsibleTableCompoundProps = typeof CollapsibleTable$1 & {
|
|
1864
|
-
Row: typeof CollapsibleRow;
|
|
1865
|
-
};
|
|
1866
|
-
declare const CollapsibleTable: CollapsibleTableCompoundProps;
|
|
1867
1830
|
|
|
1868
1831
|
type BreadcrumbProps = HTMLAttributes<HTMLSpanElement> | AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
1869
1832
|
declare const Breadcrumb: react.ForwardRefExoticComponent<BreadcrumbProps & react.RefAttributes<HTMLElement>>;
|
|
@@ -1893,7 +1856,7 @@ type PaginationProps = BaseComponentProps<HTMLElement, {
|
|
|
1893
1856
|
/**Spesifiserer om `<Select />` til å velge antall resultater per side skal vises. */
|
|
1894
1857
|
withSelect?: boolean;
|
|
1895
1858
|
/**Custom options for `<Select />`. **OBS!** hvis det settes custom `selectOptions` bør "alle"-alternativet inkluderes der det er relevant, da brukere ofte liker å ha muligheten. */
|
|
1896
|
-
selectOptions?: PaginationOption
|
|
1859
|
+
selectOptions?: Array<PaginationOption>;
|
|
1897
1860
|
/**Brukes til å hente side og eventuelt annen logikk ved endring av side. */
|
|
1898
1861
|
onChange?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, page: number) => void;
|
|
1899
1862
|
/**Brukes til å hente `selectedOption` og eventuelt kjøre annen logikk når `withSelect=true` ved endring av alternativ. */
|
|
@@ -2118,9 +2081,9 @@ type InternalHeaderProps = BaseComponentProps<HTMLDivElement, {
|
|
|
2118
2081
|
/**Info om brukeren. Dukker opp som punkt på toppen av kontekstmenyen med tekst oppgitt i name. Blir en lenke hvis href er oppgitt. */
|
|
2119
2082
|
userProps?: InternaHeaderUserProps;
|
|
2120
2083
|
/**Lenker som skal vises i navigasjonsmenyen. */
|
|
2121
|
-
navigationElements?: NavigationLinkProps
|
|
2084
|
+
navigationElements?: Array<NavigationLinkProps>;
|
|
2122
2085
|
/**Lenker eller knapper som skal vises i kontekstmenyen. Støtter ikon i tillegg til tekst. */
|
|
2123
|
-
contextMenuElements?: ContextMenuElementProps
|
|
2086
|
+
contextMenuElements?: Array<ContextMenuElementProps>;
|
|
2124
2087
|
/**URL til siden i navigasjonen brukeren er på. Gir highlight til navigasjonselementet i navigationElements med samme URL. */
|
|
2125
2088
|
currentPageHref?: string;
|
|
2126
2089
|
/**Ekstra logikk som kjøres når currentPage endres. */
|
|
@@ -2309,7 +2272,7 @@ type DateFieldProps<T extends DateValue$1 = CalendarDate> = AriaDateFieldOptions
|
|
|
2309
2272
|
* For å sette en egendefinert bredde på komponenten.
|
|
2310
2273
|
*/
|
|
2311
2274
|
width?: CSS.Properties['width'];
|
|
2312
|
-
} & Pick<InputProps
|
|
2275
|
+
} & Pick<InputProps, 'componentSize' | 'errorMessage' | 'tip' | 'disabled' | 'style'>;
|
|
2313
2276
|
|
|
2314
2277
|
interface DatePickerProps extends Omit<AriaDatePickerProps<CalendarDate>, 'granularity'>, Pick<DateFieldProps<CalendarDate>, 'componentSize' | 'tip' | 'style'> {
|
|
2315
2278
|
label?: string;
|
|
@@ -2807,7 +2770,7 @@ interface SplitButtonProps {
|
|
|
2807
2770
|
/**Props for primær handling. Samme props som for `<Button />` unntatt `size`, `purpose`, og `appearance`. */
|
|
2808
2771
|
primaryAction: Omit<ButtonProps$1, 'size' | 'apperance' | 'purpose'>;
|
|
2809
2772
|
/**Props for sekunære handlinger. */
|
|
2810
|
-
secondaryActions: OverflowMenuButtonItem
|
|
2773
|
+
secondaryActions: Array<OverflowMenuButtonItem>;
|
|
2811
2774
|
/**Formål med knappen */
|
|
2812
2775
|
purpose?: SplitButtonPurpose;
|
|
2813
2776
|
}
|
|
@@ -2874,7 +2837,7 @@ type AudioMimeType = 'aac' | 'midi' | 'x-midi' | 'mpeg' | 'ogg' | 'opus' | 'wav'
|
|
|
2874
2837
|
type ApplicationMimeType = 'octet-stream' | 'msword' | 'vnd.openxmlformats-officedocument.wordprocessingml.document' | 'epub+zip' | 'gzip' | 'java-archive' | 'json' | 'vnd.oasis.opendocument.presentation' | 'vnd.oasis.opendocument.spreadsheet' | 'vnd.oasis.opendocument.text' | 'pdf' | 'vnd.ms-powerpoint' | 'vnd.openxmlformats-officedocument.presentationml.presentation' | 'rtf' | 'x-sh' | 'x-tar' | 'vnd.visio' | 'xhtml+xml' | 'vnd.ms-excel' | 'vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'xml' | 'vnd.mozilla.xul+xml' | 'zip';
|
|
2875
2838
|
type MimeType = `image/${ImageMimeType | AnyMimeType}` | `video/${VideoMimeType | AnyMimeType}` | `audio/${AudioMimeType | AnyMimeType}` | `application/${ApplicationMimeType}`;
|
|
2876
2839
|
type Accept = MimeType | FileExtensionAccept;
|
|
2877
|
-
type FileList = File
|
|
2840
|
+
type FileList = Array<File>;
|
|
2878
2841
|
|
|
2879
2842
|
interface FileUploaderHookProps {
|
|
2880
2843
|
id: string | undefined;
|
|
@@ -2885,7 +2848,7 @@ interface FileUploaderHookProps {
|
|
|
2885
2848
|
/**Callback for når fil-listen endres. */
|
|
2886
2849
|
onChange: (newFiles: FileList) => void;
|
|
2887
2850
|
/**Hvilke filendelser eller mime-typer som filopplasteren skal akseptere. */
|
|
2888
|
-
accept: Accept
|
|
2851
|
+
accept: Array<Accept> | undefined;
|
|
2889
2852
|
/**Om filopplasteren er avslått eller ikke */
|
|
2890
2853
|
disabled: boolean | undefined;
|
|
2891
2854
|
/**Maks antall filer som tillates. */
|
|
@@ -2967,4 +2930,4 @@ type Layout = 'vertical' | 'horizontal';
|
|
|
2967
2930
|
|
|
2968
2931
|
declare const Feedback: ({ layout, ratingLabel, positiveFeedbackLabel, negativeFeedbackLabel, ratingSubmittedTitle, submittedTitle, ratingValue: ratingProp, feedbackTextValue: feedbackTextProp, thumbUpTooltip, thumbDownTooltip, feedbackTextAreaExcluded, loading, isSubmitted: isSubmittedProp, onRating, onFeedbackTextChange, onSubmit, }: FeedbackProps) => react_jsx_runtime.JSX.Element;
|
|
2969
2932
|
|
|
2970
|
-
export { AddressShieldedIcon, AgreementIcon, type AnchorTypographyType, AnimatedChevronUpDown, AppShell, type AppShellProps, AppsIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, type As, AttachmentIcon, BackLink, type BackLinkProps, BarChartBoxedIcon, BarChartIcon, type BaseComponentProps, type BaseComponentPropsWithChildren, type BaseTypographyProps, BlockIcon, BookIcon, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, type BreakpointBasedProps, BuildCircledIcon, BuildIcon, Button, type ButtonAppearance, type ButtonProps$1 as ButtonProps, type ButtonPurpose, type ButtonSize, Calendar, CalendarIcon, CalendarMonthIcon, type CalendarProps, CalendarViewDayIcon, CalendarViewMonthIcon, CalendarViewWeekIcon, CallIcon, type Callback, Caption, type CaptionProps, Card, CardAccordion, CardAccordionBody, type CardAccordionBodyProps, CardAccordionHeader, type CardAccordionHeaderProps, type CardAccordionProps, type CardColor, type CardProps, type CardType, CaringIcon, ChatIcon, CheckCircledIcon, CheckIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxPickedHTMLAttributes, type CheckboxProps, ChecklistIcon, ChevronDownIcon, ChevronFirstIcon, ChevronLargeLeftIcon, ChevronLargeRightIcon, ChevronLastIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, Chip, ChipGroup, type ChipGroupProps, type ChipProps, CloseCircledIcon, CloseIcon, CloseSmallIcon, CloudIcon, CollapseIcon,
|
|
2933
|
+
export { AddressShieldedIcon, AgreementIcon, type AnchorTypographyType, AnimatedChevronUpDown, AppShell, type AppShellProps, AppsIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, type As, AttachmentIcon, BackLink, type BackLinkProps, BarChartBoxedIcon, BarChartIcon, type BaseComponentProps, type BaseComponentPropsWithChildren, type BaseTypographyProps, BlockIcon, BookIcon, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, type BreakpointBasedProps, BuildCircledIcon, BuildIcon, Button, type ButtonAppearance, type ButtonProps$1 as ButtonProps, type ButtonPurpose, type ButtonSize, Calendar, CalendarIcon, CalendarMonthIcon, type CalendarProps, CalendarViewDayIcon, CalendarViewMonthIcon, CalendarViewWeekIcon, CallIcon, type Callback, Caption, type CaptionProps, Card, CardAccordion, CardAccordionBody, type CardAccordionBodyProps, CardAccordionHeader, type CardAccordionHeaderProps, type CardAccordionProps, type CardColor, type CardProps, type CardType, CaringIcon, ChatIcon, CheckCircledIcon, CheckIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxPickedHTMLAttributes, type CheckboxProps, ChecklistIcon, ChevronDownIcon, ChevronFirstIcon, ChevronLargeLeftIcon, ChevronLargeRightIcon, ChevronLastIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, Chip, ChipGroup, type ChipGroupProps, type ChipProps, CloseCircledIcon, CloseIcon, CloseSmallIcon, CloudIcon, CollapseIcon, type ColumnsOccupied, CommentIcon, type CommonInputProps, Container, CopyIcon, CourtIcon, DatePicker, type DatePickerProps, DateRangeIcon, DeathsIcon, DescriptionList, type DescriptionListAppearance, DescriptionListDesc, type DescriptionListDescProps, DescriptionListGroup, type DescriptionListGroupProps, type DescriptionListProps, DescriptionListTerm, type DescriptionListTermProps, type Direction$1 as Direction, Divider, type DividerColor, type DividerProps, DoubleChevronLeftIcon, DoubleChevronRightIcon, DownloadDoneIcon, DownloadIcon, DragHandleIcon, Drawer, DrawerGroup, type DrawerGroupProps, type DrawerPlacement, type DrawerProps, type DrawerSize, EditIcon, EmptyContent, type EmptyContentProps, ErrorIcon, ExclaimIcon, ExpandIcon, type ExpandableCardProps, type ExtractStrict, FacebookIcon, FamilyIcon, Feedback, FeedbackIcon, type FeedbackProps, FileAddIcon, FileIcon, FileShieldedIcon, FileTextIcon, FileUploader, FilterIcon, FilterListIcon, FilterListOffIcon, FilterOffIcon, FindInPageIcon, FlickrIcon, FolderAddIcon, FolderIcon, FolderShieldedIcon, FullscreenExitIcon, FullscreenIcon, GavelIcon, GlobalMessage, type GlobalMessageProps, type GlobalMessagePurpose, Grid, GridChild, type GridChildProps, type GridProps, HStack, Heading, type HeadingLevel, type HeadingProps, HelpFilledIcon, HelpIcon, HiddenInput, HomeIcon, HourglassBottom, HourglassDisabled, HourglassEmpty, HourglassFull, HourglassTop, Icon, type IconPosition, type IconProps, type IconSize, ImageIcon, type InfoCardProps, InfoIcon, InlineEditInput, type InlineEditInputProps, InlineEditTextArea, type InlineEditTextAreaProps, type InlineElement, Input, InputAffixContainer, InputContainer, InputMessage, type InputMessageProps, type InputMessageType, type InputProps, type InputSize, type InputTypographyTypes, InstagramIcon, InternalHeader, type InternalHeaderProps, JordskifterettIcon, KeyIcon, Label, type LabelProps, type LabelTypographyType, LagmannsrettIcon, LanguageIcon, type Layout, Legend, type LegendProps, LibraryAddIcon, LineChartIcon, Link, LinkIcon, LinkOffIcon, type LinkProps, LinkedInIcon, List, ListAltIcon, ListIcon, ListItem, type ListItemProps, type ListProps, type ListType, type ListTypographyType, LocalMessage, type LocalMessageLayout, type LocalMessageProps, type LocalMessagePurpose, LocationIcon, LockIcon, LockOpenIcon, LoginIcon, LogoutIcon, MailIcon, MailOpenIcon, MenuIcon, MinusCirledIcon, MinusIcon, Modal, ModalActions, type ModalActionsProps, ModalBody, type ModalBodyProps, type ModalProps, MoreHorizontalIcon, MoreVerticalIcon, type NavigationCardProps, NotarialIcon, NotificationsIcon, NotificationsOffIcon, type Nullable, OnlineMeetingIcon, OpenExternalIcon, type OtherTypographyType, OuterInputContainer, OverflowMenu, type OverflowMenuButtonItem, type OverflowMenuContextItem, OverflowMenuGroup, type OverflowMenuGroupProps, type OverflowMenuLinkItem, OverflowMenuList, type OverflowMenuNavItem, type OverflowMenuProps, Pagination, type PaginationOption, type PaginationProps, Paper, type PaperProps, Paragraph, type ParagraphProps, PayoutIcon, PdfIcon, PersonAddIcon, PersonIcon, PersonShieldedIcon, PinIcon, type Placement, PlusCircledIcon, PlusIcon, Popover, PopoverGroup, type PopoverGroupProps, type PopoverProps, type PopoverSizeProps, PrintIcon, ProgressTracker, PropertyIcon, type PropsOf, PublishIcon, QuestionAnswerIcon, RadioButton, RadioButtonGroup, type RadioButtonGroupProps, type RadioButtonProps, type Rating, ReceiptIcon, RedoIcon, RefreshIcon, ReplayIcon, RequiredMarker, ScreenSize, type ScreenSizeLiteral, ScrollableContainer, type ScrollableContainerProps, Scrollbar, type ScrollbarProps, Search, type SearchAutocompleteWrapperProps, type SearchData, SearchIcon, type SearchProps, type SearchSize, type SearchSuggestionsProps, Select, type SelectOption, type SelectProps, SettingsIcon, SkipToContent, type SkipToContentProps, SmsIcon, type SortOrder, Spinner, type SpinnerProps, SplitButton, type SplitButtonProps, type SplitButtonPurpose, type StackProps, type StackStyleProps, StarFilledIcon, StarHalfFilled, StarIcon, StatefulInput, type StaticTypographyType, type StyledCommonInputProps, type StyledInputProps, StyledSvg, StyledTextArea, type SvgIcon, type SvgProps, SyncIcon, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, Table, type TableBodyProps, type TableCellLayout, type TableCellProps, type TableCellType, type TableDensity, type TableFootProps, type TableHeadProps, type TableProps, type TableRowProps, type TableRowType, type TableSortCellProps, Tabs, type TabsProps, Tag, type TagProps, type TagPurpose, type TextAffixProps, TextArea, type TextAreaProps, TextInput, type TextInputProps, TextOverflowEllipsisInner, TextOverflowEllipsisWrapper, Thumbdown, ThumbdownFilled, Thumbup, ThumbupFilled, TimeIcon, TimePicker, type TimePickerProps, TingrettIcon, TipIcon, ToggleBar, type ToggleBarProps, type ToggleBarSize, type ToggleBarValue, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, ToggleRadio, type ToggleRadioProps, Tooltip, type TooltipProps, TrashIcon, TrendingDownIcon, TrendingUpIcon, TwitterIcon, Typography, type TypographyBodyType, type TypographyComponentProps, type TypographyHeadingType, type TypographyInteractionStyling, type TypographyLeadType, type TypographyProps, type TypographyType, UndoIcon, UnfoldLessIcon, UnfoldMoreIcon, UploadIcon, VStack, VisibilityOffIcon, VisibilityOnIcon, VisuallyHidden, type VisuallyHiddenProps, WarningIcon, type WeightedSearchData, type WidthProps, type WithRequiredIf, ZoomInIcon, ZoomOutIcon, calendarDateToNativeDate, cn, createSelectOptions, dangerInputfield, dateValueToNativeDate, defaultTypographyType, focusDangerInputfield, focusInputfield, focusVisible, focusVisibleInset, focusVisibleLink, focusVisibleLinkOnDark, focusVisibleLinkTransitionValue, focusVisibleOnDark, focusVisibleThickWithBorderOnDark, focusVisibleTransitionValue, focusVisibleWithBorder, getAdditionalFontStyle, getAnchorStyling, getBaseHTMLProps, getDefaultText, getElementType, getFontStyling, getLiteralScreenSize, getMarginStyling, hideInput, hoverDangerInputfield, hoverInputfield, hoverWithBorder, index as icons, inlineElements, inputTokens, inputTypographyTypes, isGridColumn, isHeading, isInlineElement, isKeyboardEvent, isRelativeGridColumn, nativeDateToCalendarDate, nativeDateToDateValue, nativeDateToTime, normalizeButton, outlineOffset, removeButtonStyling, removeListStyling, scrollbarStyling, selection, useCombinedRef, useFloatPosition, useFocusTrap, useIsMounted, useMountTransition, useOnClickOutside, useOnKeyDown, useReturnFocusOnBlur, useRoveFocus, useScreenSize, visibilityTransition };
|