@digdir/designsystemet-react 0.62.0 → 0.63.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 (45) hide show
  1. package/dist/cjs/components/form/Checkbox/Checkbox.js +1 -1
  2. package/dist/cjs/components/form/Combobox/Combobox.js +12 -12
  3. package/dist/cjs/components/form/Combobox/Option/useComboboxOption.js +3 -2
  4. package/dist/cjs/components/form/Combobox/internal/ComboboxInput.js +3 -2
  5. package/dist/cjs/components/form/Combobox/internal/ComboboxNative.js +3 -3
  6. package/dist/cjs/components/form/Combobox/useCombobox.js +22 -6
  7. package/dist/cjs/components/form/Fieldset/Fieldset.js +1 -1
  8. package/dist/cjs/components/form/NativeSelect/NativeSelect.js +1 -1
  9. package/dist/cjs/components/form/Radio/Radio.js +1 -1
  10. package/dist/cjs/components/form/Switch/Switch.js +1 -1
  11. package/dist/cjs/components/form/Textarea/Textarea.js +1 -1
  12. package/dist/cjs/components/form/Textfield/Textfield.js +1 -1
  13. package/dist/cjs/node_modules/@radix-ui/react-slot/dist/index.js +1 -1
  14. package/dist/cjs/utilities/getSize.js +2 -0
  15. package/dist/esm/components/form/Checkbox/Checkbox.js +1 -1
  16. package/dist/esm/components/form/Combobox/Combobox.js +13 -13
  17. package/dist/esm/components/form/Combobox/Option/useComboboxOption.js +3 -2
  18. package/dist/esm/components/form/Combobox/internal/ComboboxInput.js +3 -2
  19. package/dist/esm/components/form/Combobox/internal/ComboboxNative.js +3 -3
  20. package/dist/esm/components/form/Combobox/useCombobox.js +21 -7
  21. package/dist/esm/components/form/Fieldset/Fieldset.js +1 -1
  22. package/dist/esm/components/form/NativeSelect/NativeSelect.js +1 -1
  23. package/dist/esm/components/form/Radio/Radio.js +1 -1
  24. package/dist/esm/components/form/Switch/Switch.js +1 -1
  25. package/dist/esm/components/form/Textarea/Textarea.js +1 -1
  26. package/dist/esm/components/form/Textfield/Textfield.js +1 -1
  27. package/dist/esm/node_modules/@radix-ui/react-slot/dist/index.js +1 -1
  28. package/dist/esm/utilities/getSize.js +2 -0
  29. package/dist/types/components/List/ListHeading.d.ts +1 -1
  30. package/dist/types/components/Typography/Heading/Heading.d.ts +3 -3
  31. package/dist/types/components/Typography/Heading/Heading.d.ts.map +1 -1
  32. package/dist/types/components/form/Combobox/Combobox.d.ts.map +1 -1
  33. package/dist/types/components/form/Combobox/Option/useComboboxOption.d.ts +1 -1
  34. package/dist/types/components/form/Combobox/Option/useComboboxOption.d.ts.map +1 -1
  35. package/dist/types/components/form/Combobox/internal/ComboboxInput.d.ts.map +1 -1
  36. package/dist/types/components/form/Combobox/internal/ComboboxNative.d.ts.map +1 -1
  37. package/dist/types/components/form/Combobox/useCombobox.d.ts +7 -0
  38. package/dist/types/components/form/Combobox/useCombobox.d.ts.map +1 -1
  39. package/dist/types/components/form/NativeSelect/NativeSelect.d.ts.map +1 -1
  40. package/dist/types/components/form/Switch/Switch.d.ts.map +1 -1
  41. package/dist/types/components/form/Textfield/Textfield.d.ts.map +1 -1
  42. package/dist/types/utilities/getSize.d.ts.map +1 -1
  43. package/package.json +2 -2
  44. /package/dist/cjs/node_modules/{@radix-ui/react-slot/node_modules/@babel → @babel}/runtime/helpers/esm/extends.js +0 -0
  45. /package/dist/esm/node_modules/{@radix-ui/react-slot/node_modules/@babel → @babel}/runtime/helpers/esm/extends.js +0 -0
@@ -21,7 +21,7 @@ const Checkbox = React.forwardRef((props, ref) => {
21
21
  }
22
22
  },
23
23
  ]);
24
- return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { className: lite.clsx('fds-checkbox', `fds-checkbox--${size}`, inputProps.disabled && `fds-checkbox--disabled`, hasError && `fds-checkbox--error`, readOnly && `fds-checkbox--readonly`, className), style: style, children: [jsxRuntime.jsx("input", { className: `fds-checkbox__input`, ref: inputRef, ...objectUtils.omit(['size', 'error', 'indeterminate'], rest), ...inputProps, type: 'checkbox', "aria-checked": rest.indeterminate ? 'mixed' : inputProps.checked }), children && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Label.Label, { className: `fds-checkbox__label`, htmlFor: inputProps.id, size: size, weight: 'regular', children: jsxRuntime.jsx("span", { children: children }) }), description && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsx("div", { id: descriptionId, className: `fds-checkbox__description`, children: description }) }))] }))] }) }));
24
+ return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { className: lite.clsx('fds-checkbox', `fds-checkbox--${size}`, hasError && `fds-checkbox--error`, readOnly && `fds-checkbox--readonly`, className), style: style, children: [jsxRuntime.jsx("input", { className: `fds-checkbox__input`, ref: inputRef, ...objectUtils.omit(['size', 'error', 'indeterminate'], rest), ...inputProps, type: 'checkbox', disabled: inputProps.disabled, "aria-checked": rest.indeterminate ? 'mixed' : inputProps.checked }), children && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Label.Label, { className: `fds-checkbox__label`, htmlFor: inputProps.id, size: size, weight: 'regular', children: jsxRuntime.jsx("span", { children: children }) }), description && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsx("div", { id: descriptionId, className: `fds-checkbox__description`, children: description }) }))] }))] }) }));
25
25
  });
26
26
  Checkbox.displayName = 'Checkbox';
27
27
 
@@ -52,18 +52,18 @@ const ComboboxComponent = React.forwardRef(({ value, initialValue = [], onValueC
52
52
  // if value is set, set input value to the label of the value
53
53
  React.useEffect(() => {
54
54
  if (value && value.length > 0 && !multiple) {
55
- const option = options[value[0]];
55
+ const option = options[useCombobox.prefix(value[0])];
56
56
  setInputValue(option?.label || '');
57
57
  }
58
58
  }, [multiple, value, options]);
59
59
  React.useEffect(() => {
60
60
  if (value && Object.keys(options).length >= 0) {
61
61
  const updatedSelectedOptions = value.map((option) => {
62
- const value = options[option];
62
+ const value = options[useCombobox.prefix(option)];
63
63
  return value;
64
64
  });
65
65
  setSelectedOptions(updatedSelectedOptions.reduce((acc, value) => {
66
- acc[value.value] = value;
66
+ acc[useCombobox.prefix(value.value)] = value;
67
67
  return acc;
68
68
  }, {}));
69
69
  }
@@ -81,18 +81,18 @@ const ComboboxComponent = React.forwardRef(({ value, initialValue = [], onValueC
81
81
  return;
82
82
  if (remove) {
83
83
  const newSelectedOptions = { ...selectedOptions };
84
- delete newSelectedOptions[option.value];
84
+ delete newSelectedOptions[useCombobox.prefix(option.value)];
85
85
  setSelectedOptions(newSelectedOptions);
86
- onValueChange?.(Object.keys(newSelectedOptions));
86
+ onValueChange?.(Object.keys(newSelectedOptions).map((key) => useCombobox.removePrefix(key)));
87
87
  return;
88
88
  }
89
89
  const newSelectedOptions = { ...selectedOptions };
90
90
  if (multiple) {
91
- if (newSelectedOptions[option.value]) {
92
- delete newSelectedOptions[option.value];
91
+ if (newSelectedOptions[useCombobox.prefix(option.value)]) {
92
+ delete newSelectedOptions[useCombobox.prefix(option.value)];
93
93
  }
94
94
  else {
95
- newSelectedOptions[option.value] = option;
95
+ newSelectedOptions[useCombobox.prefix(option.value)] = option;
96
96
  }
97
97
  setInputValue('');
98
98
  inputRef.current?.focus();
@@ -102,7 +102,7 @@ const ComboboxComponent = React.forwardRef(({ value, initialValue = [], onValueC
102
102
  Object.keys(newSelectedOptions).forEach((key) => {
103
103
  delete newSelectedOptions[key];
104
104
  });
105
- newSelectedOptions[option.value] = option;
105
+ newSelectedOptions[useCombobox.prefix(option.value)] = option;
106
106
  setInputValue(option?.label || '');
107
107
  // move cursor to the end of the input
108
108
  setTimeout(() => {
@@ -110,7 +110,7 @@ const ComboboxComponent = React.forwardRef(({ value, initialValue = [], onValueC
110
110
  }, 0);
111
111
  }
112
112
  setSelectedOptions(newSelectedOptions);
113
- onValueChange?.(Object.keys(newSelectedOptions));
113
+ onValueChange?.(Object.keys(newSelectedOptions).map((key) => useCombobox.removePrefix(key)));
114
114
  !multiple && setOpen(false);
115
115
  refs.domReference.current?.focus();
116
116
  };
@@ -136,7 +136,7 @@ const ComboboxComponent = React.forwardRef(({ value, initialValue = [], onValueC
136
136
  measureElement: (elem) => {
137
137
  return elem.getBoundingClientRect().height;
138
138
  },
139
- overscan: 1,
139
+ overscan: 7,
140
140
  });
141
141
  return (jsxRuntime.jsxs(ComboboxContext.ComboboxContext.Provider, { value: {
142
142
  size,
@@ -164,7 +164,7 @@ const ComboboxComponent = React.forwardRef(({ value, initialValue = [], onValueC
164
164
  return;
165
165
  if (disabled)
166
166
  return;
167
- const option = options[value];
167
+ const option = options[useCombobox.prefix(value)];
168
168
  debouncedHandleSelectOption({ option: option });
169
169
  },
170
170
  handleSelectOption: debouncedHandleSelectOption,
@@ -6,6 +6,7 @@ var floatingUi_react = require('../../../../node_modules/@floating-ui/react/dist
6
6
  var ComboboxContext = require('../ComboboxContext.js');
7
7
  var useDebounce = require('../../../../utilities/useDebounce.js');
8
8
  var ComboboxIdContext = require('../ComboboxIdContext.js');
9
+ var useCombobox = require('../useCombobox.js');
9
10
 
10
11
  function useComboboxOption({ id, ref, value, }) {
11
12
  const generatedId = React.useId();
@@ -17,7 +18,7 @@ function useComboboxOption({ id, ref, value, }) {
17
18
  throw new Error('ComboboxOption must be used within a Combobox');
18
19
  }
19
20
  const { selectedOptions, onOptionClick, listRef, customIds, filteredOptions, } = context;
20
- const index = React.useMemo(() => filteredOptions.indexOf(value) + customIds.length, [customIds.length, filteredOptions, value]);
21
+ const index = React.useMemo(() => filteredOptions.indexOf(useCombobox.prefix(String(value))) + customIds.length, [customIds.length, filteredOptions, value]);
21
22
  const combinedRef = floatingUi_react.useMergeRefs([
22
23
  (node) => {
23
24
  listRef.current[index] = node;
@@ -27,7 +28,7 @@ function useComboboxOption({ id, ref, value, }) {
27
28
  if (index === -1) {
28
29
  throw new Error('Internal error: ComboboxOption did not find index');
29
30
  }
30
- const selected = selectedOptions[value];
31
+ const selected = selectedOptions[useCombobox.prefix(value)];
31
32
  const active = activeIndex === index;
32
33
  React.useEffect(() => {
33
34
  if (active) {
@@ -10,6 +10,7 @@ var akselIcons = require('@navikt/aksel-icons');
10
10
  var floatingUi_react = require('../../../../node_modules/@floating-ui/react/dist/floating-ui.react.js');
11
11
  var ComboboxContext = require('../ComboboxContext.js');
12
12
  var ComboboxIdContext = require('../ComboboxIdContext.js');
13
+ var useCombobox = require('../useCombobox.js');
13
14
  var ComboboxChips = require('./ComboboxChips.js');
14
15
  var ComboboxClearButton = require('./ComboboxClearButton.js');
15
16
  var Box = require('../../../Box/Box.js');
@@ -32,10 +33,10 @@ const ComboboxInput = ({ hideClearButton, listId, error, hideChips, handleKeyDow
32
33
  setInputValue(value);
33
34
  setActiveIndex(0);
34
35
  // check if input value is the same as a label, if so, select it
35
- const option = options[value.toLowerCase()];
36
+ const option = options[useCombobox.prefix(value.toLowerCase())];
36
37
  if (!option)
37
38
  return;
38
- if (selectedOptions[option.value])
39
+ if (selectedOptions[useCombobox.prefix(option.value)])
39
40
  return;
40
41
  handleSelectOption({ option: option });
41
42
  };
@@ -4,11 +4,11 @@
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
+ var useCombobox = require('../useCombobox.js');
7
8
 
8
9
  const ComboboxNative = ({ selectedOptions, multiple, name, }) => {
9
- return (jsxRuntime.jsx("select", { name: name, multiple: multiple, style: { display: 'none' }, value: multiple
10
- ? Object.keys(selectedOptions)
11
- : Object.keys(selectedOptions)[0], onChange: () => { }, children: Object.keys(selectedOptions).map((value) => (jsxRuntime.jsx("option", { value: value }, value))) }));
10
+ const VALUE = Object.keys(selectedOptions).map((key) => useCombobox.removePrefix(key));
11
+ return (jsxRuntime.jsx("select", { name: name, multiple: multiple, style: { display: 'none' }, value: multiple ? VALUE : VALUE[0], onChange: () => { }, children: VALUE.map((value) => (jsxRuntime.jsx("option", { value: value }, value))) }));
12
12
  };
13
13
  ComboboxNative.displayName = 'ComboboxNative';
14
14
  var ComboboxNative$1 = ComboboxNative;
@@ -17,6 +17,18 @@ function isComboboxCustom(child) {
17
17
  function isInteractiveComboboxCustom(child) {
18
18
  return isComboboxCustom(child) && child.props.interactive === true;
19
19
  }
20
+ const INTERNAL_OPTION_PREFIX = 'internal-option-';
21
+ /**
22
+ * We use this function to prefix the value of the options so we can make sure numbers as strings are not parsed as numbers in objects
23
+ * @param value
24
+ * @returns
25
+ */
26
+ const prefix = (value) => {
27
+ return INTERNAL_OPTION_PREFIX + value;
28
+ };
29
+ const removePrefix = (value) => {
30
+ return value.slice(INTERNAL_OPTION_PREFIX.length);
31
+ };
20
32
  function useCombobox({ children, inputValue, multiple, filter = (inputValue, option) => {
21
33
  return option.label.toLowerCase().startsWith(inputValue.toLowerCase());
22
34
  }, initialValue, }) {
@@ -64,8 +76,8 @@ function useCombobox({ children, inputValue, multiple, filter = (inputValue, opt
64
76
  });
65
77
  label = childrenLabel;
66
78
  }
67
- allOptions[props.value] = {
68
- value: props.value,
79
+ allOptions[prefix(String(props.value))] = {
80
+ value: String(props.value),
69
81
  label,
70
82
  displayValue: props.displayValue,
71
83
  description: props.description,
@@ -73,7 +85,9 @@ function useCombobox({ children, inputValue, multiple, filter = (inputValue, opt
73
85
  });
74
86
  return allOptions;
75
87
  }, [optionsChildren]);
76
- const preSelectedOptions = React.useMemo(() => (initialValue || []).reduce((acc, value) => {
88
+ const preSelectedOptions = React.useMemo(() => (initialValue?.map((key) => {
89
+ return prefix(key);
90
+ }) || []).reduce((acc, value) => {
77
91
  const option = options[value];
78
92
  if (isOption(option)) {
79
93
  acc[value] = option;
@@ -86,15 +100,15 @@ function useCombobox({ children, inputValue, multiple, filter = (inputValue, opt
86
100
  const filteredOptionsChildren = Object.keys(options).map((option, index) => {
87
101
  /* If we have a selected value in single mode and the input matches an option, return all children */
88
102
  if (!multiple && Object.keys(selectedOptions).length === 1) {
89
- filteredOptions.push(options[option].value);
103
+ filteredOptions.push(option);
90
104
  return optionsChildren[index];
91
105
  }
92
106
  if (multiple && selectedOptions[option]) {
93
- filteredOptions.push(options[option].value);
107
+ filteredOptions.push(option);
94
108
  return optionsChildren[index];
95
109
  }
96
110
  if (filter(inputValue, options[option])) {
97
- filteredOptions.push(options[option].value);
111
+ filteredOptions.push(option);
98
112
  return optionsChildren[index];
99
113
  }
100
114
  });
@@ -117,3 +131,5 @@ exports.default = useCombobox;
117
131
  exports.isComboboxCustom = isComboboxCustom;
118
132
  exports.isComboboxOption = isComboboxOption;
119
133
  exports.isInteractiveComboboxCustom = isInteractiveComboboxCustom;
134
+ exports.prefix = prefix;
135
+ exports.removePrefix = removePrefix;
@@ -21,7 +21,7 @@ const Fieldset = React.forwardRef((props, ref) => {
21
21
  size,
22
22
  disabled: props?.disabled,
23
23
  readOnly,
24
- }, children: jsxRuntime.jsxs("fieldset", { ...fieldsetProps, className: lite.clsx('fds-fieldset', !hideLegend && 'fds-fieldset--spacing', readOnly && 'fds-fieldset--readonly', props?.disabled && 'fds-fieldset--disabled', className), ref: ref, ...rest, children: [jsxRuntime.jsx(Label.Label, { asChild: true, size: size, children: jsxRuntime.jsx("legend", { className: 'fds-fieldset__legend', children: jsxRuntime.jsxs("span", { className: lite.clsx('fds-fieldset__legend__content', hideLegend && `fds-sr-only`), children: [readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { className: 'fds-fieldset__readonly__icon', "aria-hidden": true })), legend] }) }) }), description && (jsxRuntime.jsx(Paragraph.Paragraph, { size: size, variant: 'short', asChild: true, children: jsxRuntime.jsx("div", { id: descriptionId, className: lite.clsx('fds-fieldset__description', hideLegend && `fds-sr-only`), children: description }) })), children, jsxRuntime.jsx("div", { id: errorId, "aria-live": 'polite', "aria-relevant": 'additions removals', className: 'fds-fieldset__error-message', children: hasError && jsxRuntime.jsx(ErrorMessage.ErrorMessage, { size: size, children: error }) })] }) }));
24
+ }, children: jsxRuntime.jsxs("fieldset", { ...fieldsetProps, className: lite.clsx('fds-fieldset', !hideLegend && 'fds-fieldset--spacing', readOnly && 'fds-fieldset--readonly', className), disabled: props?.disabled, ref: ref, ...rest, children: [jsxRuntime.jsx(Label.Label, { asChild: true, size: size, children: jsxRuntime.jsx("legend", { className: 'fds-fieldset__legend', children: jsxRuntime.jsxs("span", { className: lite.clsx('fds-fieldset__legend__content', hideLegend && `fds-sr-only`), children: [readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { className: 'fds-fieldset__readonly__icon', "aria-hidden": true })), legend] }) }) }), description && (jsxRuntime.jsx(Paragraph.Paragraph, { size: size, variant: 'short', asChild: true, children: jsxRuntime.jsx("div", { id: descriptionId, className: lite.clsx('fds-fieldset__description', hideLegend && `fds-sr-only`), children: description }) })), children, jsxRuntime.jsx("div", { id: errorId, "aria-live": 'polite', "aria-relevant": 'additions removals', className: 'fds-fieldset__error-message', children: hasError && jsxRuntime.jsx(ErrorMessage.ErrorMessage, { size: size, children: error }) })] }) }));
25
25
  });
26
26
  Fieldset.displayName = 'Fieldset';
27
27
 
@@ -14,7 +14,7 @@ var Paragraph = require('../../Typography/Paragraph/Paragraph.js');
14
14
  const NativeSelect = React.forwardRef((props, ref) => {
15
15
  const { children, disabled = false, label, description, hideLabel = false, error, className, htmlSize = 0, ...rest } = props;
16
16
  const { selectProps, descriptionId, errorId, readOnly = false, size = 'md', } = useNativeSelect.useNativeSelect(props);
17
- return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { className: lite.clsx('fds-native-select--container', disabled && 'fds-native-select--disabled', readOnly && 'fds-native-select--readonly', error && 'fds-native-select--error'), children: [label && (jsxRuntime.jsxs(Label.Label, { weight: 'medium', size: size, htmlFor: selectProps.id, className: lite.clsx('fds-native-select__label', hideLabel && 'fds-sr-only'), children: [readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { "aria-hidden": true, className: 'fds-native-select__readonly__icon' })), label] })), description && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsx("div", { id: descriptionId, className: lite.clsx(`fds-native-select__description`, hideLabel && `fds-sr-only`), children: description }) })), jsxRuntime.jsx("select", { disabled: disabled || readOnly, ref: ref, size: htmlSize, className: lite.clsx('fds-native-select', `fds-native-select--${size}`, `fds-focus`, props.multiple && 'fds-native-select--multiple', className), ...objectUtils.omit(['size', 'error', 'errorId'], rest), ...objectUtils.omit(['readOnly', 'disabled'], selectProps), children: children }), error && (jsxRuntime.jsx("div", { id: errorId, className: 'fds-native-select__error-message', "aria-live": 'polite', "aria-relevant": 'additions removals', children: jsxRuntime.jsx(ErrorMessage.ErrorMessage, { size: size, children: error }) }))] }) }));
17
+ return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { className: lite.clsx('fds-native-select--container', readOnly && 'fds-native-select--readonly', error && 'fds-native-select--error'), children: [label && (jsxRuntime.jsxs(Label.Label, { weight: 'medium', size: size, htmlFor: selectProps.id, className: lite.clsx('fds-native-select__label', hideLabel && 'fds-sr-only'), children: [readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { "aria-hidden": true, className: 'fds-native-select__readonly__icon' })), label] })), description && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsx("div", { id: descriptionId, className: lite.clsx(`fds-native-select__description`, hideLabel && `fds-sr-only`), children: description }) })), jsxRuntime.jsx("select", { disabled: disabled || readOnly, ref: ref, size: htmlSize, className: lite.clsx('fds-native-select', `fds-native-select--${size}`, `fds-focus`, props.multiple && 'fds-native-select--multiple', className), ...objectUtils.omit(['size', 'error', 'errorId'], rest), ...objectUtils.omit(['readOnly', 'disabled'], selectProps), children: children }), error && (jsxRuntime.jsx("div", { id: errorId, className: 'fds-native-select__error-message', "aria-live": 'polite', "aria-relevant": 'additions removals', children: jsxRuntime.jsx(ErrorMessage.ErrorMessage, { size: size, children: error }) }))] }) }));
18
18
  });
19
19
  NativeSelect.displayName = 'NativeSelect';
20
20
 
@@ -12,7 +12,7 @@ var Label = require('../../Typography/Label/Label.js');
12
12
  const Radio = React.forwardRef((props, ref) => {
13
13
  const { children, description, className, style, ...rest } = props;
14
14
  const { inputProps, descriptionId, hasError, size = 'md', readOnly, } = useRadio.useRadio(props);
15
- return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { className: lite.clsx('fds-radio', `fds-radio--${size}`, inputProps.disabled && `fds-radio--disabled`, hasError && `fds-radio--error`, readOnly && `fds-radio--readonly`, className), style: style, children: [jsxRuntime.jsx("input", { className: 'fds-radio__input', ref: ref, ...objectUtils.omit(['size', 'error'], rest), ...inputProps }), children && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Label.Label, { className: 'fds-radio__label', htmlFor: inputProps.id, size: size, weight: 'regular', children: jsxRuntime.jsx("span", { children: children }) }), description && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsx("div", { id: descriptionId, className: 'fds-radio__description', children: description }) }))] }))] }) }));
15
+ return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { className: lite.clsx('fds-radio', `fds-radio--${size}`, hasError && `fds-radio--error`, readOnly && `fds-radio--readonly`, className), style: style, children: [jsxRuntime.jsx("input", { className: 'fds-radio__input', disabled: inputProps.disabled, ref: ref, ...objectUtils.omit(['size', 'error'], rest), ...inputProps }), children && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Label.Label, { className: 'fds-radio__label', htmlFor: inputProps.id, size: size, weight: 'regular', children: jsxRuntime.jsx("span", { children: children }) }), description && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsx("div", { id: descriptionId, className: 'fds-radio__description', children: description }) }))] }))] }) }));
16
16
  });
17
17
  Radio.displayName = 'Radio';
18
18
 
@@ -13,7 +13,7 @@ var Label = require('../../Typography/Label/Label.js');
13
13
  const Switch = React.forwardRef((props, ref) => {
14
14
  const { children, description, position = 'left', className, ...rest } = props;
15
15
  const { inputProps, descriptionId, size = 'md', readOnly, } = useSwitch.useSwitch(props);
16
- return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { className: lite.clsx(`fds-switch`, `fds-switch--${size}`, inputProps.disabled && `fds-switch--disabled`, readOnly && `fds-switch--readonly`, className), children: [jsxRuntime.jsx("input", { className: `fds-switch__input`, ref: ref, ...objectUtils.omit(['size', 'error'], rest), ...inputProps }), jsxRuntime.jsxs(Label.Label, { className: lite.clsx(`fds-switch__label`, position === 'right' && `fds-switch__label--right`), htmlFor: inputProps.id, size: size, weight: 'regular', children: [jsxRuntime.jsx("span", { className: `fds-switch__track`, children: jsxRuntime.jsx("span", { className: `fds-switch__thumb` }) }), readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { "aria-hidden": true, className: `fds-switch__readonly__icon` })), children && jsxRuntime.jsx("span", { children: children })] }), description && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsx("div", { id: descriptionId, className: `fds-switch__description`, children: description }) }))] }) }));
16
+ return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { className: lite.clsx(`fds-switch`, `fds-switch--${size}`, inputProps.disabled && `fds-switch--disabled`, readOnly && `fds-switch--readonly`, className), children: [jsxRuntime.jsx("input", { className: `fds-switch__input`, disabled: inputProps.disabled, ref: ref, ...objectUtils.omit(['size', 'error'], rest), ...inputProps }), jsxRuntime.jsxs(Label.Label, { className: lite.clsx(`fds-switch__label`, position === 'right' && `fds-switch__label--right`), htmlFor: inputProps.id, size: size, weight: 'regular', children: [jsxRuntime.jsx("span", { className: `fds-switch__track`, children: jsxRuntime.jsx("span", { className: `fds-switch__thumb` }) }), readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { "aria-hidden": true, className: `fds-switch__readonly__icon` })), children && jsxRuntime.jsx("span", { children: children })] }), description && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsx("div", { id: descriptionId, className: `fds-switch__description`, children: description }) }))] }) }));
17
17
  });
18
18
  Switch.displayName = 'Switch';
19
19
 
@@ -26,7 +26,7 @@ const Textarea = React.forwardRef((props, ref) => {
26
26
  const characterLimitId = `${textareaProps.id}-charactercount}`;
27
27
  const hasCharacterLimit = characterLimit != null;
28
28
  const describedBy = lite.clsx(textareaProps['aria-describedby'], hasCharacterLimit && characterLimitId) || undefined;
29
- return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { style: style, className: lite.clsx('fds-textarea', `fds-textarea--${size}`, textareaProps.disabled && 'fds-textarea--disabled', readOnly && `fds-textarea--readonly`, hasError && `fds-textarea--error`, className), children: [label && (jsxRuntime.jsxs(Label.Label, { size: size, weight: 'medium', htmlFor: textareaProps.id, className: lite.clsx('fds-textarea__label', hideLabel && `fds-sr-only`), children: [readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { "aria-hidden": true, className: 'fds-textarea__readonly__icon' })), jsxRuntime.jsx("span", { children: label })] })), description && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsx("div", { id: descriptionId, className: lite.clsx('fds-textarea__description', hideLabel && `fds-sr-only`), children: description }) })), jsxRuntime.jsx("textarea", { className: lite.clsx('fds-textarea__input', `fds-focus`), ref: ref, "aria-describedby": describedBy, ...objectUtils.omit(['size', 'error', 'errorId'], rest), ...textareaProps, onChange: (e) => {
29
+ return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { style: style, className: lite.clsx('fds-textarea', `fds-textarea--${size}`, hasError && `fds-textarea--error`, className), children: [label && (jsxRuntime.jsxs(Label.Label, { size: size, weight: 'medium', htmlFor: textareaProps.id, className: lite.clsx('fds-textarea__label', hideLabel && `fds-sr-only`), children: [readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { "aria-hidden": true, className: 'fds-textarea__readonly-icon' })), jsxRuntime.jsx("span", { children: label })] })), description && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsx("div", { id: descriptionId, className: lite.clsx('fds-textarea__description', hideLabel && `fds-sr-only`), children: description }) })), jsxRuntime.jsx("textarea", { className: lite.clsx('fds-textarea__input', `fds-focus`), ref: ref, "aria-describedby": describedBy, disabled: textareaProps.disabled, readOnly: readOnly, ...objectUtils.omit(['size', 'error', 'errorId'], rest), ...textareaProps, onChange: (e) => {
30
30
  textareaProps?.onChange?.(e);
31
31
  setValue(e.target.value);
32
32
  } }), hasCharacterLimit && (jsxRuntime.jsx(CharacterCounter.CharacterCounter, { size: size, value: value ? value.toString() : '', id: characterLimitId, ...characterLimit })), jsxRuntime.jsx("div", { className: 'fds-textarea__error-message', id: errorId, "aria-live": 'polite', "aria-relevant": 'additions removals', children: hasError && jsxRuntime.jsx(ErrorMessage.ErrorMessage, { size: size, children: props.error }) })] }) }));
@@ -26,7 +26,7 @@ const Textfield = React.forwardRef((props, ref) => {
26
26
  const characterLimitId = `textfield-charactercount-${React.useId()}`;
27
27
  const hasCharacterLimit = characterLimit != null;
28
28
  const describedBy = lite.clsx(inputProps['aria-describedby'], hasCharacterLimit && characterLimitId) || undefined;
29
- return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { style: style, className: lite.clsx(`fds-textfield`, `fds-textfield--${size}`, inputProps.disabled && `fds-textfield--disabled`, readOnly && `fds-textfield--readonly`, hasError && `fds-textfield--error`, className), children: [label && (jsxRuntime.jsxs(Label.Label, { size: size, weight: 'medium', htmlFor: inputProps.id, className: lite.clsx(`fds-textfield__label`, hideLabel && `fds-sr-only`), children: [readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { "aria-hidden": true, className: 'fds-textfield__readonly__icon' })), jsxRuntime.jsx("span", { children: label })] })), description && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsx("div", { id: descriptionId, className: lite.clsx(`fds-textfield__description`, hideLabel && `fds-sr-only`), children: description }) })), jsxRuntime.jsxs("div", { className: 'fds-textfield__field', children: [prefix && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, variant: 'short', children: jsxRuntime.jsx("div", { className: lite.clsx(`fds-textfield__adornment`, `fds-textfield__prefix`), "aria-hidden": 'true', children: prefix }) })), jsxRuntime.jsx("input", { className: lite.clsx(`fds-textfield__input`, `fds-focus`, prefix && `fds-textfield__input--with-prefix`, suffix && `fds-textfield__input--with-suffix`), ref: ref, type: type, "aria-describedby": describedBy, size: htmlSize, ...objectUtils.omit(['size', 'error', 'errorId'], rest), ...inputProps, onChange: (e) => {
29
+ return (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsxs("div", { style: style, className: lite.clsx(`fds-textfield`, `fds-textfield--${size}`, readOnly && `fds-textfield--readonly`, hasError && `fds-textfield--error`, className), children: [label && (jsxRuntime.jsxs(Label.Label, { size: size, weight: 'medium', htmlFor: inputProps.id, className: lite.clsx(`fds-textfield__label`, hideLabel && `fds-sr-only`), children: [readOnly && (jsxRuntime.jsx(akselIcons.PadlockLockedFillIcon, { "aria-hidden": true, className: 'fds-textfield__readonly__icon' })), jsxRuntime.jsx("span", { children: label })] })), description && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, children: jsxRuntime.jsx("div", { id: descriptionId, className: lite.clsx(`fds-textfield__description`, hideLabel && `fds-sr-only`), children: description }) })), jsxRuntime.jsxs("div", { className: 'fds-textfield__field', children: [prefix && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, variant: 'short', children: jsxRuntime.jsx("div", { className: lite.clsx(`fds-textfield__adornment`, `fds-textfield__prefix`), "aria-hidden": 'true', children: prefix }) })), jsxRuntime.jsx("input", { className: lite.clsx(`fds-textfield__input`, `fds-focus`, prefix && `fds-textfield__input--with-prefix`, suffix && `fds-textfield__input--with-suffix`), ref: ref, type: type, disabled: inputProps.disabled, "aria-describedby": describedBy, size: htmlSize, ...objectUtils.omit(['size', 'error', 'errorId'], rest), ...inputProps, onChange: (e) => {
30
30
  inputProps?.onChange?.(e);
31
31
  setInputValue(e.target.value);
32
32
  } }), suffix && (jsxRuntime.jsx(Paragraph.Paragraph, { asChild: true, size: size, variant: 'short', children: jsxRuntime.jsx("div", { className: lite.clsx(`fds-textfield__adornment`, `fds-textfield__suffix`), "aria-hidden": 'true', children: suffix }) }))] }), hasCharacterLimit && (jsxRuntime.jsx(CharacterCounter.CharacterCounter, { size: size, value: inputValue ? inputValue.toString() : '', id: characterLimitId, ...characterLimit })), jsxRuntime.jsx("div", { className: 'fds-textfield__error-message', id: errorId, "aria-live": 'polite', "aria-relevant": 'additions removals', children: hasError && jsxRuntime.jsx(ErrorMessage.ErrorMessage, { size: size, children: props.error }) })] }) }));
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  'use strict';
3
3
 
4
- var _extends = require('../node_modules/@babel/runtime/helpers/esm/extends.js');
4
+ var _extends = require('../../../@babel/runtime/helpers/esm/extends.js');
5
5
  var React = require('react');
6
6
  var index = require('../../react-compose-refs/dist/index.js');
7
7
 
@@ -18,8 +18,10 @@ function getSize(size) {
18
18
  case 'xlarge':
19
19
  return 'xl';
20
20
  case 'xxlarge':
21
+ case '2xlarge':
21
22
  return '2xl';
22
23
  case 'xxxlarge':
24
+ case '3xlarge':
23
25
  return '3xl';
24
26
  case 'xxxxlarge':
25
27
  return '4xl';
@@ -19,7 +19,7 @@ const Checkbox = forwardRef((props, ref) => {
19
19
  }
20
20
  },
21
21
  ]);
22
- return (jsx(Paragraph, { asChild: true, size: size, children: jsxs("div", { className: clsx('fds-checkbox', `fds-checkbox--${size}`, inputProps.disabled && `fds-checkbox--disabled`, hasError && `fds-checkbox--error`, readOnly && `fds-checkbox--readonly`, className), style: style, children: [jsx("input", { className: `fds-checkbox__input`, ref: inputRef, ...omit(['size', 'error', 'indeterminate'], rest), ...inputProps, type: 'checkbox', "aria-checked": rest.indeterminate ? 'mixed' : inputProps.checked }), children && (jsxs(Fragment, { children: [jsx(Label, { className: `fds-checkbox__label`, htmlFor: inputProps.id, size: size, weight: 'regular', children: jsx("span", { children: children }) }), description && (jsx(Paragraph, { asChild: true, size: size, children: jsx("div", { id: descriptionId, className: `fds-checkbox__description`, children: description }) }))] }))] }) }));
22
+ return (jsx(Paragraph, { asChild: true, size: size, children: jsxs("div", { className: clsx('fds-checkbox', `fds-checkbox--${size}`, hasError && `fds-checkbox--error`, readOnly && `fds-checkbox--readonly`, className), style: style, children: [jsx("input", { className: `fds-checkbox__input`, ref: inputRef, ...omit(['size', 'error', 'indeterminate'], rest), ...inputProps, type: 'checkbox', disabled: inputProps.disabled, "aria-checked": rest.indeterminate ? 'mixed' : inputProps.checked }), children && (jsxs(Fragment, { children: [jsx(Label, { className: `fds-checkbox__label`, htmlFor: inputProps.id, size: size, weight: 'regular', children: jsx("span", { children: children }) }), description && (jsx(Paragraph, { asChild: true, size: size, children: jsx("div", { id: descriptionId, className: `fds-checkbox__description`, children: description }) }))] }))] }) }));
23
23
  });
24
24
  Checkbox.displayName = 'Checkbox';
25
25
 
@@ -7,7 +7,7 @@ import { useVirtualizer } from '../../../node_modules/@tanstack/react-virtual/di
7
7
  import { useFormField } from '../useFormField.js';
8
8
  import useDebounce from '../../../utilities/useDebounce.js';
9
9
  import { getSize } from '../../../utilities/getSize.js';
10
- import useCombobox from './useCombobox.js';
10
+ import useCombobox, { prefix, removePrefix } from './useCombobox.js';
11
11
  import ComboboxInput from './internal/ComboboxInput.js';
12
12
  import ComboboxLabel from './internal/ComboboxLabel.js';
13
13
  import ComboboxError from './internal/ComboboxError.js';
@@ -50,18 +50,18 @@ const ComboboxComponent = forwardRef(({ value, initialValue = [], onValueChange,
50
50
  // if value is set, set input value to the label of the value
51
51
  useEffect(() => {
52
52
  if (value && value.length > 0 && !multiple) {
53
- const option = options[value[0]];
53
+ const option = options[prefix(value[0])];
54
54
  setInputValue(option?.label || '');
55
55
  }
56
56
  }, [multiple, value, options]);
57
57
  useEffect(() => {
58
58
  if (value && Object.keys(options).length >= 0) {
59
59
  const updatedSelectedOptions = value.map((option) => {
60
- const value = options[option];
60
+ const value = options[prefix(option)];
61
61
  return value;
62
62
  });
63
63
  setSelectedOptions(updatedSelectedOptions.reduce((acc, value) => {
64
- acc[value.value] = value;
64
+ acc[prefix(value.value)] = value;
65
65
  return acc;
66
66
  }, {}));
67
67
  }
@@ -79,18 +79,18 @@ const ComboboxComponent = forwardRef(({ value, initialValue = [], onValueChange,
79
79
  return;
80
80
  if (remove) {
81
81
  const newSelectedOptions = { ...selectedOptions };
82
- delete newSelectedOptions[option.value];
82
+ delete newSelectedOptions[prefix(option.value)];
83
83
  setSelectedOptions(newSelectedOptions);
84
- onValueChange?.(Object.keys(newSelectedOptions));
84
+ onValueChange?.(Object.keys(newSelectedOptions).map((key) => removePrefix(key)));
85
85
  return;
86
86
  }
87
87
  const newSelectedOptions = { ...selectedOptions };
88
88
  if (multiple) {
89
- if (newSelectedOptions[option.value]) {
90
- delete newSelectedOptions[option.value];
89
+ if (newSelectedOptions[prefix(option.value)]) {
90
+ delete newSelectedOptions[prefix(option.value)];
91
91
  }
92
92
  else {
93
- newSelectedOptions[option.value] = option;
93
+ newSelectedOptions[prefix(option.value)] = option;
94
94
  }
95
95
  setInputValue('');
96
96
  inputRef.current?.focus();
@@ -100,7 +100,7 @@ const ComboboxComponent = forwardRef(({ value, initialValue = [], onValueChange,
100
100
  Object.keys(newSelectedOptions).forEach((key) => {
101
101
  delete newSelectedOptions[key];
102
102
  });
103
- newSelectedOptions[option.value] = option;
103
+ newSelectedOptions[prefix(option.value)] = option;
104
104
  setInputValue(option?.label || '');
105
105
  // move cursor to the end of the input
106
106
  setTimeout(() => {
@@ -108,7 +108,7 @@ const ComboboxComponent = forwardRef(({ value, initialValue = [], onValueChange,
108
108
  }, 0);
109
109
  }
110
110
  setSelectedOptions(newSelectedOptions);
111
- onValueChange?.(Object.keys(newSelectedOptions));
111
+ onValueChange?.(Object.keys(newSelectedOptions).map((key) => removePrefix(key)));
112
112
  !multiple && setOpen(false);
113
113
  refs.domReference.current?.focus();
114
114
  };
@@ -134,7 +134,7 @@ const ComboboxComponent = forwardRef(({ value, initialValue = [], onValueChange,
134
134
  measureElement: (elem) => {
135
135
  return elem.getBoundingClientRect().height;
136
136
  },
137
- overscan: 1,
137
+ overscan: 7,
138
138
  });
139
139
  return (jsxs(ComboboxContext.Provider, { value: {
140
140
  size,
@@ -162,7 +162,7 @@ const ComboboxComponent = forwardRef(({ value, initialValue = [], onValueChange,
162
162
  return;
163
163
  if (disabled)
164
164
  return;
165
- const option = options[value];
165
+ const option = options[prefix(value)];
166
166
  debouncedHandleSelectOption({ option: option });
167
167
  },
168
168
  handleSelectOption: debouncedHandleSelectOption,
@@ -4,6 +4,7 @@ import { useMergeRefs } from '../../../../node_modules/@floating-ui/react/dist/f
4
4
  import { ComboboxContext } from '../ComboboxContext.js';
5
5
  import useDebounce from '../../../../utilities/useDebounce.js';
6
6
  import { useComboboxId, useComboboxIdDispatch } from '../ComboboxIdContext.js';
7
+ import { prefix } from '../useCombobox.js';
7
8
 
8
9
  function useComboboxOption({ id, ref, value, }) {
9
10
  const generatedId = useId();
@@ -15,7 +16,7 @@ function useComboboxOption({ id, ref, value, }) {
15
16
  throw new Error('ComboboxOption must be used within a Combobox');
16
17
  }
17
18
  const { selectedOptions, onOptionClick, listRef, customIds, filteredOptions, } = context;
18
- const index = useMemo(() => filteredOptions.indexOf(value) + customIds.length, [customIds.length, filteredOptions, value]);
19
+ const index = useMemo(() => filteredOptions.indexOf(prefix(String(value))) + customIds.length, [customIds.length, filteredOptions, value]);
19
20
  const combinedRef = useMergeRefs([
20
21
  (node) => {
21
22
  listRef.current[index] = node;
@@ -25,7 +26,7 @@ function useComboboxOption({ id, ref, value, }) {
25
26
  if (index === -1) {
26
27
  throw new Error('Internal error: ComboboxOption did not find index');
27
28
  }
28
- const selected = selectedOptions[value];
29
+ const selected = selectedOptions[prefix(value)];
29
30
  const active = activeIndex === index;
30
31
  useEffect(() => {
31
32
  if (active) {
@@ -6,6 +6,7 @@ import { ChevronUpIcon, ChevronDownIcon } from '@navikt/aksel-icons';
6
6
  import { useMergeRefs } from '../../../../node_modules/@floating-ui/react/dist/floating-ui.react.js';
7
7
  import { ComboboxContext } from '../ComboboxContext.js';
8
8
  import { useComboboxIdDispatch } from '../ComboboxIdContext.js';
9
+ import { prefix } from '../useCombobox.js';
9
10
  import ComboboxChips from './ComboboxChips.js';
10
11
  import ComboboxClearButton from './ComboboxClearButton.js';
11
12
  import { Box } from '../../../Box/Box.js';
@@ -28,10 +29,10 @@ const ComboboxInput = ({ hideClearButton, listId, error, hideChips, handleKeyDow
28
29
  setInputValue(value);
29
30
  setActiveIndex(0);
30
31
  // check if input value is the same as a label, if so, select it
31
- const option = options[value.toLowerCase()];
32
+ const option = options[prefix(value.toLowerCase())];
32
33
  if (!option)
33
34
  return;
34
- if (selectedOptions[option.value])
35
+ if (selectedOptions[prefix(option.value)])
35
36
  return;
36
37
  handleSelectOption({ option: option });
37
38
  };
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
  import { jsx } from 'react/jsx-runtime';
3
+ import { removePrefix } from '../useCombobox.js';
3
4
 
4
5
  const ComboboxNative = ({ selectedOptions, multiple, name, }) => {
5
- return (jsx("select", { name: name, multiple: multiple, style: { display: 'none' }, value: multiple
6
- ? Object.keys(selectedOptions)
7
- : Object.keys(selectedOptions)[0], onChange: () => { }, children: Object.keys(selectedOptions).map((value) => (jsx("option", { value: value }, value))) }));
6
+ const VALUE = Object.keys(selectedOptions).map((key) => removePrefix(key));
7
+ return (jsx("select", { name: name, multiple: multiple, style: { display: 'none' }, value: multiple ? VALUE : VALUE[0], onChange: () => { }, children: VALUE.map((value) => (jsx("option", { value: value }, value))) }));
8
8
  };
9
9
  ComboboxNative.displayName = 'ComboboxNative';
10
10
  var ComboboxNative$1 = ComboboxNative;
@@ -13,6 +13,18 @@ function isComboboxCustom(child) {
13
13
  function isInteractiveComboboxCustom(child) {
14
14
  return isComboboxCustom(child) && child.props.interactive === true;
15
15
  }
16
+ const INTERNAL_OPTION_PREFIX = 'internal-option-';
17
+ /**
18
+ * We use this function to prefix the value of the options so we can make sure numbers as strings are not parsed as numbers in objects
19
+ * @param value
20
+ * @returns
21
+ */
22
+ const prefix = (value) => {
23
+ return INTERNAL_OPTION_PREFIX + value;
24
+ };
25
+ const removePrefix = (value) => {
26
+ return value.slice(INTERNAL_OPTION_PREFIX.length);
27
+ };
16
28
  function useCombobox({ children, inputValue, multiple, filter = (inputValue, option) => {
17
29
  return option.label.toLowerCase().startsWith(inputValue.toLowerCase());
18
30
  }, initialValue, }) {
@@ -60,8 +72,8 @@ function useCombobox({ children, inputValue, multiple, filter = (inputValue, opt
60
72
  });
61
73
  label = childrenLabel;
62
74
  }
63
- allOptions[props.value] = {
64
- value: props.value,
75
+ allOptions[prefix(String(props.value))] = {
76
+ value: String(props.value),
65
77
  label,
66
78
  displayValue: props.displayValue,
67
79
  description: props.description,
@@ -69,7 +81,9 @@ function useCombobox({ children, inputValue, multiple, filter = (inputValue, opt
69
81
  });
70
82
  return allOptions;
71
83
  }, [optionsChildren]);
72
- const preSelectedOptions = useMemo(() => (initialValue || []).reduce((acc, value) => {
84
+ const preSelectedOptions = useMemo(() => (initialValue?.map((key) => {
85
+ return prefix(key);
86
+ }) || []).reduce((acc, value) => {
73
87
  const option = options[value];
74
88
  if (isOption(option)) {
75
89
  acc[value] = option;
@@ -82,15 +96,15 @@ function useCombobox({ children, inputValue, multiple, filter = (inputValue, opt
82
96
  const filteredOptionsChildren = Object.keys(options).map((option, index) => {
83
97
  /* If we have a selected value in single mode and the input matches an option, return all children */
84
98
  if (!multiple && Object.keys(selectedOptions).length === 1) {
85
- filteredOptions.push(options[option].value);
99
+ filteredOptions.push(option);
86
100
  return optionsChildren[index];
87
101
  }
88
102
  if (multiple && selectedOptions[option]) {
89
- filteredOptions.push(options[option].value);
103
+ filteredOptions.push(option);
90
104
  return optionsChildren[index];
91
105
  }
92
106
  if (filter(inputValue, options[option])) {
93
- filteredOptions.push(options[option].value);
107
+ filteredOptions.push(option);
94
108
  return optionsChildren[index];
95
109
  }
96
110
  });
@@ -109,4 +123,4 @@ function useCombobox({ children, inputValue, multiple, filter = (inputValue, opt
109
123
  };
110
124
  }
111
125
 
112
- export { useCombobox as default, isComboboxCustom, isComboboxOption, isInteractiveComboboxCustom };
126
+ export { useCombobox as default, isComboboxCustom, isComboboxOption, isInteractiveComboboxCustom, prefix, removePrefix };
@@ -19,7 +19,7 @@ const Fieldset = forwardRef((props, ref) => {
19
19
  size,
20
20
  disabled: props?.disabled,
21
21
  readOnly,
22
- }, children: jsxs("fieldset", { ...fieldsetProps, className: clsx('fds-fieldset', !hideLegend && 'fds-fieldset--spacing', readOnly && 'fds-fieldset--readonly', props?.disabled && 'fds-fieldset--disabled', className), ref: ref, ...rest, children: [jsx(Label, { asChild: true, size: size, children: jsx("legend", { className: 'fds-fieldset__legend', children: jsxs("span", { className: clsx('fds-fieldset__legend__content', hideLegend && `fds-sr-only`), children: [readOnly && (jsx(PadlockLockedFillIcon, { className: 'fds-fieldset__readonly__icon', "aria-hidden": true })), legend] }) }) }), description && (jsx(Paragraph, { size: size, variant: 'short', asChild: true, children: jsx("div", { id: descriptionId, className: clsx('fds-fieldset__description', hideLegend && `fds-sr-only`), children: description }) })), children, jsx("div", { id: errorId, "aria-live": 'polite', "aria-relevant": 'additions removals', className: 'fds-fieldset__error-message', children: hasError && jsx(ErrorMessage, { size: size, children: error }) })] }) }));
22
+ }, children: jsxs("fieldset", { ...fieldsetProps, className: clsx('fds-fieldset', !hideLegend && 'fds-fieldset--spacing', readOnly && 'fds-fieldset--readonly', className), disabled: props?.disabled, ref: ref, ...rest, children: [jsx(Label, { asChild: true, size: size, children: jsx("legend", { className: 'fds-fieldset__legend', children: jsxs("span", { className: clsx('fds-fieldset__legend__content', hideLegend && `fds-sr-only`), children: [readOnly && (jsx(PadlockLockedFillIcon, { className: 'fds-fieldset__readonly__icon', "aria-hidden": true })), legend] }) }) }), description && (jsx(Paragraph, { size: size, variant: 'short', asChild: true, children: jsx("div", { id: descriptionId, className: clsx('fds-fieldset__description', hideLegend && `fds-sr-only`), children: description }) })), children, jsx("div", { id: errorId, "aria-live": 'polite', "aria-relevant": 'additions removals', className: 'fds-fieldset__error-message', children: hasError && jsx(ErrorMessage, { size: size, children: error }) })] }) }));
23
23
  });
24
24
  Fieldset.displayName = 'Fieldset';
25
25
 
@@ -12,7 +12,7 @@ import { Paragraph } from '../../Typography/Paragraph/Paragraph.js';
12
12
  const NativeSelect = forwardRef((props, ref) => {
13
13
  const { children, disabled = false, label, description, hideLabel = false, error, className, htmlSize = 0, ...rest } = props;
14
14
  const { selectProps, descriptionId, errorId, readOnly = false, size = 'md', } = useNativeSelect(props);
15
- return (jsx(Paragraph, { asChild: true, size: size, children: jsxs("div", { className: clsx('fds-native-select--container', disabled && 'fds-native-select--disabled', readOnly && 'fds-native-select--readonly', error && 'fds-native-select--error'), children: [label && (jsxs(Label, { weight: 'medium', size: size, htmlFor: selectProps.id, className: clsx('fds-native-select__label', hideLabel && 'fds-sr-only'), children: [readOnly && (jsx(PadlockLockedFillIcon, { "aria-hidden": true, className: 'fds-native-select__readonly__icon' })), label] })), description && (jsx(Paragraph, { asChild: true, size: size, children: jsx("div", { id: descriptionId, className: clsx(`fds-native-select__description`, hideLabel && `fds-sr-only`), children: description }) })), jsx("select", { disabled: disabled || readOnly, ref: ref, size: htmlSize, className: clsx('fds-native-select', `fds-native-select--${size}`, `fds-focus`, props.multiple && 'fds-native-select--multiple', className), ...omit(['size', 'error', 'errorId'], rest), ...omit(['readOnly', 'disabled'], selectProps), children: children }), error && (jsx("div", { id: errorId, className: 'fds-native-select__error-message', "aria-live": 'polite', "aria-relevant": 'additions removals', children: jsx(ErrorMessage, { size: size, children: error }) }))] }) }));
15
+ return (jsx(Paragraph, { asChild: true, size: size, children: jsxs("div", { className: clsx('fds-native-select--container', readOnly && 'fds-native-select--readonly', error && 'fds-native-select--error'), children: [label && (jsxs(Label, { weight: 'medium', size: size, htmlFor: selectProps.id, className: clsx('fds-native-select__label', hideLabel && 'fds-sr-only'), children: [readOnly && (jsx(PadlockLockedFillIcon, { "aria-hidden": true, className: 'fds-native-select__readonly__icon' })), label] })), description && (jsx(Paragraph, { asChild: true, size: size, children: jsx("div", { id: descriptionId, className: clsx(`fds-native-select__description`, hideLabel && `fds-sr-only`), children: description }) })), jsx("select", { disabled: disabled || readOnly, ref: ref, size: htmlSize, className: clsx('fds-native-select', `fds-native-select--${size}`, `fds-focus`, props.multiple && 'fds-native-select--multiple', className), ...omit(['size', 'error', 'errorId'], rest), ...omit(['readOnly', 'disabled'], selectProps), children: children }), error && (jsx("div", { id: errorId, className: 'fds-native-select__error-message', "aria-live": 'polite', "aria-relevant": 'additions removals', children: jsx(ErrorMessage, { size: size, children: error }) }))] }) }));
16
16
  });
17
17
  NativeSelect.displayName = 'NativeSelect';
18
18
 
@@ -10,7 +10,7 @@ import { Label } from '../../Typography/Label/Label.js';
10
10
  const Radio = forwardRef((props, ref) => {
11
11
  const { children, description, className, style, ...rest } = props;
12
12
  const { inputProps, descriptionId, hasError, size = 'md', readOnly, } = useRadio(props);
13
- return (jsx(Paragraph, { asChild: true, size: size, children: jsxs("div", { className: clsx('fds-radio', `fds-radio--${size}`, inputProps.disabled && `fds-radio--disabled`, hasError && `fds-radio--error`, readOnly && `fds-radio--readonly`, className), style: style, children: [jsx("input", { className: 'fds-radio__input', ref: ref, ...omit(['size', 'error'], rest), ...inputProps }), children && (jsxs(Fragment, { children: [jsx(Label, { className: 'fds-radio__label', htmlFor: inputProps.id, size: size, weight: 'regular', children: jsx("span", { children: children }) }), description && (jsx(Paragraph, { asChild: true, size: size, children: jsx("div", { id: descriptionId, className: 'fds-radio__description', children: description }) }))] }))] }) }));
13
+ return (jsx(Paragraph, { asChild: true, size: size, children: jsxs("div", { className: clsx('fds-radio', `fds-radio--${size}`, hasError && `fds-radio--error`, readOnly && `fds-radio--readonly`, className), style: style, children: [jsx("input", { className: 'fds-radio__input', disabled: inputProps.disabled, ref: ref, ...omit(['size', 'error'], rest), ...inputProps }), children && (jsxs(Fragment, { children: [jsx(Label, { className: 'fds-radio__label', htmlFor: inputProps.id, size: size, weight: 'regular', children: jsx("span", { children: children }) }), description && (jsx(Paragraph, { asChild: true, size: size, children: jsx("div", { id: descriptionId, className: 'fds-radio__description', children: description }) }))] }))] }) }));
14
14
  });
15
15
  Radio.displayName = 'Radio';
16
16
 
@@ -11,7 +11,7 @@ import { Label } from '../../Typography/Label/Label.js';
11
11
  const Switch = forwardRef((props, ref) => {
12
12
  const { children, description, position = 'left', className, ...rest } = props;
13
13
  const { inputProps, descriptionId, size = 'md', readOnly, } = useSwitch(props);
14
- return (jsx(Paragraph, { asChild: true, size: size, children: jsxs("div", { className: clsx(`fds-switch`, `fds-switch--${size}`, inputProps.disabled && `fds-switch--disabled`, readOnly && `fds-switch--readonly`, className), children: [jsx("input", { className: `fds-switch__input`, ref: ref, ...omit(['size', 'error'], rest), ...inputProps }), jsxs(Label, { className: clsx(`fds-switch__label`, position === 'right' && `fds-switch__label--right`), htmlFor: inputProps.id, size: size, weight: 'regular', children: [jsx("span", { className: `fds-switch__track`, children: jsx("span", { className: `fds-switch__thumb` }) }), readOnly && (jsx(PadlockLockedFillIcon, { "aria-hidden": true, className: `fds-switch__readonly__icon` })), children && jsx("span", { children: children })] }), description && (jsx(Paragraph, { asChild: true, size: size, children: jsx("div", { id: descriptionId, className: `fds-switch__description`, children: description }) }))] }) }));
14
+ return (jsx(Paragraph, { asChild: true, size: size, children: jsxs("div", { className: clsx(`fds-switch`, `fds-switch--${size}`, inputProps.disabled && `fds-switch--disabled`, readOnly && `fds-switch--readonly`, className), children: [jsx("input", { className: `fds-switch__input`, disabled: inputProps.disabled, ref: ref, ...omit(['size', 'error'], rest), ...inputProps }), jsxs(Label, { className: clsx(`fds-switch__label`, position === 'right' && `fds-switch__label--right`), htmlFor: inputProps.id, size: size, weight: 'regular', children: [jsx("span", { className: `fds-switch__track`, children: jsx("span", { className: `fds-switch__thumb` }) }), readOnly && (jsx(PadlockLockedFillIcon, { "aria-hidden": true, className: `fds-switch__readonly__icon` })), children && jsx("span", { children: children })] }), description && (jsx(Paragraph, { asChild: true, size: size, children: jsx("div", { id: descriptionId, className: `fds-switch__description`, children: description }) }))] }) }));
15
15
  });
16
16
  Switch.displayName = 'Switch';
17
17
 
@@ -24,7 +24,7 @@ const Textarea = forwardRef((props, ref) => {
24
24
  const characterLimitId = `${textareaProps.id}-charactercount}`;
25
25
  const hasCharacterLimit = characterLimit != null;
26
26
  const describedBy = clsx(textareaProps['aria-describedby'], hasCharacterLimit && characterLimitId) || undefined;
27
- return (jsx(Paragraph, { asChild: true, size: size, children: jsxs("div", { style: style, className: clsx('fds-textarea', `fds-textarea--${size}`, textareaProps.disabled && 'fds-textarea--disabled', readOnly && `fds-textarea--readonly`, hasError && `fds-textarea--error`, className), children: [label && (jsxs(Label, { size: size, weight: 'medium', htmlFor: textareaProps.id, className: clsx('fds-textarea__label', hideLabel && `fds-sr-only`), children: [readOnly && (jsx(PadlockLockedFillIcon, { "aria-hidden": true, className: 'fds-textarea__readonly__icon' })), jsx("span", { children: label })] })), description && (jsx(Paragraph, { asChild: true, size: size, children: jsx("div", { id: descriptionId, className: clsx('fds-textarea__description', hideLabel && `fds-sr-only`), children: description }) })), jsx("textarea", { className: clsx('fds-textarea__input', `fds-focus`), ref: ref, "aria-describedby": describedBy, ...omit(['size', 'error', 'errorId'], rest), ...textareaProps, onChange: (e) => {
27
+ return (jsx(Paragraph, { asChild: true, size: size, children: jsxs("div", { style: style, className: clsx('fds-textarea', `fds-textarea--${size}`, hasError && `fds-textarea--error`, className), children: [label && (jsxs(Label, { size: size, weight: 'medium', htmlFor: textareaProps.id, className: clsx('fds-textarea__label', hideLabel && `fds-sr-only`), children: [readOnly && (jsx(PadlockLockedFillIcon, { "aria-hidden": true, className: 'fds-textarea__readonly-icon' })), jsx("span", { children: label })] })), description && (jsx(Paragraph, { asChild: true, size: size, children: jsx("div", { id: descriptionId, className: clsx('fds-textarea__description', hideLabel && `fds-sr-only`), children: description }) })), jsx("textarea", { className: clsx('fds-textarea__input', `fds-focus`), ref: ref, "aria-describedby": describedBy, disabled: textareaProps.disabled, readOnly: readOnly, ...omit(['size', 'error', 'errorId'], rest), ...textareaProps, onChange: (e) => {
28
28
  textareaProps?.onChange?.(e);
29
29
  setValue(e.target.value);
30
30
  } }), hasCharacterLimit && (jsx(CharacterCounter, { size: size, value: value ? value.toString() : '', id: characterLimitId, ...characterLimit })), jsx("div", { className: 'fds-textarea__error-message', id: errorId, "aria-live": 'polite', "aria-relevant": 'additions removals', children: hasError && jsx(ErrorMessage, { size: size, children: props.error }) })] }) }));
@@ -24,7 +24,7 @@ const Textfield = forwardRef((props, ref) => {
24
24
  const characterLimitId = `textfield-charactercount-${useId()}`;
25
25
  const hasCharacterLimit = characterLimit != null;
26
26
  const describedBy = clsx(inputProps['aria-describedby'], hasCharacterLimit && characterLimitId) || undefined;
27
- return (jsx(Paragraph, { asChild: true, size: size, children: jsxs("div", { style: style, className: clsx(`fds-textfield`, `fds-textfield--${size}`, inputProps.disabled && `fds-textfield--disabled`, readOnly && `fds-textfield--readonly`, hasError && `fds-textfield--error`, className), children: [label && (jsxs(Label, { size: size, weight: 'medium', htmlFor: inputProps.id, className: clsx(`fds-textfield__label`, hideLabel && `fds-sr-only`), children: [readOnly && (jsx(PadlockLockedFillIcon, { "aria-hidden": true, className: 'fds-textfield__readonly__icon' })), jsx("span", { children: label })] })), description && (jsx(Paragraph, { asChild: true, size: size, children: jsx("div", { id: descriptionId, className: clsx(`fds-textfield__description`, hideLabel && `fds-sr-only`), children: description }) })), jsxs("div", { className: 'fds-textfield__field', children: [prefix && (jsx(Paragraph, { asChild: true, size: size, variant: 'short', children: jsx("div", { className: clsx(`fds-textfield__adornment`, `fds-textfield__prefix`), "aria-hidden": 'true', children: prefix }) })), jsx("input", { className: clsx(`fds-textfield__input`, `fds-focus`, prefix && `fds-textfield__input--with-prefix`, suffix && `fds-textfield__input--with-suffix`), ref: ref, type: type, "aria-describedby": describedBy, size: htmlSize, ...omit(['size', 'error', 'errorId'], rest), ...inputProps, onChange: (e) => {
27
+ return (jsx(Paragraph, { asChild: true, size: size, children: jsxs("div", { style: style, className: clsx(`fds-textfield`, `fds-textfield--${size}`, readOnly && `fds-textfield--readonly`, hasError && `fds-textfield--error`, className), children: [label && (jsxs(Label, { size: size, weight: 'medium', htmlFor: inputProps.id, className: clsx(`fds-textfield__label`, hideLabel && `fds-sr-only`), children: [readOnly && (jsx(PadlockLockedFillIcon, { "aria-hidden": true, className: 'fds-textfield__readonly__icon' })), jsx("span", { children: label })] })), description && (jsx(Paragraph, { asChild: true, size: size, children: jsx("div", { id: descriptionId, className: clsx(`fds-textfield__description`, hideLabel && `fds-sr-only`), children: description }) })), jsxs("div", { className: 'fds-textfield__field', children: [prefix && (jsx(Paragraph, { asChild: true, size: size, variant: 'short', children: jsx("div", { className: clsx(`fds-textfield__adornment`, `fds-textfield__prefix`), "aria-hidden": 'true', children: prefix }) })), jsx("input", { className: clsx(`fds-textfield__input`, `fds-focus`, prefix && `fds-textfield__input--with-prefix`, suffix && `fds-textfield__input--with-suffix`), ref: ref, type: type, disabled: inputProps.disabled, "aria-describedby": describedBy, size: htmlSize, ...omit(['size', 'error', 'errorId'], rest), ...inputProps, onChange: (e) => {
28
28
  inputProps?.onChange?.(e);
29
29
  setInputValue(e.target.value);
30
30
  } }), suffix && (jsx(Paragraph, { asChild: true, size: size, variant: 'short', children: jsx("div", { className: clsx(`fds-textfield__adornment`, `fds-textfield__suffix`), "aria-hidden": 'true', children: suffix }) }))] }), hasCharacterLimit && (jsx(CharacterCounter, { size: size, value: inputValue ? inputValue.toString() : '', id: characterLimitId, ...characterLimit })), jsx("div", { className: 'fds-textfield__error-message', id: errorId, "aria-live": 'polite', "aria-relevant": 'additions removals', children: hasError && jsx(ErrorMessage, { size: size, children: props.error }) })] }) }));
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import _extends from '../node_modules/@babel/runtime/helpers/esm/extends.js';
2
+ import _extends from '../../../@babel/runtime/helpers/esm/extends.js';
3
3
  import { forwardRef, Children, isValidElement, createElement, cloneElement, Fragment } from 'react';
4
4
  import { composeRefs as $6ed0406888f73fc4$export$43e446d32b3d21af } from '../../react-compose-refs/dist/index.js';
5
5
 
@@ -16,8 +16,10 @@ function getSize(size) {
16
16
  case 'xlarge':
17
17
  return 'xl';
18
18
  case 'xxlarge':
19
+ case '2xlarge':
19
20
  return '2xl';
20
21
  case 'xxxlarge':
22
+ case '3xlarge':
21
23
  return '3xl';
22
24
  case 'xxxxlarge':
23
25
  return '4xl';
@@ -2,7 +2,7 @@ import { type HeadingProps } from '../Typography';
2
2
  export type ListHeadingProps = HeadingProps;
3
3
  export declare const ListHeading: import("react").ForwardRefExoticComponent<{
4
4
  level?: 1 | 2 | 3 | 4 | 5 | 6 | undefined;
5
- size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | ("xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "2xlarge" | "3xlarge") | undefined;
5
+ size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | ("xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "2xlarge") | undefined;
6
6
  spacing?: boolean | undefined;
7
7
  asChild?: boolean | undefined;
8
8
  } & import("react").HTMLAttributes<HTMLHeadingElement> & import("react").RefAttributes<HTMLHeadingElement>>;
@@ -1,5 +1,5 @@
1
1
  import type { HTMLAttributes } from 'react';
2
- type OldHeadingSizes = 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge' | '3xlarge';
2
+ type OldHeadingSizes = 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge';
3
3
  export type HeadingProps = {
4
4
  /** Heading level. This will translate into any h1-6 level unless `as` is defined */
5
5
  level?: 1 | 2 | 3 | 4 | 5 | 6;
@@ -8,7 +8,7 @@ export type HeadingProps = {
8
8
  *
9
9
  * @note `xxsmall`, `xsmall`, `small`, `medium`, `large`, `xlarge`, `2xlarge`, `3xlarge` is deprecated
10
10
  */
11
- size?: '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | OldHeadingSizes;
11
+ size?: '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | OldHeadingSizes;
12
12
  /** Adds margin-bottom */
13
13
  spacing?: boolean;
14
14
  /**
@@ -26,7 +26,7 @@ export declare const Heading: import("react").ForwardRefExoticComponent<{
26
26
  *
27
27
  * @note `xxsmall`, `xsmall`, `small`, `medium`, `large`, `xlarge`, `2xlarge`, `3xlarge` is deprecated
28
28
  */
29
- size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | OldHeadingSizes | undefined;
29
+ size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | OldHeadingSizes | undefined;
30
30
  /** Adds margin-bottom */
31
31
  spacing?: boolean | undefined;
32
32
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../../../src/components/Typography/Heading/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,OAAO,CAAC;AAOzD,KAAK,eAAe,GAChB,SAAS,GACT,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,MAAM,YAAY,GAAG;IACzB,oFAAoF;IACpF,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAA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,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Combobox/Combobox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAMpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAMzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAY5C,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC1C;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,E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AE,MAAM,CAAC,CAAC;AAE5D,eAAO,MAAM,iBAAiB;IA5F5B;;OAEG;;IAEH;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;6BACqB,MAAM,EAAE,KAAK,IAAI;IACzC;;;OAGG;;IAEH;;OAEG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;;OAIG;;IAEH;;OAEG;;IAEH;;;;OAIG;;IAEH;;;OAGG;;IAEH;;;;;;;OAOG;2BACmB,MAAM,UAAU,MAAM,KAAK,OAAO;IACxD;;;;;;OAMG;4BACoB,MAAM,KAAK,MAAM;;;;;;;;;oKA0WzC,CAAC;AAEF,eAAO,MAAM,QAAQ;IAncnB;;OAEG;;IAEH;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;6BACqB,MAAM,EAAE,KAAK,IAAI;IACzC;;;OAGG;;IAEH;;OAEG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;;OAIG;;IAEH;;OAEG;;IAEH;;;;OAIG;;IAEH;;;OAGG;;IAEH;;;;;;;OAOG;2BACmB,MAAM,UAAU,MAAM,KAAK,OAAO;IACxD;;;;;;OAMG;4BACoB,MAAM,KAAK,MAAM;;;;;;;;;oKAqXzC,CAAC"}
@@ -6,7 +6,7 @@ type UseComboboxOptionProps = {
6
6
  export default function useComboboxOption({ id, ref, value, }: UseComboboxOptionProps): {
7
7
  id: string;
8
8
  ref: ((instance: HTMLButtonElement | null) => void) | null;
9
- selected: import("packages/react/src/components/form/Combobox/useCombobox").Option;
9
+ selected: import("../useCombobox").Option;
10
10
  active: boolean;
11
11
  onOptionClick: (...args: never[]) => void;
12
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useComboboxOption.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/Combobox/Option/useComboboxOption.tsx"],"names":[],"mappings":"AAOA,KAAK,sBAAsB,GAAG;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,EAAE,EACF,GAAG,EACH,KAAK,GACN,EAAE,sBAAsB;;;;;;EAoDxB"}
1
+ {"version":3,"file":"useComboboxOption.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/Combobox/Option/useComboboxOption.tsx"],"names":[],"mappings":"AAQA,KAAK,sBAAsB,GAAG;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,EAAE,EACF,GAAG,EACH,KAAK,GACN,EAAE,sBAAsB;;;;;;EAoDxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComboboxInput.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/Combobox/internal/ComboboxInput.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,KAAK,kBAAkB,GAAG;IACxB,eAAe,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9B,SAAS,EAAE,WAAW,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;IACnD,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;CACrD,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,CAAC;AAE9D,eAAO,MAAM,aAAa;4EAOvB,kBAAkB;;CAgIpB,CAAC;AAIF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"ComboboxInput.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/Combobox/internal/ComboboxInput.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD,KAAK,kBAAkB,GAAG;IACxB,eAAe,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9B,SAAS,EAAE,WAAW,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;IACnD,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;CACrD,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,CAAC;AAE9D,eAAO,MAAM,aAAa;4EAOvB,kBAAkB;;CAgIpB,CAAC;AAIF,eAAe,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComboboxNative.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/Combobox/internal/ComboboxNative.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,KAAK,mBAAmB,GAAG;IACzB,eAAe,EAAE;QACf,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;IACF,QAAQ,EAAE,WAAW,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC;IACjD,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,cAAc;2CAIxB,mBAAmB;;CAqBrB,CAAC;AAIF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"ComboboxNative.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/Combobox/internal/ComboboxNative.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,KAAK,mBAAmB,GAAG;IACzB,eAAe,EAAE;QACf,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;IACF,QAAQ,EAAE,WAAW,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC;IACjD,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,cAAc;2CAIxB,mBAAmB;;CAmBrB,CAAC;AAIF,eAAe,cAAc,CAAC"}
@@ -18,6 +18,13 @@ export type Option = {
18
18
  export declare function isComboboxOption(child: ReactNode): child is ReactElement<ComboboxOptionProps>;
19
19
  export declare function isComboboxCustom(child: ReactNode): child is ReactElement<ComboboxCustomProps>;
20
20
  export declare function isInteractiveComboboxCustom(child: ReactNode): child is ReactElement<ComboboxCustomProps>;
21
+ /**
22
+ * We use this function to prefix the value of the options so we can make sure numbers as strings are not parsed as numbers in objects
23
+ * @param value
24
+ * @returns
25
+ */
26
+ export declare const prefix: (value?: string) => string;
27
+ export declare const removePrefix: (value: string) => string;
21
28
  export default function useCombobox({ children, inputValue, multiple, filter, initialValue, }: UseComboboxProps): {
22
29
  filteredOptionsChildren: (ReactElement<ComboboxOptionProps, string | import("react").JSXElementConstructor<any>> | undefined)[];
23
30
  filteredOptions: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"useCombobox.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Combobox/useCombobox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,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AAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAGpD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9C,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAIF,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,GACf,KAAK,IAAI,YAAY,CAAC,mBAAmB,CAAC,CAE5C;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,GACf,KAAK,IAAI,YAAY,CAAC,mBAAmB,CAAC,CAE5C;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,SAAS,GACf,KAAK,IAAI,YAAY,CAAC,mBAAmB,CAAC,CAE5C;AAID;;;;GAIG;AACH,eAAO,MAAM,MAAM,WAAY,MAAM,KAAG,MAEvC,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,MAAM,KAAG,MAE5C,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,MAEC,EACD,YAAY,GACb,EAAE,gBAAgB;;;;;;;;;;;;;;;EAuIlB"}
@@ -1 +1 @@
1
- {"version":3,"file":"NativeSelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/NativeSelect/NativeSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,SAAS,EAAE,oBAAoB,EAAE,M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,CAAC"}
1
+ {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAO5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAItD,MAAM,MAAM,WAAW,GAAG;IACxB,mBAAmB;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC,GAClD,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;AAEhE,eAAO,MAAM,MAAM;IAXjB,mBAAmB;eACR,SAAS;IACpB,mCAAmC;;IAEnC;;OAEG;;uKAgFJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Textfield.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Textfield/Textfield.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAO5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAK/D,KAAK,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD,MAAM,MAAM,cAAc,GAAG;IAC3B,YAAY;IACZ,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,qFAAqF;IACrF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,iBAAiB,CAAC;IAC9C,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8BAA8B;IAC9B,IAAI,CAAC,EACD,MAAM,GACN,gBAAgB,GAChB,OAAO,GACP,MAAM,GACN,OAAO,GACP,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,KAAK,GACL,MAAM,GACN,MAAM,GACN,KAAK,GACL,MAAM,CAAC;IACX;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,GAC9B,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,CAAC;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,SAAS;IArDpB,YAAY;YACJ,SAAS;IACjB,qFAAqF;;IAErF;;;;OAIG;;IAEH,wBAAwB;;IAExB,wBAAwB;;IAExB,8BAA8B;;IAe9B;;;;;;;;OAQG;;IAEH;;OAEG;;yIAyKJ,CAAC"}
1
+ {"version":3,"file":"Textfield.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Textfield/Textfield.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAO5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAK/D,KAAK,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD,MAAM,MAAM,cAAc,GAAG;IAC3B,YAAY;IACZ,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,qFAAqF;IACrF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,iBAAiB,CAAC;IAC9C,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8BAA8B;IAC9B,IAAI,CAAC,EACH,MAAM,GACN,gBAAgB,GAChB,OAAO,GACP,MAAM,GACN,OAAO,GACP,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,KAAK,GACL,MAAM,GACN,MAAM,GACN,KAAK,GACL,MAAM,CAAC;IACT;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,GAC9B,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,CAAC;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,SAAS;IArDpB,YAAY;YACJ,SAAS;IACjB,qFAAqF;;IAErF;;;;OAIG;;IAEH,wBAAwB;;IAExB,wBAAwB;;IAExB,8BAA8B;;IAe9B;;;;;;;;OAQG;;IAEH;;OAEG;;yIAyKJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getSize.d.ts","sourceRoot":"","sources":["../../../src/utilities/getSize.ts"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,UAyBnC"}
1
+ {"version":3,"file":"getSize.d.ts","sourceRoot":"","sources":["../../../src/utilities/getSize.ts"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,UA2BnC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digdir/designsystemet-react",
3
- "version": "0.62.0",
3
+ "version": "0.63.0",
4
4
  "description": "React components for Designsystemet",
5
5
  "author": "Designsystemet team",
6
6
  "repository": "https://github.com/digdir/designsystemet",
@@ -39,5 +39,5 @@
39
39
  "rollup": "^4.12.1",
40
40
  "typescript": "^5.4.2"
41
41
  },
42
- "gitHead": "1e5c96601e637b59585362632c539dfc214b8270"
42
+ "gitHead": "245eb9f42ec347248133be61b1e690679cb96000"
43
43
  }