@digdir/designsystemet-react 1.13.1 → 1.13.3
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 +3 -2
- package/dist/cjs/components/dialog/dialog-trigger-context.js +5 -4
- package/dist/cjs/components/dialog/dialog-trigger.js +9 -3
- package/dist/cjs/components/dialog/dialog.js +6 -7
- package/dist/cjs/components/pagination/pagination-button.js +3 -5
- package/dist/cjs/components/suggestion/suggestion-list.js +2 -2
- package/dist/cjs/components/tabs/tabs-tab.js +4 -6
- package/dist/cjs/components/tabs/tabs.js +9 -2
- package/dist/cjs/components/toggle-group/toggle-group-item.js +2 -14
- package/dist/cjs/components/tooltip/tooltip.js +3 -3
- package/dist/esm/components/button/button.js +3 -2
- package/dist/esm/components/dialog/dialog-trigger-context.js +6 -5
- package/dist/esm/components/dialog/dialog-trigger.js +9 -3
- package/dist/esm/components/dialog/dialog.js +6 -7
- package/dist/esm/components/pagination/pagination-button.js +3 -5
- package/dist/esm/components/suggestion/suggestion-list.js +2 -2
- package/dist/esm/components/tabs/tabs-tab.js +4 -6
- package/dist/esm/components/tabs/tabs.js +9 -2
- package/dist/esm/components/toggle-group/toggle-group-item.js +2 -14
- package/dist/esm/components/tooltip/tooltip.js +3 -3
- package/dist/types/components/button/button.d.ts +24 -2
- package/dist/types/components/button/button.d.ts.map +1 -1
- package/dist/types/components/dialog/dialog-trigger-context.d.ts +1 -8
- package/dist/types/components/dialog/dialog-trigger-context.d.ts.map +1 -1
- package/dist/types/components/dialog/dialog-trigger.d.ts +4 -1
- package/dist/types/components/dialog/dialog-trigger.d.ts.map +1 -1
- package/dist/types/components/dialog/dialog.d.ts +1 -1
- package/dist/types/components/pagination/pagination-button.d.ts +4 -13
- package/dist/types/components/pagination/pagination-button.d.ts.map +1 -1
- package/dist/types/components/search/search-button.d.ts +4 -1
- package/dist/types/components/search/search-button.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion-list.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 +0 -1
- package/dist/types/components/tabs/tabs.d.ts.map +1 -1
- package/dist/types/components/toggle-group/toggle-group-item.d.ts.map +1 -1
- package/dist/types/components/tooltip/tooltip.d.ts.map +1 -1
- package/package.json +23 -23
|
@@ -13,15 +13,16 @@ 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 = 'primary', popoverTarget, popovertarget, ...rest }, ref) {
|
|
16
|
+
const Button = react.forwardRef(function Button({ asChild, className, children, icon = false, loading = false, variant = 'primary', 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')
|
|
20
20
|
? 'popoverTarget'
|
|
21
21
|
: 'popovertarget';
|
|
22
|
+
const commandForVal = commandFor ?? commandfor;
|
|
22
23
|
// Fallbacks to undefined to prevent rendering attribute="false"
|
|
23
24
|
return (jsxRuntime.jsxs(Component, { suppressHydrationWarning // Might get augmented through designsystemet-web with aria-haspopup etc.
|
|
24
|
-
: true, "aria-busy": Boolean(loading) || undefined, "aria-disabled": Boolean(loading) || undefined, className: cl('ds-button', className), "data-icon": icon || undefined, "data-variant": variant, ref: ref,
|
|
25
|
+
: true, "aria-busy": Boolean(loading) || undefined, "aria-disabled": Boolean(loading) || undefined, className: cl('ds-button', className), "data-icon": icon || undefined, commandfor: commandForVal, "data-variant": variant, ref: ref,
|
|
25
26
|
/* don't set type when we use `asChild` */
|
|
26
27
|
type: asChild ? undefined : 'button', [popoverKey]: popoverVal, ...rest, children: [loading === true ? (jsxRuntime.jsx(spinner.Spinner, { "aria-hidden": 'true' })) : (loading // Allow custom loading spinner
|
|
27
28
|
), jsxRuntime.jsx(reactSlot.Slottable, { children: icon && loading ? null : children })] }));
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var react = require('react');
|
|
6
6
|
|
|
7
|
-
const Context = react.createContext({
|
|
7
|
+
const Context = react.createContext({
|
|
8
|
+
current: null,
|
|
9
|
+
});
|
|
8
10
|
/**
|
|
9
11
|
* DialogTriggerContext component, used to provide a context for a dialog trigger.
|
|
10
12
|
*
|
|
@@ -17,9 +19,8 @@ const Context = react.createContext({});
|
|
|
17
19
|
* </Dialog.TriggerContext>
|
|
18
20
|
*/
|
|
19
21
|
const DialogTriggerContext = (rest) => {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
return jsxRuntime.jsx(Context.Provider, { value: { ...state, setContext }, ...rest });
|
|
22
|
+
const contextRef = react.useRef(null);
|
|
23
|
+
return jsxRuntime.jsx(Context.Provider, { value: contextRef, ...rest });
|
|
23
24
|
};
|
|
24
25
|
DialogTriggerContext.displayName = 'DialogTriggerContext';
|
|
25
26
|
|
|
@@ -19,10 +19,16 @@ var dialogTriggerContext = require('./dialog-trigger-context.js');
|
|
|
19
19
|
* </Dialog.TriggerContext>
|
|
20
20
|
*/
|
|
21
21
|
const DialogTrigger = react.forwardRef(function DialogTrigger({ asChild, ...rest }, ref) {
|
|
22
|
-
const
|
|
22
|
+
const contextRef = react.useContext(dialogTriggerContext.Context); // Using contextRef instead of command as this is instantly available and plays nice with tests
|
|
23
23
|
const Component = asChild ? reactSlot.Slot : button.Button;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
const openDialog = () => {
|
|
25
|
+
/* check if element has `data-modal`, it it has, use `showModal` */
|
|
26
|
+
contextRef.current?.getAttribute('data-modal') === 'true'
|
|
27
|
+
? contextRef.current?.showModal()
|
|
28
|
+
: contextRef.current?.show();
|
|
29
|
+
};
|
|
30
|
+
return (jsxRuntime.jsx(Component, { "aria-haspopup": 'dialog', onClick: openDialog, ref: ref, suppressHydrationWarning // Might get augmented through designsystemet-web with aria-haspopup
|
|
31
|
+
: true, ...rest }));
|
|
26
32
|
});
|
|
27
33
|
|
|
28
34
|
exports.DialogTrigger = DialogTrigger;
|
|
@@ -34,24 +34,23 @@ var dialogTriggerContext = require('./dialog-trigger-context.js');
|
|
|
34
34
|
* </Dialog>
|
|
35
35
|
*/
|
|
36
36
|
const Dialog = react.forwardRef(function Dialog({ asChild, children, className, closeButton = 'Lukk dialogvindu', id, modal = true, onAnimationEnd, onClick, onClose, open, placement = 'center', ...rest }, ref) {
|
|
37
|
-
const
|
|
37
|
+
const contextRef = react.useContext(dialogTriggerContext.Context);
|
|
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
|
-
const mergedRefs = useMergeRefs.useMergeRefs([ref, dialogRef]);
|
|
40
|
+
const mergedRefs = useMergeRefs.useMergeRefs([contextRef, ref, dialogRef]);
|
|
41
41
|
const showProp = modal ? 'showModal' : 'show';
|
|
42
42
|
const autoId = react.useId();
|
|
43
43
|
const usedId = id ?? autoId;
|
|
44
44
|
// Toggle open based on prop
|
|
45
45
|
react.useEffect(() => dialogRef.current?.[open ? showProp : 'close'](), [open]);
|
|
46
|
-
|
|
47
|
-
react.useEffect(() => setContext?.({ id: usedId, modal }), [usedId, modal]);
|
|
48
|
-
return (jsxRuntime.jsxs(Component, { className: cl('ds-dialog', className), "data-placement": placement, id: usedId, onClose: (event) => onClose?.(event.nativeEvent), onClick: (event) => {
|
|
46
|
+
return (jsxRuntime.jsxs(Component, { className: cl('ds-dialog', className), "data-placement": placement, "data-modal": modal, id: usedId, onClose: (event) => onClose?.(event.nativeEvent), onClick: (event) => {
|
|
49
47
|
onClick?.(event);
|
|
50
48
|
const { currentTarget: dialog, target: el, defaultPrevented } = event;
|
|
51
49
|
const isClose = el?.closest?.('[data-command="close"]');
|
|
52
50
|
if (!defaultPrevented && isClose) {
|
|
53
51
|
dialog.close();
|
|
54
|
-
|
|
52
|
+
if (window.dsWarnings !== false)
|
|
53
|
+
console.log('Designsystemet: data-command="close" is deprecated. Use command="close" and commandfor="DIALOG-ID" instead.');
|
|
55
54
|
}
|
|
56
55
|
}, onAnimationEnd: (event) => {
|
|
57
56
|
const { currentTarget: dialog } = event;
|
|
@@ -59,7 +58,7 @@ const Dialog = react.forwardRef(function Dialog({ asChild, children, className,
|
|
|
59
58
|
if (document.activeElement !== autofocus)
|
|
60
59
|
autofocus?.focus(); // Handle autofocus on open
|
|
61
60
|
onAnimationEnd?.(event);
|
|
62
|
-
}, ref: mergedRefs, ...rest, children: [closeButton !== false && (jsxRuntime.jsx(button.Button, { "aria-label": closeButton, "data-color": 'neutral', icon: true, variant: 'tertiary', command: 'close', commandfor:
|
|
61
|
+
}, 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] }));
|
|
63
62
|
});
|
|
64
63
|
|
|
65
64
|
exports.Dialog = Dialog;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var reactSlot = require('@radix-ui/react-slot');
|
|
6
5
|
var react = require('react');
|
|
6
|
+
var button = require('../button/button.js');
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* PaginationButton component, use within a Pagination.Item.
|
|
@@ -13,10 +13,8 @@ var react = require('react');
|
|
|
13
13
|
* <PaginationButton aria-label='Forrige side'>Forrige</PaginationButton>
|
|
14
14
|
* </PaginationItem>
|
|
15
15
|
*/
|
|
16
|
-
const PaginationButton = react.forwardRef(function PaginationButton(
|
|
17
|
-
|
|
18
|
-
return (jsxRuntime.jsx(Component, { className: 'ds-button', "data-variant": 'tertiary', suppressHydrationWarning // Since <ds-pagination> adds attributes
|
|
19
|
-
: true, ref: ref, ...rest }));
|
|
16
|
+
const PaginationButton = react.forwardRef(function PaginationButton(rest, ref) {
|
|
17
|
+
return jsxRuntime.jsx(button.Button, { "data-variant": 'tertiary', ref: ref, ...rest });
|
|
20
18
|
});
|
|
21
19
|
|
|
22
20
|
exports.PaginationButton = PaginationButton;
|
|
@@ -20,8 +20,8 @@ var suggestion = require('./suggestion.js');
|
|
|
20
20
|
const SuggestionList = react.forwardRef(function SuggestionList({ singular = '%d forslag', plural = '%d forslag', className, id, autoPlacement = true, ...rest }, ref) {
|
|
21
21
|
const { handleFilter } = react.useContext(suggestion.SuggestionContext);
|
|
22
22
|
react.useEffect(handleFilter); // Must run on every render
|
|
23
|
-
return (jsxRuntime.jsx("u-datalist", { class: className, popover: 'manual' // Is also set by
|
|
24
|
-
,
|
|
23
|
+
return (jsxRuntime.jsx("u-datalist", { class: className, "data-nofilter": true, "data-sr-plural": plural, "data-sr-singular": singular, popover: 'manual', ref: ref, role: 'listbox' // Is also set by <ds-suggestion> but nice to have to please tests
|
|
24
|
+
, suppressHydrationWarning // Since <u-datalist> adds attributes
|
|
25
25
|
: true, ...rest }));
|
|
26
26
|
});
|
|
27
27
|
|
|
@@ -19,13 +19,11 @@ const TabsTab = react.forwardRef(function TabsTab({ value, className, onClick, o
|
|
|
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
20
|
: true, onClickCapture: (e) => {
|
|
21
21
|
onClickCapture?.(e);
|
|
22
|
-
if (isControlled && currentValue !== value)
|
|
23
|
-
e.preventDefault();
|
|
24
|
-
}
|
|
22
|
+
if (isControlled && currentValue !== value)
|
|
23
|
+
e.preventDefault(); // In controlled mode, prevent click in event capture phase
|
|
25
24
|
}, onClick: (e) => {
|
|
26
|
-
if (
|
|
27
|
-
onChange?.(value); // Only call onChange
|
|
28
|
-
}
|
|
25
|
+
if (currentValue !== value)
|
|
26
|
+
onChange?.(value); // Only call onChange when actual value change
|
|
29
27
|
onClick?.(e);
|
|
30
28
|
}, class: className, ...rest, children: rest.children }));
|
|
31
29
|
});
|
|
@@ -42,13 +42,20 @@ const Tabs = react.forwardRef(function Tabs({ value, defaultValue, className, on
|
|
|
42
42
|
return;
|
|
43
43
|
tabsRef.current?.tabList?.tabs?.forEach((tab) => {
|
|
44
44
|
if (tab.getAttribute('data-value') === value)
|
|
45
|
-
tab.
|
|
45
|
+
tab.setAttribute('aria-selected', 'true');
|
|
46
46
|
});
|
|
47
47
|
}, [value, isControlled]);
|
|
48
|
+
react.useEffect(() => {
|
|
49
|
+
if (defaultValue && tabsRef.current) {
|
|
50
|
+
tabsRef.current?.tabList?.tabs?.forEach((tab) => {
|
|
51
|
+
if (tab.getAttribute('data-value') === defaultValue)
|
|
52
|
+
tab.setAttribute('aria-selected', 'true');
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}, []);
|
|
48
56
|
return (jsxRuntime.jsx(Context.Provider, { value: {
|
|
49
57
|
isControlled,
|
|
50
58
|
currentValue: value,
|
|
51
|
-
defaultValue,
|
|
52
59
|
onChange: onValueChange,
|
|
53
60
|
getPrefixedValue: (value) => value && `${valuePrefix}-${value}`,
|
|
54
61
|
}, children: jsxRuntime.jsx("ds-tabs", { suppressHydrationWarning // Since <ds-tablist> adds attributes
|
|
@@ -16,20 +16,8 @@ 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
|
-
const { form, formAction, formEncType, formMethod, formNoValidate, formTarget, required,
|
|
20
|
-
|
|
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] }));
|
|
19
|
+
const { 'aria-disabled': ariaDisabled, disabled, form, formAction, formEncType, formMethod, formNoValidate, formTarget, required, ...labelProps } = rest;
|
|
20
|
+
return (jsxRuntime.jsxs("label", { ref: ref, ...labelProps, className: cl('ds-button', className), "data-variant": 'tertiary', "aria-disabled": ariaDisabled ?? disabled, children: [jsxRuntime.jsx("input", { "aria-disabled": ariaDisabled, checked: active, disabled: disabled, form: form, formAction: formAction, formEncType: formEncType, formMethod: formMethod, formNoValidate: formNoValidate, formTarget: formTarget, name: toggleGroup$1.name, onChange: () => toggleGroup$1.onChange?.(value), required: required, type: 'radio', value: value }), children] }));
|
|
33
21
|
});
|
|
34
22
|
|
|
35
23
|
exports.ToggleGroupItem = ToggleGroupItem;
|
|
@@ -19,11 +19,11 @@ var react = require('react');
|
|
|
19
19
|
* Hover me
|
|
20
20
|
* </Tooltip>
|
|
21
21
|
*/
|
|
22
|
-
const Tooltip = react.forwardRef(function Tooltip({ content, placement = 'top', autoPlacement = true, ...rest },
|
|
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, { "aria-label": content, "data-tooltip": content, "data-placement": placement, "data-autoplacement": autoPlacement, suppressHydrationWarning // Since data-tooltip adds aria-label/aria-description
|
|
26
|
-
: true, ...rest, children: isString ? jsxRuntime.jsx("span", { tabIndex: 0, children: rest.children }) : rest.children }));
|
|
25
|
+
return (jsxRuntime.jsx(reactSlot.Slot, { "aria-label": content || undefined, "data-tooltip": content, "data-placement": placement, "data-autoplacement": autoPlacement, suppressHydrationWarning // Since data-tooltip adds aria-label/aria-description
|
|
26
|
+
: true, ref: ref, ...rest, children: isString ? jsxRuntime.jsx("span", { tabIndex: 0, children: rest.children }) : rest.children }));
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
exports.Tooltip = Tooltip;
|
|
@@ -11,15 +11,16 @@ 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 = 'primary', popoverTarget, popovertarget, ...rest }, ref) {
|
|
14
|
+
const Button = forwardRef(function Button({ asChild, className, children, icon = false, loading = false, variant = 'primary', 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')
|
|
18
18
|
? 'popoverTarget'
|
|
19
19
|
: 'popovertarget';
|
|
20
|
+
const commandForVal = commandFor ?? commandfor;
|
|
20
21
|
// Fallbacks to undefined to prevent rendering attribute="false"
|
|
21
22
|
return (jsxs(Component, { suppressHydrationWarning // Might get augmented through designsystemet-web with aria-haspopup etc.
|
|
22
|
-
: true, "aria-busy": Boolean(loading) || undefined, "aria-disabled": Boolean(loading) || undefined, className: cl('ds-button', className), "data-icon": icon || undefined, "data-variant": variant, ref: ref,
|
|
23
|
+
: true, "aria-busy": Boolean(loading) || undefined, "aria-disabled": Boolean(loading) || undefined, className: cl('ds-button', className), "data-icon": icon || undefined, commandfor: commandForVal, "data-variant": variant, ref: ref,
|
|
23
24
|
/* don't set type when we use `asChild` */
|
|
24
25
|
type: asChild ? undefined : 'button', [popoverKey]: popoverVal, ...rest, children: [loading === true ? (jsx(Spinner, { "aria-hidden": 'true' })) : (loading // Allow custom loading spinner
|
|
25
26
|
), jsx(Slottable, { children: icon && loading ? null : children })] }));
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { createContext,
|
|
3
|
+
import { createContext, useRef } from 'react';
|
|
4
4
|
|
|
5
|
-
const Context = createContext({
|
|
5
|
+
const Context = createContext({
|
|
6
|
+
current: null,
|
|
7
|
+
});
|
|
6
8
|
/**
|
|
7
9
|
* DialogTriggerContext component, used to provide a context for a dialog trigger.
|
|
8
10
|
*
|
|
@@ -15,9 +17,8 @@ const Context = createContext({});
|
|
|
15
17
|
* </Dialog.TriggerContext>
|
|
16
18
|
*/
|
|
17
19
|
const DialogTriggerContext = (rest) => {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
return jsx(Context.Provider, { value: { ...state, setContext }, ...rest });
|
|
20
|
+
const contextRef = useRef(null);
|
|
21
|
+
return jsx(Context.Provider, { value: contextRef, ...rest });
|
|
21
22
|
};
|
|
22
23
|
DialogTriggerContext.displayName = 'DialogTriggerContext';
|
|
23
24
|
|
|
@@ -17,10 +17,16 @@ import { Context } from './dialog-trigger-context.js';
|
|
|
17
17
|
* </Dialog.TriggerContext>
|
|
18
18
|
*/
|
|
19
19
|
const DialogTrigger = forwardRef(function DialogTrigger({ asChild, ...rest }, ref) {
|
|
20
|
-
const
|
|
20
|
+
const contextRef = useContext(Context); // Using contextRef instead of command as this is instantly available and plays nice with tests
|
|
21
21
|
const Component = asChild ? Slot : Button;
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const openDialog = () => {
|
|
23
|
+
/* check if element has `data-modal`, it it has, use `showModal` */
|
|
24
|
+
contextRef.current?.getAttribute('data-modal') === 'true'
|
|
25
|
+
? contextRef.current?.showModal()
|
|
26
|
+
: contextRef.current?.show();
|
|
27
|
+
};
|
|
28
|
+
return (jsx(Component, { "aria-haspopup": 'dialog', onClick: openDialog, ref: ref, suppressHydrationWarning // Might get augmented through designsystemet-web with aria-haspopup
|
|
29
|
+
: true, ...rest }));
|
|
24
30
|
});
|
|
25
31
|
|
|
26
32
|
export { DialogTrigger };
|
|
@@ -32,24 +32,23 @@ import { Context } from './dialog-trigger-context.js';
|
|
|
32
32
|
* </Dialog>
|
|
33
33
|
*/
|
|
34
34
|
const Dialog = forwardRef(function Dialog({ asChild, children, className, closeButton = 'Lukk dialogvindu', id, modal = true, onAnimationEnd, onClick, onClose, open, placement = 'center', ...rest }, ref) {
|
|
35
|
-
const
|
|
35
|
+
const contextRef = useContext(Context);
|
|
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
|
-
const mergedRefs = useMergeRefs([ref, dialogRef]);
|
|
38
|
+
const mergedRefs = useMergeRefs([contextRef, ref, dialogRef]);
|
|
39
39
|
const showProp = modal ? 'showModal' : 'show';
|
|
40
40
|
const autoId = useId();
|
|
41
41
|
const usedId = id ?? autoId;
|
|
42
42
|
// Toggle open based on prop
|
|
43
43
|
useEffect(() => dialogRef.current?.[open ? showProp : 'close'](), [open]);
|
|
44
|
-
|
|
45
|
-
useEffect(() => setContext?.({ id: usedId, modal }), [usedId, modal]);
|
|
46
|
-
return (jsxs(Component, { className: cl('ds-dialog', className), "data-placement": placement, id: usedId, onClose: (event) => onClose?.(event.nativeEvent), onClick: (event) => {
|
|
44
|
+
return (jsxs(Component, { className: cl('ds-dialog', className), "data-placement": placement, "data-modal": modal, id: usedId, onClose: (event) => onClose?.(event.nativeEvent), onClick: (event) => {
|
|
47
45
|
onClick?.(event);
|
|
48
46
|
const { currentTarget: dialog, target: el, defaultPrevented } = event;
|
|
49
47
|
const isClose = el?.closest?.('[data-command="close"]');
|
|
50
48
|
if (!defaultPrevented && isClose) {
|
|
51
49
|
dialog.close();
|
|
52
|
-
|
|
50
|
+
if (window.dsWarnings !== false)
|
|
51
|
+
console.log('Designsystemet: data-command="close" is deprecated. Use command="close" and commandfor="DIALOG-ID" instead.');
|
|
53
52
|
}
|
|
54
53
|
}, onAnimationEnd: (event) => {
|
|
55
54
|
const { currentTarget: dialog } = event;
|
|
@@ -57,7 +56,7 @@ const Dialog = forwardRef(function Dialog({ asChild, children, className, closeB
|
|
|
57
56
|
if (document.activeElement !== autofocus)
|
|
58
57
|
autofocus?.focus(); // Handle autofocus on open
|
|
59
58
|
onAnimationEnd?.(event);
|
|
60
|
-
}, ref: mergedRefs, ...rest, children: [closeButton !== false && (jsx(Button, { "aria-label": closeButton, "data-color": 'neutral', icon: true, variant: 'tertiary', command: 'close', commandfor:
|
|
59
|
+
}, ref: mergedRefs, ...rest, children: [closeButton !== false && (jsx(Button, { "aria-label": closeButton, "data-color": 'neutral', icon: true, variant: 'tertiary', command: 'close', commandfor: usedId })), children] }));
|
|
61
60
|
});
|
|
62
61
|
|
|
63
62
|
export { Dialog };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
4
3
|
import { forwardRef } from 'react';
|
|
4
|
+
import { Button } from '../button/button.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* PaginationButton component, use within a Pagination.Item.
|
|
@@ -11,10 +11,8 @@ import { forwardRef } from 'react';
|
|
|
11
11
|
* <PaginationButton aria-label='Forrige side'>Forrige</PaginationButton>
|
|
12
12
|
* </PaginationItem>
|
|
13
13
|
*/
|
|
14
|
-
const PaginationButton = forwardRef(function PaginationButton(
|
|
15
|
-
|
|
16
|
-
return (jsx(Component, { className: 'ds-button', "data-variant": 'tertiary', suppressHydrationWarning // Since <ds-pagination> adds attributes
|
|
17
|
-
: true, ref: ref, ...rest }));
|
|
14
|
+
const PaginationButton = forwardRef(function PaginationButton(rest, ref) {
|
|
15
|
+
return jsx(Button, { "data-variant": 'tertiary', ref: ref, ...rest });
|
|
18
16
|
});
|
|
19
17
|
|
|
20
18
|
export { PaginationButton };
|
|
@@ -18,8 +18,8 @@ import { SuggestionContext } from './suggestion.js';
|
|
|
18
18
|
const SuggestionList = forwardRef(function SuggestionList({ singular = '%d forslag', plural = '%d forslag', className, id, autoPlacement = true, ...rest }, ref) {
|
|
19
19
|
const { handleFilter } = useContext(SuggestionContext);
|
|
20
20
|
useEffect(handleFilter); // Must run on every render
|
|
21
|
-
return (jsx("u-datalist", { class: className, popover: 'manual' // Is also set by
|
|
22
|
-
,
|
|
21
|
+
return (jsx("u-datalist", { class: className, "data-nofilter": true, "data-sr-plural": plural, "data-sr-singular": singular, popover: 'manual', ref: ref, role: 'listbox' // Is also set by <ds-suggestion> but nice to have to please tests
|
|
22
|
+
, suppressHydrationWarning // Since <u-datalist> adds attributes
|
|
23
23
|
: true, ...rest }));
|
|
24
24
|
});
|
|
25
25
|
|
|
@@ -17,13 +17,11 @@ const TabsTab = forwardRef(function TabsTab({ value, className, onClick, onClick
|
|
|
17
17
|
jsx("ds-tab", { "aria-controls": rest['aria-controls'] ?? getPrefixedValue?.(value), "data-value": value, ref: ref, suppressHydrationWarning // Since <ds-tablist> adds attributes
|
|
18
18
|
: true, onClickCapture: (e) => {
|
|
19
19
|
onClickCapture?.(e);
|
|
20
|
-
if (isControlled && currentValue !== value)
|
|
21
|
-
e.preventDefault();
|
|
22
|
-
}
|
|
20
|
+
if (isControlled && currentValue !== value)
|
|
21
|
+
e.preventDefault(); // In controlled mode, prevent click in event capture phase
|
|
23
22
|
}, onClick: (e) => {
|
|
24
|
-
if (
|
|
25
|
-
onChange?.(value); // Only call onChange
|
|
26
|
-
}
|
|
23
|
+
if (currentValue !== value)
|
|
24
|
+
onChange?.(value); // Only call onChange when actual value change
|
|
27
25
|
onClick?.(e);
|
|
28
26
|
}, class: className, ...rest, children: rest.children }));
|
|
29
27
|
});
|
|
@@ -40,13 +40,20 @@ const Tabs = forwardRef(function Tabs({ value, defaultValue, className, onChange
|
|
|
40
40
|
return;
|
|
41
41
|
tabsRef.current?.tabList?.tabs?.forEach((tab) => {
|
|
42
42
|
if (tab.getAttribute('data-value') === value)
|
|
43
|
-
tab.
|
|
43
|
+
tab.setAttribute('aria-selected', 'true');
|
|
44
44
|
});
|
|
45
45
|
}, [value, isControlled]);
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (defaultValue && tabsRef.current) {
|
|
48
|
+
tabsRef.current?.tabList?.tabs?.forEach((tab) => {
|
|
49
|
+
if (tab.getAttribute('data-value') === defaultValue)
|
|
50
|
+
tab.setAttribute('aria-selected', 'true');
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}, []);
|
|
46
54
|
return (jsx(Context.Provider, { value: {
|
|
47
55
|
isControlled,
|
|
48
56
|
currentValue: value,
|
|
49
|
-
defaultValue,
|
|
50
57
|
onChange: onValueChange,
|
|
51
58
|
getPrefixedValue: (value) => value && `${valuePrefix}-${value}`,
|
|
52
59
|
}, children: jsx("ds-tabs", { suppressHydrationWarning // Since <ds-tablist> adds attributes
|
|
@@ -14,20 +14,8 @@ 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
|
-
const { form, formAction, formEncType, formMethod, formNoValidate, formTarget, required,
|
|
18
|
-
|
|
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] }));
|
|
17
|
+
const { 'aria-disabled': ariaDisabled, disabled, form, formAction, formEncType, formMethod, formNoValidate, formTarget, required, ...labelProps } = rest;
|
|
18
|
+
return (jsxs("label", { ref: ref, ...labelProps, className: cl('ds-button', className), "data-variant": 'tertiary', "aria-disabled": ariaDisabled ?? disabled, children: [jsx("input", { "aria-disabled": ariaDisabled, checked: active, disabled: disabled, form: form, formAction: formAction, formEncType: formEncType, formMethod: formMethod, formNoValidate: formNoValidate, formTarget: formTarget, name: toggleGroup.name, onChange: () => toggleGroup.onChange?.(value), required: required, type: 'radio', value: value }), children] }));
|
|
31
19
|
});
|
|
32
20
|
|
|
33
21
|
export { ToggleGroupItem };
|
|
@@ -17,11 +17,11 @@ import { forwardRef } from 'react';
|
|
|
17
17
|
* Hover me
|
|
18
18
|
* </Tooltip>
|
|
19
19
|
*/
|
|
20
|
-
const Tooltip = forwardRef(function Tooltip({ content, placement = 'top', autoPlacement = true, ...rest },
|
|
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, { "aria-label": content, "data-tooltip": content, "data-placement": placement, "data-autoplacement": autoPlacement, suppressHydrationWarning // Since data-tooltip adds aria-label/aria-description
|
|
24
|
-
: true, ...rest, children: isString ? jsx("span", { tabIndex: 0, children: rest.children }) : rest.children }));
|
|
23
|
+
return (jsx(Slot, { "aria-label": content || undefined, "data-tooltip": content, "data-placement": placement, "data-autoplacement": autoPlacement, suppressHydrationWarning // Since data-tooltip adds aria-label/aria-description
|
|
24
|
+
: true, ref: ref, ...rest, children: isString ? jsx("span", { tabIndex: 0, children: rest.children }) : rest.children }));
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
export { Tooltip };
|
|
@@ -2,7 +2,7 @@ import type { Color, SeverityColors } from '@digdir/designsystemet-types';
|
|
|
2
2
|
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
import type { DefaultProps } from '../../types';
|
|
4
4
|
import type { MergeRight } from '../../utilities';
|
|
5
|
-
export type ButtonProps = MergeRight<DefaultProps & ButtonHTMLAttributes<HTMLButtonElement>, {
|
|
5
|
+
export type ButtonProps = MergeRight<DefaultProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'command' | 'commandfor' | 'commandFor'>, {
|
|
6
6
|
/**
|
|
7
7
|
* Specify which variant to use
|
|
8
8
|
* @default 'primary'
|
|
@@ -35,6 +35,17 @@ export type ButtonProps = MergeRight<DefaultProps & ButtonHTMLAttributes<HTMLBut
|
|
|
35
35
|
* @default 'button'
|
|
36
36
|
*/
|
|
37
37
|
type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
38
|
+
/**
|
|
39
|
+
* Native invoker commands. Specifies actions to perform on an element specified by commandfor. Polyfilled by designsystemet-web and includes a custom --show-non-modal command.
|
|
40
|
+
* "show-modal", "close", "request-close", "show-popover", "hide-popover", "toggle-popover", "--show-non-modal"
|
|
41
|
+
*/
|
|
42
|
+
command?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Specifies the target element for "command".
|
|
45
|
+
* value is ID of target
|
|
46
|
+
*/
|
|
47
|
+
commandfor?: string;
|
|
48
|
+
commandFor?: string;
|
|
38
49
|
}>;
|
|
39
50
|
/**
|
|
40
51
|
* Button used for interaction
|
|
@@ -42,7 +53,7 @@ export type ButtonProps = MergeRight<DefaultProps & ButtonHTMLAttributes<HTMLBut
|
|
|
42
53
|
* @example
|
|
43
54
|
* <Button>Click me</Button>
|
|
44
55
|
*/
|
|
45
|
-
export declare const Button: import("react").ForwardRefExoticComponent<Omit<DefaultProps & ButtonHTMLAttributes<HTMLButtonElement>, "type" | "data-color" | "
|
|
56
|
+
export declare const Button: import("react").ForwardRefExoticComponent<Omit<DefaultProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "command" | "commandfor" | "commandFor">, "type" | "data-color" | "command" | "commandfor" | "commandFor" | "variant" | "icon" | "loading" | "asChild"> & {
|
|
46
57
|
/**
|
|
47
58
|
* Specify which variant to use
|
|
48
59
|
* @default 'primary'
|
|
@@ -75,5 +86,16 @@ export declare const Button: import("react").ForwardRefExoticComponent<Omit<Defa
|
|
|
75
86
|
* @default 'button'
|
|
76
87
|
*/
|
|
77
88
|
type?: ButtonHTMLAttributes<HTMLButtonElement>["type"];
|
|
89
|
+
/**
|
|
90
|
+
* Native invoker commands. Specifies actions to perform on an element specified by commandfor. Polyfilled by designsystemet-web and includes a custom --show-non-modal command.
|
|
91
|
+
* "show-modal", "close", "request-close", "show-popover", "hide-popover", "toggle-popover", "--show-non-modal"
|
|
92
|
+
*/
|
|
93
|
+
command?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Specifies the target element for "command".
|
|
96
|
+
* value is ID of target
|
|
97
|
+
*/
|
|
98
|
+
commandfor?: string;
|
|
99
|
+
commandFor?: string;
|
|
78
100
|
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
79
101
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,MAAM,WAAW,GAAG,UAAU,CAClC,YAAY,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,MAAM,WAAW,GAAG,UAAU,CAClC,YAAY,GACV,IAAI,CACF,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,SAAS,GAAG,YAAY,GAAG,YAAY,CACxC,EACH;IACE;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;IAC/C;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IACzD;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;IACvD;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CACF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,MAAM;IApDf;;;OAGG;cACO,SAAS,GAAG,WAAW,GAAG,UAAU;IAC9C;;OAEG;mBACY,KAAK,GAAG,OAAO,CAAC,cAAc,EAAE,QAAQ,CAAC;IACxD;;;;OAIG;WACI,OAAO;IACd;;;;;OAKG;cACO,OAAO,GAAG,SAAS;IAC7B;;;OAGG;cACO,OAAO;IACjB;;;OAGG;WACI,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC;IACtD;;;OAGG;cACO,MAAM;IAChB;;;OAGG;iBACU,MAAM;iBACN,MAAM;qDA4DtB,CAAC"}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
id?: string;
|
|
4
|
-
modal?: boolean;
|
|
5
|
-
};
|
|
6
|
-
export declare const Context: import("react").Context<DialogContext & {
|
|
7
|
-
setContext?: (context: DialogContext) => void;
|
|
8
|
-
}>;
|
|
2
|
+
export declare const Context: import("react").Context<import("react").RefObject<HTMLDialogElement | null>>;
|
|
9
3
|
export type DialogTriggerContextProps = {
|
|
10
4
|
children: ReactNode;
|
|
11
5
|
};
|
|
@@ -24,5 +18,4 @@ export declare const DialogTriggerContext: {
|
|
|
24
18
|
(rest: DialogTriggerContextProps): import("react/jsx-runtime").JSX.Element;
|
|
25
19
|
displayName: string;
|
|
26
20
|
};
|
|
27
|
-
export {};
|
|
28
21
|
//# sourceMappingURL=dialog-trigger-context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-trigger-context.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/dialog-trigger-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,
|
|
1
|
+
{"version":3,"file":"dialog-trigger-context.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/dialog-trigger-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,eAAO,MAAM,OAAO,8EAInB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB;WAAU,yBAAyB;;CAInE,CAAC"}
|
|
@@ -12,12 +12,15 @@ export type DialogTriggerProps = ComponentPropsWithRef<typeof Button>;
|
|
|
12
12
|
* </Dialog>
|
|
13
13
|
* </Dialog.TriggerContext>
|
|
14
14
|
*/
|
|
15
|
-
export declare const DialogTrigger: import("react").ForwardRefExoticComponent<Omit<Omit<import("../../types").DefaultProps & import("react").ButtonHTMLAttributes<HTMLButtonElement>, "type" | "data-color" | "
|
|
15
|
+
export declare const DialogTrigger: import("react").ForwardRefExoticComponent<Omit<Omit<import("../../types").DefaultProps & Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "command" | "commandfor" | "commandFor">, "type" | "data-color" | "command" | "commandfor" | "commandFor" | "variant" | "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;
|
|
19
19
|
loading?: boolean | import("react").ReactNode;
|
|
20
20
|
asChild?: boolean;
|
|
21
21
|
type?: import("react").ButtonHTMLAttributes<HTMLButtonElement>["type"];
|
|
22
|
+
command?: string;
|
|
23
|
+
commandfor?: string;
|
|
24
|
+
commandFor?: string;
|
|
22
25
|
} & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
23
26
|
//# sourceMappingURL=dialog-trigger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-trigger.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/dialog-trigger.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,MAAM,CAAC,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"dialog-trigger.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/dialog-trigger.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,MAAM,CAAC,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;gHAsBzB,CAAC"}
|
|
@@ -68,7 +68,7 @@ export type DialogProps = MergeRight<DefaultProps & DialogHTMLAttributes<HTMLDia
|
|
|
68
68
|
* Content
|
|
69
69
|
* </Dialog>
|
|
70
70
|
*/
|
|
71
|
-
export declare const Dialog: import("react").ForwardRefExoticComponent<Omit<DefaultProps & DialogHTMLAttributes<HTMLDialogElement>, "asChild" | "open" | "placement" | "
|
|
71
|
+
export declare const Dialog: import("react").ForwardRefExoticComponent<Omit<DefaultProps & DialogHTMLAttributes<HTMLDialogElement>, "asChild" | "open" | "placement" | "closedby" | "onClose" | "closeButton" | "modal"> & {
|
|
72
72
|
/**
|
|
73
73
|
* Screen reader label of close button. Set false to hide the close button.
|
|
74
74
|
* @default 'Lukk dialogvindu'
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { type AriaAttributes
|
|
1
|
+
import { type AriaAttributes } from 'react';
|
|
2
|
+
import { type ButtonProps } from '../button/button';
|
|
2
3
|
export type PaginationButtonProps = {
|
|
3
4
|
/**
|
|
4
5
|
* Toggle button as active
|
|
5
6
|
* @default false
|
|
6
7
|
*/
|
|
7
8
|
'aria-current'?: AriaAttributes['aria-current'];
|
|
8
|
-
|
|
9
|
-
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
10
|
-
* @default false
|
|
11
|
-
*/
|
|
12
|
-
asChild?: boolean;
|
|
13
|
-
} & HTMLAttributes<HTMLButtonElement>;
|
|
9
|
+
} & Omit<ButtonProps, 'icon' | 'loading'>;
|
|
14
10
|
/**
|
|
15
11
|
* PaginationButton component, use within a Pagination.Item.
|
|
16
12
|
*
|
|
@@ -25,10 +21,5 @@ export declare const PaginationButton: import("react").ForwardRefExoticComponent
|
|
|
25
21
|
* @default false
|
|
26
22
|
*/
|
|
27
23
|
'aria-current'?: AriaAttributes["aria-current"];
|
|
28
|
-
|
|
29
|
-
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
30
|
-
* @default false
|
|
31
|
-
*/
|
|
32
|
-
asChild?: boolean;
|
|
33
|
-
} & HTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
24
|
+
} & Omit<ButtonProps, "icon" | "loading"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
34
25
|
//# sourceMappingURL=pagination-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination-button.d.ts","sourceRoot":"","sources":["../../../src/components/pagination/pagination-button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pagination-button.d.ts","sourceRoot":"","sources":["../../../src/components/pagination/pagination-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAc,MAAM,OAAO,CAAC;AACxD,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE5D,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;OAGG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;CACjD,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAE1C;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB;IAf3B;;;OAGG;qBACc,cAAc,CAAC,cAAc,CAAC;6FAgB/C,CAAC"}
|
|
@@ -22,12 +22,15 @@ 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("../../types").DefaultProps & import("react").ButtonHTMLAttributes<HTMLButtonElement>, "type" | "data-color" | "
|
|
25
|
+
export declare const SearchButton: import("react").ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "command" | "commandfor" | "commandFor">, "type" | "data-color" | "command" | "commandfor" | "commandFor" | "variant" | "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;
|
|
29
29
|
loading?: boolean | ReactNode;
|
|
30
30
|
asChild?: boolean;
|
|
31
31
|
type?: import("react").ButtonHTMLAttributes<HTMLButtonElement>["type"];
|
|
32
|
+
command?: string;
|
|
33
|
+
commandfor?: string;
|
|
34
|
+
commandFor?: string;
|
|
32
35
|
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
33
36
|
//# sourceMappingURL=search-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-button.d.ts","sourceRoot":"","sources":["../../../src/components/search/search-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE5D,MAAM,MAAM,iBAAiB,GAAG,UAAU,CACxC,WAAW,EACX;IACE;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CACF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"search-button.d.ts","sourceRoot":"","sources":["../../../src/components/search/search-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE5D,MAAM,MAAM,iBAAiB,GAAG,UAAU,CACxC,WAAW,EACX;IACE;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CACF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;qDAQxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion-list.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/suggestion-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAC1C,YAAY,GAAG,cAAc,CAAC,mBAAmB,CAAC,EAClD;IACE;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CACF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc;IA7BvB;;;OAGG;eACQ,MAAM;IACjB;;;OAGG;aACM,MAAM;IACf;;;OAGG;oBACa,OAAO;
|
|
1
|
+
{"version":3,"file":"suggestion-list.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/suggestion-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAC1C,YAAY,GAAG,cAAc,CAAC,mBAAmB,CAAC,EAClD;IACE;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CACF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc;IA7BvB;;;OAGG;eACQ,MAAM;IACjB;;;OAGG;aACM,MAAM;IACf;;;OAGG;oBACa,OAAO;uDA8CzB,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;8FAqCb,CAAC"}
|
|
@@ -23,7 +23,6 @@ export type TabsProps = MergeRight<DefaultProps & Omit<HTMLAttributes<DSTabEleme
|
|
|
23
23
|
export type ContextProps = {
|
|
24
24
|
isControlled?: boolean;
|
|
25
25
|
currentValue?: string;
|
|
26
|
-
defaultValue?: string;
|
|
27
26
|
onChange?: (value: string) => void;
|
|
28
27
|
getPrefixedValue?: (value?: string) => string | undefined;
|
|
29
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/components/tabs/tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAS5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,MAAM,SAAS,GAAG,UAAU,CAChC,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,EACvE;IACE;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CACF,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/components/tabs/tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAS5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,MAAM,SAAS,GAAG,UAAU,CAChC,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,EACvE;IACE;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CACF,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,gBAAgB,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CAC3D,CAAC;AAEF,eAAO,MAAM,OAAO,uCAAkC,CAAC;AAEvD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,IAAI;IA1Cb;;;OAGG;YACK,MAAM;IACd;;;OAGG;mBACY,MAAM;IACrB;;;OAGG;eACQ,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;gDAoFpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-group-item.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-group/toggle-group-item.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EAGzB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;QAGI;IACJ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;QAEI;IACJ,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,GAAG,YAAY,GACd,mBAAmB,CAAC,gBAAgB,CAAC,GACrC,IAAI,CACF,mBAAmB,CAAC,gBAAgB,CAAC,EACnC,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,gBAAgB,GAChB,OAAO,GACP,UAAU,CACb,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,eAAe;IA5B1B;;;QAGI;YACI,MAAM;IACd;;QAEI;WACG,OAAO;
|
|
1
|
+
{"version":3,"file":"toggle-group-item.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-group/toggle-group-item.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EAGzB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;QAGI;IACJ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;QAEI;IACJ,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,GAAG,YAAY,GACd,mBAAmB,CAAC,gBAAgB,CAAC,GACrC,IAAI,CACF,mBAAmB,CAAC,gBAAgB,CAAC,EACnC,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,gBAAgB,GAChB,OAAO,GACP,UAAU,CACb,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,eAAe;IA5B1B;;;QAGI;YACI,MAAM;IACd;;QAEI;WACG,OAAO;4QAwEd,CAAC"}
|
|
@@ -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;kCAuCtC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digdir/designsystemet-react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.13.
|
|
4
|
+
"version": "1.13.3",
|
|
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.
|
|
40
|
+
"@navikt/aksel-icons": "^8.9.0",
|
|
41
41
|
"@radix-ui/react-slot": "^1.2.4",
|
|
42
|
-
"@tanstack/react-virtual": "^3.13.
|
|
42
|
+
"@tanstack/react-virtual": "^3.13.23",
|
|
43
43
|
"clsx": "^2.1.1",
|
|
44
|
-
"@digdir/designsystemet-types": "
|
|
45
|
-
"@digdir/designsystemet-web": "
|
|
44
|
+
"@digdir/designsystemet-types": "1.13.3",
|
|
45
|
+
"@digdir/designsystemet-web": "1.13.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@rollup/plugin-commonjs": "
|
|
49
|
-
"@rollup/plugin-node-resolve": "
|
|
50
|
-
"@storybook/addon-docs": "
|
|
51
|
-
"@storybook/addon-vitest": "
|
|
52
|
-
"@storybook/react-vite": "
|
|
53
|
-
"@testing-library/jest-dom": "
|
|
54
|
-
"@testing-library/react": "
|
|
55
|
-
"@testing-library/user-event": "
|
|
56
|
-
"@types/react": "
|
|
57
|
-
"@types/react-dom": "
|
|
58
|
-
"react": "
|
|
59
|
-
"react-dom": "
|
|
60
|
-
"rimraf": "
|
|
61
|
-
"rollup": "
|
|
62
|
-
"rollup-plugin-copy": "
|
|
63
|
-
"storybook": "
|
|
48
|
+
"@rollup/plugin-commonjs": "29.0.2",
|
|
49
|
+
"@rollup/plugin-node-resolve": "16.0.3",
|
|
50
|
+
"@storybook/addon-docs": "10.3.4",
|
|
51
|
+
"@storybook/addon-vitest": "10.3.4",
|
|
52
|
+
"@storybook/react-vite": "10.3.4",
|
|
53
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
54
|
+
"@testing-library/react": "16.3.2",
|
|
55
|
+
"@testing-library/user-event": "14.6.1",
|
|
56
|
+
"@types/react": "19.2.14",
|
|
57
|
+
"@types/react-dom": "19.2.3",
|
|
58
|
+
"react": "19.2.4",
|
|
59
|
+
"react-dom": "19.2.4",
|
|
60
|
+
"rimraf": "6.1.3",
|
|
61
|
+
"rollup": "4.60.1",
|
|
62
|
+
"rollup-plugin-copy": "3.5.0",
|
|
63
|
+
"storybook": "10.3.4",
|
|
64
64
|
"tsx": "4.21.0",
|
|
65
|
-
"typescript": "
|
|
66
|
-
"@digdir/designsystemet-css": "^1.13.
|
|
65
|
+
"typescript": "5.9.3",
|
|
66
|
+
"@digdir/designsystemet-css": "^1.13.3"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "pnpm run clean && tsc -b tsconfig.lib.json --emitDeclarationOnly false && rollup -c --bundleConfigAsCjs",
|