@dfds-ui/forms 2.0.29 → 2.2.0-alpha.32eece3d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assistive-text/AssistiveText.d.ts +1 -1
- package/asterisk/Asterisk.d.ts +2 -2
- package/asterisk/Asterisk.js +2 -2
- package/checkbox/Checkbox.js +3 -3
- package/checkbox/CheckboxContext.d.ts +1 -0
- package/checkbox/CheckboxGroup.d.ts +2 -2
- package/checkbox/CheckboxGroup.js +3 -3
- package/cjs/assistive-text/AssistiveText.d.ts +1 -1
- package/cjs/assistive-text/AssistiveText.js +1 -1
- package/cjs/asterisk/Asterisk.d.ts +2 -2
- package/cjs/asterisk/Asterisk.js +5 -5
- package/cjs/checkbox/Checkbox.js +19 -24
- package/cjs/checkbox/CheckboxContext.d.ts +1 -0
- package/cjs/checkbox/CheckboxContext.js +1 -2
- package/cjs/checkbox/CheckboxGroup.d.ts +2 -2
- package/cjs/checkbox/CheckboxGroup.js +16 -21
- package/cjs/checkbox/index.js +2 -2
- package/cjs/counter/Counter.js +32 -46
- package/cjs/counter/index.js +1 -1
- package/cjs/enhanced/EnhancedField.d.ts +1 -1
- package/cjs/enhanced/EnhancedField.js +14 -15
- package/cjs/enhanced/index.js +1 -1
- package/cjs/error-text/ErrorText.d.ts +1 -1
- package/cjs/error-text/ErrorText.js +1 -1
- package/cjs/field-wrap/FieldWrap.d.ts +2 -2
- package/cjs/field-wrap/FieldWrap.js +2 -2
- package/cjs/field-wrap/index.js +1 -1
- package/cjs/help-icon/HelpIcon.d.ts +2 -2
- package/cjs/help-icon/HelpIcon.js +1 -1
- package/cjs/index.js +19 -19
- package/cjs/label/Label.d.ts +1 -1
- package/cjs/label/Label.js +11 -17
- package/cjs/password-field/PasswordField.js +4 -14
- package/cjs/radio/Radio.js +17 -21
- package/cjs/radio/RadioContext.d.ts +1 -0
- package/cjs/radio/RadioContext.js +1 -2
- package/cjs/radio/RadioGroup.d.ts +2 -2
- package/cjs/radio/RadioGroup.js +1 -1
- package/cjs/radio/index.js +2 -2
- package/cjs/rating/Rating.d.ts +1 -1
- package/cjs/rating/Rating.js +5 -15
- package/cjs/rating/index.js +1 -1
- package/cjs/select-field/AsyncSelectField.d.ts +88 -80
- package/cjs/select-field/AsyncSelectField.js +21 -26
- package/cjs/select-field/CreatableSelectField.d.ts +89 -81
- package/cjs/select-field/CreatableSelectField.js +56 -63
- package/cjs/select-field/NativeSelectField.d.ts +1 -1
- package/cjs/select-field/NativeSelectField.js +18 -23
- package/cjs/select-field/SelectField.d.ts +4 -4
- package/cjs/select-field/SelectField.js +57 -66
- package/cjs/switch/Switch.d.ts +1 -1
- package/cjs/switch/Switch.js +26 -31
- package/cjs/switch/SwitchContext.d.ts +1 -0
- package/cjs/switch/SwitchContext.js +1 -2
- package/cjs/switch/SwitchGroup.d.ts +2 -2
- package/cjs/switch/SwitchGroup.js +1 -1
- package/cjs/switch/index.js +2 -2
- package/cjs/tel-field/TelField.js +32 -55
- package/cjs/text-field/TextField.d.ts +2 -2
- package/cjs/text-field/TextField.js +34 -41
- package/cjs/textarea-field/TextareaField.js +23 -39
- package/cjs/types/index.js +2 -2
- package/counter/Counter.js +7 -7
- package/enhanced/EnhancedField.d.ts +1 -1
- package/enhanced/EnhancedField.js +3 -3
- package/error-text/ErrorText.d.ts +1 -1
- package/field-wrap/FieldWrap.d.ts +2 -2
- package/field-wrap/FieldWrap.js +1 -1
- package/help-icon/HelpIcon.d.ts +2 -2
- package/label/Label.d.ts +1 -1
- package/label/Label.js +3 -3
- package/package.json +9 -9
- package/password-field/PasswordField.js +5 -5
- package/radio/Radio.js +4 -4
- package/radio/RadioContext.d.ts +1 -0
- package/radio/RadioGroup.d.ts +2 -2
- package/rating/Rating.d.ts +1 -1
- package/rating/Rating.js +8 -8
- package/select-field/AsyncSelectField.d.ts +88 -80
- package/select-field/AsyncSelectField.js +4 -4
- package/select-field/CreatableSelectField.d.ts +89 -81
- package/select-field/CreatableSelectField.js +6 -6
- package/select-field/NativeSelectField.d.ts +1 -1
- package/select-field/NativeSelectField.js +3 -3
- package/select-field/SelectField.d.ts +4 -4
- package/select-field/SelectField.js +6 -6
- package/switch/Switch.d.ts +1 -1
- package/switch/Switch.js +20 -20
- package/switch/SwitchContext.d.ts +1 -0
- package/switch/SwitchGroup.d.ts +2 -2
- package/tel-field/TelField.js +8 -8
- package/text-field/TextField.d.ts +2 -2
- package/text-field/TextField.js +3 -3
- package/textarea-field/TextareaField.js +7 -7
|
@@ -16,5 +16,5 @@ export declare 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<
|
|
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 (
|
|
3
|
-
function _objectWithoutProperties(
|
|
4
|
-
function _objectWithoutPropertiesLoose(
|
|
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';
|
|
@@ -4,5 +4,5 @@ export declare type ErrorTextProps = {
|
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { BaseFieldProps, Size } from '../types';
|
|
3
3
|
export declare type FieldWrapProps = BaseFieldProps & {
|
|
4
4
|
size: Size;
|
|
@@ -7,4 +7,4 @@ export declare type FieldWrapProps = BaseFieldProps & {
|
|
|
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;
|
package/field-wrap/FieldWrap.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
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';
|
package/help-icon/HelpIcon.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
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
|
@@ -8,4 +8,4 @@ export declare 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 (
|
|
3
|
-
function _objectWithoutProperties(
|
|
4
|
-
function _objectWithoutPropertiesLoose(
|
|
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.0.
|
|
6
|
+
"version": "2.2.0-alpha.32eece3d",
|
|
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": ">=
|
|
16
|
-
"react-dom": ">=
|
|
15
|
+
"react": ">= 18.3.1",
|
|
16
|
+
"react-dom": ">= 18.3.1",
|
|
17
17
|
"react-select": "^4.0.0"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@dfds-ui/hooks": "2.0.
|
|
21
|
-
"@dfds-ui/icons": "2.0.
|
|
22
|
-
"@dfds-ui/react-components": "2.0.
|
|
23
|
-
"@dfds-ui/theme": "2.0.
|
|
24
|
-
"@dfds-ui/typography": "2.0.
|
|
20
|
+
"@dfds-ui/hooks": "2.2.0-alpha.32eece3d",
|
|
21
|
+
"@dfds-ui/icons": "2.2.0-alpha.32eece3d",
|
|
22
|
+
"@dfds-ui/react-components": "2.2.0-alpha.32eece3d",
|
|
23
|
+
"@dfds-ui/theme": "2.2.0-alpha.32eece3d",
|
|
24
|
+
"@dfds-ui/typography": "2.2.0-alpha.32eece3d"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "32eece3d9838c4d530c5e21b63815021b472c717",
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
29
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
function _slicedToArray(
|
|
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(
|
|
5
|
-
function _arrayLikeToArray(
|
|
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(
|
|
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.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 (
|
|
4
|
-
function _objectWithoutProperties(
|
|
5
|
-
function _objectWithoutPropertiesLoose(
|
|
6
|
-
function _taggedTemplateLiteral(
|
|
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';
|
package/radio/RadioContext.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ declare 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;
|
package/radio/RadioGroup.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { BaseFieldProps } from '../types';
|
|
3
3
|
import { RadioProps } from './Radio';
|
|
4
4
|
export declare type RadioGroupProps = Pick<BaseFieldProps, 'help' | 'label' | 'required' | 'hideAsterisk' | 'disabled' | 'errorMessage'> & Pick<RadioProps, 'visualSize'> & {
|
|
@@ -9,4 +9,4 @@ export declare type RadioGroupProps = Pick<BaseFieldProps, 'help' | 'label' | 'r
|
|
|
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;
|
package/rating/Rating.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export declare type RatingFieldProps = RatingProps & Omit<FieldWrapProps, 'size'
|
|
|
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" | "
|
|
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 (
|
|
2
|
-
function _toConsumableArray(
|
|
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(
|
|
5
|
-
function _arrayWithoutHoles(
|
|
6
|
-
function _slicedToArray(
|
|
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(
|
|
9
|
-
function _arrayLikeToArray(
|
|
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(
|
|
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';
|
|
@@ -8,88 +8,96 @@ export declare type AsyncSelectFieldProps<Option, IsMulti extends boolean, Group
|
|
|
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<Pick<import("react-select/dist/declarations/src/Select").Props<Option, IsMulti, Group>, "id" | "
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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" | "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
|
+
closeMenuOnSelect?: boolean | undefined;
|
|
20
|
+
closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
|
|
21
|
+
components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
|
|
22
|
+
controlShouldRenderValue?: boolean | undefined;
|
|
23
|
+
escapeClearsValue?: boolean | undefined;
|
|
24
|
+
filterOption?: ((option: import("react-select/dist/declarations/src/filters").FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
|
|
25
|
+
formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
|
|
26
|
+
getOptionLabel?: import("react-select").GetOptionLabel<Option> | undefined;
|
|
27
|
+
getOptionValue?: import("react-select").GetOptionValue<Option> | undefined;
|
|
28
|
+
isDisabled?: boolean | undefined;
|
|
29
|
+
isLoading?: boolean | undefined;
|
|
30
|
+
isOptionDisabled?: ((option: Option, selectValue: import("react-select").Options<Option>) => boolean) | undefined;
|
|
31
|
+
isMulti?: IsMulti | undefined;
|
|
32
|
+
isRtl?: boolean | undefined;
|
|
33
|
+
isSearchable?: boolean | undefined;
|
|
34
|
+
loadingMessage?: ((obj: {
|
|
35
|
+
inputValue: string;
|
|
36
|
+
}) => React.ReactNode) | undefined;
|
|
37
|
+
minMenuHeight?: number | undefined;
|
|
38
|
+
maxMenuHeight?: number | undefined;
|
|
39
|
+
menuIsOpen?: boolean | undefined;
|
|
40
|
+
menuPlacement?: import("react-select").MenuPlacement | undefined;
|
|
41
|
+
menuPosition?: import("react-select").MenuPosition | undefined;
|
|
42
|
+
menuShouldBlockScroll?: boolean | undefined;
|
|
43
|
+
menuShouldScrollIntoView?: boolean | undefined;
|
|
44
|
+
noOptionsMessage?: ((obj: {
|
|
45
|
+
inputValue: string;
|
|
46
|
+
}) => React.ReactNode) | undefined;
|
|
47
|
+
openMenuOnFocus?: boolean | undefined;
|
|
48
|
+
openMenuOnClick?: boolean | undefined;
|
|
49
|
+
options?: import("react-select").OptionsOrGroups<Option, Group> | undefined;
|
|
50
|
+
pageSize?: number | undefined;
|
|
51
|
+
screenReaderStatus?: ((obj: {
|
|
47
52
|
count: number;
|
|
48
|
-
}) => string;
|
|
49
|
-
styles
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
'aria-live'
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
53
|
+
}) => string) | undefined;
|
|
54
|
+
styles?: import("react-select").StylesConfig<Option, IsMulti, Group> | undefined;
|
|
55
|
+
tabSelectsValue?: boolean | undefined;
|
|
56
|
+
} & {}, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<Pick<import("react-select/dist/declarations/src/Select").Props<Option, IsMulti, Group>, "id" | "className" | "value" | "form" | "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"> & {
|
|
57
|
+
tabIndex?: number | undefined;
|
|
58
|
+
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
59
|
+
placeholder?: React.ReactNode;
|
|
60
|
+
backspaceRemovesValue?: boolean | undefined;
|
|
61
|
+
blurInputOnSelect?: boolean | undefined;
|
|
62
|
+
captureMenuScroll?: boolean | undefined;
|
|
63
|
+
closeMenuOnSelect?: boolean | undefined;
|
|
64
|
+
closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
|
|
65
|
+
components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
|
|
66
|
+
controlShouldRenderValue?: boolean | undefined;
|
|
67
|
+
escapeClearsValue?: boolean | undefined;
|
|
68
|
+
filterOption?: ((option: import("react-select/dist/declarations/src/filters").FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
|
|
69
|
+
formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
|
|
70
|
+
getOptionLabel?: import("react-select").GetOptionLabel<Option> | undefined;
|
|
71
|
+
getOptionValue?: import("react-select").GetOptionValue<Option> | undefined;
|
|
72
|
+
isDisabled?: boolean | undefined;
|
|
73
|
+
isLoading?: boolean | undefined;
|
|
74
|
+
isOptionDisabled?: ((option: Option, selectValue: import("react-select").Options<Option>) => boolean) | undefined;
|
|
75
|
+
isMulti?: IsMulti | undefined;
|
|
76
|
+
isRtl?: boolean | undefined;
|
|
77
|
+
isSearchable?: boolean | undefined;
|
|
78
|
+
loadingMessage?: ((obj: {
|
|
79
|
+
inputValue: string;
|
|
80
|
+
}) => React.ReactNode) | undefined;
|
|
81
|
+
minMenuHeight?: number | undefined;
|
|
82
|
+
maxMenuHeight?: number | undefined;
|
|
83
|
+
menuIsOpen?: boolean | undefined;
|
|
84
|
+
menuPlacement?: import("react-select").MenuPlacement | undefined;
|
|
85
|
+
menuPosition?: import("react-select").MenuPosition | undefined;
|
|
86
|
+
menuShouldBlockScroll?: boolean | undefined;
|
|
87
|
+
menuShouldScrollIntoView?: boolean | undefined;
|
|
88
|
+
noOptionsMessage?: ((obj: {
|
|
89
|
+
inputValue: string;
|
|
90
|
+
}) => React.ReactNode) | undefined;
|
|
91
|
+
openMenuOnFocus?: boolean | undefined;
|
|
92
|
+
openMenuOnClick?: boolean | undefined;
|
|
93
|
+
options?: import("react-select").OptionsOrGroups<Option, Group> | undefined;
|
|
94
|
+
pageSize?: number | undefined;
|
|
95
|
+
screenReaderStatus?: ((obj: {
|
|
87
96
|
count: number;
|
|
88
|
-
}) => string;
|
|
89
|
-
styles
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}, never>>> & import("react-select/dist/declarations/src/useStateManager").StateManagerAdditionalProps<Option> & import("react-select/dist/declarations/src/useAsync").AsyncAdditionalProps<Option, Group> & {
|
|
97
|
+
}) => string) | undefined;
|
|
98
|
+
styles?: import("react-select").StylesConfig<Option, IsMulti, Group> | undefined;
|
|
99
|
+
tabSelectsValue?: boolean | undefined;
|
|
100
|
+
} & {}> & import("react-select/dist/declarations/src/useStateManager").StateManagerAdditionalProps<Option> & import("react-select/dist/declarations/src/useAsync").AsyncAdditionalProps<Option, Group> & {
|
|
93
101
|
isClearable?: boolean | undefined;
|
|
94
102
|
value?: any;
|
|
95
103
|
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 (
|
|
5
|
-
function _objectWithoutProperties(
|
|
6
|
-
function _objectWithoutPropertiesLoose(
|
|
7
|
-
function _taggedTemplateLiteral(
|
|
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';
|