@dfds-ui/forms 0.9.1-alpha.4530ab9f → 0.9.1-alpha.4bdc9dc9
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/checkbox/Checkbox.js +3 -1
- package/checkbox/CheckboxGroup.js +3 -1
- package/cjs/checkbox/Checkbox.js +3 -1
- package/cjs/checkbox/CheckboxContext.js +2 -2
- package/cjs/checkbox/CheckboxGroup.js +3 -1
- package/cjs/counter/Counter.js +3 -3
- package/cjs/enhanced/EnhancedField.d.ts +1 -1
- package/cjs/enhanced/EnhancedField.js +5 -3
- package/cjs/label/Label.js +3 -1
- package/cjs/radio/Radio.js +3 -1
- package/cjs/radio/RadioContext.js +2 -2
- package/cjs/rating/Rating.d.ts +1 -1
- package/cjs/rating/Rating.js +3 -3
- package/cjs/select-field/NativeSelectField.js +5 -3
- package/cjs/select-field/SelectField.js +8 -5
- package/cjs/switch/Switch.d.ts +1 -1
- package/cjs/switch/Switch.js +5 -3
- package/cjs/switch/SwitchContext.js +2 -2
- package/cjs/tel-field/TelField.js +6 -4
- package/cjs/text-field/TextField.d.ts +1 -1
- package/cjs/text-field/TextField.js +5 -3
- package/cjs/textarea-field/TextareaField.js +6 -4
- package/cjs/types/field.js +5 -1
- package/cjs/types/size.js +5 -1
- package/counter/Counter.js +1 -1
- package/enhanced/EnhancedField.d.ts +1 -1
- package/enhanced/EnhancedField.js +3 -1
- package/label/Label.js +3 -1
- package/package.json +7 -7
- package/radio/Radio.js +3 -1
- package/rating/Rating.d.ts +1 -1
- package/rating/Rating.js +2 -2
- package/select-field/NativeSelectField.js +3 -1
- package/select-field/SelectField.js +5 -3
- package/switch/Switch.d.ts +1 -1
- package/switch/Switch.js +2 -1
- package/tel-field/TelField.js +4 -2
- package/text-field/TextField.d.ts +1 -1
- package/text-field/TextField.js +3 -1
- package/textarea-field/TextareaField.js +4 -2
- package/types/field.js +1 -0
- package/types/size.js +1 -0
package/checkbox/Checkbox.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["name", "children", "className", "checked", "defaultChecked", "disabled", "indeterminate", "value", "onChange", "onLabelClick", "error", "visualSize", "inputVerticalAlignment"];
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || 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
4
|
|
|
3
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; }
|
|
@@ -71,7 +73,7 @@ export var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
71
73
|
visualSizeProp = _ref$visualSize === void 0 ? 'medium' : _ref$visualSize,
|
|
72
74
|
_ref$inputVerticalAli = _ref.inputVerticalAlignment,
|
|
73
75
|
inputVerticalAlignment = _ref$inputVerticalAli === void 0 ? 'center' : _ref$inputVerticalAli,
|
|
74
|
-
rest = _objectWithoutProperties(_ref,
|
|
76
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
75
77
|
|
|
76
78
|
var ctx = useCheckboxContext();
|
|
77
79
|
var visualSize = ctx !== undefined ? ctx.visualSize : visualSizeProp;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["visualSize", "label", "children", "assistiveText", "errorMessage", "error", "className"];
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || 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
4
|
|
|
3
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; }
|
|
@@ -22,7 +24,7 @@ export var CheckboxGroup = function CheckboxGroup(_ref) {
|
|
|
22
24
|
_ref$error = _ref.error,
|
|
23
25
|
error = _ref$error === void 0 ? false : _ref$error,
|
|
24
26
|
className = _ref.className,
|
|
25
|
-
rest = _objectWithoutProperties(_ref,
|
|
27
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
28
|
|
|
27
29
|
return ___EmotionJSX(FlexBox, _extends({
|
|
28
30
|
as: "fieldset",
|
package/cjs/checkbox/Checkbox.js
CHANGED
|
@@ -21,6 +21,8 @@ var _CheckboxContext = _interopRequireDefault(require("./CheckboxContext"));
|
|
|
21
21
|
|
|
22
22
|
var _Label = require("../label/Label");
|
|
23
23
|
|
|
24
|
+
const _excluded = ["name", "children", "className", "checked", "defaultChecked", "disabled", "indeterminate", "value", "onChange", "onLabelClick", "error", "visualSize", "inputVerticalAlignment"];
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
26
28
|
function _extends() { _extends = Object.assign || 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); }
|
|
@@ -79,7 +81,7 @@ const Checkbox = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
79
81
|
visualSizeProp = _ref$visualSize === void 0 ? 'medium' : _ref$visualSize,
|
|
80
82
|
_ref$inputVerticalAli = _ref.inputVerticalAlignment,
|
|
81
83
|
inputVerticalAlignment = _ref$inputVerticalAli === void 0 ? 'center' : _ref$inputVerticalAli,
|
|
82
|
-
rest = _objectWithoutProperties(_ref,
|
|
84
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
83
85
|
|
|
84
86
|
const ctx = (0, _CheckboxContext.default)();
|
|
85
87
|
const visualSize = ctx !== undefined ? ctx.visualSize : visualSizeProp;
|
|
@@ -9,9 +9,9 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
|
|
12
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
13
|
|
|
14
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
15
|
|
|
16
16
|
const CheckboxContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
17
17
|
exports.CheckboxContext = CheckboxContext;
|
|
@@ -19,6 +19,8 @@ var _CheckboxContext = require("./CheckboxContext");
|
|
|
19
19
|
|
|
20
20
|
var _AssistiveText = require("../assistive-text/AssistiveText");
|
|
21
21
|
|
|
22
|
+
const _excluded = ["visualSize", "label", "children", "assistiveText", "errorMessage", "error", "className"];
|
|
23
|
+
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
24
26
|
function _extends() { _extends = Object.assign || 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); }
|
|
@@ -37,7 +39,7 @@ const CheckboxGroup = _ref => {
|
|
|
37
39
|
_ref$error = _ref.error,
|
|
38
40
|
error = _ref$error === void 0 ? false : _ref$error,
|
|
39
41
|
className = _ref.className,
|
|
40
|
-
rest = _objectWithoutProperties(_ref,
|
|
42
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
41
43
|
|
|
42
44
|
return (0, _react2.jsx)(_flexbox.FlexBox, _extends({
|
|
43
45
|
as: "fieldset",
|
package/cjs/counter/Counter.js
CHANGED
|
@@ -15,9 +15,9 @@ var _theme = require("@dfds-ui/theme");
|
|
|
15
15
|
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
17
17
|
|
|
18
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
19
|
|
|
20
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
22
|
function _extends() { _extends = Object.assign || 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); }
|
|
23
23
|
|
|
@@ -29,7 +29,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
29
29
|
|
|
30
30
|
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; }
|
|
31
31
|
|
|
32
|
-
function _iterableToArrayLimit(arr, i) {
|
|
32
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
33
33
|
|
|
34
34
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
35
|
|
|
@@ -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<Pick<EnhancedFieldProps, "max" | "required" | "hidden" | "dir" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "disabled" | "
|
|
19
|
+
export declare const EnhancedField: React.ForwardRefExoticComponent<Pick<EnhancedFieldProps, "max" | "required" | "type" | "key" | "id" | "height" | "width" | "name" | "color" | "translate" | "value" | "hidden" | "dir" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "children" | "contentEditable" | "enterKeyHint" | "inputMode" | "tabIndex" | "disabled" | "multiple" | "icon" | "src" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "list" | "maxLength" | "min" | "minLength" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "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" | "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>>;
|
|
20
20
|
export default EnhancedField;
|
|
@@ -19,9 +19,11 @@ var _InputComposition = require("@dfds-ui/react-components/forms/input/InputComp
|
|
|
19
19
|
|
|
20
20
|
var _typography = require("@dfds-ui/typography");
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
const _excluded = ["onClick", "className", "label", "icon", "disabled", "name"];
|
|
23
23
|
|
|
24
|
-
function
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
27
|
|
|
26
28
|
function _extends() { _extends = Object.assign || 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); }
|
|
27
29
|
|
|
@@ -70,7 +72,7 @@ const EnhancedField = /*#__PURE__*/(0, _react.forwardRef)((_ref4, ref) => {
|
|
|
70
72
|
icon = _ref4.icon,
|
|
71
73
|
disabled = _ref4.disabled,
|
|
72
74
|
name = _ref4.name,
|
|
73
|
-
rest = _objectWithoutProperties(_ref4,
|
|
75
|
+
rest = _objectWithoutProperties(_ref4, _excluded);
|
|
74
76
|
|
|
75
77
|
const inputRef = (0, _hooks.useForwardedRef)(ref);
|
|
76
78
|
|
package/cjs/label/Label.js
CHANGED
|
@@ -15,6 +15,8 @@ var _theme = require("@dfds-ui/theme");
|
|
|
15
15
|
|
|
16
16
|
var _Asterisk = require("../asterisk/Asterisk");
|
|
17
17
|
|
|
18
|
+
const _excluded = ["visualSize", "required", "hideAsterisk", "className", "children"];
|
|
19
|
+
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
21
|
|
|
20
22
|
function _extends() { _extends = Object.assign || 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); }
|
|
@@ -32,7 +34,7 @@ const Label = _ref => {
|
|
|
32
34
|
hideAsterisk = _ref$hideAsterisk === void 0 ? false : _ref$hideAsterisk,
|
|
33
35
|
className = _ref.className,
|
|
34
36
|
children = _ref.children,
|
|
35
|
-
rest = _objectWithoutProperties(_ref,
|
|
37
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
36
38
|
|
|
37
39
|
return (0, _react2.jsx)("label", _extends({
|
|
38
40
|
className: className,
|
package/cjs/radio/Radio.js
CHANGED
|
@@ -21,6 +21,8 @@ var _RadioContext = _interopRequireDefault(require("./RadioContext"));
|
|
|
21
21
|
|
|
22
22
|
var _utils = require("@dfds-ui/react-components/common/utils");
|
|
23
23
|
|
|
24
|
+
const _excluded = ["name", "label", "className", "checked", "disabled", "defaultChecked", "value", "onChange", "error", "visualSize", "Icon", "styledAs"];
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
26
28
|
function _extends() { _extends = Object.assign || 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); }
|
|
@@ -82,7 +84,7 @@ const Radio = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
82
84
|
visualSizeProp = _ref$visualSize === void 0 ? 'medium' : _ref$visualSize,
|
|
83
85
|
Icon = _ref.Icon,
|
|
84
86
|
styledAs = _ref.styledAs,
|
|
85
|
-
rest = _objectWithoutProperties(_ref,
|
|
87
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
86
88
|
|
|
87
89
|
const ctx = (0, _RadioContext.default)();
|
|
88
90
|
const visualSize = ctx !== undefined ? ctx.visualSize : visualSizeProp;
|
|
@@ -9,9 +9,9 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
|
|
12
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
13
|
|
|
14
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
15
|
|
|
16
16
|
const RadioContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
17
17
|
exports.RadioContext = RadioContext;
|
package/cjs/rating/Rating.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export declare const Rating: React.ForwardRefExoticComponent<RatingProps & React
|
|
|
46
46
|
export declare type RatingFieldProps = RatingProps & Omit<FieldWrapProps, 'size' | 'placeholder' | 'helpPlacement' | 'children'> & {
|
|
47
47
|
size: Exclude<Size, 'large'>;
|
|
48
48
|
};
|
|
49
|
-
export declare const RatingField: React.ForwardRefExoticComponent<RatingProps & Omit<FieldWrapProps, "
|
|
49
|
+
export declare const RatingField: React.ForwardRefExoticComponent<RatingProps & Omit<FieldWrapProps, "children" | "size" | "placeholder" | "helpPlacement"> & {
|
|
50
50
|
size: Exclude<Size, 'large'>;
|
|
51
51
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
52
52
|
export default RatingField;
|
package/cjs/rating/Rating.js
CHANGED
|
@@ -19,9 +19,9 @@ var _FieldWrap = require("../field-wrap/FieldWrap");
|
|
|
19
19
|
|
|
20
20
|
var _theme = require("@dfds-ui/theme");
|
|
21
21
|
|
|
22
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
23
|
|
|
24
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
25
|
|
|
26
26
|
function _extends() { _extends = Object.assign || 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); }
|
|
27
27
|
|
|
@@ -33,7 +33,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
33
33
|
|
|
34
34
|
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; }
|
|
35
35
|
|
|
36
|
-
function _iterableToArrayLimit(arr, i) {
|
|
36
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
37
37
|
|
|
38
38
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
39
|
|
|
@@ -17,9 +17,11 @@ var _FieldWrap = require("../field-wrap/FieldWrap");
|
|
|
17
17
|
|
|
18
18
|
var _InputComposition = require("@dfds-ui/react-components/forms/input/InputComposition");
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
const _excluded = ["name", "label", "defaultValue", "className", "help", "onChange", "children", "helpPlacement", "assistiveText", "errorMessage", "disabled", "required", "hideAsterisk", "visualSize"];
|
|
21
21
|
|
|
22
|
-
function
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
25
|
|
|
24
26
|
function _extends() { _extends = Object.assign || 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); }
|
|
25
27
|
|
|
@@ -61,7 +63,7 @@ const NativeSelectField = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
61
63
|
hideAsterisk = _ref.hideAsterisk,
|
|
62
64
|
_ref$visualSize = _ref.visualSize,
|
|
63
65
|
visualSize = _ref$visualSize === void 0 ? 'medium' : _ref$visualSize,
|
|
64
|
-
rest = _objectWithoutProperties(_ref,
|
|
66
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
65
67
|
|
|
66
68
|
return (0, _react2.jsx)(_FieldWrap.FieldWrap, {
|
|
67
69
|
className: className,
|
|
@@ -27,13 +27,16 @@ var _ErrorText = _interopRequireDefault(require("../error-text/ErrorText"));
|
|
|
27
27
|
|
|
28
28
|
var _flexbox = require("@dfds-ui/react-components/flexbox");
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
const _excluded = ["name", "label", "defaultValue", "value", "placeholder", "onSelect", "onChange", "isSearchable", "onBlur", "assistiveText", "options", "errorMessage", "isClearable", "disabled", "visualSize", "filterConfig"],
|
|
31
|
+
_excluded2 = ["ref"];
|
|
31
32
|
|
|
32
|
-
function
|
|
33
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
34
|
+
|
|
35
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
36
|
|
|
34
37
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
38
|
|
|
36
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
39
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
37
40
|
|
|
38
41
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
39
42
|
|
|
@@ -126,7 +129,7 @@ function SelectFieldInner(_ref4, ref) {
|
|
|
126
129
|
_ref4$visualSize = _ref4.visualSize,
|
|
127
130
|
visualSize = _ref4$visualSize === void 0 ? 'medium' : _ref4$visualSize,
|
|
128
131
|
filterConfig = _ref4.filterConfig,
|
|
129
|
-
rest = _objectWithoutProperties(_ref4,
|
|
132
|
+
rest = _objectWithoutProperties(_ref4, _excluded);
|
|
130
133
|
|
|
131
134
|
const DropdownIndicator = props => {
|
|
132
135
|
const _props$children = props.children,
|
|
@@ -135,7 +138,7 @@ function SelectFieldInner(_ref4, ref) {
|
|
|
135
138
|
}) : _props$children,
|
|
136
139
|
_props$innerProps = props.innerProps,
|
|
137
140
|
ref = _props$innerProps.ref,
|
|
138
|
-
restInnerProps = _objectWithoutProperties(_props$innerProps,
|
|
141
|
+
restInnerProps = _objectWithoutProperties(_props$innerProps, _excluded2);
|
|
139
142
|
|
|
140
143
|
return (0, _react2.jsx)("div", _extends({}, restInnerProps, {
|
|
141
144
|
ref: ref
|
package/cjs/switch/Switch.d.ts
CHANGED
|
@@ -28,5 +28,5 @@ export declare type SwitchProps = React.PropsWithRef<JSX.IntrinsicElements['labe
|
|
|
28
28
|
size?: Size;
|
|
29
29
|
error?: boolean;
|
|
30
30
|
};
|
|
31
|
-
export declare const Switch: React.ForwardRefExoticComponent<Pick<SwitchProps, "
|
|
31
|
+
export declare const Switch: React.ForwardRefExoticComponent<Pick<SwitchProps, "error" | "key" | "name" | "right" | "disabled" | "size" | "checked" | "css" | keyof React.LabelHTMLAttributes<HTMLLabelElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
32
32
|
export {};
|
package/cjs/switch/Switch.js
CHANGED
|
@@ -23,9 +23,11 @@ var _typography = require("@dfds-ui/typography");
|
|
|
23
23
|
|
|
24
24
|
var _SwitchContext = _interopRequireDefault(require("./SwitchContext"));
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
const _excluded = ["name", "checked", "onChange", "disabled", "children", "right", "error", "size"];
|
|
27
27
|
|
|
28
|
-
function
|
|
28
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
|
+
|
|
30
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
31
|
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
33
|
|
|
@@ -133,7 +135,7 @@ const Switch = /*#__PURE__*/(0, _react.forwardRef)((_ref2, ref) => {
|
|
|
133
135
|
errorProp = _ref2$error === void 0 ? false : _ref2$error,
|
|
134
136
|
_ref2$size = _ref2.size,
|
|
135
137
|
sizeProp = _ref2$size === void 0 ? 'medium' : _ref2$size,
|
|
136
|
-
rest = _objectWithoutProperties(_ref2,
|
|
138
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
137
139
|
|
|
138
140
|
const groupCtx = (0, _SwitchContext.default)();
|
|
139
141
|
const size = groupCtx !== undefined ? groupCtx.size : sizeProp;
|
|
@@ -9,9 +9,9 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
|
|
12
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
13
|
|
|
14
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
15
|
|
|
16
16
|
const SwitchContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
17
17
|
exports.SwitchContext = SwitchContext;
|
|
@@ -27,11 +27,13 @@ var _system = require("@dfds-ui/icons/system");
|
|
|
27
27
|
|
|
28
28
|
var _countryData = require("./countryData");
|
|
29
29
|
|
|
30
|
+
const _excluded = ["name", "label", "errorMessage", "defaultValue", "defaultLocale", "required", "hideAsterisk", "showTrunkValues", "onChange", "onBlur"];
|
|
31
|
+
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
33
|
|
|
32
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
34
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
33
35
|
|
|
34
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
36
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
37
|
|
|
36
38
|
function _extends() { _extends = Object.assign || 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); }
|
|
37
39
|
|
|
@@ -43,7 +45,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
43
45
|
|
|
44
46
|
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; }
|
|
45
47
|
|
|
46
|
-
function _iterableToArrayLimit(arr, i) {
|
|
48
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
47
49
|
|
|
48
50
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
49
51
|
|
|
@@ -130,7 +132,7 @@ const TelField = /*#__PURE__*/(0, _react.forwardRef)((_ref7, ref) => {
|
|
|
130
132
|
showTrunkValues = _ref7$showTrunkValues === void 0 ? false : _ref7$showTrunkValues,
|
|
131
133
|
onChange = _ref7.onChange,
|
|
132
134
|
onBlur = _ref7.onBlur,
|
|
133
|
-
rest = _objectWithoutProperties(_ref7,
|
|
135
|
+
rest = _objectWithoutProperties(_ref7, _excluded);
|
|
134
136
|
|
|
135
137
|
const _useState = (0, _react.useState)(false),
|
|
136
138
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -37,7 +37,7 @@ export declare const TextField: React.ForwardRefExoticComponent<BaseFieldProps &
|
|
|
37
37
|
onChange?: ((event: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
38
38
|
onFocus?: ((event: React.FocusEvent<HTMLInputElement>) => void) | undefined;
|
|
39
39
|
onBlur?: ((event: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
40
|
-
inputType?: "number" | "search" | "
|
|
40
|
+
inputType?: "number" | "search" | "file" | "url" | "time" | "text" | "tel" | "date" | undefined;
|
|
41
41
|
autoComplete?: string | undefined;
|
|
42
42
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
43
43
|
export default TextField;
|
|
@@ -17,9 +17,11 @@ var _HelpIcon = require("../help-icon/HelpIcon");
|
|
|
17
17
|
|
|
18
18
|
var _FieldWrap = require("../field-wrap/FieldWrap");
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
const _excluded = ["name", "label", "placeholder", "value", "defaultValue", "onChange", "onFocus", "onBlur", "prefix", "className", "suffix", "icon", "help", "helpPlacement", "adornment", "assistiveText", "errorMessage", "disabled", "required", "hideAsterisk", "visualSize", "inputType", "autoComplete"];
|
|
21
21
|
|
|
22
|
-
function
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
25
|
|
|
24
26
|
function _extends() { _extends = Object.assign || 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); }
|
|
25
27
|
|
|
@@ -96,7 +98,7 @@ const TextField = /*#__PURE__*/(0, _react.forwardRef)((_ref5, ref) => {
|
|
|
96
98
|
_ref5$inputType = _ref5.inputType,
|
|
97
99
|
inputType = _ref5$inputType === void 0 ? 'text' : _ref5$inputType,
|
|
98
100
|
autoComplete = _ref5.autoComplete,
|
|
99
|
-
rest = _objectWithoutProperties(_ref5,
|
|
101
|
+
rest = _objectWithoutProperties(_ref5, _excluded);
|
|
100
102
|
|
|
101
103
|
return (0, _react2.jsx)(_FieldWrap.FieldWrap, {
|
|
102
104
|
className: className,
|
|
@@ -15,9 +15,11 @@ var _theme = require("@dfds-ui/theme");
|
|
|
15
15
|
|
|
16
16
|
var _typography = require("@dfds-ui/typography");
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
const _excluded = ["name", "size", "assistiveText", "errorMessage", "required", "hideAsterisk", "label", "help", "defaultValue", "value", "onChange", "maxValueLength", "placeholder", "disabled", "showLengthCounter", "rows"];
|
|
19
19
|
|
|
20
|
-
function
|
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
23
|
|
|
22
24
|
function _extends() { _extends = Object.assign || 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); }
|
|
23
25
|
|
|
@@ -29,7 +31,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
29
31
|
|
|
30
32
|
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; }
|
|
31
33
|
|
|
32
|
-
function _iterableToArrayLimit(arr, i) {
|
|
34
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
33
35
|
|
|
34
36
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
37
|
|
|
@@ -72,7 +74,7 @@ const TextareaField = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
72
74
|
showLengthCounter = _ref$showLengthCounte === void 0 ? true : _ref$showLengthCounte,
|
|
73
75
|
_ref$rows = _ref.rows,
|
|
74
76
|
rows = _ref$rows === void 0 ? 3 : _ref$rows,
|
|
75
|
-
rest = _objectWithoutProperties(_ref,
|
|
77
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
76
78
|
|
|
77
79
|
const initialText = value || defaultValue || '';
|
|
78
80
|
|
package/cjs/types/field.js
CHANGED
package/cjs/types/size.js
CHANGED
package/counter/Counter.js
CHANGED
|
@@ -8,7 +8,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
8
8
|
|
|
9
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; }
|
|
10
10
|
|
|
11
|
-
function _iterableToArrayLimit(arr, i) {
|
|
11
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
12
12
|
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
|
|
@@ -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<Pick<EnhancedFieldProps, "max" | "required" | "hidden" | "dir" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "disabled" | "
|
|
19
|
+
export declare const EnhancedField: React.ForwardRefExoticComponent<Pick<EnhancedFieldProps, "max" | "required" | "type" | "key" | "id" | "height" | "width" | "name" | "color" | "translate" | "value" | "hidden" | "dir" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "children" | "contentEditable" | "enterKeyHint" | "inputMode" | "tabIndex" | "disabled" | "multiple" | "icon" | "src" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "list" | "maxLength" | "min" | "minLength" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "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" | "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>>;
|
|
20
20
|
export default EnhancedField;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["onClick", "className", "label", "icon", "disabled", "name"];
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || 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
4
|
|
|
3
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; }
|
|
@@ -53,7 +55,7 @@ export var EnhancedField = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
53
55
|
icon = _ref4.icon,
|
|
54
56
|
disabled = _ref4.disabled,
|
|
55
57
|
name = _ref4.name,
|
|
56
|
-
rest = _objectWithoutProperties(_ref4,
|
|
58
|
+
rest = _objectWithoutProperties(_ref4, _excluded);
|
|
57
59
|
|
|
58
60
|
var inputRef = useForwardedRef(ref);
|
|
59
61
|
|
package/label/Label.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["visualSize", "required", "hideAsterisk", "className", "children"];
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || 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
4
|
|
|
3
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; }
|
|
@@ -19,7 +21,7 @@ export var Label = function Label(_ref) {
|
|
|
19
21
|
hideAsterisk = _ref$hideAsterisk === void 0 ? false : _ref$hideAsterisk,
|
|
20
22
|
className = _ref.className,
|
|
21
23
|
children = _ref.children,
|
|
22
|
-
rest = _objectWithoutProperties(_ref,
|
|
24
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
23
25
|
|
|
24
26
|
return ___EmotionJSX("label", _extends({
|
|
25
27
|
className: className,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Form components",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
|
-
"version": "0.9.1-alpha.
|
|
6
|
+
"version": "0.9.1-alpha.4bdc9dc9",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"main": "./cjs/index.js",
|
|
9
9
|
"module": "./index.js",
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"react-select": "^4.0.0"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@dfds-ui/hooks": "0.9.1-alpha.
|
|
21
|
-
"@dfds-ui/icons": "0.9.1-alpha.
|
|
22
|
-
"@dfds-ui/react-components": "0.9.1-alpha.
|
|
23
|
-
"@dfds-ui/theme": "0.9.1-alpha.
|
|
24
|
-
"@dfds-ui/typography": "0.9.1-alpha.
|
|
20
|
+
"@dfds-ui/hooks": "0.9.1-alpha.4bdc9dc9",
|
|
21
|
+
"@dfds-ui/icons": "0.9.1-alpha.4bdc9dc9",
|
|
22
|
+
"@dfds-ui/react-components": "0.9.1-alpha.4bdc9dc9",
|
|
23
|
+
"@dfds-ui/theme": "0.9.1-alpha.4bdc9dc9",
|
|
24
|
+
"@dfds-ui/typography": "0.9.1-alpha.4bdc9dc9"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "4bdc9dc9fda6acbddb0d05981b0b44d4ea3364aa",
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
29
|
}
|
package/radio/Radio.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["name", "label", "className", "checked", "disabled", "defaultChecked", "value", "onChange", "error", "visualSize", "Icon", "styledAs"];
|
|
2
|
+
|
|
1
3
|
var _templateObject;
|
|
2
4
|
|
|
3
5
|
function _extends() { _extends = Object.assign || 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); }
|
|
@@ -79,7 +81,7 @@ export var Radio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
79
81
|
visualSizeProp = _ref$visualSize === void 0 ? 'medium' : _ref$visualSize,
|
|
80
82
|
Icon = _ref.Icon,
|
|
81
83
|
styledAs = _ref.styledAs,
|
|
82
|
-
rest = _objectWithoutProperties(_ref,
|
|
84
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
83
85
|
|
|
84
86
|
var ctx = useRadioContext();
|
|
85
87
|
var visualSize = ctx !== undefined ? ctx.visualSize : visualSizeProp;
|
package/rating/Rating.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export declare const Rating: React.ForwardRefExoticComponent<RatingProps & React
|
|
|
46
46
|
export declare type RatingFieldProps = RatingProps & Omit<FieldWrapProps, 'size' | 'placeholder' | 'helpPlacement' | 'children'> & {
|
|
47
47
|
size: Exclude<Size, 'large'>;
|
|
48
48
|
};
|
|
49
|
-
export declare const RatingField: React.ForwardRefExoticComponent<RatingProps & Omit<FieldWrapProps, "
|
|
49
|
+
export declare const RatingField: React.ForwardRefExoticComponent<RatingProps & Omit<FieldWrapProps, "children" | "size" | "placeholder" | "helpPlacement"> & {
|
|
50
50
|
size: Exclude<Size, 'large'>;
|
|
51
51
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
52
52
|
export default RatingField;
|
package/rating/Rating.js
CHANGED
|
@@ -4,7 +4,7 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableTo
|
|
|
4
4
|
|
|
5
5
|
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."); }
|
|
6
6
|
|
|
7
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator
|
|
7
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
8
8
|
|
|
9
9
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
10
|
|
|
@@ -16,7 +16,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
16
16
|
|
|
17
17
|
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; }
|
|
18
18
|
|
|
19
|
-
function _iterableToArrayLimit(arr, i) {
|
|
19
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
20
20
|
|
|
21
21
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
22
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["name", "label", "defaultValue", "className", "help", "onChange", "children", "helpPlacement", "assistiveText", "errorMessage", "disabled", "required", "hideAsterisk", "visualSize"];
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || 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
4
|
|
|
3
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; }
|
|
@@ -46,7 +48,7 @@ export var NativeSelectField = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
46
48
|
hideAsterisk = _ref.hideAsterisk,
|
|
47
49
|
_ref$visualSize = _ref.visualSize,
|
|
48
50
|
visualSize = _ref$visualSize === void 0 ? 'medium' : _ref$visualSize,
|
|
49
|
-
rest = _objectWithoutProperties(_ref,
|
|
51
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
50
52
|
|
|
51
53
|
return ___EmotionJSX(FieldWrap, {
|
|
52
54
|
className: className,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
|
2
|
+
var _excluded = ["name", "label", "defaultValue", "value", "placeholder", "onSelect", "onChange", "isSearchable", "onBlur", "assistiveText", "options", "errorMessage", "isClearable", "disabled", "visualSize", "filterConfig"],
|
|
3
|
+
_excluded2 = ["ref"];
|
|
2
4
|
|
|
3
5
|
var _templateObject;
|
|
4
6
|
|
|
5
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
6
8
|
|
|
7
9
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8
10
|
|
|
@@ -125,7 +127,7 @@ function SelectFieldInner(_ref4, ref) {
|
|
|
125
127
|
_ref4$visualSize = _ref4.visualSize,
|
|
126
128
|
visualSize = _ref4$visualSize === void 0 ? 'medium' : _ref4$visualSize,
|
|
127
129
|
filterConfig = _ref4.filterConfig,
|
|
128
|
-
rest = _objectWithoutProperties(_ref4,
|
|
130
|
+
rest = _objectWithoutProperties(_ref4, _excluded);
|
|
129
131
|
|
|
130
132
|
var DropdownIndicator = function DropdownIndicator(props) {
|
|
131
133
|
var _props$children = props.children,
|
|
@@ -134,7 +136,7 @@ function SelectFieldInner(_ref4, ref) {
|
|
|
134
136
|
}) : _props$children,
|
|
135
137
|
_props$innerProps = props.innerProps,
|
|
136
138
|
ref = _props$innerProps.ref,
|
|
137
|
-
restInnerProps = _objectWithoutProperties(_props$innerProps,
|
|
139
|
+
restInnerProps = _objectWithoutProperties(_props$innerProps, _excluded2);
|
|
138
140
|
|
|
139
141
|
return ___EmotionJSX("div", _extends({}, restInnerProps, {
|
|
140
142
|
ref: ref
|
package/switch/Switch.d.ts
CHANGED
|
@@ -28,5 +28,5 @@ export declare type SwitchProps = React.PropsWithRef<JSX.IntrinsicElements['labe
|
|
|
28
28
|
size?: Size;
|
|
29
29
|
error?: boolean;
|
|
30
30
|
};
|
|
31
|
-
export declare const Switch: React.ForwardRefExoticComponent<Pick<SwitchProps, "
|
|
31
|
+
export declare const Switch: React.ForwardRefExoticComponent<Pick<SwitchProps, "error" | "key" | "name" | "right" | "disabled" | "size" | "checked" | "css" | keyof React.LabelHTMLAttributes<HTMLLabelElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
32
32
|
export {};
|
package/switch/Switch.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
|
2
|
+
var _excluded = ["name", "checked", "onChange", "disabled", "children", "right", "error", "size"];
|
|
2
3
|
|
|
3
4
|
function _extends() { _extends = Object.assign || 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
5
|
|
|
@@ -134,7 +135,7 @@ export var Switch = /*#__PURE__*/forwardRef(function (_ref5, ref) {
|
|
|
134
135
|
errorProp = _ref5$error === void 0 ? false : _ref5$error,
|
|
135
136
|
_ref5$size = _ref5.size,
|
|
136
137
|
sizeProp = _ref5$size === void 0 ? 'medium' : _ref5$size,
|
|
137
|
-
rest = _objectWithoutProperties(_ref5,
|
|
138
|
+
rest = _objectWithoutProperties(_ref5, _excluded);
|
|
138
139
|
|
|
139
140
|
var groupCtx = useSwitchContext();
|
|
140
141
|
var size = groupCtx !== undefined ? groupCtx.size : sizeProp;
|
package/tel-field/TelField.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["name", "label", "errorMessage", "defaultValue", "defaultLocale", "required", "hideAsterisk", "showTrunkValues", "onChange", "onBlur"];
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || 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
4
|
|
|
3
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -8,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
8
10
|
|
|
9
11
|
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; }
|
|
10
12
|
|
|
11
|
-
function _iterableToArrayLimit(arr, i) {
|
|
13
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
12
14
|
|
|
13
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
16
|
|
|
@@ -109,7 +111,7 @@ export var TelField = /*#__PURE__*/forwardRef(function (_ref7, ref) {
|
|
|
109
111
|
showTrunkValues = _ref7$showTrunkValues === void 0 ? false : _ref7$showTrunkValues,
|
|
110
112
|
onChange = _ref7.onChange,
|
|
111
113
|
onBlur = _ref7.onBlur,
|
|
112
|
-
rest = _objectWithoutProperties(_ref7,
|
|
114
|
+
rest = _objectWithoutProperties(_ref7, _excluded);
|
|
113
115
|
|
|
114
116
|
var _useState = useState(false),
|
|
115
117
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -37,7 +37,7 @@ export declare const TextField: React.ForwardRefExoticComponent<BaseFieldProps &
|
|
|
37
37
|
onChange?: ((event: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
38
38
|
onFocus?: ((event: React.FocusEvent<HTMLInputElement>) => void) | undefined;
|
|
39
39
|
onBlur?: ((event: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
40
|
-
inputType?: "number" | "search" | "
|
|
40
|
+
inputType?: "number" | "search" | "file" | "url" | "time" | "text" | "tel" | "date" | undefined;
|
|
41
41
|
autoComplete?: string | undefined;
|
|
42
42
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
43
43
|
export default TextField;
|
package/text-field/TextField.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["name", "label", "placeholder", "value", "defaultValue", "onChange", "onFocus", "onBlur", "prefix", "className", "suffix", "icon", "help", "helpPlacement", "adornment", "assistiveText", "errorMessage", "disabled", "required", "hideAsterisk", "visualSize", "inputType", "autoComplete"];
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || 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
4
|
|
|
3
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; }
|
|
@@ -81,7 +83,7 @@ export var TextField = /*#__PURE__*/forwardRef(function (_ref5, ref) {
|
|
|
81
83
|
_ref5$inputType = _ref5.inputType,
|
|
82
84
|
inputType = _ref5$inputType === void 0 ? 'text' : _ref5$inputType,
|
|
83
85
|
autoComplete = _ref5.autoComplete,
|
|
84
|
-
rest = _objectWithoutProperties(_ref5,
|
|
86
|
+
rest = _objectWithoutProperties(_ref5, _excluded);
|
|
85
87
|
|
|
86
88
|
return ___EmotionJSX(FieldWrap, {
|
|
87
89
|
className: className,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["name", "size", "assistiveText", "errorMessage", "required", "hideAsterisk", "label", "help", "defaultValue", "value", "onChange", "maxValueLength", "placeholder", "disabled", "showLengthCounter", "rows"];
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || 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
4
|
|
|
3
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -8,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
8
10
|
|
|
9
11
|
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; }
|
|
10
12
|
|
|
11
|
-
function _iterableToArrayLimit(arr, i) {
|
|
13
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
12
14
|
|
|
13
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
16
|
|
|
@@ -58,7 +60,7 @@ export var TextareaField = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
58
60
|
showLengthCounter = _ref$showLengthCounte === void 0 ? true : _ref$showLengthCounte,
|
|
59
61
|
_ref$rows = _ref.rows,
|
|
60
62
|
rows = _ref$rows === void 0 ? 3 : _ref$rows,
|
|
61
|
-
rest = _objectWithoutProperties(_ref,
|
|
63
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
62
64
|
|
|
63
65
|
var initialText = value || defaultValue || '';
|
|
64
66
|
|
package/types/field.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types/size.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|