@digdir/designsystemet-react 1.12.1 → 1.13.1
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/internal/ComboboxClearButton.js +1 -1
- package/dist/cjs/components/Combobox/internal/ComboboxInput.js +1 -1
- package/dist/cjs/components/avatar-stack/avatar-stack.js +1 -1
- package/dist/cjs/components/dialog/dialog-trigger.js +1 -1
- package/dist/cjs/components/dropdown/dropdown-heading.js +1 -1
- package/dist/cjs/components/dropdown/dropdown-item.js +1 -1
- package/dist/cjs/components/dropdown/dropdown-list.js +1 -1
- package/dist/cjs/components/fieldset/fieldset-description.js +2 -1
- package/dist/cjs/components/fieldset/fieldset-legend.js +2 -1
- package/dist/cjs/components/fieldset/fieldset.js +2 -1
- package/dist/cjs/components/input/input.js +2 -1
- package/dist/cjs/components/select/select.js +2 -1
- package/dist/cjs/components/tabs/tabs-tab.js +10 -4
- package/dist/cjs/components/tabs/tabs.js +2 -1
- package/dist/cjs/components/toggle-group/toggle-group-item.js +14 -1
- package/dist/cjs/components/toggle-group/toggle-group.js +2 -1
- package/dist/esm/components/Combobox/internal/ComboboxClearButton.js +1 -1
- package/dist/esm/components/Combobox/internal/ComboboxInput.js +1 -1
- package/dist/esm/components/avatar-stack/avatar-stack.js +1 -1
- package/dist/esm/components/dialog/dialog-trigger.js +1 -1
- package/dist/esm/components/dropdown/dropdown-heading.js +1 -1
- package/dist/esm/components/dropdown/dropdown-item.js +1 -1
- package/dist/esm/components/dropdown/dropdown-list.js +1 -1
- package/dist/esm/components/fieldset/fieldset-description.js +2 -1
- package/dist/esm/components/fieldset/fieldset-legend.js +2 -1
- package/dist/esm/components/fieldset/fieldset.js +2 -1
- package/dist/esm/components/input/input.js +2 -1
- package/dist/esm/components/select/select.js +2 -1
- package/dist/esm/components/tabs/tabs-tab.js +10 -4
- package/dist/esm/components/tabs/tabs.js +2 -1
- package/dist/esm/components/toggle-group/toggle-group-item.js +14 -1
- package/dist/esm/components/toggle-group/toggle-group.js +2 -1
- package/dist/react-types.d.ts +0 -1
- package/dist/types/components/Combobox/index.d.ts +1 -1
- package/dist/types/components/Combobox/index.d.ts.map +1 -1
- package/dist/types/components/avatar-stack/avatar-stack.d.ts +2 -2
- package/dist/types/components/avatar-stack/avatar-stack.d.ts.map +1 -1
- package/dist/types/components/badge/index.d.ts +1 -1
- package/dist/types/components/badge/index.d.ts.map +1 -1
- package/dist/types/components/breadcrumbs/index.d.ts +1 -1
- package/dist/types/components/card/index.d.ts +1 -1
- package/dist/types/components/card/index.d.ts.map +1 -1
- package/dist/types/components/chip/index.d.ts +1 -1
- package/dist/types/components/chip/index.d.ts.map +1 -1
- package/dist/types/components/details/details.d.ts +2 -2
- package/dist/types/components/details/details.d.ts.map +1 -1
- package/dist/types/components/dialog/dialog.d.ts.map +1 -1
- package/dist/types/components/dialog/index.d.ts +1 -1
- package/dist/types/components/dialog/index.d.ts.map +1 -1
- package/dist/types/components/dropdown/index.d.ts +1 -1
- package/dist/types/components/dropdown/index.d.ts.map +1 -1
- package/dist/types/components/error-summary/error-summary.d.ts +3 -3
- package/dist/types/components/error-summary/error-summary.d.ts.map +1 -1
- package/dist/types/components/error-summary/index.d.ts +1 -1
- package/dist/types/components/error-summary/index.d.ts.map +1 -1
- package/dist/types/components/field/index.d.ts +1 -1
- package/dist/types/components/field/index.d.ts.map +1 -1
- package/dist/types/components/fieldset/fieldset-description.d.ts.map +1 -1
- package/dist/types/components/fieldset/fieldset-legend.d.ts.map +1 -1
- package/dist/types/components/fieldset/fieldset.d.ts.map +1 -1
- package/dist/types/components/fieldset/index.d.ts +1 -1
- package/dist/types/components/fieldset/index.d.ts.map +1 -1
- package/dist/types/components/input/input.d.ts.map +1 -1
- package/dist/types/components/list/index.d.ts +1 -1
- package/dist/types/components/list/index.d.ts.map +1 -1
- package/dist/types/components/pagination/index.d.ts +1 -1
- package/dist/types/components/pagination/index.d.ts.map +1 -1
- package/dist/types/components/popover/index.d.ts +1 -1
- package/dist/types/components/popover/index.d.ts.map +1 -1
- package/dist/types/components/popover/popover-trigger.d.ts +2 -2
- package/dist/types/components/popover/popover-trigger.d.ts.map +1 -1
- package/dist/types/components/search/index.d.ts +1 -1
- package/dist/types/components/search/index.d.ts.map +1 -1
- package/dist/types/components/search/search-clear.d.ts.map +1 -1
- package/dist/types/components/search/search-input.d.ts +3 -2
- package/dist/types/components/search/search-input.d.ts.map +1 -1
- package/dist/types/components/search/search.d.ts +3 -2
- package/dist/types/components/search/search.d.ts.map +1 -1
- package/dist/types/components/select/index.d.ts +1 -1
- package/dist/types/components/select/index.d.ts.map +1 -1
- package/dist/types/components/select/select.d.ts.map +1 -1
- package/dist/types/components/suggestion/index.d.ts +1 -1
- package/dist/types/components/suggestion/index.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion-input.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion.d.ts +2 -2
- package/dist/types/components/suggestion/suggestion.d.ts.map +1 -1
- package/dist/types/components/table/index.d.ts +2 -2
- package/dist/types/components/table/index.d.ts.map +1 -1
- package/dist/types/components/tabs/index.d.ts +1 -1
- package/dist/types/components/tabs/index.d.ts.map +1 -1
- package/dist/types/components/tabs/tabs-tab.d.ts.map +1 -1
- package/dist/types/components/tabs/tabs.d.ts +2 -1
- package/dist/types/components/tabs/tabs.d.ts.map +1 -1
- package/dist/types/components/toggle-group/toggle-group-item.d.ts +3 -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.map +1 -1
- package/dist/types/utilities/hooks/use-checkbox-group/use-checkbox-group.d.ts +3 -3
- package/dist/types/utilities/hooks/use-checkbox-group/use-checkbox-group.d.ts.map +1 -1
- package/dist/types/utilities/hooks/use-radio-group/use-radio-group.d.ts +3 -3
- package/dist/types/utilities/hooks/use-radio-group/use-radio-group.d.ts.map +1 -1
- package/dist/types/utilities/roving-focus/use-roving-focus.d.ts +3 -3
- package/dist/types/utilities/roving-focus/use-roving-focus.d.ts.map +1 -1
- package/package.json +13 -13
|
@@ -28,7 +28,7 @@ const ComboboxClearButton = react.forwardRef((props, ref) => {
|
|
|
28
28
|
e.stopPropagation();
|
|
29
29
|
handleSelectOption({ option: null, clear: true });
|
|
30
30
|
}
|
|
31
|
-
}, type: 'button', "aria-label": clearButtonLabel, children: jsxRuntime.jsx(akselIcons.XMarkIcon, {
|
|
31
|
+
}, type: 'button', "aria-label": clearButtonLabel, children: jsxRuntime.jsx(akselIcons.XMarkIcon, { height: '1.5em', width: '1.5em', title: 'Clear selection' }) }));
|
|
32
32
|
});
|
|
33
33
|
ComboboxClearButton.displayName = 'ComboboxClearButton';
|
|
34
34
|
|
|
@@ -74,7 +74,7 @@ const ComboboxInput = ({ hideClearButton, listId, error, hideChips, handleKeyDow
|
|
|
74
74
|
onChange(e);
|
|
75
75
|
!open && setOpen(true);
|
|
76
76
|
rest.onChange?.(e);
|
|
77
|
-
} }) })] }), showClearButton && jsxRuntime.jsx(ComboboxClearButton, { ref: clearButtonRef }), jsxRuntime.jsx("div", { className: 'ds-combobox__arrow', children: open ? (jsxRuntime.jsx(akselIcons.ChevronUpIcon, { title: 'arrow up',
|
|
77
|
+
} }) })] }), showClearButton && jsxRuntime.jsx(ComboboxClearButton, { ref: clearButtonRef }), jsxRuntime.jsx("div", { className: 'ds-combobox__arrow', children: open ? (jsxRuntime.jsx(akselIcons.ChevronUpIcon, { title: 'arrow up', height: '1.5em', width: '1.5em' })) : (jsxRuntime.jsx(akselIcons.ChevronDownIcon, { title: 'arrow down', height: '1.5em', width: '1.5em' })) })] }) }));
|
|
78
78
|
};
|
|
79
79
|
ComboboxInput.displayName = 'ComboboxInput';
|
|
80
80
|
|
|
@@ -27,7 +27,7 @@ const EXPERIMENTAL_AvatarStack = react.forwardRef(function AvatarStack({ classNa
|
|
|
27
27
|
'--dsc-avatar-stack-overlap': overlap !== undefined ? `${overlap}` : undefined,
|
|
28
28
|
'--dsc-avatar-count': expandable === 'fixed' ? react.Children.count(children) : undefined,
|
|
29
29
|
};
|
|
30
|
-
return (jsxRuntime.jsx("
|
|
30
|
+
return (jsxRuntime.jsx("span", { tabIndex: rest.tabIndex !== undefined ? rest.tabIndex : expandable ? 0 : undefined, ref: ref, className: cl(`ds-avatar-stack`, className), style: style, "data-expandable": expandable, "data-suffix": suffix, ...rest, children: children }));
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
exports.EXPERIMENTAL_AvatarStack = EXPERIMENTAL_AvatarStack;
|
|
@@ -22,7 +22,7 @@ const DialogTrigger = react.forwardRef(function DialogTrigger({ asChild, ...rest
|
|
|
22
22
|
const { id, modal } = react.useContext(dialogTriggerContext.Context);
|
|
23
23
|
const Component = asChild ? reactSlot.Slot : button.Button;
|
|
24
24
|
return (jsxRuntime.jsx(Component, { suppressHydrationWarning // Might get augmented through designsystemet-web with aria-haspopup
|
|
25
|
-
: true, command: modal ? 'show-modal' : 'show', commandfor: id, ref: ref, ...rest }));
|
|
25
|
+
: true, command: modal ? 'show-modal' : '--show-non-modal', commandfor: id, ref: ref, ...rest }));
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
exports.DialogTrigger = DialogTrigger;
|
|
@@ -13,7 +13,7 @@ var heading = require('../heading/heading.js');
|
|
|
13
13
|
* <DropdownHeading>Heading</DropdownHeading>
|
|
14
14
|
* </Dropdown>
|
|
15
15
|
*/
|
|
16
|
-
const DropdownHeading = react.forwardRef(function DropdownHeading(
|
|
16
|
+
const DropdownHeading = react.forwardRef(function DropdownHeading(rest, ref) {
|
|
17
17
|
return jsxRuntime.jsx(heading.Heading, { ref: ref, ...rest });
|
|
18
18
|
});
|
|
19
19
|
|
|
@@ -16,7 +16,7 @@ var react = require('react');
|
|
|
16
16
|
* </DropdownList>
|
|
17
17
|
* </Dropdown>
|
|
18
18
|
*/
|
|
19
|
-
const DropdownItem = react.forwardRef(function DropdownItem(
|
|
19
|
+
const DropdownItem = react.forwardRef(function DropdownItem(rest, ref) {
|
|
20
20
|
return jsxRuntime.jsx("li", { ref: ref, ...rest });
|
|
21
21
|
});
|
|
22
22
|
|
|
@@ -16,7 +16,7 @@ var react = require('react');
|
|
|
16
16
|
* </DropdownList>
|
|
17
17
|
* </Dropdown>
|
|
18
18
|
*/
|
|
19
|
-
const DropdownList = react.forwardRef(function DropdownList(
|
|
19
|
+
const DropdownList = react.forwardRef(function DropdownList(rest, ref) {
|
|
20
20
|
return jsxRuntime.jsx("ul", { ref: ref, ...rest });
|
|
21
21
|
});
|
|
22
22
|
|
|
@@ -14,7 +14,8 @@ var paragraph = require('../paragraph/paragraph.js');
|
|
|
14
14
|
* </FieldsetDescription>
|
|
15
15
|
*/
|
|
16
16
|
const FieldsetDescription = react.forwardRef(function FieldsetDescription(rest, ref) {
|
|
17
|
-
return jsxRuntime.jsx(paragraph.Paragraph, {
|
|
17
|
+
return (jsxRuntime.jsx(paragraph.Paragraph, { suppressHydrationWarning // Since @digdir/designsystemet-web adds attributes
|
|
18
|
+
: true, ref: ref, ...rest }));
|
|
18
19
|
});
|
|
19
20
|
|
|
20
21
|
exports.FieldsetDescription = FieldsetDescription;
|
|
@@ -12,7 +12,8 @@ var label = require('../label/label.js');
|
|
|
12
12
|
* <FieldsetLegend>Skriv inn dine svar</FieldsetLegend>
|
|
13
13
|
*/
|
|
14
14
|
const FieldsetLegend = react.forwardRef(function FieldsetLegend(rest, ref) {
|
|
15
|
-
return (jsxRuntime.jsx(label.Label, { asChild: true, children: jsxRuntime.jsx("legend", {
|
|
15
|
+
return (jsxRuntime.jsx(label.Label, { asChild: true, children: jsxRuntime.jsx("legend", { suppressHydrationWarning // Since @digdir/designsystemet-web adds attributes
|
|
16
|
+
: true, ref: ref, ...rest }) }));
|
|
16
17
|
});
|
|
17
18
|
|
|
18
19
|
exports.FieldsetLegend = FieldsetLegend;
|
|
@@ -21,7 +21,8 @@ var react = require('react');
|
|
|
21
21
|
* </Fieldset>
|
|
22
22
|
*/
|
|
23
23
|
const Fieldset = react.forwardRef(function Fieldset({ className, ...rest }, ref) {
|
|
24
|
-
return (jsxRuntime.jsx("fieldset", { className: cl('ds-fieldset', className),
|
|
24
|
+
return (jsxRuntime.jsx("fieldset", { className: cl('ds-fieldset', className), suppressHydrationWarning // Since @digdir/designsystemet-web adds attributes
|
|
25
|
+
: true, ref: ref, ...rest }));
|
|
25
26
|
});
|
|
26
27
|
|
|
27
28
|
exports.Fieldset = Fieldset;
|
|
@@ -12,7 +12,8 @@ var react = require('react');
|
|
|
12
12
|
* <Input />
|
|
13
13
|
*/
|
|
14
14
|
const Input = react.forwardRef(function Input({ type = 'text', className, onChange, onClick, ...rest }, ref) {
|
|
15
|
-
return (jsxRuntime.jsx("input", { className: cl(`ds-input`, className), ref: ref, type: type,
|
|
15
|
+
return (jsxRuntime.jsx("input", { className: cl(`ds-input`, className), ref: ref, type: type, suppressHydrationWarning // Since <ds-field> adds attributes
|
|
16
|
+
: true, onChange: (event) => rest.readOnly || onChange?.(event), onClick: (event) => {
|
|
16
17
|
if (rest.readOnly)
|
|
17
18
|
event.preventDefault(); // Make readonly work for checkbox / radio / switch
|
|
18
19
|
onClick?.(event);
|
|
@@ -15,7 +15,8 @@ var react = require('react');
|
|
|
15
15
|
* </Select>
|
|
16
16
|
*/
|
|
17
17
|
const Select = react.forwardRef(function Select({ className, onKeyDown, onMouseDown, width, readOnly, ...rest }, ref) {
|
|
18
|
-
return (jsxRuntime.jsx("select", { className: cl('ds-input', className), "aria-readonly": rest['aria-readonly'] ?? readOnly,
|
|
18
|
+
return (jsxRuntime.jsx("select", { className: cl('ds-input', className), "aria-readonly": rest['aria-readonly'] ?? readOnly, suppressHydrationWarning // Since <ds-field> adds attributes
|
|
19
|
+
: true, "data-width": width, ref: ref, ...rest }));
|
|
19
20
|
});
|
|
20
21
|
|
|
21
22
|
exports.Select = Select;
|
|
@@ -12,14 +12,20 @@ var tabs = require('./tabs.js');
|
|
|
12
12
|
* @example
|
|
13
13
|
* <TabsTab value='1'>Tab 1</TabsTab>
|
|
14
14
|
*/
|
|
15
|
-
const TabsTab = react.forwardRef(function TabsTab({ value, className, onClick, ...rest }, ref) {
|
|
16
|
-
const { onChange, getPrefixedValue } = react.useContext(tabs.Context);
|
|
15
|
+
const TabsTab = react.forwardRef(function TabsTab({ value, className, onClick, onClickCapture, ...rest }, ref) {
|
|
16
|
+
const { onChange, getPrefixedValue, isControlled, currentValue } = react.useContext(tabs.Context);
|
|
17
17
|
return (
|
|
18
18
|
// biome-ignore lint/a11y/noStaticElementInteractions: ds-tabs IS interactive
|
|
19
19
|
jsxRuntime.jsx("ds-tab", { "aria-controls": rest['aria-controls'] ?? getPrefixedValue?.(value), "data-value": value, ref: ref, suppressHydrationWarning // Since <ds-tablist> adds attributes
|
|
20
|
-
: true,
|
|
21
|
-
|
|
20
|
+
: true, onClickCapture: (e) => {
|
|
21
|
+
onClickCapture?.(e);
|
|
22
|
+
if (isControlled && currentValue !== value) {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
}
|
|
25
|
+
}, onClick: (e) => {
|
|
26
|
+
if (e.isTrusted || !isControlled || currentValue !== value) {
|
|
22
27
|
onChange?.(value); // Only call onChange is user actually clicked, not when programmatically clicked/controlled
|
|
28
|
+
}
|
|
23
29
|
onClick?.(e);
|
|
24
30
|
}, class: className, ...rest, children: rest.children }));
|
|
25
31
|
});
|
|
@@ -46,7 +46,8 @@ const Tabs = react.forwardRef(function Tabs({ value, defaultValue, className, on
|
|
|
46
46
|
});
|
|
47
47
|
}, [value, isControlled]);
|
|
48
48
|
return (jsxRuntime.jsx(Context.Provider, { value: {
|
|
49
|
-
|
|
49
|
+
isControlled,
|
|
50
|
+
currentValue: value,
|
|
50
51
|
defaultValue,
|
|
51
52
|
onChange: onValueChange,
|
|
52
53
|
getPrefixedValue: (value) => value && `${valuePrefix}-${value}`,
|
|
@@ -16,7 +16,20 @@ const ToggleGroupItem = react.forwardRef(function ToggleGroupItem({ className, c
|
|
|
16
16
|
const toggleGroup$1 = react.useContext(toggleGroup.ToggleGroupContext);
|
|
17
17
|
const value = rawValue ?? genValue;
|
|
18
18
|
const active = toggleGroup$1.value === value;
|
|
19
|
-
|
|
19
|
+
const { form, formAction, formEncType, formMethod, formNoValidate, formTarget, required, disabled, 'aria-disabled': ariaDisabled, ...labelProps } = rest;
|
|
20
|
+
/** Add backwards compatibility for `button` props that were previously allowed on `ToggleGroupItem` but are passeable to `input`*/
|
|
21
|
+
const inputProps = {
|
|
22
|
+
form,
|
|
23
|
+
formAction,
|
|
24
|
+
formEncType,
|
|
25
|
+
formMethod,
|
|
26
|
+
formNoValidate,
|
|
27
|
+
formTarget,
|
|
28
|
+
required,
|
|
29
|
+
disabled,
|
|
30
|
+
'aria-disabled': ariaDisabled,
|
|
31
|
+
};
|
|
32
|
+
return (jsxRuntime.jsxs("label", { ref: ref, ...labelProps, className: cl('ds-button', className), "data-variant": 'tertiary', "aria-disabled": ariaDisabled ?? disabled, children: [jsxRuntime.jsx("input", { ...inputProps, checked: active, name: toggleGroup$1.name, onChange: () => toggleGroup$1.onChange?.(value), type: 'radio', value: value, disabled: disabled, "aria-disabled": ariaDisabled }), children] }));
|
|
20
33
|
});
|
|
21
34
|
|
|
22
35
|
exports.ToggleGroupItem = ToggleGroupItem;
|
|
@@ -35,7 +35,8 @@ const ToggleGroup = react.forwardRef(function ToggleGroup({ children, className,
|
|
|
35
35
|
value,
|
|
36
36
|
variant,
|
|
37
37
|
}, children: jsxRuntime.jsx("fieldset", { className: cl('ds-toggle-group', className), "data-toggle-group": '' // Default to empty string to ensure attribute is present
|
|
38
|
-
, "data-variant": variant,
|
|
38
|
+
, "data-variant": variant, suppressHydrationWarning // Since @digdir/designsystemet-web adds attributes
|
|
39
|
+
: true, ref: ref, ...rest, children: children }) }));
|
|
39
40
|
});
|
|
40
41
|
|
|
41
42
|
exports.ToggleGroup = ToggleGroup;
|
|
@@ -26,7 +26,7 @@ const ComboboxClearButton = forwardRef((props, ref) => {
|
|
|
26
26
|
e.stopPropagation();
|
|
27
27
|
handleSelectOption({ option: null, clear: true });
|
|
28
28
|
}
|
|
29
|
-
}, type: 'button', "aria-label": clearButtonLabel, children: jsx(XMarkIcon, {
|
|
29
|
+
}, type: 'button', "aria-label": clearButtonLabel, children: jsx(XMarkIcon, { height: '1.5em', width: '1.5em', title: 'Clear selection' }) }));
|
|
30
30
|
});
|
|
31
31
|
ComboboxClearButton.displayName = 'ComboboxClearButton';
|
|
32
32
|
|
|
@@ -72,7 +72,7 @@ const ComboboxInput = ({ hideClearButton, listId, error, hideChips, handleKeyDow
|
|
|
72
72
|
onChange(e);
|
|
73
73
|
!open && setOpen(true);
|
|
74
74
|
rest.onChange?.(e);
|
|
75
|
-
} }) })] }), showClearButton && jsx(ComboboxClearButton, { ref: clearButtonRef }), jsx("div", { className: 'ds-combobox__arrow', children: open ? (jsx(ChevronUpIcon, { title: 'arrow up',
|
|
75
|
+
} }) })] }), showClearButton && jsx(ComboboxClearButton, { ref: clearButtonRef }), jsx("div", { className: 'ds-combobox__arrow', children: open ? (jsx(ChevronUpIcon, { title: 'arrow up', height: '1.5em', width: '1.5em' })) : (jsx(ChevronDownIcon, { title: 'arrow down', height: '1.5em', width: '1.5em' })) })] }) }));
|
|
76
76
|
};
|
|
77
77
|
ComboboxInput.displayName = 'ComboboxInput';
|
|
78
78
|
|
|
@@ -25,7 +25,7 @@ const EXPERIMENTAL_AvatarStack = forwardRef(function AvatarStack({ className, ga
|
|
|
25
25
|
'--dsc-avatar-stack-overlap': overlap !== undefined ? `${overlap}` : undefined,
|
|
26
26
|
'--dsc-avatar-count': expandable === 'fixed' ? Children.count(children) : undefined,
|
|
27
27
|
};
|
|
28
|
-
return (jsx("
|
|
28
|
+
return (jsx("span", { tabIndex: rest.tabIndex !== undefined ? rest.tabIndex : expandable ? 0 : undefined, ref: ref, className: cl(`ds-avatar-stack`, className), style: style, "data-expandable": expandable, "data-suffix": suffix, ...rest, children: children }));
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
export { EXPERIMENTAL_AvatarStack };
|
|
@@ -20,7 +20,7 @@ const DialogTrigger = forwardRef(function DialogTrigger({ asChild, ...rest }, re
|
|
|
20
20
|
const { id, modal } = useContext(Context);
|
|
21
21
|
const Component = asChild ? Slot : Button;
|
|
22
22
|
return (jsx(Component, { suppressHydrationWarning // Might get augmented through designsystemet-web with aria-haspopup
|
|
23
|
-
: true, command: modal ? 'show-modal' : 'show', commandfor: id, ref: ref, ...rest }));
|
|
23
|
+
: true, command: modal ? 'show-modal' : '--show-non-modal', commandfor: id, ref: ref, ...rest }));
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
export { DialogTrigger };
|
|
@@ -11,7 +11,7 @@ import { Heading } from '../heading/heading.js';
|
|
|
11
11
|
* <DropdownHeading>Heading</DropdownHeading>
|
|
12
12
|
* </Dropdown>
|
|
13
13
|
*/
|
|
14
|
-
const DropdownHeading = forwardRef(function DropdownHeading(
|
|
14
|
+
const DropdownHeading = forwardRef(function DropdownHeading(rest, ref) {
|
|
15
15
|
return jsx(Heading, { ref: ref, ...rest });
|
|
16
16
|
});
|
|
17
17
|
|
|
@@ -14,7 +14,7 @@ import { forwardRef } from 'react';
|
|
|
14
14
|
* </DropdownList>
|
|
15
15
|
* </Dropdown>
|
|
16
16
|
*/
|
|
17
|
-
const DropdownItem = forwardRef(function DropdownItem(
|
|
17
|
+
const DropdownItem = forwardRef(function DropdownItem(rest, ref) {
|
|
18
18
|
return jsx("li", { ref: ref, ...rest });
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -14,7 +14,7 @@ import { forwardRef } from 'react';
|
|
|
14
14
|
* </DropdownList>
|
|
15
15
|
* </Dropdown>
|
|
16
16
|
*/
|
|
17
|
-
const DropdownList = forwardRef(function DropdownList(
|
|
17
|
+
const DropdownList = forwardRef(function DropdownList(rest, ref) {
|
|
18
18
|
return jsx("ul", { ref: ref, ...rest });
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -12,7 +12,8 @@ import { Paragraph } from '../paragraph/paragraph.js';
|
|
|
12
12
|
* </FieldsetDescription>
|
|
13
13
|
*/
|
|
14
14
|
const FieldsetDescription = forwardRef(function FieldsetDescription(rest, ref) {
|
|
15
|
-
return jsx(Paragraph, {
|
|
15
|
+
return (jsx(Paragraph, { suppressHydrationWarning // Since @digdir/designsystemet-web adds attributes
|
|
16
|
+
: true, ref: ref, ...rest }));
|
|
16
17
|
});
|
|
17
18
|
|
|
18
19
|
export { FieldsetDescription };
|
|
@@ -10,7 +10,8 @@ import { Label } from '../label/label.js';
|
|
|
10
10
|
* <FieldsetLegend>Skriv inn dine svar</FieldsetLegend>
|
|
11
11
|
*/
|
|
12
12
|
const FieldsetLegend = forwardRef(function FieldsetLegend(rest, ref) {
|
|
13
|
-
return (jsx(Label, { asChild: true, children: jsx("legend", {
|
|
13
|
+
return (jsx(Label, { asChild: true, children: jsx("legend", { suppressHydrationWarning // Since @digdir/designsystemet-web adds attributes
|
|
14
|
+
: true, ref: ref, ...rest }) }));
|
|
14
15
|
});
|
|
15
16
|
|
|
16
17
|
export { FieldsetLegend };
|
|
@@ -19,7 +19,8 @@ import { forwardRef } from 'react';
|
|
|
19
19
|
* </Fieldset>
|
|
20
20
|
*/
|
|
21
21
|
const Fieldset = forwardRef(function Fieldset({ className, ...rest }, ref) {
|
|
22
|
-
return (jsx("fieldset", { className: cl('ds-fieldset', className),
|
|
22
|
+
return (jsx("fieldset", { className: cl('ds-fieldset', className), suppressHydrationWarning // Since @digdir/designsystemet-web adds attributes
|
|
23
|
+
: true, ref: ref, ...rest }));
|
|
23
24
|
});
|
|
24
25
|
|
|
25
26
|
export { Fieldset };
|
|
@@ -10,7 +10,8 @@ import { forwardRef } from 'react';
|
|
|
10
10
|
* <Input />
|
|
11
11
|
*/
|
|
12
12
|
const Input = forwardRef(function Input({ type = 'text', className, onChange, onClick, ...rest }, ref) {
|
|
13
|
-
return (jsx("input", { className: cl(`ds-input`, className), ref: ref, type: type,
|
|
13
|
+
return (jsx("input", { className: cl(`ds-input`, className), ref: ref, type: type, suppressHydrationWarning // Since <ds-field> adds attributes
|
|
14
|
+
: true, onChange: (event) => rest.readOnly || onChange?.(event), onClick: (event) => {
|
|
14
15
|
if (rest.readOnly)
|
|
15
16
|
event.preventDefault(); // Make readonly work for checkbox / radio / switch
|
|
16
17
|
onClick?.(event);
|
|
@@ -13,7 +13,8 @@ import { forwardRef } from 'react';
|
|
|
13
13
|
* </Select>
|
|
14
14
|
*/
|
|
15
15
|
const Select = forwardRef(function Select({ className, onKeyDown, onMouseDown, width, readOnly, ...rest }, ref) {
|
|
16
|
-
return (jsx("select", { className: cl('ds-input', className), "aria-readonly": rest['aria-readonly'] ?? readOnly,
|
|
16
|
+
return (jsx("select", { className: cl('ds-input', className), "aria-readonly": rest['aria-readonly'] ?? readOnly, suppressHydrationWarning // Since <ds-field> adds attributes
|
|
17
|
+
: true, "data-width": width, ref: ref, ...rest }));
|
|
17
18
|
});
|
|
18
19
|
|
|
19
20
|
export { Select };
|
|
@@ -10,14 +10,20 @@ import { Context } from './tabs.js';
|
|
|
10
10
|
* @example
|
|
11
11
|
* <TabsTab value='1'>Tab 1</TabsTab>
|
|
12
12
|
*/
|
|
13
|
-
const TabsTab = forwardRef(function TabsTab({ value, className, onClick, ...rest }, ref) {
|
|
14
|
-
const { onChange, getPrefixedValue } = useContext(Context);
|
|
13
|
+
const TabsTab = forwardRef(function TabsTab({ value, className, onClick, onClickCapture, ...rest }, ref) {
|
|
14
|
+
const { onChange, getPrefixedValue, isControlled, currentValue } = useContext(Context);
|
|
15
15
|
return (
|
|
16
16
|
// biome-ignore lint/a11y/noStaticElementInteractions: ds-tabs IS interactive
|
|
17
17
|
jsx("ds-tab", { "aria-controls": rest['aria-controls'] ?? getPrefixedValue?.(value), "data-value": value, ref: ref, suppressHydrationWarning // Since <ds-tablist> adds attributes
|
|
18
|
-
: true,
|
|
19
|
-
|
|
18
|
+
: true, onClickCapture: (e) => {
|
|
19
|
+
onClickCapture?.(e);
|
|
20
|
+
if (isControlled && currentValue !== value) {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
}
|
|
23
|
+
}, onClick: (e) => {
|
|
24
|
+
if (e.isTrusted || !isControlled || currentValue !== value) {
|
|
20
25
|
onChange?.(value); // Only call onChange is user actually clicked, not when programmatically clicked/controlled
|
|
26
|
+
}
|
|
21
27
|
onClick?.(e);
|
|
22
28
|
}, class: className, ...rest, children: rest.children }));
|
|
23
29
|
});
|
|
@@ -44,7 +44,8 @@ const Tabs = forwardRef(function Tabs({ value, defaultValue, className, onChange
|
|
|
44
44
|
});
|
|
45
45
|
}, [value, isControlled]);
|
|
46
46
|
return (jsx(Context.Provider, { value: {
|
|
47
|
-
|
|
47
|
+
isControlled,
|
|
48
|
+
currentValue: value,
|
|
48
49
|
defaultValue,
|
|
49
50
|
onChange: onValueChange,
|
|
50
51
|
getPrefixedValue: (value) => value && `${valuePrefix}-${value}`,
|
|
@@ -14,7 +14,20 @@ const ToggleGroupItem = forwardRef(function ToggleGroupItem({ className, childre
|
|
|
14
14
|
const toggleGroup = useContext(ToggleGroupContext);
|
|
15
15
|
const value = rawValue ?? genValue;
|
|
16
16
|
const active = toggleGroup.value === value;
|
|
17
|
-
|
|
17
|
+
const { form, formAction, formEncType, formMethod, formNoValidate, formTarget, required, disabled, 'aria-disabled': ariaDisabled, ...labelProps } = rest;
|
|
18
|
+
/** Add backwards compatibility for `button` props that were previously allowed on `ToggleGroupItem` but are passeable to `input`*/
|
|
19
|
+
const inputProps = {
|
|
20
|
+
form,
|
|
21
|
+
formAction,
|
|
22
|
+
formEncType,
|
|
23
|
+
formMethod,
|
|
24
|
+
formNoValidate,
|
|
25
|
+
formTarget,
|
|
26
|
+
required,
|
|
27
|
+
disabled,
|
|
28
|
+
'aria-disabled': ariaDisabled,
|
|
29
|
+
};
|
|
30
|
+
return (jsxs("label", { ref: ref, ...labelProps, className: cl('ds-button', className), "data-variant": 'tertiary', "aria-disabled": ariaDisabled ?? disabled, children: [jsx("input", { ...inputProps, checked: active, name: toggleGroup.name, onChange: () => toggleGroup.onChange?.(value), type: 'radio', value: value, disabled: disabled, "aria-disabled": ariaDisabled }), children] }));
|
|
18
31
|
});
|
|
19
32
|
|
|
20
33
|
export { ToggleGroupItem };
|
|
@@ -33,7 +33,8 @@ const ToggleGroup = forwardRef(function ToggleGroup({ children, className, defau
|
|
|
33
33
|
value,
|
|
34
34
|
variant,
|
|
35
35
|
}, children: jsx("fieldset", { className: cl('ds-toggle-group', className), "data-toggle-group": '' // Default to empty string to ensure attribute is present
|
|
36
|
-
, "data-variant": variant,
|
|
36
|
+
, "data-variant": variant, suppressHydrationWarning // Since @digdir/designsystemet-web adds attributes
|
|
37
|
+
: true, ref: ref, ...rest, children: children }) }));
|
|
37
38
|
});
|
|
38
39
|
|
|
39
40
|
export { ToggleGroup, ToggleGroupContext };
|
package/dist/react-types.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import type { Color, ColorScheme, Size } from '@digdir/designsystemet-types';
|
|
|
2
2
|
|
|
3
3
|
declare global {
|
|
4
4
|
namespace React {
|
|
5
|
-
// biome-ignore lint/correctness/noUnusedVariables: we overwrite React's HTMLAttributes to add custom attributes
|
|
6
5
|
interface HTMLAttributes<T> {
|
|
7
6
|
/**
|
|
8
7
|
* Represents the recommended size options for the Designsystemet variables.
|
|
@@ -12,5 +12,5 @@ declare const Combobox: ComboboxComponent;
|
|
|
12
12
|
export type { ComboboxProps } from './Combobox';
|
|
13
13
|
export type { ComboboxEmptyProps } from './Empty';
|
|
14
14
|
export type { ComboboxOptionProps } from './Option/Option';
|
|
15
|
-
export { Combobox,
|
|
15
|
+
export { Combobox, ComboboxEmpty, ComboboxOption };
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,KAAK,iBAAiB,GAAG,OAAO,YAAY,GAAG;IAC7C,MAAM,EAAE,OAAO,cAAc,CAAC;IAC9B,KAAK,EAAE,OAAO,aAAa,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,QAAQ,EAAmB,iBAAiB,CAAC;AAQnD,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,KAAK,iBAAiB,GAAG,OAAO,YAAY,GAAG;IAC7C,MAAM,EAAE,OAAO,cAAc,CAAC;IAC9B,KAAK,EAAE,OAAO,aAAa,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,QAAQ,EAAmB,iBAAiB,CAAC;AAQnD,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -25,7 +25,7 @@ export type AvatarStackProps = {
|
|
|
25
25
|
* @default undefined
|
|
26
26
|
*/
|
|
27
27
|
expandable?: 'fixed' | true;
|
|
28
|
-
} & HTMLAttributes<
|
|
28
|
+
} & HTMLAttributes<HTMLSpanElement>;
|
|
29
29
|
/**
|
|
30
30
|
* Use `AvatarStack` to constrain Avatars into a stack.
|
|
31
31
|
*
|
|
@@ -66,5 +66,5 @@ export declare const EXPERIMENTAL_AvatarStack: import("react").ForwardRefExoticC
|
|
|
66
66
|
* @default undefined
|
|
67
67
|
*/
|
|
68
68
|
expandable?: "fixed" | true;
|
|
69
|
-
} & HTMLAttributes<
|
|
69
|
+
} & HTMLAttributes<HTMLSpanElement> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
70
70
|
//# sourceMappingURL=avatar-stack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar-stack.d.ts","sourceRoot":"","sources":["../../../src/components/avatar-stack/avatar-stack.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"avatar-stack.d.ts","sourceRoot":"","sources":["../../../src/components/avatar-stack/avatar-stack.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,OAAO,CAAC;AAG3D,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC7B,GAAG,cAAc,CAAC,eAAe,CAAC,CAAC;AAEpC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB;IAzCnC;;;OAGG;UACG,MAAM;IACZ;;;OAGG;iBACU,MAAM;IACnB;;;OAGG;cACO,MAAM;IAChB;;OAEG;aACM,MAAM;IACf;;;;OAIG;iBACU,OAAO,GAAG,IAAI;qFAyD3B,CAAC"}
|
|
@@ -17,7 +17,7 @@ declare const Badge: import("react").ForwardRefExoticComponent<Omit<import("../.
|
|
|
17
17
|
overlap?: "circle" | "rectangle";
|
|
18
18
|
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
19
19
|
};
|
|
20
|
-
export { Badge, BadgePosition };
|
|
21
20
|
export type { BadgeProps } from './badge';
|
|
22
21
|
export type { BadgePositionProps } from './badge-position';
|
|
22
|
+
export { Badge, BadgePosition };
|
|
23
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/badge/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;;;GAKG;AACH,QAAA,MAAM,KAAK;;;;;;;;;;;CAAuD,CAAC;AAInE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/badge/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;;;GAKG;AACH,QAAA,MAAM,KAAK;;;;;;;;;;;CAAuD,CAAC;AAInE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -69,5 +69,5 @@ export type { BreadcrumbsProps } from './breadcrumbs';
|
|
|
69
69
|
export type { BreadcrumbsItemProps } from './breadcrumbs-item';
|
|
70
70
|
export type { BreadcrumbsLinkProps } from './breadcrumbs-link';
|
|
71
71
|
export type { BreadcrumbsListProps } from './breadcrumbs-list';
|
|
72
|
-
export { BreadcrumbsComponent as Breadcrumbs,
|
|
72
|
+
export { BreadcrumbsComponent as Breadcrumbs, BreadcrumbsItem, BreadcrumbsLink, BreadcrumbsList, };
|
|
73
73
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -28,5 +28,5 @@ type Card = typeof CardParent & {
|
|
|
28
28
|
declare const CardComponent: Card;
|
|
29
29
|
export type { CardProps } from './card';
|
|
30
30
|
export type { CardBlockProps } from './card-block';
|
|
31
|
-
export { CardComponent as Card
|
|
31
|
+
export { CardBlock, CardComponent as Card };
|
|
32
32
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,KAAK,IAAI,GAAG,OAAO,UAAU,GAAG;IAC9B;;;;;;;;;;;OAWG;IACH,KAAK,EAAE,OAAO,SAAS,CAAC;CACzB,CAAC;AACF;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,EAAE,IAEnB,CAAC;AAIH,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,aAAa,IAAI,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,KAAK,IAAI,GAAG,OAAO,UAAU,GAAG;IAC9B;;;;;;;;;;;OAWG;IACH,KAAK,EAAE,OAAO,SAAS,CAAC;CACzB,CAAC;AACF;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,EAAE,IAEnB,CAAC;AAIH,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,aAAa,IAAI,IAAI,EAAE,CAAC"}
|
|
@@ -33,5 +33,5 @@ type Chip = {
|
|
|
33
33
|
};
|
|
34
34
|
declare const ChipComponent: Chip;
|
|
35
35
|
export type { ChipButtonProps, ChipCheckboxProps, ChipRadioProps, ChipRemovableProps, } from './chips';
|
|
36
|
-
export { ChipComponent as Chip,
|
|
36
|
+
export { ChipButton, ChipCheckbox, ChipComponent as Chip, ChipRadio, ChipRemovable, };
|
|
37
37
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/chip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7E,KAAK,IAAI,GAAG;IACV;;;;;OAKG;IACH,MAAM,EAAE,OAAO,UAAU,CAAC;IAC1B;;;;;;OAMG;IACH,QAAQ,EAAE,OAAO,YAAY,CAAC;IAC9B;;;;;;OAMG;IACH,KAAK,EAAE,OAAO,SAAS,CAAC;IACxB;;;;;OAKG;IACH,SAAS,EAAE,OAAO,aAAa,CAAC;CACjC,CAAC;AAEF,QAAA,MAAM,aAAa,EAAE,IAKpB,CAAC;AAOF,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,kBAAkB,GACnB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,aAAa,IAAI,IAAI,EACrB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/chip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7E,KAAK,IAAI,GAAG;IACV;;;;;OAKG;IACH,MAAM,EAAE,OAAO,UAAU,CAAC;IAC1B;;;;;;OAMG;IACH,QAAQ,EAAE,OAAO,YAAY,CAAC;IAC9B;;;;;;OAMG;IACH,KAAK,EAAE,OAAO,SAAS,CAAC;IACxB;;;;;OAKG;IACH,SAAS,EAAE,OAAO,aAAa,CAAC;CACjC,CAAC;AAEF,QAAA,MAAM,aAAa,EAAE,IAKpB,CAAC;AAOF,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,kBAAkB,GACnB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,UAAU,EACV,YAAY,EACZ,aAAa,IAAI,IAAI,EACrB,SAAS,EACT,aAAa,GACd,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DetailsHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import '@digdir/designsystemet-web';
|
|
3
3
|
import type { DefaultProps } from '../../types';
|
|
4
4
|
import type { MergeRight } from '../../utilities';
|
|
5
|
-
export type DetailsProps = MergeRight<DefaultProps &
|
|
5
|
+
export type DetailsProps = MergeRight<DefaultProps & DetailsHTMLAttributes<HTMLDetailsElement>, {
|
|
6
6
|
/**
|
|
7
7
|
* Change the background color of the details.
|
|
8
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../src/components/details/details.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../src/components/details/details.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG9D,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,qBAAqB,CAAC,kBAAkB,CAAC,EACxD;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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
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;qDAmGpB,CAAC"}
|
|
@@ -63,5 +63,5 @@ export type { DialogProps } from './dialog';
|
|
|
63
63
|
export type { DialogBlockProps } from './dialog-block';
|
|
64
64
|
export type { DialogTriggerProps } from './dialog-trigger';
|
|
65
65
|
export type { DialogTriggerContextProps } from './dialog-trigger-context';
|
|
66
|
-
export { DialogComponent as Dialog,
|
|
66
|
+
export { DialogBlock, DialogComponent as Dialog, DialogTrigger, DialogTriggerContext, };
|
|
67
67
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,KAAK,MAAM,GAAG,OAAO,YAAY,GAAG;IAClC;;;;;;;;;;OAUG;IACH,cAAc,EAAE,OAAO,oBAAoB,CAAC;IAC5C;;;;;;;;;;OAUG;IACH,OAAO,EAAE,OAAO,aAAa,CAAC;IAC9B;;;;;;;;;;;;;;;OAeG;IACH,KAAK,EAAE,OAAO,WAAW,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,eAAe,EAAE,MAIrB,CAAC;AAMH,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,YAAY,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EACL,eAAe,IAAI,MAAM,EACzB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,KAAK,MAAM,GAAG,OAAO,YAAY,GAAG;IAClC;;;;;;;;;;OAUG;IACH,cAAc,EAAE,OAAO,oBAAoB,CAAC;IAC5C;;;;;;;;;;OAUG;IACH,OAAO,EAAE,OAAO,aAAa,CAAC;IAC9B;;;;;;;;;;;;;;;OAeG;IACH,KAAK,EAAE,OAAO,WAAW,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,eAAe,EAAE,MAIrB,CAAC;AAMH,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,YAAY,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EACL,WAAW,EACX,eAAe,IAAI,MAAM,EACzB,aAAa,EACb,oBAAoB,GACrB,CAAC"}
|
|
@@ -123,5 +123,5 @@ export type { DropdownHeadingProps } from './dropdown-heading';
|
|
|
123
123
|
export type { DropdownItemProps } from './dropdown-item';
|
|
124
124
|
export type { DropdownListProps } from './dropdown-list';
|
|
125
125
|
export type { DropdownTriggerContextProps } from './dropdown-trigger-context';
|
|
126
|
-
export { DropdownComponent as Dropdown,
|
|
126
|
+
export { DropdownButton, DropdownComponent as Dropdown, DropdownHeading, DropdownItem, DropdownList, DropdownTrigger, DropdownTriggerContext, };
|
|
127
127
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,KAAK,QAAQ,GAAG,OAAO,YAAY,GAAG;IACpC;;;;;;;;;;;;;;;OAeG;IACH,cAAc,EAAE,OAAO,sBAAsB,CAAC;IAC9C;;;;;;;;;;;;;;;OAeG;IACH,OAAO,EAAE,OAAO,eAAe,CAAC;IAChC;;;;;;;OAOG;IACH,OAAO,EAAE,OAAO,eAAe,CAAC;IAChC;;;;;;;;;;;OAWG;IACH,IAAI,EAAE,OAAO,YAAY,CAAC;IAC1B;;;;;;;;;;;OAWG;IACH,IAAI,EAAE,OAAO,YAAY,CAAC;IAC1B;;;;;;;;;;;OAWG;IACH,MAAM,EAAE,OAAO,cAAc,CAAC;CAC/B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,QAAA,MAAM,iBAAiB,EAAE,QAOvB,CAAC;AASH,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,YAAY,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EACL,iBAAiB,IAAI,QAAQ,EAC7B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,KAAK,QAAQ,GAAG,OAAO,YAAY,GAAG;IACpC;;;;;;;;;;;;;;;OAeG;IACH,cAAc,EAAE,OAAO,sBAAsB,CAAC;IAC9C;;;;;;;;;;;;;;;OAeG;IACH,OAAO,EAAE,OAAO,eAAe,CAAC;IAChC;;;;;;;OAOG;IACH,OAAO,EAAE,OAAO,eAAe,CAAC;IAChC;;;;;;;;;;;OAWG;IACH,IAAI,EAAE,OAAO,YAAY,CAAC;IAC1B;;;;;;;;;;;OAWG;IACH,IAAI,EAAE,OAAO,YAAY,CAAC;IAC1B;;;;;;;;;;;OAWG;IACH,MAAM,EAAE,OAAO,cAAc,CAAC;CAC/B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,QAAA,MAAM,iBAAiB,EAAE,QAOvB,CAAC;AASH,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,YAAY,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EACL,cAAc,EACd,iBAAiB,IAAI,QAAQ,EAC7B,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,sBAAsB,GACvB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { HTMLAttributes } from 'react';
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import type { DefaultProps } from '../../types';
|
|
3
3
|
export type ErrorSummaryProps = {
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated This is not supported anymore, as the element needs to be `ds-error-summary`
|
|
6
6
|
*/
|
|
7
|
-
asChild?:
|
|
7
|
+
asChild?: ReactNode;
|
|
8
8
|
} & Omit<HTMLAttributes<HTMLDivElement> & DefaultProps, 'data-color'>;
|
|
9
9
|
/**
|
|
10
10
|
* ErrorSummary component, used to display a list of errors.
|
|
@@ -26,6 +26,6 @@ export declare const ErrorSummary: import("react").ForwardRefExoticComponent<{
|
|
|
26
26
|
/**
|
|
27
27
|
* @deprecated This is not supported anymore, as the element needs to be `ds-error-summary`
|
|
28
28
|
*/
|
|
29
|
-
asChild?:
|
|
29
|
+
asChild?: ReactNode;
|
|
30
30
|
} & Omit<HTMLAttributes<HTMLDivElement> & DefaultProps, "data-color"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
31
|
//# sourceMappingURL=error-summary.d.ts.map
|