@elliemae/ds-form 2.0.0-next.1 → 2.0.0-next.6
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/cjs/Checkbox/DSCheckbox.js +5 -5
- package/cjs/CheckboxGroup/DSCheckboxGroup.js +3 -3
- package/cjs/ComboBox/v1/DSComboBox.js +5 -4
- package/cjs/ComboBox/v1/components/MenuList.js +2 -1
- package/cjs/ComboBox/v1/components/MultiSelectHeader.js +1 -1
- package/cjs/ComboBox/v1/components/getoptions.js +2 -0
- package/cjs/ComboBox/v1/withSelectStringValueConverter.js +1 -0
- package/cjs/ComboBox/v2/Combobox.js +4 -3
- package/cjs/ComboBox/v2/components/DropdownIndicator.js +2 -1
- package/cjs/ComboBox/v2/components/MenuList.js +2 -1
- package/cjs/ComboBox/v2/components/MultiSelectHeader.js +1 -1
- package/cjs/ComboBox/v2/components/ValueContainer.js +1 -0
- package/cjs/ComboBox/v2/components/getoptions.js +2 -0
- package/cjs/ComboBox/v2/components/useMenuListHeight.js +2 -0
- package/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js +1 -1
- package/cjs/DateInput/DSDateInput.js +2 -1
- package/cjs/DateInput/components/DateInputs.js +1 -0
- package/cjs/DateInput/components/utils.js +2 -2
- package/cjs/DateInputV2/components/DateInputs.js +5 -4
- package/cjs/DateInputV2/components/styled.js +2 -8
- package/cjs/DateInputV2/components/utils.js +2 -2
- package/cjs/FloatingLabelInput/getSvgPath.js +3 -1
- package/cjs/FormItem/DSFormItemLayout.js +2 -2
- package/cjs/FormItem/Label/DSLabel.js +1 -1
- package/cjs/FormItem/Suffix/Suffix.js +2 -6
- package/cjs/Input/DSInput.js +1 -1
- package/cjs/Input/InputAddonWrapper.js +1 -0
- package/cjs/Input/InputImpl.js +2 -2
- package/cjs/InputGroup/AddonWrapper.js +2 -1
- package/cjs/InputMask/DSInputMask.js +1 -0
- package/cjs/InputMask/mask_types/DateInputMask.js +1 -0
- package/cjs/InputMask/mask_types/DateTimeInputMask.js +1 -0
- package/cjs/InputMask/mask_types/DictionaryInputMask.js +1 -0
- package/cjs/InputMask/mask_types/NumberInputMask.js +2 -1
- package/cjs/InputMask/mask_types/PhoneInputMask.js +1 -0
- package/cjs/InputMask/mask_types/PhoneInternationalInputMask.js +1 -0
- package/cjs/InputMask/mask_types/SsnInputMask.js +1 -0
- package/cjs/InputMask/mask_types/UsZipCodeInputMask.js +1 -0
- package/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js +1 -0
- package/cjs/InputMask/props.js +1 -2
- package/cjs/InputProtected/DSInputProtected.js +3 -2
- package/cjs/InputProtected/props.js +1 -2
- package/cjs/LargeInputText/DSLargeInputText.js +2 -2
- package/cjs/RadioGroup/DSRadioGroup.js +3 -3
- package/cjs/RequiredMark/RequiredMark.js +2 -2
- package/cjs/SearchBox/NavSearchBox.js +1 -1
- package/cjs/SearchBox/SearchBoxToggle.js +3 -10
- package/cjs/SearchBox/useSearch.js +1 -0
- package/cjs/TextBox/DSTextBox.js +1 -1
- package/cjs/TimeInput/TimeInputs.js +1 -0
- package/cjs/Toggle/DSToggleImpl.js +1 -1
- package/cjs/Toggle/DSToggleRender.js +2 -2
- package/esm/Checkbox/DSCheckbox.js +5 -5
- package/esm/CheckboxGroup/DSCheckboxGroup.js +3 -3
- package/esm/ComboBox/v1/DSComboBox.js +5 -4
- package/esm/ComboBox/v1/components/MenuList.js +2 -1
- package/esm/ComboBox/v1/components/MultiSelectHeader.js +1 -1
- package/esm/ComboBox/v1/components/getoptions.js +2 -0
- package/esm/ComboBox/v1/withSelectStringValueConverter.js +1 -0
- package/esm/ComboBox/v2/Combobox.js +4 -3
- package/esm/ComboBox/v2/components/DropdownIndicator.js +2 -1
- package/esm/ComboBox/v2/components/MenuList.js +2 -1
- package/esm/ComboBox/v2/components/MultiSelectHeader.js +1 -1
- package/esm/ComboBox/v2/components/ValueContainer.js +1 -0
- package/esm/ComboBox/v2/components/getoptions.js +2 -0
- package/esm/ComboBox/v2/components/useMenuListHeight.js +2 -0
- package/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js +1 -1
- package/esm/DateInput/DSDateInput.js +2 -1
- package/esm/DateInput/components/DateInputs.js +1 -0
- package/esm/DateInput/components/utils.js +2 -2
- package/esm/DateInputV2/components/DateInputs.js +5 -4
- package/esm/DateInputV2/components/styled.js +2 -8
- package/esm/DateInputV2/components/utils.js +2 -2
- package/esm/FloatingLabelInput/getSvgPath.js +3 -1
- package/esm/FormItem/DSFormItemLayout.js +2 -2
- package/esm/FormItem/Label/DSLabel.js +1 -1
- package/esm/FormItem/Suffix/Suffix.js +2 -6
- package/esm/Input/DSInput.js +1 -1
- package/esm/Input/InputAddonWrapper.js +1 -0
- package/esm/Input/InputImpl.js +2 -2
- package/esm/InputGroup/AddonWrapper.js +2 -1
- package/esm/InputMask/DSInputMask.js +1 -0
- package/esm/InputMask/mask_types/DateInputMask.js +1 -0
- package/esm/InputMask/mask_types/DateTimeInputMask.js +1 -0
- package/esm/InputMask/mask_types/DictionaryInputMask.js +1 -0
- package/esm/InputMask/mask_types/NumberInputMask.js +2 -1
- package/esm/InputMask/mask_types/PhoneInputMask.js +1 -0
- package/esm/InputMask/mask_types/PhoneInternationalInputMask.js +1 -0
- package/esm/InputMask/mask_types/SsnInputMask.js +1 -0
- package/esm/InputMask/mask_types/UsZipCodeInputMask.js +1 -0
- package/esm/InputMask/mask_types/ZipCodeSearchInputMask.js +1 -0
- package/esm/InputMask/props.js +1 -2
- package/esm/InputProtected/DSInputProtected.js +3 -2
- package/esm/InputProtected/props.js +1 -2
- package/esm/LargeInputText/DSLargeInputText.js +2 -2
- package/esm/RadioGroup/DSRadioGroup.js +3 -3
- package/esm/RequiredMark/RequiredMark.js +2 -2
- package/esm/SearchBox/NavSearchBox.js +1 -1
- package/esm/SearchBox/SearchBoxToggle.js +3 -10
- package/esm/SearchBox/useSearch.js +1 -0
- package/esm/TextBox/DSTextBox.js +1 -1
- package/esm/TimeInput/TimeInputs.js +1 -0
- package/esm/Toggle/DSToggleImpl.js +1 -1
- package/esm/Toggle/DSToggleRender.js +2 -2
- package/package.json +17 -17
- package/cjs/package.json +0 -7
- package/esm/package.json +0 -7
|
@@ -67,7 +67,7 @@ function Checkbox(_ref) {
|
|
|
67
67
|
"data-testid": rest['data-testid'] || 'ds-checkbox',
|
|
68
68
|
"aria-checked": checked,
|
|
69
69
|
"aria-disabled": disabled,
|
|
70
|
-
className:
|
|
70
|
+
className: "".concat(className, " ").concat(variant || '', " ").concat(disabled ? 'disabled' : ''),
|
|
71
71
|
"data-kind": "checkmark",
|
|
72
72
|
onKeyDown: e => {
|
|
73
73
|
e.target = checkRef.current;
|
|
@@ -85,7 +85,7 @@ function Checkbox(_ref) {
|
|
|
85
85
|
tabIndex: tabIndex,
|
|
86
86
|
value: value,
|
|
87
87
|
children: /*#__PURE__*/jsxRuntime.jsx("input", {
|
|
88
|
-
id:
|
|
88
|
+
id: "".concat(instanceUID, "-").concat(labelText),
|
|
89
89
|
onClick: handleClick,
|
|
90
90
|
ref: checkRef,
|
|
91
91
|
checked: checked,
|
|
@@ -134,7 +134,7 @@ const DSCheckbox = _ref2 => {
|
|
|
134
134
|
|
|
135
135
|
const checkbox = /*#__PURE__*/jsxRuntime.jsx(Checkbox, _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
136
136
|
checked: checked,
|
|
137
|
-
className: utils.cx(
|
|
137
|
+
className: utils.cx("".concat(classNameElement('input-button'), " checkbox-").concat(String(checked)), className),
|
|
138
138
|
disabled: disabled,
|
|
139
139
|
innerRef: innerRef,
|
|
140
140
|
name: name,
|
|
@@ -147,12 +147,12 @@ const DSCheckbox = _ref2 => {
|
|
|
147
147
|
|
|
148
148
|
if (!labelText) return checkbox;
|
|
149
149
|
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({
|
|
150
|
-
className:
|
|
150
|
+
className: "".concat(cssClassName, " ").concat(variant)
|
|
151
151
|
}, containerProps), {}, {
|
|
152
152
|
children: [/*#__PURE__*/_jsx__default["default"]("label", {
|
|
153
153
|
"data-testid": "ds-checkbox-label",
|
|
154
154
|
className: classNameElement('label'),
|
|
155
|
-
htmlFor:
|
|
155
|
+
htmlFor: "".concat(instanceUID, "-").concat(labelText)
|
|
156
156
|
}, void 0, checkbox, /*#__PURE__*/_jsx__default["default"]("span", {
|
|
157
157
|
className: classNameElement('label-text')
|
|
158
158
|
}, void 0, labelText)), children && /*#__PURE__*/_jsx__default["default"]("div", {
|
|
@@ -27,7 +27,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
27
27
|
|
|
28
28
|
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__default["default"](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; }
|
|
29
29
|
const emClassPrefix = 'em-ds';
|
|
30
|
-
const baseClass =
|
|
30
|
+
const baseClass = "".concat(emClassPrefix, "-checkbox-group");
|
|
31
31
|
|
|
32
32
|
const CheckboxItem = props => /*#__PURE__*/_jsx__default["default"](GroupItem__default["default"], {
|
|
33
33
|
render: context => /*#__PURE__*/jsxRuntime.jsx(DSCheckbox.DSCheckbox, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -66,7 +66,7 @@ const DSCheckboxGroup = ({
|
|
|
66
66
|
multiple: true,
|
|
67
67
|
onChange: onChange
|
|
68
68
|
}, void 0, /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread({
|
|
69
|
-
className:
|
|
69
|
+
className: "".concat(baseClass, " ").concat(baseClass, "--").concat(orientation)
|
|
70
70
|
}, labelProps && labelProps.labelText ? {} : containerProps), {}, {
|
|
71
71
|
role: "group",
|
|
72
72
|
children: React__default["default"].Children.map(children, (child, index) => /*#__PURE__*/jsxRuntime.jsx(CheckboxItem, _objectSpread(_objectSpread({}, child.props), {}, {
|
|
@@ -79,7 +79,7 @@ const DSCheckboxGroup = ({
|
|
|
79
79
|
|
|
80
80
|
if (labelProps && labelProps.labelText) {
|
|
81
81
|
return /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread({
|
|
82
|
-
className:
|
|
82
|
+
className: "".concat(baseClass, "-form-item-layout-wrapper")
|
|
83
83
|
}, containerProps), {}, {
|
|
84
84
|
role: "group",
|
|
85
85
|
children: /*#__PURE__*/jsxRuntime.jsx(DSFormItemLayout["default"], _objectSpread(_objectSpread({}, labelProps), {}, {
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
7
7
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
8
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
8
9
|
var React = require('react');
|
|
9
10
|
var lodash = require('lodash');
|
|
10
11
|
var Select = require('react-select');
|
|
@@ -200,7 +201,7 @@ class DSComboBox extends React__default["default"].Component {
|
|
|
200
201
|
|
|
201
202
|
return /*#__PURE__*/_jsx__default["default"](reactPopper.Manager, {}, void 0, /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread({
|
|
202
203
|
ref: measureRef,
|
|
203
|
-
className: utils.cx(
|
|
204
|
+
className: utils.cx("".concat(ThemeConstants.prefix, "-").concat(blockName, "-wrapper"), className, hasError && "".concat(ThemeConstants.prefix, "-").concat(blockName, "--").concat(propTypes.COMBOBOX_VARIANT.ERROR), "".concat(ThemeConstants.prefix, "-").concat(blockName, "--").concat(variant), "focus-".concat(focus), isMulti && 'combo-multi', expandMenuOutsideContainer && 'expanded-outside-container')
|
|
204
205
|
}, containerProps), {}, {
|
|
205
206
|
onMouseEnter: () => {
|
|
206
207
|
this.handleHoverRef(undefined);
|
|
@@ -210,11 +211,11 @@ class DSComboBox extends React__default["default"].Component {
|
|
|
210
211
|
this.select = ref;
|
|
211
212
|
},
|
|
212
213
|
autoFocus: autoFocus,
|
|
213
|
-
classNamePrefix:
|
|
214
|
+
classNamePrefix: "".concat(ThemeConstants.prefix, "-").concat(blockName),
|
|
214
215
|
components: _objectSpread({
|
|
215
216
|
Control,
|
|
216
217
|
Menu: !options || options.length === 0 ? SelectMenu : props => /*#__PURE__*/_jsx__default["default"]("div", {
|
|
217
|
-
className:
|
|
218
|
+
className: "select-menu-combo ".concat(isMulti && 'select-menu-combo-multi'),
|
|
218
219
|
onMouseLeave: () => {
|
|
219
220
|
this.isHover = undefined;
|
|
220
221
|
this.handleHover(undefined);
|
|
@@ -304,7 +305,7 @@ class DSComboBox extends React__default["default"].Component {
|
|
|
304
305
|
const width = calculateWidth.calculateWidth(options);
|
|
305
306
|
if (!width) return null;
|
|
306
307
|
return {
|
|
307
|
-
width:
|
|
308
|
+
width: "".concat(width, "px")
|
|
308
309
|
};
|
|
309
310
|
}
|
|
310
311
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
4
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
var Select = require('react-select');
|
|
7
8
|
var reactWindow = require('react-window');
|
|
@@ -81,7 +82,7 @@ const MenuList = props => {
|
|
|
81
82
|
}
|
|
82
83
|
}, void 0, isMulti && /*#__PURE__*/jsxRuntime.jsx(MultiSelectHeader, _objectSpread({}, props)), /*#__PURE__*/jsxRuntime.jsx(reactWindow.FixedSizeList, {
|
|
83
84
|
ref: listRef,
|
|
84
|
-
className:
|
|
85
|
+
className: "combobox-menu-list ".concat(isMulti && 'combobox-menu-list-is-multi'),
|
|
85
86
|
height: height,
|
|
86
87
|
itemCount: options.length,
|
|
87
88
|
itemData: itemData,
|
|
@@ -11,7 +11,7 @@ const MultiSelectHeader = props => {
|
|
|
11
11
|
const count = props.children.filter(child => child.props.isSelected).length;
|
|
12
12
|
return /*#__PURE__*/_jsx__default["default"]("div", {
|
|
13
13
|
className: "combobox-multi-select-header"
|
|
14
|
-
}, void 0,
|
|
14
|
+
}, void 0, "".concat(count, " selected"));
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
module.exports = MultiSelectHeader;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
7
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
8
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
8
9
|
require('core-js/modules/esnext.set.add-all.js');
|
|
9
10
|
require('core-js/modules/esnext.set.delete-all.js');
|
|
10
11
|
require('core-js/modules/esnext.set.difference.js');
|
|
@@ -67,7 +68,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
67
68
|
|
|
68
69
|
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__default["default"](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; }
|
|
69
70
|
const blockName = 'em-ds-combobox';
|
|
70
|
-
const container =
|
|
71
|
+
const container = "".concat(blockName, "-container");
|
|
71
72
|
|
|
72
73
|
const getValues = (options, isMulti, valueProperty) => {
|
|
73
74
|
if (!options) return null;
|
|
@@ -278,7 +279,7 @@ const DSComboBox2HOCLess = _ref => {
|
|
|
278
279
|
value: ctx
|
|
279
280
|
}, void 0, /*#__PURE__*/_jsx__default["default"](reactPopper.Manager, {}, void 0, /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread({
|
|
280
281
|
ref: measureRef,
|
|
281
|
-
className: utils.cx(
|
|
282
|
+
className: utils.cx("".concat(container), inputInFocus && 'in-focus', hasError && 'with-error', disabled && 'is-disabled', className),
|
|
282
283
|
onBlur: handleBlur,
|
|
283
284
|
"data-testid": "combobox",
|
|
284
285
|
role: "combobox"
|
|
@@ -365,7 +366,7 @@ const DSComboBox2HOCLess = _ref => {
|
|
|
365
366
|
const width = calculateWidth.calculateWidth(options);
|
|
366
367
|
if (!width) return null;
|
|
367
368
|
return {
|
|
368
|
-
width:
|
|
369
|
+
width: "".concat(width, "px")
|
|
369
370
|
};
|
|
370
371
|
}
|
|
371
372
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
4
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
5
5
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
6
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
7
|
var React = require('react');
|
|
7
8
|
var lodash = require('lodash');
|
|
8
9
|
var ChevronSmallDown = require('@elliemae/ds-icons/ChevronSmallDown');
|
|
@@ -76,7 +77,7 @@ const DropdownIndicator = _ref => {
|
|
|
76
77
|
"data-testid": "combobox-dropdown-btn",
|
|
77
78
|
"aria-label": "dropdown-indicator",
|
|
78
79
|
buttonType: "text",
|
|
79
|
-
className:
|
|
80
|
+
className: "dropdown-indicator ".concat(lodash.get(selectProps, 'menuIsOpen', false) && !inputInFocus ? 'active' : ''),
|
|
80
81
|
icon: _ChevronSmallDown || (_ChevronSmallDown = /*#__PURE__*/_jsx__default["default"](ChevronSmallDown__default["default"], {})),
|
|
81
82
|
innerRef: innerRef,
|
|
82
83
|
onClick: handleOnClick,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
4
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
var Select = require('react-select');
|
|
7
8
|
var reactWindow = require('react-window');
|
|
@@ -112,7 +113,7 @@ const MenuList = /*#__PURE__*/React__default["default"].memo(props => {
|
|
|
112
113
|
scrollTo(listRef);
|
|
113
114
|
}
|
|
114
115
|
},
|
|
115
|
-
className:
|
|
116
|
+
className: "combobox-menu-list ".concat(isMulti && 'combobox-menu-list-is-multi'),
|
|
116
117
|
height: height,
|
|
117
118
|
itemCount: options.length,
|
|
118
119
|
itemData: itemData,
|
|
@@ -27,7 +27,7 @@ const MultiSelectHeader = props => {
|
|
|
27
27
|
const isClearButtonDisabled = selectedItems === 0;
|
|
28
28
|
const isAllButtonDisabled = selectedItems === totalItems;
|
|
29
29
|
return /*#__PURE__*/_jsx__default["default"](HeaderWrapper, {}, void 0, /*#__PURE__*/_jsx__default["default"](ContentWrapper, {}, void 0, /*#__PURE__*/_jsx__default["default"](HeaderTitle, {}, void 0, /*#__PURE__*/_jsx__default["default"](DSTruncatedTooltipText.SimpleTruncatedTooltipText, {
|
|
30
|
-
value:
|
|
30
|
+
value: "".concat(selectedItems, " selected")
|
|
31
31
|
})), !selectAllDisabled && /*#__PURE__*/_jsx__default["default"](ActionButtons, {}, void 0, /*#__PURE__*/_jsx__default["default"](StyledButton, {
|
|
32
32
|
"data-testid": "combobox-all-btn",
|
|
33
33
|
buttonType: "text",
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
6
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
7
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
8
|
var React = require('react');
|
|
8
9
|
var Select = require('react-select');
|
|
9
10
|
var utils = require('@elliemae/ds-utilities/utils');
|
|
@@ -55,7 +55,7 @@ function ComboBoxFreeSolo({
|
|
|
55
55
|
disabled = false,
|
|
56
56
|
menuIsOpen = false,
|
|
57
57
|
placeholder = 'Select values',
|
|
58
|
-
formatCreateLabel = val =>
|
|
58
|
+
formatCreateLabel = val => "Create ".concat(val),
|
|
59
59
|
maxOptions = undefined
|
|
60
60
|
}) {
|
|
61
61
|
return /*#__PURE__*/_jsx__default["default"](Combobox.DSComboBox2, {
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
7
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
8
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
8
9
|
var React = require('react');
|
|
9
10
|
var reactDesc = require('react-desc');
|
|
10
11
|
var utils = require('@elliemae/ds-utilities/utils');
|
|
@@ -63,7 +64,7 @@ const DSDateInput = ({
|
|
|
63
64
|
inputOnChange(date);
|
|
64
65
|
}, []);
|
|
65
66
|
return /*#__PURE__*/_jsx__default["default"](DSInput["default"], {
|
|
66
|
-
className:
|
|
67
|
+
className: "".concat(className, " input-date-input "),
|
|
67
68
|
clearable: clearable,
|
|
68
69
|
containerProps: containerProps,
|
|
69
70
|
customInputType: _ref => {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
4
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
5
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
7
8
|
var usePrevious = require('@elliemae/ds-utilities/hooks/usePrevious');
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
6
|
var timeUtils = require('@elliemae/ds-utilities/timeUtils');
|
|
6
7
|
var utils = require('@elliemae/ds-utilities/utils');
|
|
7
8
|
var moment = require('moment');
|
|
@@ -10,7 +11,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
11
|
|
|
11
12
|
var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
|
|
12
13
|
|
|
13
|
-
/* eslint-disable max-params */
|
|
14
14
|
const currentYear = new Date().getFullYear();
|
|
15
15
|
const isArrowIncrementDecrement = key => key === 'ArrowDown' || key === 'ArrowUp'; // TODO remove and keep `true` behavior ( PUI-4141 )
|
|
16
16
|
|
|
@@ -167,7 +167,7 @@ const handleCompletedDate = (time, date, show, INTERNAL_V2_NO_MUTATION) => {
|
|
|
167
167
|
showDay
|
|
168
168
|
} = show;
|
|
169
169
|
if (time && !year && !month && !day) return '';
|
|
170
|
-
newDate.value =
|
|
170
|
+
newDate.value = "".concat(year, "-").concat(month, "-").concat(day);
|
|
171
171
|
if (showMonth && month) newDate.month(utils.parseInt(month - 1, 10));
|
|
172
172
|
if (showDay && day) newDate.date(utils.parseInt(day, 10));
|
|
173
173
|
if (showYear && year) newDate.year(utils.parseInt(year, 10));
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
8
|
var React = require('react');
|
|
8
9
|
var moment = require('moment');
|
|
9
10
|
var utils = require('./utils.js');
|
|
@@ -49,7 +50,7 @@ const DateInputs = ({
|
|
|
49
50
|
}, [dayRef.current]);
|
|
50
51
|
const triggerOnDateChange = React__default["default"].useCallback(() => {
|
|
51
52
|
if (month && day && year && haveInputsOnChangeTriggered) {
|
|
52
|
-
const momentValue = moment__default["default"](
|
|
53
|
+
const momentValue = moment__default["default"]("".concat(month).concat(day).concat(year), 'MMDDYYYY', true);
|
|
53
54
|
|
|
54
55
|
if (momentValue.isValid()) {
|
|
55
56
|
onDateChange(momentValue);
|
|
@@ -92,15 +93,15 @@ const DateInputs = ({
|
|
|
92
93
|
// When component mounts haveInputsOnChangeTriggered is set to false
|
|
93
94
|
// so this is not triggered on mount but is triggered with all other changes
|
|
94
95
|
if (haveInputsOnChangeTriggered) {
|
|
95
|
-
const momentValue = moment__default["default"](
|
|
96
|
-
onChange(
|
|
96
|
+
const momentValue = moment__default["default"]("".concat(month).concat(day).concat(year), FORMAT, true);
|
|
97
|
+
onChange("".concat(month).concat(day).concat(year), momentValue.isValid() ? momentValue : null);
|
|
97
98
|
}
|
|
98
99
|
}, [day, month, year]);
|
|
99
100
|
React.useEffect(() => {
|
|
100
101
|
triggerOnDateChange();
|
|
101
102
|
}, [onChangeDateTrigger]);
|
|
102
103
|
React.useEffect(() => {
|
|
103
|
-
if (time && time !==
|
|
104
|
+
if (time && time !== "".concat(month).concat(day).concat(year) && moment__default["default"](time, 'MMDDYYYY').isValid()) {
|
|
104
105
|
const values = String(time || '');
|
|
105
106
|
if (values.slice(0, 2)) setMonth(values.slice(0, 2));
|
|
106
107
|
if (values.slice(2, 4)) setDay(values.slice(2, 4));
|
|
@@ -17,19 +17,13 @@ const DateInputWrapper = /*#__PURE__*/styled__default["default"](dsGrid.Grid).wi
|
|
|
17
17
|
})(["align-items:center;align-content:center;", " width:102px;&:focus{outline-style:none;box-shadow:none;border-color:transparent;}"], ({
|
|
18
18
|
disabled,
|
|
19
19
|
theme
|
|
20
|
-
}) => disabled ?
|
|
21
|
-
background: ${theme.colors.neutral[100]};
|
|
22
|
-
color: ${theme.colors.neutral[500]};
|
|
23
|
-
` : '');
|
|
20
|
+
}) => disabled ? "\n background: ".concat(theme.colors.neutral[100], ";\n color: ").concat(theme.colors.neutral[500], ";\n ") : '');
|
|
24
21
|
const DateInputInput = /*#__PURE__*/styled__default["default"].input.withConfig({
|
|
25
22
|
componentId: "sc-ads423-2"
|
|
26
23
|
})(["outline:none;border:none;border-radius:0;width:", ";height:", ";", " padding-left:4px;padding-right:0px;&::placeholder{font-size:95%;font-style:italic;}:-moz-placeholder{font-size:95%;font-style:italic;}::-moz-placeholder{font-size:95%;font-style:italic;}&:focus{background:", ";background-clip:content-box;}::-moz-selection{background:transparent;}::selection{background:transparent;}"], props => props.size === 'l' ? '38px' : '25px', props => props.theme.space.xs, ({
|
|
27
24
|
disabled,
|
|
28
25
|
theme
|
|
29
|
-
}) => disabled ?
|
|
30
|
-
background: ${theme.colors.neutral[100]};
|
|
31
|
-
color: ${theme.colors.neutral[500]};
|
|
32
|
-
` : '', ({
|
|
26
|
+
}) => disabled ? "\n background: ".concat(theme.colors.neutral[100], ";\n color: ").concat(theme.colors.neutral[500], ";\n ") : '', ({
|
|
33
27
|
theme
|
|
34
28
|
}) => theme.colors.brand['300']);
|
|
35
29
|
const DateInputDivider = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
6
|
var timeUtils = require('@elliemae/ds-utilities/timeUtils');
|
|
6
7
|
var utils = require('@elliemae/ds-utilities/utils');
|
|
7
8
|
var moment = require('moment');
|
|
@@ -10,7 +11,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
11
|
|
|
11
12
|
var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
|
|
12
13
|
|
|
13
|
-
/* eslint-disable max-params */
|
|
14
14
|
const currentYear = new Date().getFullYear();
|
|
15
15
|
|
|
16
16
|
const getNextSibling = (elem, selector) => {
|
|
@@ -216,7 +216,7 @@ const handleCompletedDate = (time, date, show, INTERNAL_V2_NO_MUTATION) => {
|
|
|
216
216
|
showDay
|
|
217
217
|
} = show;
|
|
218
218
|
if (time && !year && !month && !day) return '';
|
|
219
|
-
newDate.value =
|
|
219
|
+
newDate.value = "".concat(year, "-").concat(month, "-").concat(day);
|
|
220
220
|
if (showMonth && month) newDate.month(utils.parseInt(month - 1, 10));
|
|
221
221
|
if (showDay && day) newDate.date(utils.parseInt(day, 10));
|
|
222
222
|
if (showYear && year) newDate.year(utils.parseInt(year, 10));
|
|
@@ -33,7 +33,9 @@ function getSvgPath({
|
|
|
33
33
|
extraSizeForTopH = 0;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
const pathMiddle = '' + (hasRightRadius ? 'a' + radius + ',' + radius + ' 0 0 1 ' + radius + ',' + radius : '') + 'v' + (height - (2 * cornerWidth - (extraSizeForRightV + 1.5))) + (
|
|
36
|
+
const pathMiddle = '' + (hasRightRadius ? 'a' + radius + ',' + radius + ' 0 0 1 ' + radius + ',' + radius : '') + 'v' + (height - (2 * cornerWidth - (extraSizeForRightV + 1.5))) + ( // right vertical line
|
|
37
|
+
hasRightRadius ? 'a' + radius + ',' + radius + ' 0 0 1 ' + -radius + ',' + radius : '') + 'h' + (-width + 2 * cornerWidth - extraSizeForH) + (hasLeftRadius ? 'a' + radius + ',' + radius + ' 0 0 1 ' + -radius + ',' + -radius : '') + 'v' + (-height + (2 * cornerWidth - (extraSizeForLeftV + 1.5))) + ( // left vertical line
|
|
38
|
+
hasLeftRadius ? 'a' + radius + ',' + radius + ' 0 0 1 ' + radius + ',' + -radius : '');
|
|
37
39
|
let path;
|
|
38
40
|
|
|
39
41
|
{
|
|
@@ -46,8 +46,8 @@ const Wrapper = dsClassnames.aggregatedClasses('div')(blockName, null, ({
|
|
|
46
46
|
[variant]: variant,
|
|
47
47
|
'with-highlight': withHighlight
|
|
48
48
|
}));
|
|
49
|
-
const WrapperContent = dsClassnames.aggregatedClasses('div')(
|
|
50
|
-
const WrapperContentGroup = dsClassnames.aggregatedClasses('fieldset')(
|
|
49
|
+
const WrapperContent = dsClassnames.aggregatedClasses('div')("".concat(blockName, "-content"));
|
|
50
|
+
const WrapperContentGroup = dsClassnames.aggregatedClasses('fieldset')("".concat(blockName, "-content"));
|
|
51
51
|
|
|
52
52
|
const DSFormItemLayout = _ref => {
|
|
53
53
|
var _WrapperContentComp;
|
|
@@ -25,7 +25,7 @@ const DSLabel = ({
|
|
|
25
25
|
}) => {
|
|
26
26
|
const Tag = isGroup ? 'legend' : 'label';
|
|
27
27
|
return /*#__PURE__*/_jsx__default["default"](Tag, {
|
|
28
|
-
className:
|
|
28
|
+
className: "".concat(blockName).concat(isGroup ? " ".concat(blockName, "--group") : ''),
|
|
29
29
|
htmlFor: htmlFor
|
|
30
30
|
}, void 0, truncateText ? /*#__PURE__*/_jsx__default["default"](DSTruncatedTooltipText__default["default"], {
|
|
31
31
|
value: children || label
|
|
@@ -13,15 +13,11 @@ const Suffix = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
|
13
13
|
componentId: "sc-126c671-0"
|
|
14
14
|
})(["height:2.16rem;align-items:center;display:flex;", ""], props => {
|
|
15
15
|
if (props.label && !props.withFeedback) {
|
|
16
|
-
return
|
|
17
|
-
padding-top: 1.2rem;
|
|
18
|
-
`;
|
|
16
|
+
return "\n padding-top: 1.2rem;\n ";
|
|
19
17
|
}
|
|
20
18
|
|
|
21
19
|
if (!props.label && !props.withFeedback) {
|
|
22
|
-
return
|
|
23
|
-
padding-top: 1rem;
|
|
24
|
-
`;
|
|
20
|
+
return "\n padding-top: 1rem;\n ";
|
|
25
21
|
}
|
|
26
22
|
});
|
|
27
23
|
const SuffixInputWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
package/cjs/Input/DSInput.js
CHANGED
|
@@ -54,7 +54,7 @@ const DSInput = _ref => {
|
|
|
54
54
|
"aria-label": otherProps['aria-label'],
|
|
55
55
|
"aria-describedby": otherProps['aria-describedby'],
|
|
56
56
|
autoFocus: autoFocus,
|
|
57
|
-
className:
|
|
57
|
+
className: "".concat(className, " ").concat(disabled ? 'input-disabled' : ''),
|
|
58
58
|
clearable: clearable,
|
|
59
59
|
containerProps: containerProps,
|
|
60
60
|
customInputType: customInputType,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
4
5
|
var React = require('react');
|
|
5
6
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
6
7
|
var jsxRuntime = require('react/jsx-runtime');
|
package/cjs/Input/InputImpl.js
CHANGED
|
@@ -298,7 +298,7 @@ class InputImpl extends React.Component {
|
|
|
298
298
|
},
|
|
299
299
|
children: !customInputType ? /*#__PURE__*/jsxRuntime.jsx(Input, _objectSpread(_objectSpread({}, lodash.omit(inputProps, ['disableTooltip'])), {}, {
|
|
300
300
|
autoComplete: "off",
|
|
301
|
-
clearable:
|
|
301
|
+
clearable: "".concat(clearable),
|
|
302
302
|
onChange: this.handleOnChange,
|
|
303
303
|
onBlur: this.handleBlur,
|
|
304
304
|
onFocus: this.handleFocus // using mouseOver instead of mouseEnter (doesn't trigger on disabled inputs)
|
|
@@ -401,7 +401,7 @@ InputImpl.defaultProps = {
|
|
|
401
401
|
value(props, propName, componentName) {
|
|
402
402
|
// eslint-disable-line consistent-return
|
|
403
403
|
if (!!props.isShowElipsisActive && typeof props[propName] !== 'string') {
|
|
404
|
-
return new Error(
|
|
404
|
+
return new Error("Invalid prop `".concat(propName, "` of type `").concat(typeof props[propName], "` supplied to") + " `".concat(componentName, "`. Prop `value` should be of type `string` if prop `isShowElipsisActive` is set to `true`.") + ' Either set `isShowElipsisActive` to `false`, or properly format your `value` prop to `string`.');
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
4
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
7
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -34,7 +35,7 @@ class AddonWrapper extends React.Component {
|
|
|
34
35
|
} = this.props;
|
|
35
36
|
const childType = inputComponent && inputComponent.type && inputComponent.type.name ? inputComponent.type.name.toLowerCase() : 'default';
|
|
36
37
|
return /*#__PURE__*/jsxRuntime.jsxs(Container, _objectSpread(_objectSpread({
|
|
37
|
-
className:
|
|
38
|
+
className: "".concat(className, " ").concat(blockName, "--").concat(childType)
|
|
38
39
|
}, containerProps), {}, {
|
|
39
40
|
children: [leftAddon && /*#__PURE__*/_jsx__default["default"](InputAddon, {}, void 0, leftAddon), inputComponent, rightAddon && /*#__PURE__*/_jsx__default["default"](InputAddon, {}, void 0, rightAddon)]
|
|
40
41
|
}));
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
6
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
7
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
8
|
var React = require('react');
|
|
8
9
|
var reactDesc = require('react-desc');
|
|
9
10
|
var MaskTypes = require('./MaskTypes.js');
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
4
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
var DSTextBox = require('../../TextBox/DSTextBox.js');
|
|
7
8
|
var setCaretPosition = require('../utils/setCaretPosition.js');
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
4
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
var DSTextBox = require('../../TextBox/DSTextBox.js');
|
|
7
8
|
var setCaretPosition = require('../utils/setCaretPosition.js');
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
4
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
var DSTextBox = require('../../TextBox/DSTextBox.js');
|
|
7
8
|
var setCaretPosition = require('../utils/setCaretPosition.js');
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
4
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
5
|
require('core-js/modules/es.string.replace.js');
|
|
6
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
7
|
var React = require('react');
|
|
7
8
|
var DSTextBox = require('../../TextBox/DSTextBox.js');
|
|
8
9
|
var setCaretPosition = require('../utils/setCaretPosition.js');
|
|
@@ -97,7 +98,7 @@ const conformValue = (prevRawValue, prevCursorPos, lastkeycode, {
|
|
|
97
98
|
maskedPos += prefix.length;
|
|
98
99
|
|
|
99
100
|
if (isNegative) {
|
|
100
|
-
if (lastkeycode !== 8 || nextMaskedValue !== prefix) nextMaskedValue =
|
|
101
|
+
if (lastkeycode !== 8 || nextMaskedValue !== prefix) nextMaskedValue = "-".concat(nextMaskedValue);
|
|
101
102
|
maskedPos += 1;
|
|
102
103
|
}
|
|
103
104
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
4
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
var DSTextBox = require('../../TextBox/DSTextBox.js');
|
|
7
8
|
var setCaretPosition = require('../utils/setCaretPosition.js');
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
4
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
var DSTextBox = require('../../TextBox/DSTextBox.js');
|
|
7
8
|
var setCaretPosition = require('../utils/setCaretPosition.js');
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
4
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
var DSTextBox = require('../../TextBox/DSTextBox.js');
|
|
7
8
|
var setCaretPosition = require('../utils/setCaretPosition.js');
|