@dfds-ui/forms 2.2.0-alpha.8b995955 → 2.2.0-alpha.b8d61c36

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 (101) hide show
  1. package/assistive-text/AssistiveText.d.ts +2 -2
  2. package/asterisk/Asterisk.d.ts +3 -3
  3. package/asterisk/Asterisk.js +2 -2
  4. package/checkbox/Checkbox.d.ts +2 -2
  5. package/checkbox/Checkbox.js +3 -3
  6. package/checkbox/CheckboxContext.d.ts +2 -1
  7. package/checkbox/CheckboxGroup.d.ts +3 -3
  8. package/checkbox/CheckboxGroup.js +3 -3
  9. package/cjs/assistive-text/AssistiveText.d.ts +2 -2
  10. package/cjs/assistive-text/AssistiveText.js +1 -1
  11. package/cjs/asterisk/Asterisk.d.ts +3 -3
  12. package/cjs/asterisk/Asterisk.js +2 -2
  13. package/cjs/checkbox/Checkbox.d.ts +2 -2
  14. package/cjs/checkbox/Checkbox.js +2 -2
  15. package/cjs/checkbox/CheckboxContext.d.ts +2 -1
  16. package/cjs/checkbox/CheckboxContext.js +1 -2
  17. package/cjs/checkbox/CheckboxGroup.d.ts +3 -3
  18. package/cjs/checkbox/CheckboxGroup.js +2 -2
  19. package/cjs/counter/Counter.d.ts +2 -2
  20. package/cjs/counter/Counter.js +2 -3
  21. package/cjs/enhanced/EnhancedField.d.ts +4 -4
  22. package/cjs/enhanced/EnhancedField.js +2 -3
  23. package/cjs/error-text/ErrorText.d.ts +2 -2
  24. package/cjs/error-text/ErrorText.js +1 -1
  25. package/cjs/field-wrap/FieldWrap.d.ts +3 -3
  26. package/cjs/field-wrap/FieldWrap.js +2 -2
  27. package/cjs/help-icon/HelpIcon.d.ts +3 -3
  28. package/cjs/help-icon/HelpIcon.js +1 -1
  29. package/cjs/label/Label.d.ts +2 -2
  30. package/cjs/label/Label.js +2 -2
  31. package/cjs/password-field/PasswordField.d.ts +1 -1
  32. package/cjs/password-field/PasswordField.js +3 -4
  33. package/cjs/radio/Radio.d.ts +3 -3
  34. package/cjs/radio/Radio.js +2 -2
  35. package/cjs/radio/RadioContext.d.ts +2 -1
  36. package/cjs/radio/RadioContext.js +1 -2
  37. package/cjs/radio/RadioGroup.d.ts +3 -3
  38. package/cjs/radio/RadioGroup.js +1 -1
  39. package/cjs/rating/Rating.d.ts +3 -3
  40. package/cjs/rating/Rating.js +2 -3
  41. package/cjs/select-field/AsyncSelectField.d.ts +96 -4
  42. package/cjs/select-field/AsyncSelectField.js +2 -2
  43. package/cjs/select-field/CreatableSelectField.d.ts +97 -5
  44. package/cjs/select-field/CreatableSelectField.js +2 -2
  45. package/cjs/select-field/NativeSelectField.d.ts +2 -2
  46. package/cjs/select-field/NativeSelectField.js +2 -3
  47. package/cjs/select-field/SelectField.d.ts +7 -7
  48. package/cjs/select-field/SelectField.js +3 -4
  49. package/cjs/switch/Switch.d.ts +3 -3
  50. package/cjs/switch/Switch.js +3 -4
  51. package/cjs/switch/SwitchContext.d.ts +2 -1
  52. package/cjs/switch/SwitchContext.js +1 -2
  53. package/cjs/switch/SwitchGroup.d.ts +3 -3
  54. package/cjs/switch/SwitchGroup.js +1 -1
  55. package/cjs/tel-field/TelField.d.ts +2 -2
  56. package/cjs/tel-field/TelField.js +3 -4
  57. package/cjs/text-field/TextField.d.ts +3 -3
  58. package/cjs/text-field/TextField.js +2 -3
  59. package/cjs/textarea-field/TextareaField.d.ts +2 -2
  60. package/cjs/textarea-field/TextareaField.js +2 -3
  61. package/cjs/types/field.d.ts +1 -1
  62. package/cjs/types/size.d.ts +1 -1
  63. package/counter/Counter.d.ts +2 -2
  64. package/counter/Counter.js +7 -7
  65. package/enhanced/EnhancedField.d.ts +4 -4
  66. package/enhanced/EnhancedField.js +3 -3
  67. package/error-text/ErrorText.d.ts +2 -2
  68. package/field-wrap/FieldWrap.d.ts +3 -3
  69. package/field-wrap/FieldWrap.js +1 -1
  70. package/help-icon/HelpIcon.d.ts +3 -3
  71. package/label/Label.d.ts +2 -2
  72. package/label/Label.js +3 -3
  73. package/package.json +10 -10
  74. package/password-field/PasswordField.d.ts +1 -1
  75. package/password-field/PasswordField.js +5 -5
  76. package/radio/Radio.d.ts +3 -3
  77. package/radio/Radio.js +4 -4
  78. package/radio/RadioContext.d.ts +2 -1
  79. package/radio/RadioGroup.d.ts +3 -3
  80. package/rating/Rating.d.ts +3 -3
  81. package/rating/Rating.js +8 -8
  82. package/select-field/AsyncSelectField.d.ts +96 -4
  83. package/select-field/AsyncSelectField.js +4 -4
  84. package/select-field/CreatableSelectField.d.ts +97 -5
  85. package/select-field/CreatableSelectField.js +6 -6
  86. package/select-field/NativeSelectField.d.ts +2 -2
  87. package/select-field/NativeSelectField.js +3 -3
  88. package/select-field/SelectField.d.ts +7 -7
  89. package/select-field/SelectField.js +6 -6
  90. package/switch/Switch.d.ts +3 -3
  91. package/switch/Switch.js +3 -3
  92. package/switch/SwitchContext.d.ts +2 -1
  93. package/switch/SwitchGroup.d.ts +3 -3
  94. package/tel-field/TelField.d.ts +2 -2
  95. package/tel-field/TelField.js +8 -8
  96. package/text-field/TextField.d.ts +3 -3
  97. package/text-field/TextField.js +3 -3
  98. package/textarea-field/TextareaField.d.ts +2 -2
  99. package/textarea-field/TextareaField.js +7 -7
  100. package/types/field.d.ts +1 -1
  101. package/types/size.d.ts +1 -1
@@ -9,9 +9,8 @@ var _FieldWrap = require("../field-wrap/FieldWrap");
9
9
  var _react2 = require("@emotion/react");
10
10
  var _theme = require("@dfds-ui/theme");
11
11
  var _typography = require("@dfds-ui/typography");
12
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } // Paddings applied to the input fields on rem units.
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } // Paddings applied to the input fields on rem units.
15
14
  const inputPaddings = {
16
15
  small: {
17
16
  vertical: 0.5,
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
2
2
  /**
3
3
  * Generic FieldProps
4
4
  */
5
- export type BaseFieldProps = {
5
+ export declare type BaseFieldProps = {
6
6
  /**
7
7
  * Assistive text describing the field.
8
8
  *
@@ -1 +1 @@
1
- export type Size = 'small' | 'medium' | 'large';
1
+ export declare type Size = 'small' | 'medium' | 'large';
@@ -1,6 +1,6 @@
1
1
  import React, { ReactNode } from 'react';
2
- type Size = 's' | 'm';
3
- export type CounterProps = {
2
+ declare type Size = 's' | 'm';
3
+ export declare type CounterProps = {
4
4
  /**
5
5
  * Minimum value
6
6
  */
@@ -1,13 +1,13 @@
1
1
  var _excluded = ["defaultValue", "minValue", "maxValue", "disableMin", "disableMax", "disableInput", "className", "increaseAriaLabel", "decreaseAriaLabel", "name", "onChange", "text", "value", "size", "disableToolTips"];
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) { ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } } return n; }, _extends.apply(null, arguments); }
3
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
4
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
5
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
6
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) { n[e] = r[e]; } return n; }
7
7
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) { ; } } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
8
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
9
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
8
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
9
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) { o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; }
10
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } } return t; }
11
11
  function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
12
12
  import React, { useState, forwardRef, useRef, useEffect } from 'react';
13
13
  import { IconButton } from '@dfds-ui/react-components';
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- type ReactInputProps = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
3
- export type EnhancedInputProps<TValue> = Omit<EnhancedFieldProps, 'value'> & {
2
+ declare type ReactInputProps = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
3
+ export declare type EnhancedInputProps<TValue> = Omit<EnhancedFieldProps, 'value'> & {
4
4
  value?: TValue;
5
5
  };
6
- export type EnhancedFieldProps = Omit<ReactInputProps, 'size' | 'css'> & {
6
+ export declare type EnhancedFieldProps = Omit<ReactInputProps, 'size' | 'css'> & {
7
7
  name?: string;
8
8
  /**
9
9
  * Label to be displayed
@@ -16,5 +16,5 @@ export type EnhancedFieldProps = Omit<ReactInputProps, 'size' | 'css'> & {
16
16
  className?: string;
17
17
  onClick?: (e: React.MouseEvent<HTMLInputElement, MouseEvent>) => void;
18
18
  };
19
- export declare const EnhancedField: React.ForwardRefExoticComponent<Pick<EnhancedFieldProps, "max" | "required" | "type" | "key" | "id" | "height" | "width" | "name" | "min" | "color" | "translate" | "value" | "hidden" | "form" | "label" | "slot" | "style" | "title" | "dir" | "pattern" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "role" | "children" | "contentEditable" | "enterKeyHint" | "inputMode" | "tabIndex" | "disabled" | "multiple" | "icon" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "list" | "maxLength" | "minLength" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "readOnly" | "src" | "step" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLInputElement>>;
19
+ export declare const EnhancedField: React.ForwardRefExoticComponent<Omit<EnhancedFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
20
20
  export default EnhancedField;
@@ -1,7 +1,7 @@
1
1
  var _excluded = ["onClick", "className", "label", "icon", "disabled", "name"];
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
2
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) { ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } } return n; }, _extends.apply(null, arguments); }
3
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) { o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; }
4
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } } return t; }
5
5
  function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
6
6
  import React, { forwardRef } from 'react';
7
7
  import { css } from '@emotion/react';
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- export type ErrorTextProps = {
2
+ export declare type ErrorTextProps = {
3
3
  id?: string;
4
4
  children: React.ReactNode;
5
5
  className?: string;
6
6
  };
7
- export declare const ErrorText: ({ id, className, children }: ErrorTextProps) => JSX.Element;
7
+ export declare const ErrorText: ({ id, className, children }: ErrorTextProps) => React.JSX.Element;
8
8
  export default ErrorText;
@@ -1,10 +1,10 @@
1
- import { ReactNode } from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { BaseFieldProps, Size } from '../types';
3
- export type FieldWrapProps = BaseFieldProps & {
3
+ export declare type FieldWrapProps = BaseFieldProps & {
4
4
  size: Size;
5
5
  extraAssistiveText?: string;
6
6
  disabled?: boolean;
7
7
  className?: string;
8
8
  children?: ReactNode;
9
9
  };
10
- export declare const FieldWrap: ({ name, assistiveText, errorMessage, size, required, hideAsterisk, label, help, extraAssistiveText, disabled, className, children, }: FieldWrapProps) => JSX.Element;
10
+ export declare const FieldWrap: ({ name, assistiveText, errorMessage, size, required, hideAsterisk, label, help, extraAssistiveText, disabled, className, children, }: FieldWrapProps) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) { ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } } return n; }, _extends.apply(null, arguments); }
2
2
  function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
3
3
  import React from 'react';
4
4
  import { FlexBox } from '@dfds-ui/react-components/flexbox';
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
2
- export type HelpIconProps = {
1
+ import React from 'react';
2
+ export declare type HelpIconProps = {
3
3
  content: string;
4
4
  className?: string;
5
5
  disabled?: boolean;
6
6
  };
7
- export declare const HelpIcon: ({ content, className, disabled }: HelpIconProps) => JSX.Element;
7
+ export declare const HelpIcon: ({ content, className, disabled }: HelpIconProps) => React.JSX.Element;
8
8
  export default HelpIcon;
package/label/Label.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { Size } from '../types';
3
- export type LabelProps = {
3
+ export declare type LabelProps = {
4
4
  children: ReactNode;
5
5
  className?: string;
6
6
  hideAsterisk?: boolean;
@@ -8,4 +8,4 @@ export type LabelProps = {
8
8
  visualSize?: Size;
9
9
  disabled?: boolean;
10
10
  } & React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
11
- export declare const Label: ({ visualSize, required, hideAsterisk, disabled, className, children, ...rest }: LabelProps) => JSX.Element;
11
+ export declare const Label: ({ visualSize, required, hideAsterisk, disabled, className, children, ...rest }: LabelProps) => React.JSX.Element;
package/label/Label.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var _excluded = ["visualSize", "required", "hideAsterisk", "disabled", "className", "children"];
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
2
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) { ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } } return n; }, _extends.apply(null, arguments); }
3
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) { o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; }
4
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } } return t; }
5
5
  import React from 'react';
6
6
  import { css } from '@emotion/react';
7
7
  import { typography } from '@dfds-ui/typography';
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Form components",
4
4
  "license": "MIT",
5
5
  "private": false,
6
- "version": "2.2.0-alpha.8b995955",
6
+ "version": "2.2.0-alpha.b8d61c36",
7
7
  "sideEffects": false,
8
8
  "main": "./cjs/index.js",
9
9
  "module": "./index.js",
@@ -12,18 +12,18 @@
12
12
  "peerDependencies": {
13
13
  "@emotion/react": "11.11.4",
14
14
  "@emotion/styled": "11.11.5",
15
- "react": ">= 17.0.2",
16
- "react-dom": ">= 17.0.2",
17
- "react-select": "^4.0.0"
15
+ "react": ">= 18.3.1",
16
+ "react-dom": ">= 18.3.1",
17
+ "react-select": "^5.0.0"
18
18
  },
19
19
  "dependencies": {
20
- "@dfds-ui/hooks": "2.2.0-alpha.8b995955",
21
- "@dfds-ui/icons": "2.2.0-alpha.8b995955",
22
- "@dfds-ui/react-components": "2.2.0-alpha.8b995955",
23
- "@dfds-ui/theme": "2.2.0-alpha.8b995955",
24
- "@dfds-ui/typography": "2.2.0-alpha.8b995955"
20
+ "@dfds-ui/hooks": "2.2.0-alpha.b8d61c36",
21
+ "@dfds-ui/icons": "2.2.0-alpha.b8d61c36",
22
+ "@dfds-ui/react-components": "2.2.0-alpha.b8d61c36",
23
+ "@dfds-ui/theme": "2.2.0-alpha.b8d61c36",
24
+ "@dfds-ui/typography": "2.2.0-alpha.b8d61c36"
25
25
  },
26
- "gitHead": "8b995955f3d03a596dd93635edb37bc761d1e8f0",
26
+ "gitHead": "b8d61c36b2e7e5af74e686ca5de6cfc856118701",
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  }
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { TextFieldProps } from '../text-field/TextField';
3
- export type PasswordFieldProps = Omit<TextFieldProps, 'icon' | 'inputType'>;
3
+ export declare type PasswordFieldProps = Omit<TextFieldProps, 'icon' | 'inputType'>;
4
4
  export declare const PasswordField: React.ForwardRefExoticComponent<PasswordFieldProps & React.RefAttributes<HTMLInputElement>>;
@@ -1,10 +1,10 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) { ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } } return n; }, _extends.apply(null, arguments); }
2
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
3
3
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
4
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
5
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) { n[e] = r[e]; } return n; }
6
6
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) { ; } } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
7
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
8
8
  import React, { forwardRef, useState } from 'react';
9
9
  import { css } from '@emotion/react';
10
10
  import { theme } from '@dfds-ui/theme';
package/radio/Radio.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React, { ReactNode } from 'react';
2
- type RadioSize = 'medium' | 'small';
3
- export type RadioStyleState = 'checked';
4
- export type RadioProps = {
2
+ declare type RadioSize = 'medium' | 'small';
3
+ export declare type RadioStyleState = 'checked';
4
+ export declare type RadioProps = {
5
5
  /**
6
6
  * Field name.
7
7
  */
package/radio/Radio.js CHANGED
@@ -1,9 +1,9 @@
1
1
  var _excluded = ["name", "label", "className", "checked", "disabled", "defaultChecked", "value", "onChange", "error", "visualSize", "Icon", "styledAs"];
2
2
  var _templateObject;
3
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
5
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
6
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) { ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } } return n; }, _extends.apply(null, arguments); }
4
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) { o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; }
5
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } } return t; }
6
+ function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
7
7
  import React from 'react';
8
8
  import { theme } from '@dfds-ui/theme';
9
9
  import { css } from '@emotion/react';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { RadioProps } from './Radio';
3
- type RadioContextProps = {
3
+ declare type RadioContextProps = {
4
4
  children?: React.ReactNode;
5
5
  visualSize: NonNullable<RadioProps['visualSize']>;
6
6
  error: RadioProps['error'];
@@ -8,6 +8,7 @@ type RadioContextProps = {
8
8
  export declare const RadioContext: React.Context<RadioContextProps | undefined>;
9
9
  export declare const RadioContextProvider: React.FC<{
10
10
  value: RadioContextProps;
11
+ children?: React.ReactNode;
11
12
  }>;
12
13
  declare const useRadioContext: () => RadioContextProps | undefined;
13
14
  export default useRadioContext;
@@ -1,7 +1,7 @@
1
- import { ReactNode } from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { BaseFieldProps } from '../types';
3
3
  import { RadioProps } from './Radio';
4
- export type RadioGroupProps = Pick<BaseFieldProps, 'help' | 'label' | 'required' | 'hideAsterisk' | 'disabled' | 'errorMessage'> & Pick<RadioProps, 'visualSize'> & {
4
+ export declare type RadioGroupProps = Pick<BaseFieldProps, 'help' | 'label' | 'required' | 'hideAsterisk' | 'disabled' | 'errorMessage'> & Pick<RadioProps, 'visualSize'> & {
5
5
  children: ReactNode;
6
6
  /**
7
7
  * Class name to be assigned to the component
@@ -9,4 +9,4 @@ export type RadioGroupProps = Pick<BaseFieldProps, 'help' | 'label' | 'required'
9
9
  className?: string;
10
10
  column?: boolean;
11
11
  };
12
- export declare const RadioGroup: ({ visualSize, label, children, column, errorMessage, help, required, hideAsterisk, className, disabled, }: RadioGroupProps) => JSX.Element;
12
+ export declare const RadioGroup: ({ visualSize, label, children, column, errorMessage, help, required, hideAsterisk, className, disabled, }: RadioGroupProps) => React.JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { FieldWrapProps } from '../field-wrap/FieldWrap';
3
3
  import { Size } from '../types';
4
- export type RatingProps = {
4
+ export declare type RatingProps = {
5
5
  /**
6
6
  * Amount of related checkboxes
7
7
  */
@@ -43,13 +43,13 @@ export type RatingProps = {
43
43
  Icon?: (index: number) => React.ComponentType;
44
44
  };
45
45
  export declare const Rating: React.ForwardRefExoticComponent<RatingProps & React.RefAttributes<HTMLInputElement>>;
46
- export type RatingFieldProps = RatingProps & Omit<FieldWrapProps, 'size' | 'placeholder' | 'helpPlacement' | 'children'> & {
46
+ export declare type RatingFieldProps = RatingProps & Omit<FieldWrapProps, 'size' | 'placeholder' | 'helpPlacement' | 'children'> & {
47
47
  size: Exclude<Size, 'large'>;
48
48
  };
49
49
  /**
50
50
  * The `RatingField` component will allow the user to provide feedback by ranking things on a specified scale.
51
51
  */
52
- export declare const RatingField: React.ForwardRefExoticComponent<RatingProps & Omit<FieldWrapProps, "children" | "size" | "placeholder" | "helpPlacement"> & {
52
+ export declare const RatingField: React.ForwardRefExoticComponent<RatingProps & Omit<FieldWrapProps, "children" | "size" | "helpPlacement" | "placeholder"> & {
53
53
  size: Exclude<Size, 'large'>;
54
54
  } & React.RefAttributes<HTMLInputElement>>;
55
55
  export default RatingField;
package/rating/Rating.js CHANGED
@@ -1,14 +1,14 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) { ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } } return n; }, _extends.apply(null, arguments); }
2
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
3
3
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
5
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
6
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
7
7
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
9
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
9
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) { n[e] = r[e]; } return n; }
10
10
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) { ; } } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
11
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
12
12
  function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
13
13
  import React, { useMemo, useState } from 'react';
14
14
  import { FlexBox } from '@dfds-ui/react-components/flexbox';
@@ -2,14 +2,106 @@ import React from 'react';
2
2
  import { GroupBase } from 'react-select';
3
3
  import { AsyncProps } from 'react-select/async';
4
4
  import { BaseFieldProps } from '../types';
5
- type Size = 'small' | 'medium' | 'large';
6
- export type AsyncSelectFieldProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = BaseFieldProps & AsyncProps<Option, IsMulti, Group> & {
5
+ declare type Size = 'small' | 'medium' | 'large';
6
+ export declare type AsyncSelectFieldProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = BaseFieldProps & AsyncProps<Option, IsMulti, Group> & {
7
7
  isClearable?: boolean;
8
8
  value?: any;
9
9
  visualSize?: Size;
10
10
  };
11
- declare const AsyncSelectFieldInner: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ assistiveText, components, disabled, errorMessage, help, helpPlacement, hideAsterisk, isClearable, label, name, onBlur, onChange, required, visualSize, ...rest }: AsyncSelectFieldProps<Option, IsMulti, Group>, ref: React.ForwardedRef<any>) => JSX.Element;
12
- export declare const AsyncSelectField: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: BaseFieldProps & Omit<import("react-select/dist/declarations/src/Select").PublicBaseSelectProps<Option, IsMulti, Group>, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<import("react-select/dist/declarations/src/Select").PublicBaseSelectProps<Option, IsMulti, Group>> & import("react-select/dist/declarations/src/useStateManager").StateManagerAdditionalProps<Option> & import("react-select/dist/declarations/src/useAsync").AsyncAdditionalProps<Option, Group> & {
11
+ declare const AsyncSelectFieldInner: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ assistiveText, components, disabled, errorMessage, help, helpPlacement, hideAsterisk, isClearable, label, name, onBlur, onChange, required, visualSize, ...rest }: AsyncSelectFieldProps<Option, IsMulti, Group>, ref: React.ForwardedRef<any>) => React.JSX.Element;
12
+ export declare const AsyncSelectField: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: BaseFieldProps & Omit<Pick<import("react-select/dist/declarations/src/Select").Props<Option, IsMulti, Group>, "id" | "className" | "value" | "form" | "required" | "autoFocus" | "aria-errormessage" | "aria-invalid" | "aria-label" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "theme" | "name" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputValue" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom"> & {
13
+ tabIndex?: number | undefined;
14
+ 'aria-live'?: "off" | "assertive" | "polite" | undefined;
15
+ placeholder?: React.ReactNode;
16
+ backspaceRemovesValue?: boolean | undefined;
17
+ blurInputOnSelect?: boolean | undefined;
18
+ captureMenuScroll?: boolean | undefined;
19
+ classNames?: import("react-select").ClassNamesConfig<Option, IsMulti, Group> | undefined;
20
+ closeMenuOnSelect?: boolean | undefined;
21
+ closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
22
+ components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
23
+ controlShouldRenderValue?: boolean | undefined;
24
+ escapeClearsValue?: boolean | undefined;
25
+ filterOption?: ((option: import("react-select").FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
26
+ formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
27
+ getOptionLabel?: import("react-select").GetOptionLabel<Option> | undefined;
28
+ getOptionValue?: import("react-select").GetOptionValue<Option> | undefined;
29
+ isDisabled?: boolean | undefined;
30
+ isLoading?: boolean | undefined;
31
+ isOptionDisabled?: ((option: Option, selectValue: import("react-select").Options<Option>) => boolean) | undefined;
32
+ isMulti?: IsMulti | undefined;
33
+ isRtl?: boolean | undefined;
34
+ isSearchable?: boolean | undefined;
35
+ loadingMessage?: ((obj: {
36
+ inputValue: string;
37
+ }) => React.ReactNode) | undefined;
38
+ minMenuHeight?: number | undefined;
39
+ maxMenuHeight?: number | undefined;
40
+ menuIsOpen?: boolean | undefined;
41
+ menuPlacement?: import("react-select").MenuPlacement | undefined;
42
+ menuPosition?: import("react-select").MenuPosition | undefined;
43
+ menuShouldBlockScroll?: boolean | undefined;
44
+ menuShouldScrollIntoView?: boolean | undefined;
45
+ noOptionsMessage?: ((obj: {
46
+ inputValue: string;
47
+ }) => React.ReactNode) | undefined;
48
+ openMenuOnFocus?: boolean | undefined;
49
+ openMenuOnClick?: boolean | undefined;
50
+ options?: import("react-select").OptionsOrGroups<Option, Group> | undefined;
51
+ pageSize?: number | undefined;
52
+ screenReaderStatus?: ((obj: {
53
+ count: number;
54
+ }) => string) | undefined;
55
+ styles?: import("react-select").StylesConfig<Option, IsMulti, Group> | undefined;
56
+ tabSelectsValue?: boolean | undefined;
57
+ unstyled?: boolean | undefined;
58
+ } & {}, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<Pick<import("react-select/dist/declarations/src/Select").Props<Option, IsMulti, Group>, "id" | "className" | "value" | "form" | "required" | "autoFocus" | "aria-errormessage" | "aria-invalid" | "aria-label" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "theme" | "name" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputValue" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom"> & {
59
+ tabIndex?: number | undefined;
60
+ 'aria-live'?: "off" | "assertive" | "polite" | undefined;
61
+ placeholder?: React.ReactNode;
62
+ backspaceRemovesValue?: boolean | undefined;
63
+ blurInputOnSelect?: boolean | undefined;
64
+ captureMenuScroll?: boolean | undefined;
65
+ classNames?: import("react-select").ClassNamesConfig<Option, IsMulti, Group> | undefined;
66
+ closeMenuOnSelect?: boolean | undefined;
67
+ closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
68
+ components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
69
+ controlShouldRenderValue?: boolean | undefined;
70
+ escapeClearsValue?: boolean | undefined;
71
+ filterOption?: ((option: import("react-select").FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
72
+ formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
73
+ getOptionLabel?: import("react-select").GetOptionLabel<Option> | undefined;
74
+ getOptionValue?: import("react-select").GetOptionValue<Option> | undefined;
75
+ isDisabled?: boolean | undefined;
76
+ isLoading?: boolean | undefined;
77
+ isOptionDisabled?: ((option: Option, selectValue: import("react-select").Options<Option>) => boolean) | undefined;
78
+ isMulti?: IsMulti | undefined;
79
+ isRtl?: boolean | undefined;
80
+ isSearchable?: boolean | undefined;
81
+ loadingMessage?: ((obj: {
82
+ inputValue: string;
83
+ }) => React.ReactNode) | undefined;
84
+ minMenuHeight?: number | undefined;
85
+ maxMenuHeight?: number | undefined;
86
+ menuIsOpen?: boolean | undefined;
87
+ menuPlacement?: import("react-select").MenuPlacement | undefined;
88
+ menuPosition?: import("react-select").MenuPosition | undefined;
89
+ menuShouldBlockScroll?: boolean | undefined;
90
+ menuShouldScrollIntoView?: boolean | undefined;
91
+ noOptionsMessage?: ((obj: {
92
+ inputValue: string;
93
+ }) => React.ReactNode) | undefined;
94
+ openMenuOnFocus?: boolean | undefined;
95
+ openMenuOnClick?: boolean | undefined;
96
+ options?: import("react-select").OptionsOrGroups<Option, Group> | undefined;
97
+ pageSize?: number | undefined;
98
+ screenReaderStatus?: ((obj: {
99
+ count: number;
100
+ }) => string) | undefined;
101
+ styles?: import("react-select").StylesConfig<Option, IsMulti, Group> | undefined;
102
+ tabSelectsValue?: boolean | undefined;
103
+ unstyled?: boolean | undefined;
104
+ } & {}> & import("react-select/dist/declarations/src/useStateManager").StateManagerAdditionalProps<Option> & import("react-select/dist/declarations/src/useAsync").AsyncAdditionalProps<Option, Group> & {
13
105
  isClearable?: boolean | undefined;
14
106
  value?: any;
15
107
  visualSize?: Size | undefined;
@@ -1,10 +1,10 @@
1
1
  import _styled from "@emotion/styled/base";
2
2
  var _excluded = ["assistiveText", "components", "disabled", "errorMessage", "help", "helpPlacement", "hideAsterisk", "isClearable", "label", "name", "onBlur", "onChange", "required", "visualSize"];
3
3
  var _templateObject;
4
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
7
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
4
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) { ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } } return n; }, _extends.apply(null, arguments); }
5
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) { o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; }
6
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } } return t; }
7
+ function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
8
8
  function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
9
9
  import React from 'react';
10
10
  import AsyncSelect from 'react-select/async';