@elliemae/ds-form 2.4.2-rc.9 → 2.4.2
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 +4 -5
- package/cjs/ComboBox/v1/components/MenuList.js +3 -4
- package/cjs/ComboBox/v1/components/MultiSelectHeader.js +1 -1
- package/cjs/ComboBox/v1/components/getoptions.js +0 -2
- package/cjs/ComboBox/v1/withSelectStringValueConverter.js +0 -1
- package/cjs/ComboBox/v2/Combobox.js +5 -10
- package/cjs/ComboBox/v2/components/Content.js +1 -3
- package/cjs/ComboBox/v2/components/CustomOption.js +4 -8
- package/cjs/ComboBox/v2/components/CustomOptionMulti.js +4 -10
- package/cjs/ComboBox/v2/components/DropdownIndicator.js +4 -5
- package/cjs/ComboBox/v2/components/MenuList.js +4 -5
- package/cjs/ComboBox/v2/components/MultiSelectHeader.js +1 -1
- package/cjs/ComboBox/v2/components/ValueContainer.js +2 -3
- package/cjs/ComboBox/v2/components/getoptions.js +0 -2
- package/cjs/ComboBox/v2/components/useMenuListHeight.js +3 -8
- package/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js +1 -1
- package/cjs/DateInput/DSDateInput.js +4 -5
- package/cjs/DateInput/components/DateInputs.js +0 -1
- package/cjs/DateInput/components/utils.js +1 -2
- package/cjs/DateInputV2/components/DateInputs.js +4 -5
- package/cjs/DateInputV2/components/styled.js +8 -2
- package/cjs/DateInputV2/components/utils.js +3 -8
- package/cjs/FormItem/DSFormItemLayout.js +2 -2
- package/cjs/FormItem/Label/DSLabel.js +1 -1
- package/cjs/FormItem/Suffix/Suffix.js +6 -2
- package/cjs/Input/DSInput.js +1 -1
- package/cjs/Input/InputAddonWrapper.js +0 -1
- package/cjs/Input/InputImpl.js +3 -2
- package/cjs/InputGroup/AddonWrapper.js +3 -4
- package/cjs/InputMask/DSInputMask.js +2 -3
- package/cjs/InputMask/DSInputMaskDeprecated.js +4 -10
- package/cjs/InputMask/addons/AutoCorrectedDatePipe.js +0 -1
- package/cjs/InputMask/mask_types/DateInputMask.js +0 -1
- package/cjs/InputMask/mask_types/DateTimeInputMask.js +0 -1
- package/cjs/InputMask/mask_types/DictionaryInputMask.js +0 -1
- package/cjs/InputMask/mask_types/NumberInputMask.js +2 -6
- package/cjs/InputMask/mask_types/PhoneInputMask.js +0 -1
- package/cjs/InputMask/mask_types/PhoneInternationalInputMask.js +0 -1
- package/cjs/InputMask/mask_types/SsnInputMask.js +0 -1
- package/cjs/InputMask/mask_types/UsZipCodeInputMask.js +0 -1
- package/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js +0 -1
- package/cjs/InputMask/props.js +2 -1
- package/cjs/InputMask/utils/setCaretPosition.js +9 -9
- package/cjs/InputProtected/DSInputProtected.js +5 -6
- package/cjs/InputProtected/props.js +2 -1
- package/cjs/LargeInputText/DSLargeInputText.js +2 -2
- package/cjs/MenuItem/components/SingleMenuItem/SingleMenuItem.js +0 -1
- package/cjs/MenuItem/components/SubmenuItem/index.js +4 -5
- package/cjs/RadioGroup/DSRadioGroup.js +3 -3
- package/cjs/RequiredMark/RequiredMark.js +2 -2
- package/cjs/SearchBox/DSSearchBox.js +1 -1
- package/cjs/SearchBox/NavSearchBox.js +1 -1
- package/cjs/SearchBox/SearchBoxToggle.js +13 -6
- package/cjs/SearchBox/useSearch.js +0 -1
- package/cjs/TextBox/DSTextBox.js +1 -1
- package/cjs/TimeInput/TimeInputs.js +0 -1
- 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 +4 -5
- package/esm/ComboBox/v1/components/MenuList.js +1 -2
- package/esm/ComboBox/v1/components/MultiSelectHeader.js +1 -1
- package/esm/ComboBox/v1/components/getoptions.js +0 -2
- package/esm/ComboBox/v1/withSelectStringValueConverter.js +0 -1
- package/esm/ComboBox/v2/Combobox.js +5 -10
- package/esm/ComboBox/v2/components/Content.js +1 -3
- package/esm/ComboBox/v2/components/CustomOption.js +4 -8
- package/esm/ComboBox/v2/components/CustomOptionMulti.js +4 -10
- package/esm/ComboBox/v2/components/DropdownIndicator.js +4 -5
- package/esm/ComboBox/v2/components/MenuList.js +2 -3
- package/esm/ComboBox/v2/components/MultiSelectHeader.js +1 -1
- package/esm/ComboBox/v2/components/ValueContainer.js +2 -3
- package/esm/ComboBox/v2/components/getoptions.js +0 -2
- package/esm/ComboBox/v2/components/useMenuListHeight.js +3 -8
- package/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js +1 -1
- package/esm/DateInput/DSDateInput.js +1 -2
- package/esm/DateInput/components/DateInputs.js +0 -1
- package/esm/DateInput/components/utils.js +1 -2
- package/esm/DateInputV2/components/DateInputs.js +4 -5
- package/esm/DateInputV2/components/styled.js +8 -2
- package/esm/DateInputV2/components/utils.js +3 -8
- package/esm/FormItem/DSFormItemLayout.js +2 -2
- package/esm/FormItem/Label/DSLabel.js +1 -1
- package/esm/FormItem/Suffix/Suffix.js +6 -2
- package/esm/Input/DSInput.js +1 -1
- package/esm/Input/InputAddonWrapper.js +2 -3
- package/esm/Input/InputImpl.js +5 -4
- package/esm/InputGroup/AddonWrapper.js +1 -2
- package/esm/InputMask/DSInputMask.js +2 -3
- package/esm/InputMask/DSInputMaskDeprecated.js +4 -10
- package/esm/InputMask/addons/AutoCorrectedDatePipe.js +0 -1
- package/esm/InputMask/mask_types/DateInputMask.js +0 -1
- package/esm/InputMask/mask_types/DateTimeInputMask.js +0 -1
- package/esm/InputMask/mask_types/DictionaryInputMask.js +0 -1
- package/esm/InputMask/mask_types/NumberInputMask.js +2 -6
- package/esm/InputMask/mask_types/PhoneInputMask.js +0 -1
- package/esm/InputMask/mask_types/PhoneInternationalInputMask.js +0 -1
- package/esm/InputMask/mask_types/SsnInputMask.js +0 -1
- package/esm/InputMask/mask_types/UsZipCodeInputMask.js +0 -1
- package/esm/InputMask/mask_types/ZipCodeSearchInputMask.js +0 -1
- package/esm/InputMask/props.js +2 -1
- package/esm/InputMask/utils/setCaretPosition.js +9 -9
- package/esm/InputProtected/DSInputProtected.js +5 -6
- package/esm/InputProtected/props.js +2 -1
- package/esm/LargeInputText/DSLargeInputText.js +2 -2
- package/esm/MenuItem/components/SingleMenuItem/SingleMenuItem.js +0 -1
- package/esm/MenuItem/components/SubmenuItem/index.js +2 -3
- package/esm/RadioGroup/DSRadioGroup.js +3 -3
- package/esm/RequiredMark/RequiredMark.js +2 -2
- package/esm/SearchBox/DSSearchBox.js +1 -1
- package/esm/SearchBox/NavSearchBox.js +1 -1
- package/esm/SearchBox/SearchBoxToggle.js +13 -6
- package/esm/SearchBox/useSearch.js +0 -1
- package/esm/TextBox/DSTextBox.js +1 -1
- package/esm/TimeInput/TimeInputs.js +0 -1
- package/esm/Toggle/DSToggleImpl.js +1 -1
- package/esm/Toggle/DSToggleRender.js +2 -2
- package/package.json +20 -20
|
@@ -62,7 +62,7 @@ function Checkbox(_ref) {
|
|
|
62
62
|
"data-testid": rest['data-testid'] || 'ds-checkbox',
|
|
63
63
|
"aria-checked": checked,
|
|
64
64
|
"aria-disabled": disabled,
|
|
65
|
-
className:
|
|
65
|
+
className: `${className} ${variant || ''} ${disabled ? 'disabled' : ''}`,
|
|
66
66
|
"data-kind": "checkmark",
|
|
67
67
|
onKeyDown: e => {
|
|
68
68
|
e.target = checkRef.current;
|
|
@@ -80,7 +80,7 @@ function Checkbox(_ref) {
|
|
|
80
80
|
tabIndex: tabIndex,
|
|
81
81
|
value: value,
|
|
82
82
|
children: /*#__PURE__*/jsx("input", {
|
|
83
|
-
id:
|
|
83
|
+
id: `${instanceUID}-${labelText}`,
|
|
84
84
|
onClick: handleClick,
|
|
85
85
|
ref: checkRef,
|
|
86
86
|
checked: !!checked,
|
|
@@ -129,7 +129,7 @@ const DSCheckbox = _ref2 => {
|
|
|
129
129
|
|
|
130
130
|
const checkbox = /*#__PURE__*/jsx(Checkbox, _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
131
131
|
checked: checked,
|
|
132
|
-
className: cx(
|
|
132
|
+
className: cx(`${classNameElement('input-button')} checkbox-${String(checked)}`, className),
|
|
133
133
|
disabled: disabled,
|
|
134
134
|
innerRef: innerRef,
|
|
135
135
|
name: name,
|
|
@@ -142,12 +142,12 @@ const DSCheckbox = _ref2 => {
|
|
|
142
142
|
|
|
143
143
|
if (!labelText) return checkbox;
|
|
144
144
|
return /*#__PURE__*/jsxs("div", _objectSpread(_objectSpread({
|
|
145
|
-
className:
|
|
145
|
+
className: `${cssClassName} ${variant}`
|
|
146
146
|
}, containerProps), {}, {
|
|
147
147
|
children: [/*#__PURE__*/_jsx("label", {
|
|
148
148
|
"data-testid": "ds-checkbox-label",
|
|
149
149
|
className: classNameElement('label'),
|
|
150
|
-
htmlFor:
|
|
150
|
+
htmlFor: `${instanceUID}-${labelText}`
|
|
151
151
|
}, void 0, checkbox, /*#__PURE__*/_jsx("span", {
|
|
152
152
|
className: classNameElement('label-text')
|
|
153
153
|
}, void 0, labelText)), children && /*#__PURE__*/_jsx("div", {
|
|
@@ -22,7 +22,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
22
22
|
|
|
23
23
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
24
24
|
const emClassPrefix = 'em-ds';
|
|
25
|
-
const baseClass =
|
|
25
|
+
const baseClass = `${emClassPrefix}-checkbox-group`;
|
|
26
26
|
|
|
27
27
|
const CheckboxItem = props => /*#__PURE__*/_jsx(GroupItem, {
|
|
28
28
|
render: context => /*#__PURE__*/jsx(DSCheckbox, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -62,7 +62,7 @@ const DSCheckboxGroup = _ref => {
|
|
|
62
62
|
multiple: true,
|
|
63
63
|
onChange: onChange
|
|
64
64
|
}, void 0, /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
|
|
65
|
-
className:
|
|
65
|
+
className: `${baseClass} ${baseClass}--${orientation}`
|
|
66
66
|
}, labelProps && labelProps.labelText ? {} : containerProps), {}, {
|
|
67
67
|
role: "group",
|
|
68
68
|
children: React.Children.map(children, (child, index) => /*#__PURE__*/jsx(CheckboxItem, _objectSpread(_objectSpread({}, child.props), {}, {
|
|
@@ -75,7 +75,7 @@ const DSCheckboxGroup = _ref => {
|
|
|
75
75
|
|
|
76
76
|
if (labelProps && labelProps.labelText) {
|
|
77
77
|
return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
|
|
78
|
-
className:
|
|
78
|
+
className: `${baseClass}-form-item-layout-wrapper`
|
|
79
79
|
}, containerProps), {}, {
|
|
80
80
|
role: "group",
|
|
81
81
|
children: /*#__PURE__*/jsx(DSFormItemLayout, _objectSpread(_objectSpread({}, labelProps), {}, {
|
|
@@ -7,7 +7,6 @@ import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
|
7
7
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
8
8
|
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
9
9
|
import 'core-js/modules/esnext.iterator.map.js';
|
|
10
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
11
10
|
import 'core-js/modules/esnext.async-iterator.find.js';
|
|
12
11
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
13
12
|
import 'core-js/modules/esnext.iterator.find.js';
|
|
@@ -196,7 +195,7 @@ class DSComboBox extends React.Component {
|
|
|
196
195
|
|
|
197
196
|
return /*#__PURE__*/_jsx(Manager, {}, void 0, /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
|
|
198
197
|
ref: measureRef,
|
|
199
|
-
className: cx(
|
|
198
|
+
className: cx(`${ThemeConstants.prefix}-${blockName}-wrapper`, className, hasError && `${ThemeConstants.prefix}-${blockName}--${COMBOBOX_VARIANT.ERROR}`, `${ThemeConstants.prefix}-${blockName}--${variant}`, `focus-${focus}`, isMulti && 'combo-multi', expandMenuOutsideContainer && 'expanded-outside-container')
|
|
200
199
|
}, containerProps), {}, {
|
|
201
200
|
onMouseEnter: () => {
|
|
202
201
|
this.handleHoverRef(undefined);
|
|
@@ -206,11 +205,11 @@ class DSComboBox extends React.Component {
|
|
|
206
205
|
this.select = ref;
|
|
207
206
|
},
|
|
208
207
|
autoFocus: autoFocus,
|
|
209
|
-
classNamePrefix:
|
|
208
|
+
classNamePrefix: `${ThemeConstants.prefix}-${blockName}`,
|
|
210
209
|
components: _objectSpread({
|
|
211
210
|
Control,
|
|
212
211
|
Menu: !options || options.length === 0 ? SelectMenu : props => /*#__PURE__*/_jsx("div", {
|
|
213
|
-
className:
|
|
212
|
+
className: `select-menu-combo ${isMulti && 'select-menu-combo-multi'}`,
|
|
214
213
|
onMouseLeave: () => {
|
|
215
214
|
this.isHover = undefined;
|
|
216
215
|
this.handleHover(undefined);
|
|
@@ -300,7 +299,7 @@ class DSComboBox extends React.Component {
|
|
|
300
299
|
const width = calculateWidth(options);
|
|
301
300
|
if (!width) return null;
|
|
302
301
|
return {
|
|
303
|
-
width:
|
|
302
|
+
width: `${width}px`
|
|
304
303
|
};
|
|
305
304
|
}
|
|
306
305
|
|
|
@@ -5,7 +5,6 @@ import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
|
5
5
|
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
6
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
7
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
9
8
|
import { useRef, useState, useEffect } from 'react';
|
|
10
9
|
import { components } from 'react-select';
|
|
11
10
|
import { FixedSizeList } from 'react-window';
|
|
@@ -79,7 +78,7 @@ const MenuList = props => {
|
|
|
79
78
|
}
|
|
80
79
|
}, void 0, isMulti && /*#__PURE__*/jsx(MultiSelectHeader, _objectSpread({}, props)), /*#__PURE__*/jsx(FixedSizeList, {
|
|
81
80
|
ref: listRef,
|
|
82
|
-
className:
|
|
81
|
+
className: `combobox-menu-list ${isMulti && 'combobox-menu-list-is-multi'}`,
|
|
83
82
|
height: height,
|
|
84
83
|
itemCount: options.length,
|
|
85
84
|
itemData: itemData,
|
|
@@ -8,7 +8,7 @@ const MultiSelectHeader = props => {
|
|
|
8
8
|
const count = props.children.filter(child => child.props.isSelected).length;
|
|
9
9
|
return /*#__PURE__*/_jsx("div", {
|
|
10
10
|
className: "combobox-multi-select-header"
|
|
11
|
-
}, void 0,
|
|
11
|
+
}, void 0, `${count} selected`);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export { MultiSelectHeader as default };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
2
|
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
3
3
|
import 'core-js/modules/esnext.iterator.map.js';
|
|
4
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
4
|
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
6
5
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
7
6
|
import 'core-js/modules/esnext.iterator.filter.js';
|
|
@@ -3,7 +3,6 @@ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
4
4
|
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
5
5
|
import 'core-js/modules/esnext.iterator.map.js';
|
|
6
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
7
6
|
import 'core-js/modules/esnext.async-iterator.find.js';
|
|
8
7
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
9
8
|
import 'core-js/modules/esnext.iterator.find.js';
|
|
@@ -61,7 +60,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
61
60
|
|
|
62
61
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
63
62
|
const blockName = 'em-ds-combobox';
|
|
64
|
-
const container =
|
|
63
|
+
const container = `${blockName}-container`;
|
|
65
64
|
|
|
66
65
|
const getValues = (options, isMulti, valueProperty) => {
|
|
67
66
|
if (!options) return null;
|
|
@@ -143,10 +142,8 @@ const DSComboBox2HOCLess = _ref => {
|
|
|
143
142
|
const optionsChanged = useShouldRecalculate(isEqual(prevOptions, options));
|
|
144
143
|
const SelectComponent = useMemo(() => isFreeSolo ? Creatable : Select, [isFreeSolo]);
|
|
145
144
|
useEffect(() => {
|
|
146
|
-
var _select$current;
|
|
147
|
-
|
|
148
145
|
setInputInFocus(isFocused);
|
|
149
|
-
if (isFocused)
|
|
146
|
+
if (isFocused) select.current?.focus();
|
|
150
147
|
}, [isFocused]);
|
|
151
148
|
useEffect(() => {
|
|
152
149
|
if (selectedValue && !isFreeSolo && !Array.isArray(selectedValue)) {
|
|
@@ -177,9 +174,7 @@ const DSComboBox2HOCLess = _ref => {
|
|
|
177
174
|
}
|
|
178
175
|
|
|
179
176
|
if (e.key === 'Tab' && menuOpen) {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
(_select$current2 = select.current) === null || _select$current2 === void 0 ? void 0 : _select$current2.blur(); // manually invoking blur to ensure losing focus on tab.
|
|
177
|
+
select.current?.blur(); // manually invoking blur to ensure losing focus on tab.
|
|
183
178
|
}
|
|
184
179
|
|
|
185
180
|
if (e.key === 'Escape') setMenuOpen(false);
|
|
@@ -272,7 +267,7 @@ const DSComboBox2HOCLess = _ref => {
|
|
|
272
267
|
value: ctx
|
|
273
268
|
}, void 0, /*#__PURE__*/_jsx(Manager, {}, void 0, /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
|
|
274
269
|
ref: measureRef,
|
|
275
|
-
className: cx(
|
|
270
|
+
className: cx(`${container}`, inputInFocus && 'in-focus', hasError && 'with-error', disabled && 'is-disabled', className),
|
|
276
271
|
onBlur: handleBlur,
|
|
277
272
|
"data-testid": "combobox",
|
|
278
273
|
role: "combobox"
|
|
@@ -359,7 +354,7 @@ const DSComboBox2HOCLess = _ref => {
|
|
|
359
354
|
const width = calculateWidth(options);
|
|
360
355
|
if (!width) return null;
|
|
361
356
|
return {
|
|
362
|
-
width:
|
|
357
|
+
width: `${width}px`
|
|
363
358
|
};
|
|
364
359
|
}
|
|
365
360
|
|
|
@@ -17,8 +17,6 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
17
17
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
18
18
|
|
|
19
19
|
const Content = _ref => {
|
|
20
|
-
var _rest$selectProps;
|
|
21
|
-
|
|
22
20
|
let {
|
|
23
21
|
scheduleUpdate,
|
|
24
22
|
styleMenu
|
|
@@ -28,7 +26,7 @@ const Content = _ref => {
|
|
|
28
26
|
useEffect(() => {
|
|
29
27
|
// trigger popper update on input change PUI-4069
|
|
30
28
|
scheduleUpdate();
|
|
31
|
-
}, [rest
|
|
29
|
+
}, [rest?.selectProps?.inputValue]);
|
|
32
30
|
return /*#__PURE__*/_jsx("div", {
|
|
33
31
|
style: styleMenu,
|
|
34
32
|
"data-testid": "combobox-menu"
|
|
@@ -19,8 +19,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
19
19
|
const isOptionAGroup = option => option && option.type && option.type.name === 'Group';
|
|
20
20
|
|
|
21
21
|
const CustomOption = _ref => {
|
|
22
|
-
var _option$props, _option$props2, _option$props2$innerP, _option$props3, _option$props3$innerP;
|
|
23
|
-
|
|
24
22
|
let {
|
|
25
23
|
index,
|
|
26
24
|
data,
|
|
@@ -37,10 +35,10 @@ const CustomOption = _ref => {
|
|
|
37
35
|
const {
|
|
38
36
|
value
|
|
39
37
|
} = useContext(DropDownContext);
|
|
40
|
-
const isSelected =
|
|
38
|
+
const isSelected = value?.label === option?.props?.label; // react-select performance optimization
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
delete option?.props?.innerProps?.onMouseMove;
|
|
41
|
+
delete option?.props?.innerProps?.onMouseOver;
|
|
44
42
|
const renderOptionStyle = isOptionAGroup(option) ? {} : style;
|
|
45
43
|
|
|
46
44
|
const optionProps = _objectSpread(_objectSpread({}, option.props.innerProps), {}, {
|
|
@@ -49,10 +47,8 @@ const CustomOption = _ref => {
|
|
|
49
47
|
role: 'option',
|
|
50
48
|
'aria-selected': isSelected,
|
|
51
49
|
onClick: e => {
|
|
52
|
-
var _option$props4, _option$props4$innerP;
|
|
53
|
-
|
|
54
50
|
e.stopPropagation();
|
|
55
|
-
if (option
|
|
51
|
+
if (option?.props?.innerProps?.onClick) option.props.innerProps.onClick(e);
|
|
56
52
|
}
|
|
57
53
|
});
|
|
58
54
|
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
|
-
import 'core-js/modules/esnext.async-iterator.find.js';
|
|
4
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
5
|
-
import 'core-js/modules/esnext.iterator.find.js';
|
|
6
1
|
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
7
3
|
import 'core-js/modules/esnext.iterator.filter.js';
|
|
8
4
|
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
9
5
|
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
10
8
|
import React, { useContext } from 'react';
|
|
11
9
|
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
12
10
|
import { DSCheckbox } from '../../../Checkbox/DSCheckbox.js';
|
|
@@ -33,11 +31,7 @@ const CustomOptionMulti = _ref => {
|
|
|
33
31
|
const {
|
|
34
32
|
value
|
|
35
33
|
} = useContext(DropDownContext);
|
|
36
|
-
const isSelected = !!
|
|
37
|
-
var _option$props;
|
|
38
|
-
|
|
39
|
-
return item.label === (option === null || option === void 0 ? void 0 : (_option$props = option.props) === null || _option$props === void 0 ? void 0 : _option$props.label);
|
|
40
|
-
}));
|
|
34
|
+
const isSelected = !!value?.find(item => item.label === option?.props?.label);
|
|
41
35
|
|
|
42
36
|
const optionProps = _objectSpread(_objectSpread({}, option.props.innerProps), {}, {
|
|
43
37
|
style,
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
4
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
1
|
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
6
2
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
7
3
|
import 'core-js/modules/esnext.iterator.filter.js';
|
|
8
4
|
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
9
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 _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
10
9
|
import { useContext, useState } from 'react';
|
|
11
10
|
import { get } from 'lodash';
|
|
12
11
|
import { ChevronSmallDown } from '@elliemae/ds-icons';
|
|
@@ -72,7 +71,7 @@ const DropdownIndicator = _ref => {
|
|
|
72
71
|
"data-testid": "combobox-dropdown-btn",
|
|
73
72
|
"aria-label": "dropdown-indicator",
|
|
74
73
|
buttonType: "text",
|
|
75
|
-
className:
|
|
74
|
+
className: `dropdown-indicator ${get(selectProps, 'menuIsOpen', false) && !inputInFocus ? 'active' : ''}`,
|
|
76
75
|
icon: _ChevronSmallDown || (_ChevronSmallDown = /*#__PURE__*/_jsx(ChevronSmallDown, {})),
|
|
77
76
|
innerRef: innerRef,
|
|
78
77
|
onClick: handleOnClick,
|
|
@@ -5,7 +5,6 @@ import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
|
5
5
|
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
6
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
7
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
9
8
|
import React, { useRef, useState, useEffect } from 'react';
|
|
10
9
|
import { components } from 'react-select';
|
|
11
10
|
import { FixedSizeList } from 'react-window';
|
|
@@ -20,7 +19,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
20
19
|
|
|
21
20
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
22
21
|
const createItemData = memoize((items, options) => {
|
|
23
|
-
if (items
|
|
22
|
+
if (items?.findIndex) {
|
|
24
23
|
const index = items.findIndex(item => item.props.isFocused);
|
|
25
24
|
if (index > -1) return {
|
|
26
25
|
items,
|
|
@@ -109,7 +108,7 @@ const MenuList = /*#__PURE__*/React.memo(props => {
|
|
|
109
108
|
scrollTo(listRef);
|
|
110
109
|
}
|
|
111
110
|
},
|
|
112
|
-
className:
|
|
111
|
+
className: `combobox-menu-list ${isMulti && 'combobox-menu-list-is-multi'}`,
|
|
113
112
|
height: height,
|
|
114
113
|
itemCount: options.length,
|
|
115
114
|
itemData: itemData,
|
|
@@ -21,7 +21,7 @@ const MultiSelectHeader = props => {
|
|
|
21
21
|
const isClearButtonDisabled = selectedItems === 0;
|
|
22
22
|
const isAllButtonDisabled = selectedItems === totalItems;
|
|
23
23
|
return /*#__PURE__*/_jsx(HeaderWrapper, {}, void 0, /*#__PURE__*/_jsx(ContentWrapper, {}, void 0, /*#__PURE__*/_jsx(HeaderTitle, {}, void 0, /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
|
|
24
|
-
value:
|
|
24
|
+
value: `${selectedItems} selected`
|
|
25
25
|
})), !selectAllDisabled && /*#__PURE__*/_jsx(ActionButtons, {}, void 0, /*#__PURE__*/_jsx(StyledButton, {
|
|
26
26
|
"data-testid": "combobox-all-btn",
|
|
27
27
|
buttonType: "text",
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
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 _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
9
8
|
import { useRef, useContext, useState } from 'react';
|
|
10
9
|
import { components } from 'react-select';
|
|
11
10
|
import { cx } from '@elliemae/ds-utilities';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
2
2
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
3
|
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
4
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
4
|
|
|
6
5
|
/* eslint-disable no-restricted-syntax */
|
|
7
6
|
|
|
@@ -38,9 +37,7 @@ const useMenuListHeight = (elements, maxElements, itemSize, remainingHeight) =>
|
|
|
38
37
|
let calculatedHeight = itemSize * elementSlotsToShow;
|
|
39
38
|
|
|
40
39
|
if (elementSlotsToShow === 1) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if ((_elements$ = elements[0]) !== null && _elements$ !== void 0 && (_elements$$props = _elements$.props) !== null && _elements$$props !== void 0 && (_elements$$props$data = _elements$$props.data) !== null && _elements$$props$data !== void 0 && _elements$$props$data.hasSeparator) calculatedHeight += 40;else calculatedHeight += 25;
|
|
40
|
+
if (elements[0]?.props?.data?.hasSeparator) calculatedHeight += 40;else calculatedHeight += 25;
|
|
44
41
|
} // add pixels for group type (title and padding)
|
|
45
42
|
|
|
46
43
|
|
|
@@ -48,17 +45,15 @@ const useMenuListHeight = (elements, maxElements, itemSize, remainingHeight) =>
|
|
|
48
45
|
let groupElementsShowed = 0;
|
|
49
46
|
|
|
50
47
|
for (const group of elements) {
|
|
51
|
-
var _currentOptions$props, _currentOptions$props2, _currentOptions$props3, _currentOptions$props4;
|
|
52
|
-
|
|
53
48
|
if (groupElementsShowed >= elementSlotsToShow) {
|
|
54
49
|
break;
|
|
55
50
|
}
|
|
56
51
|
|
|
57
52
|
const currentOptions = group;
|
|
58
|
-
groupElementsShowed +=
|
|
53
|
+
groupElementsShowed += currentOptions?.props?.options?.length || 0;
|
|
59
54
|
calculatedHeight += GROUP_PADDING + GROUP_TITLE;
|
|
60
55
|
|
|
61
|
-
if (currentOptions
|
|
56
|
+
if (currentOptions?.props?.data?.hasSeparator) {
|
|
62
57
|
calculatedHeight += SEPARATOR;
|
|
63
58
|
}
|
|
64
59
|
}
|
|
@@ -57,7 +57,7 @@ function ComboBoxFreeSolo(_ref) {
|
|
|
57
57
|
disabled = false,
|
|
58
58
|
menuIsOpen = false,
|
|
59
59
|
placeholder = 'Select values',
|
|
60
|
-
formatCreateLabel = val =>
|
|
60
|
+
formatCreateLabel = val => `Create ${val}`,
|
|
61
61
|
maxOptions = undefined
|
|
62
62
|
} = _ref,
|
|
63
63
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -6,7 +6,6 @@ import 'core-js/modules/esnext.iterator.for-each.js';
|
|
|
6
6
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
7
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
8
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
9
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
10
9
|
import { useState, useEffect, useCallback } from 'react';
|
|
11
10
|
import { describe } from 'react-desc';
|
|
12
11
|
import { runAll } from '@elliemae/ds-utilities';
|
|
@@ -61,7 +60,7 @@ const DSDateInput = _ref => {
|
|
|
61
60
|
inputOnChange(date);
|
|
62
61
|
}, []);
|
|
63
62
|
return /*#__PURE__*/_jsx(DSInput, {
|
|
64
|
-
className:
|
|
63
|
+
className: `${className} input-date-input `,
|
|
65
64
|
clearable: clearable,
|
|
66
65
|
containerProps: containerProps,
|
|
67
66
|
customInputType: _ref2 => {
|
|
@@ -4,7 +4,6 @@ import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
|
4
4
|
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
5
5
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
6
6
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
8
7
|
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
9
8
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
10
9
|
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
1
|
import 'core-js/modules/esnext.async-iterator.some.js';
|
|
3
2
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
4
3
|
import 'core-js/modules/esnext.iterator.some.js';
|
|
@@ -172,7 +171,7 @@ const handleCompletedDate = (time, date, show, INTERNAL_V2_NO_MUTATION) => {
|
|
|
172
171
|
showDay
|
|
173
172
|
} = show;
|
|
174
173
|
if (time && !year && !month && !day) return '';
|
|
175
|
-
newDate.value =
|
|
174
|
+
newDate.value = `${year}-${month}-${day}`;
|
|
176
175
|
if (showMonth && month) newDate.month(parseInt(month - 1, 10));
|
|
177
176
|
if (showDay && day) newDate.date(parseInt(day, 10));
|
|
178
177
|
if (showYear && year) newDate.year(parseInt(year, 10));
|
|
@@ -4,7 +4,6 @@ import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
|
4
4
|
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
5
5
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
6
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
8
7
|
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
9
8
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
10
9
|
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
@@ -47,7 +46,7 @@ const DateInputs = _ref => {
|
|
|
47
46
|
}, [dayRef.current]);
|
|
48
47
|
const triggerOnDateChange = React.useCallback(() => {
|
|
49
48
|
if (month && day && year && haveInputsOnChangeTriggered) {
|
|
50
|
-
const momentValue = moment(
|
|
49
|
+
const momentValue = moment(`${month}${day}${year}`, 'MMDDYYYY', true);
|
|
51
50
|
|
|
52
51
|
if (momentValue.isValid()) {
|
|
53
52
|
onDateChange(momentValue);
|
|
@@ -90,15 +89,15 @@ const DateInputs = _ref => {
|
|
|
90
89
|
// When component mounts haveInputsOnChangeTriggered is set to false
|
|
91
90
|
// so this is not triggered on mount but is triggered with all other changes
|
|
92
91
|
if (haveInputsOnChangeTriggered) {
|
|
93
|
-
const momentValue = moment(
|
|
94
|
-
onChange(
|
|
92
|
+
const momentValue = moment(`${month}${day}${year}`, FORMAT, true);
|
|
93
|
+
onChange(`${month}${day}${year}`, momentValue.isValid() ? momentValue : null);
|
|
95
94
|
}
|
|
96
95
|
}, [day, month, year]);
|
|
97
96
|
useEffect(() => {
|
|
98
97
|
triggerOnDateChange();
|
|
99
98
|
}, [onChangeDateTrigger]);
|
|
100
99
|
useEffect(() => {
|
|
101
|
-
if (time && time !==
|
|
100
|
+
if (time && time !== `${month}${day}${year}` && moment(time, 'MMDDYYYY').isValid()) {
|
|
102
101
|
const values = String(time || '');
|
|
103
102
|
if (values.slice(0, 2)) setMonth(values.slice(0, 2));
|
|
104
103
|
if (values.slice(2, 4)) setDay(values.slice(2, 4));
|
|
@@ -11,7 +11,10 @@ const DateInputWrapper = /*#__PURE__*/styled(Grid).withConfig({
|
|
|
11
11
|
disabled,
|
|
12
12
|
theme
|
|
13
13
|
} = _ref;
|
|
14
|
-
return disabled ?
|
|
14
|
+
return disabled ? `
|
|
15
|
+
background: ${theme.colors.neutral[100]};
|
|
16
|
+
color: ${theme.colors.neutral[500]};
|
|
17
|
+
` : '';
|
|
15
18
|
});
|
|
16
19
|
const DateInputInput = /*#__PURE__*/styled.input.withConfig({
|
|
17
20
|
componentId: "sc-ads423-2"
|
|
@@ -20,7 +23,10 @@ const DateInputInput = /*#__PURE__*/styled.input.withConfig({
|
|
|
20
23
|
disabled,
|
|
21
24
|
theme
|
|
22
25
|
} = _ref2;
|
|
23
|
-
return disabled ?
|
|
26
|
+
return disabled ? `
|
|
27
|
+
background: ${theme.colors.neutral[100]};
|
|
28
|
+
color: ${theme.colors.neutral[500]};
|
|
29
|
+
` : '';
|
|
24
30
|
}, _ref3 => {
|
|
25
31
|
let {
|
|
26
32
|
theme
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
1
|
import 'core-js/modules/esnext.async-iterator.some.js';
|
|
3
2
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
4
3
|
import 'core-js/modules/esnext.iterator.some.js';
|
|
@@ -115,14 +114,10 @@ const triggerOnBlur = function (blurEvent) {
|
|
|
115
114
|
}
|
|
116
115
|
};
|
|
117
116
|
const focusNextInput = currentEl => {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
(_getNextSibling = getNextSibling(currentEl, 'input')) === null || _getNextSibling === void 0 ? void 0 : _getNextSibling.focus();
|
|
117
|
+
getNextSibling(currentEl, 'input')?.focus();
|
|
121
118
|
};
|
|
122
119
|
const focusPreviousInput = currentEl => {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
(_getPreviousSibling = getPreviousSibling(currentEl, 'input')) === null || _getPreviousSibling === void 0 ? void 0 : _getPreviousSibling.focus();
|
|
120
|
+
getPreviousSibling(currentEl, 'input')?.focus();
|
|
126
121
|
};
|
|
127
122
|
const getValidTimeNumber = function (_ref, number) {
|
|
128
123
|
let {
|
|
@@ -221,7 +216,7 @@ const handleCompletedDate = (time, date, show, INTERNAL_V2_NO_MUTATION) => {
|
|
|
221
216
|
showDay
|
|
222
217
|
} = show;
|
|
223
218
|
if (time && !year && !month && !day) return '';
|
|
224
|
-
newDate.value =
|
|
219
|
+
newDate.value = `${year}-${month}-${day}`;
|
|
225
220
|
if (showMonth && month) newDate.month(parseInt(month - 1, 10));
|
|
226
221
|
if (showDay && day) newDate.date(parseInt(day, 10));
|
|
227
222
|
if (showYear && year) newDate.year(parseInt(year, 10));
|
|
@@ -42,8 +42,8 @@ const Wrapper = aggregatedClasses('div')(blockName, null, _ref => {
|
|
|
42
42
|
'with-highlight': withHighlight
|
|
43
43
|
};
|
|
44
44
|
});
|
|
45
|
-
const WrapperContent = aggregatedClasses('div')(
|
|
46
|
-
const WrapperContentGroup = aggregatedClasses('fieldset')(
|
|
45
|
+
const WrapperContent = aggregatedClasses('div')(`${blockName}-content`);
|
|
46
|
+
const WrapperContentGroup = aggregatedClasses('fieldset')(`${blockName}-content`);
|
|
47
47
|
|
|
48
48
|
const DSFormItemLayout = _ref2 => {
|
|
49
49
|
var _WrapperContentComp;
|
|
@@ -19,7 +19,7 @@ const DSLabel = _ref => {
|
|
|
19
19
|
} = _ref;
|
|
20
20
|
const Tag = isGroup ? 'legend' : 'label';
|
|
21
21
|
return /*#__PURE__*/_jsx(Tag, {
|
|
22
|
-
className:
|
|
22
|
+
className: `${blockName}${isGroup ? ` ${blockName}--group` : ''}`,
|
|
23
23
|
htmlFor: htmlFor
|
|
24
24
|
}, void 0, truncateText ? /*#__PURE__*/_jsx(DSTruncatedTooltipText, {
|
|
25
25
|
value: children || label
|
|
@@ -5,11 +5,15 @@ const Suffix = /*#__PURE__*/styled.div.withConfig({
|
|
|
5
5
|
componentId: "sc-126c671-0"
|
|
6
6
|
})(["height:2.16rem;align-items:center;display:flex;", ""], props => {
|
|
7
7
|
if (props.label && !props.withFeedback) {
|
|
8
|
-
return
|
|
8
|
+
return `
|
|
9
|
+
padding-top: 1.2rem;
|
|
10
|
+
`;
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
if (!props.label && !props.withFeedback) {
|
|
12
|
-
return
|
|
14
|
+
return `
|
|
15
|
+
padding-top: 1rem;
|
|
16
|
+
`;
|
|
13
17
|
}
|
|
14
18
|
});
|
|
15
19
|
const SuffixInputWrapper = /*#__PURE__*/styled.div.withConfig({
|
package/esm/Input/DSInput.js
CHANGED
|
@@ -50,7 +50,7 @@ const DSInput = _ref => {
|
|
|
50
50
|
"aria-label": otherProps['aria-label'],
|
|
51
51
|
"aria-describedby": otherProps['aria-describedby'],
|
|
52
52
|
autoFocus: autoFocus,
|
|
53
|
-
className:
|
|
53
|
+
className: `${className} ${disabled ? 'input-disabled' : ''}${readOnly ? 'read-only' : ''}`,
|
|
54
54
|
clearable: clearable,
|
|
55
55
|
containerProps: containerProps,
|
|
56
56
|
customInputType: customInputType,
|