@elliemae/ds-form 2.0.0-rc.1 → 2.0.0-rc.13
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/ComboBox/v1/DSComboBox.js +18 -22
- package/cjs/ComboBox/v1/withSelectStringValueConverter.js +3 -4
- package/cjs/ComboBox/v3/ComboBox.js +1 -2
- package/cjs/ComboBox/v3/ComboBoxCTX.js +22 -15
- package/cjs/ComboBox/v3/ComboboxDataTestids.js +3 -1
- package/cjs/ComboBox/v3/config/useComboBox.js +65 -21
- package/cjs/ComboBox/v3/parts/container/Container.js +28 -18
- package/cjs/ComboBox/v3/parts/controls/Controls.js +3 -1
- package/cjs/ComboBox/v3/parts/controls/styled.js +30 -8
- package/cjs/ComboBox/v3/parts/controls-input/ControlsInput.js +5 -3
- package/cjs/ComboBox/v3/parts/controls-input/styled.js +1 -1
- package/cjs/ComboBox/v3/parts/controls-input/useControlsInput.js +19 -21
- package/cjs/ComboBox/v3/parts/dropdown-indicator/DropdownIndicator.js +0 -3
- package/cjs/ComboBox/v3/parts/dropdown-indicator/styled.js +1 -1
- package/cjs/ComboBox/v3/parts/header-list/HeaderList.js +61 -37
- package/cjs/ComboBox/v3/parts/header-list/styled.js +31 -8
- package/cjs/ComboBox/v3/parts/header-list/useHeaderListHandlers.js +73 -0
- package/cjs/ComboBox/v3/parts/menu-list/MenuList.js +32 -18
- package/cjs/ComboBox/v3/parts/menu-list/styled.js +17 -2
- package/cjs/ComboBox/v3/parts/menu-list/useItemRenderer.js +105 -0
- package/cjs/ComboBox/v3/parts/menu-list/useMenuList.js +42 -85
- package/cjs/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +26 -35
- package/cjs/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.js +10 -6
- package/cjs/ComboBox/v3/propTypes.js +15 -11
- package/cjs/ComboBox/v3/utils/hooks/useKeyboardNavigation.js +28 -30
- package/cjs/ComboBox/v3/utils/hooks/useOnElementResize.js +4 -4
- package/cjs/FloatingLabelInput/FloatingLabelInputImpl.js +4 -7
- package/cjs/FormItem/ValidationFieldWrapper.js +2 -3
- package/cjs/Input/InputAddonWrapper.js +2 -3
- package/cjs/Input/InputImpl.js +16 -18
- package/cjs/InputGroup/AddonWrapper.js +4 -6
- package/cjs/InputMask/DSInputMaskDeprecated.js +10 -12
- package/cjs/MenuItem/components/MenuItem/index.js +1 -1
- package/cjs/MenuItem/components/MultiMenuItem/MultiMenuItem.js +1 -0
- package/cjs/MenuItem/components/Section/index.js +1 -1
- package/cjs/MenuItem/components/Section/styled.js +1 -1
- package/cjs/MenuItem/components/Separator/styled.js +2 -2
- package/cjs/MenuItem/components/SingleMenuItem/SingleMenuItem.js +6 -6
- package/cjs/MenuItem/components/SubmenuItem/index.js +1 -1
- package/cjs/MenuItem/components/styled.js +12 -4
- package/cjs/SearchBox/withSearchable.js +3 -5
- package/cjs/Toggle/DSToggleImpl.js +28 -28
- package/esm/ComboBox/v1/DSComboBox.js +17 -21
- package/esm/ComboBox/v1/withSelectStringValueConverter.js +3 -4
- package/esm/ComboBox/v3/ComboBox.js +1 -2
- package/esm/ComboBox/v3/ComboBoxCTX.js +17 -10
- package/esm/ComboBox/v3/ComboboxDataTestids.js +3 -1
- package/esm/ComboBox/v3/config/useComboBox.js +62 -22
- package/esm/ComboBox/v3/parts/container/Container.js +29 -19
- package/esm/ComboBox/v3/parts/controls/Controls.js +3 -1
- package/esm/ComboBox/v3/parts/controls/styled.js +30 -9
- package/esm/ComboBox/v3/parts/controls-input/ControlsInput.js +5 -3
- package/esm/ComboBox/v3/parts/controls-input/styled.js +1 -1
- package/esm/ComboBox/v3/parts/controls-input/useControlsInput.js +20 -22
- package/esm/ComboBox/v3/parts/dropdown-indicator/DropdownIndicator.js +0 -3
- package/esm/ComboBox/v3/parts/dropdown-indicator/styled.js +1 -1
- package/esm/ComboBox/v3/parts/header-list/HeaderList.js +63 -39
- package/esm/ComboBox/v3/parts/header-list/styled.js +28 -8
- package/esm/ComboBox/v3/parts/header-list/useHeaderListHandlers.js +69 -0
- package/esm/ComboBox/v3/parts/menu-list/MenuList.js +35 -21
- package/esm/ComboBox/v3/parts/menu-list/styled.js +17 -3
- package/esm/ComboBox/v3/parts/menu-list/useItemRenderer.js +97 -0
- package/esm/ComboBox/v3/parts/menu-list/useMenuList.js +43 -82
- package/esm/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +26 -35
- package/esm/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.js +10 -6
- package/esm/ComboBox/v3/propTypes.js +15 -11
- package/esm/ComboBox/v3/utils/hooks/useKeyboardNavigation.js +28 -30
- package/esm/ComboBox/v3/utils/hooks/useOnElementResize.js +4 -4
- package/esm/FloatingLabelInput/FloatingLabelInputImpl.js +4 -7
- package/esm/FormItem/ValidationFieldWrapper.js +2 -3
- package/esm/Input/InputAddonWrapper.js +2 -3
- package/esm/Input/InputImpl.js +15 -17
- package/esm/InputGroup/AddonWrapper.js +5 -7
- package/esm/InputMask/DSInputMaskDeprecated.js +10 -12
- package/esm/MenuItem/components/MenuItem/index.js +1 -1
- package/esm/MenuItem/components/MultiMenuItem/MultiMenuItem.js +1 -0
- package/esm/MenuItem/components/Section/index.js +1 -1
- package/esm/MenuItem/components/Section/styled.js +1 -1
- package/esm/MenuItem/components/Separator/styled.js +2 -2
- package/esm/MenuItem/components/SingleMenuItem/SingleMenuItem.js +6 -6
- package/esm/MenuItem/components/SubmenuItem/index.js +1 -1
- package/esm/MenuItem/components/styled.js +13 -6
- package/esm/SearchBox/withSearchable.js +2 -4
- package/esm/Toggle/DSToggleImpl.js +28 -28
- package/package.json +40 -27
- package/types/Checkbox/DSCheckbox.d.ts +78 -13
- package/types/Checkbox/elements/CheckMark.d.ts +1 -1
- package/types/Checkbox/props.d.ts +58 -12
- package/types/CheckboxGroup/DSCheckboxGroup.d.ts +51 -7
- package/types/CheckboxGroup/props.d.ts +37 -6
- package/types/ComboBox/v2/Combobox.d.ts +56 -1
- package/types/ComboBox/v3/ComboBox.d.ts +54 -12
- package/types/ComboBox/v3/ComboboxDataTestids.d.ts +2 -0
- package/types/ComboBox/v3/parts/a11y-messages/styled.d.ts +1 -1
- package/types/ComboBox/v3/parts/container/styled.d.ts +3 -3
- package/types/ComboBox/v3/parts/controls/styled.d.ts +5 -5
- package/types/ComboBox/v3/parts/controls-input/styled.d.ts +4 -4
- package/types/ComboBox/v3/parts/controls-input/useControlsInput.d.ts +3 -3
- package/types/ComboBox/v3/parts/dropdown-indicator/styled.d.ts +1 -60
- package/types/ComboBox/v3/parts/empty-state/styled.d.ts +2 -2
- package/types/ComboBox/v3/parts/header-list/styled.d.ts +7 -93
- package/types/ComboBox/v3/parts/header-list/useHeaderListHandlers.d.ts +12 -0
- package/types/ComboBox/v3/parts/menu-list/styled.d.ts +9 -3
- package/types/ComboBox/v3/parts/menu-list/useItemRenderer.d.ts +2 -0
- package/types/ComboBox/v3/parts/menu-list/useMenuList.d.ts +1 -1
- package/types/ComboBox/v3/parts/multi-selected-values-container/styled.d.ts +3 -3
- package/types/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.d.ts +1 -2
- package/types/ComboBox/v3/parts/single-selected-value-container/styled.d.ts +1 -1
- package/types/ComboBox/v3/propTypes.d.ts +49 -11
- package/types/ComboBox/v3/tests/combobox-special-keys.test.d.ts +1 -0
- package/types/ComboBox/v3/tests/utils.d.ts +5 -0
- package/types/ComboBox/v3/utils/hooks/useKeyboardNavigation.d.ts +4 -1
- package/types/ComboBox/v3/utils/listHelper.d.ts +1 -1
- package/types/DateInput/DSDateInput.d.ts +97 -16
- package/types/DateInput/props.d.ts +97 -16
- package/types/DateInputV2/components/DSDateInput.d.ts +72 -5
- package/types/DateInputV2/components/props.d.ts +61 -10
- package/types/DateInputV2/components/styled.d.ts +4 -4
- package/types/FloatingLabelInput/DSFloatingLabelInput.d.ts +118 -20
- package/types/FormItem/DSFormItemLayout.d.ts +390 -60
- package/types/FormItem/Error/DSError.d.ts +21 -3
- package/types/FormItem/Suffix/Suffix.d.ts +3 -3
- package/types/FormItem/defaultProps.d.ts +118 -20
- package/types/FormItem/props.d.ts +229 -39
- package/types/InputGroup/DSInputGroup.d.ts +56 -8
- package/types/InputGroup/props.d.ts +43 -7
- package/types/InputMask/DSInputMask.d.ts +172 -30
- package/types/InputMask/mask_types/DateInputMask.d.ts +34 -33
- package/types/InputMask/mask_types/DateTimeInputMask.d.ts +34 -33
- package/types/InputMask/mask_types/DictionaryInputMask.d.ts +37 -36
- package/types/InputMask/mask_types/NumberInputMask.d.ts +46 -45
- package/types/InputMask/mask_types/PhoneInputMask.d.ts +34 -33
- package/types/InputMask/mask_types/PhoneInternationalInputMask.d.ts +34 -33
- package/types/InputMask/mask_types/SsnInputMask.d.ts +34 -33
- package/types/InputMask/mask_types/UsZipCodeInputMask.d.ts +34 -33
- package/types/InputMask/mask_types/ZipCodeSearchInputMask.d.ts +34 -33
- package/types/InputMask/props.d.ts +172 -30
- package/types/InputProtected/DSInputProtected.d.ts +56 -7
- package/types/InputProtected/props.d.ts +43 -8
- package/types/LargeInputText/DSLargeInputText.d.ts +163 -27
- package/types/LargeInputText/props.d.ts +163 -27
- package/types/MenuItem/components/MenuItem/index.d.ts +12 -3
- package/types/MenuItem/components/MenuItem/styled.d.ts +1 -1
- package/types/MenuItem/components/MultiMenuItem/MultiMenuItem.d.ts +12 -3
- package/types/MenuItem/components/MultiMenuItem/styled.d.ts +1 -1
- package/types/MenuItem/components/Section/index.d.ts +4 -1
- package/types/MenuItem/components/Section/props.d.ts +4 -1
- package/types/MenuItem/components/Section/styled.d.ts +2 -2
- package/types/MenuItem/components/Separator/styled.d.ts +2 -2
- package/types/MenuItem/components/SingleMenuItem/SingleMenuItem.d.ts +7 -2
- package/types/MenuItem/components/SubmenuItem/index.d.ts +12 -3
- package/types/MenuItem/components/SubmenuItem/styled.d.ts +2 -2
- package/types/MenuItem/components/styled.d.ts +3 -3
- package/types/MenuItem/props.d.ts +7 -2
- package/types/Radio/Circle.d.ts +1 -1
- package/types/Radio/DSRadio.d.ts +79 -13
- package/types/RadioGroup/DSRadioGroup.d.ts +51 -7
- package/types/RadioGroup/props.d.ts +37 -6
- package/types/SearchBox/DSSearchBox.d.ts +146 -21
- package/types/SearchBox/NavSearchBox.d.ts +18 -3
- package/types/SearchBox/SButton.d.ts +13 -2
- package/types/SearchBox/props.d.ts +133 -22
- package/types/SearchBox/styled.d.ts +1 -49
- package/types/TextBox/DSTextBox.d.ts +146 -21
- package/types/TimeInput/DSTimeInput.d.ts +83 -12
- package/types/TimeInput/utils.d.ts +1 -1
- package/types/Toggle/DSToggle.d.ts +84 -12
- package/cjs/ComboBox/v3/utils/hooks/useOnWindowResize.js +0 -31
- package/cjs/MenuItem/components/SingleMenuItem/styled.js +0 -19
- package/esm/ComboBox/v3/utils/hooks/useOnWindowResize.js +0 -27
- package/esm/MenuItem/components/SingleMenuItem/styled.js +0 -10
- package/types/ComboBox/v3/utils/hooks/useOnWindowResize.d.ts +0 -5
- package/types/MenuItem/components/SingleMenuItem/styled.d.ts +0 -2
package/esm/Input/InputImpl.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
1
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
2
3
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
4
4
|
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
5
5
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
6
6
|
import 'core-js/modules/esnext.iterator.filter.js';
|
|
@@ -54,12 +54,10 @@ const noop = () => null;
|
|
|
54
54
|
class InputImpl extends Component {
|
|
55
55
|
constructor(props) {
|
|
56
56
|
super(props);
|
|
57
|
+
this.ref = void 0;
|
|
58
|
+
this.refTooltip = void 0;
|
|
57
59
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
_defineProperty(this, "refTooltip", void 0);
|
|
61
|
-
|
|
62
|
-
_defineProperty(this, "handleOnChange", e => {
|
|
60
|
+
this.handleOnChange = e => {
|
|
63
61
|
const {
|
|
64
62
|
onChange,
|
|
65
63
|
max
|
|
@@ -75,9 +73,9 @@ class InputImpl extends Component {
|
|
|
75
73
|
isEllipsisOn: this.ref.current.offsetWidth < this.ref.current.scrollWidth
|
|
76
74
|
});
|
|
77
75
|
}
|
|
78
|
-
}
|
|
76
|
+
};
|
|
79
77
|
|
|
80
|
-
|
|
78
|
+
this.handleBlur = e => {
|
|
81
79
|
const {
|
|
82
80
|
onBlur,
|
|
83
81
|
onChange,
|
|
@@ -99,9 +97,9 @@ class InputImpl extends Component {
|
|
|
99
97
|
this.setState({
|
|
100
98
|
active: false
|
|
101
99
|
});
|
|
102
|
-
}
|
|
100
|
+
};
|
|
103
101
|
|
|
104
|
-
|
|
102
|
+
this.handleFocus = e => {
|
|
105
103
|
const {
|
|
106
104
|
onFocus
|
|
107
105
|
} = this.props;
|
|
@@ -109,30 +107,30 @@ class InputImpl extends Component {
|
|
|
109
107
|
this.setState({
|
|
110
108
|
active: true
|
|
111
109
|
});
|
|
112
|
-
}
|
|
110
|
+
};
|
|
113
111
|
|
|
114
|
-
|
|
112
|
+
this.handleMouseEnter = () => {
|
|
115
113
|
if (!this.state.showTooltip) {
|
|
116
114
|
this.setState({
|
|
117
115
|
showTooltip: true
|
|
118
116
|
});
|
|
119
117
|
}
|
|
120
|
-
}
|
|
118
|
+
};
|
|
121
119
|
|
|
122
|
-
|
|
120
|
+
this.handleMouseLeave = () => {
|
|
123
121
|
if (this.state.showTooltip) {
|
|
124
122
|
this.setState({
|
|
125
123
|
showTooltip: false
|
|
126
124
|
});
|
|
127
125
|
}
|
|
128
|
-
}
|
|
126
|
+
};
|
|
129
127
|
|
|
130
|
-
|
|
128
|
+
this.setWidth = () => {
|
|
131
129
|
const client = this.refTooltip.current.getBoundingClientRect();
|
|
132
130
|
this.setState({
|
|
133
131
|
width: client.width
|
|
134
132
|
});
|
|
135
|
-
}
|
|
133
|
+
};
|
|
136
134
|
|
|
137
135
|
this.state = {
|
|
138
136
|
width: -1,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
4
1
|
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
5
2
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
6
3
|
import 'core-js/modules/esnext.iterator.filter.js';
|
|
7
4
|
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
8
5
|
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
8
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
9
9
|
import { Component } from 'react';
|
|
10
10
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
11
11
|
import { jsxs } from 'react/jsx-runtime';
|
|
@@ -19,8 +19,7 @@ const InputAddon = aggregatedClasses('span')(blockName, 'addon');
|
|
|
19
19
|
class AddonWrapper extends Component {
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments);
|
|
22
|
-
|
|
23
|
-
_defineProperty(this, "state", {});
|
|
22
|
+
this.state = {};
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
render() {
|
|
@@ -40,7 +39,6 @@ class AddonWrapper extends Component {
|
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
}
|
|
43
|
-
|
|
44
|
-
_defineProperty(AddonWrapper, "defaultProps", {});
|
|
42
|
+
AddonWrapper.defaultProps = {};
|
|
45
43
|
|
|
46
44
|
export { AddonWrapper as default };
|
|
@@ -88,12 +88,10 @@ class DSInputMaskDeprecated extends Component {
|
|
|
88
88
|
|
|
89
89
|
super(props);
|
|
90
90
|
_this = this;
|
|
91
|
+
this.lastkey = null;
|
|
92
|
+
this.lastkeycode = null;
|
|
91
93
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
_defineProperty(this, "lastkeycode", null);
|
|
95
|
-
|
|
96
|
-
_defineProperty(this, "conformValue", function (rawValueOrEvent, currentCaretPosition) {
|
|
94
|
+
this.conformValue = function (rawValueOrEvent, currentCaretPosition) {
|
|
97
95
|
let {
|
|
98
96
|
skipCaretPositioning = false,
|
|
99
97
|
skipOnChangeCallback = false
|
|
@@ -205,9 +203,9 @@ class DSInputMaskDeprecated extends Component {
|
|
|
205
203
|
if (!skipOnChangeCallback) onChange(event);
|
|
206
204
|
if (!skipCaretPositioning) setTimeout(() => setCaretPosition(_this.inputref, caretPos));
|
|
207
205
|
});
|
|
208
|
-
}
|
|
206
|
+
};
|
|
209
207
|
|
|
210
|
-
|
|
208
|
+
this.handleOnChange = e => {
|
|
211
209
|
var _e$target;
|
|
212
210
|
|
|
213
211
|
const rawValue = (e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value) || '';
|
|
@@ -216,9 +214,9 @@ class DSInputMaskDeprecated extends Component {
|
|
|
216
214
|
} = e.target;
|
|
217
215
|
const currentCaretPosition = selectionEnd;
|
|
218
216
|
this.conformValue(rawValue, currentCaretPosition);
|
|
219
|
-
}
|
|
217
|
+
};
|
|
220
218
|
|
|
221
|
-
|
|
219
|
+
this.handleKeyDown = e => {
|
|
222
220
|
e.stopPropagation();
|
|
223
221
|
const {
|
|
224
222
|
onKeyDown
|
|
@@ -226,9 +224,9 @@ class DSInputMaskDeprecated extends Component {
|
|
|
226
224
|
this.lastkey = e.key;
|
|
227
225
|
this.lastkeycode = e.keyCode;
|
|
228
226
|
onKeyDown(e);
|
|
229
|
-
}
|
|
227
|
+
};
|
|
230
228
|
|
|
231
|
-
|
|
229
|
+
this.handleBlur = e => {
|
|
232
230
|
const {
|
|
233
231
|
onBlur
|
|
234
232
|
} = this.props;
|
|
@@ -236,7 +234,7 @@ class DSInputMaskDeprecated extends Component {
|
|
|
236
234
|
focus: false
|
|
237
235
|
});
|
|
238
236
|
onBlur(e);
|
|
239
|
-
}
|
|
237
|
+
};
|
|
240
238
|
|
|
241
239
|
this.inputref = /*#__PURE__*/React.createRef();
|
|
242
240
|
this.state = {
|
|
@@ -10,7 +10,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
10
10
|
|
|
11
11
|
const MenuItem = props => {
|
|
12
12
|
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
13
|
-
useValidateTypescriptPropTypes(propsWithDefault,
|
|
13
|
+
useValidateTypescriptPropTypes(propsWithDefault, itemProps);
|
|
14
14
|
const {
|
|
15
15
|
dsId,
|
|
16
16
|
label,
|
|
@@ -9,7 +9,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
9
9
|
|
|
10
10
|
const Section = props => {
|
|
11
11
|
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
12
|
-
useValidateTypescriptPropTypes(propsWithDefault,
|
|
12
|
+
useValidateTypescriptPropTypes(propsWithDefault, itemProps);
|
|
13
13
|
const {
|
|
14
14
|
label,
|
|
15
15
|
wrapperStyles,
|
|
@@ -6,6 +6,6 @@ const StyledGroupLabel = /*#__PURE__*/styled.span.withConfig({
|
|
|
6
6
|
})(["font-family:12px;color:", ";"], props => props.theme.colors.neutral[500]);
|
|
7
7
|
const StyledSectionWrapper = /*#__PURE__*/styled.li.withConfig({
|
|
8
8
|
componentId: "sc-6xya9j-1"
|
|
9
|
-
})(["", " ", " list-style:none;padding:0px 16px;"], position, layout);
|
|
9
|
+
})(["", " ", " list-style:none;padding:0px 16px;height:24px;display:flex;align-items:center;"], position, layout);
|
|
10
10
|
|
|
11
11
|
export { StyledGroupLabel, StyledSectionWrapper };
|
|
@@ -3,9 +3,9 @@ import { position, layout } from 'styled-system';
|
|
|
3
3
|
|
|
4
4
|
const StyledSeparator = /*#__PURE__*/styled.hr.withConfig({
|
|
5
5
|
componentId: "sc-1xat2d9-0"
|
|
6
|
-
})(["border:
|
|
6
|
+
})(["border:0;border-top:1px solid #697489;margin:4px 0px;padding:0;"]);
|
|
7
7
|
const StyledSeparatorWrapper = /*#__PURE__*/styled.li.withConfig({
|
|
8
8
|
componentId: "sc-1xat2d9-1"
|
|
9
|
-
})(["list-style:none;
|
|
9
|
+
})(["list-style:none;padding:0px 16px;", " ", ""], position, layout);
|
|
10
10
|
|
|
11
11
|
export { StyledSeparator, StyledSeparatorWrapper };
|
|
@@ -5,7 +5,6 @@ import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text'
|
|
|
5
5
|
import { Checkmark } from '@elliemae/ds-icons';
|
|
6
6
|
import Grid from '@elliemae/ds-grid';
|
|
7
7
|
import { itemProps, defaultProps } from '../../props.js';
|
|
8
|
-
import { StyledItemChecked, StyledItemLabel } from './styled.js';
|
|
9
8
|
import { StyledGlobalMenuItemWrapper } from '../styled.js';
|
|
10
9
|
import { jsx } from 'react/jsx-runtime';
|
|
11
10
|
|
|
@@ -42,15 +41,16 @@ const SingleMenuItem = props => {
|
|
|
42
41
|
pr: render ? 0 : 40,
|
|
43
42
|
"data-testid": dataTestid,
|
|
44
43
|
children: render ? render(props) : /*#__PURE__*/_jsx(Grid, {
|
|
45
|
-
cols: ['
|
|
44
|
+
cols: ['16px', 'auto'],
|
|
46
45
|
height: "16px",
|
|
47
|
-
gutter: "xxs"
|
|
48
|
-
|
|
46
|
+
gutter: "xxs",
|
|
47
|
+
alignItems: "center"
|
|
48
|
+
}, void 0, /*#__PURE__*/_jsx("div", {}, void 0, isSelected && /*#__PURE__*/_jsx(Checkmark, {
|
|
49
49
|
size: "s",
|
|
50
50
|
color: ['brand-primary', '600']
|
|
51
|
-
})), /*#__PURE__*/_jsx(
|
|
51
|
+
})), /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
|
|
52
52
|
value: label
|
|
53
|
-
}))
|
|
53
|
+
}))
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
56
|
|
|
@@ -27,7 +27,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
27
27
|
|
|
28
28
|
const SubmenuItem = props => {
|
|
29
29
|
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
30
|
-
useValidateTypescriptPropTypes(propsWithDefault,
|
|
30
|
+
useValidateTypescriptPropTypes(propsWithDefault, itemProps);
|
|
31
31
|
const {
|
|
32
32
|
dsId,
|
|
33
33
|
label,
|
|
@@ -1,25 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { css } from '@elliemae/ds-system';
|
|
4
|
+
import { position, layout } from 'styled-system';
|
|
5
|
+
|
|
6
|
+
var _templateObject, _templateObject2;
|
|
3
7
|
|
|
4
8
|
const borderOutside = function (color) {
|
|
5
9
|
let width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
6
|
-
return css([":after{display:block
|
|
10
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n :after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: ", "px solid ", ";\n pointer-events: none;\n z-index: 7;\n }\n"])), width, color);
|
|
7
11
|
};
|
|
8
12
|
|
|
13
|
+
const disabledOption = () => css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n cursor: not-allowed;\n * {\n cursor: not-allowed;\n }\n"])));
|
|
14
|
+
|
|
9
15
|
const activeBorderCss = props => borderOutside(props.theme.colors.brand[500]);
|
|
10
16
|
|
|
11
17
|
const focusBorderCss = props => borderOutside(props.theme.colors.brand[700], 2);
|
|
12
18
|
|
|
13
19
|
const StyledGlobalMenuItemWrapper = /*#__PURE__*/styled.li.withConfig({
|
|
14
20
|
componentId: "sc-jyoobd-0"
|
|
15
|
-
})(["cursor:pointer;height:32px;padding-left:16px;padding-right:
|
|
21
|
+
})(["cursor:pointer;height:32px;padding-left:16px;padding-right:16px;display:grid;align-items:center;list-style:none;position:relative;", " ", " ", ";background-color:", ";&:hover{background-color:", ";}"], position, layout, props => {
|
|
22
|
+
if (props.disabled) return disabledOption();
|
|
16
23
|
if (props.isFocus) return focusBorderCss(props);
|
|
17
24
|
if (props.isActive) return activeBorderCss(props);
|
|
18
25
|
return '';
|
|
19
|
-
}, props => props.isActive ? props.theme.colors.brand[200] : 'white', props => props.theme.colors.brand[200]);
|
|
26
|
+
}, props => props.isActive ? props.theme.colors.brand[200] : 'white', props => !props.disabled && props.theme.colors.brand[200]);
|
|
20
27
|
const StyledMenuItemWrapper = /*#__PURE__*/styled(StyledGlobalMenuItemWrapper).withConfig({
|
|
21
28
|
componentId: "sc-jyoobd-1"
|
|
22
|
-
})(["background-color:", " !important;", ";"], props => props.isSelected ? props.theme.colors.brand[200] : 'white', props => props.isSelected && !props.isFocus ? activeBorderCss(props) : '');
|
|
29
|
+
})(["background-color:", " !important;cursor:", ";", ";"], props => props.isSelected ? props.theme.colors.brand[200] : 'white', props => props.disabled && 'not-allowed', props => props.isSelected && !props.isFocus ? activeBorderCss(props) : '');
|
|
23
30
|
const StyledSubmenuItemWrapper = /*#__PURE__*/styled(StyledGlobalMenuItemWrapper).withConfig({
|
|
24
31
|
componentId: "sc-jyoobd-2"
|
|
25
32
|
})(["", ";padding-right:0;"], props => props.isSelected || props.isActive ? activeBorderCss(props) : '');
|
|
@@ -3,8 +3,8 @@ import 'core-js/modules/esnext.iterator.constructor.js';
|
|
|
3
3
|
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
4
|
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
5
|
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
7
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
8
8
|
import React, { Component } from 'react';
|
|
9
9
|
import { debounce } from '@elliemae/ds-utilities';
|
|
10
10
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -19,9 +19,7 @@ const withSearchable = WrappedComponent => {
|
|
|
19
19
|
class Searchable extends Component {
|
|
20
20
|
constructor(props) {
|
|
21
21
|
super(props);
|
|
22
|
-
|
|
23
|
-
_defineProperty(this, "debouncedSearch", debounce(this.handleSearch, 200));
|
|
24
|
-
|
|
22
|
+
this.debouncedSearch = debounce(this.handleSearch, 200);
|
|
25
23
|
this.state = {
|
|
26
24
|
value: props.value
|
|
27
25
|
};
|
|
@@ -17,7 +17,7 @@ class DSToggleImpl extends Component {
|
|
|
17
17
|
constructor(props) {
|
|
18
18
|
super(props);
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
this.onDragStart = clientX => {
|
|
21
21
|
const {
|
|
22
22
|
startPoint,
|
|
23
23
|
checked,
|
|
@@ -37,9 +37,9 @@ class DSToggleImpl extends Component {
|
|
|
37
37
|
drag
|
|
38
38
|
}); // else this.setDragOnChange(checkedProp != null ? checkedProp : checked) // set initial position
|
|
39
39
|
else this.setDragOnChange(checked); // set initial position
|
|
40
|
-
}
|
|
40
|
+
};
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
this.onDragStop = e => {
|
|
43
43
|
const {
|
|
44
44
|
checked
|
|
45
45
|
} = this.state; // const { checked: checkedProp, } = this.props
|
|
@@ -49,25 +49,25 @@ class DSToggleImpl extends Component {
|
|
|
49
49
|
this.setState(cleanDrag); // } else this.setDragOnChange(checkedProp != null ? checkedProp : checked) // set initial position
|
|
50
50
|
} else this.setDragOnChange(checked); // set initial position
|
|
51
51
|
|
|
52
|
-
}
|
|
52
|
+
};
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
this.onBlur = e => {
|
|
55
55
|
const {
|
|
56
56
|
onBlur,
|
|
57
57
|
id
|
|
58
58
|
} = this.props;
|
|
59
59
|
if (onBlur) onBlur(e, id);
|
|
60
|
-
}
|
|
60
|
+
};
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
this.onFocus = e => {
|
|
63
63
|
const {
|
|
64
64
|
onFocus,
|
|
65
65
|
id
|
|
66
66
|
} = this.props;
|
|
67
67
|
if (onFocus) onFocus(e, id);
|
|
68
|
-
}
|
|
68
|
+
};
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
this.onChange = e => {
|
|
71
71
|
const {
|
|
72
72
|
checked
|
|
73
73
|
} = this.state;
|
|
@@ -90,26 +90,26 @@ class DSToggleImpl extends Component {
|
|
|
90
90
|
onChange(e, id); // this.setDragOnChange(checkedProp != null ? checkedProp : newCheck) // set new position
|
|
91
91
|
|
|
92
92
|
this.setDragOnChange(newCheck); // set new position
|
|
93
|
-
}
|
|
93
|
+
};
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
this.onMouseEnter = () => {
|
|
96
96
|
this.setState({
|
|
97
97
|
inside: true
|
|
98
98
|
});
|
|
99
|
-
}
|
|
99
|
+
};
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
this.onMouseLeave = () => {
|
|
102
102
|
this.setState({
|
|
103
103
|
inside: false
|
|
104
104
|
});
|
|
105
|
-
}
|
|
105
|
+
};
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
this.onMouseMove = event => {
|
|
108
108
|
event.preventDefault();
|
|
109
109
|
this.onDragStart(event.clientX);
|
|
110
|
-
}
|
|
110
|
+
};
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
this.onMouseDown = event => {
|
|
113
113
|
this.onDragStart(event.clientX);
|
|
114
114
|
this.setState({
|
|
115
115
|
startPoint: event.clientX,
|
|
@@ -117,36 +117,36 @@ class DSToggleImpl extends Component {
|
|
|
117
117
|
});
|
|
118
118
|
window.addEventListener('mousemove', this.onMouseMove);
|
|
119
119
|
window.addEventListener('mouseup', this.onMouseUp);
|
|
120
|
-
}
|
|
120
|
+
};
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
this.onMouseUp = event => {
|
|
123
123
|
this.onDragStop(event);
|
|
124
124
|
window.removeEventListener('mousemove', this.onMouseMove);
|
|
125
125
|
window.removeEventListener('mouseup', this.onMouseUp);
|
|
126
|
-
}
|
|
126
|
+
};
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
this.onTouchCancel = () => {
|
|
129
129
|
this.setState({
|
|
130
130
|
inside: false
|
|
131
131
|
});
|
|
132
|
-
}
|
|
132
|
+
};
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
this.onTouchEnd = event => {
|
|
135
135
|
event.preventDefault();
|
|
136
136
|
this.onDragStop(event);
|
|
137
|
-
}
|
|
137
|
+
};
|
|
138
138
|
|
|
139
|
-
|
|
139
|
+
this.onTouchMove = event => {
|
|
140
140
|
this.onDragStart(event.touches[0].clientX);
|
|
141
|
-
}
|
|
141
|
+
};
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
this.onTouchStart = event => {
|
|
144
144
|
this.onDragStart(event.touches[0].clientX);
|
|
145
145
|
this.setState({
|
|
146
146
|
startPoint: event.touches[0].clientX,
|
|
147
147
|
isDragging: true
|
|
148
148
|
});
|
|
149
|
-
}
|
|
149
|
+
};
|
|
150
150
|
|
|
151
151
|
this.state = {
|
|
152
152
|
checked: props.checked || false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-form",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Form",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -159,10 +159,6 @@
|
|
|
159
159
|
"import": "./esm/MenuItem/components/styled.js",
|
|
160
160
|
"require": "./cjs/MenuItem/components/styled.js"
|
|
161
161
|
},
|
|
162
|
-
"./MenuItem/components/SingleMenuItem/styled": {
|
|
163
|
-
"import": "./esm/MenuItem/components/SingleMenuItem/styled.js",
|
|
164
|
-
"require": "./cjs/MenuItem/components/SingleMenuItem/styled.js"
|
|
165
|
-
},
|
|
166
162
|
"./MenuItem/components/SingleMenuItem/SingleMenuItem": {
|
|
167
163
|
"import": "./esm/MenuItem/components/SingleMenuItem/SingleMenuItem.js",
|
|
168
164
|
"require": "./cjs/MenuItem/components/SingleMenuItem/SingleMenuItem.js"
|
|
@@ -519,10 +515,6 @@
|
|
|
519
515
|
"import": "./esm/ComboBox/v3/utils/listHelper.js",
|
|
520
516
|
"require": "./cjs/ComboBox/v3/utils/listHelper.js"
|
|
521
517
|
},
|
|
522
|
-
"./ComboBox/v3/utils/hooks/useOnWindowResize": {
|
|
523
|
-
"import": "./esm/ComboBox/v3/utils/hooks/useOnWindowResize.js",
|
|
524
|
-
"require": "./cjs/ComboBox/v3/utils/hooks/useOnWindowResize.js"
|
|
525
|
-
},
|
|
526
518
|
"./ComboBox/v3/utils/hooks/useOnElementResize": {
|
|
527
519
|
"import": "./esm/ComboBox/v3/utils/hooks/useOnElementResize.js",
|
|
528
520
|
"require": "./cjs/ComboBox/v3/utils/hooks/useOnElementResize.js"
|
|
@@ -571,6 +563,10 @@
|
|
|
571
563
|
"import": "./esm/ComboBox/v3/parts/menu-list/useMenuList.js",
|
|
572
564
|
"require": "./cjs/ComboBox/v3/parts/menu-list/useMenuList.js"
|
|
573
565
|
},
|
|
566
|
+
"./ComboBox/v3/parts/menu-list/useItemRenderer": {
|
|
567
|
+
"import": "./esm/ComboBox/v3/parts/menu-list/useItemRenderer.js",
|
|
568
|
+
"require": "./cjs/ComboBox/v3/parts/menu-list/useItemRenderer.js"
|
|
569
|
+
},
|
|
574
570
|
"./ComboBox/v3/parts/menu-list/styled": {
|
|
575
571
|
"import": "./esm/ComboBox/v3/parts/menu-list/styled.js",
|
|
576
572
|
"require": "./cjs/ComboBox/v3/parts/menu-list/styled.js"
|
|
@@ -583,6 +579,10 @@
|
|
|
583
579
|
"import": "./esm/ComboBox/v3/parts/menu-list/index.js",
|
|
584
580
|
"require": "./cjs/ComboBox/v3/parts/menu-list/index.js"
|
|
585
581
|
},
|
|
582
|
+
"./ComboBox/v3/parts/header-list/useHeaderListHandlers": {
|
|
583
|
+
"import": "./esm/ComboBox/v3/parts/header-list/useHeaderListHandlers.js",
|
|
584
|
+
"require": "./cjs/ComboBox/v3/parts/header-list/useHeaderListHandlers.js"
|
|
585
|
+
},
|
|
586
586
|
"./ComboBox/v3/parts/header-list/styled": {
|
|
587
587
|
"import": "./esm/ComboBox/v3/parts/header-list/styled.js",
|
|
588
588
|
"require": "./cjs/ComboBox/v3/parts/header-list/styled.js"
|
|
@@ -932,22 +932,28 @@
|
|
|
932
932
|
"build": "node ../../scripts/build/build.js"
|
|
933
933
|
},
|
|
934
934
|
"dependencies": {
|
|
935
|
-
"@elliemae/ds-button": "2.0.0-rc.
|
|
936
|
-
"@elliemae/ds-circular-progress-indicator": "2.0.0-rc.
|
|
937
|
-
"@elliemae/ds-classnames": "2.0.0-rc.
|
|
938
|
-
"@elliemae/ds-
|
|
939
|
-
"@elliemae/ds-
|
|
940
|
-
"@elliemae/ds-
|
|
941
|
-
"@elliemae/ds-
|
|
942
|
-
"@elliemae/ds-
|
|
943
|
-
"@elliemae/ds-
|
|
944
|
-
"@elliemae/ds-
|
|
945
|
-
"@elliemae/ds-
|
|
946
|
-
"@elliemae/ds-
|
|
947
|
-
"@elliemae/ds-
|
|
948
|
-
"@elliemae/ds-
|
|
949
|
-
"@elliemae/ds-
|
|
950
|
-
"@elliemae/ds-
|
|
935
|
+
"@elliemae/ds-button": "2.0.0-rc.13",
|
|
936
|
+
"@elliemae/ds-circular-progress-indicator": "2.0.0-rc.13",
|
|
937
|
+
"@elliemae/ds-classnames": "2.0.0-rc.13",
|
|
938
|
+
"@elliemae/ds-controlled-form": "2.0.0-rc.13",
|
|
939
|
+
"@elliemae/ds-dropdownmenu": "2.0.0-rc.13",
|
|
940
|
+
"@elliemae/ds-form": "2.0.0-rc.13",
|
|
941
|
+
"@elliemae/ds-grid": "2.0.0-rc.13",
|
|
942
|
+
"@elliemae/ds-icon": "2.0.0-rc.13",
|
|
943
|
+
"@elliemae/ds-icons": "2.0.0-rc.13",
|
|
944
|
+
"@elliemae/ds-menu": "2.0.0-rc.13",
|
|
945
|
+
"@elliemae/ds-overlay": "2.0.0-rc.13",
|
|
946
|
+
"@elliemae/ds-pills": "2.0.0-rc.13",
|
|
947
|
+
"@elliemae/ds-popper": "2.0.0-rc.13",
|
|
948
|
+
"@elliemae/ds-popperjs": "2.0.0-rc.13",
|
|
949
|
+
"@elliemae/ds-props-helpers": "2.0.0-rc.13",
|
|
950
|
+
"@elliemae/ds-separator": "2.0.0-rc.13",
|
|
951
|
+
"@elliemae/ds-shared": "2.0.0-rc.13",
|
|
952
|
+
"@elliemae/ds-system": "2.0.0-rc.13",
|
|
953
|
+
"@elliemae/ds-text-wrapper": "2.0.0-rc.13",
|
|
954
|
+
"@elliemae/ds-tooltip": "2.0.0-rc.13",
|
|
955
|
+
"@elliemae/ds-truncated-tooltip-text": "2.0.0-rc.13",
|
|
956
|
+
"@elliemae/ds-utilities": "2.0.0-rc.13",
|
|
951
957
|
"memoize-one": "~5.1.1",
|
|
952
958
|
"moment": "~2.29.1",
|
|
953
959
|
"prop-types": "~15.7.2",
|
|
@@ -955,19 +961,26 @@
|
|
|
955
961
|
"react-measure": "~2.5.2",
|
|
956
962
|
"react-popper": "~1.3.11",
|
|
957
963
|
"react-select": "~4.3.0",
|
|
964
|
+
"react-virtual": "~2.8.2",
|
|
958
965
|
"react-window": "~1.8.6",
|
|
959
966
|
"resize-observer": "~1.0.2",
|
|
960
967
|
"text-mask-core": "5.1.2",
|
|
961
968
|
"uid": "~2.0.0"
|
|
962
969
|
},
|
|
963
970
|
"devDependencies": {
|
|
964
|
-
"
|
|
971
|
+
"@testing-library/dom": "~8.11.1",
|
|
972
|
+
"@testing-library/jest-dom": "~5.15.0",
|
|
973
|
+
"@testing-library/react": "~12.1.2",
|
|
974
|
+
"@testing-library/user-event": "~13.5.0",
|
|
975
|
+
"styled-components": "~5.3.3",
|
|
976
|
+
"styled-system": "~5.1.5"
|
|
965
977
|
},
|
|
966
978
|
"peerDependencies": {
|
|
967
979
|
"lodash": "^4.17.21",
|
|
968
980
|
"react": "~17.0.2",
|
|
969
981
|
"react-dom": "^17.0.2",
|
|
970
|
-
"styled-components": "^5.3.3"
|
|
982
|
+
"styled-components": "^5.3.3",
|
|
983
|
+
"styled-system": "^5.1.5"
|
|
971
984
|
},
|
|
972
985
|
"publishConfig": {
|
|
973
986
|
"access": "public",
|