@digdir/designsystemet-react 0.57.0 → 0.58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/cjs/components/Accordion/AccordionHeader/AccordionHeader.js +1 -2
  2. package/dist/cjs/components/Button/Button.js +1 -2
  3. package/dist/cjs/components/Button/Button.module.css.js +1 -1
  4. package/dist/cjs/components/Card/Card.js +1 -2
  5. package/dist/cjs/components/Chip/Removable/Removable.js +1 -2
  6. package/dist/cjs/components/Chip/Toggle/Toggle.js +1 -2
  7. package/dist/cjs/components/HelpText/HelpText.js +1 -2
  8. package/dist/cjs/components/SkipLink/SkipLink.js +1 -2
  9. package/dist/cjs/components/Table/TableHeaderCell.js +1 -2
  10. package/dist/cjs/components/Typography/Ingress/Ingress.js +2 -3
  11. package/dist/cjs/components/form/CharacterCounter.js +1 -2
  12. package/dist/cjs/components/form/Combobox/internal/ComboboxClearButton.js +1 -2
  13. package/dist/cjs/components/form/Combobox/internal/ComboboxLabel.js +1 -2
  14. package/dist/cjs/components/form/Fieldset/Fieldset.js +1 -2
  15. package/dist/cjs/components/form/NativeSelect/NativeSelect.js +1 -2
  16. package/dist/cjs/components/form/Search/Search.js +1 -2
  17. package/dist/cjs/components/form/Textarea/Textarea.js +1 -2
  18. package/dist/cjs/components/form/Textfield/Textfield.js +1 -2
  19. package/dist/cjs/react-css-modules.css +2 -102
  20. package/dist/esm/components/Accordion/AccordionHeader/AccordionHeader.js +1 -2
  21. package/dist/esm/components/Button/Button.js +1 -2
  22. package/dist/esm/components/Button/Button.module.css.js +1 -1
  23. package/dist/esm/components/Card/Card.js +1 -2
  24. package/dist/esm/components/Chip/Removable/Removable.js +1 -2
  25. package/dist/esm/components/Chip/Toggle/Toggle.js +1 -2
  26. package/dist/esm/components/HelpText/HelpText.js +1 -2
  27. package/dist/esm/components/SkipLink/SkipLink.js +1 -2
  28. package/dist/esm/components/Table/TableHeaderCell.js +1 -2
  29. package/dist/esm/components/Typography/Ingress/Ingress.js +2 -3
  30. package/dist/esm/components/form/CharacterCounter.js +1 -2
  31. package/dist/esm/components/form/Combobox/internal/ComboboxClearButton.js +1 -2
  32. package/dist/esm/components/form/Combobox/internal/ComboboxLabel.js +1 -2
  33. package/dist/esm/components/form/Fieldset/Fieldset.js +1 -2
  34. package/dist/esm/components/form/NativeSelect/NativeSelect.js +1 -2
  35. package/dist/esm/components/form/Search/Search.js +1 -2
  36. package/dist/esm/components/form/Textarea/Textarea.js +1 -2
  37. package/dist/esm/components/form/Textfield/Textfield.js +1 -2
  38. package/dist/esm/react-css-modules.css +2 -102
  39. package/dist/types/components/Accordion/AccordionHeader/AccordionHeader.d.ts.map +1 -1
  40. package/dist/types/components/Button/Button.d.ts +1 -1
  41. package/dist/types/components/Button/Button.d.ts.map +1 -1
  42. package/dist/types/components/Card/Card.d.ts.map +1 -1
  43. package/dist/types/components/Chip/Removable/Removable.d.ts.map +1 -1
  44. package/dist/types/components/Chip/Toggle/Toggle.d.ts.map +1 -1
  45. package/dist/types/components/DropdownMenu/DropdownMenuTrigger.d.ts +1 -1
  46. package/dist/types/components/ErrorSummary/ErrorSummaryItem.d.ts.map +1 -1
  47. package/dist/types/components/HelpText/HelpText.d.ts.map +1 -1
  48. package/dist/types/components/Modal/ModalTrigger/ModalTrigger.d.ts +1 -1
  49. package/dist/types/components/Popover/PopoverTrigger.d.ts +1 -1
  50. package/dist/types/components/SkipLink/SkipLink.d.ts.map +1 -1
  51. package/dist/types/components/Table/TableHeaderCell.d.ts.map +1 -1
  52. package/dist/types/components/Typography/Ingress/Ingress.d.ts +4 -2
  53. package/dist/types/components/Typography/Ingress/Ingress.d.ts.map +1 -1
  54. package/dist/types/components/form/CharacterCounter.d.ts.map +1 -1
  55. package/dist/types/components/form/Combobox/internal/ComboboxClearButton.d.ts.map +1 -1
  56. package/dist/types/components/form/Combobox/internal/ComboboxLabel.d.ts.map +1 -1
  57. package/dist/types/components/form/Fieldset/Fieldset.d.ts.map +1 -1
  58. package/dist/types/components/form/NativeSelect/NativeSelect.d.ts.map +1 -1
  59. package/dist/types/components/form/Search/Search.d.ts.map +1 -1
  60. package/dist/types/components/form/Textarea/Textarea.d.ts.map +1 -1
  61. package/dist/types/components/form/Textfield/Textfield.d.ts.map +1 -1
  62. package/package.json +2 -2
  63. package/dist/cjs/components/Typography/Ingress/Ingress.module.css.js +0 -6
  64. package/dist/cjs/utilities/utility.module.css.js +0 -6
  65. package/dist/esm/components/Typography/Ingress/Ingress.module.css.js +0 -4
  66. package/dist/esm/utilities/utility.module.css.js +0 -4
@@ -6,7 +6,6 @@ var akselIcons = require('@navikt/aksel-icons');
6
6
  var clsx = require('../../../node_modules/clsx/dist/clsx.js');
7
7
  var React = require('react');
8
8
  var Accordion_module = require('../Accordion.module.css.js');
9
- var utility_module = require('../../../utilities/utility.module.css.js');
10
9
  var AccordionItem = require('../AccordionItem/AccordionItem.js');
11
10
  var Heading = require('../../Typography/Heading/Heading.js');
12
11
  var Paragraph = require('../../Typography/Paragraph/Paragraph.js');
@@ -21,7 +20,7 @@ const AccordionHeader = React.forwardRef(({ level = 1, children, className, onHe
21
20
  context.toggleOpen();
22
21
  onHeaderClick && onHeaderClick(e);
23
22
  };
24
- return (jsxRuntime.jsx(Heading.Heading, { ref: ref, size: 'xsmall', level: level, className: clsx.clsx(Accordion_module.header, className), ...rest, children: jsxRuntime.jsxs("button", { type: 'button', className: clsx.clsx(Accordion_module.accordionButton, utility_module.focusable), onClick: handleClick, "aria-expanded": context.open, "aria-controls": context.contentId, children: [jsxRuntime.jsx(akselIcons.ChevronDownIcon, { "aria-hidden": true, className: Accordion_module.expandIcon, fontSize: '1.5rem' }), jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: 'small', children: jsxRuntime.jsx("span", { children: children }) })] }) }));
23
+ return (jsxRuntime.jsx(Heading.Heading, { ref: ref, size: 'xsmall', level: level, className: clsx.clsx(Accordion_module.header, className), ...rest, children: jsxRuntime.jsxs("button", { type: 'button', className: clsx.clsx(Accordion_module.accordionButton, `fds-focus`), onClick: handleClick, "aria-expanded": context.open, "aria-controls": context.contentId, children: [jsxRuntime.jsx(akselIcons.ChevronDownIcon, { "aria-hidden": true, className: Accordion_module.expandIcon, fontSize: '1.5rem' }), jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: 'small', children: jsxRuntime.jsx("span", { children: children }) })] }) }));
25
24
  });
26
25
  AccordionHeader.displayName = 'AccordionHeader';
27
26
 
@@ -5,7 +5,6 @@ var jsxRuntime = require('react/jsx-runtime');
5
5
  var React = require('react');
6
6
  var clsx = require('../../node_modules/clsx/dist/clsx.js');
7
7
  var index = require('../../node_modules/@radix-ui/react-slot/dist/index.js');
8
- var utility_module = require('../../utilities/utility.module.css.js');
9
8
  var Button_module = require('./Button.module.css.js');
10
9
 
11
10
  /**
@@ -13,7 +12,7 @@ var Button_module = require('./Button.module.css.js');
13
12
  */
14
13
  const Button = React.forwardRef(({ children, color = 'first', variant = 'primary', size = 'medium', fullWidth = false, icon = false, type = 'button', className, as = 'button', asChild, ...rest }, ref) => {
15
14
  const Component = asChild ? index.Slot : as;
16
- return (jsxRuntime.jsx(Component, { ref: ref, type: type, className: clsx.clsx(Button_module.button, utility_module.focusable, Button_module[size], Button_module[variant], Button_module[color], { [Button_module.fullWidth]: fullWidth }, { [Button_module.onlyIcon]: icon }, className), ...rest, children: children }));
15
+ return (jsxRuntime.jsx(Component, { ref: ref, type: type, className: clsx.clsx(Button_module.button, `fds-focus`, Button_module[size], Button_module[variant], Button_module[color], { [Button_module.fullWidth]: fullWidth }, { [Button_module.onlyIcon]: icon }, className), ...rest, children: children }));
17
16
  });
18
17
  Button.displayName = 'Button';
19
18
 
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  'use strict';
3
3
 
4
- var classes = {"button":"fds-button-button-8fa00f0f","small":"fds-button-small-8fa00f0f","medium":"fds-button-medium-8fa00f0f","large":"fds-button-large-8fa00f0f","fullWidth":"fds-button-fullWidth-8fa00f0f","secondary":"fds-button-secondary-8fa00f0f","tertiary":"fds-button-tertiary-8fa00f0f","onlyIcon":"fds-button-onlyIcon-8fa00f0f","primary":"fds-button-primary-8fa00f0f","first":"fds-button-first-8fa00f0f","second":"fds-button-second-8fa00f0f","success":"fds-button-success-8fa00f0f","danger":"fds-button-danger-8fa00f0f","inverted":"fds-button-inverted-8fa00f0f"};
4
+ var classes = {"button":"fds-button-button-8fa00f0f","small":"fds-button-small-8fa00f0f","medium":"fds-button-medium-8fa00f0f","large":"fds-button-large-8fa00f0f","fullWidth":"fds-button-fullWidth-8fa00f0f","secondary":"fds-button-secondary-8fa00f0f","tertiary":"fds-button-tertiary-8fa00f0f","onlyIcon":"fds-button-onlyIcon-8fa00f0f","primary":"fds-button-primary-8fa00f0f","first":"fds-button-first-8fa00f0f","second":"fds-button-second-8fa00f0f","success":"fds-button-success-8fa00f0f","danger":"fds-button-danger-8fa00f0f"};
5
5
 
6
6
  module.exports = classes;
@@ -5,12 +5,11 @@ var jsxRuntime = require('react/jsx-runtime');
5
5
  var React = require('react');
6
6
  var clsx = require('../../node_modules/clsx/dist/clsx.js');
7
7
  var index = require('../../node_modules/@radix-ui/react-slot/dist/index.js');
8
- var utility_module = require('../../utilities/utility.module.css.js');
9
8
  var Card_module = require('./Card.module.css.js');
10
9
 
11
10
  const Card = React.forwardRef(({ color = 'neutral', as = 'div', isLink = false, asChild = false, className, ...rest }, ref) => {
12
11
  const Component = asChild ? index.Slot : as;
13
- return (jsxRuntime.jsx(Component, { ref: ref, className: clsx.clsx(Card_module.card, Card_module[color], isLink && Card_module.linkCard, isLink && utility_module.focusable, className), ...rest }));
12
+ return (jsxRuntime.jsx(Component, { ref: ref, className: clsx.clsx(Card_module.card, Card_module[color], isLink && Card_module.linkCard, isLink && `fds-focus`, className), ...rest }));
14
13
  });
15
14
  Card.displayName = 'Card';
16
15
 
@@ -7,12 +7,11 @@ var clsx = require('../../../node_modules/clsx/dist/clsx.js');
7
7
  var akselIcons = require('@navikt/aksel-icons');
8
8
  var Chip_module = require('../Chip.module.css.js');
9
9
  var Group = require('../Group/Group.js');
10
- var utility_module = require('../../../utilities/utility.module.css.js');
11
10
  var Paragraph = require('../../Typography/Paragraph/Paragraph.js');
12
11
 
13
12
  const RemovableChip = React.forwardRef(({ children, size = 'medium', className, ...rest }, ref) => {
14
13
  const group = React.useContext(Group.ChipGroupContext);
15
- return (jsxRuntime.jsx("button", { type: 'button', ref: ref, className: clsx.clsx(Chip_module.chipButton, utility_module.focusable, Chip_module[group?.size || size], Chip_module.removable, className), ...rest, children: jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: group?.size || size, short: true, children: jsxRuntime.jsxs("span", { className: Chip_module.label, children: [jsxRuntime.jsx("span", { children: children }), jsxRuntime.jsx("span", { className: Chip_module.xMark, "aria-hidden": true, children: jsxRuntime.jsx(akselIcons.XMarkIcon, { className: Chip_module.icon }) })] }) }) }));
14
+ return (jsxRuntime.jsx("button", { type: 'button', ref: ref, className: clsx.clsx(Chip_module.chipButton, `fds-focus`, Chip_module[group?.size || size], Chip_module.removable, className), ...rest, children: jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: group?.size || size, short: true, children: jsxRuntime.jsxs("span", { className: Chip_module.label, children: [jsxRuntime.jsx("span", { children: children }), jsxRuntime.jsx("span", { className: Chip_module.xMark, "aria-hidden": true, children: jsxRuntime.jsx(akselIcons.XMarkIcon, { className: Chip_module.icon }) })] }) }) }));
16
15
  });
17
16
  RemovableChip.displayName = 'ChipRemovable';
18
17
 
@@ -6,14 +6,13 @@ var React = require('react');
6
6
  var akselIcons = require('@navikt/aksel-icons');
7
7
  var clsx = require('../../../node_modules/clsx/dist/clsx.js');
8
8
  var Group = require('../Group/Group.js');
9
- var utility_module = require('../../../utilities/utility.module.css.js');
10
9
  var Chip_module = require('../Chip.module.css.js');
11
10
  var Paragraph = require('../../Typography/Paragraph/Paragraph.js');
12
11
 
13
12
  const ToggleChip = React.forwardRef(({ children, size = 'medium', selected = false, checkmark = true, className, ...rest }, ref) => {
14
13
  const shouldDisplayCheckmark = checkmark && selected;
15
14
  const group = React.useContext(Group.ChipGroupContext);
16
- return (jsxRuntime.jsx("button", { ref: ref, type: 'button', "aria-pressed": selected, className: clsx.clsx(Chip_module.chipButton, utility_module.focusable, Chip_module[group?.size || size], { [Chip_module.spacing]: shouldDisplayCheckmark }, className), ...rest, children: jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: group?.size || size, short: true, children: jsxRuntime.jsxs("span", { className: Chip_module.label, children: [shouldDisplayCheckmark && (jsxRuntime.jsx(akselIcons.CheckmarkIcon, { className: Chip_module.checkmarkIcon, "aria-hidden": true })), jsxRuntime.jsx("span", { children: children })] }) }) }));
15
+ return (jsxRuntime.jsx("button", { ref: ref, type: 'button', "aria-pressed": selected, className: clsx.clsx(Chip_module.chipButton, `fds-focus`, Chip_module[group?.size || size], { [Chip_module.spacing]: shouldDisplayCheckmark }, className), ...rest, children: jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: group?.size || size, short: true, children: jsxRuntime.jsxs("span", { className: Chip_module.label, children: [shouldDisplayCheckmark && (jsxRuntime.jsx(akselIcons.CheckmarkIcon, { className: Chip_module.checkmarkIcon, "aria-hidden": true })), jsxRuntime.jsx("span", { children: children })] }) }) }));
17
16
  });
18
17
  ToggleChip.displayName = 'ChipToggle';
19
18
 
@@ -5,13 +5,12 @@ var jsxRuntime = require('react/jsx-runtime');
5
5
  var React = require('react');
6
6
  var clsx = require('../../node_modules/clsx/dist/clsx.js');
7
7
  var index = require('../Popover/index.js');
8
- var utility_module = require('../../utilities/utility.module.css.js');
9
8
  var HelpText_module = require('./HelpText.module.css.js');
10
9
  var HelpTextIcon = require('./HelpTextIcon.js');
11
10
 
12
11
  const HelpText = ({ title, placement = 'right', size = 'medium', portal, className, children, ...rest }) => {
13
12
  const [open, setOpen] = React.useState(false);
14
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(index.Popover, { variant: 'info', placement: placement, size: size, portal: portal, open: open, onClose: () => setOpen(false), children: [jsxRuntime.jsx(index.Popover.Trigger, { asChild: true, variant: 'tertiary', children: jsxRuntime.jsxs("button", { className: clsx.clsx(HelpText_module.helpTextButton, utility_module.focusable, className), "aria-expanded": open, onClick: () => setOpen(!open), ...rest, children: [jsxRuntime.jsx(HelpTextIcon.HelpTextIcon, { filled: true, className: clsx.clsx(HelpText_module.helpTextIcon, HelpText_module.helpTextIconFilled, HelpText_module[size], className), openState: open }), jsxRuntime.jsx(HelpTextIcon.HelpTextIcon, { className: clsx.clsx(HelpText_module.helpTextIcon, HelpText_module[size], className), openState: open }), jsxRuntime.jsx("span", { className: utility_module.visuallyHidden, children: title })] }) }), jsxRuntime.jsx(index.Popover.Content, { className: HelpText_module.helpTextContent, children: children })] }) }));
13
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(index.Popover, { variant: 'info', placement: placement, size: size, portal: portal, open: open, onClose: () => setOpen(false), children: [jsxRuntime.jsx(index.Popover.Trigger, { asChild: true, variant: 'tertiary', children: jsxRuntime.jsxs("button", { className: clsx.clsx(HelpText_module.helpTextButton, `fds-focus`, className), "aria-expanded": open, onClick: () => setOpen(!open), ...rest, children: [jsxRuntime.jsx(HelpTextIcon.HelpTextIcon, { filled: true, className: clsx.clsx(HelpText_module.helpTextIcon, HelpText_module.helpTextIconFilled, HelpText_module[size], className), openState: open }), jsxRuntime.jsx(HelpTextIcon.HelpTextIcon, { className: clsx.clsx(HelpText_module.helpTextIcon, HelpText_module[size], className), openState: open }), jsxRuntime.jsx("span", { className: `fds-sr-only`, children: title })] }) }), jsxRuntime.jsx(index.Popover.Content, { className: HelpText_module.helpTextContent, children: children })] }) }));
15
14
  };
16
15
  HelpText.displayName = 'HelpText';
17
16
 
@@ -3,11 +3,10 @@
3
3
 
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
  var clsx = require('../../node_modules/clsx/dist/clsx.js');
6
- var utility_module = require('../../utilities/utility.module.css.js');
7
6
  var SkipLink_module = require('./SkipLink.module.css.js');
8
7
 
9
8
  const SkipLink = ({ href, children, className, ...rest }) => {
10
- return (jsxRuntime.jsx("a", { href: href, className: clsx.clsx(utility_module.visuallyHidden, SkipLink_module.skiplink, className), ...rest, children: children }));
9
+ return (jsxRuntime.jsx("a", { href: href, className: clsx.clsx(`fds-sr-only`, SkipLink_module.skiplink, className), ...rest, children: children }));
11
10
  };
12
11
  SkipLink.displayName = 'SkipLink';
13
12
 
@@ -5,7 +5,6 @@ var jsxRuntime = require('react/jsx-runtime');
5
5
  var akselIcons = require('@navikt/aksel-icons');
6
6
  var React = require('react');
7
7
  var clsx = require('../../node_modules/clsx/dist/clsx.js');
8
- var utility_module = require('../../utilities/utility.module.css.js');
9
8
  var Table_module = require('./Table.module.css.js');
10
9
 
11
10
  function _interopNamespaceDefault(e) {
@@ -33,7 +32,7 @@ const SORT_ICON = {
33
32
  };
34
33
  const TableHeaderCell = React__namespace.forwardRef(({ sortable = false, sort, onSortClick, className, children, ...rest }, ref) => {
35
34
  const sortIcon = sort === 'ascending' || sort === 'descending' ? (SORT_ICON[sort]) : (jsxRuntime.jsx(akselIcons.ChevronUpDownIcon, {}));
36
- return (jsxRuntime.jsxs("th", { className: clsx.clsx(sortable && Table_module.sortable, sort && Table_module.sorted, Table_module.headerCell, className), "aria-sort": sort, ref: ref, ...rest, children: [sortable && (jsxRuntime.jsxs("button", { className: utility_module.focusable, onClick: onSortClick, children: [children, sortIcon] })), !sortable && children] }));
35
+ return (jsxRuntime.jsxs("th", { className: clsx.clsx(sortable && Table_module.sortable, sort && Table_module.sorted, Table_module.headerCell, className), "aria-sort": sort, ref: ref, ...rest, children: [sortable && (jsxRuntime.jsxs("button", { className: `fds-focus`, onClick: onSortClick, children: [children, sortIcon] })), !sortable && children] }));
37
36
  });
38
37
  TableHeaderCell.displayName = 'TableHeaderCell';
39
38
 
@@ -5,13 +5,12 @@ var jsxRuntime = require('react/jsx-runtime');
5
5
  var React = require('react');
6
6
  var clsx = require('../../../node_modules/clsx/dist/clsx.js');
7
7
  var index = require('../../../node_modules/@radix-ui/react-slot/dist/index.js');
8
- var Ingress_module = require('./Ingress.module.css.js');
9
8
 
10
9
  /** Use `Ingress` to display text as ingress. */
11
10
  const Ingress = React.forwardRef(({ className, size = 'medium', spacing, as = 'p', asChild, ...rest }, ref) => {
12
11
  const Component = asChild ? index.Slot : as;
13
- return (jsxRuntime.jsx(Component, { ref: ref, className: clsx.clsx(Ingress_module.ingress, Ingress_module[size], {
14
- [Ingress_module.spacing]: !!spacing,
12
+ return (jsxRuntime.jsx(Component, { ref: ref, className: clsx.clsx(`fds-ingress`, `fds-ingress--${size}`, {
13
+ 'fds-ingress--spacing': !!spacing,
15
14
  }, className), ...rest }));
16
15
  });
17
16
  Ingress.displayName = 'Ingress';
@@ -2,7 +2,6 @@
2
2
  'use strict';
3
3
 
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
- var utility_module = require('../../utilities/utility.module.css.js');
6
5
  var ErrorMessage = require('../Typography/ErrorMessage/ErrorMessage.js');
7
6
 
8
7
  const defaultLabel = (count) => count > -1 ? `${count} tegn igjen` : `${Math.abs(count)} tegn for mye`;
@@ -11,7 +10,7 @@ const CharacterCounter = ({ label = defaultLabel, srLabel: propsSrLabel, maxCoun
11
10
  const currentCount = maxCount - value.length;
12
11
  const hasExceededLimit = value.length > maxCount;
13
12
  const srLabel = propsSrLabel ? propsSrLabel : defaultSrLabel(maxCount);
14
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { className: utility_module.visuallyHidden, id: id, children: srLabel }), jsxRuntime.jsx(ErrorMessage.ErrorMessage, { asChild: true, size: size, error: hasExceededLimit, children: jsxRuntime.jsx("span", { "aria-live": hasExceededLimit ? 'polite' : 'off', children: label(currentCount) }) })] }));
13
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { className: `fds-sr-only`, id: id, children: srLabel }), jsxRuntime.jsx(ErrorMessage.ErrorMessage, { asChild: true, size: size, error: hasExceededLimit, children: jsxRuntime.jsx("span", { "aria-live": hasExceededLimit ? 'polite' : 'off', children: label(currentCount) }) })] }));
15
14
  };
16
15
  CharacterCounter.displayName = 'CharacterCounter';
17
16
 
@@ -9,7 +9,6 @@ var akselIcons = require('@navikt/aksel-icons');
9
9
  var clsx = require('../../../../node_modules/clsx/dist/clsx.js');
10
10
  var Combobox = require('../Combobox.js');
11
11
  var Combobox_module = require('../Combobox.module.css.js');
12
- var utility_module = require('../../../../utilities/utility.module.css.js');
13
12
 
14
13
  const ComboboxClearButton = () => {
15
14
  const context = React.useContext(Combobox.ComboboxContext);
@@ -17,7 +16,7 @@ const ComboboxClearButton = () => {
17
16
  throw new Error('ComboboxContext is missing');
18
17
  }
19
18
  const { size, readOnly, disabled, clearButtonLabel, inputRef, setSelectedOptions, setInputValue, } = context;
20
- return (jsxRuntime.jsx("button", { disabled: disabled, className: clsx.clsx(Combobox_module.clearButton, Combobox_module[size], utility_module.focusable), onClick: () => {
19
+ return (jsxRuntime.jsx("button", { disabled: disabled, className: clsx.clsx(Combobox_module.clearButton, Combobox_module[size], `fds-focus`), onClick: () => {
21
20
  if (readOnly)
22
21
  return;
23
22
  if (disabled)
@@ -7,12 +7,11 @@ var jsxRuntime = require('react/jsx-runtime');
7
7
  var clsx = require('../../../../node_modules/clsx/dist/clsx.js');
8
8
  var akselIcons = require('@navikt/aksel-icons');
9
9
  var Combobox_module = require('../Combobox.module.css.js');
10
- var utility_module = require('../../../../utilities/utility.module.css.js');
11
10
  var Label = require('../../../Typography/Label/Label.js');
12
11
  var Paragraph = require('../../../Typography/Paragraph/Paragraph.js');
13
12
 
14
13
  const ComboboxLabel = ({ label, description, hideLabel, size, readOnly, formFieldProps, }) => {
15
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [label && (jsxRuntime.jsxs(Label.Label, { size: size, htmlFor: formFieldProps.inputProps.id, className: clsx.clsx(Combobox_module.label, hideLabel && utility_module.visuallyHidden), children: [readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { "aria-hidden": true, className: Combobox_module.padlock })), label] })), description && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsx("div", { id: formFieldProps.descriptionId, className: clsx.clsx(Combobox_module.description, hideLabel && utility_module.visuallyHidden), children: description }) }))] }));
14
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [label && (jsxRuntime.jsxs(Label.Label, { size: size, htmlFor: formFieldProps.inputProps.id, className: clsx.clsx(Combobox_module.label, hideLabel && `fds-sr-only`), children: [readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { "aria-hidden": true, className: Combobox_module.padlock })), label] })), description && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsx("div", { id: formFieldProps.descriptionId, className: clsx.clsx(Combobox_module.description, hideLabel && `fds-sr-only`), children: description }) }))] }));
16
15
  };
17
16
  ComboboxLabel.displayName = 'ComboboxLabel';
18
17
  var ComboboxLabel$1 = ComboboxLabel;
@@ -5,7 +5,6 @@ var jsxRuntime = require('react/jsx-runtime');
5
5
  var React = require('react');
6
6
  var clsx = require('../../../node_modules/clsx/dist/clsx.js');
7
7
  var akselIcons = require('@navikt/aksel-icons');
8
- var utility_module = require('../../../utilities/utility.module.css.js');
9
8
  var useFieldset = require('./useFieldset.js');
10
9
  var Fieldset_module = require('./Fieldset.module.css.js');
11
10
  var FieldsetContext = require('./FieldsetContext.js');
@@ -23,7 +22,7 @@ const Fieldset = React.forwardRef((props, ref) => {
23
22
  size,
24
23
  disabled: props?.disabled,
25
24
  readOnly,
26
- }, children: jsxRuntime.jsxs("fieldset", { ...fieldsetProps, className: clsx.clsx(Fieldset_module.fieldset, !hideLegend && Fieldset_module.withSpacing, readOnly && Fieldset_module.readonly, props?.disabled && Fieldset_module.disabled, className), ref: ref, ...rest, children: [jsxRuntime.jsx(Label.Label, { asChild: true, size: size, children: jsxRuntime.jsx("legend", { className: Fieldset_module.legend, children: jsxRuntime.jsxs("span", { className: clsx.clsx(Fieldset_module.legendContent, hideLegend && utility_module.visuallyHidden), children: [readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { className: Fieldset_module.padlock, "aria-hidden": true })), legend] }) }) }), description && (jsxRuntime.jsx(Paragraph.Paragraph, { size: size, asChild: true, short: true, children: jsxRuntime.jsx("div", { id: descriptionId, className: clsx.clsx(Fieldset_module.description, hideLegend && utility_module.visuallyHidden), children: description }) })), children, jsxRuntime.jsx("div", { id: errorId, "aria-live": 'polite', "aria-relevant": 'additions removals', className: Fieldset_module.errorWrapper, children: hasError && jsxRuntime.jsx(ErrorMessage.ErrorMessage, { size: size, children: error }) })] }) }));
25
+ }, children: jsxRuntime.jsxs("fieldset", { ...fieldsetProps, className: clsx.clsx(Fieldset_module.fieldset, !hideLegend && Fieldset_module.withSpacing, readOnly && Fieldset_module.readonly, props?.disabled && Fieldset_module.disabled, className), ref: ref, ...rest, children: [jsxRuntime.jsx(Label.Label, { asChild: true, size: size, children: jsxRuntime.jsx("legend", { className: Fieldset_module.legend, children: jsxRuntime.jsxs("span", { className: clsx.clsx(Fieldset_module.legendContent, hideLegend && `fds-sr-only`), children: [readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { className: Fieldset_module.padlock, "aria-hidden": true })), legend] }) }) }), description && (jsxRuntime.jsx(Paragraph.Paragraph, { size: size, asChild: true, short: true, children: jsxRuntime.jsx("div", { id: descriptionId, className: clsx.clsx(Fieldset_module.description, hideLegend && `fds-sr-only`), children: description }) })), children, jsxRuntime.jsx("div", { id: errorId, "aria-live": 'polite', "aria-relevant": 'additions removals', className: Fieldset_module.errorWrapper, children: hasError && jsxRuntime.jsx(ErrorMessage.ErrorMessage, { size: size, children: error }) })] }) }));
27
26
  });
28
27
  Fieldset.displayName = 'Fieldset';
29
28
 
@@ -6,7 +6,6 @@ var React = require('react');
6
6
  var clsx = require('../../../node_modules/clsx/dist/clsx.js');
7
7
  var akselIcons = require('@navikt/aksel-icons');
8
8
  var NativeSelect_module = require('./NativeSelect.module.css.js');
9
- var utility_module = require('../../../utilities/utility.module.css.js');
10
9
  var useNativeSelect = require('./useNativeSelect.js');
11
10
  var Label = require('../../Typography/Label/Label.js');
12
11
  var objectUtils = require('../../../utilities/objectUtils.js');
@@ -16,7 +15,7 @@ var Paragraph = require('../../Typography/Paragraph/Paragraph.js');
16
15
  const NativeSelect = React.forwardRef((props, ref) => {
17
16
  const { children, disabled = false, label, hideLabel = false, error, className, htmlSize = 0, ...rest } = props;
18
17
  const { selectProps, errorId, readOnly = false, size = 'medium', } = useNativeSelect.useNativeSelect(props);
19
- return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { className: clsx.clsx(NativeSelect_module.formField, disabled && NativeSelect_module.disabled, readOnly && NativeSelect_module.readOnly, error && NativeSelect_module.error), children: [label && (jsxRuntime.jsxs(Label.Label, { weight: 'medium', size: size, htmlFor: selectProps.id, className: clsx.clsx(NativeSelect_module.label, hideLabel && utility_module.visuallyHidden), children: [readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { "aria-hidden": true, className: NativeSelect_module.padlock })), label] })), jsxRuntime.jsx("select", { disabled: disabled || readOnly, ref: ref, size: htmlSize, className: clsx.clsx(NativeSelect_module.select, NativeSelect_module[size], utility_module.focusable, props.multiple && NativeSelect_module.multiple, className), ...objectUtils.omit(['size', 'error', 'errorId'], rest), ...objectUtils.omit(['readOnly', 'disabled'], selectProps), children: children }), error && (jsxRuntime.jsx("div", { id: errorId, className: NativeSelect_module.errorMessage, "aria-live": 'polite', "aria-relevant": 'additions removals', children: jsxRuntime.jsx(ErrorMessage.ErrorMessage, { size: size, children: error }) }))] }) }));
18
+ return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { className: clsx.clsx(NativeSelect_module.formField, disabled && NativeSelect_module.disabled, readOnly && NativeSelect_module.readOnly, error && NativeSelect_module.error), children: [label && (jsxRuntime.jsxs(Label.Label, { weight: 'medium', size: size, htmlFor: selectProps.id, className: clsx.clsx(NativeSelect_module.label, hideLabel && 'fds-sr-only'), children: [readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { "aria-hidden": true, className: NativeSelect_module.padlock })), label] })), jsxRuntime.jsx("select", { disabled: disabled || readOnly, ref: ref, size: htmlSize, className: clsx.clsx(NativeSelect_module.select, NativeSelect_module[size], `fds-focus`, props.multiple && NativeSelect_module.multiple, className), ...objectUtils.omit(['size', 'error', 'errorId'], rest), ...objectUtils.omit(['readOnly', 'disabled'], selectProps), children: children }), error && (jsxRuntime.jsx("div", { id: errorId, className: NativeSelect_module.errorMessage, "aria-live": 'polite', "aria-relevant": 'additions removals', children: jsxRuntime.jsx(ErrorMessage.ErrorMessage, { size: size, children: error }) }))] }) }));
20
19
  });
21
20
  NativeSelect.displayName = 'NativeSelect';
22
21
 
@@ -8,7 +8,6 @@ var akselIcons = require('@navikt/aksel-icons');
8
8
  var floatingUi_react = require('../../../node_modules/@floating-ui/react/dist/floating-ui.react.js');
9
9
  var useSearch = require('./useSearch.js');
10
10
  var Search_module = require('./Search.module.css.js');
11
- var utility_module = require('../../../utilities/utility.module.css.js');
12
11
  var Button = require('../../Button/Button.js');
13
12
  var Paragraph = require('../../Typography/Paragraph/Paragraph.js');
14
13
  var Label = require('../../Typography/Label/Label.js');
@@ -43,7 +42,7 @@ const Search = React.forwardRef((props, ref) => {
43
42
  };
44
43
  const isSimple = variant === 'simple';
45
44
  const showClearButton = Boolean(value ?? internalValue) && !disabled;
46
- return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { style: style, className: clsx.clsx(Search_module.formField, inputProps.disabled && Search_module.disabled, Search_module[size], className), children: [label && (jsxRuntime.jsx(Label.Label, { size: size, weight: 'medium', htmlFor: inputProps.id, className: clsx.clsx(Search_module.label, hideLabel && utility_module.visuallyHidden), children: jsxRuntime.jsx("span", { children: label }) })), jsxRuntime.jsxs("div", { className: Search_module.field, children: [jsxRuntime.jsxs("div", { className: clsx.clsx(Search_module.field, Search_module[size]), children: [isSimple && (jsxRuntime.jsx(akselIcons.MagnifyingGlassIcon, { className: Search_module.icon, "aria-hidden": true })), jsxRuntime.jsx("input", { ref: mergedRef, size: htmlSize, value: value ?? internalValue, disabled: disabled, className: clsx.clsx(Search_module.input, utility_module.focusable, isSimple && Search_module.simple, !isSimple && Search_module.withSearchButton), ...objectUtils.omit(['size', 'error', 'errorId', 'readOnly'], rest), ...inputProps, onChange: handleChange }), showClearButton && (jsxRuntime.jsxs("button", { className: clsx.clsx(Search_module.clearButton, utility_module.focusable), type: 'button', onClick: handleClear, disabled: disabled, children: [jsxRuntime.jsx("span", { className: utility_module.visuallyHidden, children: clearButtonLabel }), jsxRuntime.jsx(akselIcons.XMarkIcon, { "aria-hidden": true })] }))] }), !isSimple && (jsxRuntime.jsx(Button.Button, { className: Search_module.searchButton, size: size, variant: variant, type: 'submit', onClick: handleSearchClick, disabled: disabled, children: searchButtonLabel }))] }), jsxRuntime.jsx("div", { className: Search_module.errorMessage, id: errorId, "aria-live": 'polite', "aria-relevant": 'additions removals', children: hasError && jsxRuntime.jsx(ErrorMessage.ErrorMessage, { size: size, children: props.error }) })] }) }));
45
+ return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { style: style, className: clsx.clsx(Search_module.formField, inputProps.disabled && Search_module.disabled, Search_module[size], className), children: [label && (jsxRuntime.jsx(Label.Label, { size: size, weight: 'medium', htmlFor: inputProps.id, className: clsx.clsx(Search_module.label, hideLabel && 'fds-sr-only'), children: jsxRuntime.jsx("span", { children: label }) })), jsxRuntime.jsxs("div", { className: Search_module.field, children: [jsxRuntime.jsxs("div", { className: clsx.clsx(Search_module.field, Search_module[size]), children: [isSimple && (jsxRuntime.jsx(akselIcons.MagnifyingGlassIcon, { className: Search_module.icon, "aria-hidden": true })), jsxRuntime.jsx("input", { ref: mergedRef, size: htmlSize, value: value ?? internalValue, disabled: disabled, className: clsx.clsx(Search_module.input, `fds-focus`, isSimple && Search_module.simple, !isSimple && Search_module.withSearchButton), ...objectUtils.omit(['size', 'error', 'errorId', 'readOnly'], rest), ...inputProps, onChange: handleChange }), showClearButton && (jsxRuntime.jsxs("button", { className: clsx.clsx(Search_module.clearButton, `fds-focus`), type: 'button', onClick: handleClear, disabled: disabled, children: [jsxRuntime.jsx("span", { className: `fds-sr-only`, children: clearButtonLabel }), jsxRuntime.jsx(akselIcons.XMarkIcon, { "aria-hidden": true })] }))] }), !isSimple && (jsxRuntime.jsx(Button.Button, { className: Search_module.searchButton, size: size, variant: variant, type: 'submit', onClick: handleSearchClick, disabled: disabled, children: searchButtonLabel }))] }), jsxRuntime.jsx("div", { className: Search_module.errorMessage, id: errorId, "aria-live": 'polite', "aria-relevant": 'additions removals', children: hasError && jsxRuntime.jsx(ErrorMessage.ErrorMessage, { size: size, children: props.error }) })] }) }));
47
46
  });
48
47
  Search.displayName = 'Search';
49
48
 
@@ -8,7 +8,6 @@ var akselIcons = require('@navikt/aksel-icons');
8
8
  var CharacterCounter = require('../CharacterCounter.js');
9
9
  var useTextarea = require('./useTextarea.js');
10
10
  var Textarea_module = require('./Textarea.module.css.js');
11
- var utility_module = require('../../../utilities/utility.module.css.js');
12
11
  var Paragraph = require('../../Typography/Paragraph/Paragraph.js');
13
12
  var Label = require('../../Typography/Label/Label.js');
14
13
  var objectUtils = require('../../../utilities/objectUtils.js');
@@ -28,7 +27,7 @@ const Textarea = React.forwardRef((props, ref) => {
28
27
  const characterLimitId = `${textareaProps.id}-charactercount}`;
29
28
  const hasCharacterLimit = characterLimit != null;
30
29
  const describedBy = clsx.clsx(textareaProps['aria-describedby'], hasCharacterLimit && characterLimitId) || undefined;
31
- return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { style: style, className: clsx.clsx(Textarea_module.formField, textareaProps.disabled && Textarea_module.disabled, readOnly && Textarea_module.readonly, className), children: [label && (jsxRuntime.jsxs(Label.Label, { size: size, weight: 'medium', htmlFor: textareaProps.id, className: clsx.clsx(Textarea_module.label, hideLabel && utility_module.visuallyHidden), children: [readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { "aria-hidden": true, className: Textarea_module.padlock })), jsxRuntime.jsx("span", { children: label })] })), description && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsx("div", { id: descriptionId, className: clsx.clsx(Textarea_module.description, hideLabel && utility_module.visuallyHidden), children: description }) })), jsxRuntime.jsx("textarea", { className: clsx.clsx(Textarea_module.textarea, utility_module.focusable, Textarea_module[size]), ref: ref, "aria-describedby": describedBy, ...objectUtils.omit(['size', 'error', 'errorId'], rest), ...textareaProps, onChange: (e) => {
30
+ return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { style: style, className: clsx.clsx(Textarea_module.formField, textareaProps.disabled && Textarea_module.disabled, readOnly && Textarea_module.readonly, hasError && Textarea_module.error, className), children: [label && (jsxRuntime.jsxs(Label.Label, { size: size, weight: 'medium', htmlFor: textareaProps.id, className: clsx.clsx(Textarea_module.label, hideLabel && `fds-sr-only`), children: [readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { "aria-hidden": true, className: Textarea_module.padlock })), jsxRuntime.jsx("span", { children: label })] })), description && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsx("div", { id: descriptionId, className: clsx.clsx(Textarea_module.description, hideLabel && `fds-sr-only`), children: description }) })), jsxRuntime.jsx("textarea", { className: clsx.clsx(Textarea_module.textarea, `fds-focus`, Textarea_module[size]), ref: ref, "aria-describedby": describedBy, ...objectUtils.omit(['size', 'error', 'errorId'], rest), ...textareaProps, onChange: (e) => {
32
31
  textareaProps?.onChange?.(e);
33
32
  setValue(e.target.value);
34
33
  } }), hasCharacterLimit && (jsxRuntime.jsx(CharacterCounter.CharacterCounter, { size: size, value: value ? value.toString() : '', id: characterLimitId, ...characterLimit })), jsxRuntime.jsx("div", { className: Textarea_module.errorMessage, id: errorId, "aria-live": 'polite', "aria-relevant": 'additions removals', children: hasError && jsxRuntime.jsx(ErrorMessage.ErrorMessage, { size: size, children: props.error }) })] }) }));
@@ -8,7 +8,6 @@ var akselIcons = require('@navikt/aksel-icons');
8
8
  var CharacterCounter = require('../CharacterCounter.js');
9
9
  var useTextfield = require('./useTextfield.js');
10
10
  var Textfield_module = require('./Textfield.module.css.js');
11
- var utility_module = require('../../../utilities/utility.module.css.js');
12
11
  var Paragraph = require('../../Typography/Paragraph/Paragraph.js');
13
12
  var Label = require('../../Typography/Label/Label.js');
14
13
  var objectUtils = require('../../../utilities/objectUtils.js');
@@ -28,7 +27,7 @@ const Textfield = React.forwardRef((props, ref) => {
28
27
  const characterLimitId = `textfield-charactercount-${React.useId()}`;
29
28
  const hasCharacterLimit = characterLimit != null;
30
29
  const describedBy = clsx.clsx(inputProps['aria-describedby'], hasCharacterLimit && characterLimitId) || undefined;
31
- return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { style: style, className: clsx.clsx(Textfield_module.formField, Textfield_module[size], inputProps.disabled && Textfield_module.disabled, readOnly && Textfield_module.readonly, className), children: [label && (jsxRuntime.jsxs(Label.Label, { size: size, weight: 'medium', htmlFor: inputProps.id, className: clsx.clsx(Textfield_module.label, hideLabel && utility_module.visuallyHidden), children: [readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { "aria-hidden": true, className: Textfield_module.padlock })), jsxRuntime.jsx("span", { children: label })] })), description && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsx("div", { id: descriptionId, className: clsx.clsx(Textfield_module.description, hideLabel && utility_module.visuallyHidden), children: description }) })), jsxRuntime.jsxs("div", { className: clsx.clsx(Textfield_module.field, hasError && Textfield_module.error), children: [prefix && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, short: true, children: jsxRuntime.jsx("div", { className: clsx.clsx(Textfield_module.adornment, Textfield_module.prefix), "aria-hidden": 'true', children: prefix }) })), jsxRuntime.jsx("input", { className: clsx.clsx(Textfield_module.input, Textfield_module[size], utility_module.focusable, prefix && Textfield_module.inputPrefix, suffix && Textfield_module.inputSuffix), ref: ref, type: type, "aria-describedby": describedBy, size: htmlSize, ...objectUtils.omit(['size', 'error', 'errorId'], rest), ...inputProps, onChange: (e) => {
30
+ return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { style: style, className: clsx.clsx(Textfield_module.formField, Textfield_module[size], inputProps.disabled && Textfield_module.disabled, readOnly && Textfield_module.readonly, className), children: [label && (jsxRuntime.jsxs(Label.Label, { size: size, weight: 'medium', htmlFor: inputProps.id, className: clsx.clsx(Textfield_module.label, hideLabel && `fds-sr-only`), children: [readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { "aria-hidden": true, className: Textfield_module.padlock })), jsxRuntime.jsx("span", { children: label })] })), description && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsx("div", { id: descriptionId, className: clsx.clsx(Textfield_module.description, hideLabel && `fds-sr-only`), children: description }) })), jsxRuntime.jsxs("div", { className: clsx.clsx(Textfield_module.field, hasError && Textfield_module.error), children: [prefix && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, short: true, children: jsxRuntime.jsx("div", { className: clsx.clsx(Textfield_module.adornment, Textfield_module.prefix), "aria-hidden": 'true', children: prefix }) })), jsxRuntime.jsx("input", { className: clsx.clsx(Textfield_module.input, Textfield_module[size], `fds-focus`, prefix && Textfield_module.inputPrefix, suffix && Textfield_module.inputSuffix), ref: ref, type: type, "aria-describedby": describedBy, size: htmlSize, ...objectUtils.omit(['size', 'error', 'errorId'], rest), ...inputProps, onChange: (e) => {
32
31
  inputProps?.onChange?.(e);
33
32
  setInputValue(e.target.value);
34
33
  } }), suffix && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, short: true, children: jsxRuntime.jsx("div", { className: clsx.clsx(Textfield_module.adornment, Textfield_module.suffix), "aria-hidden": 'true', children: suffix }) }))] }), hasCharacterLimit && (jsxRuntime.jsx(CharacterCounter.CharacterCounter, { size: size, value: inputValue ? inputValue.toString() : '', id: characterLimitId, ...characterLimit })), jsxRuntime.jsx("div", { className: Textfield_module.errorMessage, id: errorId, "aria-live": 'polite', "aria-relevant": 'additions removals', children: hasError && jsxRuntime.jsx(ErrorMessage.ErrorMessage, { size: size, children: props.error }) })] }) }));
@@ -1,30 +1,3 @@
1
- @layer fds.utilities {
2
- /**
3
- * Visually hide an element, but leave it available for screen readers
4
- */
5
- .fds-utility-visuallyHidden-1ed11112 {
6
- border: 0;
7
- clip: rect(0 0 0 0);
8
- height: 1px;
9
- overflow: hidden;
10
- padding: 0;
11
- position: absolute;
12
- white-space: nowrap;
13
- width: 1px;
14
- }
15
-
16
- /**
17
- * Apply a focus outline on an element when it is focused with keyboard
18
- */
19
- .fds-utility-focusable-1ed11112:focus-visible {
20
- --fds-focus-border-width: 3px;
21
-
22
- outline: var(--fds-focus-border-width) solid var(--fds-semantic-border-focus-outline);
23
- outline-offset: var(--fds-focus-border-width);
24
- box-shadow: 0 0 0 var(--fds-focus-border-width) var(--fds-semantic-border-focus-boxshadow);
25
- }
26
- }
27
-
28
1
  @layer fds.button {
29
2
  .fds-button-button-8fa00f0f {
30
3
  --fc-button-padding: 0 var(--fds-spacing-4);
@@ -134,12 +107,6 @@
134
107
  background-color: var(--fds-semantic-surface-danger-hover);
135
108
  }
136
109
 
137
- .fds-button-primary-8fa00f0f:where(.fds-button-inverted-8fa00f0f):not([aria-disabled='true'], :disabled):hover {
138
- --fc-button-color: var(--fds-semantic-text-neutral-default);
139
-
140
- background-color: var(--fds-semantic-surface-on_inverted-hover);
141
- }
142
-
143
110
  .fds-button-secondary-8fa00f0f:where(.fds-button-first-8fa00f0f):not([aria-disabled='true'], :disabled):hover {
144
111
  --fc-button-color: var(--fds-semantic-text-action-first-hover);
145
112
 
@@ -168,10 +135,6 @@
168
135
  background-color: var(--fds-semantic-surface-danger-no_fill-hover);
169
136
  }
170
137
 
171
- .fds-button-secondary-8fa00f0f:where(.fds-button-inverted-8fa00f0f):not([aria-disabled='true'], :disabled):hover {
172
- background-color: var(--fds-semantic-surface-on_inverted-no_fill-hover);
173
- }
174
-
175
138
  .fds-button-tertiary-8fa00f0f:where(.fds-button-first-8fa00f0f):not([aria-disabled='true'], :disabled):hover {
176
139
  --fc-button-color: var(--fds-semantic-text-action-first-hover);
177
140
 
@@ -195,12 +158,6 @@
195
158
 
196
159
  background-color: var(--fds-semantic-surface-danger-no_fill-hover);
197
160
  }
198
-
199
- .fds-button-tertiary-8fa00f0f:where(.fds-button-inverted-8fa00f0f):not([aria-disabled='true'], :disabled):hover {
200
- --fc-button-color: var(--fds-semantic-text-neutral-on_inverted);
201
-
202
- background-color: var(--fds-semantic-surface-on_inverted-no_fill-hover);
203
- }
204
161
  }
205
162
 
206
163
  /* Primary button colors */
@@ -220,12 +177,6 @@
220
177
  background-color: var(--fds-semantic-surface-danger-default);
221
178
  }
222
179
 
223
- .fds-button-primary-8fa00f0f:where(.fds-button-inverted-8fa00f0f) {
224
- --fc-button-color: var(--fds-semantic-text-neutral-default);
225
-
226
- background-color: var(--fds-semantic-surface-on_inverted-default);
227
- }
228
-
229
180
  .fds-button-primary-8fa00f0f:where(.fds-button-first-8fa00f0f):not([aria-disabled='true'], :disabled):active {
230
181
  background-color: var(--fds-semantic-surface-action-first-active);
231
182
  }
@@ -242,12 +193,6 @@
242
193
  background-color: var(--fds-semantic-surface-danger-active);
243
194
  }
244
195
 
245
- .fds-button-primary-8fa00f0f:where(.fds-button-inverted-8fa00f0f):not([aria-disabled='true'], :disabled):active {
246
- --fc-button-color: var(--fds-semantic-text-neutral-default);
247
-
248
- background-color: var(--fds-semantic-surface-on_inverted-active);
249
- }
250
-
251
196
  /* Secondary button colors */
252
197
  .fds-button-secondary-8fa00f0f:where(.fds-button-first-8fa00f0f) {
253
198
  --fc-button-color: var(--fds-semantic-text-action-first-default);
@@ -277,13 +222,6 @@
277
222
  background-color: var(--fds-semantic-surface-danger-no_fill);
278
223
  }
279
224
 
280
- .fds-button-secondary-8fa00f0f:where(.fds-button-inverted-8fa00f0f) {
281
- --fc-button-color: var(--fds-semantic-text-neutral-on_inverted);
282
-
283
- border: 1px solid var(--fds-semantic-border-on_inverted-default);
284
- background-color: transparent;
285
- }
286
-
287
225
  .fds-button-secondary-8fa00f0f:where(.fds-button-first-8fa00f0f):not([aria-disabled='true'], :disabled):active {
288
226
  --fc-button-color: var(--fds-semantic-text-action-first-active);
289
227
 
@@ -312,12 +250,6 @@
312
250
  background-color: var(--fds-semantic-surface-danger-no_fill-active);
313
251
  }
314
252
 
315
- .fds-button-secondary-8fa00f0f:where(.fds-button-inverted-8fa00f0f):not([aria-disabled='true'], :disabled):active {
316
- --fc-button-color: var(--fds-semantic-text-neutral-on_inverted);
317
-
318
- background-color: var(--fds-semantic-surface-on_inverted-no_fill-active);
319
- }
320
-
321
253
  /* Tertiary button colors */
322
254
  .fds-button-tertiary-8fa00f0f:where(.fds-button-first-8fa00f0f) {
323
255
  --fc-button-color: var(--fds-semantic-text-action-first-default);
@@ -335,12 +267,6 @@
335
267
  --fc-button-color: var(--fds-semantic-text-danger-default);
336
268
  }
337
269
 
338
- .fds-button-tertiary-8fa00f0f:where(.fds-button-inverted-8fa00f0f) {
339
- --fc-button-color: var(--fds-semantic-text-neutral-on_inverted);
340
-
341
- background-color: transparent;
342
- }
343
-
344
270
  .fds-button-tertiary-8fa00f0f:where(.fds-button-first-8fa00f0f):not([aria-disabled='true'], :disabled):active {
345
271
  --fc-button-color: var(--fds-semantic-text-action-first-active);
346
272
 
@@ -364,12 +290,6 @@
364
290
 
365
291
  background-color: var(--fds-semantic-surface-danger-no_fill-active);
366
292
  }
367
-
368
- .fds-button-tertiary-8fa00f0f:where(.fds-button-inverted-8fa00f0f):not([aria-disabled='true'], :disabled):active {
369
- --fc-button-color: var(--fds-semantic-text-neutral-on_inverted);
370
-
371
- background-color: var(--fds-semantic-surface-on_inverted-no_fill-active);
372
- }
373
293
  }
374
294
 
375
295
  @layer fds.paragraph {
@@ -524,26 +444,6 @@
524
444
  }
525
445
  }
526
446
 
527
- @layer fds.ingress {
528
- .fds-ingress-ingress-9b33da65 {
529
- --fdsc-bottom-spacing: var(--fds-spacing-5);
530
-
531
- margin: 0;
532
- color: var(--fds-semantic-text-neutral-default);
533
- }
534
-
535
- .fds-ingress-ingress-9b33da65.fds-ingress-spacing-9b33da65 {
536
- margin-bottom: var(--fdsc-bottom-spacing);
537
- }
538
-
539
- .fds-ingress-ingress-9b33da65.fds-ingress-medium-9b33da65 {
540
- --fdsc-bottom-spacing: var(--fds-spacing-5);
541
-
542
- font: var(--fds-typography-ingress-medium);
543
- font-family: inherit;
544
- }
545
- }
546
-
547
447
  @layer fds.label {
548
448
  .fds-label-label-e0249167 {
549
449
  --fdsc-bottom-spacing: var(--fds-spacing-1);
@@ -1018,7 +918,7 @@
1018
918
  .fds-accordion-first-a8137c3d .fds-accordion-item-a8137c3d:not(:first-child) .fds-accordion-accordionButton-a8137c3d,
1019
919
  .fds-accordion-second-a8137c3d .fds-accordion-item-a8137c3d:not(:first-child) .fds-accordion-accordionButton-a8137c3d,
1020
920
  .fds-accordion-third-a8137c3d .fds-accordion-item-a8137c3d:not(:first-child) .fds-accordion-accordionButton-a8137c3d {
1021
- border-top: 1px solid var(--fds-semantic-border-on_inverted-default);
921
+ border-top: 1px solid var(--fds-semantic-surface-neutral-default);
1022
922
  }
1023
923
 
1024
924
  @media (hover: hover) and (pointer: fine) {
@@ -2083,7 +1983,7 @@
2083
1983
  }
2084
1984
 
2085
1985
  .fds-switch-input-9a6b03bc:not(:disabled, [readonly]):checked:hover + .fds-switch-label-9a6b03bc .fds-switch-track-9a6b03bc > .fds-switch-thumb-9a6b03bc {
2086
- transform: translateX(calc((var(--fds-switch-width) - var(--fds-switch-height)) * 0.8));
1986
+ transform: translateX(calc((var(--fds-switch-width) - var(--fds-switch-height))));
2087
1987
  background-image: url("data:image/svg+xml,%3Csvg viewBox='-3 -3 17 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.1339 2.86612C10.622 3.35427 10.622 4.14573 10.1339 4.63388L5.88388 8.88388C5.39573 9.37204 4.60427 9.37204 4.11612 8.88388L1.86612 6.63388C1.37796 6.14573 1.37796 5.35427 1.86612 4.86612C2.35427 4.37796 3.14573 4.37796 3.63388 4.86612L5 6.23223L8.36612 2.86612C8.85427 2.37796 9.64573 2.37796 10.1339 2.86612Z' fill='%230c6536' /%3E%3C/svg%3E");
2088
1988
  }
2089
1989
 
@@ -4,7 +4,6 @@ import { ChevronDownIcon } from '@navikt/aksel-icons';
4
4
  import { clsx } from '../../../node_modules/clsx/dist/clsx.js';
5
5
  import { forwardRef, useContext } from 'react';
6
6
  import classes from '../Accordion.module.css.js';
7
- import utilityClasses from '../../../utilities/utility.module.css.js';
8
7
  import { AccordionItemContext } from '../AccordionItem/AccordionItem.js';
9
8
  import { Heading } from '../../Typography/Heading/Heading.js';
10
9
  import { Paragraph } from '../../Typography/Paragraph/Paragraph.js';
@@ -19,7 +18,7 @@ const AccordionHeader = forwardRef(({ level = 1, children, className, onHeaderCl
19
18
  context.toggleOpen();
20
19
  onHeaderClick && onHeaderClick(e);
21
20
  };
22
- return (jsx(Heading, { ref: ref, size: 'xsmall', level: level, className: clsx(classes.header, className), ...rest, children: jsxs("button", { type: 'button', className: clsx(classes.accordionButton, utilityClasses.focusable), onClick: handleClick, "aria-expanded": context.open, "aria-controls": context.contentId, children: [jsx(ChevronDownIcon, { "aria-hidden": true, className: classes.expandIcon, fontSize: '1.5rem' }), jsx(Paragraph, { asChild: true, size: 'small', children: jsx("span", { children: children }) })] }) }));
21
+ return (jsx(Heading, { ref: ref, size: 'xsmall', level: level, className: clsx(classes.header, className), ...rest, children: jsxs("button", { type: 'button', className: clsx(classes.accordionButton, `fds-focus`), onClick: handleClick, "aria-expanded": context.open, "aria-controls": context.contentId, children: [jsx(ChevronDownIcon, { "aria-hidden": true, className: classes.expandIcon, fontSize: '1.5rem' }), jsx(Paragraph, { asChild: true, size: 'small', children: jsx("span", { children: children }) })] }) }));
23
22
  });
24
23
  AccordionHeader.displayName = 'AccordionHeader';
25
24
 
@@ -3,7 +3,6 @@ import { jsx } from 'react/jsx-runtime';
3
3
  import { forwardRef } from 'react';
4
4
  import { clsx } from '../../node_modules/clsx/dist/clsx.js';
5
5
  import { Slot as $5e63c961fc1ce211$export$8c6ed5c666ac1360 } from '../../node_modules/@radix-ui/react-slot/dist/index.js';
6
- import utilityClasses from '../../utilities/utility.module.css.js';
7
6
  import classes from './Button.module.css.js';
8
7
 
9
8
  /**
@@ -11,7 +10,7 @@ import classes from './Button.module.css.js';
11
10
  */
12
11
  const Button = forwardRef(({ children, color = 'first', variant = 'primary', size = 'medium', fullWidth = false, icon = false, type = 'button', className, as = 'button', asChild, ...rest }, ref) => {
13
12
  const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : as;
14
- return (jsx(Component, { ref: ref, type: type, className: clsx(classes.button, utilityClasses.focusable, classes[size], classes[variant], classes[color], { [classes.fullWidth]: fullWidth }, { [classes.onlyIcon]: icon }, className), ...rest, children: children }));
13
+ return (jsx(Component, { ref: ref, type: type, className: clsx(classes.button, `fds-focus`, classes[size], classes[variant], classes[color], { [classes.fullWidth]: fullWidth }, { [classes.onlyIcon]: icon }, className), ...rest, children: children }));
15
14
  });
16
15
  Button.displayName = 'Button';
17
16
 
@@ -1,4 +1,4 @@
1
1
  'use client';
2
- var classes = {"button":"fds-button-button-8fa00f0f","small":"fds-button-small-8fa00f0f","medium":"fds-button-medium-8fa00f0f","large":"fds-button-large-8fa00f0f","fullWidth":"fds-button-fullWidth-8fa00f0f","secondary":"fds-button-secondary-8fa00f0f","tertiary":"fds-button-tertiary-8fa00f0f","onlyIcon":"fds-button-onlyIcon-8fa00f0f","primary":"fds-button-primary-8fa00f0f","first":"fds-button-first-8fa00f0f","second":"fds-button-second-8fa00f0f","success":"fds-button-success-8fa00f0f","danger":"fds-button-danger-8fa00f0f","inverted":"fds-button-inverted-8fa00f0f"};
2
+ var classes = {"button":"fds-button-button-8fa00f0f","small":"fds-button-small-8fa00f0f","medium":"fds-button-medium-8fa00f0f","large":"fds-button-large-8fa00f0f","fullWidth":"fds-button-fullWidth-8fa00f0f","secondary":"fds-button-secondary-8fa00f0f","tertiary":"fds-button-tertiary-8fa00f0f","onlyIcon":"fds-button-onlyIcon-8fa00f0f","primary":"fds-button-primary-8fa00f0f","first":"fds-button-first-8fa00f0f","second":"fds-button-second-8fa00f0f","success":"fds-button-success-8fa00f0f","danger":"fds-button-danger-8fa00f0f"};
3
3
 
4
4
  export { classes as default };
@@ -3,12 +3,11 @@ import { jsx } from 'react/jsx-runtime';
3
3
  import { forwardRef } from 'react';
4
4
  import { clsx } from '../../node_modules/clsx/dist/clsx.js';
5
5
  import { Slot as $5e63c961fc1ce211$export$8c6ed5c666ac1360 } from '../../node_modules/@radix-ui/react-slot/dist/index.js';
6
- import utilityClasses from '../../utilities/utility.module.css.js';
7
6
  import classes from './Card.module.css.js';
8
7
 
9
8
  const Card = forwardRef(({ color = 'neutral', as = 'div', isLink = false, asChild = false, className, ...rest }, ref) => {
10
9
  const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : as;
11
- return (jsx(Component, { ref: ref, className: clsx(classes.card, classes[color], isLink && classes.linkCard, isLink && utilityClasses.focusable, className), ...rest }));
10
+ return (jsx(Component, { ref: ref, className: clsx(classes.card, classes[color], isLink && classes.linkCard, isLink && `fds-focus`, className), ...rest }));
12
11
  });
13
12
  Card.displayName = 'Card';
14
13
 
@@ -5,12 +5,11 @@ import { clsx } from '../../../node_modules/clsx/dist/clsx.js';
5
5
  import { XMarkIcon } from '@navikt/aksel-icons';
6
6
  import classes from '../Chip.module.css.js';
7
7
  import { ChipGroupContext } from '../Group/Group.js';
8
- import utilityClasses from '../../../utilities/utility.module.css.js';
9
8
  import { Paragraph } from '../../Typography/Paragraph/Paragraph.js';
10
9
 
11
10
  const RemovableChip = forwardRef(({ children, size = 'medium', className, ...rest }, ref) => {
12
11
  const group = useContext(ChipGroupContext);
13
- return (jsx("button", { type: 'button', ref: ref, className: clsx(classes.chipButton, utilityClasses.focusable, classes[group?.size || size], classes.removable, className), ...rest, children: jsx(Paragraph, { asChild: true, size: group?.size || size, short: true, children: jsxs("span", { className: classes.label, children: [jsx("span", { children: children }), jsx("span", { className: classes.xMark, "aria-hidden": true, children: jsx(XMarkIcon, { className: classes.icon }) })] }) }) }));
12
+ return (jsx("button", { type: 'button', ref: ref, className: clsx(classes.chipButton, `fds-focus`, classes[group?.size || size], classes.removable, className), ...rest, children: jsx(Paragraph, { asChild: true, size: group?.size || size, short: true, children: jsxs("span", { className: classes.label, children: [jsx("span", { children: children }), jsx("span", { className: classes.xMark, "aria-hidden": true, children: jsx(XMarkIcon, { className: classes.icon }) })] }) }) }));
14
13
  });
15
14
  RemovableChip.displayName = 'ChipRemovable';
16
15