@digdir/designsystemet-react 1.14.0 → 1.16.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/button/button.js +1 -1
- package/dist/cjs/components/checkbox/checkbox.js +2 -2
- package/dist/cjs/components/dialog/dialog.js +20 -6
- package/dist/cjs/components/label/label.js +1 -1
- package/dist/cjs/components/pagination/pagination-button.js +1 -1
- package/dist/cjs/components/popover/popover.js +26 -10
- package/dist/cjs/components/radio/radio.js +2 -2
- package/dist/cjs/components/tabs/tabs-tab.js +1 -3
- package/dist/cjs/components/toggle-group/toggle-group.js +1 -1
- package/dist/cjs/components/tooltip/tooltip.js +1 -1
- package/dist/cjs/utilities/hooks/use-checkbox-group/use-checkbox-group.js +8 -2
- package/dist/cjs/utilities/hooks/use-pagination/use-pagination.js +2 -4
- package/dist/cjs/utilities/hooks/use-radio-group/use-radio-group.js +11 -4
- package/dist/esm/components/button/button.js +1 -1
- package/dist/esm/components/checkbox/checkbox.js +2 -2
- package/dist/esm/components/dialog/dialog.js +20 -6
- package/dist/esm/components/label/label.js +1 -1
- package/dist/esm/components/pagination/pagination-button.js +1 -1
- package/dist/esm/components/popover/popover.js +26 -10
- package/dist/esm/components/radio/radio.js +2 -2
- package/dist/esm/components/tabs/tabs-tab.js +1 -3
- package/dist/esm/components/toggle-group/toggle-group.js +1 -1
- package/dist/esm/components/tooltip/tooltip.js +1 -1
- package/dist/esm/utilities/hooks/use-checkbox-group/use-checkbox-group.js +8 -2
- package/dist/esm/utilities/hooks/use-pagination/use-pagination.js +2 -4
- package/dist/esm/utilities/hooks/use-radio-group/use-radio-group.js +11 -4
- package/dist/types/components/badge/index.d.ts +2 -2
- package/dist/types/components/breadcrumbs/breadcrumbs-link.d.ts +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +6 -0
- package/dist/types/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/types/components/dialog/dialog-trigger.d.ts +1 -1
- package/dist/types/components/dialog/dialog.d.ts.map +1 -1
- package/dist/types/components/error-summary/error-summary-link.d.ts +1 -1
- package/dist/types/components/error-summary/error-summary-list.d.ts +1 -1
- package/dist/types/components/error-summary/error-summary-list.d.ts.map +1 -1
- package/dist/types/components/field/field-counter.d.ts +1 -1
- package/dist/types/components/heading/heading.d.ts +0 -2
- package/dist/types/components/heading/heading.d.ts.map +1 -1
- package/dist/types/components/label/label.d.ts +0 -2
- package/dist/types/components/label/label.d.ts.map +1 -1
- package/dist/types/components/popover/popover.d.ts.map +1 -1
- package/dist/types/components/radio/radio.d.ts +6 -0
- package/dist/types/components/radio/radio.d.ts.map +1 -1
- package/dist/types/components/search/search-button.d.ts +1 -1
- package/dist/types/components/suggestion/suggestion-input.d.ts +2 -9
- package/dist/types/components/suggestion/suggestion-input.d.ts.map +1 -1
- package/dist/types/components/tabs/tabs-tab.d.ts.map +1 -1
- package/dist/types/components/tooltip/tooltip.d.ts +4 -4
- package/dist/types/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/utilities/hooks/use-checkbox-group/use-checkbox-group.d.ts +4 -0
- package/dist/types/utilities/hooks/use-checkbox-group/use-checkbox-group.d.ts.map +1 -1
- package/dist/types/utilities/hooks/use-pagination/use-pagination.d.ts +2 -2
- package/dist/types/utilities/hooks/use-pagination/use-pagination.d.ts.map +1 -1
- package/dist/types/utilities/hooks/use-radio-group/use-radio-group.d.ts +5 -1
- package/dist/types/utilities/hooks/use-radio-group/use-radio-group.d.ts.map +1 -1
- package/package.json +13 -13
|
@@ -13,7 +13,7 @@ var spinner = require('../spinner/spinner.js');
|
|
|
13
13
|
* @example
|
|
14
14
|
* <Button>Click me</Button>
|
|
15
15
|
*/
|
|
16
|
-
const Button = react.forwardRef(function Button({ asChild, className, children, icon = false, loading = false, variant
|
|
16
|
+
const Button = react.forwardRef(function Button({ asChild, className, children, icon = false, loading = false, variant, popoverTarget, popovertarget, commandfor, commandFor, ...rest }, ref) {
|
|
17
17
|
const Component = asChild ? reactSlot.Slot : 'button';
|
|
18
18
|
const popoverVal = popoverTarget ?? popovertarget;
|
|
19
19
|
const popoverKey = react.version.startsWith('19')
|
|
@@ -14,8 +14,8 @@ var validationMessage = require('../validation-message/validation-message.js');
|
|
|
14
14
|
* @example
|
|
15
15
|
* <Checkbox label="I agree" value="agree" />
|
|
16
16
|
*/
|
|
17
|
-
const Checkbox = react.forwardRef(function Checkbox({ 'data-size': size, className,
|
|
18
|
-
return (jsxRuntime.jsxs(index.Field, { "data-size": size, "data-variant": variant, className: className, style: style, children: [jsxRuntime.jsx(input.Input, { type: 'checkbox', ref: ref, ...rest }), !!label$1 && jsxRuntime.jsx(label.Label, { weight: 'regular', children: label$1 }), !!description && jsxRuntime.jsx("div", { "data-field": 'description', children: description }), !!error && jsxRuntime.jsx(validationMessage.ValidationMessage, { children: error })] }));
|
|
17
|
+
const Checkbox = react.forwardRef(function Checkbox({ 'data-size': size, children, className, description, error, label: label$1, position, style, variant, ...rest }, ref) {
|
|
18
|
+
return (jsxRuntime.jsxs(index.Field, { "data-size": size, "data-variant": variant, "data-position": position, className: className, style: style, children: [jsxRuntime.jsx(input.Input, { type: 'checkbox', ref: ref, ...rest }), !!label$1 && jsxRuntime.jsx(label.Label, { weight: 'regular', children: label$1 }), !!description && jsxRuntime.jsx("div", { "data-field": 'description', children: description }), !!error && jsxRuntime.jsx(validationMessage.ValidationMessage, { children: error })] }));
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
exports.Checkbox = Checkbox;
|
|
@@ -38,12 +38,25 @@ const Dialog = react.forwardRef(function Dialog({ asChild, children, className,
|
|
|
38
38
|
const dialogRef = react.useRef(null); // This local ref is used to make sure the dialog works without a DialogTriggerContext
|
|
39
39
|
const Component = asChild ? reactSlot.Slot : 'dialog';
|
|
40
40
|
const mergedRefs = useMergeRefs.useMergeRefs([contextRef, ref, dialogRef]);
|
|
41
|
-
const showProp = modal ? 'showModal' : 'show';
|
|
42
41
|
const autoId = react.useId();
|
|
43
42
|
const usedId = id ?? autoId;
|
|
44
43
|
// Toggle open based on prop
|
|
45
|
-
react.useEffect(() =>
|
|
46
|
-
|
|
44
|
+
react.useEffect(() => {
|
|
45
|
+
if (open === undefined)
|
|
46
|
+
return; // Uncontrolled if open prop is not provided
|
|
47
|
+
const dialog = dialogRef.current;
|
|
48
|
+
if (dialog) {
|
|
49
|
+
if (open && !dialog.open)
|
|
50
|
+
dialog[modal ? 'showModal' : 'show']();
|
|
51
|
+
else
|
|
52
|
+
dialog.open = !!open; // Close with prop to prevent close event from firing
|
|
53
|
+
}
|
|
54
|
+
}, [open, modal]);
|
|
55
|
+
return (jsxRuntime.jsxs(Component, { className: cl('ds-dialog', className), "data-placement": placement, "data-modal": modal, id: usedId, onClose: (event) => {
|
|
56
|
+
if (event.target !== event.currentTarget)
|
|
57
|
+
return; // Ignore close events from nested dialogs
|
|
58
|
+
onClose?.(event.nativeEvent); // Backward compatibility: expose native event
|
|
59
|
+
}, onClick: (event) => {
|
|
47
60
|
onClick?.(event);
|
|
48
61
|
const { currentTarget: dialog, target: el, defaultPrevented } = event;
|
|
49
62
|
const isClose = el?.closest?.('[data-command="close"]');
|
|
@@ -53,11 +66,12 @@ const Dialog = react.forwardRef(function Dialog({ asChild, children, className,
|
|
|
53
66
|
console.log('Designsystemet: data-command="close" is deprecated. Use command="close" and commandfor="DIALOG-ID" instead.');
|
|
54
67
|
}
|
|
55
68
|
}, onAnimationEnd: (event) => {
|
|
56
|
-
|
|
57
|
-
|
|
69
|
+
onAnimationEnd?.(event);
|
|
70
|
+
if (event.currentTarget !== event.target)
|
|
71
|
+
return; // Only run if event is from the dialog itself
|
|
72
|
+
const autofocus = event.currentTarget.querySelector('[autofocus]');
|
|
58
73
|
if (document.activeElement !== autofocus)
|
|
59
74
|
autofocus?.focus(); // Handle autofocus on open
|
|
60
|
-
onAnimationEnd?.(event);
|
|
61
75
|
}, ref: mergedRefs, ...rest, children: [closeButton !== false && (jsxRuntime.jsx(button.Button, { "aria-label": closeButton, "data-color": 'neutral', icon: true, variant: 'tertiary', command: 'close', commandfor: usedId })), children] }));
|
|
62
76
|
});
|
|
63
77
|
|
|
@@ -12,7 +12,7 @@ var react = require('react');
|
|
|
12
12
|
* @example
|
|
13
13
|
* <Label data-size='lg' weight='medium'>Label</Label>
|
|
14
14
|
*/
|
|
15
|
-
const Label = react.forwardRef(function Label({ className, weight
|
|
15
|
+
const Label = react.forwardRef(function Label({ className, weight, asChild, ...rest }, ref) {
|
|
16
16
|
const Component = asChild ? reactSlot.Slot : 'label';
|
|
17
17
|
return (jsxRuntime.jsx(Component, { ref: ref, className: cl('ds-label', className), suppressHydrationWarning // Since <ds-field> will add for attribute dynamically
|
|
18
18
|
: true, "data-weight": weight, ...rest }));
|
|
@@ -14,7 +14,7 @@ var button = require('../button/button.js');
|
|
|
14
14
|
* </PaginationItem>
|
|
15
15
|
*/
|
|
16
16
|
const PaginationButton = react.forwardRef(function PaginationButton(rest, ref) {
|
|
17
|
-
return jsxRuntime.jsx(button.Button, {
|
|
17
|
+
return jsxRuntime.jsx(button.Button, { ref: ref, ...rest });
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
exports.PaginationButton = PaginationButton;
|
|
@@ -53,16 +53,12 @@ const Popover = react.forwardRef(function Popover({ id, className, onClose, onOp
|
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
const handleKeydown = (event) => {
|
|
56
|
-
if (event.key
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
event.preventDefault(); // Prevent closing fullscreen in Safari
|
|
63
|
-
document.querySelector(trigger)?.focus?.(); // Move focus back to trigger since `popoover="manual"` doesn't do this
|
|
64
|
-
setInternalOpen(false);
|
|
65
|
-
onClose?.();
|
|
56
|
+
if (event.key === 'Escape' && controlledOpen && isTopLayer(popover)) {
|
|
57
|
+
event.preventDefault(); // Prevent closing fullscreen in Safari
|
|
58
|
+
document.querySelector(trigger)?.focus?.(); // Move focus back to trigger since `popover="manual"` doesn't do this
|
|
59
|
+
setInternalOpen(false);
|
|
60
|
+
onClose?.();
|
|
61
|
+
}
|
|
66
62
|
};
|
|
67
63
|
popover?.togglePopover?.(controlledOpen);
|
|
68
64
|
if (controlledOpen) {
|
|
@@ -84,5 +80,25 @@ const Popover = react.forwardRef(function Popover({ id, className, onClose, onOp
|
|
|
84
80
|
return (jsxRuntime.jsx(Component, { className: cl('ds-popover', className), id: id || popoverId, popover: 'manual', "data-placement": placement, "data-variant": variant, ref: mergedRefs, suppressHydrationWarning // Since _ds-floating adds attributes
|
|
85
81
|
: true, ...rest }));
|
|
86
82
|
});
|
|
83
|
+
// NOTE: This is not able to check if the popover is the most recently added #topLayer,
|
|
84
|
+
// so we need another method in time, or remove the controlled popover="manual" in a v2
|
|
85
|
+
const isTopLayer = (checkElement) => {
|
|
86
|
+
if (!checkElement)
|
|
87
|
+
return false;
|
|
88
|
+
const { x, y, width, height } = checkElement.getBoundingClientRect();
|
|
89
|
+
const topElement = document.elementFromPoint(x + width / 2, y + height / 2);
|
|
90
|
+
// If the element on top is on browser #top-layer but not same as provided element, then provided element is not on top
|
|
91
|
+
for (let el = topElement; el; el = el.parentElement) {
|
|
92
|
+
if (checkElement === el)
|
|
93
|
+
return true; // If the topElement is same as provided element, it's on top
|
|
94
|
+
if (el instanceof HTMLDialogElement && el.open)
|
|
95
|
+
return false; // Check for open dialog
|
|
96
|
+
if (el.classList.contains(':popover-open'))
|
|
97
|
+
return false; // Polyfill support
|
|
98
|
+
if (el.matches(':popover-open'))
|
|
99
|
+
return false; // Native support
|
|
100
|
+
}
|
|
101
|
+
return false;
|
|
102
|
+
};
|
|
87
103
|
|
|
88
104
|
exports.Popover = Popover;
|
|
@@ -14,8 +14,8 @@ var validationMessage = require('../validation-message/validation-message.js');
|
|
|
14
14
|
* @example
|
|
15
15
|
* <Radio label="I agree" value="agree" />
|
|
16
16
|
*/
|
|
17
|
-
const Radio = react.forwardRef(function Radio({ 'data-size': size, className,
|
|
18
|
-
return (jsxRuntime.jsxs(index.Field, { "data-size": size, "data-variant": variant, className: className, style: style, children: [jsxRuntime.jsx(input.Input, { type: 'radio', ref: ref, ...rest }), !!label$1 && jsxRuntime.jsx(label.Label, { weight: 'regular', children: label$1 }), !!description && jsxRuntime.jsx("div", { "data-field": 'description', children: description }), !!error && jsxRuntime.jsx(validationMessage.ValidationMessage, { children: error })] }));
|
|
17
|
+
const Radio = react.forwardRef(function Radio({ 'data-size': size, children, className, description, error, label: label$1, position, style, variant, ...rest }, ref) {
|
|
18
|
+
return (jsxRuntime.jsxs(index.Field, { "data-size": size, "data-variant": variant, "data-position": position, className: className, style: style, children: [jsxRuntime.jsx(input.Input, { type: 'radio', ref: ref, ...rest }), !!label$1 && jsxRuntime.jsx(label.Label, { weight: 'regular', children: label$1 }), !!description && jsxRuntime.jsx("div", { "data-field": 'description', children: description }), !!error && jsxRuntime.jsx(validationMessage.ValidationMessage, { children: error })] }));
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
exports.Radio = Radio;
|
|
@@ -14,9 +14,7 @@ var tabs = require('./tabs.js');
|
|
|
14
14
|
*/
|
|
15
15
|
const TabsTab = react.forwardRef(function TabsTab({ value, className, onClick, onClickCapture, ...rest }, ref) {
|
|
16
16
|
const { onChange, getPrefixedValue, isControlled, currentValue } = react.useContext(tabs.Context);
|
|
17
|
-
return (
|
|
18
|
-
// biome-ignore lint/a11y/noStaticElementInteractions: ds-tabs IS interactive
|
|
19
|
-
jsxRuntime.jsx("ds-tab", { "aria-controls": rest['aria-controls'] ?? getPrefixedValue?.(value), "data-value": value, ref: ref, suppressHydrationWarning // Since <ds-tablist> adds attributes
|
|
17
|
+
return (jsxRuntime.jsx("ds-tab", { "aria-controls": rest['aria-controls'] ?? getPrefixedValue?.(value), "data-value": value, ref: ref, suppressHydrationWarning // Since <ds-tablist> adds attributes
|
|
20
18
|
: true, onClickCapture: (e) => {
|
|
21
19
|
onClickCapture?.(e);
|
|
22
20
|
if (isControlled && currentValue !== value)
|
|
@@ -16,7 +16,7 @@ const ToggleGroupContext = react.createContext({});
|
|
|
16
16
|
* <ToggleGroup.Item value='3'>Toggle 3</ToggleGroup.Item>
|
|
17
17
|
* </ToggleGroup>
|
|
18
18
|
*/
|
|
19
|
-
const ToggleGroup = react.forwardRef(function ToggleGroup({ children, className, defaultValue, name, onChange, value, variant
|
|
19
|
+
const ToggleGroup = react.forwardRef(function ToggleGroup({ children, className, defaultValue, name, onChange, value, variant, ...rest }, ref) {
|
|
20
20
|
const nameId = react.useId();
|
|
21
21
|
const isControlled = value !== undefined;
|
|
22
22
|
const [uncontrolledValue, setUncontrolledValue] = react.useState(defaultValue);
|
|
@@ -22,7 +22,7 @@ var react = require('react');
|
|
|
22
22
|
const Tooltip = react.forwardRef(function Tooltip({ content, placement = 'top', autoPlacement = true, ...rest }, ref) {
|
|
23
23
|
/* check if children is a string */
|
|
24
24
|
const isString = typeof rest.children === 'string';
|
|
25
|
-
return (jsxRuntime.jsx(reactSlot.Slot, { "
|
|
25
|
+
return (jsxRuntime.jsx(reactSlot.Slot, { "data-tooltip": content, "data-placement": placement, "data-autoplacement": autoPlacement, suppressHydrationWarning // Since data-tooltip adds aria-label/aria-description
|
|
26
26
|
: true, ref: ref, ...rest, children: isString ? jsxRuntime.jsx("span", { tabIndex: 0, children: rest.children }) : rest.children }));
|
|
27
27
|
});
|
|
28
28
|
|
|
@@ -47,10 +47,15 @@ function useCheckboxGroup(props) {
|
|
|
47
47
|
* <Checkbox {...getCheckboxProps({ value: 'all', allowIndeterminate: true })} />
|
|
48
48
|
*/
|
|
49
49
|
getCheckboxProps: (propsOrValue) => {
|
|
50
|
-
|
|
50
|
+
let groupProps;
|
|
51
|
+
if (props) {
|
|
52
|
+
const { onChange, error, ...rest } = props;
|
|
53
|
+
groupProps = rest;
|
|
54
|
+
}
|
|
55
|
+
const checkboxProps = typeof propsOrValue === 'string'
|
|
51
56
|
? { value: propsOrValue }
|
|
52
57
|
: propsOrValue || {};
|
|
53
|
-
const { allowIndeterminate = false, ref: forwardedRef = undefined, value = '', ...rest } =
|
|
58
|
+
const { allowIndeterminate = false, ref: forwardedRef = undefined, value = '', ...rest } = checkboxProps;
|
|
54
59
|
const handleRef = (element) => {
|
|
55
60
|
if (element) {
|
|
56
61
|
const refs = allowIndeterminate ? indeterminateRefs : checkboxRefs;
|
|
@@ -92,6 +97,7 @@ function useCheckboxGroup(props) {
|
|
|
92
97
|
}
|
|
93
98
|
};
|
|
94
99
|
return {
|
|
100
|
+
...groupProps,
|
|
95
101
|
...rest,
|
|
96
102
|
'aria-describedby': `${error ? errorId : ''} ${rest['aria-describedby'] || ''}`.trim() ||
|
|
97
103
|
undefined,
|
|
@@ -63,17 +63,15 @@ const usePagination = ({ currentPage: current = 1, setCurrentPage, onChange, tot
|
|
|
63
63
|
}
|
|
64
64
|
: null),
|
|
65
65
|
})),
|
|
66
|
-
/** Properties to spread on Pagination.Button used for previous
|
|
66
|
+
/** Properties to spread on Pagination.Button used for previous navigation */
|
|
67
67
|
prevButtonProps: {
|
|
68
68
|
'aria-hidden': !prev, // Using aria-hidden to support all HTML elements because of potential asChild
|
|
69
69
|
onClick: handleClick(prev),
|
|
70
|
-
variant: 'tertiary',
|
|
71
70
|
},
|
|
72
|
-
/** Properties to spread on Pagination.Button used for next
|
|
71
|
+
/** Properties to spread on Pagination.Button used for next navigation */
|
|
73
72
|
nextButtonProps: {
|
|
74
73
|
'aria-hidden': !next, // Using aria-hidden to support all HTML elements because of potential asChild
|
|
75
74
|
onClick: handleClick(next),
|
|
76
|
-
variant: 'tertiary',
|
|
77
75
|
},
|
|
78
76
|
/** Indication if previous page action should be shown or not */
|
|
79
77
|
hasPrev: !!prev,
|
|
@@ -16,8 +16,9 @@ var react = require('react');
|
|
|
16
16
|
* value: '',
|
|
17
17
|
* });
|
|
18
18
|
*/
|
|
19
|
-
function useRadioGroup(
|
|
20
|
-
const
|
|
19
|
+
function useRadioGroup(props) {
|
|
20
|
+
const { error, readOnly, required, disabled, name, onChange, value: initialValue = '', } = props || {};
|
|
21
|
+
const [groupValue, setGroupValue] = react.useState(initialValue);
|
|
21
22
|
const errorId = react.useId();
|
|
22
23
|
const namedId = react.useId();
|
|
23
24
|
const radioGroupName = name || namedId;
|
|
@@ -39,10 +40,15 @@ function useRadioGroup({ error, readOnly, required, disabled, name, onChange, va
|
|
|
39
40
|
* <Radio label="Option 1" {...getRadioProps('option-1')} />
|
|
40
41
|
*/
|
|
41
42
|
getRadioProps: (propsOrValue) => {
|
|
42
|
-
|
|
43
|
+
let groupProps;
|
|
44
|
+
if (props) {
|
|
45
|
+
const { onChange, error, ...rest } = props;
|
|
46
|
+
groupProps = rest;
|
|
47
|
+
}
|
|
48
|
+
const radioProps = typeof propsOrValue === 'string'
|
|
43
49
|
? { value: propsOrValue }
|
|
44
50
|
: propsOrValue;
|
|
45
|
-
const { ref: forwardedRef = undefined, value = '', ...rest } =
|
|
51
|
+
const { ref: forwardedRef = undefined, value = '', ...rest } = radioProps;
|
|
46
52
|
const handleRef = (element) => {
|
|
47
53
|
if (element) {
|
|
48
54
|
// Set initial checked state
|
|
@@ -67,6 +73,7 @@ function useRadioGroup({ error, readOnly, required, disabled, name, onChange, va
|
|
|
67
73
|
}
|
|
68
74
|
};
|
|
69
75
|
return {
|
|
76
|
+
...groupProps,
|
|
70
77
|
...rest,
|
|
71
78
|
name: radioGroupName,
|
|
72
79
|
'aria-describedby': `${error ? errorId : ''} ${rest['aria-describedby'] || ''}`.trim() ||
|
|
@@ -11,7 +11,7 @@ import { Spinner } from '../spinner/spinner.js';
|
|
|
11
11
|
* @example
|
|
12
12
|
* <Button>Click me</Button>
|
|
13
13
|
*/
|
|
14
|
-
const Button = forwardRef(function Button({ asChild, className, children, icon = false, loading = false, variant
|
|
14
|
+
const Button = forwardRef(function Button({ asChild, className, children, icon = false, loading = false, variant, popoverTarget, popovertarget, commandfor, commandFor, ...rest }, ref) {
|
|
15
15
|
const Component = asChild ? Slot : 'button';
|
|
16
16
|
const popoverVal = popoverTarget ?? popovertarget;
|
|
17
17
|
const popoverKey = version.startsWith('19')
|
|
@@ -12,8 +12,8 @@ import { ValidationMessage } from '../validation-message/validation-message.js';
|
|
|
12
12
|
* @example
|
|
13
13
|
* <Checkbox label="I agree" value="agree" />
|
|
14
14
|
*/
|
|
15
|
-
const Checkbox = forwardRef(function Checkbox({ 'data-size': size, className,
|
|
16
|
-
return (jsxs(FieldComponent, { "data-size": size, "data-variant": variant, className: className, style: style, children: [jsx(Input, { type: 'checkbox', ref: ref, ...rest }), !!label && jsx(Label, { weight: 'regular', children: label }), !!description && jsx("div", { "data-field": 'description', children: description }), !!error && jsx(ValidationMessage, { children: error })] }));
|
|
15
|
+
const Checkbox = forwardRef(function Checkbox({ 'data-size': size, children, className, description, error, label, position, style, variant, ...rest }, ref) {
|
|
16
|
+
return (jsxs(FieldComponent, { "data-size": size, "data-variant": variant, "data-position": position, className: className, style: style, children: [jsx(Input, { type: 'checkbox', ref: ref, ...rest }), !!label && jsx(Label, { weight: 'regular', children: label }), !!description && jsx("div", { "data-field": 'description', children: description }), !!error && jsx(ValidationMessage, { children: error })] }));
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
export { Checkbox };
|
|
@@ -36,12 +36,25 @@ const Dialog = forwardRef(function Dialog({ asChild, children, className, closeB
|
|
|
36
36
|
const dialogRef = useRef(null); // This local ref is used to make sure the dialog works without a DialogTriggerContext
|
|
37
37
|
const Component = asChild ? Slot : 'dialog';
|
|
38
38
|
const mergedRefs = useMergeRefs([contextRef, ref, dialogRef]);
|
|
39
|
-
const showProp = modal ? 'showModal' : 'show';
|
|
40
39
|
const autoId = useId();
|
|
41
40
|
const usedId = id ?? autoId;
|
|
42
41
|
// Toggle open based on prop
|
|
43
|
-
useEffect(() =>
|
|
44
|
-
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (open === undefined)
|
|
44
|
+
return; // Uncontrolled if open prop is not provided
|
|
45
|
+
const dialog = dialogRef.current;
|
|
46
|
+
if (dialog) {
|
|
47
|
+
if (open && !dialog.open)
|
|
48
|
+
dialog[modal ? 'showModal' : 'show']();
|
|
49
|
+
else
|
|
50
|
+
dialog.open = !!open; // Close with prop to prevent close event from firing
|
|
51
|
+
}
|
|
52
|
+
}, [open, modal]);
|
|
53
|
+
return (jsxs(Component, { className: cl('ds-dialog', className), "data-placement": placement, "data-modal": modal, id: usedId, onClose: (event) => {
|
|
54
|
+
if (event.target !== event.currentTarget)
|
|
55
|
+
return; // Ignore close events from nested dialogs
|
|
56
|
+
onClose?.(event.nativeEvent); // Backward compatibility: expose native event
|
|
57
|
+
}, onClick: (event) => {
|
|
45
58
|
onClick?.(event);
|
|
46
59
|
const { currentTarget: dialog, target: el, defaultPrevented } = event;
|
|
47
60
|
const isClose = el?.closest?.('[data-command="close"]');
|
|
@@ -51,11 +64,12 @@ const Dialog = forwardRef(function Dialog({ asChild, children, className, closeB
|
|
|
51
64
|
console.log('Designsystemet: data-command="close" is deprecated. Use command="close" and commandfor="DIALOG-ID" instead.');
|
|
52
65
|
}
|
|
53
66
|
}, onAnimationEnd: (event) => {
|
|
54
|
-
|
|
55
|
-
|
|
67
|
+
onAnimationEnd?.(event);
|
|
68
|
+
if (event.currentTarget !== event.target)
|
|
69
|
+
return; // Only run if event is from the dialog itself
|
|
70
|
+
const autofocus = event.currentTarget.querySelector('[autofocus]');
|
|
56
71
|
if (document.activeElement !== autofocus)
|
|
57
72
|
autofocus?.focus(); // Handle autofocus on open
|
|
58
|
-
onAnimationEnd?.(event);
|
|
59
73
|
}, ref: mergedRefs, ...rest, children: [closeButton !== false && (jsx(Button, { "aria-label": closeButton, "data-color": 'neutral', icon: true, variant: 'tertiary', command: 'close', commandfor: usedId })), children] }));
|
|
60
74
|
});
|
|
61
75
|
|
|
@@ -10,7 +10,7 @@ import { forwardRef } from 'react';
|
|
|
10
10
|
* @example
|
|
11
11
|
* <Label data-size='lg' weight='medium'>Label</Label>
|
|
12
12
|
*/
|
|
13
|
-
const Label = forwardRef(function Label({ className, weight
|
|
13
|
+
const Label = forwardRef(function Label({ className, weight, asChild, ...rest }, ref) {
|
|
14
14
|
const Component = asChild ? Slot : 'label';
|
|
15
15
|
return (jsx(Component, { ref: ref, className: cl('ds-label', className), suppressHydrationWarning // Since <ds-field> will add for attribute dynamically
|
|
16
16
|
: true, "data-weight": weight, ...rest }));
|
|
@@ -12,7 +12,7 @@ import { Button } from '../button/button.js';
|
|
|
12
12
|
* </PaginationItem>
|
|
13
13
|
*/
|
|
14
14
|
const PaginationButton = forwardRef(function PaginationButton(rest, ref) {
|
|
15
|
-
return jsx(Button, {
|
|
15
|
+
return jsx(Button, { ref: ref, ...rest });
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
export { PaginationButton };
|
|
@@ -51,16 +51,12 @@ const Popover = forwardRef(function Popover({ id, className, onClose, onOpen, op
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
const handleKeydown = (event) => {
|
|
54
|
-
if (event.key
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
event.preventDefault(); // Prevent closing fullscreen in Safari
|
|
61
|
-
document.querySelector(trigger)?.focus?.(); // Move focus back to trigger since `popoover="manual"` doesn't do this
|
|
62
|
-
setInternalOpen(false);
|
|
63
|
-
onClose?.();
|
|
54
|
+
if (event.key === 'Escape' && controlledOpen && isTopLayer(popover)) {
|
|
55
|
+
event.preventDefault(); // Prevent closing fullscreen in Safari
|
|
56
|
+
document.querySelector(trigger)?.focus?.(); // Move focus back to trigger since `popover="manual"` doesn't do this
|
|
57
|
+
setInternalOpen(false);
|
|
58
|
+
onClose?.();
|
|
59
|
+
}
|
|
64
60
|
};
|
|
65
61
|
popover?.togglePopover?.(controlledOpen);
|
|
66
62
|
if (controlledOpen) {
|
|
@@ -82,5 +78,25 @@ const Popover = forwardRef(function Popover({ id, className, onClose, onOpen, op
|
|
|
82
78
|
return (jsx(Component, { className: cl('ds-popover', className), id: id || popoverId, popover: 'manual', "data-placement": placement, "data-variant": variant, ref: mergedRefs, suppressHydrationWarning // Since _ds-floating adds attributes
|
|
83
79
|
: true, ...rest }));
|
|
84
80
|
});
|
|
81
|
+
// NOTE: This is not able to check if the popover is the most recently added #topLayer,
|
|
82
|
+
// so we need another method in time, or remove the controlled popover="manual" in a v2
|
|
83
|
+
const isTopLayer = (checkElement) => {
|
|
84
|
+
if (!checkElement)
|
|
85
|
+
return false;
|
|
86
|
+
const { x, y, width, height } = checkElement.getBoundingClientRect();
|
|
87
|
+
const topElement = document.elementFromPoint(x + width / 2, y + height / 2);
|
|
88
|
+
// If the element on top is on browser #top-layer but not same as provided element, then provided element is not on top
|
|
89
|
+
for (let el = topElement; el; el = el.parentElement) {
|
|
90
|
+
if (checkElement === el)
|
|
91
|
+
return true; // If the topElement is same as provided element, it's on top
|
|
92
|
+
if (el instanceof HTMLDialogElement && el.open)
|
|
93
|
+
return false; // Check for open dialog
|
|
94
|
+
if (el.classList.contains(':popover-open'))
|
|
95
|
+
return false; // Polyfill support
|
|
96
|
+
if (el.matches(':popover-open'))
|
|
97
|
+
return false; // Native support
|
|
98
|
+
}
|
|
99
|
+
return false;
|
|
100
|
+
};
|
|
85
101
|
|
|
86
102
|
export { Popover };
|
|
@@ -12,8 +12,8 @@ import { ValidationMessage } from '../validation-message/validation-message.js';
|
|
|
12
12
|
* @example
|
|
13
13
|
* <Radio label="I agree" value="agree" />
|
|
14
14
|
*/
|
|
15
|
-
const Radio = forwardRef(function Radio({ 'data-size': size, className,
|
|
16
|
-
return (jsxs(FieldComponent, { "data-size": size, "data-variant": variant, className: className, style: style, children: [jsx(Input, { type: 'radio', ref: ref, ...rest }), !!label && jsx(Label, { weight: 'regular', children: label }), !!description && jsx("div", { "data-field": 'description', children: description }), !!error && jsx(ValidationMessage, { children: error })] }));
|
|
15
|
+
const Radio = forwardRef(function Radio({ 'data-size': size, children, className, description, error, label, position, style, variant, ...rest }, ref) {
|
|
16
|
+
return (jsxs(FieldComponent, { "data-size": size, "data-variant": variant, "data-position": position, className: className, style: style, children: [jsx(Input, { type: 'radio', ref: ref, ...rest }), !!label && jsx(Label, { weight: 'regular', children: label }), !!description && jsx("div", { "data-field": 'description', children: description }), !!error && jsx(ValidationMessage, { children: error })] }));
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
export { Radio };
|
|
@@ -12,9 +12,7 @@ import { Context } from './tabs.js';
|
|
|
12
12
|
*/
|
|
13
13
|
const TabsTab = forwardRef(function TabsTab({ value, className, onClick, onClickCapture, ...rest }, ref) {
|
|
14
14
|
const { onChange, getPrefixedValue, isControlled, currentValue } = useContext(Context);
|
|
15
|
-
return (
|
|
16
|
-
// biome-ignore lint/a11y/noStaticElementInteractions: ds-tabs IS interactive
|
|
17
|
-
jsx("ds-tab", { "aria-controls": rest['aria-controls'] ?? getPrefixedValue?.(value), "data-value": value, ref: ref, suppressHydrationWarning // Since <ds-tablist> adds attributes
|
|
15
|
+
return (jsx("ds-tab", { "aria-controls": rest['aria-controls'] ?? getPrefixedValue?.(value), "data-value": value, ref: ref, suppressHydrationWarning // Since <ds-tablist> adds attributes
|
|
18
16
|
: true, onClickCapture: (e) => {
|
|
19
17
|
onClickCapture?.(e);
|
|
20
18
|
if (isControlled && currentValue !== value)
|
|
@@ -14,7 +14,7 @@ const ToggleGroupContext = createContext({});
|
|
|
14
14
|
* <ToggleGroup.Item value='3'>Toggle 3</ToggleGroup.Item>
|
|
15
15
|
* </ToggleGroup>
|
|
16
16
|
*/
|
|
17
|
-
const ToggleGroup = forwardRef(function ToggleGroup({ children, className, defaultValue, name, onChange, value, variant
|
|
17
|
+
const ToggleGroup = forwardRef(function ToggleGroup({ children, className, defaultValue, name, onChange, value, variant, ...rest }, ref) {
|
|
18
18
|
const nameId = useId();
|
|
19
19
|
const isControlled = value !== undefined;
|
|
20
20
|
const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);
|
|
@@ -20,7 +20,7 @@ import { forwardRef } from 'react';
|
|
|
20
20
|
const Tooltip = forwardRef(function Tooltip({ content, placement = 'top', autoPlacement = true, ...rest }, ref) {
|
|
21
21
|
/* check if children is a string */
|
|
22
22
|
const isString = typeof rest.children === 'string';
|
|
23
|
-
return (jsx(Slot, { "
|
|
23
|
+
return (jsx(Slot, { "data-tooltip": content, "data-placement": placement, "data-autoplacement": autoPlacement, suppressHydrationWarning // Since data-tooltip adds aria-label/aria-description
|
|
24
24
|
: true, ref: ref, ...rest, children: isString ? jsx("span", { tabIndex: 0, children: rest.children }) : rest.children }));
|
|
25
25
|
});
|
|
26
26
|
|
|
@@ -45,10 +45,15 @@ function useCheckboxGroup(props) {
|
|
|
45
45
|
* <Checkbox {...getCheckboxProps({ value: 'all', allowIndeterminate: true })} />
|
|
46
46
|
*/
|
|
47
47
|
getCheckboxProps: (propsOrValue) => {
|
|
48
|
-
|
|
48
|
+
let groupProps;
|
|
49
|
+
if (props) {
|
|
50
|
+
const { onChange, error, ...rest } = props;
|
|
51
|
+
groupProps = rest;
|
|
52
|
+
}
|
|
53
|
+
const checkboxProps = typeof propsOrValue === 'string'
|
|
49
54
|
? { value: propsOrValue }
|
|
50
55
|
: propsOrValue || {};
|
|
51
|
-
const { allowIndeterminate = false, ref: forwardedRef = undefined, value = '', ...rest } =
|
|
56
|
+
const { allowIndeterminate = false, ref: forwardedRef = undefined, value = '', ...rest } = checkboxProps;
|
|
52
57
|
const handleRef = (element) => {
|
|
53
58
|
if (element) {
|
|
54
59
|
const refs = allowIndeterminate ? indeterminateRefs : checkboxRefs;
|
|
@@ -90,6 +95,7 @@ function useCheckboxGroup(props) {
|
|
|
90
95
|
}
|
|
91
96
|
};
|
|
92
97
|
return {
|
|
98
|
+
...groupProps,
|
|
93
99
|
...rest,
|
|
94
100
|
'aria-describedby': `${error ? errorId : ''} ${rest['aria-describedby'] || ''}`.trim() ||
|
|
95
101
|
undefined,
|
|
@@ -61,17 +61,15 @@ const usePagination = ({ currentPage: current = 1, setCurrentPage, onChange, tot
|
|
|
61
61
|
}
|
|
62
62
|
: null),
|
|
63
63
|
})),
|
|
64
|
-
/** Properties to spread on Pagination.Button used for previous
|
|
64
|
+
/** Properties to spread on Pagination.Button used for previous navigation */
|
|
65
65
|
prevButtonProps: {
|
|
66
66
|
'aria-hidden': !prev, // Using aria-hidden to support all HTML elements because of potential asChild
|
|
67
67
|
onClick: handleClick(prev),
|
|
68
|
-
variant: 'tertiary',
|
|
69
68
|
},
|
|
70
|
-
/** Properties to spread on Pagination.Button used for next
|
|
69
|
+
/** Properties to spread on Pagination.Button used for next navigation */
|
|
71
70
|
nextButtonProps: {
|
|
72
71
|
'aria-hidden': !next, // Using aria-hidden to support all HTML elements because of potential asChild
|
|
73
72
|
onClick: handleClick(next),
|
|
74
|
-
variant: 'tertiary',
|
|
75
73
|
},
|
|
76
74
|
/** Indication if previous page action should be shown or not */
|
|
77
75
|
hasPrev: !!prev,
|
|
@@ -14,8 +14,9 @@ import { useState, useId } from 'react';
|
|
|
14
14
|
* value: '',
|
|
15
15
|
* });
|
|
16
16
|
*/
|
|
17
|
-
function useRadioGroup(
|
|
18
|
-
const
|
|
17
|
+
function useRadioGroup(props) {
|
|
18
|
+
const { error, readOnly, required, disabled, name, onChange, value: initialValue = '', } = props || {};
|
|
19
|
+
const [groupValue, setGroupValue] = useState(initialValue);
|
|
19
20
|
const errorId = useId();
|
|
20
21
|
const namedId = useId();
|
|
21
22
|
const radioGroupName = name || namedId;
|
|
@@ -37,10 +38,15 @@ function useRadioGroup({ error, readOnly, required, disabled, name, onChange, va
|
|
|
37
38
|
* <Radio label="Option 1" {...getRadioProps('option-1')} />
|
|
38
39
|
*/
|
|
39
40
|
getRadioProps: (propsOrValue) => {
|
|
40
|
-
|
|
41
|
+
let groupProps;
|
|
42
|
+
if (props) {
|
|
43
|
+
const { onChange, error, ...rest } = props;
|
|
44
|
+
groupProps = rest;
|
|
45
|
+
}
|
|
46
|
+
const radioProps = typeof propsOrValue === 'string'
|
|
41
47
|
? { value: propsOrValue }
|
|
42
48
|
: propsOrValue;
|
|
43
|
-
const { ref: forwardedRef = undefined, value = '', ...rest } =
|
|
49
|
+
const { ref: forwardedRef = undefined, value = '', ...rest } = radioProps;
|
|
44
50
|
const handleRef = (element) => {
|
|
45
51
|
if (element) {
|
|
46
52
|
// Set initial checked state
|
|
@@ -65,6 +71,7 @@ function useRadioGroup({ error, readOnly, required, disabled, name, onChange, va
|
|
|
65
71
|
}
|
|
66
72
|
};
|
|
67
73
|
return {
|
|
74
|
+
...groupProps,
|
|
68
75
|
...rest,
|
|
69
76
|
name: radioGroupName,
|
|
70
77
|
'aria-describedby': `${error ? errorId : ''} ${rest['aria-describedby'] || ''}`.trim() ||
|
|
@@ -5,14 +5,14 @@ import { BadgePosition } from './badge-position';
|
|
|
5
5
|
* @example without children
|
|
6
6
|
* <Badge count={5} maxCount={10} />
|
|
7
7
|
*/
|
|
8
|
-
declare const Badge: import("react").ForwardRefExoticComponent<Omit<import("
|
|
8
|
+
declare const Badge: import("react").ForwardRefExoticComponent<Omit<import("../..").DefaultProps & import("react").HTMLAttributes<HTMLSpanElement>, "data-color" | "children" | "variant" | "count" | "maxCount"> & {
|
|
9
9
|
count?: number;
|
|
10
10
|
maxCount?: number;
|
|
11
11
|
variant?: "base" | "tinted";
|
|
12
12
|
'data-color'?: import("packages/types/dist/types").Color | import("packages/types/dist/types").SeverityColors;
|
|
13
13
|
children?: never;
|
|
14
14
|
} & import("react").RefAttributes<HTMLSpanElement>> & {
|
|
15
|
-
Position: import("react").ForwardRefExoticComponent<Omit<import("
|
|
15
|
+
Position: import("react").ForwardRefExoticComponent<Omit<import("../..").DefaultProps & import("react").HTMLAttributes<HTMLSpanElement>, "overlap" | "placement"> & {
|
|
16
16
|
placement?: "top-right" | "top-left" | "bottom-right" | "bottom-left";
|
|
17
17
|
overlap?: "circle" | "rectangle";
|
|
18
18
|
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type LinkProps } from '../link/link';
|
|
2
2
|
export type BreadcrumbsLinkProps = LinkProps;
|
|
3
|
-
export declare const BreadcrumbsLink: import("react").ForwardRefExoticComponent<Omit<import("
|
|
3
|
+
export declare const BreadcrumbsLink: import("react").ForwardRefExoticComponent<Omit<import("../..").DefaultProps & import("react").AnchorHTMLAttributes<HTMLAnchorElement>, "children" | "asChild"> & {
|
|
4
4
|
children: import("react").ReactNode;
|
|
5
5
|
asChild?: boolean;
|
|
6
6
|
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { DefaultProps, LabelRequired } from '../../types';
|
|
3
3
|
import type { MergeRight } from '../../utilities';
|
|
4
|
+
import { type FieldProps } from '../field';
|
|
4
5
|
import { type InputProps } from '../input/input';
|
|
5
6
|
export type CheckboxProps = MergeRight<DefaultProps & Omit<InputProps, 'type' | 'role' | 'size'>, {
|
|
6
7
|
/**
|
|
@@ -27,6 +28,11 @@ export type CheckboxProps = MergeRight<DefaultProps & Omit<InputProps, 'type' |
|
|
|
27
28
|
* If outline, the checkbox will have a border.
|
|
28
29
|
*/
|
|
29
30
|
variant?: 'outline';
|
|
31
|
+
/**
|
|
32
|
+
* Position of checkbox
|
|
33
|
+
* @default start
|
|
34
|
+
*/
|
|
35
|
+
position?: FieldProps['position'];
|
|
30
36
|
} & LabelRequired>;
|
|
31
37
|
/**
|
|
32
38
|
* Checkbox used to select multiple options.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIxD,MAAM,MAAM,aAAa,GAAG,UAAU,CACpC,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,EACzD;IACE;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;CACnC,GAAG,aAAa,CAClB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,4GA+BpB,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("
|
|
15
|
+
export declare const DialogTrigger: import("react").ForwardRefExoticComponent<Omit<Omit<import("../..").DefaultProps & Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "command" | "commandfor" | "commandFor">, "type" | "data-color" | "variant" | "command" | "commandfor" | "commandFor" | "icon" | "loading" | "asChild"> & {
|
|
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.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAkB,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElE,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,GAAG,MAAM,GAAG,OAAO,GAAG,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;
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAkB,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElE,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,GAAG,MAAM,GAAG,OAAO,GAAG,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;qDA8GpB,CAAC"}
|
|
@@ -10,7 +10,7 @@ export type ErrorSummaryLinkProps = LinkProps;
|
|
|
10
10
|
* </ErrorSummaryItem>
|
|
11
11
|
* </ErrorSummary>
|
|
12
12
|
*/
|
|
13
|
-
export declare const ErrorSummaryLink: import("react").ForwardRefExoticComponent<Omit<import("
|
|
13
|
+
export declare const ErrorSummaryLink: import("react").ForwardRefExoticComponent<Omit<import("../..").DefaultProps & import("react").AnchorHTMLAttributes<HTMLAnchorElement>, "children" | "asChild"> & {
|
|
14
14
|
children: import("react").ReactNode;
|
|
15
15
|
asChild?: boolean;
|
|
16
16
|
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -17,5 +17,5 @@ export type ErrorSummaryListProps = ListUnorderedProps;
|
|
|
17
17
|
*/
|
|
18
18
|
export declare const ErrorSummaryList: import("react").ForwardRefExoticComponent<{
|
|
19
19
|
asChild?: boolean;
|
|
20
|
-
} & import("
|
|
20
|
+
} & import("../..").DefaultProps & Omit<import("react").HTMLAttributes<HTMLUListElement>, "size"> & import("react").RefAttributes<HTMLOListElement>>;
|
|
21
21
|
//# sourceMappingURL=error-summary-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-summary-list.d.ts","sourceRoot":"","sources":["../../../src/components/error-summary/error-summary-list.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAExD,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AAEvD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB;;
|
|
1
|
+
{"version":3,"file":"error-summary-list.d.ts","sourceRoot":"","sources":["../../../src/components/error-summary/error-summary-list.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAExD,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AAEvD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB;;oJAK3B,CAAC"}
|
|
@@ -59,7 +59,7 @@ export declare const FieldCounter: import("react").ForwardRefExoticComponent<{
|
|
|
59
59
|
* @default undefined
|
|
60
60
|
**/
|
|
61
61
|
limit: number;
|
|
62
|
-
} & Omit<Omit<import("
|
|
62
|
+
} & Omit<Omit<import("../..").DefaultProps, "data-color"> & import("react").HTMLAttributes<HTMLParagraphElement>, "data-color" | "asChild"> & {
|
|
63
63
|
'data-color'?: import("packages/types/dist/types").SeverityColors;
|
|
64
64
|
asChild?: boolean;
|
|
65
65
|
} & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
@@ -7,7 +7,6 @@ export type HeadingProps = {
|
|
|
7
7
|
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
8
8
|
/**
|
|
9
9
|
* Changes text sizing
|
|
10
|
-
* @default 'md'
|
|
11
10
|
*/
|
|
12
11
|
'data-size'?: '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
13
12
|
/**
|
|
@@ -30,7 +29,6 @@ export declare const Heading: import("react").ForwardRefExoticComponent<{
|
|
|
30
29
|
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
31
30
|
/**
|
|
32
31
|
* Changes text sizing
|
|
33
|
-
* @default 'md'
|
|
34
32
|
*/
|
|
35
33
|
'data-size'?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
36
34
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../src/components/heading/heading.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,OAAO,CAAC;AAGzD,MAAM,MAAM,YAAY,GAAG;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC9B
|
|
1
|
+
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../src/components/heading/heading.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,OAAO,CAAC;AAGzD,MAAM,MAAM,YAAY,GAAG;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC9B;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAC/D;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,cAAc,CAAC,kBAAkB,CAAC,CAAC;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,OAAO;IAtBlB;;;OAGG;YACK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;IAC7B;;OAEG;kBACW,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK;IAC9D;;;OAGG;cACO,OAAO;2FAiBlB,CAAC"}
|
|
@@ -3,7 +3,6 @@ import type { DefaultProps } from '../../types';
|
|
|
3
3
|
export type LabelProps = {
|
|
4
4
|
/**
|
|
5
5
|
* Adjusts font weight. Use this when you have a label hierarchy, such as checkboxes/radios in a fieldset
|
|
6
|
-
* @default 'medium'
|
|
7
6
|
*/
|
|
8
7
|
weight?: 'regular' | 'medium' | 'semibold';
|
|
9
8
|
/**
|
|
@@ -21,7 +20,6 @@ export type LabelProps = {
|
|
|
21
20
|
export declare const Label: import("react").ForwardRefExoticComponent<{
|
|
22
21
|
/**
|
|
23
22
|
* Adjusts font weight. Use this when you have a label hierarchy, such as checkboxes/radios in a fieldset
|
|
24
|
-
* @default 'medium'
|
|
25
23
|
*/
|
|
26
24
|
weight?: "regular" | "medium" | "semibold";
|
|
27
25
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/components/label/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,UAAU,GAAG;IACvB
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/components/label/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC3C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GACvC,YAAY,CAAC;AAEf;;;;;GAKG;AACH,eAAO,MAAM,KAAK;IAlBhB;;OAEG;aACM,SAAS,GAAG,QAAQ,GAAG,UAAU;IAC1C;;;OAGG;cACO,OAAO;2GAyBjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/components/popover/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIlD,MAAM,MAAM,YAAY,GAAG,UAAU,CACnC,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,cAAc,CAAC;IACtC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/components/popover/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIlD,MAAM,MAAM,YAAY,GAAG,UAAU,CACnC,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,cAAc,CAAC;IACtC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,OAAO;IA9DhB;;OAEG;SACE,MAAM;IACX;;;OAGG;gBACS,SAAS;IACrB;;;OAGG;WACI,OAAO;IACd;;;;OAIG;cACO,SAAS,GAAG,QAAQ;IAC9B;;OAEG;mBACY,KAAK,GAAG,cAAc;IACrC;;OAEG;aACM,MAAM,IAAI;IACnB;;OAEG;cACO,MAAM,IAAI;IACpB;;;OAGG;oBACa,OAAO;IACvB;;;OAGG;cACO,OAAO;kDAwGpB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { DefaultProps, LabelRequired } from '../../types';
|
|
3
3
|
import type { MergeRight } from '../../utilities';
|
|
4
|
+
import { type FieldProps } from '../field';
|
|
4
5
|
import { type InputProps } from '../input/input';
|
|
5
6
|
export type RadioProps = MergeRight<DefaultProps & Omit<InputProps, 'type' | 'role' | 'size'>, {
|
|
6
7
|
/**
|
|
@@ -27,6 +28,11 @@ export type RadioProps = MergeRight<DefaultProps & Omit<InputProps, 'type' | 'ro
|
|
|
27
28
|
* If outline, the radio will have a border.
|
|
28
29
|
*/
|
|
29
30
|
variant?: 'outline';
|
|
31
|
+
/**
|
|
32
|
+
* Position of radio
|
|
33
|
+
* @default start
|
|
34
|
+
*/
|
|
35
|
+
position?: FieldProps['position'];
|
|
30
36
|
} & LabelRequired>;
|
|
31
37
|
/**
|
|
32
38
|
* Radio used to select multiple options.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../src/components/radio/radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../src/components/radio/radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIxD,MAAM,MAAM,UAAU,GAAG,UAAU,CACjC,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,EACzD;IACE;;QAEI;IACJ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;CACnC,GAAG,aAAa,CAClB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,KAAK,yGA6BhB,CAAC"}
|
|
@@ -22,7 +22,7 @@ export type SearchButtonProps = MergeRight<ButtonProps, {
|
|
|
22
22
|
* <SearchButton>Søk</SearchButton>
|
|
23
23
|
* </Search>
|
|
24
24
|
*/
|
|
25
|
-
export declare const SearchButton: import("react").ForwardRefExoticComponent<Omit<import("
|
|
25
|
+
export declare const SearchButton: import("react").ForwardRefExoticComponent<Omit<import("../..").DefaultProps & Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "command" | "commandfor" | "commandFor">, "type" | "data-color" | "variant" | "command" | "commandfor" | "commandFor" | "icon" | "loading" | "asChild"> & {
|
|
26
26
|
variant?: "primary" | "secondary" | "tertiary";
|
|
27
27
|
'data-color'?: import("packages/types/dist/types").Color | Extract<import("packages/types/dist/types").SeverityColors, "danger">;
|
|
28
28
|
icon?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type InputProps } from '../input/input';
|
|
2
|
-
export type SuggestionInputProps = InputProps
|
|
2
|
+
export type SuggestionInputProps = Omit<InputProps, 'role' | 'data-indeterminate'>;
|
|
3
3
|
declare global {
|
|
4
4
|
namespace React.JSX {
|
|
5
5
|
interface IntrinsicAttributes {
|
|
@@ -23,12 +23,5 @@ declare global {
|
|
|
23
23
|
* <Suggestion.List />
|
|
24
24
|
* </Suggestion>
|
|
25
25
|
*/
|
|
26
|
-
export declare const SuggestionInput: import("react").ForwardRefExoticComponent<
|
|
27
|
-
type?: "checkbox" | "color" | "date" | "datetime-local" | "email" | "file" | "hidden" | "month" | "number" | "password" | "radio" | "search" | "tel" | "text" | "time" | "url" | "week";
|
|
28
|
-
size?: number;
|
|
29
|
-
disabled?: boolean;
|
|
30
|
-
readOnly?: boolean;
|
|
31
|
-
role?: import("react").AriaRole | undefined;
|
|
32
|
-
'data-indeterminate'?: boolean;
|
|
33
|
-
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
26
|
+
export declare const SuggestionInput: import("react").ForwardRefExoticComponent<SuggestionInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
34
27
|
//# sourceMappingURL=suggestion-input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion-input.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/suggestion-input.tsx"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGxD,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"suggestion-input.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/suggestion-input.tsx"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGxD,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,UAAU,EACV,MAAM,GAAG,oBAAoB,CAC9B,CAAC;AAIF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC,GAAG,CAAC;QAClB,UAAU,mBAAmB;YAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB;KACF;IACD,UAAU,KAAK,CAAC;QACd,UAAU,cAAc,CAAC,CAAC;YACxB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB;KACF;CACF;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,mHA4B1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs-tab.d.ts","sourceRoot":"","sources":["../../../src/components/tabs/tabs-tab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AACxD,OAAO,4BAA4B,CAAC;AAIpC,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,OAAO;IAZlB;;OAEG;WACI,MAAM;
|
|
1
|
+
{"version":3,"file":"tabs-tab.d.ts","sourceRoot":"","sources":["../../../src/components/tabs/tabs-tab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AACxD,OAAO,4BAA4B,CAAC;AAIpC,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,OAAO;IAZlB;;OAEG;WACI,MAAM;8FAoCb,CAAC"}
|
|
@@ -33,8 +33,8 @@ export type TooltipProps = MergeRight<Omit<DefaultProps, 'data-color'> & HTMLAtt
|
|
|
33
33
|
*/
|
|
34
34
|
open?: boolean;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
36
|
+
* @deprecated This prop has no effect. The tooltip will be set as `aria-description`
|
|
37
|
+
* if the component already contains accessible text, and `aria-label` otherwise.
|
|
38
38
|
*/
|
|
39
39
|
type?: 'describedby' | 'labelledby';
|
|
40
40
|
}>;
|
|
@@ -82,8 +82,8 @@ export declare const Tooltip: import("react").ForwardRefExoticComponent<Omit<Omi
|
|
|
82
82
|
*/
|
|
83
83
|
open?: boolean;
|
|
84
84
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
85
|
+
* @deprecated This prop has no effect. The tooltip will be set as `aria-description`
|
|
86
|
+
* if the component already contains accessible text, and `aria-label` otherwise.
|
|
87
87
|
*/
|
|
88
88
|
type?: "describedby" | "labelledby";
|
|
89
89
|
} & RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,YAAY,GAAG,UAAU,CACnC,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,GAAG,cAAc,CAAC,cAAc,CAAC,EACjE;IACE;;;;;OAKG;IACH,QAAQ,EAAE,CAAC,YAAY,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,GAAG,MAAM,CAAC;IAC/D;;QAEI;IACJ,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,aAAa,GAAG,YAAY,CAAC;CACrC,CACF,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO;IAlDhB;;;;;OAKG;cACO,CAAC,YAAY,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,GAAG,MAAM;IAC9D;;QAEI;aACK,MAAM;IACf;;;OAGG;gBACS,SAAS;IACrB;;;OAGG;oBACa,OAAO;IACvB;;;;;;OAMG;WACI,OAAO;IACd;;;OAGG;WACI,aAAa,GAAG,YAAY;
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,YAAY,GAAG,UAAU,CACnC,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,GAAG,cAAc,CAAC,cAAc,CAAC,EACjE;IACE;;;;;OAKG;IACH,QAAQ,EAAE,CAAC,YAAY,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,GAAG,MAAM,CAAC;IAC/D;;QAEI;IACJ,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,aAAa,GAAG,YAAY,CAAC;CACrC,CACF,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO;IAlDhB;;;;;OAKG;cACO,CAAC,YAAY,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,GAAG,MAAM;IAC9D;;QAEI;aACK,MAAM;IACf;;;OAGG;gBACS,SAAS;IACrB;;;OAGG;oBACa,OAAO;IACvB;;;;;;OAMG;WACI,OAAO;IACd;;;OAGG;WACI,aAAa,GAAG,YAAY;kCAsCtC,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export type {
|
|
|
3
3
|
Size, } from '@digdir/designsystemet-types';
|
|
4
4
|
export * from './components';
|
|
5
5
|
export { omit } from './components/Combobox/omit/omit';
|
|
6
|
-
export type { LabelRequired } from './types';
|
|
6
|
+
export type { DefaultProps, LabelRequired, Placement } from './types';
|
|
7
7
|
export type {
|
|
8
8
|
/** @deprecated This export is deprecated. */
|
|
9
9
|
MergeRight, UseCheckboxGroupProps, UsePaginationProps, UseRadioGroupProps, } from './utilities';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY;AACV,4FAA4F;AAC5F,IAAI,GACL,MAAM,8BAA8B,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY;AACV,4FAA4F;AAC5F,IAAI,GACL,MAAM,8BAA8B,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AACvD,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACtE,YAAY;AACV,6CAA6C;AAC7C,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EACf,eAAe,EACf,gBAAgB;AAChB,wGAAwG;AACxG,mBAAmB;AACnB,wGAAwG;AACxG,yBAAyB;AACzB,wGAAwG;AACxG,aAAa,EACb,aAAa,EACb,aAAa,EACb,wBAAwB,GACzB,MAAM,aAAa,CAAC"}
|
|
@@ -37,6 +37,10 @@ export type UseCheckboxGroupProps = {
|
|
|
37
37
|
* @returns void
|
|
38
38
|
*/
|
|
39
39
|
onChange?: (nextValue: string[], currentValue: string[]) => void;
|
|
40
|
+
/**
|
|
41
|
+
* If outline, all checkboxes in the group will have a border
|
|
42
|
+
*/
|
|
43
|
+
variant?: CheckboxProps['variant'];
|
|
40
44
|
};
|
|
41
45
|
/**
|
|
42
46
|
* Get anything that is set on a checkbox, but
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-checkbox-group.d.ts","sourceRoot":"","sources":["../../../../src/utilities/hooks/use-checkbox-group/use-checkbox-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,cAAc,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"use-checkbox-group.d.ts","sourceRoot":"","sources":["../../../../src/utilities/hooks/use-checkbox-group/use-checkbox-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,cAAc,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACjE;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACpC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,aAAa,EACX,QAAQ,GACR,MAAM,GACN,MAAM,GACN,MAAM,GACN,YAAY,GACZ,iBAAiB,GACjB,OAAO,GACP,SAAS,GACT,OAAO,CACV,GAAG;IACF,6EAA6E;IAC7E,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,GAAG,CAAC,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAgBF,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC7C,gBAAgB,EAAE,CAChB,YAAY,CAAC,EAAE,MAAM,GAAG,gBAAgB,KACrC,gBAAgB,CAAC;IACtB,sBAAsB,EAAE;QACtB,QAAQ,EAAE,SAAS,CAAC;QACpB,MAAM,EAAE,OAAO,CAAC;QAChB,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;CACH,CAAC;AAEF,wBAAgB,gBAAgB,CAC9B,KAAK,CAAC,EAAE,qBAAqB,GAC5B,sBAAsB,CAsJxB"}
|
|
@@ -70,9 +70,9 @@ export declare const usePagination: ({ currentPage: current, setCurrentPage, onC
|
|
|
70
70
|
*/
|
|
71
71
|
buttonProps: PaginationButtonProps | null;
|
|
72
72
|
}[];
|
|
73
|
-
/** Properties to spread on Pagination.Button used for previous
|
|
73
|
+
/** Properties to spread on Pagination.Button used for previous navigation */
|
|
74
74
|
prevButtonProps: PaginationButtonProps;
|
|
75
|
-
/** Properties to spread on Pagination.Button used for next
|
|
75
|
+
/** Properties to spread on Pagination.Button used for next navigation */
|
|
76
76
|
nextButtonProps: PaginationButtonProps;
|
|
77
77
|
/** Indication if previous page action should be shown or not */
|
|
78
78
|
hasPrev: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-pagination.d.ts","sourceRoot":"","sources":["../../../../src/utilities/hooks/use-pagination/use-pagination.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACnE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4BI;AACJ,eAAO,MAAM,aAAa,GAAI,yFAM3B,kBAAkB;IAUf,sBAAsB;;QAEpB;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;qBAMU,qBAAqB,GAAG,IAAI;;IAE3C,
|
|
1
|
+
{"version":3,"file":"use-pagination.d.ts","sourceRoot":"","sources":["../../../../src/utilities/hooks/use-pagination/use-pagination.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACnE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4BI;AACJ,eAAO,MAAM,aAAa,GAAI,yFAM3B,kBAAkB;IAUf,sBAAsB;;QAEpB;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;qBAMU,qBAAqB,GAAG,IAAI;;IAE3C,6EAA6E;qBAIxE,qBAAqB;IAC1B,yEAAyE;qBAIpE,qBAAqB;IAC1B,gEAAgE;;IAEhE,4DAA4D;;CAGtC,CAAC"}
|
|
@@ -19,6 +19,10 @@ export type UseRadioGroupProps = {
|
|
|
19
19
|
value?: string;
|
|
20
20
|
/** Callback when selected radios changes */
|
|
21
21
|
onChange?: (nextValue: string, prevValue: string) => void;
|
|
22
|
+
/**
|
|
23
|
+
* If outline, all radios in the group will have a border
|
|
24
|
+
*/
|
|
25
|
+
variant?: RadioProps['variant'];
|
|
22
26
|
};
|
|
23
27
|
/**
|
|
24
28
|
* Get anything that is set on a radio, but
|
|
@@ -51,6 +55,6 @@ type useRadioGroupReturn = {
|
|
|
51
55
|
* value: '',
|
|
52
56
|
* });
|
|
53
57
|
*/
|
|
54
|
-
export declare function useRadioGroup(
|
|
58
|
+
export declare function useRadioGroup(props?: UseRadioGroupProps): useRadioGroupReturn;
|
|
55
59
|
export {};
|
|
56
60
|
//# sourceMappingURL=use-radio-group.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-radio-group.d.ts","sourceRoot":"","sources":["../../../../src/utilities/hooks/use-radio-group/use-radio-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,cAAc,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"use-radio-group.d.ts","sourceRoot":"","sources":["../../../../src/utilities/hooks/use-radio-group/use-radio-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,cAAc,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;CACjC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,CAC9B,UAAU,EACR,QAAQ,GACR,MAAM,GACN,MAAM,GACN,MAAM,GACN,YAAY,GACZ,iBAAiB,GACjB,OAAO,GACP,MAAM,GACN,SAAS,GACT,OAAO,CACV,GAAG;IACF,GAAG,CAAC,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3C,aAAa,EAAE,CAAC,YAAY,EAAE,MAAM,GAAG,aAAa,KAAK,aAAa,CAAC;IACvE,sBAAsB,EAAE;QACtB,QAAQ,EAAE,SAAS,CAAC;QACpB,MAAM,EAAE,OAAO,CAAC;QAChB,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;CACH,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,KAAK,CAAC,EAAE,kBAAkB,GAAG,mBAAmB,CAuG7E"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digdir/designsystemet-react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.16.0",
|
|
5
5
|
"description": "React components for Designsystemet",
|
|
6
6
|
"author": "Designsystemet team",
|
|
7
7
|
"repository": {
|
|
@@ -37,33 +37,33 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@floating-ui/dom": "^1.7.6",
|
|
39
39
|
"@floating-ui/react": "0.26.23",
|
|
40
|
-
"@navikt/aksel-icons": "^8.10.
|
|
40
|
+
"@navikt/aksel-icons": "^8.10.5",
|
|
41
41
|
"@radix-ui/react-slot": "^1.2.4",
|
|
42
42
|
"@tanstack/react-virtual": "^3.13.24",
|
|
43
43
|
"clsx": "^2.1.1",
|
|
44
|
-
"@digdir/designsystemet-types": "1.
|
|
45
|
-
"@digdir/designsystemet-web": "1.
|
|
44
|
+
"@digdir/designsystemet-types": "1.16.0",
|
|
45
|
+
"@digdir/designsystemet-web": "1.16.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@rollup/plugin-commonjs": "29.0.2",
|
|
49
49
|
"@rollup/plugin-node-resolve": "16.0.3",
|
|
50
|
-
"@storybook/addon-docs": "10.
|
|
51
|
-
"@storybook/addon-vitest": "10.
|
|
52
|
-
"@storybook/react-vite": "10.
|
|
50
|
+
"@storybook/addon-docs": "10.4.0",
|
|
51
|
+
"@storybook/addon-vitest": "10.4.0",
|
|
52
|
+
"@storybook/react-vite": "10.4.0",
|
|
53
53
|
"@testing-library/jest-dom": "6.9.1",
|
|
54
54
|
"@testing-library/react": "16.3.2",
|
|
55
55
|
"@testing-library/user-event": "14.6.1",
|
|
56
56
|
"@types/react": "19.2.14",
|
|
57
57
|
"@types/react-dom": "19.2.3",
|
|
58
|
-
"react": "19.2.
|
|
59
|
-
"react-dom": "19.2.
|
|
58
|
+
"react": "19.2.6",
|
|
59
|
+
"react-dom": "19.2.6",
|
|
60
60
|
"rimraf": "6.1.3",
|
|
61
|
-
"rollup": "4.60.
|
|
61
|
+
"rollup": "4.60.4",
|
|
62
62
|
"rollup-plugin-copy": "3.5.0",
|
|
63
|
-
"storybook": "10.
|
|
64
|
-
"tsx": "4.
|
|
63
|
+
"storybook": "10.4.0",
|
|
64
|
+
"tsx": "4.22.1",
|
|
65
65
|
"typescript": "5.9.3",
|
|
66
|
-
"@digdir/designsystemet-css": "^1.
|
|
66
|
+
"@digdir/designsystemet-css": "^1.16.0"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "pnpm run clean && tsc -b tsconfig.lib.json --emitDeclarationOnly false && rollup -c --bundleConfigAsCjs",
|