@norges-domstoler/dds-components 14.2.0 → 14.3.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/index.d.mts +99 -77
- package/dist/index.d.ts +99 -77
- package/dist/index.js +1715 -1706
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1925 -1903
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -4,16 +4,16 @@ import { Property, StandardProperties } from 'csstype';
|
|
|
4
4
|
import * as styled_components from 'styled-components';
|
|
5
5
|
import * as styled_components_dist_types from 'styled-components/dist/types';
|
|
6
6
|
import * as react from 'react';
|
|
7
|
-
import react__default, {
|
|
7
|
+
import react__default, { HTMLAttributes, PropsWithChildren, ElementType, ComponentPropsWithoutRef, CSSProperties, AnchorHTMLAttributes, LabelHTMLAttributes, InputHTMLAttributes, RefCallback, RefObject, KeyboardEvent as KeyboardEvent$1, Dispatch, SetStateAction, SVGAttributes, ButtonHTMLAttributes, ReactNode, ReactElement, MouseEventHandler, ChangeEvent, Ref, MouseEvent as MouseEvent$1, TdHTMLAttributes, ThHTMLAttributes, ForwardRefExoticComponent, TextareaHTMLAttributes } from 'react';
|
|
8
8
|
import { TextColor as TextColor$1 } from '@norges-domstoler/dds-components/src/utils';
|
|
9
9
|
import * as _floating_ui_react_dom from '@floating-ui/react-dom';
|
|
10
10
|
import { Strategy, Placement as Placement$1 } from '@floating-ui/react-dom';
|
|
11
11
|
import { Environment } from '@norges-domstoler/development-utils';
|
|
12
12
|
import { OptionProps, GroupBase, SingleValueProps, Props, SelectInstance } from 'react-select';
|
|
13
13
|
import { DateValue, AriaCalendarProps } from '@react-aria/calendar';
|
|
14
|
+
import { DateValue as DateValue$1, CalendarDate, Time } from '@internationalized/date';
|
|
14
15
|
import { AriaDatePickerProps } from '@react-types/datepicker';
|
|
15
16
|
import { AriaDateFieldOptions, useDatePicker, AriaTimeFieldProps } from '@react-aria/datepicker';
|
|
16
|
-
import { DateValue as DateValue$1, CalendarDate, Time } from '@internationalized/date';
|
|
17
17
|
import { InputProps as InputProps$1 } from '@norges-domstoler/dds-components';
|
|
18
18
|
|
|
19
19
|
interface SvgChevronProps {
|
|
@@ -37,43 +37,6 @@ declare const OuterInputContainer: styled_components.IStyledComponent<"web", sty
|
|
|
37
37
|
declare const InputContainer: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
38
38
|
declare const InputAffixContainer: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
39
39
|
|
|
40
|
-
declare const TextOverflowEllipsisWrapper: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>;
|
|
41
|
-
declare const TextOverflowEllipsisInner: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>;
|
|
42
|
-
|
|
43
|
-
type TypographyBodySansType = 'bodySans01' | 'bodySans02' | 'bodySans03' | 'bodySans04';
|
|
44
|
-
type TypographyBodyType = TypographyBodySansType;
|
|
45
|
-
type TypographyHeadingType = 'headingSans01' | 'headingSans02' | 'headingSans03' | 'headingSans04' | 'headingSans05' | 'headingSans06' | 'headingSans07' | 'headingSans08';
|
|
46
|
-
type TypographyLeadType = 'leadSans01' | 'leadSans02' | 'leadSans03' | 'leadSans04' | 'leadSans05';
|
|
47
|
-
type TypographySupportingType = 'supportingStyleHelperText01' | 'supportingStylePlaceholderText01' | 'supportingStylePlaceholderText02' | 'supportingStylePlaceholderText03' | 'supportingStyleTiny01' | 'supportingStyleTiny02';
|
|
48
|
-
type AnchorTypographyType = 'a';
|
|
49
|
-
type LabelTypographyType = 'supportingStyleLabel01';
|
|
50
|
-
type OtherTypographyType = TypographyHeadingType | TypographyBodyType | TypographyLeadType | TypographySupportingType;
|
|
51
|
-
type TypographyType = AnchorTypographyType | LabelTypographyType | OtherTypographyType;
|
|
52
|
-
type StaticTypographyType = OtherTypographyType | LabelTypographyType;
|
|
53
|
-
type InlineElement = 'a' | 'abbr' | 'audio' | 'b' | 'bdi' | 'bdo' | 'big' | 'br' | 'button' | 'canvas' | 'cite' | 'code' | 'data' | 'datalist' | 'del' | 'dfn' | 'em' | 'embed' | 'i' | 'iframe' | 'img' | 'input' | 'ins' | 'kbd' | 'label' | 'map' | 'mark' | 'meter' | 'noscript' | 'object' | 'output' | 'picture' | 'progress' | 'q' | 'ruby' | 's' | 'samp' | 'script' | 'select' | 'slot' | 'small' | 'span' | 'strong' | 'sub' | 'sup' | 'svg' | 'template' | 'textarea' | 'time' | 'u' | 'var' | 'video' | 'wbr';
|
|
54
|
-
interface TypographyInteractionStyling {
|
|
55
|
-
hover?: CSSProperties;
|
|
56
|
-
active?: CSSProperties;
|
|
57
|
-
}
|
|
58
|
-
type BaseTypographyProps = PropsWithChildren<{
|
|
59
|
-
/**Spesifiserer om tekstelementet skal ha spacing definert i Elsa. Brukes hovedsakelig i artikler og lignende. **OBS!** har forskjellig virkning på ulike typografityper. `body` og `lead`-typer får margin på bunnen, `heading`-typer får margin på bunnen og padding på toppen mens `supportingStyles` får margin topp og bunn. */
|
|
60
|
-
withMargins?: boolean;
|
|
61
|
-
}> & Pick<HTMLAttributes<HTMLElement>, 'style'>;
|
|
62
|
-
type TypographyComponentProps = BaseTypographyProps & {
|
|
63
|
-
/**Tekstfarge fra utvalget eller custom. **OBS!** Bruk farger fra `@dds-design-tokens`. */
|
|
64
|
-
color?: TextColor$1;
|
|
65
|
-
/**Setter `bold` styling. */
|
|
66
|
-
bold?: boolean;
|
|
67
|
-
/**Setter `italic` styling. */
|
|
68
|
-
italic?: boolean;
|
|
69
|
-
/**Setter en linje under. */
|
|
70
|
-
underline?: boolean;
|
|
71
|
-
/**HTML tag som skal brukes istedenfor default definert via `typographyType`. */
|
|
72
|
-
as?: ElementType;
|
|
73
|
-
/**Støtte for å enkelt kunne endre på hover- og active-styling. Bruk `@dds-design-tokens` til farger osv. */
|
|
74
|
-
interactionProps?: TypographyInteractionStyling;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
40
|
type Direction$1 = 'row' | 'column';
|
|
78
41
|
|
|
79
42
|
/**
|
|
@@ -155,6 +118,43 @@ type ExtractStrict<T, U extends T> = U;
|
|
|
155
118
|
type Nullable<T> = T | null;
|
|
156
119
|
type Callback<T> = (e: T) => void;
|
|
157
120
|
|
|
121
|
+
declare const TextOverflowEllipsisWrapper: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>;
|
|
122
|
+
declare const TextOverflowEllipsisInner: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>;
|
|
123
|
+
|
|
124
|
+
type TypographyBodySansType = 'bodySans01' | 'bodySans02' | 'bodySans03' | 'bodySans04';
|
|
125
|
+
type TypographyBodyType = TypographyBodySansType;
|
|
126
|
+
type TypographyHeadingType = 'headingSans01' | 'headingSans02' | 'headingSans03' | 'headingSans04' | 'headingSans05' | 'headingSans06' | 'headingSans07' | 'headingSans08';
|
|
127
|
+
type TypographyLeadType = 'leadSans01' | 'leadSans02' | 'leadSans03' | 'leadSans04' | 'leadSans05';
|
|
128
|
+
type TypographySupportingType = 'supportingStyleHelperText01' | 'supportingStylePlaceholderText01' | 'supportingStylePlaceholderText02' | 'supportingStylePlaceholderText03' | 'supportingStyleTiny01' | 'supportingStyleTiny02';
|
|
129
|
+
type AnchorTypographyType = 'a';
|
|
130
|
+
type LabelTypographyType = 'supportingStyleLabel01';
|
|
131
|
+
type OtherTypographyType = TypographyHeadingType | TypographyBodyType | TypographyLeadType | TypographySupportingType;
|
|
132
|
+
type TypographyType = AnchorTypographyType | LabelTypographyType | OtherTypographyType;
|
|
133
|
+
type StaticTypographyType = OtherTypographyType | LabelTypographyType;
|
|
134
|
+
type InlineElement = 'a' | 'abbr' | 'audio' | 'b' | 'bdi' | 'bdo' | 'big' | 'br' | 'button' | 'canvas' | 'cite' | 'code' | 'data' | 'datalist' | 'del' | 'dfn' | 'em' | 'embed' | 'i' | 'iframe' | 'img' | 'input' | 'ins' | 'kbd' | 'label' | 'map' | 'mark' | 'meter' | 'noscript' | 'object' | 'output' | 'picture' | 'progress' | 'q' | 'ruby' | 's' | 'samp' | 'script' | 'select' | 'slot' | 'small' | 'span' | 'strong' | 'sub' | 'sup' | 'svg' | 'template' | 'textarea' | 'time' | 'u' | 'var' | 'video' | 'wbr';
|
|
135
|
+
interface TypographyInteractionStyling {
|
|
136
|
+
hover?: CSSProperties;
|
|
137
|
+
active?: CSSProperties;
|
|
138
|
+
}
|
|
139
|
+
type BaseTypographyProps = PropsWithChildren<{
|
|
140
|
+
/**Spesifiserer om tekstelementet skal ha spacing definert i Elsa. Brukes hovedsakelig i artikler og lignende. **OBS!** har forskjellig virkning på ulike typografityper. `body` og `lead`-typer får margin på bunnen, `heading`-typer får margin på bunnen og padding på toppen mens `supportingStyles` får margin topp og bunn. */
|
|
141
|
+
withMargins?: boolean;
|
|
142
|
+
}> & Pick<HTMLAttributes<HTMLElement>, 'style'>;
|
|
143
|
+
type TypographyComponentProps = BaseTypographyProps & {
|
|
144
|
+
/**Tekstfarge fra utvalget eller custom. **OBS!** Bruk farger fra `@dds-design-tokens`. */
|
|
145
|
+
color?: TextColor$1;
|
|
146
|
+
/**Setter `bold` styling. */
|
|
147
|
+
bold?: boolean;
|
|
148
|
+
/**Setter `italic` styling. */
|
|
149
|
+
italic?: boolean;
|
|
150
|
+
/**Setter en linje under. */
|
|
151
|
+
underline?: boolean;
|
|
152
|
+
/**HTML tag som skal brukes istedenfor default definert via `typographyType`. */
|
|
153
|
+
as?: ElementType;
|
|
154
|
+
/**Støtte for å enkelt kunne endre på hover- og active-styling. Bruk `@dds-design-tokens` til farger osv. */
|
|
155
|
+
interactionProps?: TypographyInteractionStyling;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
158
|
type AnchorTypographyProps = BaseComponentProps<HTMLAnchorElement, TypographyComponentProps & {
|
|
159
159
|
/**nativ `href`-prop ved `typographyType='a'`. */
|
|
160
160
|
href?: string | undefined;
|
|
@@ -1572,11 +1572,11 @@ type SelectProps<Option = unknown, IsMulti extends boolean = false> = {
|
|
|
1572
1572
|
/** CSS klassenavn. */
|
|
1573
1573
|
className?: string;
|
|
1574
1574
|
/** Inline styling. */
|
|
1575
|
-
style?:
|
|
1575
|
+
style?: React.CSSProperties;
|
|
1576
1576
|
customOptionElement?: (props: OptionProps<Option, IsMulti, GroupBase<Option>>) => JSX.Element;
|
|
1577
1577
|
customSingleValueElement?: (props: SingleValueProps<Option, IsMulti, GroupBase<Option>>) => JSX.Element;
|
|
1578
1578
|
} & Pick<HTMLAttributes<HTMLInputElement>, 'aria-required'> & WrappedReactSelectProps<Option, IsMulti, GroupBase<Option>>;
|
|
1579
|
-
type ForwardRefType<Option, IsMulti extends boolean> =
|
|
1579
|
+
type ForwardRefType<Option, IsMulti extends boolean> = React.ForwardedRef<SelectInstance<Option, IsMulti, GroupBase<Option>>>;
|
|
1580
1580
|
declare function SelectInner<Option = unknown, IsMulti extends boolean = false>(props: SelectProps<Option, IsMulti>, ref: ForwardRefType<Option, IsMulti>): react_jsx_runtime.JSX.Element;
|
|
1581
1581
|
declare const Select: typeof SelectInner;
|
|
1582
1582
|
|
|
@@ -1729,6 +1729,27 @@ type SearchCompoundProps = typeof Search$1 & {
|
|
|
1729
1729
|
};
|
|
1730
1730
|
declare const Search: SearchCompoundProps;
|
|
1731
1731
|
|
|
1732
|
+
type TableBodyProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1733
|
+
declare const Body: react.ForwardRefExoticComponent<TableBodyProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1734
|
+
|
|
1735
|
+
type TableCellType = 'data' | 'head';
|
|
1736
|
+
type TableCellLayout = 'left' | 'right' | 'center' | 'text and icon';
|
|
1737
|
+
interface CollapsibleProps {
|
|
1738
|
+
isCollapsibleChild?: boolean;
|
|
1739
|
+
}
|
|
1740
|
+
type TableCellProps = {
|
|
1741
|
+
/**
|
|
1742
|
+
* Type celle. Returnerer enten `<td>` eller `<th>`.
|
|
1743
|
+
* @default 'data' hvis den er brukt i `<Table.Body>` eller `<Table.Foot>`, 'head' hvis den er i `<Table.Head>`.
|
|
1744
|
+
*/
|
|
1745
|
+
type?: TableCellType;
|
|
1746
|
+
/**Layout av innholdet i cellen. 'tekst and icon' legger `gap` mellom barna og andre barnet i cellen. */
|
|
1747
|
+
layout?: TableCellLayout;
|
|
1748
|
+
/** Props ved bruk av `<CollapsibleRow>`. **OBS!** settes automatisk av forelder. */
|
|
1749
|
+
collapsibleProps?: CollapsibleProps;
|
|
1750
|
+
} & (TdHTMLAttributes<HTMLTableCellElement> | ThHTMLAttributes<HTMLTableCellElement>);
|
|
1751
|
+
declare const Cell: react.ForwardRefExoticComponent<TableCellProps & react.RefAttributes<HTMLTableCellElement>>;
|
|
1752
|
+
|
|
1732
1753
|
type TableDensity = 'normal' | 'compact' | 'extraCompact';
|
|
1733
1754
|
type TableProps = {
|
|
1734
1755
|
/**Spesifiserer hvor romslige cellene i tabellen skal være. */
|
|
@@ -1756,7 +1777,10 @@ type CollapsibleTableProps = {
|
|
|
1756
1777
|
type TableRowType = 'body' | 'head';
|
|
1757
1778
|
type RowMode = 'normal' | 'sum';
|
|
1758
1779
|
type TableRowProps = {
|
|
1759
|
-
/**
|
|
1780
|
+
/**
|
|
1781
|
+
* Spesifiserer om raden skal brukes i `<head>` eller `<body>`-seksjonen.
|
|
1782
|
+
* @default 'body' hvis den er brukt i `<Table.Body>` eller `<Table.Foot>`, 'head' hvis den er i `<Table.Head>`.
|
|
1783
|
+
*/
|
|
1760
1784
|
type?: TableRowType;
|
|
1761
1785
|
/**Custom modus for rader som har ytterligere semantisk betydning (f.eks. summeringsrad), definerer kun styling. Ved bruk av sum må `<Cell>` med tall i høyrestilles vha layout prop. */
|
|
1762
1786
|
mode?: RowMode;
|
|
@@ -1766,11 +1790,12 @@ type TableRowProps = {
|
|
|
1766
1790
|
hoverable?: boolean;
|
|
1767
1791
|
} & HTMLAttributes<HTMLTableRowElement>;
|
|
1768
1792
|
|
|
1769
|
-
declare const
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
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>>;
|
|
1774
1799
|
|
|
1775
1800
|
declare const CollapsibleTable$1: react.ForwardRefExoticComponent<{
|
|
1776
1801
|
isCollapsed?: boolean | undefined;
|
|
@@ -1782,44 +1807,19 @@ declare const CollapsibleTable$1: react.ForwardRefExoticComponent<{
|
|
|
1782
1807
|
withDividers?: boolean | undefined;
|
|
1783
1808
|
} & react.HTMLAttributes<HTMLTableElement> & react.RefAttributes<HTMLTableElement>>;
|
|
1784
1809
|
|
|
1785
|
-
type TableHeadProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1786
|
-
declare const Head: react.ForwardRefExoticComponent<TableHeadProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1787
|
-
|
|
1788
|
-
type TableBodyProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1789
|
-
declare const Body: react.ForwardRefExoticComponent<TableBodyProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1790
|
-
|
|
1791
1810
|
type TableFootProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1792
1811
|
declare const Foot: react.ForwardRefExoticComponent<TableFootProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1793
1812
|
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
mode?: RowMode | undefined;
|
|
1797
|
-
selected?: boolean | undefined;
|
|
1798
|
-
hoverable?: boolean | undefined;
|
|
1799
|
-
} & react.HTMLAttributes<HTMLTableRowElement> & react.RefAttributes<HTMLTableRowElement>>;
|
|
1813
|
+
type TableHeadProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1814
|
+
declare const Head: react.ForwardRefExoticComponent<TableHeadProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1800
1815
|
|
|
1801
|
-
declare const
|
|
1816
|
+
declare const Row: react.ForwardRefExoticComponent<{
|
|
1802
1817
|
type?: TableRowType | undefined;
|
|
1803
1818
|
mode?: RowMode | undefined;
|
|
1804
1819
|
selected?: boolean | undefined;
|
|
1805
1820
|
hoverable?: boolean | undefined;
|
|
1806
1821
|
} & react.HTMLAttributes<HTMLTableRowElement> & react.RefAttributes<HTMLTableRowElement>>;
|
|
1807
1822
|
|
|
1808
|
-
type TableCellType = 'data' | 'head';
|
|
1809
|
-
type TableCellLayout = 'left' | 'right' | 'center' | 'text and icon';
|
|
1810
|
-
interface CollapsibleProps {
|
|
1811
|
-
isCollapsibleChild?: boolean;
|
|
1812
|
-
}
|
|
1813
|
-
type TableCellProps = {
|
|
1814
|
-
/**Type celle. Returnerer enten `<td>` eller `<th>`. */
|
|
1815
|
-
type?: TableCellType;
|
|
1816
|
-
/**Layout av innholdet i cellen. 'tekst and icon' legger `gap` mellom barna og andre barnet i cellen. */
|
|
1817
|
-
layout?: TableCellLayout;
|
|
1818
|
-
/** Props ved bruk av `<CollapsibleRow>`. **OBS!** settes automatisk av forelder. */
|
|
1819
|
-
collapsibleProps?: CollapsibleProps;
|
|
1820
|
-
} & (TdHTMLAttributes<HTMLTableCellElement> | ThHTMLAttributes<HTMLTableCellElement>);
|
|
1821
|
-
declare const Cell: react.ForwardRefExoticComponent<TableCellProps & react.RefAttributes<HTMLTableCellElement>>;
|
|
1822
|
-
|
|
1823
1823
|
type SortOrder = 'ascending' | 'descending';
|
|
1824
1824
|
type TableSortCellProps = {
|
|
1825
1825
|
/**Spesifiserer om kolonnen er sortert. */
|
|
@@ -1838,6 +1838,12 @@ declare const SortCell: react.ForwardRefExoticComponent<{
|
|
|
1838
1838
|
onClick: (event: MouseEvent$1<HTMLButtonElement>) => void;
|
|
1839
1839
|
} & Omit<TableCellProps, "type"> & react.RefAttributes<HTMLTableCellElement>>;
|
|
1840
1840
|
|
|
1841
|
+
declare const Table$1: react.ForwardRefExoticComponent<{
|
|
1842
|
+
density?: TableDensity | undefined;
|
|
1843
|
+
stickyHeader?: boolean | undefined;
|
|
1844
|
+
withDividers?: boolean | undefined;
|
|
1845
|
+
} & react.HTMLAttributes<HTMLTableElement> & react.RefAttributes<HTMLTableElement>>;
|
|
1846
|
+
|
|
1841
1847
|
type TableWrapperProps = HTMLAttributes<HTMLDivElement>;
|
|
1842
1848
|
declare const TableWrapper: {
|
|
1843
1849
|
({ children, ...rest }: TableWrapperProps): react_jsx_runtime.JSX.Element;
|
|
@@ -2299,20 +2305,36 @@ declare namespace Calendar {
|
|
|
2299
2305
|
type DateFieldProps<T extends DateValue$1 = CalendarDate> = AriaDateFieldOptions<T> & {
|
|
2300
2306
|
className?: string;
|
|
2301
2307
|
buttonProps?: ReturnType<typeof useDatePicker>['buttonProps'];
|
|
2308
|
+
/**
|
|
2309
|
+
* For å sette en egendefinert bredde på komponenten.
|
|
2310
|
+
*/
|
|
2311
|
+
width?: CSS.Properties['width'];
|
|
2302
2312
|
} & Pick<InputProps$1, 'componentSize' | 'errorMessage' | 'tip' | 'disabled' | 'style'>;
|
|
2303
2313
|
|
|
2304
2314
|
interface DatePickerProps extends Omit<AriaDatePickerProps<CalendarDate>, 'granularity'>, Pick<DateFieldProps<CalendarDate>, 'componentSize' | 'tip' | 'style'> {
|
|
2305
2315
|
label?: string;
|
|
2306
2316
|
errorMessage?: string;
|
|
2317
|
+
/**
|
|
2318
|
+
* For å sette en egendefinert bredde på komponenten.
|
|
2319
|
+
*/
|
|
2320
|
+
width?: CSS.Properties['width'];
|
|
2307
2321
|
}
|
|
2308
2322
|
declare const DatePicker: react.ForwardRefExoticComponent<DatePickerProps & react.RefAttributes<HTMLElement>>;
|
|
2309
2323
|
|
|
2310
2324
|
type TimePickerProps = Omit<AriaTimeFieldProps<Time>, 'hideTimeZone'> & {
|
|
2311
2325
|
className?: string;
|
|
2312
|
-
|
|
2326
|
+
/**
|
|
2327
|
+
* For å sette en egendefinert bredde på komponenten.
|
|
2328
|
+
*/
|
|
2329
|
+
width?: CSS.Properties['width'];
|
|
2330
|
+
} & Pick<InputProps, 'componentSize' | 'errorMessage' | 'tip' | 'disabled' | 'style'>;
|
|
2313
2331
|
declare const TimePicker: react.ForwardRefExoticComponent<Omit<AriaTimeFieldProps<Time>, "hideTimeZone"> & {
|
|
2314
2332
|
className?: string | undefined;
|
|
2315
|
-
|
|
2333
|
+
/**
|
|
2334
|
+
* For å sette en egendefinert bredde på komponenten.
|
|
2335
|
+
*/
|
|
2336
|
+
width?: CSS.Properties['width'];
|
|
2337
|
+
} & Pick<InputProps, "style" | "disabled" | "tip" | "errorMessage" | "componentSize"> & react.RefAttributes<HTMLDivElement>>;
|
|
2316
2338
|
|
|
2317
2339
|
declare function nativeDateToDateValue(date: Date, timeZone?: string | undefined): DateValue$1;
|
|
2318
2340
|
declare function dateValueToNativeDate(date: DateValue$1, timeZone?: string | undefined): Date;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,16 +4,16 @@ import { Property, StandardProperties } from 'csstype';
|
|
|
4
4
|
import * as styled_components from 'styled-components';
|
|
5
5
|
import * as styled_components_dist_types from 'styled-components/dist/types';
|
|
6
6
|
import * as react from 'react';
|
|
7
|
-
import react__default, {
|
|
7
|
+
import react__default, { HTMLAttributes, PropsWithChildren, ElementType, ComponentPropsWithoutRef, CSSProperties, AnchorHTMLAttributes, LabelHTMLAttributes, InputHTMLAttributes, RefCallback, RefObject, KeyboardEvent as KeyboardEvent$1, Dispatch, SetStateAction, SVGAttributes, ButtonHTMLAttributes, ReactNode, ReactElement, MouseEventHandler, ChangeEvent, Ref, MouseEvent as MouseEvent$1, TdHTMLAttributes, ThHTMLAttributes, ForwardRefExoticComponent, TextareaHTMLAttributes } from 'react';
|
|
8
8
|
import { TextColor as TextColor$1 } from '@norges-domstoler/dds-components/src/utils';
|
|
9
9
|
import * as _floating_ui_react_dom from '@floating-ui/react-dom';
|
|
10
10
|
import { Strategy, Placement as Placement$1 } from '@floating-ui/react-dom';
|
|
11
11
|
import { Environment } from '@norges-domstoler/development-utils';
|
|
12
12
|
import { OptionProps, GroupBase, SingleValueProps, Props, SelectInstance } from 'react-select';
|
|
13
13
|
import { DateValue, AriaCalendarProps } from '@react-aria/calendar';
|
|
14
|
+
import { DateValue as DateValue$1, CalendarDate, Time } from '@internationalized/date';
|
|
14
15
|
import { AriaDatePickerProps } from '@react-types/datepicker';
|
|
15
16
|
import { AriaDateFieldOptions, useDatePicker, AriaTimeFieldProps } from '@react-aria/datepicker';
|
|
16
|
-
import { DateValue as DateValue$1, CalendarDate, Time } from '@internationalized/date';
|
|
17
17
|
import { InputProps as InputProps$1 } from '@norges-domstoler/dds-components';
|
|
18
18
|
|
|
19
19
|
interface SvgChevronProps {
|
|
@@ -37,43 +37,6 @@ declare const OuterInputContainer: styled_components.IStyledComponent<"web", sty
|
|
|
37
37
|
declare const InputContainer: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
38
38
|
declare const InputAffixContainer: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
39
39
|
|
|
40
|
-
declare const TextOverflowEllipsisWrapper: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>;
|
|
41
|
-
declare const TextOverflowEllipsisInner: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>;
|
|
42
|
-
|
|
43
|
-
type TypographyBodySansType = 'bodySans01' | 'bodySans02' | 'bodySans03' | 'bodySans04';
|
|
44
|
-
type TypographyBodyType = TypographyBodySansType;
|
|
45
|
-
type TypographyHeadingType = 'headingSans01' | 'headingSans02' | 'headingSans03' | 'headingSans04' | 'headingSans05' | 'headingSans06' | 'headingSans07' | 'headingSans08';
|
|
46
|
-
type TypographyLeadType = 'leadSans01' | 'leadSans02' | 'leadSans03' | 'leadSans04' | 'leadSans05';
|
|
47
|
-
type TypographySupportingType = 'supportingStyleHelperText01' | 'supportingStylePlaceholderText01' | 'supportingStylePlaceholderText02' | 'supportingStylePlaceholderText03' | 'supportingStyleTiny01' | 'supportingStyleTiny02';
|
|
48
|
-
type AnchorTypographyType = 'a';
|
|
49
|
-
type LabelTypographyType = 'supportingStyleLabel01';
|
|
50
|
-
type OtherTypographyType = TypographyHeadingType | TypographyBodyType | TypographyLeadType | TypographySupportingType;
|
|
51
|
-
type TypographyType = AnchorTypographyType | LabelTypographyType | OtherTypographyType;
|
|
52
|
-
type StaticTypographyType = OtherTypographyType | LabelTypographyType;
|
|
53
|
-
type InlineElement = 'a' | 'abbr' | 'audio' | 'b' | 'bdi' | 'bdo' | 'big' | 'br' | 'button' | 'canvas' | 'cite' | 'code' | 'data' | 'datalist' | 'del' | 'dfn' | 'em' | 'embed' | 'i' | 'iframe' | 'img' | 'input' | 'ins' | 'kbd' | 'label' | 'map' | 'mark' | 'meter' | 'noscript' | 'object' | 'output' | 'picture' | 'progress' | 'q' | 'ruby' | 's' | 'samp' | 'script' | 'select' | 'slot' | 'small' | 'span' | 'strong' | 'sub' | 'sup' | 'svg' | 'template' | 'textarea' | 'time' | 'u' | 'var' | 'video' | 'wbr';
|
|
54
|
-
interface TypographyInteractionStyling {
|
|
55
|
-
hover?: CSSProperties;
|
|
56
|
-
active?: CSSProperties;
|
|
57
|
-
}
|
|
58
|
-
type BaseTypographyProps = PropsWithChildren<{
|
|
59
|
-
/**Spesifiserer om tekstelementet skal ha spacing definert i Elsa. Brukes hovedsakelig i artikler og lignende. **OBS!** har forskjellig virkning på ulike typografityper. `body` og `lead`-typer får margin på bunnen, `heading`-typer får margin på bunnen og padding på toppen mens `supportingStyles` får margin topp og bunn. */
|
|
60
|
-
withMargins?: boolean;
|
|
61
|
-
}> & Pick<HTMLAttributes<HTMLElement>, 'style'>;
|
|
62
|
-
type TypographyComponentProps = BaseTypographyProps & {
|
|
63
|
-
/**Tekstfarge fra utvalget eller custom. **OBS!** Bruk farger fra `@dds-design-tokens`. */
|
|
64
|
-
color?: TextColor$1;
|
|
65
|
-
/**Setter `bold` styling. */
|
|
66
|
-
bold?: boolean;
|
|
67
|
-
/**Setter `italic` styling. */
|
|
68
|
-
italic?: boolean;
|
|
69
|
-
/**Setter en linje under. */
|
|
70
|
-
underline?: boolean;
|
|
71
|
-
/**HTML tag som skal brukes istedenfor default definert via `typographyType`. */
|
|
72
|
-
as?: ElementType;
|
|
73
|
-
/**Støtte for å enkelt kunne endre på hover- og active-styling. Bruk `@dds-design-tokens` til farger osv. */
|
|
74
|
-
interactionProps?: TypographyInteractionStyling;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
40
|
type Direction$1 = 'row' | 'column';
|
|
78
41
|
|
|
79
42
|
/**
|
|
@@ -155,6 +118,43 @@ type ExtractStrict<T, U extends T> = U;
|
|
|
155
118
|
type Nullable<T> = T | null;
|
|
156
119
|
type Callback<T> = (e: T) => void;
|
|
157
120
|
|
|
121
|
+
declare const TextOverflowEllipsisWrapper: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>;
|
|
122
|
+
declare const TextOverflowEllipsisInner: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>;
|
|
123
|
+
|
|
124
|
+
type TypographyBodySansType = 'bodySans01' | 'bodySans02' | 'bodySans03' | 'bodySans04';
|
|
125
|
+
type TypographyBodyType = TypographyBodySansType;
|
|
126
|
+
type TypographyHeadingType = 'headingSans01' | 'headingSans02' | 'headingSans03' | 'headingSans04' | 'headingSans05' | 'headingSans06' | 'headingSans07' | 'headingSans08';
|
|
127
|
+
type TypographyLeadType = 'leadSans01' | 'leadSans02' | 'leadSans03' | 'leadSans04' | 'leadSans05';
|
|
128
|
+
type TypographySupportingType = 'supportingStyleHelperText01' | 'supportingStylePlaceholderText01' | 'supportingStylePlaceholderText02' | 'supportingStylePlaceholderText03' | 'supportingStyleTiny01' | 'supportingStyleTiny02';
|
|
129
|
+
type AnchorTypographyType = 'a';
|
|
130
|
+
type LabelTypographyType = 'supportingStyleLabel01';
|
|
131
|
+
type OtherTypographyType = TypographyHeadingType | TypographyBodyType | TypographyLeadType | TypographySupportingType;
|
|
132
|
+
type TypographyType = AnchorTypographyType | LabelTypographyType | OtherTypographyType;
|
|
133
|
+
type StaticTypographyType = OtherTypographyType | LabelTypographyType;
|
|
134
|
+
type InlineElement = 'a' | 'abbr' | 'audio' | 'b' | 'bdi' | 'bdo' | 'big' | 'br' | 'button' | 'canvas' | 'cite' | 'code' | 'data' | 'datalist' | 'del' | 'dfn' | 'em' | 'embed' | 'i' | 'iframe' | 'img' | 'input' | 'ins' | 'kbd' | 'label' | 'map' | 'mark' | 'meter' | 'noscript' | 'object' | 'output' | 'picture' | 'progress' | 'q' | 'ruby' | 's' | 'samp' | 'script' | 'select' | 'slot' | 'small' | 'span' | 'strong' | 'sub' | 'sup' | 'svg' | 'template' | 'textarea' | 'time' | 'u' | 'var' | 'video' | 'wbr';
|
|
135
|
+
interface TypographyInteractionStyling {
|
|
136
|
+
hover?: CSSProperties;
|
|
137
|
+
active?: CSSProperties;
|
|
138
|
+
}
|
|
139
|
+
type BaseTypographyProps = PropsWithChildren<{
|
|
140
|
+
/**Spesifiserer om tekstelementet skal ha spacing definert i Elsa. Brukes hovedsakelig i artikler og lignende. **OBS!** har forskjellig virkning på ulike typografityper. `body` og `lead`-typer får margin på bunnen, `heading`-typer får margin på bunnen og padding på toppen mens `supportingStyles` får margin topp og bunn. */
|
|
141
|
+
withMargins?: boolean;
|
|
142
|
+
}> & Pick<HTMLAttributes<HTMLElement>, 'style'>;
|
|
143
|
+
type TypographyComponentProps = BaseTypographyProps & {
|
|
144
|
+
/**Tekstfarge fra utvalget eller custom. **OBS!** Bruk farger fra `@dds-design-tokens`. */
|
|
145
|
+
color?: TextColor$1;
|
|
146
|
+
/**Setter `bold` styling. */
|
|
147
|
+
bold?: boolean;
|
|
148
|
+
/**Setter `italic` styling. */
|
|
149
|
+
italic?: boolean;
|
|
150
|
+
/**Setter en linje under. */
|
|
151
|
+
underline?: boolean;
|
|
152
|
+
/**HTML tag som skal brukes istedenfor default definert via `typographyType`. */
|
|
153
|
+
as?: ElementType;
|
|
154
|
+
/**Støtte for å enkelt kunne endre på hover- og active-styling. Bruk `@dds-design-tokens` til farger osv. */
|
|
155
|
+
interactionProps?: TypographyInteractionStyling;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
158
|
type AnchorTypographyProps = BaseComponentProps<HTMLAnchorElement, TypographyComponentProps & {
|
|
159
159
|
/**nativ `href`-prop ved `typographyType='a'`. */
|
|
160
160
|
href?: string | undefined;
|
|
@@ -1572,11 +1572,11 @@ type SelectProps<Option = unknown, IsMulti extends boolean = false> = {
|
|
|
1572
1572
|
/** CSS klassenavn. */
|
|
1573
1573
|
className?: string;
|
|
1574
1574
|
/** Inline styling. */
|
|
1575
|
-
style?:
|
|
1575
|
+
style?: React.CSSProperties;
|
|
1576
1576
|
customOptionElement?: (props: OptionProps<Option, IsMulti, GroupBase<Option>>) => JSX.Element;
|
|
1577
1577
|
customSingleValueElement?: (props: SingleValueProps<Option, IsMulti, GroupBase<Option>>) => JSX.Element;
|
|
1578
1578
|
} & Pick<HTMLAttributes<HTMLInputElement>, 'aria-required'> & WrappedReactSelectProps<Option, IsMulti, GroupBase<Option>>;
|
|
1579
|
-
type ForwardRefType<Option, IsMulti extends boolean> =
|
|
1579
|
+
type ForwardRefType<Option, IsMulti extends boolean> = React.ForwardedRef<SelectInstance<Option, IsMulti, GroupBase<Option>>>;
|
|
1580
1580
|
declare function SelectInner<Option = unknown, IsMulti extends boolean = false>(props: SelectProps<Option, IsMulti>, ref: ForwardRefType<Option, IsMulti>): react_jsx_runtime.JSX.Element;
|
|
1581
1581
|
declare const Select: typeof SelectInner;
|
|
1582
1582
|
|
|
@@ -1729,6 +1729,27 @@ type SearchCompoundProps = typeof Search$1 & {
|
|
|
1729
1729
|
};
|
|
1730
1730
|
declare const Search: SearchCompoundProps;
|
|
1731
1731
|
|
|
1732
|
+
type TableBodyProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1733
|
+
declare const Body: react.ForwardRefExoticComponent<TableBodyProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1734
|
+
|
|
1735
|
+
type TableCellType = 'data' | 'head';
|
|
1736
|
+
type TableCellLayout = 'left' | 'right' | 'center' | 'text and icon';
|
|
1737
|
+
interface CollapsibleProps {
|
|
1738
|
+
isCollapsibleChild?: boolean;
|
|
1739
|
+
}
|
|
1740
|
+
type TableCellProps = {
|
|
1741
|
+
/**
|
|
1742
|
+
* Type celle. Returnerer enten `<td>` eller `<th>`.
|
|
1743
|
+
* @default 'data' hvis den er brukt i `<Table.Body>` eller `<Table.Foot>`, 'head' hvis den er i `<Table.Head>`.
|
|
1744
|
+
*/
|
|
1745
|
+
type?: TableCellType;
|
|
1746
|
+
/**Layout av innholdet i cellen. 'tekst and icon' legger `gap` mellom barna og andre barnet i cellen. */
|
|
1747
|
+
layout?: TableCellLayout;
|
|
1748
|
+
/** Props ved bruk av `<CollapsibleRow>`. **OBS!** settes automatisk av forelder. */
|
|
1749
|
+
collapsibleProps?: CollapsibleProps;
|
|
1750
|
+
} & (TdHTMLAttributes<HTMLTableCellElement> | ThHTMLAttributes<HTMLTableCellElement>);
|
|
1751
|
+
declare const Cell: react.ForwardRefExoticComponent<TableCellProps & react.RefAttributes<HTMLTableCellElement>>;
|
|
1752
|
+
|
|
1732
1753
|
type TableDensity = 'normal' | 'compact' | 'extraCompact';
|
|
1733
1754
|
type TableProps = {
|
|
1734
1755
|
/**Spesifiserer hvor romslige cellene i tabellen skal være. */
|
|
@@ -1756,7 +1777,10 @@ type CollapsibleTableProps = {
|
|
|
1756
1777
|
type TableRowType = 'body' | 'head';
|
|
1757
1778
|
type RowMode = 'normal' | 'sum';
|
|
1758
1779
|
type TableRowProps = {
|
|
1759
|
-
/**
|
|
1780
|
+
/**
|
|
1781
|
+
* Spesifiserer om raden skal brukes i `<head>` eller `<body>`-seksjonen.
|
|
1782
|
+
* @default 'body' hvis den er brukt i `<Table.Body>` eller `<Table.Foot>`, 'head' hvis den er i `<Table.Head>`.
|
|
1783
|
+
*/
|
|
1760
1784
|
type?: TableRowType;
|
|
1761
1785
|
/**Custom modus for rader som har ytterligere semantisk betydning (f.eks. summeringsrad), definerer kun styling. Ved bruk av sum må `<Cell>` med tall i høyrestilles vha layout prop. */
|
|
1762
1786
|
mode?: RowMode;
|
|
@@ -1766,11 +1790,12 @@ type TableRowProps = {
|
|
|
1766
1790
|
hoverable?: boolean;
|
|
1767
1791
|
} & HTMLAttributes<HTMLTableRowElement>;
|
|
1768
1792
|
|
|
1769
|
-
declare const
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
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>>;
|
|
1774
1799
|
|
|
1775
1800
|
declare const CollapsibleTable$1: react.ForwardRefExoticComponent<{
|
|
1776
1801
|
isCollapsed?: boolean | undefined;
|
|
@@ -1782,44 +1807,19 @@ declare const CollapsibleTable$1: react.ForwardRefExoticComponent<{
|
|
|
1782
1807
|
withDividers?: boolean | undefined;
|
|
1783
1808
|
} & react.HTMLAttributes<HTMLTableElement> & react.RefAttributes<HTMLTableElement>>;
|
|
1784
1809
|
|
|
1785
|
-
type TableHeadProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1786
|
-
declare const Head: react.ForwardRefExoticComponent<TableHeadProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1787
|
-
|
|
1788
|
-
type TableBodyProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1789
|
-
declare const Body: react.ForwardRefExoticComponent<TableBodyProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1790
|
-
|
|
1791
1810
|
type TableFootProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1792
1811
|
declare const Foot: react.ForwardRefExoticComponent<TableFootProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1793
1812
|
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
mode?: RowMode | undefined;
|
|
1797
|
-
selected?: boolean | undefined;
|
|
1798
|
-
hoverable?: boolean | undefined;
|
|
1799
|
-
} & react.HTMLAttributes<HTMLTableRowElement> & react.RefAttributes<HTMLTableRowElement>>;
|
|
1813
|
+
type TableHeadProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1814
|
+
declare const Head: react.ForwardRefExoticComponent<TableHeadProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
1800
1815
|
|
|
1801
|
-
declare const
|
|
1816
|
+
declare const Row: react.ForwardRefExoticComponent<{
|
|
1802
1817
|
type?: TableRowType | undefined;
|
|
1803
1818
|
mode?: RowMode | undefined;
|
|
1804
1819
|
selected?: boolean | undefined;
|
|
1805
1820
|
hoverable?: boolean | undefined;
|
|
1806
1821
|
} & react.HTMLAttributes<HTMLTableRowElement> & react.RefAttributes<HTMLTableRowElement>>;
|
|
1807
1822
|
|
|
1808
|
-
type TableCellType = 'data' | 'head';
|
|
1809
|
-
type TableCellLayout = 'left' | 'right' | 'center' | 'text and icon';
|
|
1810
|
-
interface CollapsibleProps {
|
|
1811
|
-
isCollapsibleChild?: boolean;
|
|
1812
|
-
}
|
|
1813
|
-
type TableCellProps = {
|
|
1814
|
-
/**Type celle. Returnerer enten `<td>` eller `<th>`. */
|
|
1815
|
-
type?: TableCellType;
|
|
1816
|
-
/**Layout av innholdet i cellen. 'tekst and icon' legger `gap` mellom barna og andre barnet i cellen. */
|
|
1817
|
-
layout?: TableCellLayout;
|
|
1818
|
-
/** Props ved bruk av `<CollapsibleRow>`. **OBS!** settes automatisk av forelder. */
|
|
1819
|
-
collapsibleProps?: CollapsibleProps;
|
|
1820
|
-
} & (TdHTMLAttributes<HTMLTableCellElement> | ThHTMLAttributes<HTMLTableCellElement>);
|
|
1821
|
-
declare const Cell: react.ForwardRefExoticComponent<TableCellProps & react.RefAttributes<HTMLTableCellElement>>;
|
|
1822
|
-
|
|
1823
1823
|
type SortOrder = 'ascending' | 'descending';
|
|
1824
1824
|
type TableSortCellProps = {
|
|
1825
1825
|
/**Spesifiserer om kolonnen er sortert. */
|
|
@@ -1838,6 +1838,12 @@ declare const SortCell: react.ForwardRefExoticComponent<{
|
|
|
1838
1838
|
onClick: (event: MouseEvent$1<HTMLButtonElement>) => void;
|
|
1839
1839
|
} & Omit<TableCellProps, "type"> & react.RefAttributes<HTMLTableCellElement>>;
|
|
1840
1840
|
|
|
1841
|
+
declare const Table$1: react.ForwardRefExoticComponent<{
|
|
1842
|
+
density?: TableDensity | undefined;
|
|
1843
|
+
stickyHeader?: boolean | undefined;
|
|
1844
|
+
withDividers?: boolean | undefined;
|
|
1845
|
+
} & react.HTMLAttributes<HTMLTableElement> & react.RefAttributes<HTMLTableElement>>;
|
|
1846
|
+
|
|
1841
1847
|
type TableWrapperProps = HTMLAttributes<HTMLDivElement>;
|
|
1842
1848
|
declare const TableWrapper: {
|
|
1843
1849
|
({ children, ...rest }: TableWrapperProps): react_jsx_runtime.JSX.Element;
|
|
@@ -2299,20 +2305,36 @@ declare namespace Calendar {
|
|
|
2299
2305
|
type DateFieldProps<T extends DateValue$1 = CalendarDate> = AriaDateFieldOptions<T> & {
|
|
2300
2306
|
className?: string;
|
|
2301
2307
|
buttonProps?: ReturnType<typeof useDatePicker>['buttonProps'];
|
|
2308
|
+
/**
|
|
2309
|
+
* For å sette en egendefinert bredde på komponenten.
|
|
2310
|
+
*/
|
|
2311
|
+
width?: CSS.Properties['width'];
|
|
2302
2312
|
} & Pick<InputProps$1, 'componentSize' | 'errorMessage' | 'tip' | 'disabled' | 'style'>;
|
|
2303
2313
|
|
|
2304
2314
|
interface DatePickerProps extends Omit<AriaDatePickerProps<CalendarDate>, 'granularity'>, Pick<DateFieldProps<CalendarDate>, 'componentSize' | 'tip' | 'style'> {
|
|
2305
2315
|
label?: string;
|
|
2306
2316
|
errorMessage?: string;
|
|
2317
|
+
/**
|
|
2318
|
+
* For å sette en egendefinert bredde på komponenten.
|
|
2319
|
+
*/
|
|
2320
|
+
width?: CSS.Properties['width'];
|
|
2307
2321
|
}
|
|
2308
2322
|
declare const DatePicker: react.ForwardRefExoticComponent<DatePickerProps & react.RefAttributes<HTMLElement>>;
|
|
2309
2323
|
|
|
2310
2324
|
type TimePickerProps = Omit<AriaTimeFieldProps<Time>, 'hideTimeZone'> & {
|
|
2311
2325
|
className?: string;
|
|
2312
|
-
|
|
2326
|
+
/**
|
|
2327
|
+
* For å sette en egendefinert bredde på komponenten.
|
|
2328
|
+
*/
|
|
2329
|
+
width?: CSS.Properties['width'];
|
|
2330
|
+
} & Pick<InputProps, 'componentSize' | 'errorMessage' | 'tip' | 'disabled' | 'style'>;
|
|
2313
2331
|
declare const TimePicker: react.ForwardRefExoticComponent<Omit<AriaTimeFieldProps<Time>, "hideTimeZone"> & {
|
|
2314
2332
|
className?: string | undefined;
|
|
2315
|
-
|
|
2333
|
+
/**
|
|
2334
|
+
* For å sette en egendefinert bredde på komponenten.
|
|
2335
|
+
*/
|
|
2336
|
+
width?: CSS.Properties['width'];
|
|
2337
|
+
} & Pick<InputProps, "style" | "disabled" | "tip" | "errorMessage" | "componentSize"> & react.RefAttributes<HTMLDivElement>>;
|
|
2316
2338
|
|
|
2317
2339
|
declare function nativeDateToDateValue(date: Date, timeZone?: string | undefined): DateValue$1;
|
|
2318
2340
|
declare function dateValueToNativeDate(date: DateValue$1, timeZone?: string | undefined): Date;
|