@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
|
@@ -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');
|
package/cjs/InputMask/props.js
CHANGED
|
@@ -144,8 +144,7 @@ const inputProps = {
|
|
|
144
144
|
* The placeholder character represents the fillable spot in the mask.
|
|
145
145
|
* The default placeholder character is underscore, _
|
|
146
146
|
*/
|
|
147
|
-
placeholderChar: reactDesc.PropTypes.string.description(
|
|
148
|
-
The default placeholder character is underscore, _.`).defaultValue('_')
|
|
147
|
+
placeholderChar: reactDesc.PropTypes.string.description("The placeholder character represents the fillable spot in the mask.\n The default placeholder character is underscore, _.").defaultValue('_')
|
|
149
148
|
};
|
|
150
149
|
|
|
151
150
|
exports.inputProps = inputProps;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
6
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
7
7
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
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 LockUnlocked = require('@elliemae/ds-icons/LockUnlocked');
|
|
@@ -71,14 +72,14 @@ const DSInputProtected = _ref => {
|
|
|
71
72
|
}, [rightAddon, inputHidden]);
|
|
72
73
|
return /*#__PURE__*/_jsx__default["default"]("div", {}, void 0, /*#__PURE__*/_jsx__default["default"](DSInputGroup["default"], {
|
|
73
74
|
leftAddon: left ? /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
74
|
-
"aria-label":
|
|
75
|
+
"aria-label": "".concat(inputLocked ? 'Allow' : 'Disallow', " Edition"),
|
|
75
76
|
buttonType: "secondary",
|
|
76
77
|
icon: ADDON_ICON_OPTIONS[inputLocked ? options.LEFT_ADDON_OPTIONS.LockUnlocked : options.LEFT_ADDON_OPTIONS.LockLocked],
|
|
77
78
|
onClick: handleLeft
|
|
78
79
|
}) : undefined,
|
|
79
80
|
readOnly: left ? inputLocked : readOnly,
|
|
80
81
|
rightAddon: right ? /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
81
|
-
"aria-label":
|
|
82
|
+
"aria-label": "".concat(inputHidden ? 'Show' : 'Hide', " Characters"),
|
|
82
83
|
buttonType: "secondary",
|
|
83
84
|
icon: ADDON_ICON_OPTIONS[inputHidden ? options.RIGHT_ADDON_OPTIONS.VisibleView : options.RIGHT_ADDON_OPTIONS.InvisibleHide],
|
|
84
85
|
onClick: handleRight,
|
|
@@ -18,8 +18,7 @@ const inputProtectedProps = {
|
|
|
18
18
|
* PlaceholderChar: The placeholder character represents the fillable spot in the mask.
|
|
19
19
|
* The default placeholder character is underscore, _.
|
|
20
20
|
*/
|
|
21
|
-
placeholderChar: reactDesc.PropTypes.string.description(
|
|
22
|
-
* The default placeholder character is underscore, _.`)
|
|
21
|
+
placeholderChar: reactDesc.PropTypes.string.description("The placeholder character represents the fillable spot in the mask.\n * The default placeholder character is underscore, _.")
|
|
23
22
|
};
|
|
24
23
|
|
|
25
24
|
exports.inputProtectedProps = inputProtectedProps;
|
|
@@ -76,7 +76,7 @@ const DSLargeInputText = ({
|
|
|
76
76
|
|
|
77
77
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
78
78
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread({}, containerProps), {}, {
|
|
79
|
-
className:
|
|
79
|
+
className: "".concat(cssClassName, " ").concat(className),
|
|
80
80
|
children: /*#__PURE__*/_jsx__default["default"]("div", {
|
|
81
81
|
className: classNameBlock('wrapper')
|
|
82
82
|
}, void 0, /*#__PURE__*/jsxRuntime.jsx("textarea", {
|
|
@@ -115,7 +115,7 @@ const DSLargeInputText = ({
|
|
|
115
115
|
limitError
|
|
116
116
|
},
|
|
117
117
|
"data-testid": "counter-area"
|
|
118
|
-
}, void 0,
|
|
118
|
+
}, void 0, "".concat(limitError ? "".concat(errorLimit, " ").concat(characterLimitCounter, " characters. ") : '').concat(String(value).length, " / ").concat(characterLimitCounter))]
|
|
119
119
|
});
|
|
120
120
|
};
|
|
121
121
|
|
|
@@ -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, "-radio-group");
|
|
31
31
|
|
|
32
32
|
const RadioItem = props => /*#__PURE__*/_jsx__default["default"](GroupItem__default["default"], {
|
|
33
33
|
render: context => /*#__PURE__*/jsxRuntime.jsx(DSRadio["default"], _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -67,7 +67,7 @@ const DSRadioGroup = ({
|
|
|
67
67
|
}, void 0, /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread({
|
|
68
68
|
"data-testid": "ds-radiogroup"
|
|
69
69
|
}, labelProps && labelProps.labelText ? {} : containerProps), {}, {
|
|
70
|
-
className:
|
|
70
|
+
className: "".concat(baseClass, " ").concat(baseClass, "--").concat(orientation),
|
|
71
71
|
role: "group",
|
|
72
72
|
children: React__default["default"].Children.map(children, (child, index) => /*#__PURE__*/jsxRuntime.jsx(RadioItem, _objectSpread(_objectSpread({}, child.props), {}, {
|
|
73
73
|
innerRef: t => {
|
|
@@ -79,7 +79,7 @@ const DSRadioGroup = ({
|
|
|
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), {}, {
|
|
@@ -20,12 +20,12 @@ const RequiredMark = ({
|
|
|
20
20
|
|
|
21
21
|
if (required) {
|
|
22
22
|
return /*#__PURE__*/_jsx__default["default"]("span", {
|
|
23
|
-
className:
|
|
23
|
+
className: "".concat(cssClassName)
|
|
24
24
|
}, void 0, "\u25CF");
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
return /*#__PURE__*/_jsx__default["default"]("span", {
|
|
28
|
-
className:
|
|
28
|
+
className: "".concat(cssClassName, " optional-mark")
|
|
29
29
|
}, void 0, "\u26AC");
|
|
30
30
|
};
|
|
31
31
|
|
|
@@ -101,7 +101,7 @@ const ResultTracker = props => {
|
|
|
101
101
|
} = props;
|
|
102
102
|
if (currentResultIndex === -1 && !totalResults) return null;
|
|
103
103
|
if (currentResultIndex === -1 && totalResults) return /*#__PURE__*/_jsx__default["default"](StyledResultTracker, {}, void 0, totalResults);
|
|
104
|
-
return /*#__PURE__*/_jsx__default["default"](StyledResultTracker, {}, void 0,
|
|
104
|
+
return /*#__PURE__*/_jsx__default["default"](StyledResultTracker, {}, void 0, "".concat(currentResultIndex + 1, " / ").concat(totalResults));
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
const VerticalSeparator = () => _StyledVerticalSepara || (_StyledVerticalSepara = /*#__PURE__*/_jsx__default["default"](StyledVerticalSeparator, {}));
|
|
@@ -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 styled = require('styled-components');
|
|
8
9
|
var SearchIcon = require('@elliemae/ds-icons/Search');
|
|
@@ -29,15 +30,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
29
30
|
const SEARCH_BUTTON_WIDTH = 26;
|
|
30
31
|
const SearchWrap = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
31
32
|
componentId: "sc-xt33wm-0"
|
|
32
|
-
})(["transition:width 200ms ease;width:", "px;height:0;", " ", ""], SEARCH_BUTTON_WIDTH, props => !props.show ?
|
|
33
|
-
opacity:0;
|
|
34
|
-
|
|
35
|
-
& * {
|
|
36
|
-
width: ${SEARCH_BUTTON_WIDTH}px;
|
|
37
|
-
height: 0;
|
|
38
|
-
border: 0;
|
|
39
|
-
}
|
|
40
|
-
` : '', props => props.isOpen ? `width: ${props.width};opacity: 1;height: auto;` : ''); // eslint-disable-next-line react/prop-types
|
|
33
|
+
})(["transition:width 200ms ease;width:", "px;height:0;", " ", ""], SEARCH_BUTTON_WIDTH, props => !props.show ? "\n opacity:0;\n\n & * {\n width: ".concat(SEARCH_BUTTON_WIDTH, "px;\n height: 0;\n border: 0;\n }\n ") : '', props => props.isOpen ? "width: ".concat(props.width, ";opacity: 1;height: auto;") : ''); // eslint-disable-next-line react/prop-types
|
|
41
34
|
|
|
42
35
|
const SearchBoxToggle = _ref => {
|
|
43
36
|
let {
|
|
@@ -48,7 +41,7 @@ const SearchBoxToggle = _ref => {
|
|
|
48
41
|
|
|
49
42
|
const [isOpen, setOpen] = React.useState(false);
|
|
50
43
|
const [show, setShow] = React.useState(true);
|
|
51
|
-
const computedWidth = typeof width === 'number' ?
|
|
44
|
+
const computedWidth = typeof width === 'number' ? "".concat(width, "px") : width;
|
|
52
45
|
|
|
53
46
|
const button = /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
54
47
|
onClick: () => {
|
package/cjs/TextBox/DSTextBox.js
CHANGED
|
@@ -48,7 +48,7 @@ const DSTextBox = _ref => {
|
|
|
48
48
|
|
|
49
49
|
return /*#__PURE__*/jsxRuntime.jsx(DSInput["default"], _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
50
50
|
"aria-label": !id ? otherProps['aria-label'] || 'Text Box' : undefined,
|
|
51
|
-
"aria-describedby": otherProps['aria-describedby'] ||
|
|
51
|
+
"aria-describedby": otherProps['aria-describedby'] || "".concat(id, "_feedback_message"),
|
|
52
52
|
autoFocus: autoFocus,
|
|
53
53
|
clearable: clearable,
|
|
54
54
|
containerProps: containerProps,
|
|
@@ -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 moment = require('moment');
|
|
@@ -263,7 +263,7 @@ class DSToggleImpl extends React.Component {
|
|
|
263
263
|
hide
|
|
264
264
|
} = this.state;
|
|
265
265
|
const dragStyle = drag !== null || checked || this.props.checked ? {
|
|
266
|
-
left:
|
|
266
|
+
left: "".concat(drag, "px")
|
|
267
267
|
} : null;
|
|
268
268
|
return /*#__PURE__*/jsxRuntime.jsx(DSToggleRender, _objectSpread(_objectSpread({}, this.props), {}, {
|
|
269
269
|
defaultState: this.props.checked,
|
|
@@ -84,7 +84,7 @@ const DSToggleRender = ({
|
|
|
84
84
|
defaultValue: value
|
|
85
85
|
}, onClickHandlerForNonInteractiveElements__default["default"](allowChange ? null : onChange)), {}, {
|
|
86
86
|
ref: containerRef,
|
|
87
|
-
className:
|
|
87
|
+
className: "".concat(cssClassName, " ").concat(defaultState ? 'default-state-checked' : '').concat(hide ? ' ds-form-element-toggle-hide' : ''),
|
|
88
88
|
onBlur: onBlur,
|
|
89
89
|
onFocus: onFocus // eslint-disable-next-line jsx-a11y/role-has-required-aria-props
|
|
90
90
|
,
|
|
@@ -97,7 +97,7 @@ const DSToggleRender = ({
|
|
|
97
97
|
ref: handRef,
|
|
98
98
|
"aria-checked": checked,
|
|
99
99
|
"aria-disabled": disabled,
|
|
100
|
-
className:
|
|
100
|
+
className: "".concat(classNameElement('input'), " ").concat(defaultState ? 'default-state-checked' : ''),
|
|
101
101
|
onMouseDown: allowChange ? null : onMouseDown,
|
|
102
102
|
onMouseEnter: allowChange ? null : onMouseEnter,
|
|
103
103
|
onMouseLeave: allowChange ? null : onMouseLeave,
|
|
@@ -57,7 +57,7 @@ function Checkbox(_ref) {
|
|
|
57
57
|
"data-testid": rest['data-testid'] || 'ds-checkbox',
|
|
58
58
|
"aria-checked": checked,
|
|
59
59
|
"aria-disabled": disabled,
|
|
60
|
-
className:
|
|
60
|
+
className: "".concat(className, " ").concat(variant || '', " ").concat(disabled ? 'disabled' : ''),
|
|
61
61
|
"data-kind": "checkmark",
|
|
62
62
|
onKeyDown: e => {
|
|
63
63
|
e.target = checkRef.current;
|
|
@@ -75,7 +75,7 @@ function Checkbox(_ref) {
|
|
|
75
75
|
tabIndex: tabIndex,
|
|
76
76
|
value: value,
|
|
77
77
|
children: /*#__PURE__*/jsx("input", {
|
|
78
|
-
id:
|
|
78
|
+
id: "".concat(instanceUID, "-").concat(labelText),
|
|
79
79
|
onClick: handleClick,
|
|
80
80
|
ref: checkRef,
|
|
81
81
|
checked: checked,
|
|
@@ -124,7 +124,7 @@ const DSCheckbox = _ref2 => {
|
|
|
124
124
|
|
|
125
125
|
const checkbox = /*#__PURE__*/jsx(Checkbox, _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
126
126
|
checked: checked,
|
|
127
|
-
className: cx(
|
|
127
|
+
className: cx("".concat(classNameElement('input-button'), " checkbox-").concat(String(checked)), className),
|
|
128
128
|
disabled: disabled,
|
|
129
129
|
innerRef: innerRef,
|
|
130
130
|
name: name,
|
|
@@ -137,12 +137,12 @@ const DSCheckbox = _ref2 => {
|
|
|
137
137
|
|
|
138
138
|
if (!labelText) return checkbox;
|
|
139
139
|
return /*#__PURE__*/jsxs("div", _objectSpread(_objectSpread({
|
|
140
|
-
className:
|
|
140
|
+
className: "".concat(cssClassName, " ").concat(variant)
|
|
141
141
|
}, containerProps), {}, {
|
|
142
142
|
children: [/*#__PURE__*/_jsx("label", {
|
|
143
143
|
"data-testid": "ds-checkbox-label",
|
|
144
144
|
className: classNameElement('label'),
|
|
145
|
-
htmlFor:
|
|
145
|
+
htmlFor: "".concat(instanceUID, "-").concat(labelText)
|
|
146
146
|
}, void 0, checkbox, /*#__PURE__*/_jsx("span", {
|
|
147
147
|
className: classNameElement('label-text')
|
|
148
148
|
}, void 0, labelText)), children && /*#__PURE__*/_jsx("div", {
|
|
@@ -15,7 +15,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
15
15
|
|
|
16
16
|
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; }
|
|
17
17
|
const emClassPrefix = 'em-ds';
|
|
18
|
-
const baseClass =
|
|
18
|
+
const baseClass = "".concat(emClassPrefix, "-checkbox-group");
|
|
19
19
|
|
|
20
20
|
const CheckboxItem = props => /*#__PURE__*/_jsx(GroupItem, {
|
|
21
21
|
render: context => /*#__PURE__*/jsx(DSCheckbox, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -54,7 +54,7 @@ const DSCheckboxGroup = ({
|
|
|
54
54
|
multiple: true,
|
|
55
55
|
onChange: onChange
|
|
56
56
|
}, void 0, /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
|
|
57
|
-
className:
|
|
57
|
+
className: "".concat(baseClass, " ").concat(baseClass, "--").concat(orientation)
|
|
58
58
|
}, labelProps && labelProps.labelText ? {} : containerProps), {}, {
|
|
59
59
|
role: "group",
|
|
60
60
|
children: React.Children.map(children, (child, index) => /*#__PURE__*/jsx(CheckboxItem, _objectSpread(_objectSpread({}, child.props), {}, {
|
|
@@ -67,7 +67,7 @@ const DSCheckboxGroup = ({
|
|
|
67
67
|
|
|
68
68
|
if (labelProps && labelProps.labelText) {
|
|
69
69
|
return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
|
|
70
|
-
className:
|
|
70
|
+
className: "".concat(baseClass, "-form-item-layout-wrapper")
|
|
71
71
|
}, containerProps), {}, {
|
|
72
72
|
role: "group",
|
|
73
73
|
children: /*#__PURE__*/jsx(DSFormItemLayout, _objectSpread(_objectSpread({}, labelProps), {}, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
3
3
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
4
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
4
5
|
import React from 'react';
|
|
5
6
|
import { debounce, throttle } from 'lodash';
|
|
6
7
|
import Select from 'react-select';
|
|
@@ -190,7 +191,7 @@ class DSComboBox extends React.Component {
|
|
|
190
191
|
|
|
191
192
|
return /*#__PURE__*/_jsx(Manager, {}, void 0, /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
|
|
192
193
|
ref: measureRef,
|
|
193
|
-
className: cx(
|
|
194
|
+
className: cx("".concat(ThemeConstants.prefix, "-").concat(blockName, "-wrapper"), className, hasError && "".concat(ThemeConstants.prefix, "-").concat(blockName, "--").concat(COMBOBOX_VARIANT.ERROR), "".concat(ThemeConstants.prefix, "-").concat(blockName, "--").concat(variant), "focus-".concat(focus), isMulti && 'combo-multi', expandMenuOutsideContainer && 'expanded-outside-container')
|
|
194
195
|
}, containerProps), {}, {
|
|
195
196
|
onMouseEnter: () => {
|
|
196
197
|
this.handleHoverRef(undefined);
|
|
@@ -200,11 +201,11 @@ class DSComboBox extends React.Component {
|
|
|
200
201
|
this.select = ref;
|
|
201
202
|
},
|
|
202
203
|
autoFocus: autoFocus,
|
|
203
|
-
classNamePrefix:
|
|
204
|
+
classNamePrefix: "".concat(ThemeConstants.prefix, "-").concat(blockName),
|
|
204
205
|
components: _objectSpread({
|
|
205
206
|
Control,
|
|
206
207
|
Menu: !options || options.length === 0 ? SelectMenu : props => /*#__PURE__*/_jsx("div", {
|
|
207
|
-
className:
|
|
208
|
+
className: "select-menu-combo ".concat(isMulti && 'select-menu-combo-multi'),
|
|
208
209
|
onMouseLeave: () => {
|
|
209
210
|
this.isHover = undefined;
|
|
210
211
|
this.handleHover(undefined);
|
|
@@ -294,7 +295,7 @@ class DSComboBox extends React.Component {
|
|
|
294
295
|
const width = calculateWidth(options);
|
|
295
296
|
if (!width) return null;
|
|
296
297
|
return {
|
|
297
|
-
width:
|
|
298
|
+
width: "".concat(width, "px")
|
|
298
299
|
};
|
|
299
300
|
}
|
|
300
301
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
4
|
import { useRef, useState, useEffect } from 'react';
|
|
4
5
|
import { components } from 'react-select';
|
|
5
6
|
import { FixedSizeList } from 'react-window';
|
|
@@ -73,7 +74,7 @@ const MenuList = props => {
|
|
|
73
74
|
}
|
|
74
75
|
}, void 0, isMulti && /*#__PURE__*/jsx(MultiSelectHeader, _objectSpread({}, props)), /*#__PURE__*/jsx(FixedSizeList, {
|
|
75
76
|
ref: listRef,
|
|
76
|
-
className:
|
|
77
|
+
className: "combobox-menu-list ".concat(isMulti && 'combobox-menu-list-is-multi'),
|
|
77
78
|
height: height,
|
|
78
79
|
itemCount: options.length,
|
|
79
80
|
itemData: itemData,
|
|
@@ -5,7 +5,7 @@ const MultiSelectHeader = props => {
|
|
|
5
5
|
const count = props.children.filter(child => child.props.isSelected).length;
|
|
6
6
|
return /*#__PURE__*/_jsx("div", {
|
|
7
7
|
className: "combobox-multi-select-header"
|
|
8
|
-
}, void 0,
|
|
8
|
+
}, void 0, "".concat(count, " selected"));
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { MultiSelectHeader as default };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
4
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
4
5
|
import 'core-js/modules/esnext.set.add-all.js';
|
|
5
6
|
import 'core-js/modules/esnext.set.delete-all.js';
|
|
6
7
|
import 'core-js/modules/esnext.set.difference.js';
|
|
@@ -53,7 +54,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
53
54
|
|
|
54
55
|
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; }
|
|
55
56
|
const blockName = 'em-ds-combobox';
|
|
56
|
-
const container =
|
|
57
|
+
const container = "".concat(blockName, "-container");
|
|
57
58
|
|
|
58
59
|
const getValues = (options, isMulti, valueProperty) => {
|
|
59
60
|
if (!options) return null;
|
|
@@ -264,7 +265,7 @@ const DSComboBox2HOCLess = _ref => {
|
|
|
264
265
|
value: ctx
|
|
265
266
|
}, void 0, /*#__PURE__*/_jsx(Manager, {}, void 0, /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
|
|
266
267
|
ref: measureRef,
|
|
267
|
-
className: cx(
|
|
268
|
+
className: cx("".concat(container), inputInFocus && 'in-focus', hasError && 'with-error', disabled && 'is-disabled', className),
|
|
268
269
|
onBlur: handleBlur,
|
|
269
270
|
"data-testid": "combobox",
|
|
270
271
|
role: "combobox"
|
|
@@ -351,7 +352,7 @@ const DSComboBox2HOCLess = _ref => {
|
|
|
351
352
|
const width = calculateWidth(options);
|
|
352
353
|
if (!width) return null;
|
|
353
354
|
return {
|
|
354
|
-
width:
|
|
355
|
+
width: "".concat(width, "px")
|
|
355
356
|
};
|
|
356
357
|
}
|
|
357
358
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
2
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
4
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
4
5
|
import { useContext, useState } from 'react';
|
|
5
6
|
import { get } from 'lodash';
|
|
6
7
|
import ChevronSmallDown from '@elliemae/ds-icons/ChevronSmallDown';
|
|
@@ -66,7 +67,7 @@ const DropdownIndicator = _ref => {
|
|
|
66
67
|
"data-testid": "combobox-dropdown-btn",
|
|
67
68
|
"aria-label": "dropdown-indicator",
|
|
68
69
|
buttonType: "text",
|
|
69
|
-
className:
|
|
70
|
+
className: "dropdown-indicator ".concat(get(selectProps, 'menuIsOpen', false) && !inputInFocus ? 'active' : ''),
|
|
70
71
|
icon: _ChevronSmallDown || (_ChevronSmallDown = /*#__PURE__*/_jsx(ChevronSmallDown, {})),
|
|
71
72
|
innerRef: innerRef,
|
|
72
73
|
onClick: handleOnClick,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
4
|
import React, { useRef, useState, useEffect } from 'react';
|
|
4
5
|
import { components } from 'react-select';
|
|
5
6
|
import { FixedSizeList } from 'react-window';
|
|
@@ -103,7 +104,7 @@ const MenuList = /*#__PURE__*/React.memo(props => {
|
|
|
103
104
|
scrollTo(listRef);
|
|
104
105
|
}
|
|
105
106
|
},
|
|
106
|
-
className:
|
|
107
|
+
className: "combobox-menu-list ".concat(isMulti && 'combobox-menu-list-is-multi'),
|
|
107
108
|
height: height,
|
|
108
109
|
itemCount: options.length,
|
|
109
110
|
itemData: itemData,
|
|
@@ -18,7 +18,7 @@ const MultiSelectHeader = props => {
|
|
|
18
18
|
const isClearButtonDisabled = selectedItems === 0;
|
|
19
19
|
const isAllButtonDisabled = selectedItems === totalItems;
|
|
20
20
|
return /*#__PURE__*/_jsx(HeaderWrapper, {}, void 0, /*#__PURE__*/_jsx(ContentWrapper, {}, void 0, /*#__PURE__*/_jsx(HeaderTitle, {}, void 0, /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
|
|
21
|
-
value:
|
|
21
|
+
value: "".concat(selectedItems, " selected")
|
|
22
22
|
})), !selectAllDisabled && /*#__PURE__*/_jsx(ActionButtons, {}, void 0, /*#__PURE__*/_jsx(StyledButton, {
|
|
23
23
|
"data-testid": "combobox-all-btn",
|
|
24
24
|
buttonType: "text",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
3
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
4
|
import { useRef, useContext, useState } from 'react';
|
|
4
5
|
import { components } from 'react-select';
|
|
5
6
|
import { cx } from '@elliemae/ds-utilities/utils';
|
|
@@ -48,7 +48,7 @@ function ComboBoxFreeSolo({
|
|
|
48
48
|
disabled = false,
|
|
49
49
|
menuIsOpen = false,
|
|
50
50
|
placeholder = 'Select values',
|
|
51
|
-
formatCreateLabel = val =>
|
|
51
|
+
formatCreateLabel = val => "Create ".concat(val),
|
|
52
52
|
maxOptions = undefined
|
|
53
53
|
}) {
|
|
54
54
|
return /*#__PURE__*/_jsx(DSComboBox2, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
4
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
4
5
|
import { useState, useEffect, useCallback } from 'react';
|
|
5
6
|
import { describe } from 'react-desc';
|
|
6
7
|
import { runAll } from '@elliemae/ds-utilities/utils';
|
|
@@ -54,7 +55,7 @@ const DSDateInput = ({
|
|
|
54
55
|
inputOnChange(date);
|
|
55
56
|
}, []);
|
|
56
57
|
return /*#__PURE__*/_jsx(DSInput, {
|
|
57
|
-
className:
|
|
58
|
+
className: "".concat(className, " input-date-input "),
|
|
58
59
|
clearable: clearable,
|
|
59
60
|
containerProps: containerProps,
|
|
60
61
|
customInputType: _ref => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
2
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
4
|
import React, { useState, useEffect, createElement } from 'react';
|
|
4
5
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
5
6
|
import usePrevious from '@elliemae/ds-utilities/hooks/usePrevious';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
1
2
|
import { addLeadingZeros } from '@elliemae/ds-utilities/timeUtils';
|
|
2
3
|
import { parseInt, isNaN } from '@elliemae/ds-utilities/utils';
|
|
3
4
|
import moment from 'moment';
|
|
4
5
|
|
|
5
|
-
/* eslint-disable max-params */
|
|
6
6
|
const currentYear = new Date().getFullYear();
|
|
7
7
|
const isArrowIncrementDecrement = key => key === 'ArrowDown' || key === 'ArrowUp'; // TODO remove and keep `true` behavior ( PUI-4141 )
|
|
8
8
|
|
|
@@ -159,7 +159,7 @@ const handleCompletedDate = (time, date, show, INTERNAL_V2_NO_MUTATION) => {
|
|
|
159
159
|
showDay
|
|
160
160
|
} = show;
|
|
161
161
|
if (time && !year && !month && !day) return '';
|
|
162
|
-
newDate.value =
|
|
162
|
+
newDate.value = "".concat(year, "-").concat(month, "-").concat(day);
|
|
163
163
|
if (showMonth && month) newDate.month(parseInt(month - 1, 10));
|
|
164
164
|
if (showDay && day) newDate.date(parseInt(day, 10));
|
|
165
165
|
if (showYear && year) newDate.year(parseInt(year, 10));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
4
|
import React, { useState, useEffect, createElement } from 'react';
|
|
4
5
|
import moment from 'moment';
|
|
5
6
|
import { getFormattedMonth, getShouldShortcircuitMonth, focusNextInput, getFormattedDay, getShouldShortcircuitDay, getFormattedYear, commonInputProps, triggerOnBlur } from './utils.js';
|
|
@@ -38,7 +39,7 @@ const DateInputs = ({
|
|
|
38
39
|
}, [dayRef.current]);
|
|
39
40
|
const triggerOnDateChange = React.useCallback(() => {
|
|
40
41
|
if (month && day && year && haveInputsOnChangeTriggered) {
|
|
41
|
-
const momentValue = moment(
|
|
42
|
+
const momentValue = moment("".concat(month).concat(day).concat(year), 'MMDDYYYY', true);
|
|
42
43
|
|
|
43
44
|
if (momentValue.isValid()) {
|
|
44
45
|
onDateChange(momentValue);
|
|
@@ -81,15 +82,15 @@ const DateInputs = ({
|
|
|
81
82
|
// When component mounts haveInputsOnChangeTriggered is set to false
|
|
82
83
|
// so this is not triggered on mount but is triggered with all other changes
|
|
83
84
|
if (haveInputsOnChangeTriggered) {
|
|
84
|
-
const momentValue = moment(
|
|
85
|
-
onChange(
|
|
85
|
+
const momentValue = moment("".concat(month).concat(day).concat(year), FORMAT, true);
|
|
86
|
+
onChange("".concat(month).concat(day).concat(year), momentValue.isValid() ? momentValue : null);
|
|
86
87
|
}
|
|
87
88
|
}, [day, month, year]);
|
|
88
89
|
useEffect(() => {
|
|
89
90
|
triggerOnDateChange();
|
|
90
91
|
}, [onChangeDateTrigger]);
|
|
91
92
|
useEffect(() => {
|
|
92
|
-
if (time && time !==
|
|
93
|
+
if (time && time !== "".concat(month).concat(day).concat(year) && moment(time, 'MMDDYYYY').isValid()) {
|
|
93
94
|
const values = String(time || '');
|
|
94
95
|
if (values.slice(0, 2)) setMonth(values.slice(0, 2));
|
|
95
96
|
if (values.slice(2, 4)) setDay(values.slice(2, 4));
|
|
@@ -9,19 +9,13 @@ const DateInputWrapper = /*#__PURE__*/styled(Grid).withConfig({
|
|
|
9
9
|
})(["align-items:center;align-content:center;", " width:102px;&:focus{outline-style:none;box-shadow:none;border-color:transparent;}"], ({
|
|
10
10
|
disabled,
|
|
11
11
|
theme
|
|
12
|
-
}) => disabled ?
|
|
13
|
-
background: ${theme.colors.neutral[100]};
|
|
14
|
-
color: ${theme.colors.neutral[500]};
|
|
15
|
-
` : '');
|
|
12
|
+
}) => disabled ? "\n background: ".concat(theme.colors.neutral[100], ";\n color: ").concat(theme.colors.neutral[500], ";\n ") : '');
|
|
16
13
|
const DateInputInput = /*#__PURE__*/styled.input.withConfig({
|
|
17
14
|
componentId: "sc-ads423-2"
|
|
18
15
|
})(["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, ({
|
|
19
16
|
disabled,
|
|
20
17
|
theme
|
|
21
|
-
}) => disabled ?
|
|
22
|
-
background: ${theme.colors.neutral[100]};
|
|
23
|
-
color: ${theme.colors.neutral[500]};
|
|
24
|
-
` : '', ({
|
|
18
|
+
}) => disabled ? "\n background: ".concat(theme.colors.neutral[100], ";\n color: ").concat(theme.colors.neutral[500], ";\n ") : '', ({
|
|
25
19
|
theme
|
|
26
20
|
}) => theme.colors.brand['300']);
|
|
27
21
|
const DateInputDivider = /*#__PURE__*/styled.div.withConfig({
|