@norges-domstoler/dds-components 0.0.0-dev-20240117123110 → 0.0.0-dev-20240117144715

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 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, { CSSProperties, PropsWithChildren, HTMLAttributes, ElementType, ComponentPropsWithoutRef, 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';
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?: react__default.CSSProperties;
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> = react__default.ForwardedRef<SelectInstance<Option, IsMulti, GroupBase<Option>>>;
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. */
@@ -1769,11 +1790,12 @@ type TableRowProps = {
1769
1790
  hoverable?: boolean;
1770
1791
  } & HTMLAttributes<HTMLTableRowElement>;
1771
1792
 
1772
- declare const Table$1: react.ForwardRefExoticComponent<{
1773
- density?: TableDensity | undefined;
1774
- stickyHeader?: boolean | undefined;
1775
- withDividers?: boolean | undefined;
1776
- } & react.HTMLAttributes<HTMLTableElement> & react.RefAttributes<HTMLTableElement>>;
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>>;
1777
1799
 
1778
1800
  declare const CollapsibleTable$1: react.ForwardRefExoticComponent<{
1779
1801
  isCollapsed?: boolean | undefined;
@@ -1785,47 +1807,19 @@ declare const CollapsibleTable$1: react.ForwardRefExoticComponent<{
1785
1807
  withDividers?: boolean | undefined;
1786
1808
  } & react.HTMLAttributes<HTMLTableElement> & react.RefAttributes<HTMLTableElement>>;
1787
1809
 
1788
- type TableHeadProps = HTMLAttributes<HTMLTableSectionElement>;
1789
- declare const Head: react.ForwardRefExoticComponent<TableHeadProps & react.RefAttributes<HTMLTableSectionElement>>;
1790
-
1791
- type TableBodyProps = HTMLAttributes<HTMLTableSectionElement>;
1792
- declare const Body: react.ForwardRefExoticComponent<TableBodyProps & react.RefAttributes<HTMLTableSectionElement>>;
1793
-
1794
1810
  type TableFootProps = HTMLAttributes<HTMLTableSectionElement>;
1795
1811
  declare const Foot: react.ForwardRefExoticComponent<TableFootProps & react.RefAttributes<HTMLTableSectionElement>>;
1796
1812
 
1797
- declare const Row: react.ForwardRefExoticComponent<{
1798
- type?: TableRowType | undefined;
1799
- mode?: RowMode | undefined;
1800
- selected?: boolean | undefined;
1801
- hoverable?: boolean | undefined;
1802
- } & react.HTMLAttributes<HTMLTableRowElement> & react.RefAttributes<HTMLTableRowElement>>;
1813
+ type TableHeadProps = HTMLAttributes<HTMLTableSectionElement>;
1814
+ declare const Head: react.ForwardRefExoticComponent<TableHeadProps & react.RefAttributes<HTMLTableSectionElement>>;
1803
1815
 
1804
- declare const CollapsibleRow: react.ForwardRefExoticComponent<{
1816
+ declare const Row: react.ForwardRefExoticComponent<{
1805
1817
  type?: TableRowType | undefined;
1806
1818
  mode?: RowMode | undefined;
1807
1819
  selected?: boolean | undefined;
1808
1820
  hoverable?: boolean | undefined;
1809
1821
  } & react.HTMLAttributes<HTMLTableRowElement> & react.RefAttributes<HTMLTableRowElement>>;
1810
1822
 
1811
- type TableCellType = 'data' | 'head';
1812
- type TableCellLayout = 'left' | 'right' | 'center' | 'text and icon';
1813
- interface CollapsibleProps {
1814
- isCollapsibleChild?: boolean;
1815
- }
1816
- type TableCellProps = {
1817
- /**
1818
- * Type celle. Returnerer enten `<td>` eller `<th>`.
1819
- * @default 'data' hvis den er brukt i `<Table.Body>` eller `<Table.Foot>`, 'head' hvis den er i `<Table.Head>`.
1820
- */
1821
- type?: TableCellType;
1822
- /**Layout av innholdet i cellen. 'tekst and icon' legger `gap` mellom barna og andre barnet i cellen. */
1823
- layout?: TableCellLayout;
1824
- /** Props ved bruk av `<CollapsibleRow>`. **OBS!** settes automatisk av forelder. */
1825
- collapsibleProps?: CollapsibleProps;
1826
- } & (TdHTMLAttributes<HTMLTableCellElement> | ThHTMLAttributes<HTMLTableCellElement>);
1827
- declare const Cell: react.ForwardRefExoticComponent<TableCellProps & react.RefAttributes<HTMLTableCellElement>>;
1828
-
1829
1823
  type SortOrder = 'ascending' | 'descending';
1830
1824
  type TableSortCellProps = {
1831
1825
  /**Spesifiserer om kolonnen er sortert. */
@@ -1844,6 +1838,12 @@ declare const SortCell: react.ForwardRefExoticComponent<{
1844
1838
  onClick: (event: MouseEvent$1<HTMLButtonElement>) => void;
1845
1839
  } & Omit<TableCellProps, "type"> & react.RefAttributes<HTMLTableCellElement>>;
1846
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
+
1847
1847
  type TableWrapperProps = HTMLAttributes<HTMLDivElement>;
1848
1848
  declare const TableWrapper: {
1849
1849
  ({ children, ...rest }: TableWrapperProps): react_jsx_runtime.JSX.Element;
@@ -2305,20 +2305,36 @@ declare namespace Calendar {
2305
2305
  type DateFieldProps<T extends DateValue$1 = CalendarDate> = AriaDateFieldOptions<T> & {
2306
2306
  className?: string;
2307
2307
  buttonProps?: ReturnType<typeof useDatePicker>['buttonProps'];
2308
+ /**
2309
+ * For å sette en egendefinert bredde på komponenten.
2310
+ */
2311
+ width?: CSS.Properties['width'];
2308
2312
  } & Pick<InputProps$1, 'componentSize' | 'errorMessage' | 'tip' | 'disabled' | 'style'>;
2309
2313
 
2310
2314
  interface DatePickerProps extends Omit<AriaDatePickerProps<CalendarDate>, 'granularity'>, Pick<DateFieldProps<CalendarDate>, 'componentSize' | 'tip' | 'style'> {
2311
2315
  label?: string;
2312
2316
  errorMessage?: string;
2317
+ /**
2318
+ * For å sette en egendefinert bredde på komponenten.
2319
+ */
2320
+ width?: CSS.Properties['width'];
2313
2321
  }
2314
2322
  declare const DatePicker: react.ForwardRefExoticComponent<DatePickerProps & react.RefAttributes<HTMLElement>>;
2315
2323
 
2316
2324
  type TimePickerProps = Omit<AriaTimeFieldProps<Time>, 'hideTimeZone'> & {
2317
2325
  className?: string;
2318
- } & Pick<InputProps$1, 'componentSize' | 'errorMessage' | 'tip' | 'disabled' | 'style'>;
2326
+ /**
2327
+ * For å sette en egendefinert bredde på komponenten.
2328
+ */
2329
+ width?: CSS.Properties['width'];
2330
+ } & Pick<InputProps, 'componentSize' | 'errorMessage' | 'tip' | 'disabled' | 'style'>;
2319
2331
  declare const TimePicker: react.ForwardRefExoticComponent<Omit<AriaTimeFieldProps<Time>, "hideTimeZone"> & {
2320
2332
  className?: string | undefined;
2321
- } & Pick<InputProps$1, "style" | "disabled" | "tip" | "errorMessage" | "componentSize"> & react.RefAttributes<HTMLDivElement>>;
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>>;
2322
2338
 
2323
2339
  declare function nativeDateToDateValue(date: Date, timeZone?: string | undefined): DateValue$1;
2324
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, { CSSProperties, PropsWithChildren, HTMLAttributes, ElementType, ComponentPropsWithoutRef, 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';
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?: react__default.CSSProperties;
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> = react__default.ForwardedRef<SelectInstance<Option, IsMulti, GroupBase<Option>>>;
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. */
@@ -1769,11 +1790,12 @@ type TableRowProps = {
1769
1790
  hoverable?: boolean;
1770
1791
  } & HTMLAttributes<HTMLTableRowElement>;
1771
1792
 
1772
- declare const Table$1: react.ForwardRefExoticComponent<{
1773
- density?: TableDensity | undefined;
1774
- stickyHeader?: boolean | undefined;
1775
- withDividers?: boolean | undefined;
1776
- } & react.HTMLAttributes<HTMLTableElement> & react.RefAttributes<HTMLTableElement>>;
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>>;
1777
1799
 
1778
1800
  declare const CollapsibleTable$1: react.ForwardRefExoticComponent<{
1779
1801
  isCollapsed?: boolean | undefined;
@@ -1785,47 +1807,19 @@ declare const CollapsibleTable$1: react.ForwardRefExoticComponent<{
1785
1807
  withDividers?: boolean | undefined;
1786
1808
  } & react.HTMLAttributes<HTMLTableElement> & react.RefAttributes<HTMLTableElement>>;
1787
1809
 
1788
- type TableHeadProps = HTMLAttributes<HTMLTableSectionElement>;
1789
- declare const Head: react.ForwardRefExoticComponent<TableHeadProps & react.RefAttributes<HTMLTableSectionElement>>;
1790
-
1791
- type TableBodyProps = HTMLAttributes<HTMLTableSectionElement>;
1792
- declare const Body: react.ForwardRefExoticComponent<TableBodyProps & react.RefAttributes<HTMLTableSectionElement>>;
1793
-
1794
1810
  type TableFootProps = HTMLAttributes<HTMLTableSectionElement>;
1795
1811
  declare const Foot: react.ForwardRefExoticComponent<TableFootProps & react.RefAttributes<HTMLTableSectionElement>>;
1796
1812
 
1797
- declare const Row: react.ForwardRefExoticComponent<{
1798
- type?: TableRowType | undefined;
1799
- mode?: RowMode | undefined;
1800
- selected?: boolean | undefined;
1801
- hoverable?: boolean | undefined;
1802
- } & react.HTMLAttributes<HTMLTableRowElement> & react.RefAttributes<HTMLTableRowElement>>;
1813
+ type TableHeadProps = HTMLAttributes<HTMLTableSectionElement>;
1814
+ declare const Head: react.ForwardRefExoticComponent<TableHeadProps & react.RefAttributes<HTMLTableSectionElement>>;
1803
1815
 
1804
- declare const CollapsibleRow: react.ForwardRefExoticComponent<{
1816
+ declare const Row: react.ForwardRefExoticComponent<{
1805
1817
  type?: TableRowType | undefined;
1806
1818
  mode?: RowMode | undefined;
1807
1819
  selected?: boolean | undefined;
1808
1820
  hoverable?: boolean | undefined;
1809
1821
  } & react.HTMLAttributes<HTMLTableRowElement> & react.RefAttributes<HTMLTableRowElement>>;
1810
1822
 
1811
- type TableCellType = 'data' | 'head';
1812
- type TableCellLayout = 'left' | 'right' | 'center' | 'text and icon';
1813
- interface CollapsibleProps {
1814
- isCollapsibleChild?: boolean;
1815
- }
1816
- type TableCellProps = {
1817
- /**
1818
- * Type celle. Returnerer enten `<td>` eller `<th>`.
1819
- * @default 'data' hvis den er brukt i `<Table.Body>` eller `<Table.Foot>`, 'head' hvis den er i `<Table.Head>`.
1820
- */
1821
- type?: TableCellType;
1822
- /**Layout av innholdet i cellen. 'tekst and icon' legger `gap` mellom barna og andre barnet i cellen. */
1823
- layout?: TableCellLayout;
1824
- /** Props ved bruk av `<CollapsibleRow>`. **OBS!** settes automatisk av forelder. */
1825
- collapsibleProps?: CollapsibleProps;
1826
- } & (TdHTMLAttributes<HTMLTableCellElement> | ThHTMLAttributes<HTMLTableCellElement>);
1827
- declare const Cell: react.ForwardRefExoticComponent<TableCellProps & react.RefAttributes<HTMLTableCellElement>>;
1828
-
1829
1823
  type SortOrder = 'ascending' | 'descending';
1830
1824
  type TableSortCellProps = {
1831
1825
  /**Spesifiserer om kolonnen er sortert. */
@@ -1844,6 +1838,12 @@ declare const SortCell: react.ForwardRefExoticComponent<{
1844
1838
  onClick: (event: MouseEvent$1<HTMLButtonElement>) => void;
1845
1839
  } & Omit<TableCellProps, "type"> & react.RefAttributes<HTMLTableCellElement>>;
1846
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
+
1847
1847
  type TableWrapperProps = HTMLAttributes<HTMLDivElement>;
1848
1848
  declare const TableWrapper: {
1849
1849
  ({ children, ...rest }: TableWrapperProps): react_jsx_runtime.JSX.Element;
@@ -2305,20 +2305,36 @@ declare namespace Calendar {
2305
2305
  type DateFieldProps<T extends DateValue$1 = CalendarDate> = AriaDateFieldOptions<T> & {
2306
2306
  className?: string;
2307
2307
  buttonProps?: ReturnType<typeof useDatePicker>['buttonProps'];
2308
+ /**
2309
+ * For å sette en egendefinert bredde på komponenten.
2310
+ */
2311
+ width?: CSS.Properties['width'];
2308
2312
  } & Pick<InputProps$1, 'componentSize' | 'errorMessage' | 'tip' | 'disabled' | 'style'>;
2309
2313
 
2310
2314
  interface DatePickerProps extends Omit<AriaDatePickerProps<CalendarDate>, 'granularity'>, Pick<DateFieldProps<CalendarDate>, 'componentSize' | 'tip' | 'style'> {
2311
2315
  label?: string;
2312
2316
  errorMessage?: string;
2317
+ /**
2318
+ * For å sette en egendefinert bredde på komponenten.
2319
+ */
2320
+ width?: CSS.Properties['width'];
2313
2321
  }
2314
2322
  declare const DatePicker: react.ForwardRefExoticComponent<DatePickerProps & react.RefAttributes<HTMLElement>>;
2315
2323
 
2316
2324
  type TimePickerProps = Omit<AriaTimeFieldProps<Time>, 'hideTimeZone'> & {
2317
2325
  className?: string;
2318
- } & Pick<InputProps$1, 'componentSize' | 'errorMessage' | 'tip' | 'disabled' | 'style'>;
2326
+ /**
2327
+ * For å sette en egendefinert bredde på komponenten.
2328
+ */
2329
+ width?: CSS.Properties['width'];
2330
+ } & Pick<InputProps, 'componentSize' | 'errorMessage' | 'tip' | 'disabled' | 'style'>;
2319
2331
  declare const TimePicker: react.ForwardRefExoticComponent<Omit<AriaTimeFieldProps<Time>, "hideTimeZone"> & {
2320
2332
  className?: string | undefined;
2321
- } & Pick<InputProps$1, "style" | "disabled" | "tip" | "errorMessage" | "componentSize"> & react.RefAttributes<HTMLDivElement>>;
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>>;
2322
2338
 
2323
2339
  declare function nativeDateToDateValue(date: Date, timeZone?: string | undefined): DateValue$1;
2324
2340
  declare function dateValueToNativeDate(date: DateValue$1, timeZone?: string | undefined): Date;