rk-designsystem 1.3.0 → 1.3.2
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/README.md +14 -7
- package/dist/assets/images/ChevronLeftIcon.js +31 -0
- package/dist/assets/images/ChevronRightIcon.js +31 -0
- package/dist/components/Alert/index.js +16 -0
- package/dist/components/Avatar/index.js +9 -0
- package/dist/components/Badge/index.js +11 -0
- package/dist/components/Breadcrumbs/index.js +9 -0
- package/dist/components/Button/index.js +11 -0
- package/dist/components/Card/index.js +8 -0
- package/dist/components/Carousel/index.js +379 -0
- package/dist/components/Carousel/styles.module.css.js +38 -0
- package/dist/components/Checkbox/index.js +10 -0
- package/dist/components/Chip/index.js +6 -0
- package/dist/components/DateInput/index.js +258 -0
- package/dist/components/DateInput/styles.module.css.js +20 -0
- package/dist/components/DatePicker/index.js +360 -0
- package/dist/components/DatePicker/styles.module.css.js +30 -0
- package/dist/components/Details/index.js +6 -0
- package/dist/components/Dialog/index.js +6 -0
- package/dist/components/Divider/index.js +6 -0
- package/dist/components/Donor/index.js +382 -0
- package/dist/components/Donor/styles.module.css.js +42 -0
- package/dist/components/Dropdown/index.js +12 -0
- package/dist/components/ErrorSummary/index.js +6 -0
- package/dist/components/Field/index.js +10 -0
- package/dist/components/Fieldset/index.js +6 -0
- package/dist/components/Footer/index.js +722 -0
- package/dist/components/Footer/styles.module.css.js +138 -0
- package/dist/components/GraphicElement/index.js +317 -0
- package/dist/components/GraphicElement/styles.module.css.js +16 -0
- package/dist/components/Header/index.js +677 -0
- package/dist/components/Header/styles.module.css.js +114 -0
- package/dist/components/Heading/index.js +9 -0
- package/dist/components/Input/index.js +7 -0
- package/dist/components/Label/index.js +9 -0
- package/dist/components/Link/index.js +6 -0
- package/dist/components/List/index.js +6 -0
- package/dist/components/Pagination/index.js +11 -0
- package/dist/components/Paragraph/index.js +11 -0
- package/dist/components/Popover/index.js +6 -0
- package/dist/components/Radio/index.js +7 -0
- package/dist/components/Search/index.js +10 -0
- package/dist/components/Select/index.js +6 -0
- package/dist/components/SkeletonLoader/index.js +6 -0
- package/dist/components/SkipLink/index.js +6 -0
- package/dist/components/SpinnerLoader/index.js +6 -0
- package/dist/components/Suggestion/index.js +7 -0
- package/dist/components/Switch/index.js +6 -0
- package/dist/components/Table/index.js +6 -0
- package/dist/components/Tabs/index.js +6 -0
- package/dist/components/Tag/index.js +14 -0
- package/dist/components/Textarea/index.js +6 -0
- package/dist/components/Textfield/index.js +6 -0
- package/dist/components/ToggleGroup/index.js +6 -0
- package/dist/components/Tooltip/index.js +6 -0
- package/dist/components/ValidationMessage/index.js +9 -0
- package/dist/context/LanguageContext.js +91 -0
- package/dist/index.d.ts +170 -147
- package/dist/index.js +118 -0
- package/dist/rk-designsystem.css +1 -1
- package/dist/{componentlibrary.es.js → translations/index.js} +267 -3904
- package/dist/utils/search-index.js +106 -0
- package/package.json +21 -35
- package/dist/componentlibrary.umd.js +0 -1266
package/dist/index.d.ts
CHANGED
|
@@ -1,127 +1,114 @@
|
|
|
1
|
-
import { AlertProps as AlertProps_2 } from '
|
|
2
|
-
import { AvatarProps as AvatarProps_2 } from '
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { BreadcrumbsProps as BreadcrumbsProps_2 } from './components';
|
|
1
|
+
import { AlertProps as AlertProps_2 } from '@digdir/designsystemet-react';
|
|
2
|
+
import { AvatarProps as AvatarProps_2 } from '@digdir/designsystemet-react';
|
|
3
|
+
import { BadgePosition as BadgePosition_2 } from '@digdir/designsystemet-react';
|
|
4
|
+
import { BadgePositionProps as BadgePositionProps_2 } from '@digdir/designsystemet-react';
|
|
5
|
+
import { BadgeProps as BadgeProps_2 } from '@digdir/designsystemet-react';
|
|
6
|
+
import { Breadcrumbs as Breadcrumbs_2 } from '@digdir/designsystemet-react';
|
|
7
|
+
import { BreadcrumbsItem as BreadcrumbsItem_2 } from '@digdir/designsystemet-react';
|
|
8
|
+
import { BreadcrumbsLink as BreadcrumbsLink_2 } from '@digdir/designsystemet-react';
|
|
9
|
+
import { BreadcrumbsList as BreadcrumbsList_2 } from '@digdir/designsystemet-react';
|
|
10
|
+
import { BreadcrumbsProps as BreadcrumbsProps_2 } from '@digdir/designsystemet-react';
|
|
12
11
|
import { ButtonHTMLAttributes } from 'react';
|
|
13
|
-
import { Card as Card_2 } from '
|
|
14
|
-
import { CardBlock as CardBlock_2 } from '
|
|
15
|
-
import { CardProps as CardProps_2 } from '
|
|
16
|
-
import { Checkbox as Checkbox_2 } from '
|
|
17
|
-
import { CheckboxProps as CheckboxProps_2 } from '
|
|
18
|
-
import {
|
|
19
|
-
import { ChipButtonProps as ChipButtonProps_2 } from '
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { ChipRadioProps as ChipRadioProps_2 } from './components';
|
|
24
|
-
import { ChipRemovable } from './chip';
|
|
25
|
-
import { ChipRemovableProps as ChipRemovableProps_2 } from './components';
|
|
12
|
+
import { Card as Card_2 } from '@digdir/designsystemet-react';
|
|
13
|
+
import { CardBlock as CardBlock_2 } from '@digdir/designsystemet-react';
|
|
14
|
+
import { CardProps as CardProps_2 } from '@digdir/designsystemet-react';
|
|
15
|
+
import { Checkbox as Checkbox_2 } from '@digdir/designsystemet-react';
|
|
16
|
+
import { CheckboxProps as CheckboxProps_2 } from '@digdir/designsystemet-react';
|
|
17
|
+
import { Chip as Chip_2 } from '@digdir/designsystemet-react';
|
|
18
|
+
import { ChipButtonProps as ChipButtonProps_2 } from '@digdir/designsystemet-react';
|
|
19
|
+
import { ChipCheckboxProps as ChipCheckboxProps_2 } from '@digdir/designsystemet-react';
|
|
20
|
+
import { ChipRadioProps as ChipRadioProps_2 } from '@digdir/designsystemet-react';
|
|
21
|
+
import { ChipRemovableProps as ChipRemovableProps_2 } from '@digdir/designsystemet-react';
|
|
26
22
|
import { Color } from '@digdir/designsystemet-types';
|
|
27
|
-
import { Color as Color_2 } from '@digdir/designsystemet/types';
|
|
28
23
|
import { ComponentProps } from 'react';
|
|
29
24
|
import { default as default_2 } from 'react';
|
|
30
|
-
import {
|
|
31
|
-
import { DetailsProps as DetailsProps_2 } from '
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import { FieldCounter as FieldCounter_2 } from './components';
|
|
60
|
-
import { FieldCounterProps as FieldCounterProps_2 } from './components';
|
|
61
|
-
import { FieldDescription as FieldDescription_2 } from './components';
|
|
62
|
-
import { FieldDescriptionProps as FieldDescriptionProps_2 } from './components';
|
|
63
|
-
import { FieldProps as FieldProps_2 } from './components';
|
|
64
|
-
import { Fieldset as Fieldset_2 } from './components';
|
|
65
|
-
import { FieldsetProps as FieldsetProps_2 } from './components';
|
|
25
|
+
import { Details as Details_2 } from '@digdir/designsystemet-react';
|
|
26
|
+
import { DetailsProps as DetailsProps_2 } from '@digdir/designsystemet-react';
|
|
27
|
+
import { Dialog as Dialog_2 } from '@digdir/designsystemet-react';
|
|
28
|
+
import { DialogProps as DialogProps_2 } from '@digdir/designsystemet-react';
|
|
29
|
+
import { DividerProps as DividerProps_2 } from '@digdir/designsystemet-react';
|
|
30
|
+
import { Dropdown as Dropdown_2 } from '@digdir/designsystemet-react';
|
|
31
|
+
import { DropdownButton as DropdownButton_2 } from '@digdir/designsystemet-react';
|
|
32
|
+
import { DropdownButtonProps as DropdownButtonProps_2 } from '@digdir/designsystemet-react';
|
|
33
|
+
import { DropdownHeading as DropdownHeading_2 } from '@digdir/designsystemet-react';
|
|
34
|
+
import { DropdownHeadingProps as DropdownHeadingProps_2 } from '@digdir/designsystemet-react';
|
|
35
|
+
import { DropdownItem as DropdownItem_2 } from '@digdir/designsystemet-react';
|
|
36
|
+
import { DropdownItemProps as DropdownItemProps_2 } from '@digdir/designsystemet-react';
|
|
37
|
+
import { DropdownList as DropdownList_2 } from '@digdir/designsystemet-react';
|
|
38
|
+
import { DropdownListProps as DropdownListProps_2 } from '@digdir/designsystemet-react';
|
|
39
|
+
import { DropdownProps as DropdownProps_2 } from '@digdir/designsystemet-react';
|
|
40
|
+
import { DropdownTrigger as DropdownTrigger_2 } from '@digdir/designsystemet-react';
|
|
41
|
+
import { DropdownTriggerContext as DropdownTriggerContext_2 } from '@digdir/designsystemet-react';
|
|
42
|
+
import { DropdownTriggerContextProps as DropdownTriggerContextProps_2 } from '@digdir/designsystemet-react';
|
|
43
|
+
import { ErrorSummary as ErrorSummary_2 } from '@digdir/designsystemet-react';
|
|
44
|
+
import { ErrorSummaryProps as ErrorSummaryProps_2 } from '@digdir/designsystemet-react';
|
|
45
|
+
import { EXPERIMENTAL_Suggestion } from '@digdir/designsystemet-react';
|
|
46
|
+
import { Field as Field_2 } from '@digdir/designsystemet-react';
|
|
47
|
+
import { FieldCounter as FieldCounter_2 } from '@digdir/designsystemet-react';
|
|
48
|
+
import { FieldCounterProps as FieldCounterProps_2 } from '@digdir/designsystemet-react';
|
|
49
|
+
import { FieldDescription as FieldDescription_2 } from '@digdir/designsystemet-react';
|
|
50
|
+
import { FieldDescriptionProps as FieldDescriptionProps_2 } from '@digdir/designsystemet-react';
|
|
51
|
+
import { FieldProps as FieldProps_2 } from '@digdir/designsystemet-react';
|
|
52
|
+
import { Fieldset as Fieldset_2 } from '@digdir/designsystemet-react';
|
|
53
|
+
import { FieldsetProps as FieldsetProps_2 } from '@digdir/designsystemet-react';
|
|
66
54
|
import { ForwardRefExoticComponent } from 'react';
|
|
67
|
-
import { HeadingProps as HeadingProps_2 } from '
|
|
55
|
+
import { HeadingProps as HeadingProps_2 } from '@digdir/designsystemet-react';
|
|
68
56
|
import { HTMLAttributes } from 'react';
|
|
69
|
-
import { Input as Input_2 } from '
|
|
57
|
+
import { Input as Input_2 } from '@digdir/designsystemet-react';
|
|
70
58
|
import { InputHTMLAttributes } from 'react';
|
|
71
|
-
import { InputProps as InputProps_2 } from '
|
|
59
|
+
import { InputProps as InputProps_2 } from '@digdir/designsystemet-react';
|
|
72
60
|
import { JSX } from 'react/jsx-runtime';
|
|
73
|
-
import { LabelProps as LabelProps_2 } from '
|
|
74
|
-
import { Link as Link_2 } from '
|
|
75
|
-
import { LinkProps as LinkProps_2 } from '
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import { RadioProps as RadioProps_2 } from './components';
|
|
61
|
+
import { LabelProps as LabelProps_2 } from '@digdir/designsystemet-react';
|
|
62
|
+
import { Link as Link_2 } from '@digdir/designsystemet-react';
|
|
63
|
+
import { LinkProps as LinkProps_2 } from '@digdir/designsystemet-react';
|
|
64
|
+
import { List as List_2 } from '@digdir/designsystemet-react';
|
|
65
|
+
import { Pagination as Pagination_2 } from '@digdir/designsystemet-react';
|
|
66
|
+
import { PaginationButton as PaginationButton_2 } from '@digdir/designsystemet-react';
|
|
67
|
+
import { PaginationButtonProps as PaginationButtonProps_2 } from '@digdir/designsystemet-react';
|
|
68
|
+
import { PaginationItem as PaginationItem_2 } from '@digdir/designsystemet-react';
|
|
69
|
+
import { PaginationItemProps as PaginationItemProps_2 } from '@digdir/designsystemet-react';
|
|
70
|
+
import { PaginationList as PaginationList_2 } from '@digdir/designsystemet-react';
|
|
71
|
+
import { PaginationListProps as PaginationListProps_2 } from '@digdir/designsystemet-react';
|
|
72
|
+
import { PaginationProps as PaginationProps_2 } from '@digdir/designsystemet-react';
|
|
73
|
+
import { ParagraphProps as ParagraphProps_2 } from '@digdir/designsystemet-react';
|
|
74
|
+
import { Popover as Popover_2 } from '@digdir/designsystemet-react';
|
|
75
|
+
import { PopoverProps as PopoverProps_2 } from '@digdir/designsystemet-react';
|
|
76
|
+
import { PropsWithoutRef } from 'react';
|
|
77
|
+
import { Radio as Radio_2 } from '@digdir/designsystemet-react';
|
|
78
|
+
import { RadioProps as RadioProps_2 } from '@digdir/designsystemet-react';
|
|
92
79
|
import { ReactNode } from 'react';
|
|
93
80
|
import { RefAttributes } from 'react';
|
|
94
|
-
import { Search as Search_2 } from '
|
|
95
|
-
import { SearchButton } from '
|
|
96
|
-
import { SearchClear } from '
|
|
97
|
-
import { SearchInput } from '
|
|
98
|
-
import { SearchProps as SearchProps_2 } from '
|
|
99
|
-
import { Select as Select_2 } from '
|
|
100
|
-
import { SelectProps as SelectProps_2 } from '
|
|
81
|
+
import { Search as Search_2 } from '@digdir/designsystemet-react';
|
|
82
|
+
import { SearchButton } from '@digdir/designsystemet-react';
|
|
83
|
+
import { SearchClear } from '@digdir/designsystemet-react';
|
|
84
|
+
import { SearchInput } from '@digdir/designsystemet-react';
|
|
85
|
+
import { SearchProps as SearchProps_2 } from '@digdir/designsystemet-react';
|
|
86
|
+
import { Select as Select_2 } from '@digdir/designsystemet-react';
|
|
87
|
+
import { SelectProps as SelectProps_2 } from '@digdir/designsystemet-react';
|
|
101
88
|
import { SeverityColors } from '@digdir/designsystemet-types';
|
|
102
|
-
import { Size } from '@digdir/designsystemet
|
|
103
|
-
import { SkeletonProps as SkeletonProps_2 } from '
|
|
104
|
-
import { SkipLink as SkipLink_2 } from '
|
|
105
|
-
import { SkipLinkProps as SkipLinkProps_2 } from '
|
|
106
|
-
import { SpinnerProps as SpinnerProps_2 } from '
|
|
107
|
-
import { SuggestionProps as SuggestionProps_2 } from '
|
|
108
|
-
import { Switch as Switch_2 } from '
|
|
109
|
-
import { SwitchProps as SwitchProps_2 } from '
|
|
110
|
-
import { Table as Table_2 } from '
|
|
111
|
-
import { TableProps as TableProps_2 } from '
|
|
112
|
-
import { Tabs as Tabs_2 } from '
|
|
113
|
-
import { TabsProps as TabsProps_2 } from '
|
|
114
|
-
import { Textarea as Textarea_2 } from '
|
|
115
|
-
import { TextareaProps as TextareaProps_2 } from '
|
|
116
|
-
import { TextfieldProps as TextfieldProps_2 } from '
|
|
117
|
-
import { ToggleGroup as ToggleGroup_2 } from '
|
|
118
|
-
import { ToggleGroupProps as ToggleGroupProps_2 } from '
|
|
119
|
-
import { Tooltip as Tooltip_2 } from '
|
|
120
|
-
import { TooltipProps as TooltipProps_2 } from '
|
|
121
|
-
import { useCheckboxGroup as useCheckboxGroup_2 } from '
|
|
122
|
-
import { usePagination as usePagination_2 } from '
|
|
123
|
-
import { useRadioGroup as useRadioGroup_2 } from '
|
|
124
|
-
import { ValidationMessageProps as ValidationMessageProps_2 } from '
|
|
89
|
+
import { Size } from '@digdir/designsystemet-types';
|
|
90
|
+
import { SkeletonProps as SkeletonProps_2 } from '@digdir/designsystemet-react';
|
|
91
|
+
import { SkipLink as SkipLink_2 } from '@digdir/designsystemet-react';
|
|
92
|
+
import { SkipLinkProps as SkipLinkProps_2 } from '@digdir/designsystemet-react';
|
|
93
|
+
import { SpinnerProps as SpinnerProps_2 } from '@digdir/designsystemet-react';
|
|
94
|
+
import { SuggestionProps as SuggestionProps_2 } from '@digdir/designsystemet-react';
|
|
95
|
+
import { Switch as Switch_2 } from '@digdir/designsystemet-react';
|
|
96
|
+
import { SwitchProps as SwitchProps_2 } from '@digdir/designsystemet-react';
|
|
97
|
+
import { Table as Table_2 } from '@digdir/designsystemet-react';
|
|
98
|
+
import { TableProps as TableProps_2 } from '@digdir/designsystemet-react';
|
|
99
|
+
import { Tabs as Tabs_2 } from '@digdir/designsystemet-react';
|
|
100
|
+
import { TabsProps as TabsProps_2 } from '@digdir/designsystemet-react';
|
|
101
|
+
import { Textarea as Textarea_2 } from '@digdir/designsystemet-react';
|
|
102
|
+
import { TextareaProps as TextareaProps_2 } from '@digdir/designsystemet-react';
|
|
103
|
+
import { TextfieldProps as TextfieldProps_2 } from '@digdir/designsystemet-react';
|
|
104
|
+
import { ToggleGroup as ToggleGroup_2 } from '@digdir/designsystemet-react';
|
|
105
|
+
import { ToggleGroupProps as ToggleGroupProps_2 } from '@digdir/designsystemet-react';
|
|
106
|
+
import { Tooltip as Tooltip_2 } from '@digdir/designsystemet-react';
|
|
107
|
+
import { TooltipProps as TooltipProps_2 } from '@digdir/designsystemet-react';
|
|
108
|
+
import { useCheckboxGroup as useCheckboxGroup_2 } from '@digdir/designsystemet-react';
|
|
109
|
+
import { usePagination as usePagination_2 } from '@digdir/designsystemet-react';
|
|
110
|
+
import { useRadioGroup as useRadioGroup_2 } from '@digdir/designsystemet-react';
|
|
111
|
+
import { ValidationMessageProps as ValidationMessageProps_2 } from '@digdir/designsystemet-react';
|
|
125
112
|
|
|
126
113
|
export declare const Alert: ForwardRefExoticComponent<AlertProps & RefAttributes<HTMLDivElement>>;
|
|
127
114
|
|
|
@@ -152,13 +139,16 @@ export declare const Avatar: ForwardRefExoticComponent<AvatarProps_2 & RefAttrib
|
|
|
152
139
|
*/
|
|
153
140
|
export declare type AvatarProps = AvatarProps_2;
|
|
154
141
|
|
|
155
|
-
export
|
|
142
|
+
export declare const Badge: ForwardRefExoticComponent<PropsWithoutRef<BadgeProps> & RefAttributes<HTMLSpanElement>>;
|
|
156
143
|
|
|
157
|
-
export
|
|
144
|
+
export declare const BadgePosition: typeof BadgePosition_2;
|
|
158
145
|
|
|
159
|
-
export
|
|
146
|
+
export declare type BadgePositionProps = BadgePositionProps_2;
|
|
160
147
|
|
|
161
|
-
|
|
148
|
+
/**
|
|
149
|
+
* Badge-komponent for å vise status eller antall.
|
|
150
|
+
*/
|
|
151
|
+
export declare type BadgeProps = BadgeProps_2;
|
|
162
152
|
|
|
163
153
|
export declare const Breadcrumbs: typeof Breadcrumbs_2;
|
|
164
154
|
|
|
@@ -243,12 +233,7 @@ export declare type CheckboxProps = CheckboxProps_2;
|
|
|
243
233
|
/**
|
|
244
234
|
* Chip-komponent for filtrering, valg eller handlinger.
|
|
245
235
|
*/
|
|
246
|
-
export declare const Chip:
|
|
247
|
-
Button: ChipButton;
|
|
248
|
-
Checkbox: ChipCheckbox;
|
|
249
|
-
Radio: ChipRadio;
|
|
250
|
-
Removable: ChipRemovable;
|
|
251
|
-
};
|
|
236
|
+
export declare const Chip: typeof Chip_2;
|
|
252
237
|
|
|
253
238
|
export declare type ChipButtonProps = ChipButtonProps_2;
|
|
254
239
|
|
|
@@ -335,13 +320,10 @@ declare type DefaultProps = {
|
|
|
335
320
|
* Endrer farge for underliggende Designsystemet-komponenter.
|
|
336
321
|
* Velg fra forhåndsdefinerte farger og farger definert med theme.designsystemet.no.
|
|
337
322
|
*/
|
|
338
|
-
'data-color'?:
|
|
323
|
+
'data-color'?: Color;
|
|
339
324
|
};
|
|
340
325
|
|
|
341
|
-
export declare const Details:
|
|
342
|
-
Summary: DetailsSummary;
|
|
343
|
-
Content: DetailsContent;
|
|
344
|
-
};
|
|
326
|
+
export declare const Details: typeof Details_2;
|
|
345
327
|
|
|
346
328
|
/**
|
|
347
329
|
* Details-komponent for å vise/skjule innhold.
|
|
@@ -369,9 +351,20 @@ export declare interface DonorAmount {
|
|
|
369
351
|
label: string;
|
|
370
352
|
}
|
|
371
353
|
|
|
354
|
+
/**
|
|
355
|
+
* @deprecated `'primary'` was a bespoke value that matched no real theme
|
|
356
|
+
* scope, so it silently inherited the surrounding theme. It now maps to
|
|
357
|
+
* `'primary-color-red'` and the alias will be removed in a later minor —
|
|
358
|
+
* pass the real scope name instead.
|
|
359
|
+
*/
|
|
360
|
+
declare type DonorLegacyColor = 'primary';
|
|
361
|
+
|
|
372
362
|
export declare interface DonorProps {
|
|
373
|
-
/**
|
|
374
|
-
|
|
363
|
+
/**
|
|
364
|
+
* Theme scope for the whole component — any real `data-color` scope from
|
|
365
|
+
* the design tokens (same vocabulary as every other component).
|
|
366
|
+
*/
|
|
367
|
+
'data-color'?: Color | DonorLegacyColor;
|
|
375
368
|
/** Preset donation amounts */
|
|
376
369
|
amounts?: DonorAmount[];
|
|
377
370
|
/** Default selected amount (value) */
|
|
@@ -471,14 +464,24 @@ export declare type FieldsetProps = FieldsetProps_2;
|
|
|
471
464
|
|
|
472
465
|
export declare const Footer: ({ "data-color": dataColor, variant, colorScheme, columns, showGraphicElements, newsletterDescription, newsletterPlaceholder, newsletterButtonText, newsletterConsentText, onNewsletterSubmit, hideNewsletter, shortcutsLinks, linksLinks, shortcutsTitle, linksTitle, visitingAddress, organizationNumber, email, showPrimaryLogo, primaryLogoSrc, primaryLogoAlt, whiteSectionSlot, socialLinks, contactPersons, legalLinks, socialLinksTitle, contactPersonsTitle, }?: FooterProps) => JSX.Element;
|
|
473
466
|
|
|
467
|
+
/**
|
|
468
|
+
* @deprecated `'primary'` and `'additional'` were bespoke values; they now map
|
|
469
|
+
* to `'primary-color-red'` and `'additional-color-ocean'` and the aliases will
|
|
470
|
+
* be removed in a later minor — pass the real scope name instead.
|
|
471
|
+
*/
|
|
472
|
+
declare type FooterLegacyColor = 'primary' | 'additional';
|
|
473
|
+
|
|
474
474
|
declare interface FooterLink {
|
|
475
475
|
label: string;
|
|
476
476
|
href: string;
|
|
477
477
|
}
|
|
478
478
|
|
|
479
479
|
export declare interface FooterProps {
|
|
480
|
-
/**
|
|
481
|
-
|
|
480
|
+
/**
|
|
481
|
+
* Theme scope for the main section — any real `data-color` scope from the
|
|
482
|
+
* design tokens. The background uses the scope's tinted background token.
|
|
483
|
+
*/
|
|
484
|
+
'data-color'?: Color | FooterLegacyColor;
|
|
482
485
|
/** Footer layout variant. 'columns' renders N navigation columns (from `columns`) + an organisation meta row + a legal/copyright row. */
|
|
483
486
|
variant?: 'default' | 'contact' | 'columns';
|
|
484
487
|
/** Force a colour scheme on the footer (applies `data-color-scheme`). Lets any project render a light or dark footer from the same tokens. */
|
|
@@ -588,7 +591,7 @@ export declare type GraphicElementProps = MergeRight<DefaultProps, {
|
|
|
588
591
|
* 'secondary-color-rust', 'secondary-color-pink',
|
|
589
592
|
* 'additional-color-ocean', 'additional-color-jungle' and 'neutral'.
|
|
590
593
|
*/
|
|
591
|
-
'data-color'?:
|
|
594
|
+
'data-color'?: Color;
|
|
592
595
|
/**
|
|
593
596
|
* Optional CSS class name.
|
|
594
597
|
*/
|
|
@@ -669,11 +672,22 @@ export declare type GraphicElementVariant = 'solid' | 'outline' | 'isometric';
|
|
|
669
672
|
|
|
670
673
|
export declare const Header: ({ variant, "data-color": dataColor, activePage, setPage, children, showUser, showSearch, showLogin, showCta, ctaLabel, ctaIcon, onCtaClick, showThemeToggle, secondaryLogo, secondaryLogoSrc, secondaryLogoSrcDark, secondaryLogoAlt, navItems, showNavItems, showMenuButton, showHeaderExtension, showModeToggle, showLanguageSwitch, extensionColor, userName, userInitials, userAvatarSrc, onUserClick, }: HeaderProps) => JSX.Element;
|
|
671
674
|
|
|
675
|
+
/**
|
|
676
|
+
* @deprecated `'primary'` was a bespoke value; it now maps to
|
|
677
|
+
* `'primary-color-red'` and the alias will be removed in a later minor —
|
|
678
|
+
* pass the real scope name instead.
|
|
679
|
+
*/
|
|
680
|
+
declare type HeaderLegacyColor = 'primary';
|
|
681
|
+
|
|
672
682
|
export declare interface HeaderProps {
|
|
673
683
|
/** Layout density. 'compact' renders a slimmer header with a transparent (non-boxed) logo area and reduced height — useful for documentation sites, dashboards or any app that wants a lighter top bar. Defaults to 'default'. */
|
|
674
684
|
variant?: 'default' | 'compact';
|
|
675
|
-
/**
|
|
676
|
-
|
|
685
|
+
/**
|
|
686
|
+
* Theme scope for the header extension (top bar) — any real `data-color`
|
|
687
|
+
* scope from the design tokens. The extension background uses the scope's
|
|
688
|
+
* base color with matching contrast text.
|
|
689
|
+
*/
|
|
690
|
+
'data-color'?: Color | HeaderLegacyColor;
|
|
677
691
|
activePage?: string;
|
|
678
692
|
setPage?: (pageName: string) => void;
|
|
679
693
|
children?: default_2.ReactNode;
|
|
@@ -784,11 +798,7 @@ export declare type LinkProps = LinkProps_2;
|
|
|
784
798
|
/**
|
|
785
799
|
* List-komponent for punktlister (ul) og nummererte lister (ol).
|
|
786
800
|
*/
|
|
787
|
-
export declare const List:
|
|
788
|
-
Item: ListItem;
|
|
789
|
-
Ordered: ListOrdered;
|
|
790
|
-
Unordered: ListUnordered;
|
|
791
|
-
};
|
|
801
|
+
export declare const List: typeof List_2;
|
|
792
802
|
|
|
793
803
|
/**
|
|
794
804
|
* Slår sammen to typer, der egenskaper fra T2 (høyre) overskriver egenskaper fra T1 (venstre).
|
|
@@ -897,13 +907,7 @@ export declare type SpinnerProps = SpinnerProps_2;
|
|
|
897
907
|
* Suggestion-komponent for autofullfør/søkeforslag.
|
|
898
908
|
* Merk: Dette er en eksperimentell komponent fra DigDir.
|
|
899
909
|
*/
|
|
900
|
-
export declare const Suggestion:
|
|
901
|
-
List: EXPERIMENTAL_SuggestionList;
|
|
902
|
-
Input: EXPERIMENTAL_SuggestionInput;
|
|
903
|
-
Empty: EXPERIMENTAL_SuggestionEmpty;
|
|
904
|
-
Option: EXPERIMENTAL_SuggestionOption;
|
|
905
|
-
Clear: EXPERIMENTAL_SuggestionClear;
|
|
906
|
-
};
|
|
910
|
+
export declare const Suggestion: typeof EXPERIMENTAL_Suggestion;
|
|
907
911
|
|
|
908
912
|
export declare type SuggestionClearProps = ComponentProps<typeof EXPERIMENTAL_Suggestion.Clear>;
|
|
909
913
|
|
|
@@ -1027,3 +1031,22 @@ export declare interface ValidationMessageProps extends ValidationMessageProps_2
|
|
|
1027
1031
|
}
|
|
1028
1032
|
|
|
1029
1033
|
export { }
|
|
1034
|
+
|
|
1035
|
+
// --- Embedded from rk-design-tokens/design-tokens-build/types.d.ts ---
|
|
1036
|
+
declare module '@digdir/designsystemet-types' {
|
|
1037
|
+
export interface ColorDefinitions {
|
|
1038
|
+
'primary-color-red': never;
|
|
1039
|
+
'secondary-color-orange': never;
|
|
1040
|
+
'secondary-color-rust': never;
|
|
1041
|
+
'secondary-color-pink': never;
|
|
1042
|
+
'additional-color-ocean': never;
|
|
1043
|
+
'additional-color-jungle': never;
|
|
1044
|
+
neutral: never;
|
|
1045
|
+
}
|
|
1046
|
+
export interface SeverityColorDefinitions {
|
|
1047
|
+
info: never;
|
|
1048
|
+
success: never;
|
|
1049
|
+
warning: never;
|
|
1050
|
+
danger: never;
|
|
1051
|
+
}
|
|
1052
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Alert as e } from "./components/Alert/index.js";
|
|
3
|
+
import { Avatar as p } from "./components/Avatar/index.js";
|
|
4
|
+
import { Badge as a, BadgePosition as x } from "./components/Badge/index.js";
|
|
5
|
+
import { Breadcrumbs as f, BreadcrumbsItem as n, BreadcrumbsLink as d, BreadcrumbsList as g } from "./components/Breadcrumbs/index.js";
|
|
6
|
+
import { Button as s } from "./components/Button/index.js";
|
|
7
|
+
import { Card as c, CardBlock as D } from "./components/Card/index.js";
|
|
8
|
+
import { Checkbox as B, useCheckboxGroup as P } from "./components/Checkbox/index.js";
|
|
9
|
+
import { Chip as k } from "./components/Chip/index.js";
|
|
10
|
+
import { DatePicker as w } from "./components/DatePicker/index.js";
|
|
11
|
+
import { DateInput as S } from "./components/DateInput/index.js";
|
|
12
|
+
import { Carousel as F } from "./components/Carousel/index.js";
|
|
13
|
+
import { GraphicElement as v } from "./components/GraphicElement/index.js";
|
|
14
|
+
import { Details as H } from "./components/Details/index.js";
|
|
15
|
+
import { Dialog as E } from "./components/Dialog/index.js";
|
|
16
|
+
import { Divider as y } from "./components/Divider/index.js";
|
|
17
|
+
import { Dropdown as O, DropdownButton as V, DropdownHeading as j, DropdownItem as q, DropdownList as z, DropdownTrigger as J, DropdownTriggerContext as K } from "./components/Dropdown/index.js";
|
|
18
|
+
import { ErrorSummary as Q } from "./components/ErrorSummary/index.js";
|
|
19
|
+
import { Field as W, FieldCounter as X, FieldDescription as Y } from "./components/Field/index.js";
|
|
20
|
+
import { Fieldset as _ } from "./components/Fieldset/index.js";
|
|
21
|
+
import { Heading as oo } from "./components/Heading/index.js";
|
|
22
|
+
import { Input as eo } from "./components/Input/index.js";
|
|
23
|
+
import { Label as po } from "./components/Label/index.js";
|
|
24
|
+
import { Link as ao } from "./components/Link/index.js";
|
|
25
|
+
import { List as io } from "./components/List/index.js";
|
|
26
|
+
import { Pagination as no, PaginationButton as go, PaginationItem as uo, PaginationList as so, usePagination as lo } from "./components/Pagination/index.js";
|
|
27
|
+
import { Paragraph as Do } from "./components/Paragraph/index.js";
|
|
28
|
+
import { Popover as Bo } from "./components/Popover/index.js";
|
|
29
|
+
import { Radio as bo, useRadioGroup as ko } from "./components/Radio/index.js";
|
|
30
|
+
import { Search as wo } from "./components/Search/index.js";
|
|
31
|
+
import { Select as So } from "./components/Select/index.js";
|
|
32
|
+
import { SkeletonLoader as Fo } from "./components/SkeletonLoader/index.js";
|
|
33
|
+
import { SkipLink as vo } from "./components/SkipLink/index.js";
|
|
34
|
+
import { Spinner as Ho } from "./components/SpinnerLoader/index.js";
|
|
35
|
+
import { Suggestion as Eo } from "./components/Suggestion/index.js";
|
|
36
|
+
import { Switch as yo } from "./components/Switch/index.js";
|
|
37
|
+
import { Table as Oo } from "./components/Table/index.js";
|
|
38
|
+
import { Tabs as jo } from "./components/Tabs/index.js";
|
|
39
|
+
import { Tag as zo } from "./components/Tag/index.js";
|
|
40
|
+
import { Textarea as Ko } from "./components/Textarea/index.js";
|
|
41
|
+
import { Textfield as Qo } from "./components/Textfield/index.js";
|
|
42
|
+
import { ToggleGroup as Wo } from "./components/ToggleGroup/index.js";
|
|
43
|
+
import { Tooltip as Yo } from "./components/Tooltip/index.js";
|
|
44
|
+
import { ValidationMessage as _o } from "./components/ValidationMessage/index.js";
|
|
45
|
+
import { Header as or } from "./components/Header/index.js";
|
|
46
|
+
import { Footer as er } from "./components/Footer/index.js";
|
|
47
|
+
import { Donor as pr } from "./components/Donor/index.js";
|
|
48
|
+
import { LanguageProvider as ar, useLanguage as xr, useLanguageOptional as ir } from "./context/LanguageContext.js";
|
|
49
|
+
export {
|
|
50
|
+
e as Alert,
|
|
51
|
+
p as Avatar,
|
|
52
|
+
a as Badge,
|
|
53
|
+
x as BadgePosition,
|
|
54
|
+
f as Breadcrumbs,
|
|
55
|
+
n as BreadcrumbsItem,
|
|
56
|
+
d as BreadcrumbsLink,
|
|
57
|
+
g as BreadcrumbsList,
|
|
58
|
+
s as Button,
|
|
59
|
+
c as Card,
|
|
60
|
+
D as CardBlock,
|
|
61
|
+
F as Carousel,
|
|
62
|
+
B as Checkbox,
|
|
63
|
+
k as Chip,
|
|
64
|
+
S as DateInput,
|
|
65
|
+
w as DatePicker,
|
|
66
|
+
H as Details,
|
|
67
|
+
E as Dialog,
|
|
68
|
+
y as Divider,
|
|
69
|
+
pr as Donor,
|
|
70
|
+
O as Dropdown,
|
|
71
|
+
V as DropdownButton,
|
|
72
|
+
j as DropdownHeading,
|
|
73
|
+
q as DropdownItem,
|
|
74
|
+
z as DropdownList,
|
|
75
|
+
J as DropdownTrigger,
|
|
76
|
+
K as DropdownTriggerContext,
|
|
77
|
+
Q as ErrorSummary,
|
|
78
|
+
W as Field,
|
|
79
|
+
X as FieldCounter,
|
|
80
|
+
Y as FieldDescription,
|
|
81
|
+
_ as Fieldset,
|
|
82
|
+
er as Footer,
|
|
83
|
+
v as GraphicElement,
|
|
84
|
+
or as Header,
|
|
85
|
+
oo as Heading,
|
|
86
|
+
eo as Input,
|
|
87
|
+
po as Label,
|
|
88
|
+
ar as LanguageProvider,
|
|
89
|
+
ao as Link,
|
|
90
|
+
io as List,
|
|
91
|
+
no as Pagination,
|
|
92
|
+
go as PaginationButton,
|
|
93
|
+
uo as PaginationItem,
|
|
94
|
+
so as PaginationList,
|
|
95
|
+
Do as Paragraph,
|
|
96
|
+
Bo as Popover,
|
|
97
|
+
bo as Radio,
|
|
98
|
+
wo as Search,
|
|
99
|
+
So as Select,
|
|
100
|
+
Fo as SkeletonLoader,
|
|
101
|
+
vo as SkipLink,
|
|
102
|
+
Ho as Spinner,
|
|
103
|
+
Eo as Suggestion,
|
|
104
|
+
yo as Switch,
|
|
105
|
+
Oo as Table,
|
|
106
|
+
jo as Tabs,
|
|
107
|
+
zo as Tag,
|
|
108
|
+
Ko as Textarea,
|
|
109
|
+
Qo as Textfield,
|
|
110
|
+
Wo as ToggleGroup,
|
|
111
|
+
Yo as Tooltip,
|
|
112
|
+
_o as ValidationMessage,
|
|
113
|
+
P as useCheckboxGroup,
|
|
114
|
+
xr as useLanguage,
|
|
115
|
+
ir as useLanguageOptional,
|
|
116
|
+
lo as usePagination,
|
|
117
|
+
ko as useRadioGroup
|
|
118
|
+
};
|