@digdir/designsystemet-react 0.0.0-fix-designsystemet-web-20260213102609 → 0.0.0-fix-cli-relative-location-20260225124142

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.
Files changed (24) hide show
  1. package/dist/cjs/components/avatar/avatar.js +2 -2
  2. package/dist/cjs/components/select/select.js +2 -2
  3. package/dist/cjs/components/textfield/textfield.js +1 -7
  4. package/dist/cjs/utilities/roving-focus/roving-focus-item.js +1 -0
  5. package/dist/cjs/utilities/roving-focus/roving-focus-root.js +1 -0
  6. package/dist/cjs/utilities/roving-focus/use-roving-focus.js +3 -1
  7. package/dist/esm/components/avatar/avatar.js +2 -2
  8. package/dist/esm/components/select/select.js +2 -2
  9. package/dist/esm/components/textfield/textfield.js +2 -8
  10. package/dist/esm/utilities/roving-focus/roving-focus-item.js +1 -0
  11. package/dist/esm/utilities/roving-focus/roving-focus-root.js +1 -0
  12. package/dist/esm/utilities/roving-focus/use-roving-focus.js +3 -1
  13. package/dist/types/components/avatar/avatar.d.ts +12 -7
  14. package/dist/types/components/avatar/avatar.d.ts.map +1 -1
  15. package/dist/types/components/select/select.d.ts +2 -0
  16. package/dist/types/components/select/select.d.ts.map +1 -1
  17. package/dist/types/components/textfield/textfield.d.ts.map +1 -1
  18. package/dist/types/utilities/roving-focus/roving-focus-item.d.ts +1 -0
  19. package/dist/types/utilities/roving-focus/roving-focus-item.d.ts.map +1 -1
  20. package/dist/types/utilities/roving-focus/roving-focus-root.d.ts +1 -0
  21. package/dist/types/utilities/roving-focus/roving-focus-root.d.ts.map +1 -1
  22. package/dist/types/utilities/roving-focus/use-roving-focus.d.ts +3 -1
  23. package/dist/types/utilities/roving-focus/use-roving-focus.d.ts.map +1 -1
  24. package/package.json +11 -11
@@ -22,12 +22,12 @@ var react = require('react');
22
22
  * <Icon />
23
23
  * </Avatar>
24
24
  */
25
- const Avatar = react.forwardRef(function Avatar({ 'aria-label': ariaLabel, variant = 'circle', className, children, initials, asChild, ...rest }, ref) {
25
+ const Avatar = react.forwardRef(function Avatar({ 'aria-label': ariaLabel, 'data-tooltip': dataTooltip, variant = 'circle', className, children, initials, asChild, ...rest }, ref) {
26
26
  const OuterComponent = asChild ? reactSlot.Slot : 'span';
27
27
  const useSlot = children && typeof children !== 'string';
28
28
  const textChild = children && typeof children === 'string';
29
29
  const Component = useSlot ? reactSlot.Slot : react.Fragment;
30
- return (jsxRuntime.jsx(OuterComponent, { ref: ref, className: cl('ds-avatar', className), "data-variant": variant, "data-initials": initials, role: asChild ? undefined : 'img', "aria-label": ariaLabel, ...rest, children: jsxRuntime.jsx(Component, { ...(useSlot && !asChild ? { 'aria-hidden': true } : {}), children: textChild ? jsxRuntime.jsx("span", { children: children }) : children }) }));
30
+ return (jsxRuntime.jsx(OuterComponent, { ref: ref, className: cl('ds-avatar', className), "data-variant": variant, "data-initials": initials, role: asChild ? undefined : 'img', "aria-label": ariaLabel || dataTooltip, "data-tooltip": dataTooltip, tabIndex: dataTooltip ? 0 : undefined, ...rest, children: jsxRuntime.jsx(Component, { ...(useSlot && !asChild ? { 'aria-hidden': true } : {}), children: textChild ? jsxRuntime.jsx("span", { children: children }) : children }) }));
31
31
  });
32
32
 
33
33
  exports.Avatar = Avatar;
@@ -14,8 +14,8 @@ var react = require('react');
14
14
  * <Select.Option value='2'>Option 2</Select.Option>
15
15
  * </Select>
16
16
  */
17
- const Select = react.forwardRef(function Select({ className, onKeyDown, onMouseDown, width, ...rest }, ref) {
18
- return (jsxRuntime.jsx("select", { className: cl('ds-input', className), "data-width": width, ref: ref, ...rest }));
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, "data-width": width, ref: ref, ...rest }));
19
19
  });
20
20
 
21
21
  exports.Select = Select;
@@ -21,13 +21,7 @@ var fieldAffix = require('../field/field-affix.js');
21
21
  * <Textfield label="Textfield label">
22
22
  */
23
23
  const Textfield = react.forwardRef(function Textfield({ label: label$1, description, error, multiline, prefix, suffix, 'data-size': size, counter, style, className, ...rest }, ref) {
24
- const fieldRef = react.useRef(null);
25
- // Trigger update of counter and field-size if value changes
26
- react.useEffect(() => {
27
- const input = fieldRef.current?.querySelector('input,textarea');
28
- input?.dispatchEvent(new CustomEvent('ds-field-update'));
29
- }, [rest.value]);
30
- return (jsxRuntime.jsxs(index.Field, { className: className, "data-size": size, style: style, ref: fieldRef, children: [!!label$1 && jsxRuntime.jsx(label.Label, { children: label$1 }), !!description && jsxRuntime.jsx(fieldDescription.FieldDescription, { children: description }), jsxRuntime.jsxs(fieldAffix.FieldAffixes, { children: [prefix === undefined || jsxRuntime.jsx(fieldAffix.FieldAffix, { children: prefix }), multiline === true ? (jsxRuntime.jsx(textarea.Textarea, { ref: ref, "aria-invalid": Boolean(error) || undefined, ...rest })) : (jsxRuntime.jsx(input.Input, { ref: ref, "aria-invalid": Boolean(error) || undefined, ...rest })), suffix === undefined || jsxRuntime.jsx(fieldAffix.FieldAffix, { children: suffix })] }), !!counter && (jsxRuntime.jsx(index.Field.Counter, { ...(typeof counter === 'number' ? { limit: counter } : counter) })), !!error && jsxRuntime.jsx(validationMessage.ValidationMessage, { children: error })] }));
24
+ return (jsxRuntime.jsxs(index.Field, { className: className, "data-size": size, style: style, children: [!!label$1 && jsxRuntime.jsx(label.Label, { children: label$1 }), !!description && jsxRuntime.jsx(fieldDescription.FieldDescription, { children: description }), jsxRuntime.jsxs(fieldAffix.FieldAffixes, { children: [prefix === undefined || jsxRuntime.jsx(fieldAffix.FieldAffix, { children: prefix }), multiline === true ? (jsxRuntime.jsx(textarea.Textarea, { ref: ref, "aria-invalid": Boolean(error) || undefined, ...rest })) : (jsxRuntime.jsx(input.Input, { ref: ref, "aria-invalid": Boolean(error) || undefined, ...rest })), suffix === undefined || jsxRuntime.jsx(fieldAffix.FieldAffix, { children: suffix })] }), !!counter && (jsxRuntime.jsx(index.Field.Counter, { ...(typeof counter === 'number' ? { limit: counter } : counter) })), !!error && jsxRuntime.jsx(validationMessage.ValidationMessage, { children: error })] }));
31
25
  });
32
26
 
33
27
  exports.Textfield = Textfield;
@@ -18,6 +18,7 @@ function getPrevFocusableValue(items, value) {
18
18
  const currIndex = items.findIndex((item) => item.value === value);
19
19
  return items.at(currIndex === 0 ? -1 : currIndex - 1);
20
20
  }
21
+ /** @deprecated RovingFocusItem is deprecated.*/
21
22
  const RovingFocusItem = react.forwardRef(({ value, asChild, ...rest }, ref) => {
22
23
  const Component = asChild ? reactSlot.Slot : 'div';
23
24
  const focusValue = value ?? (typeof rest.children === 'string' ? rest.children : '');
@@ -20,6 +20,7 @@ const RovingFocusContext = react.createContext({
20
20
  focusableValue: null,
21
21
  orientation: 'horizontal',
22
22
  });
23
+ /** @deprecated RovingFocusRoot is deprecated. */
23
24
  const RovingFocusRoot = react.forwardRef(({ activeValue, asChild, orientation = 'horizontal', onBlur, onFocus, ...rest }, ref) => {
24
25
  const Component = asChild ? reactSlot.Slot : 'div';
25
26
  const activeValueOrNull = activeValue ?? null;
@@ -6,7 +6,9 @@ var rovingFocusRoot = require('./roving-focus-root.js');
6
6
 
7
7
  // Logic from: https://www.joshuawootonn.com/react-roving-tabindex
8
8
  // Inspired by: https://github.com/radix-ui/primitives/tree/main/packages/react/roving-focus/src
9
- /** Handles props for `RovingFocus` in context with `RovingFocusRoot` */
9
+ /**
10
+ @deprecated useRovingFocus is deprecated.
11
+ Handles props for `RovingFocus` in context with `RovingFocusRoot` */
10
12
  const useRovingFocus = (value) => {
11
13
  const { elements, getOrderedItems, setFocusableValue, focusableValue, onShiftTab, orientation, } = react.useContext(rovingFocusRoot.RovingFocusContext);
12
14
  return {
@@ -20,12 +20,12 @@ import { forwardRef, Fragment } from 'react';
20
20
  * <Icon />
21
21
  * </Avatar>
22
22
  */
23
- const Avatar = forwardRef(function Avatar({ 'aria-label': ariaLabel, variant = 'circle', className, children, initials, asChild, ...rest }, ref) {
23
+ const Avatar = forwardRef(function Avatar({ 'aria-label': ariaLabel, 'data-tooltip': dataTooltip, variant = 'circle', className, children, initials, asChild, ...rest }, ref) {
24
24
  const OuterComponent = asChild ? Slot : 'span';
25
25
  const useSlot = children && typeof children !== 'string';
26
26
  const textChild = children && typeof children === 'string';
27
27
  const Component = useSlot ? Slot : Fragment;
28
- return (jsx(OuterComponent, { ref: ref, className: cl('ds-avatar', className), "data-variant": variant, "data-initials": initials, role: asChild ? undefined : 'img', "aria-label": ariaLabel, ...rest, children: jsx(Component, { ...(useSlot && !asChild ? { 'aria-hidden': true } : {}), children: textChild ? jsx("span", { children: children }) : children }) }));
28
+ return (jsx(OuterComponent, { ref: ref, className: cl('ds-avatar', className), "data-variant": variant, "data-initials": initials, role: asChild ? undefined : 'img', "aria-label": ariaLabel || dataTooltip, "data-tooltip": dataTooltip, tabIndex: dataTooltip ? 0 : undefined, ...rest, children: jsx(Component, { ...(useSlot && !asChild ? { 'aria-hidden': true } : {}), children: textChild ? jsx("span", { children: children }) : children }) }));
29
29
  });
30
30
 
31
31
  export { Avatar };
@@ -12,8 +12,8 @@ import { forwardRef } from 'react';
12
12
  * <Select.Option value='2'>Option 2</Select.Option>
13
13
  * </Select>
14
14
  */
15
- const Select = forwardRef(function Select({ className, onKeyDown, onMouseDown, width, ...rest }, ref) {
16
- return (jsx("select", { className: cl('ds-input', className), "data-width": width, ref: ref, ...rest }));
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, "data-width": width, ref: ref, ...rest }));
17
17
  });
18
18
 
19
19
  export { Select };
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
- import { forwardRef, useRef, useEffect } from 'react';
3
+ import { forwardRef } from 'react';
4
4
  import { Field as FieldComponent } from '../field/index.js';
5
5
  import { Input } from '../input/input.js';
6
6
  import { Label } from '../label/label.js';
@@ -19,13 +19,7 @@ import { FieldAffixes, FieldAffix } from '../field/field-affix.js';
19
19
  * <Textfield label="Textfield label">
20
20
  */
21
21
  const Textfield = forwardRef(function Textfield({ label, description, error, multiline, prefix, suffix, 'data-size': size, counter, style, className, ...rest }, ref) {
22
- const fieldRef = useRef(null);
23
- // Trigger update of counter and field-size if value changes
24
- useEffect(() => {
25
- const input = fieldRef.current?.querySelector('input,textarea');
26
- input?.dispatchEvent(new CustomEvent('ds-field-update'));
27
- }, [rest.value]);
28
- return (jsxs(FieldComponent, { className: className, "data-size": size, style: style, ref: fieldRef, children: [!!label && jsx(Label, { children: label }), !!description && jsx(FieldDescription, { children: description }), jsxs(FieldAffixes, { children: [prefix === undefined || jsx(FieldAffix, { children: prefix }), multiline === true ? (jsx(Textarea, { ref: ref, "aria-invalid": Boolean(error) || undefined, ...rest })) : (jsx(Input, { ref: ref, "aria-invalid": Boolean(error) || undefined, ...rest })), suffix === undefined || jsx(FieldAffix, { children: suffix })] }), !!counter && (jsx(FieldComponent.Counter, { ...(typeof counter === 'number' ? { limit: counter } : counter) })), !!error && jsx(ValidationMessage, { children: error })] }));
22
+ return (jsxs(FieldComponent, { className: className, "data-size": size, style: style, children: [!!label && jsx(Label, { children: label }), !!description && jsx(FieldDescription, { children: description }), jsxs(FieldAffixes, { children: [prefix === undefined || jsx(FieldAffix, { children: prefix }), multiline === true ? (jsx(Textarea, { ref: ref, "aria-invalid": Boolean(error) || undefined, ...rest })) : (jsx(Input, { ref: ref, "aria-invalid": Boolean(error) || undefined, ...rest })), suffix === undefined || jsx(FieldAffix, { children: suffix })] }), !!counter && (jsx(FieldComponent.Counter, { ...(typeof counter === 'number' ? { limit: counter } : counter) })), !!error && jsx(ValidationMessage, { children: error })] }));
29
23
  });
30
24
 
31
25
  export { Textfield };
@@ -16,6 +16,7 @@ function getPrevFocusableValue(items, value) {
16
16
  const currIndex = items.findIndex((item) => item.value === value);
17
17
  return items.at(currIndex === 0 ? -1 : currIndex - 1);
18
18
  }
19
+ /** @deprecated RovingFocusItem is deprecated.*/
19
20
  const RovingFocusItem = forwardRef(({ value, asChild, ...rest }, ref) => {
20
21
  const Component = asChild ? Slot : 'div';
21
22
  const focusValue = value ?? (typeof rest.children === 'string' ? rest.children : '');
@@ -18,6 +18,7 @@ const RovingFocusContext = createContext({
18
18
  focusableValue: null,
19
19
  orientation: 'horizontal',
20
20
  });
21
+ /** @deprecated RovingFocusRoot is deprecated. */
21
22
  const RovingFocusRoot = forwardRef(({ activeValue, asChild, orientation = 'horizontal', onBlur, onFocus, ...rest }, ref) => {
22
23
  const Component = asChild ? Slot : 'div';
23
24
  const activeValueOrNull = activeValue ?? null;
@@ -4,7 +4,9 @@ import { RovingFocusContext } from './roving-focus-root.js';
4
4
 
5
5
  // Logic from: https://www.joshuawootonn.com/react-roving-tabindex
6
6
  // Inspired by: https://github.com/radix-ui/primitives/tree/main/packages/react/roving-focus/src
7
- /** Handles props for `RovingFocus` in context with `RovingFocusRoot` */
7
+ /**
8
+ @deprecated useRovingFocus is deprecated.
9
+ Handles props for `RovingFocus` in context with `RovingFocusRoot` */
8
10
  const useRovingFocus = (value) => {
9
11
  const { elements, getOrderedItems, setFocusableValue, focusableValue, onShiftTab, orientation, } = useContext(RovingFocusContext);
10
12
  return {
@@ -2,16 +2,21 @@ import type { Size } from '@digdir/designsystemet-types';
2
2
  import type { HTMLAttributes, ReactNode } from 'react';
3
3
  import type { DefaultProps } from '../../types';
4
4
  import type { MergeRight } from '../../utilities';
5
- type AriaLabel = {
6
- /**
7
- * The name of the person the avatar represents.
8
- */
5
+ type AriaHidden = HTMLAttributes<HTMLSpanElement>['aria-hidden'];
6
+ type AriaAttributes = {
7
+ 'aria-label': string;
8
+ 'data-tooltip'?: never;
9
+ 'aria-hidden'?: AriaHidden;
10
+ } | {
11
+ 'aria-label'?: never;
12
+ 'data-tooltip': string;
13
+ 'aria-hidden'?: AriaHidden;
14
+ } | {
9
15
  'aria-label'?: string;
10
- };
11
- type AriaHidden = Partial<AriaLabel> & {
16
+ 'data-tooltip'?: string;
12
17
  'aria-hidden': true | 'true';
13
18
  };
14
- export type AvatarProps = MergeRight<DefaultProps & HTMLAttributes<HTMLSpanElement>, (AriaLabel | AriaHidden) & {
19
+ export type AvatarProps = MergeRight<DefaultProps & HTMLAttributes<HTMLSpanElement>, AriaAttributes & {
15
20
  /**
16
21
  * The size of the avatar.
17
22
  */
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAGzD,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,KAAK,SAAS,GAAG;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AACF,KAAK,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,GAAG;IAAE,aAAa,EAAE,IAAI,GAAG,MAAM,CAAA;CAAE,CAAC;AAExE,MAAM,MAAM,WAAW,GAAG,UAAU,CAClC,YAAY,GAAG,cAAc,CAAC,eAAe,CAAC,EAC9C,CAAC,SAAS,GAAG,UAAU,CAAC,GAAG;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CACF,CAAC;AAEF;;;;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;;;;;GAeG;AACH,eAAO,MAAM,MAAM,yGAmCjB,CAAC"}
@@ -5,6 +5,7 @@ export type SelectProps = MergeRight<Omit<DefaultProps, 'data-color'> & Omit<Sel
5
5
  {
6
6
  /**
7
7
  * Defines if the select is readOnly
8
+ * @deprecated Use `aria-readonly` instead.
8
9
  * @default false
9
10
  */
10
11
  readOnly?: boolean;
@@ -26,6 +27,7 @@ export type SelectProps = MergeRight<Omit<DefaultProps, 'data-color'> & Omit<Sel
26
27
  export declare const Select: import("react").ForwardRefExoticComponent<Omit<Omit<DefaultProps, "data-color"> & Omit<SelectHTMLAttributes<HTMLSelectElement>, "multiple" | "size">, "readOnly" | "width"> & {
27
28
  /**
28
29
  * Defines if the select is readOnly
30
+ * @deprecated Use `aria-readonly` instead.
29
31
  * @default false
30
32
  */
31
33
  readOnly?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/components/select/select.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG,UAAU,CAClC,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,GAC9B,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC,EAAE,uEAAuE;AAC7I;IACE;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB,CACF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM;IAtBf;;;OAGG;eACQ,OAAO;IAClB;;;OAGG;YACK,MAAM,GAAG,MAAM;qDAwB1B,CAAC"}
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/components/select/select.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG,UAAU,CAClC,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,GAC9B,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC,EAAE,uEAAuE;AAC7I;IACE;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB,CACF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM;IAvBf;;;;OAIG;eACQ,OAAO;IAClB;;;OAGG;YACK,MAAM,GAAG,MAAM;qDA4B1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"textfield.d.ts","sourceRoot":"","sources":["../../../src/components/textfield/textfield.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAIL,KAAK,iBAAiB,EAEvB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGpE,KAAK,WAAW,GAAG,IAAI,CACrB,UAAU,EACV,QAAQ,GAAG,WAAW,GAAG,OAAO,GAAG,YAAY,GAAG,MAAM,CACzD,CAAC;AACF,KAAK,cAAc,GAAG,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC,C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CAC1D,GAAG,WAAW,CAAC;AAEhB,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAC/C,CAAC,sBAAsB,GAAG,mBAAmB,CAAC,CAAC;AAEjD;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,mIAgDpB,CAAC"}
@@ -4,6 +4,7 @@ import type { RovingFocusElement } from './roving-focus-root';
4
4
  export declare function getNextFocusableValue(items: RovingFocusElement[], value: string): RovingFocusElement | undefined;
5
5
  /** Get the previous focusable RovingFocusItem */
6
6
  export declare function getPrevFocusableValue(items: RovingFocusElement[], value: string): RovingFocusElement | undefined;
7
+ /** @deprecated RovingFocusItem is deprecated.*/
7
8
  export declare const RovingFocusItem: import("react").ForwardRefExoticComponent<{
8
9
  /** The value of the `RovingFocusItem` used to determine which item should have focus. */
9
10
  value?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"roving-focus-item.d.ts","sourceRoot":"","sources":["../../../src/utilities/roving-focus/roving-focus-item.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAa9D,6CAA6C;AAC7C,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,kBAAkB,EAAE,EAC3B,KAAK,EAAE,MAAM,GACZ,kBAAkB,GAAG,SAAS,CAGhC;AAED,iDAAiD;AACjD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,kBAAkB,EAAE,EAC3B,KAAK,EAAE,MAAM,GACZ,kBAAkB,GAAG,SAAS,CAGhC;AAED,eAAO,MAAM,eAAe;IA3B1B,yFAAyF;YACjF,MAAM;IACd;;;OAGG;cACO,OAAO;6EAwFlB,CAAC"}
1
+ {"version":3,"file":"roving-focus-item.d.ts","sourceRoot":"","sources":["../../../src/utilities/roving-focus/roving-focus-item.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAa9D,6CAA6C;AAC7C,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,kBAAkB,EAAE,EAC3B,KAAK,EAAE,MAAM,GACZ,kBAAkB,GAAG,SAAS,CAGhC;AAED,iDAAiD;AACjD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,kBAAkB,EAAE,EAC3B,KAAK,EAAE,MAAM,GACZ,kBAAkB,GAAG,SAAS,CAGhC;AAED,gDAAgD;AAChD,eAAO,MAAM,eAAe;IA5B1B,yFAAyF;YACjF,MAAM;IACd;;;OAGG;cACO,OAAO;6EAyFlB,CAAC"}
@@ -12,6 +12,7 @@ export type RovingFocusProps = {
12
12
  orientation: 'vertical' | 'horizontal' | 'ambiguous';
13
13
  };
14
14
  export declare const RovingFocusContext: import("react").Context<RovingFocusProps>;
15
+ /** @deprecated RovingFocusRoot is deprecated. */
15
16
  export declare const RovingFocusRoot: import("react").ForwardRefExoticComponent<{
16
17
  /** The children of the `RovingFocusRoot`. The children should get their roving-relevant props from the `useRovingFocus` hook. */
17
18
  children: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"roving-focus-root.d.ts","sourceRoot":"","sources":["../../../src/utilities/roving-focus/roving-focus-root.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,cAAc,EACd,gBAAgB,EAChB,SAAS,EACV,MAAM,OAAO,CAAC;AAwBf,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,gBAAgB,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IACrD,eAAe,EAAE,MAAM,kBAAkB,EAAE,CAAC;IAC5C,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,EAAE,UAAU,GAAG,YAAY,GAAG,WAAW,CAAC;CACtD,CAAC;AAEF,eAAO,MAAM,kBAAkB,2CAW7B,CAAC;AAEH,eAAO,MAAM,eAAe;IA7C1B,iIAAiI;cACvH,SAAS;IACnB,iGAAiG;kBACnF,MAAM;IACpB;;;OAGG;cACO,OAAO;IACjB;;;;;OAKG;kBACW,UAAU,GAAG,YAAY,GAAG,WAAW;6EAuHtD,CAAC"}
1
+ {"version":3,"file":"roving-focus-root.d.ts","sourceRoot":"","sources":["../../../src/utilities/roving-focus/roving-focus-root.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,cAAc,EACd,gBAAgB,EAChB,SAAS,EACV,MAAM,OAAO,CAAC;AAwBf,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,gBAAgB,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IACrD,eAAe,EAAE,MAAM,kBAAkB,EAAE,CAAC;IAC5C,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,EAAE,UAAU,GAAG,YAAY,GAAG,WAAW,CAAC;CACtD,CAAC;AAEF,eAAO,MAAM,kBAAkB,2CAW7B,CAAC;AAEH,iDAAiD;AACjD,eAAO,MAAM,eAAe;IA9C1B,iIAAiI;cACvH,SAAS;IACnB,iGAAiG;kBACnF,MAAM;IACpB;;;OAGG;cACO,OAAO;IACjB;;;;;OAKG;kBACW,UAAU,GAAG,YAAY,GAAG,WAAW;6EAwHtD,CAAC"}
@@ -1,5 +1,7 @@
1
1
  import type { HTMLAttributes } from 'react';
2
- /** Handles props for `RovingFocus` in context with `RovingFocusRoot` */
2
+ /**
3
+ @deprecated useRovingFocus is deprecated.
4
+ Handles props for `RovingFocus` in context with `RovingFocusRoot` */
3
5
  export declare const useRovingFocus: (value: string) => {
4
6
  getOrderedItems: () => import("./roving-focus-root").RovingFocusElement[];
5
7
  isFocusable: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"use-roving-focus.d.ts","sourceRoot":"","sources":["../../../src/utilities/roving-focus/use-roving-focus.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAK5C,wEAAwE;AACxE,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM;;;;qBAcvB,CAAC,SAAS,WAAW,SAAS,cAAc,CAAC,CAAC,CAAC;uBAE/C,WAAW,GAAG,IAAI;uBAOlB,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;qBAOxB,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQrC,CAAC"}
1
+ {"version":3,"file":"use-roving-focus.d.ts","sourceRoot":"","sources":["../../../src/utilities/roving-focus/use-roving-focus.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAK5C;;oEAEoE;AACpE,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM;;;;qBAcvB,CAAC,SAAS,WAAW,SAAS,cAAc,CAAC,CAAC,CAAC;uBAE/C,WAAW,GAAG,IAAI;uBAOlB,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;qBAOxB,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQrC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@digdir/designsystemet-react",
3
3
  "type": "module",
4
- "version": "0.0.0-fix-designsystemet-web-20260213102609",
4
+ "version": "0.0.0-fix-cli-relative-location-20260225124142",
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.5",
39
39
  "@floating-ui/react": "0.26.23",
40
- "@navikt/aksel-icons": "^8.3.0",
40
+ "@navikt/aksel-icons": "^8.4.1",
41
41
  "@radix-ui/react-slot": "^1.2.4",
42
42
  "@tanstack/react-virtual": "^3.13.18",
43
43
  "clsx": "^2.1.1",
44
- "@digdir/designsystemet-types": "^0.0.0-fix-designsystemet-web-20260213102609",
45
- "@digdir/designsystemet-web": "^0.0.0-fix-designsystemet-web-20260213102609"
44
+ "@digdir/designsystemet-types": "^0.0.0-fix-cli-relative-location-20260225124142",
45
+ "@digdir/designsystemet-web": "^0.0.0-fix-cli-relative-location-20260225124142"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@rollup/plugin-commonjs": "^29.0.0",
49
49
  "@rollup/plugin-node-resolve": "^16.0.3",
50
- "@storybook/addon-docs": "^10.2.7",
51
- "@storybook/addon-vitest": "^10.2.7",
52
- "@storybook/react-vite": "^10.2.7",
50
+ "@storybook/addon-docs": "^10.2.8",
51
+ "@storybook/addon-vitest": "^10.2.8",
52
+ "@storybook/react-vite": "^10.2.8",
53
53
  "@testing-library/jest-dom": "^6.9.1",
54
54
  "@testing-library/react": "^16.3.2",
55
55
  "@testing-library/user-event": "^14.6.1",
56
- "@types/react": "^19.2.13",
56
+ "@types/react": "^19.2.14",
57
57
  "@types/react-dom": "^19.2.3",
58
58
  "react": "^19.2.4",
59
59
  "react-dom": "^19.2.4",
60
- "rimraf": "^6.1.2",
60
+ "rimraf": "^6.1.3",
61
61
  "rollup": "^4.57.1",
62
62
  "rollup-plugin-copy": "^3.5.0",
63
- "storybook": "^10.2.7",
63
+ "storybook": "^10.2.8",
64
64
  "tsx": "4.21.0",
65
65
  "typescript": "^5.9.3",
66
- "@digdir/designsystemet-css": "^0.0.0-fix-designsystemet-web-20260213102609"
66
+ "@digdir/designsystemet-css": "^0.0.0-fix-cli-relative-location-20260225124142"
67
67
  },
68
68
  "scripts": {
69
69
  "build": "pnpm run clean && tsc -b tsconfig.lib.json --emitDeclarationOnly false && rollup -c --bundleConfigAsCjs",