@digdir/designsystemet-react 1.11.0 → 1.12.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/cjs/components/Combobox/Combobox.js +1 -0
- package/dist/cjs/components/Combobox/Option/useComboboxOption.js +1 -0
- package/dist/cjs/components/Combobox/useComboboxKeyboard.js +1 -0
- package/dist/cjs/components/avatar/avatar.js +2 -2
- package/dist/cjs/components/breadcrumbs/breadcrumbs-link.js +2 -1
- package/dist/cjs/components/breadcrumbs/breadcrumbs-list.js +1 -11
- package/dist/cjs/components/breadcrumbs/breadcrumbs.js +2 -1
- package/dist/cjs/components/button/button.js +8 -3
- package/dist/cjs/components/card/card.js +17 -9
- package/dist/cjs/components/details/details-summary.js +3 -3
- package/dist/cjs/components/details/details.js +2 -2
- package/dist/cjs/components/dialog/dialog-trigger-context.js +5 -6
- package/dist/cjs/components/dialog/dialog-trigger.js +3 -8
- package/dist/cjs/components/dialog/dialog.js +25 -55
- package/dist/cjs/components/error-summary/error-summary-heading.js +2 -8
- package/dist/cjs/components/error-summary/error-summary.js +4 -9
- package/dist/cjs/components/field/field-counter.js +6 -41
- package/dist/cjs/components/field/field-description.js +2 -1
- package/dist/cjs/components/field/field.js +6 -4
- package/dist/cjs/components/label/label.js +2 -1
- package/dist/cjs/components/pagination/pagination-button.js +5 -3
- package/dist/cjs/components/pagination/pagination.js +7 -3
- package/dist/cjs/components/popover/popover-trigger.js +6 -10
- package/dist/cjs/components/popover/popover.js +15 -62
- package/dist/cjs/components/select/select.js +2 -12
- package/dist/cjs/components/skeleton/skeleton.js +1 -0
- package/dist/cjs/components/spinner/spinner.js +1 -0
- package/dist/cjs/components/suggestion/suggestion-clear.js +4 -2
- package/dist/cjs/components/suggestion/suggestion-empty.js +3 -1
- package/dist/cjs/components/suggestion/suggestion-input.js +4 -3
- package/dist/cjs/components/suggestion/suggestion-list.js +5 -41
- package/dist/cjs/components/suggestion/suggestion-option.js +3 -1
- package/dist/cjs/components/suggestion/suggestion.js +9 -9
- package/dist/cjs/components/tabs/tabs-list.js +4 -7
- package/dist/cjs/components/tabs/tabs-panel.js +5 -28
- package/dist/cjs/components/tabs/tabs-tab.js +11 -9
- package/dist/cjs/components/tabs/tabs.js +16 -6
- package/dist/cjs/components/toggle-group/index.js +1 -1
- package/dist/cjs/components/toggle-group/toggle-group-item.js +8 -6
- package/dist/cjs/components/toggle-group/toggle-group.js +6 -6
- package/dist/cjs/components/tooltip/tooltip.js +6 -147
- package/dist/cjs/components/validation-message/validation-message.js +2 -1
- package/dist/cjs/index.js +39 -38
- package/dist/cjs/utilities/hooks/use-pagination/use-pagination.js +13 -25
- package/dist/cjs/utilities/index.js +17 -0
- package/dist/cjs/utilities/roving-focus/roving-focus-item.js +2 -0
- package/dist/cjs/utilities/roving-focus/roving-focus-root.js +4 -0
- package/dist/cjs/utilities/roving-focus/use-roving-focus.js +3 -1
- package/dist/esm/components/Combobox/Combobox.js +1 -0
- package/dist/esm/components/Combobox/Option/useComboboxOption.js +1 -0
- package/dist/esm/components/Combobox/useComboboxKeyboard.js +1 -0
- package/dist/esm/components/avatar/avatar.js +2 -2
- package/dist/esm/components/breadcrumbs/breadcrumbs-link.js +2 -1
- package/dist/esm/components/breadcrumbs/breadcrumbs-list.js +2 -12
- package/dist/esm/components/breadcrumbs/breadcrumbs.js +2 -1
- package/dist/esm/components/button/button.js +9 -4
- package/dist/esm/components/card/card.js +18 -10
- package/dist/esm/components/details/details-summary.js +3 -3
- package/dist/esm/components/details/details.js +2 -2
- package/dist/esm/components/dialog/dialog-trigger-context.js +6 -7
- package/dist/esm/components/dialog/dialog-trigger.js +3 -8
- package/dist/esm/components/dialog/dialog.js +26 -56
- package/dist/esm/components/error-summary/error-summary-heading.js +3 -9
- package/dist/esm/components/error-summary/error-summary.js +6 -10
- package/dist/esm/components/field/field-counter.js +8 -43
- package/dist/esm/components/field/field-description.js +2 -1
- package/dist/esm/components/field/field.js +7 -5
- package/dist/esm/components/label/label.js +2 -1
- package/dist/esm/components/pagination/pagination-button.js +5 -3
- package/dist/esm/components/pagination/pagination.js +7 -3
- package/dist/esm/components/popover/popover-trigger.js +6 -10
- package/dist/esm/components/popover/popover.js +15 -62
- package/dist/esm/components/select/select.js +2 -12
- package/dist/esm/components/skeleton/skeleton.js +1 -0
- package/dist/esm/components/spinner/spinner.js +1 -0
- package/dist/esm/components/suggestion/suggestion-clear.js +4 -2
- package/dist/esm/components/suggestion/suggestion-empty.js +3 -1
- package/dist/esm/components/suggestion/suggestion-input.js +4 -3
- package/dist/esm/components/suggestion/suggestion-list.js +5 -41
- package/dist/esm/components/suggestion/suggestion-option.js +3 -1
- package/dist/esm/components/suggestion/suggestion.js +9 -9
- package/dist/esm/components/tabs/tabs-list.js +5 -8
- package/dist/esm/components/tabs/tabs-panel.js +6 -29
- package/dist/esm/components/tabs/tabs-tab.js +12 -10
- package/dist/esm/components/tabs/tabs.js +17 -7
- package/dist/esm/components/toggle-group/index.js +1 -1
- package/dist/esm/components/toggle-group/toggle-group-item.js +10 -8
- package/dist/esm/components/toggle-group/toggle-group.js +7 -7
- package/dist/esm/components/tooltip/tooltip.js +8 -149
- package/dist/esm/components/validation-message/validation-message.js +2 -1
- package/dist/esm/index.js +8 -7
- package/dist/esm/utilities/hooks/use-pagination/use-pagination.js +13 -25
- package/dist/esm/utilities/index.js +11 -0
- package/dist/esm/utilities/roving-focus/roving-focus-item.js +2 -0
- package/dist/esm/utilities/roving-focus/roving-focus-root.js +4 -0
- package/dist/esm/utilities/roving-focus/use-roving-focus.js +3 -1
- package/dist/react-types.d.ts +8 -0
- package/dist/types/components/avatar/avatar.d.ts +12 -7
- package/dist/types/components/avatar/avatar.d.ts.map +1 -1
- package/dist/types/components/breadcrumbs/breadcrumbs-link.d.ts.map +1 -1
- package/dist/types/components/breadcrumbs/breadcrumbs-list.d.ts.map +1 -1
- package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +5 -3
- package/dist/types/components/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/dist/types/components/button/button.d.ts +1 -1
- package/dist/types/components/button/button.d.ts.map +1 -1
- package/dist/types/components/card/card.d.ts.map +1 -1
- package/dist/types/components/details/details-summary.d.ts.map +1 -1
- package/dist/types/components/details/details.d.ts +1 -1
- package/dist/types/components/details/details.d.ts.map +1 -1
- package/dist/types/components/dialog/dialog-trigger-context.d.ts +10 -3
- package/dist/types/components/dialog/dialog-trigger-context.d.ts.map +1 -1
- package/dist/types/components/dialog/dialog-trigger.d.ts +1 -1
- package/dist/types/components/dialog/dialog-trigger.d.ts.map +1 -1
- package/dist/types/components/dialog/dialog.d.ts +3 -3
- package/dist/types/components/dialog/dialog.d.ts.map +1 -1
- package/dist/types/components/dropdown/dropdown.d.ts +1 -2
- package/dist/types/components/dropdown/dropdown.d.ts.map +1 -1
- package/dist/types/components/error-summary/error-summary-heading.d.ts.map +1 -1
- package/dist/types/components/error-summary/error-summary.d.ts +6 -6
- package/dist/types/components/error-summary/error-summary.d.ts.map +1 -1
- package/dist/types/components/field/field-counter.d.ts +2 -8
- package/dist/types/components/field/field-counter.d.ts.map +1 -1
- package/dist/types/components/field/field-description.d.ts.map +1 -1
- package/dist/types/components/field/field.d.ts +6 -2
- package/dist/types/components/field/field.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/input/input.d.ts +13 -1
- package/dist/types/components/input/input.d.ts.map +1 -1
- package/dist/types/components/label/label.d.ts.map +1 -1
- package/dist/types/components/pagination/pagination-button.d.ts +13 -4
- package/dist/types/components/pagination/pagination-button.d.ts.map +1 -1
- package/dist/types/components/pagination/pagination.d.ts +27 -5
- package/dist/types/components/pagination/pagination.d.ts.map +1 -1
- package/dist/types/components/popover/popover-trigger.d.ts.map +1 -1
- package/dist/types/components/popover/popover.d.ts +2 -14
- package/dist/types/components/popover/popover.d.ts.map +1 -1
- package/dist/types/components/search/search-button.d.ts +1 -1
- package/dist/types/components/select/select.d.ts +2 -0
- package/dist/types/components/select/select.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion-clear.d.ts +7 -5
- package/dist/types/components/suggestion/suggestion-clear.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion-empty.d.ts +1 -0
- package/dist/types/components/suggestion/suggestion-empty.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion-input.d.ts +2 -1
- package/dist/types/components/suggestion/suggestion-input.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion-list.d.ts +1 -1
- package/dist/types/components/suggestion/suggestion-list.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion-option.d.ts +1 -0
- package/dist/types/components/suggestion/suggestion-option.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion.d.ts +5 -6
- package/dist/types/components/suggestion/suggestion.d.ts.map +1 -1
- package/dist/types/components/tabs/tabs-list.d.ts +4 -2
- package/dist/types/components/tabs/tabs-list.d.ts.map +1 -1
- package/dist/types/components/tabs/tabs-panel.d.ts +4 -2
- package/dist/types/components/tabs/tabs-panel.d.ts.map +1 -1
- package/dist/types/components/tabs/tabs-tab.d.ts +4 -2
- package/dist/types/components/tabs/tabs-tab.d.ts.map +1 -1
- package/dist/types/components/tabs/tabs.d.ts +6 -6
- package/dist/types/components/tabs/tabs.d.ts.map +1 -1
- package/dist/types/components/textfield/textfield.d.ts.map +1 -1
- package/dist/types/components/toggle-group/index.d.ts +1 -1
- package/dist/types/components/toggle-group/toggle-group-item.d.ts +12 -3
- package/dist/types/components/toggle-group/toggle-group-item.d.ts.map +1 -1
- package/dist/types/components/toggle-group/toggle-group.d.ts +12 -4
- package/dist/types/components/toggle-group/toggle-group.d.ts.map +1 -1
- package/dist/types/components/tooltip/tooltip.d.ts +10 -3
- package/dist/types/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/types/components/validation-message/validation-message.d.ts.map +1 -1
- package/dist/types/types.d.ts +2 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utilities/hooks/use-pagination/use-pagination.d.ts +1 -1
- package/dist/types/utilities/hooks/use-pagination/use-pagination.d.ts.map +1 -1
- package/dist/types/utilities/index.d.ts +6 -0
- package/dist/types/utilities/index.d.ts.map +1 -1
- package/dist/types/utilities/roving-focus/roving-focus-item.d.ts +1 -0
- package/dist/types/utilities/roving-focus/roving-focus-item.d.ts.map +1 -1
- package/dist/types/utilities/roving-focus/roving-focus-root.d.ts +1 -0
- package/dist/types/utilities/roving-focus/roving-focus-root.d.ts.map +1 -1
- package/dist/types/utilities/roving-focus/use-roving-focus.d.ts +14 -12
- package/dist/types/utilities/roving-focus/use-roving-focus.d.ts.map +1 -1
- package/package.json +16 -19
- package/dist/cjs/components/field/field-observer.js +0 -112
- package/dist/cjs/components/toggle-group/use-toggle-groupitem.js +0 -34
- package/dist/esm/components/field/field-observer.js +0 -107
- package/dist/esm/components/toggle-group/use-toggle-groupitem.js +0 -32
- package/dist/types/components/field/field-observer.d.ts +0 -5
- package/dist/types/components/field/field-observer.d.ts.map +0 -1
- package/dist/types/components/toggle-group/use-toggle-groupitem.d.ts +0 -12
- package/dist/types/components/toggle-group/use-toggle-groupitem.d.ts.map +0 -1
|
@@ -12,7 +12,8 @@ import { forwardRef } from 'react';
|
|
|
12
12
|
*/
|
|
13
13
|
const ValidationMessage = forwardRef(function ValidationMessage({ className, asChild, ...rest }, ref) {
|
|
14
14
|
const Component = asChild ? Slot : 'p';
|
|
15
|
-
return (jsx(Component, { className: cl('ds-validation-message', className), "data-field": 'validation', ref: ref,
|
|
15
|
+
return (jsx(Component, { className: cl('ds-validation-message', className), "data-field": 'validation', ref: ref, suppressHydrationWarning // Since <ds-field> adds attributes
|
|
16
|
+
: true, ...rest }));
|
|
16
17
|
});
|
|
17
18
|
|
|
18
19
|
export { ValidationMessage };
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import '@digdir/designsystemet-web';
|
|
2
3
|
export { Alert } from './components/alert/alert.js';
|
|
3
4
|
export { Avatar } from './components/avatar/avatar.js';
|
|
4
5
|
export { EXPERIMENTAL_AvatarStack } from './components/avatar-stack/avatar-stack.js';
|
|
@@ -55,10 +56,10 @@ export { BadgePosition } from './components/badge/badge-position.js';
|
|
|
55
56
|
export { BreadcrumbsItem } from './components/breadcrumbs/breadcrumbs-item.js';
|
|
56
57
|
export { BreadcrumbsLink } from './components/breadcrumbs/breadcrumbs-link.js';
|
|
57
58
|
export { BreadcrumbsList } from './components/breadcrumbs/breadcrumbs-list.js';
|
|
58
|
-
export { ComboboxEmpty } from './components/Combobox/Empty.js';
|
|
59
|
-
export { ComboboxOption } from './components/Combobox/Option/Option.js';
|
|
60
59
|
export { CardBlock } from './components/card/card-block.js';
|
|
61
60
|
export { ChipButton, ChipCheckbox, ChipRadio, ChipRemovable } from './components/chip/chips.js';
|
|
61
|
+
export { ComboboxEmpty } from './components/Combobox/Empty.js';
|
|
62
|
+
export { ComboboxOption } from './components/Combobox/Option/Option.js';
|
|
62
63
|
export { DetailsContent } from './components/details/details-content.js';
|
|
63
64
|
export { DetailsSummary } from './components/details/details-summary.js';
|
|
64
65
|
export { DialogBlock } from './components/dialog/dialog-block.js';
|
|
@@ -70,6 +71,11 @@ export { DropdownItem } from './components/dropdown/dropdown-item.js';
|
|
|
70
71
|
export { DropdownList } from './components/dropdown/dropdown-list.js';
|
|
71
72
|
export { DropdownTrigger } from './components/dropdown/dropdown-trigger.js';
|
|
72
73
|
export { DropdownTriggerContext } from './components/dropdown/dropdown-trigger-context.js';
|
|
74
|
+
export { SuggestionClear as EXPERIMENTAL_SuggestionClear } from './components/suggestion/suggestion-clear.js';
|
|
75
|
+
export { SuggestionEmpty as EXPERIMENTAL_SuggestionEmpty } from './components/suggestion/suggestion-empty.js';
|
|
76
|
+
export { SuggestionInput as EXPERIMENTAL_SuggestionInput } from './components/suggestion/suggestion-input.js';
|
|
77
|
+
export { SuggestionList as EXPERIMENTAL_SuggestionList } from './components/suggestion/suggestion-list.js';
|
|
78
|
+
export { SuggestionOption as EXPERIMENTAL_SuggestionOption } from './components/suggestion/suggestion-option.js';
|
|
73
79
|
export { ErrorSummaryHeading } from './components/error-summary/error-summary-heading.js';
|
|
74
80
|
export { ErrorSummaryItem } from './components/error-summary/error-summary-item.js';
|
|
75
81
|
export { ErrorSummaryLink } from './components/error-summary/error-summary-link.js';
|
|
@@ -91,11 +97,6 @@ export { SearchClear } from './components/search/search-clear.js';
|
|
|
91
97
|
export { SearchInput } from './components/search/search-input.js';
|
|
92
98
|
export { SelectOptgroup } from './components/select/select-optgroup.js';
|
|
93
99
|
export { SelectOption } from './components/select/select-option.js';
|
|
94
|
-
export { SuggestionClear as EXPERIMENTAL_SuggestionClear } from './components/suggestion/suggestion-clear.js';
|
|
95
|
-
export { SuggestionEmpty as EXPERIMENTAL_SuggestionEmpty } from './components/suggestion/suggestion-empty.js';
|
|
96
|
-
export { SuggestionInput as EXPERIMENTAL_SuggestionInput } from './components/suggestion/suggestion-input.js';
|
|
97
|
-
export { SuggestionList as EXPERIMENTAL_SuggestionList } from './components/suggestion/suggestion-list.js';
|
|
98
|
-
export { SuggestionOption as EXPERIMENTAL_SuggestionOption } from './components/suggestion/suggestion-option.js';
|
|
99
100
|
export { TableBody } from './components/table/table-body.js';
|
|
100
101
|
export { TableCell } from './components/table/table-cell.js';
|
|
101
102
|
export { TableFoot } from './components/table/table-foot.js';
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import { pagination } from '@digdir/designsystemet-web';
|
|
2
3
|
import { useMemo } from 'react';
|
|
3
4
|
|
|
4
|
-
const getSteps = (now, max, show) => {
|
|
5
|
-
const offset = (show - 1) / 2;
|
|
6
|
-
const start = Math.max(1, Math.min(Math.max(now - Math.floor(offset), 1), max - show + 1));
|
|
7
|
-
const end = Math.min(Math.max(now + Math.ceil(offset), show), max);
|
|
8
|
-
const pages = Array.from({ length: end + 1 - start }, (_, i) => i + start);
|
|
9
|
-
if (show > 4 && start > 1)
|
|
10
|
-
pages.splice(0, 2, 1, 0);
|
|
11
|
-
if (show > 3 && end < max)
|
|
12
|
-
pages.splice(-2, 2, 0, max);
|
|
13
|
-
return pages;
|
|
14
|
-
};
|
|
15
5
|
/**
|
|
16
6
|
* Hook to help manage pagination state
|
|
17
7
|
*
|
|
@@ -41,11 +31,10 @@ const getSteps = (now, max, show) => {
|
|
|
41
31
|
* </Pagination.Item>
|
|
42
32
|
* </Pagination>
|
|
43
33
|
**/
|
|
44
|
-
const usePagination = ({ currentPage = 1, setCurrentPage, onChange, totalPages = 1, showPages = 7, }) => useMemo(() => {
|
|
45
|
-
const
|
|
46
|
-
const hasPrev = currentPage !== 1;
|
|
34
|
+
const usePagination = ({ currentPage: current = 1, setCurrentPage, onChange, totalPages: total = 1, showPages: show = 7, }) => useMemo(() => {
|
|
35
|
+
const { next, prev, pages } = pagination({ current, total, show });
|
|
47
36
|
const handleClick = (page) => (event) => {
|
|
48
|
-
if (page < 1 || page >
|
|
37
|
+
if (page < 1 || page > total)
|
|
49
38
|
return event.preventDefault(); // Prevent out of bounds navigation
|
|
50
39
|
onChange?.(event, page);
|
|
51
40
|
if (!event.defaultPrevented)
|
|
@@ -53,7 +42,7 @@ const usePagination = ({ currentPage = 1, setCurrentPage, onChange, totalPages =
|
|
|
53
42
|
};
|
|
54
43
|
return {
|
|
55
44
|
/** Number of steps */
|
|
56
|
-
pages:
|
|
45
|
+
pages: pages.map(({ page, current }, index) => ({
|
|
57
46
|
/**
|
|
58
47
|
* Page number or "ellipsis" for the ellipsis item
|
|
59
48
|
*/
|
|
@@ -67,29 +56,28 @@ const usePagination = ({ currentPage = 1, setCurrentPage, onChange, totalPages =
|
|
|
67
56
|
*/
|
|
68
57
|
buttonProps: (page
|
|
69
58
|
? {
|
|
70
|
-
'aria-current':
|
|
59
|
+
'aria-current': current ? 'true' : undefined,
|
|
71
60
|
onClick: handleClick(page),
|
|
72
|
-
variant: page === currentPage ? 'primary' : 'tertiary',
|
|
73
61
|
}
|
|
74
62
|
: null),
|
|
75
63
|
})),
|
|
76
64
|
/** Properties to spread on Pagination.Button used for previous naviagation */
|
|
77
65
|
prevButtonProps: {
|
|
78
|
-
'aria-hidden': !
|
|
79
|
-
onClick: handleClick(
|
|
66
|
+
'aria-hidden': !prev, // Using aria-hidden to support all HTML elements because of potential asChild
|
|
67
|
+
onClick: handleClick(prev),
|
|
80
68
|
variant: 'tertiary',
|
|
81
69
|
},
|
|
82
70
|
/** Properties to spread on Pagination.Button used for next naviagation */
|
|
83
71
|
nextButtonProps: {
|
|
84
|
-
'aria-hidden': !
|
|
85
|
-
onClick: handleClick(
|
|
72
|
+
'aria-hidden': !next, // Using aria-hidden to support all HTML elements because of potential asChild
|
|
73
|
+
onClick: handleClick(next),
|
|
86
74
|
variant: 'tertiary',
|
|
87
75
|
},
|
|
88
76
|
/** Indication if previous page action should be shown or not */
|
|
89
|
-
hasPrev,
|
|
77
|
+
hasPrev: !!prev,
|
|
90
78
|
/** Indication if next page action should be shown or not */
|
|
91
|
-
hasNext,
|
|
79
|
+
hasNext: !!next,
|
|
92
80
|
};
|
|
93
|
-
}, [
|
|
81
|
+
}, [current, total, show]);
|
|
94
82
|
|
|
95
83
|
export { usePagination };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import 'react';
|
|
3
|
+
import '@digdir/designsystemet-web';
|
|
4
|
+
export { RovingFocusItem, getNextFocusableValue, getPrevFocusableValue } from './roving-focus/roving-focus-item.js';
|
|
5
|
+
export { RovingFocusRoot } from './roving-focus/roving-focus-root.js';
|
|
6
|
+
|
|
7
|
+
const warn = (message, ...args) => typeof window === 'undefined' ||
|
|
8
|
+
window.dsWarnings === false ||
|
|
9
|
+
console.warn(`Designsystemet: ${message}`, ...args);
|
|
10
|
+
|
|
11
|
+
export { warn };
|
|
@@ -3,6 +3,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { Slot } from '@radix-ui/react-slot';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
5
|
import { useMergeRefs } from '../hooks/use-merge-refs/use-merge-refs.js';
|
|
6
|
+
import '@digdir/designsystemet-web';
|
|
6
7
|
import { useRovingFocus } from './use-roving-focus.js';
|
|
7
8
|
|
|
8
9
|
/** Get the next focusable RovingFocusItem */
|
|
@@ -15,6 +16,7 @@ function getPrevFocusableValue(items, value) {
|
|
|
15
16
|
const currIndex = items.findIndex((item) => item.value === value);
|
|
16
17
|
return items.at(currIndex === 0 ? -1 : currIndex - 1);
|
|
17
18
|
}
|
|
19
|
+
/** @deprecated RovingFocusItem is deprecated.*/
|
|
18
20
|
const RovingFocusItem = forwardRef(({ value, asChild, ...rest }, ref) => {
|
|
19
21
|
const Component = asChild ? Slot : 'div';
|
|
20
22
|
const focusValue = value ?? (typeof rest.children === 'string' ? rest.children : '');
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { Slot } from '@radix-ui/react-slot';
|
|
4
4
|
import { createContext, forwardRef, useState, useRef, useEffect } from 'react';
|
|
5
|
+
import { warn } from '../index.js';
|
|
5
6
|
import { useMergeRefs } from '../hooks/use-merge-refs/use-merge-refs.js';
|
|
7
|
+
import '@digdir/designsystemet-web';
|
|
6
8
|
|
|
7
9
|
const RovingFocusContext = createContext({
|
|
8
10
|
elements: { current: new Map() },
|
|
@@ -16,6 +18,7 @@ const RovingFocusContext = createContext({
|
|
|
16
18
|
focusableValue: null,
|
|
17
19
|
orientation: 'horizontal',
|
|
18
20
|
});
|
|
21
|
+
/** @deprecated RovingFocusRoot is deprecated. */
|
|
19
22
|
const RovingFocusRoot = forwardRef(({ activeValue, asChild, orientation = 'horizontal', onBlur, onFocus, ...rest }, ref) => {
|
|
20
23
|
const Component = asChild ? Slot : 'div';
|
|
21
24
|
const activeValueOrNull = activeValue ?? null;
|
|
@@ -35,6 +38,7 @@ const RovingFocusRoot = forwardRef(({ activeValue, asChild, orientation = 'horiz
|
|
|
35
38
|
useEffect(() => {
|
|
36
39
|
setFocusableValue(activeValueOrNull);
|
|
37
40
|
}, [activeValueOrNull]);
|
|
41
|
+
warn('RovingFocusRoot is deprecated.');
|
|
38
42
|
return (jsx(RovingFocusContext.Provider, { value: {
|
|
39
43
|
elements,
|
|
40
44
|
getOrderedItems,
|
|
@@ -4,7 +4,9 @@ import { RovingFocusContext } from './roving-focus-root.js';
|
|
|
4
4
|
|
|
5
5
|
// Logic from: https://www.joshuawootonn.com/react-roving-tabindex
|
|
6
6
|
// Inspired by: https://github.com/radix-ui/primitives/tree/main/packages/react/roving-focus/src
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
@deprecated useRovingFocus is deprecated.
|
|
9
|
+
Handles props for `RovingFocus` in context with `RovingFocusRoot` */
|
|
8
10
|
const useRovingFocus = (value) => {
|
|
9
11
|
const { elements, getOrderedItems, setFocusableValue, focusableValue, onShiftTab, orientation, } = useContext(RovingFocusContext);
|
|
10
12
|
return {
|
package/dist/react-types.d.ts
CHANGED
|
@@ -27,6 +27,14 @@ declare global {
|
|
|
27
27
|
* - `'auto'`: Automatically select the color scheme based on system preferences.
|
|
28
28
|
*/
|
|
29
29
|
'data-color-scheme'?: ColorScheme | (string & {});
|
|
30
|
+
// Make React 18 support popover attributes https://github.com/facebook/react/issues/27479
|
|
31
|
+
popovertarget?: string;
|
|
32
|
+
popover?: '' | 'auto' | 'manual' | 'hint';
|
|
33
|
+
}
|
|
34
|
+
// Make React support command attributes https://github.com/facebook/react/issues/27479
|
|
35
|
+
interface ButtonHTMLAttributes<T> extends React.HTMLAttributes<T> {
|
|
36
|
+
command?: string;
|
|
37
|
+
commandfor?: string;
|
|
30
38
|
}
|
|
31
39
|
}
|
|
32
40
|
}
|
|
@@ -2,16 +2,21 @@ import type { Size } from '@digdir/designsystemet-types';
|
|
|
2
2
|
import type { HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
import type { DefaultProps } from '../../types';
|
|
4
4
|
import type { MergeRight } from '../../utilities';
|
|
5
|
-
type
|
|
6
|
-
|
|
7
|
-
* The name of the person the avatar represents.
|
|
8
|
-
*/
|
|
5
|
+
type AriaHidden = HTMLAttributes<HTMLSpanElement>['aria-hidden'];
|
|
6
|
+
type AriaAttributes = {
|
|
9
7
|
'aria-label': string;
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
'data-tooltip'?: never;
|
|
9
|
+
'aria-hidden'?: AriaHidden;
|
|
10
|
+
} | {
|
|
11
|
+
'aria-label'?: never;
|
|
12
|
+
'data-tooltip': string;
|
|
13
|
+
'aria-hidden'?: AriaHidden;
|
|
14
|
+
} | {
|
|
15
|
+
'aria-label'?: string;
|
|
16
|
+
'data-tooltip'?: string;
|
|
12
17
|
'aria-hidden': true | 'true';
|
|
13
18
|
};
|
|
14
|
-
export type AvatarProps = MergeRight<DefaultProps & HTMLAttributes<HTMLSpanElement>,
|
|
19
|
+
export type AvatarProps = MergeRight<DefaultProps & HTMLAttributes<HTMLSpanElement>, AriaAttributes & {
|
|
15
20
|
/**
|
|
16
21
|
* The size of the avatar.
|
|
17
22
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAGzD,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,KAAK,
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAGzD,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAA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AAM,MAAM,oBAAoB,GAAG,SAAS,CAAC;AAE7C,eAAO,MAAM,eAAe;;;
|
|
1
|
+
{"version":3,"file":"breadcrumbs-link.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumbs/breadcrumbs-link.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC;AAE7C,eAAO,MAAM,eAAe;;;qDAW1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumbs-list.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumbs/breadcrumbs-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"breadcrumbs-list.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumbs/breadcrumbs-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAExD,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,gBAAgB,CAAC,CAAC;AAEpE,eAAO,MAAM,eAAe,mHAK1B,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { DSBreadcrumbsElement } from '@digdir/designsystemet-web';
|
|
2
|
+
import '@digdir/designsystemet-web';
|
|
1
3
|
import { type HTMLAttributes } from 'react';
|
|
2
4
|
import type { DefaultProps } from '../../types';
|
|
3
5
|
import type { MergeRight } from '../../utilities';
|
|
4
|
-
export type BreadcrumbsProps = MergeRight<DefaultProps & HTMLAttributes<
|
|
6
|
+
export type BreadcrumbsProps = MergeRight<DefaultProps & HTMLAttributes<DSBreadcrumbsElement>, {
|
|
5
7
|
/**
|
|
6
8
|
* Sets the screen reader label for the Breadcrumbs area
|
|
7
9
|
* @default 'Du er her'
|
|
@@ -26,11 +28,11 @@ export type BreadcrumbsProps = MergeRight<DefaultProps & HTMLAttributes<HTMLElem
|
|
|
26
28
|
* </Breadcrumbs.List>
|
|
27
29
|
* </Breadcrumbs>
|
|
28
30
|
*/
|
|
29
|
-
export declare const Breadcrumbs: import("react").ForwardRefExoticComponent<Omit<DefaultProps & HTMLAttributes<
|
|
31
|
+
export declare const Breadcrumbs: import("react").ForwardRefExoticComponent<Omit<DefaultProps & HTMLAttributes<DSBreadcrumbsElement>, "aria-label"> & {
|
|
30
32
|
/**
|
|
31
33
|
* Sets the screen reader label for the Breadcrumbs area
|
|
32
34
|
* @default 'Du er her'
|
|
33
35
|
*/
|
|
34
36
|
'aria-label'?: string;
|
|
35
|
-
} & import("react").RefAttributes<
|
|
37
|
+
} & import("react").RefAttributes<DSBreadcrumbsElement>>;
|
|
36
38
|
//# sourceMappingURL=breadcrumbs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumbs/breadcrumbs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumbs/breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,4BAA4B,CAAC;AAEpC,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,gBAAgB,GAAG,UAAU,CACvC,YAAY,GAAG,cAAc,CAAC,oBAAoB,CAAC,EACnD;IACE;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,WAAW;IA1BpB;;;OAGG;mBACY,MAAM;wDA+BxB,CAAC"}
|
|
@@ -42,7 +42,7 @@ export type ButtonProps = MergeRight<DefaultProps & ButtonHTMLAttributes<HTMLBut
|
|
|
42
42
|
* @example
|
|
43
43
|
* <Button>Click me</Button>
|
|
44
44
|
*/
|
|
45
|
-
export declare const Button: import("react").ForwardRefExoticComponent<Omit<DefaultProps & ButtonHTMLAttributes<HTMLButtonElement>, "type" | "data-color" | "variant" | "
|
|
45
|
+
export declare const Button: import("react").ForwardRefExoticComponent<Omit<DefaultProps & ButtonHTMLAttributes<HTMLButtonElement>, "type" | "data-color" | "variant" | "asChild" | "icon" | "loading"> & {
|
|
46
46
|
/**
|
|
47
47
|
* Specify which variant to use
|
|
48
48
|
* @default 'primary'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,MAAM,WAAW,GAAG,UAAU,CAClC,YAAY,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,EACtD;IACE;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;IAC/C;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IACzD;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,o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,CACF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,MAAM;IAzCf;;;OAGG;cACO,SAAS,GAAG,WAAW,GAAG,UAAU;IAC9C;;OAEG;mBACY,KAAK,GAAG,OAAO,CAAC,cAAc,EAAE,QAAQ,CAAC;IACxD;;;;OAIG;WACI,OAAO;IACd;;;;;OAKG;cACO,OAAO,GAAG,SAAS;IAC7B;;;OAGG;cACO,OAAO;IACjB;;;OAGG;WACI,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC;qDAuDzD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,MAAM,SAAS,GAAG,UAAU,CAChC,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gEAAgE;IAChE,QAAQ,EAAE,SAAS,CAAC;CACrB,CACF,CAAC;
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,MAAM,SAAS,GAAG,UAAU,CAChC,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gEAAgE;IAChE,QAAQ,EAAE,SAAS,CAAC;CACrB,CACF,CAAC;AAOF;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI;IA/Bb;;;;OAIG;cACO,SAAS,GAAG,QAAQ;IAC9B;;;OAGG;cACO,OAAO;IACjB,gEAAgE;cACtD,SAAS;kDAuDrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"details-summary.d.ts","sourceRoot":"","sources":["../../../src/components/details/details-summary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,MAAM,MAAM,mBAAmB,GAAG;IAChC,mBAAmB;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;AAEhC;;;;;GAKG;AACH,eAAO,MAAM,cAAc;IAVzB,mBAAmB;cACT,SAAS;
|
|
1
|
+
{"version":3,"file":"details-summary.d.ts","sourceRoot":"","sources":["../../../src/components/details/details-summary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,MAAM,MAAM,mBAAmB,GAAG;IAChC,mBAAmB;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;AAEhC;;;;;GAKG;AACH,eAAO,MAAM,cAAc;IAVzB,mBAAmB;cACT,SAAS;6EAmBpB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import '@
|
|
2
|
+
import '@digdir/designsystemet-web';
|
|
3
3
|
import type { DefaultProps } from '../../types';
|
|
4
4
|
import type { MergeRight } from '../../utilities';
|
|
5
5
|
export type DetailsProps = MergeRight<DefaultProps & HTMLAttributes<HTMLDetailsElement>, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../src/components/details/details.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,
|
|
1
|
+
{"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../src/components/details/details.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,YAAY,GAAG,UAAU,CACnC,YAAY,GAAG,cAAc,CAAC,kBAAkB,CAAC,EACjD;IACE;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CACF,GACC,CACI;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CAAE,GACnD;IAAE,IAAI,CAAC,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CAAE,CACtD,CAAC;AAEJ;;;;;;;;GAQG;AACH,eAAO,MAAM,OAAO,6GA2CnB,CAAC"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import type { ReactNode
|
|
2
|
-
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
type DialogContext = {
|
|
3
|
+
id?: string;
|
|
4
|
+
modal?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const Context: import("react").Context<DialogContext & {
|
|
7
|
+
setContext?: (context: DialogContext) => void;
|
|
8
|
+
}>;
|
|
3
9
|
export type DialogTriggerContextProps = {
|
|
4
10
|
children: ReactNode;
|
|
5
11
|
};
|
|
@@ -15,7 +21,8 @@ export type DialogTriggerContextProps = {
|
|
|
15
21
|
* </Dialog.TriggerContext>
|
|
16
22
|
*/
|
|
17
23
|
export declare const DialogTriggerContext: {
|
|
18
|
-
(
|
|
24
|
+
(rest: DialogTriggerContextProps): import("react/jsx-runtime").JSX.Element;
|
|
19
25
|
displayName: string;
|
|
20
26
|
};
|
|
27
|
+
export {};
|
|
21
28
|
//# sourceMappingURL=dialog-trigger-context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-trigger-context.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/dialog-trigger-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"dialog-trigger-context.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/dialog-trigger-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,KAAK,aAAa,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AACtD,eAAO,MAAM,OAAO;iBACa,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI;EAC5D,CAAC;AAEN,MAAM,MAAM,yBAAyB,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB;WAAU,yBAAyB;;CAKnE,CAAC"}
|
|
@@ -12,7 +12,7 @@ export type DialogTriggerProps = ComponentPropsWithRef<typeof Button>;
|
|
|
12
12
|
* </Dialog>
|
|
13
13
|
* </Dialog.TriggerContext>
|
|
14
14
|
*/
|
|
15
|
-
export declare const DialogTrigger: import("react").ForwardRefExoticComponent<Omit<Omit<import("../../types").DefaultProps & import("react").ButtonHTMLAttributes<HTMLButtonElement>, "type" | "data-color" | "variant" | "
|
|
15
|
+
export declare const DialogTrigger: import("react").ForwardRefExoticComponent<Omit<Omit<import("../../types").DefaultProps & import("react").ButtonHTMLAttributes<HTMLButtonElement>, "type" | "data-color" | "variant" | "asChild" | "icon" | "loading"> & {
|
|
16
16
|
variant?: "primary" | "secondary" | "tertiary";
|
|
17
17
|
'data-color'?: import("packages/types/dist/types").Color | Extract<import("packages/types/dist/types").SeverityColors, "danger">;
|
|
18
18
|
icon?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-trigger.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/dialog-trigger.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,MAAM,CAAC,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa;;;;;;;
|
|
1
|
+
{"version":3,"file":"dialog-trigger.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/dialog-trigger.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,MAAM,CAAC,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa;;;;;;;gHAezB,CAAC"}
|
|
@@ -63,12 +63,12 @@ export type DialogProps = MergeRight<DefaultProps & DialogHTMLAttributes<HTMLDia
|
|
|
63
63
|
*
|
|
64
64
|
* ...
|
|
65
65
|
*
|
|
66
|
-
* <Button
|
|
67
|
-
* <Dialog
|
|
66
|
+
* <Button command="show-modal" commandfor="my-dialog">Open Dialog</Button>
|
|
67
|
+
* <Dialog id="my-dialog">
|
|
68
68
|
* Content
|
|
69
69
|
* </Dialog>
|
|
70
70
|
*/
|
|
71
|
-
export declare const Dialog: import("react").ForwardRefExoticComponent<Omit<DefaultProps & DialogHTMLAttributes<HTMLDialogElement>, "asChild" | "open" | "placement" | "
|
|
71
|
+
export declare const Dialog: import("react").ForwardRefExoticComponent<Omit<DefaultProps & DialogHTMLAttributes<HTMLDialogElement>, "asChild" | "open" | "placement" | "modal" | "closedby" | "onClose" | "closeButton"> & {
|
|
72
72
|
/**
|
|
73
73
|
* Screen reader label of close button. Set false to hide the close button.
|
|
74
74
|
* @default 'Lukk dialogvindu'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAKlD,MAAM,MAAM,WAAW,GAAG,UAAU,CAClC,YAAY,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,EACtD;IACE;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC7B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,cAAc,GAAG,KAAK,CAAC;IAC3C;;;;OAIG;IACH,SAAS,CAAC,EAAE,QAAQ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AG,KAAK,GAAG,QAAQ,CAAC;IAC3D;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,MAAM;IApEf;;;OAGG;kBACW,MAAM,GAAG,KAAK;IAC5B;;;;;;OAMG;eACQ,MAAM,GAAG,cAAc,GAAG,KAAK;IAC1C;;;;OAIG;gBACS,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ;IAC1D;;;;;;OAMG;YACK,OAAO;IACf;;OAEG;WACI,OAAO;IACd;;OAEG;cACO,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI;IAChC;;;;;OAKG;cACO,OAAO;qDAmGpB,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Placement } from '
|
|
2
|
-
import type { DefaultProps } from '../../types';
|
|
1
|
+
import type { DefaultProps, Placement } from '../../types';
|
|
3
2
|
import type { MergeRight } from '../../utilities';
|
|
4
3
|
import { type PopoverProps } from '../popover/popover';
|
|
5
4
|
export type DropdownProps = MergeRight<DefaultProps & Omit<PopoverProps, 'variant'>, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown/dropdown.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown/dropdown.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEhE,MAAM,MAAM,aAAa,GAAG,UAAU,CACpC,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,EAC5C;IACE;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,QAAQ;IAnCjB;;;OAGG;gBACS,SAAS;kDA6CxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-summary-heading.d.ts","sourceRoot":"","sources":["../../../src/components/error-summary/error-summary-heading.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"error-summary-heading.d.ts","sourceRoot":"","sources":["../../../src/components/error-summary/error-summary-heading.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEhE,MAAM,MAAM,wBAAwB,GAAG,YAAY,CAAC;AAEpD;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;;;;2GAK9B,CAAC"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
2
|
import type { DefaultProps } from '../../types';
|
|
3
|
-
type ErrorSummaryContextType = {
|
|
4
|
-
headingId?: string;
|
|
5
|
-
setHeadingId: (id: string) => void;
|
|
6
|
-
};
|
|
7
|
-
export declare const ErrorSummaryContext: import("react").Context<ErrorSummaryContextType>;
|
|
8
3
|
export type ErrorSummaryProps = {
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated This is not supported anymore, as the element needs to be `ds-error-summary`
|
|
6
|
+
*/
|
|
9
7
|
asChild?: React.ReactNode;
|
|
10
8
|
} & Omit<HTMLAttributes<HTMLDivElement> & DefaultProps, 'data-color'>;
|
|
11
9
|
/**
|
|
@@ -25,7 +23,9 @@ export type ErrorSummaryProps = {
|
|
|
25
23
|
* </ErrorSummary>
|
|
26
24
|
*/
|
|
27
25
|
export declare const ErrorSummary: import("react").ForwardRefExoticComponent<{
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated This is not supported anymore, as the element needs to be `ds-error-summary`
|
|
28
|
+
*/
|
|
28
29
|
asChild?: React.ReactNode;
|
|
29
30
|
} & Omit<HTMLAttributes<HTMLDivElement> & DefaultProps, "data-color"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
30
|
-
export {};
|
|
31
31
|
//# sourceMappingURL=error-summary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-summary.d.ts","sourceRoot":"","sources":["../../../src/components/error-summary/error-summary.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,
|
|
1
|
+
{"version":3,"file":"error-summary.d.ts","sourceRoot":"","sources":["../../../src/components/error-summary/error-summary.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,YAAY,EAAE,YAAY,CAAC,CAAC;AAEtE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY;IAtBvB;;OAEG;cACO,KAAK,CAAC,SAAS;sHAkC1B,CAAC"}
|
|
@@ -15,10 +15,7 @@ export type FieldCounterProps = {
|
|
|
15
15
|
*/
|
|
16
16
|
under?: string;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
* Only read when entering the field.
|
|
20
|
-
*
|
|
21
|
-
* @default 'Maks %d tegn tillatt.'
|
|
18
|
+
* @deprecated The hint attribute is deprecated.
|
|
22
19
|
*/
|
|
23
20
|
hint?: string;
|
|
24
21
|
/**
|
|
@@ -53,10 +50,7 @@ export declare const FieldCounter: import("react").ForwardRefExoticComponent<{
|
|
|
53
50
|
*/
|
|
54
51
|
under?: string;
|
|
55
52
|
/**
|
|
56
|
-
*
|
|
57
|
-
* Only read when entering the field.
|
|
58
|
-
*
|
|
59
|
-
* @default 'Maks %d tegn tillatt.'
|
|
53
|
+
* @deprecated The hint attribute is deprecated.
|
|
60
54
|
*/
|
|
61
55
|
hint?: string;
|
|
62
56
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-counter.d.ts","sourceRoot":"","sources":["../../../src/components/field/field-counter.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"field-counter.d.ts","sourceRoot":"","sources":["../../../src/components/field/field-counter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,0CAA0C,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;QAII;IACJ,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,sBAAsB,CAAC;AAC3B;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY;IAlCvB;;;;;OAKG;WACI,MAAM;IACb;;;;;OAKG;YACK,MAAM;IACd;;OAEG;WACI,MAAM;IACb;;;;QAII;WACG,MAAM;;;;wDAyBd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-description.d.ts","sourceRoot":"","sources":["../../../src/components/field/field-description.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"field-description.d.ts","sourceRoot":"","sources":["../../../src/components/field/field-description.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,kHAY3B,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { DSFieldElement } from '@digdir/designsystemet-web';
|
|
2
|
+
import '@digdir/designsystemet-web';
|
|
1
3
|
import type { HTMLAttributes } from 'react';
|
|
2
4
|
import type { DefaultProps } from '../../types';
|
|
3
5
|
export type FieldProps = {
|
|
@@ -9,9 +11,10 @@ export type FieldProps = {
|
|
|
9
11
|
/**
|
|
10
12
|
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
11
13
|
* @default false
|
|
14
|
+
* @deprecated This is not supported anymore, as the element needs to be `ds-field`
|
|
12
15
|
*/
|
|
13
16
|
asChild?: boolean;
|
|
14
|
-
} & HTMLAttributes<
|
|
17
|
+
} & HTMLAttributes<DSFieldElement> & DefaultProps;
|
|
15
18
|
/**
|
|
16
19
|
* Field component, used to wrap a form field.
|
|
17
20
|
*
|
|
@@ -32,7 +35,8 @@ export declare const Field: import("react").ForwardRefExoticComponent<{
|
|
|
32
35
|
/**
|
|
33
36
|
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
34
37
|
* @default false
|
|
38
|
+
* @deprecated This is not supported anymore, as the element needs to be `ds-field`
|
|
35
39
|
*/
|
|
36
40
|
asChild?: boolean;
|
|
37
|
-
} & HTMLAttributes<
|
|
41
|
+
} & HTMLAttributes<DSFieldElement> & DefaultProps & import("react").RefAttributes<DSFieldElement>>;
|
|
38
42
|
//# sourceMappingURL=field.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../src/components/field/field.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../src/components/field/field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,MAAM,UAAU,GAAG;IACvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAC3B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,cAAc,CAAC,cAAc,CAAC,GAChC,YAAY,CAAC;AAEf;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK;IAzBhB;;;OAGG;eACQ,OAAO,GAAG,KAAK;IAC1B;;;;OAIG;cACO,OAAO;kGAkCjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,YAAY,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,YAAY,EAAE,kBAAk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