@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/cjs/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.js
CHANGED
|
@@ -22,50 +22,41 @@ var Grid__default = /*#__PURE__*/_interopDefaultLegacy(Grid);
|
|
|
22
22
|
var _MultiAllyMessages;
|
|
23
23
|
|
|
24
24
|
const MultiSelectedValuesContainer = () => {
|
|
25
|
+
var _inputRef$current2;
|
|
26
|
+
|
|
25
27
|
const {
|
|
26
28
|
props: {
|
|
27
|
-
onChange,
|
|
28
29
|
selectedValues
|
|
29
30
|
},
|
|
30
|
-
inputRef
|
|
31
|
+
inputRef,
|
|
32
|
+
pillGroupRef
|
|
31
33
|
} = React.useContext(ComboBoxCTX.ComboBoxContext);
|
|
32
|
-
const pillGroupRef = React.useRef(null);
|
|
33
34
|
const multiSelectedValue = selectedValues;
|
|
34
|
-
const pillsToShow = useGroupPills.useGroupPills(
|
|
35
|
+
const pillsToShow = useGroupPills.useGroupPills();
|
|
35
36
|
const correctPillsToShow = pillsToShow || 1;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return /*#__PURE__*/_jsx__default["default"](Grid__default["default"], {
|
|
49
|
-
onClick: handleClick,
|
|
50
|
-
style: {
|
|
51
|
-
width: 'max-content'
|
|
52
|
-
}
|
|
53
|
-
}, void 0, /*#__PURE__*/_jsx__default["default"](dsPills.DSPillGroupV2, {
|
|
54
|
-
innerRef: pillGroupRef
|
|
55
|
-
}, void 0, multiSelectedValue.length > 0 && multiSelectedValue.slice(0, correctPillsToShow).map(option => /*#__PURE__*/_jsx__default["default"](dsPills.DSPillV2, {
|
|
56
|
-
labelTruncated: inputRef.current.value === '' || correctPillsToShow !== pillsToShow,
|
|
37
|
+
const pills = React.useMemo(() => /*#__PURE__*/_jsx__default["default"](Grid__default["default"], {
|
|
38
|
+
style: {
|
|
39
|
+
width: 'max-content'
|
|
40
|
+
}
|
|
41
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](dsPills.DSPillGroupV2, {
|
|
42
|
+
innerRef: pillGroupRef
|
|
43
|
+
}, void 0, multiSelectedValue.length > 0 && multiSelectedValue.slice(0, correctPillsToShow).map(option => {
|
|
44
|
+
var _inputRef$current;
|
|
45
|
+
|
|
46
|
+
return /*#__PURE__*/_jsx__default["default"](dsPills.DSPillV2, {
|
|
47
|
+
size: "s",
|
|
48
|
+
labelTruncated: ((_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value) === '' || correctPillsToShow !== pillsToShow,
|
|
57
49
|
label: option.label,
|
|
58
|
-
type: "
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}, [pillsToShow, onChange, inputRef, multiSelectedValue, correctPillsToShow]);
|
|
50
|
+
type: "value"
|
|
51
|
+
}, option.value);
|
|
52
|
+
}), multiSelectedValue.length > 0 && correctPillsToShow !== multiSelectedValue.length && /*#__PURE__*/_jsx__default["default"](dsPills.DSPillV2, {
|
|
53
|
+
size: "s",
|
|
54
|
+
labelTruncated: false,
|
|
55
|
+
label: "+".concat(multiSelectedValue.length - correctPillsToShow),
|
|
56
|
+
type: "value"
|
|
57
|
+
}, "grouped"))), [pillsToShow, pillGroupRef, inputRef, multiSelectedValue, correctPillsToShow]);
|
|
67
58
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
68
|
-
children: [multiSelectedValue.length > 0 && !inputRef.current.value && (_MultiAllyMessages || (_MultiAllyMessages = /*#__PURE__*/_jsx__default["default"](MultiAllyMessages.MultiAllyMessages, {}))), pills]
|
|
59
|
+
children: [multiSelectedValue.length > 0 && !((_inputRef$current2 = inputRef.current) !== null && _inputRef$current2 !== void 0 && _inputRef$current2.value) && (_MultiAllyMessages || (_MultiAllyMessages = /*#__PURE__*/_jsx__default["default"](MultiAllyMessages.MultiAllyMessages, {}))), pills]
|
|
69
60
|
});
|
|
70
61
|
};
|
|
71
62
|
|
|
@@ -18,13 +18,14 @@ const getGroupedPillWidth = remainingPills => {
|
|
|
18
18
|
return 8 * (digits - 1) + 31;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
const useGroupPills =
|
|
21
|
+
const useGroupPills = () => {
|
|
22
22
|
const {
|
|
23
23
|
props: {
|
|
24
24
|
selectedValues
|
|
25
25
|
},
|
|
26
26
|
selectedOptionsRef,
|
|
27
|
-
controlsWrapperRef
|
|
27
|
+
controlsWrapperRef,
|
|
28
|
+
pillGroupRef
|
|
28
29
|
} = React.useContext(ComboBoxCTX.ComboBoxContext);
|
|
29
30
|
const multiSelectedValues = selectedValues;
|
|
30
31
|
const [pillsToShow, setPillsToShow] = React.useState(multiSelectedValues.length);
|
|
@@ -43,7 +44,7 @@ const useGroupPills = pillGroupRef => {
|
|
|
43
44
|
let lastPillFit = -1;
|
|
44
45
|
let currentWidth = 0;
|
|
45
46
|
const referenceWidth = selectedOptionsRef.current.offsetWidth;
|
|
46
|
-
const pills = [...selectedOptionsRef.current.querySelectorAll('.ds-pill-wrapper-
|
|
47
|
+
const pills = [...selectedOptionsRef.current.querySelectorAll('.ds-pill-wrapper-value')];
|
|
47
48
|
const pillsWidth = pills.map(pill => pill === null || pill === void 0 ? void 0 : pill.offsetWidth);
|
|
48
49
|
pillsWidth.forEach((pillWidth, idx) => {
|
|
49
50
|
currentWidth += pillWidth;
|
|
@@ -52,10 +53,13 @@ const useGroupPills = pillGroupRef => {
|
|
|
52
53
|
lastPillFit = idx;
|
|
53
54
|
}
|
|
54
55
|
});
|
|
55
|
-
const nextPillsToShow = lastPillFit + 1;
|
|
56
56
|
|
|
57
|
-
if (
|
|
58
|
-
|
|
57
|
+
if (!(multiSelectedValues.length > 0 && pillsToShow !== multiSelectedValues.length)) {
|
|
58
|
+
const nextPillsToShow = lastPillFit + 1;
|
|
59
|
+
|
|
60
|
+
if (nextPillsToShow !== pillsToShow) {
|
|
61
|
+
setPillsToShow(nextPillsToShow);
|
|
62
|
+
}
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
pillGroupRef.current.style.width = 'fit-content';
|
|
@@ -5,17 +5,21 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var reactDesc = require('react-desc');
|
|
6
6
|
|
|
7
7
|
const propTypes = {
|
|
8
|
-
placeholder: reactDesc.PropTypes.string.description('').defaultValue(''),
|
|
9
|
-
options: reactDesc.PropTypes.array.description('').defaultValue([]),
|
|
10
|
-
selectedValues: reactDesc.PropTypes.oneOfType([reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.object), reactDesc.PropTypes.object]).description(''),
|
|
11
|
-
autoFocus: reactDesc.PropTypes.bool.description('').defaultValue('false'),
|
|
12
|
-
hasError: reactDesc.PropTypes.bool.description('').defaultValue('false'),
|
|
13
|
-
onChange: reactDesc.PropTypes.func.description('').defaultValue(''),
|
|
14
|
-
onSelectAll: reactDesc.PropTypes.func.description('').defaultValue(''),
|
|
15
|
-
onFilter: reactDesc.PropTypes.func.description('').defaultValue(''),
|
|
16
|
-
onCreate: reactDesc.PropTypes.func.description('').defaultValue(''),
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
placeholder: reactDesc.PropTypes.string.description('input s placeholder value').defaultValue(''),
|
|
9
|
+
options: reactDesc.PropTypes.oneOfType([reactDesc.PropTypes.array, reactDesc.PropTypes.object]).description('List of options').defaultValue([]),
|
|
10
|
+
selectedValues: reactDesc.PropTypes.oneOfType([reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.object), reactDesc.PropTypes.object]).description('Array of option or single option selected'),
|
|
11
|
+
autoFocus: reactDesc.PropTypes.bool.description('Whether the combo box uses auto focus or not').defaultValue('false'),
|
|
12
|
+
hasError: reactDesc.PropTypes.bool.description('Whether the combo box has error or not').defaultValue('false'),
|
|
13
|
+
onChange: reactDesc.PropTypes.func.description('function triggered when an option is selected it will send the options selected').defaultValue(''),
|
|
14
|
+
onSelectAll: reactDesc.PropTypes.func.description('function triggered when ALL button is selected from the header menu list').defaultValue(''),
|
|
15
|
+
onFilter: reactDesc.PropTypes.func.description('function triggered when user type in the combobox input').defaultValue(''),
|
|
16
|
+
onCreate: reactDesc.PropTypes.func.description('function triggered when user select "create" a new item whenever is not a match in the all option list').defaultValue(''),
|
|
17
|
+
onClearAll: reactDesc.PropTypes.func.description('function triggered when user select CLEAR button from the header menu list').defaultValue(''),
|
|
18
|
+
onMenuOpen: reactDesc.PropTypes.func.description('function triggered when user open the menu list').defaultValue(''),
|
|
19
|
+
inputMinWidth: reactDesc.PropTypes.any.description('Minimum width for the combo box input controller').defaultValue(undefined),
|
|
20
|
+
menuMinWidth: reactDesc.PropTypes.any.description('Minimum width for the dropdown menu').defaultValue(undefined),
|
|
21
|
+
menuMaxHeight: reactDesc.PropTypes.any.description('Maximum height for the dropdown menu').defaultValue(undefined),
|
|
22
|
+
withToggle: reactDesc.PropTypes.bool.description('POC purpose this prop will not remain').defaultValue('false')
|
|
19
23
|
};
|
|
20
24
|
|
|
21
25
|
exports.propTypes = propTypes;
|
|
@@ -15,6 +15,8 @@ const useKeyboardNavigation = () => {
|
|
|
15
15
|
const {
|
|
16
16
|
props: {
|
|
17
17
|
inline,
|
|
18
|
+
onSelectAll,
|
|
19
|
+
onKeyDown,
|
|
18
20
|
onChange,
|
|
19
21
|
onCreate,
|
|
20
22
|
options,
|
|
@@ -32,9 +34,10 @@ const useKeyboardNavigation = () => {
|
|
|
32
34
|
const multiple = Array.isArray(selectedValues);
|
|
33
35
|
const selectableOptions = listHelper.getOptions(options);
|
|
34
36
|
const currentItemIndex = options.findIndex(opt => opt.dsId === focusOptionIdx);
|
|
37
|
+
const currentItem = options.find(item => item.dsId === focusOptionIdx);
|
|
35
38
|
const selectOption = React.useCallback(() => {
|
|
36
39
|
if (multiple) {
|
|
37
|
-
onFilter(inputRef.current.value);
|
|
40
|
+
if (inputRef.current) onFilter(inputRef.current.value);
|
|
38
41
|
} else {
|
|
39
42
|
onFilter('');
|
|
40
43
|
if (inputRef.current) inputRef.current.value = '';
|
|
@@ -46,9 +49,13 @@ const useKeyboardNavigation = () => {
|
|
|
46
49
|
}, [multiple, options, focusOptionIdx, setShowPopover, showPopover, onFilter, inputRef, setShowSelectedValue, onChange]);
|
|
47
50
|
const onInputKeyDown = React.useCallback(e => {
|
|
48
51
|
const targetElement = e.target; // =============================================================================
|
|
49
|
-
//
|
|
52
|
+
// CUSTOM KEYS
|
|
50
53
|
// =============================================================================
|
|
51
54
|
|
|
55
|
+
onKeyDown(e, currentItem); // =============================================================================
|
|
56
|
+
// ENTER KEY TO CREATE ELEMENTS
|
|
57
|
+
// ====================================================== =================
|
|
58
|
+
|
|
52
59
|
if (e.key === 'Enter' && onCreate && !selectableOptions.length) {
|
|
53
60
|
onCreate(targetElement.value);
|
|
54
61
|
onFilter('');
|
|
@@ -62,7 +69,7 @@ const useKeyboardNavigation = () => {
|
|
|
62
69
|
if (e.keyCode === 32 && targetElement.value === '' || e.key === 'Enter') {
|
|
63
70
|
e.preventDefault();
|
|
64
71
|
|
|
65
|
-
if (!showPopover) {
|
|
72
|
+
if (!showPopover && !inline) {
|
|
66
73
|
setShowPopover(true);
|
|
67
74
|
} else {
|
|
68
75
|
selectOption();
|
|
@@ -74,14 +81,19 @@ const useKeyboardNavigation = () => {
|
|
|
74
81
|
|
|
75
82
|
if (e.key === 'Enter' && e.ctrlKey && multiple) {
|
|
76
83
|
setShowPopover(false);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (e.key === 'a' && e.ctrlKey && multiple) {
|
|
87
|
+
onSelectAll();
|
|
77
88
|
} // =============================================================================
|
|
78
89
|
// ARROWS UP AND DOWN
|
|
79
90
|
// =============================================================================
|
|
80
91
|
|
|
81
92
|
|
|
82
93
|
if (e.key === 'ArrowDown') {
|
|
94
|
+
e.preventDefault();
|
|
95
|
+
|
|
83
96
|
if (showPopover || inline) {
|
|
84
|
-
e.preventDefault();
|
|
85
97
|
const nextItemIndex = listHelper.findInCircularList(options, currentItemIndex, isOptionFocuseable);
|
|
86
98
|
setCurrentOption(options[nextItemIndex].dsId);
|
|
87
99
|
scrollOptionIntoView(options[nextItemIndex].dsId);
|
|
@@ -91,8 +103,9 @@ const useKeyboardNavigation = () => {
|
|
|
91
103
|
}
|
|
92
104
|
|
|
93
105
|
if (e.key === 'ArrowUp') {
|
|
106
|
+
e.preventDefault();
|
|
107
|
+
|
|
94
108
|
if (showPopover || inline) {
|
|
95
|
-
e.preventDefault();
|
|
96
109
|
const nextItemIndex = listHelper.findInCircularList(options, currentItemIndex, isOptionFocuseable, -1);
|
|
97
110
|
setCurrentOption(options[nextItemIndex].dsId);
|
|
98
111
|
scrollOptionIntoView(options[nextItemIndex].dsId);
|
|
@@ -102,7 +115,7 @@ const useKeyboardNavigation = () => {
|
|
|
102
115
|
const nextItemIndex = listHelper.findInCircularList(options, 0, isOptionFocuseable, -1);
|
|
103
116
|
setCurrentOption(options[nextItemIndex].dsId);
|
|
104
117
|
scrollOptionIntoView(options[nextItemIndex].dsId);
|
|
105
|
-
}
|
|
118
|
+
});
|
|
106
119
|
}
|
|
107
120
|
} // =============================================================================
|
|
108
121
|
// ESCAPE
|
|
@@ -110,7 +123,9 @@ const useKeyboardNavigation = () => {
|
|
|
110
123
|
|
|
111
124
|
|
|
112
125
|
if (e.key === 'Escape' && !inline) {
|
|
113
|
-
setShowPopover(false);
|
|
126
|
+
setShowPopover(false); // TODO confirm funcionality
|
|
127
|
+
// onFilter('');
|
|
128
|
+
// inputRef.current.value = '';
|
|
114
129
|
} // =============================================================================
|
|
115
130
|
// BACKSPACE
|
|
116
131
|
// =============================================================================
|
|
@@ -118,37 +133,20 @@ const useKeyboardNavigation = () => {
|
|
|
118
133
|
|
|
119
134
|
if (e.key === 'Backspace' && targetElement.value.length <= 0 && !inline) {
|
|
120
135
|
if (multiple && !targetElement.value) {
|
|
121
|
-
|
|
122
|
-
if (multiSelectedValues.length > 0) onChange(multiSelectedValues[multiSelectedValues.length - 1]);
|
|
136
|
+
if (selectedValues.length > 0) onChange(selectedValues[selectedValues.length - 1]);
|
|
123
137
|
} else {
|
|
124
138
|
onChange(null);
|
|
125
139
|
}
|
|
126
140
|
|
|
127
141
|
onFilter('');
|
|
128
142
|
setShowSelectedValue(true);
|
|
129
|
-
} // =============================================================================
|
|
130
|
-
// SHIFT + TAB ON SINGLE SELECT: SELECT AND RETURN TO INPUT
|
|
131
|
-
// =============================================================================
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
if (e.key === 'Tab' && e.shiftKey && !multiple && showPopover) {
|
|
135
|
-
selectOption();
|
|
136
|
-
e.preventDefault();
|
|
137
|
-
} // =============================================================================
|
|
138
|
-
// TAB + SINGLE SELECT
|
|
139
|
-
// =============================================================================
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
if (e.key === 'Tab' && showPopover && !multiple) {
|
|
143
|
-
selectOption();
|
|
144
|
-
setShowPopover(false);
|
|
145
143
|
}
|
|
146
144
|
|
|
147
|
-
if (e.key === 'Tab' && inline)
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
145
|
+
if (e.key === 'Tab' && inline) ;
|
|
146
|
+
}, [scrollOptionIntoView, currentItemIndex, options, currentItem, selectableOptions, inputRef, multiple, showPopover, selectedValues, inline, onKeyDown, onSelectAll, onChange, onCreate, onFilter, setCurrentOption, setShowPopover, setShowSelectedValue, selectOption]);
|
|
147
|
+
return {
|
|
148
|
+
onInputKeyDown
|
|
149
|
+
};
|
|
152
150
|
};
|
|
153
151
|
|
|
154
152
|
exports.useKeyboardNavigation = useKeyboardNavigation;
|
|
@@ -15,10 +15,10 @@ const useOnElementResize = targetRef => {
|
|
|
15
15
|
const observer = React.useRef(null);
|
|
16
16
|
React.useEffect(() => {
|
|
17
17
|
function outputsize() {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
if (targetRef.current) {
|
|
19
|
+
setWidth(targetRef.current.offsetWidth);
|
|
20
|
+
setHeight(targetRef.current.offsetHeight);
|
|
21
|
+
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
observer.current = new ResizeObserver(outputsize).observe(targetRef.current);
|
|
@@ -53,11 +53,8 @@ const shouldUpdateSvgPath = (_ref2, prevSizes) => {
|
|
|
53
53
|
class FloatingLabelInputImpl extends React.Component {
|
|
54
54
|
constructor(props) {
|
|
55
55
|
super(props);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
_defineProperty__default["default"](this, "prevSizes", {});
|
|
60
|
-
|
|
56
|
+
this.resizeObserver = new resizeObserver.ResizeObserver(() => this.updatePath());
|
|
57
|
+
this.prevSizes = {};
|
|
61
58
|
this.wrapperRef = /*#__PURE__*/React__default["default"].createRef();
|
|
62
59
|
this.outlinePathRef = /*#__PURE__*/React__default["default"].createRef();
|
|
63
60
|
this.outlineIdleRef = /*#__PURE__*/React__default["default"].createRef();
|
|
@@ -197,8 +194,8 @@ class FloatingLabelInputImpl extends React.Component {
|
|
|
197
194
|
|
|
198
195
|
}
|
|
199
196
|
|
|
200
|
-
|
|
197
|
+
FloatingLabelInputImpl.defaultProps = {
|
|
201
198
|
onChange: () => null
|
|
202
|
-
}
|
|
199
|
+
};
|
|
203
200
|
|
|
204
201
|
module.exports = FloatingLabelInputImpl;
|
|
@@ -111,8 +111,7 @@ class ValidationFieldWrapper extends React.Component {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
}
|
|
114
|
-
|
|
115
|
-
_defineProperty__default["default"](ValidationFieldWrapper, "defaultProps", {
|
|
114
|
+
ValidationFieldWrapper.defaultProps = {
|
|
116
115
|
validateOnBlur: false,
|
|
117
116
|
validateOnChange: false,
|
|
118
117
|
name: '',
|
|
@@ -121,6 +120,6 @@ _defineProperty__default["default"](ValidationFieldWrapper, "defaultProps", {
|
|
|
121
120
|
validate: () => null,
|
|
122
121
|
onChange: () => null,
|
|
123
122
|
onBlur: () => null
|
|
124
|
-
}
|
|
123
|
+
};
|
|
125
124
|
|
|
126
125
|
module.exports = ValidationFieldWrapper;
|
|
@@ -112,11 +112,10 @@ class InputAddonWrapper extends React.Component {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
}
|
|
115
|
-
|
|
116
|
-
_defineProperty__default["default"](InputAddonWrapper, "defaultProps", {
|
|
115
|
+
InputAddonWrapper.defaultProps = {
|
|
117
116
|
rightComponents: [],
|
|
118
117
|
leftComponents: [],
|
|
119
118
|
containerProps: {}
|
|
120
|
-
}
|
|
119
|
+
};
|
|
121
120
|
|
|
122
121
|
module.exports = InputAddonWrapper;
|
package/cjs/Input/InputImpl.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
3
4
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
4
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
5
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
6
|
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
7
7
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
8
8
|
require('core-js/modules/esnext.iterator.filter.js');
|
|
@@ -20,9 +20,9 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
20
20
|
|
|
21
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
22
22
|
|
|
23
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
23
24
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
24
25
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
25
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
26
26
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
27
27
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
28
28
|
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
@@ -66,12 +66,10 @@ const noop = () => null;
|
|
|
66
66
|
class InputImpl extends React.Component {
|
|
67
67
|
constructor(props) {
|
|
68
68
|
super(props);
|
|
69
|
+
this.ref = void 0;
|
|
70
|
+
this.refTooltip = void 0;
|
|
69
71
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
_defineProperty__default["default"](this, "refTooltip", void 0);
|
|
73
|
-
|
|
74
|
-
_defineProperty__default["default"](this, "handleOnChange", e => {
|
|
72
|
+
this.handleOnChange = e => {
|
|
75
73
|
const {
|
|
76
74
|
onChange,
|
|
77
75
|
max
|
|
@@ -87,9 +85,9 @@ class InputImpl extends React.Component {
|
|
|
87
85
|
isEllipsisOn: this.ref.current.offsetWidth < this.ref.current.scrollWidth
|
|
88
86
|
});
|
|
89
87
|
}
|
|
90
|
-
}
|
|
88
|
+
};
|
|
91
89
|
|
|
92
|
-
|
|
90
|
+
this.handleBlur = e => {
|
|
93
91
|
const {
|
|
94
92
|
onBlur,
|
|
95
93
|
onChange,
|
|
@@ -111,9 +109,9 @@ class InputImpl extends React.Component {
|
|
|
111
109
|
this.setState({
|
|
112
110
|
active: false
|
|
113
111
|
});
|
|
114
|
-
}
|
|
112
|
+
};
|
|
115
113
|
|
|
116
|
-
|
|
114
|
+
this.handleFocus = e => {
|
|
117
115
|
const {
|
|
118
116
|
onFocus
|
|
119
117
|
} = this.props;
|
|
@@ -121,30 +119,30 @@ class InputImpl extends React.Component {
|
|
|
121
119
|
this.setState({
|
|
122
120
|
active: true
|
|
123
121
|
});
|
|
124
|
-
}
|
|
122
|
+
};
|
|
125
123
|
|
|
126
|
-
|
|
124
|
+
this.handleMouseEnter = () => {
|
|
127
125
|
if (!this.state.showTooltip) {
|
|
128
126
|
this.setState({
|
|
129
127
|
showTooltip: true
|
|
130
128
|
});
|
|
131
129
|
}
|
|
132
|
-
}
|
|
130
|
+
};
|
|
133
131
|
|
|
134
|
-
|
|
132
|
+
this.handleMouseLeave = () => {
|
|
135
133
|
if (this.state.showTooltip) {
|
|
136
134
|
this.setState({
|
|
137
135
|
showTooltip: false
|
|
138
136
|
});
|
|
139
137
|
}
|
|
140
|
-
}
|
|
138
|
+
};
|
|
141
139
|
|
|
142
|
-
|
|
140
|
+
this.setWidth = () => {
|
|
143
141
|
const client = this.refTooltip.current.getBoundingClientRect();
|
|
144
142
|
this.setState({
|
|
145
143
|
width: client.width
|
|
146
144
|
});
|
|
147
|
-
}
|
|
145
|
+
};
|
|
148
146
|
|
|
149
147
|
this.state = {
|
|
150
148
|
width: -1,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
5
5
|
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
6
|
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
7
7
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
@@ -14,8 +14,8 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
14
14
|
|
|
15
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
16
|
|
|
17
|
-
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
18
17
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
18
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
19
19
|
|
|
20
20
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
21
21
|
|
|
@@ -26,8 +26,7 @@ const InputAddon = dsClassnames.aggregatedClasses('span')(blockName, 'addon');
|
|
|
26
26
|
class AddonWrapper extends React.Component {
|
|
27
27
|
constructor() {
|
|
28
28
|
super(...arguments);
|
|
29
|
-
|
|
30
|
-
_defineProperty__default["default"](this, "state", {});
|
|
29
|
+
this.state = {};
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
render() {
|
|
@@ -47,7 +46,6 @@ class AddonWrapper extends React.Component {
|
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
}
|
|
50
|
-
|
|
51
|
-
_defineProperty__default["default"](AddonWrapper, "defaultProps", {});
|
|
49
|
+
AddonWrapper.defaultProps = {};
|
|
52
50
|
|
|
53
51
|
module.exports = AddonWrapper;
|
|
@@ -96,12 +96,10 @@ class DSInputMaskDeprecated extends React.Component {
|
|
|
96
96
|
|
|
97
97
|
super(props);
|
|
98
98
|
_this = this;
|
|
99
|
+
this.lastkey = null;
|
|
100
|
+
this.lastkeycode = null;
|
|
99
101
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
_defineProperty__default["default"](this, "lastkeycode", null);
|
|
103
|
-
|
|
104
|
-
_defineProperty__default["default"](this, "conformValue", function (rawValueOrEvent, currentCaretPosition) {
|
|
102
|
+
this.conformValue = function (rawValueOrEvent, currentCaretPosition) {
|
|
105
103
|
let {
|
|
106
104
|
skipCaretPositioning = false,
|
|
107
105
|
skipOnChangeCallback = false
|
|
@@ -213,9 +211,9 @@ class DSInputMaskDeprecated extends React.Component {
|
|
|
213
211
|
if (!skipOnChangeCallback) onChange(event);
|
|
214
212
|
if (!skipCaretPositioning) setTimeout(() => setCaretPosition(_this.inputref, caretPos));
|
|
215
213
|
});
|
|
216
|
-
}
|
|
214
|
+
};
|
|
217
215
|
|
|
218
|
-
|
|
216
|
+
this.handleOnChange = e => {
|
|
219
217
|
var _e$target;
|
|
220
218
|
|
|
221
219
|
const rawValue = (e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value) || '';
|
|
@@ -224,9 +222,9 @@ class DSInputMaskDeprecated extends React.Component {
|
|
|
224
222
|
} = e.target;
|
|
225
223
|
const currentCaretPosition = selectionEnd;
|
|
226
224
|
this.conformValue(rawValue, currentCaretPosition);
|
|
227
|
-
}
|
|
225
|
+
};
|
|
228
226
|
|
|
229
|
-
|
|
227
|
+
this.handleKeyDown = e => {
|
|
230
228
|
e.stopPropagation();
|
|
231
229
|
const {
|
|
232
230
|
onKeyDown
|
|
@@ -234,9 +232,9 @@ class DSInputMaskDeprecated extends React.Component {
|
|
|
234
232
|
this.lastkey = e.key;
|
|
235
233
|
this.lastkeycode = e.keyCode;
|
|
236
234
|
onKeyDown(e);
|
|
237
|
-
}
|
|
235
|
+
};
|
|
238
236
|
|
|
239
|
-
|
|
237
|
+
this.handleBlur = e => {
|
|
240
238
|
const {
|
|
241
239
|
onBlur
|
|
242
240
|
} = this.props;
|
|
@@ -244,7 +242,7 @@ class DSInputMaskDeprecated extends React.Component {
|
|
|
244
242
|
focus: false
|
|
245
243
|
});
|
|
246
244
|
onBlur(e);
|
|
247
|
-
}
|
|
245
|
+
};
|
|
248
246
|
|
|
249
247
|
this.inputref = /*#__PURE__*/React__default["default"].createRef();
|
|
250
248
|
this.state = {
|
|
@@ -19,7 +19,7 @@ var Grid__default = /*#__PURE__*/_interopDefaultLegacy(Grid);
|
|
|
19
19
|
|
|
20
20
|
const MenuItem = props$1 => {
|
|
21
21
|
const propsWithDefault = dsPropsHelpers.useMemoMergePropsWithDefault(props$1, props.defaultProps);
|
|
22
|
-
dsPropsHelpers.useValidateTypescriptPropTypes(propsWithDefault,
|
|
22
|
+
dsPropsHelpers.useValidateTypescriptPropTypes(propsWithDefault, props.itemProps);
|
|
23
23
|
const {
|
|
24
24
|
dsId,
|
|
25
25
|
label,
|
|
@@ -18,7 +18,7 @@ var Grid__default = /*#__PURE__*/_interopDefaultLegacy(Grid);
|
|
|
18
18
|
|
|
19
19
|
const Section = props$1 => {
|
|
20
20
|
const propsWithDefault = dsPropsHelpers.useMemoMergePropsWithDefault(props$1, props.defaultProps);
|
|
21
|
-
dsPropsHelpers.useValidateTypescriptPropTypes(propsWithDefault,
|
|
21
|
+
dsPropsHelpers.useValidateTypescriptPropTypes(propsWithDefault, props.itemProps);
|
|
22
22
|
const {
|
|
23
23
|
label,
|
|
24
24
|
wrapperStyles,
|
|
@@ -14,7 +14,7 @@ const StyledGroupLabel = /*#__PURE__*/styled__default["default"].span.withConfig
|
|
|
14
14
|
})(["font-family:12px;color:", ";"], props => props.theme.colors.neutral[500]);
|
|
15
15
|
const StyledSectionWrapper = /*#__PURE__*/styled__default["default"].li.withConfig({
|
|
16
16
|
componentId: "sc-6xya9j-1"
|
|
17
|
-
})(["", " ", " list-style:none;padding:0px 16px;"], styledSystem.position, styledSystem.layout);
|
|
17
|
+
})(["", " ", " list-style:none;padding:0px 16px;height:24px;display:flex;align-items:center;"], styledSystem.position, styledSystem.layout);
|
|
18
18
|
|
|
19
19
|
exports.StyledGroupLabel = StyledGroupLabel;
|
|
20
20
|
exports.StyledSectionWrapper = StyledSectionWrapper;
|
|
@@ -11,10 +11,10 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
11
11
|
|
|
12
12
|
const StyledSeparator = /*#__PURE__*/styled__default["default"].hr.withConfig({
|
|
13
13
|
componentId: "sc-1xat2d9-0"
|
|
14
|
-
})(["border:
|
|
14
|
+
})(["border:0;border-top:1px solid #697489;margin:4px 0px;padding:0;"]);
|
|
15
15
|
const StyledSeparatorWrapper = /*#__PURE__*/styled__default["default"].li.withConfig({
|
|
16
16
|
componentId: "sc-1xat2d9-1"
|
|
17
|
-
})(["list-style:none;
|
|
17
|
+
})(["list-style:none;padding:0px 16px;", " ", ""], styledSystem.position, styledSystem.layout);
|
|
18
18
|
|
|
19
19
|
exports.StyledSeparator = StyledSeparator;
|
|
20
20
|
exports.StyledSeparatorWrapper = StyledSeparatorWrapper;
|
|
@@ -9,7 +9,6 @@ var DSTruncatedTooltipText = require('@elliemae/ds-truncated-tooltip-text');
|
|
|
9
9
|
var dsIcons = require('@elliemae/ds-icons');
|
|
10
10
|
var Grid = require('@elliemae/ds-grid');
|
|
11
11
|
var props = require('../../props.js');
|
|
12
|
-
var styled$1 = require('./styled.js');
|
|
13
12
|
var styled = require('../styled.js');
|
|
14
13
|
var jsxRuntime = require('react/jsx-runtime');
|
|
15
14
|
|
|
@@ -51,15 +50,16 @@ const SingleMenuItem = props => {
|
|
|
51
50
|
pr: render ? 0 : 40,
|
|
52
51
|
"data-testid": dataTestid,
|
|
53
52
|
children: render ? render(props) : /*#__PURE__*/_jsx__default["default"](Grid__default["default"], {
|
|
54
|
-
cols: ['
|
|
53
|
+
cols: ['16px', 'auto'],
|
|
55
54
|
height: "16px",
|
|
56
|
-
gutter: "xxs"
|
|
57
|
-
|
|
55
|
+
gutter: "xxs",
|
|
56
|
+
alignItems: "center"
|
|
57
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"]("div", {}, void 0, isSelected && /*#__PURE__*/_jsx__default["default"](dsIcons.Checkmark, {
|
|
58
58
|
size: "s",
|
|
59
59
|
color: ['brand-primary', '600']
|
|
60
|
-
})), /*#__PURE__*/_jsx__default["default"](
|
|
60
|
+
})), /*#__PURE__*/_jsx__default["default"](DSTruncatedTooltipText.SimpleTruncatedTooltipText, {
|
|
61
61
|
value: label
|
|
62
|
-
}))
|
|
62
|
+
}))
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
65
|
|